Logo Search packages:      
Sourcecode: vala-0.12 version File versions  Download package

valaccodemethodmodule.c

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

/* valaccodemethodmodule.vala
 *
 * Copyright (C) 2007-2010  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 <valaccode.h>
#include <valagee.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>


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

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

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

typedef struct _ValaCCodeBaseModuleEmitContext ValaCCodeBaseModuleEmitContext;
typedef struct _ValaCCodeBaseModuleEmitContextClass ValaCCodeBaseModuleEmitContextClass;

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

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

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

typedef struct _ValaCCodeMethodModule ValaCCodeMethodModule;
typedef struct _ValaCCodeMethodModuleClass ValaCCodeMethodModuleClass;
typedef struct _ValaCCodeMethodModulePrivate ValaCCodeMethodModulePrivate;
#define _vala_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_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))
#define _vala_ccode_base_module_emit_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_base_module_emit_context_unref (var), NULL)))
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))

struct _ValaCCodeBaseModule {
      ValaCodeGenerator parent_instance;
      ValaCCodeBaseModulePrivate * priv;
      ValaSymbol* root_symbol;
      ValaCCodeBaseModuleEmitContext* emit_context;
      ValaCCodeFile* header_file;
      ValaCCodeFile* internal_header_file;
      ValaCCodeFile* cfile;
      ValaCCodeBaseModuleEmitContext* class_init_context;
      ValaCCodeBaseModuleEmitContext* base_init_context;
      ValaCCodeBaseModuleEmitContext* class_finalize_context;
      ValaCCodeBaseModuleEmitContext* base_finalize_context;
      ValaCCodeBaseModuleEmitContext* instance_init_context;
      ValaCCodeBaseModuleEmitContext* instance_finalize_context;
      ValaCCodeStruct* param_spec_struct;
      ValaCCodeStruct* closure_struct;
      ValaCCodeEnum* prop_enum;
      ValaSet* user_marshal_set;
      ValaSet* predefined_marshal_set;
      gint next_regex_id;
      gboolean in_constructor;
      gboolean in_static_or_class_context;
      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* gnode_type;
      ValaClass* gvaluearray_type;
      ValaTypeSymbol* gstringbuilder_type;
      ValaTypeSymbol* garray_type;
      ValaTypeSymbol* gbytearray_type;
      ValaTypeSymbol* gptrarray_type;
      ValaTypeSymbol* gthreadpool_type;
      ValaDataType* gdestroynotify_type;
      ValaDataType* gquark_type;
      ValaStruct* gvalue_type;
      ValaClass* gvariant_type;
      ValaStruct* mutex_type;
      ValaTypeSymbol* type_module_type;
      ValaTypeSymbol* dbus_proxy_type;
      ValaTypeSymbol* dbus_object_type;
      gboolean in_plugin;
      gchar* module_init_param_name;
      gboolean gvaluecollector_h_needed;
      gboolean requires_array_free;
      gboolean requires_array_move;
      gboolean requires_array_length;
      ValaSet* wrappers;
};

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

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

struct _ValaCCodeStructModuleClass {
      ValaCCodeBaseModuleClass parent_class;
};

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

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


static gpointer vala_ccode_method_module_parent_class = NULL;

GType vala_ccode_base_module_get_type (void) G_GNUC_CONST;
gpointer vala_ccode_base_module_emit_context_ref (gpointer instance);
void vala_ccode_base_module_emit_context_unref (gpointer instance);
GParamSpec* vala_ccode_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_ccode_base_module_value_set_emit_context (GValue* value, gpointer v_object);
void vala_ccode_base_module_value_take_emit_context (GValue* value, gpointer v_object);
gpointer vala_ccode_base_module_value_get_emit_context (const GValue* value);
GType vala_ccode_base_module_emit_context_get_type (void) G_GNUC_CONST;
GType vala_ccode_struct_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_module_get_type (void) G_GNUC_CONST;
enum  {
      VALA_CCODE_METHOD_MODULE_DUMMY_PROPERTY
};
static gboolean vala_ccode_method_module_real_method_has_wrapper (ValaCCodeBaseModule* base, ValaMethod* method);
static gchar* vala_ccode_method_module_real_get_custom_creturn_type (ValaCCodeBaseModule* base, ValaMethod* m);
static gchar* vala_ccode_method_module_get_creturn_type (ValaCCodeMethodModule* self, ValaMethod* m, const gchar* default_value);
gchar* vala_ccode_base_module_get_custom_creturn_type (ValaCCodeBaseModule* self, ValaMethod* m);
static gboolean vala_ccode_method_module_is_gtypeinstance_creation_method (ValaCCodeMethodModule* self, ValaMethod* m);
void vala_ccode_method_module_generate_method_result_declaration (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeFile* 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, ValaCCodeFile* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map);
void vala_ccode_base_module_generate_type_declaration (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeFile* decl_space);
gint vala_ccode_base_module_get_param_pos (ValaCCodeBaseModule* self, gdouble param_pos, gboolean ellipsis);
ValaCCodeExpression* vala_ccode_base_module_get_result_cexpression (ValaCCodeBaseModule* self, const gchar* cname);
gchar* vala_ccode_base_module_get_array_length_cname (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim);
ValaCCodeExpression* vala_ccode_base_module_get_variable_cexpression (ValaCCodeBaseModule* self, const gchar* name);
gchar* vala_ccode_base_module_get_delegate_target_cname (ValaCCodeBaseModule* self, const gchar* delegate_cname);
gchar* vala_ccode_base_module_get_delegate_target_destroy_notify_cname (ValaCCodeBaseModule* self, const gchar* delegate_cname);
void vala_ccode_method_module_complete_async (ValaCCodeMethodModule* self);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
static void vala_ccode_method_module_real_generate_method_declaration (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeFile* decl_space);
gboolean vala_ccode_base_module_add_symbol_declaration (ValaCCodeBaseModule* self, ValaCCodeFile* decl_space, ValaSymbol* sym, const gchar* name);
void vala_ccode_base_module_generate_cparameters (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
static void vala_ccode_method_module_register_plugin_types (ValaCCodeMethodModule* self, ValaSymbol* sym, ValaSet* registered_types);
static void vala_ccode_method_module_register_plugin_type (ValaCCodeMethodModule* self, ValaObjectTypeSymbol* type_symbol, ValaSet* registered_types);
static void vala_ccode_method_module_real_visit_method (ValaCodeVisitor* base, ValaMethod* m);
void vala_ccode_base_module_push_context (ValaCCodeBaseModule* self, ValaCCodeBaseModuleEmitContext* emit_context);
ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_new (ValaSymbol* symbol);
ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_construct (GType object_type, ValaSymbol* symbol);
void vala_ccode_base_module_check_type (ValaCCodeBaseModule* self, ValaDataType* type);
ValaTypeSymbol* vala_ccode_base_module_get_current_type_symbol (ValaCCodeBaseModule* self);
void vala_ccode_base_module_generate_method_declaration (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
void vala_ccode_base_module_push_function (ValaCCodeBaseModule* self, ValaCCodeFunction* func);
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);
ValaClass* vala_ccode_base_module_get_current_class (ValaCCodeBaseModule* self);
ValaCCodeExpression* vala_ccode_base_module_transform_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
static void vala_ccode_method_module_create_method_type_check_statement (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaTypeSymbol* t, gboolean non_null, const gchar* var_name);
gchar* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const gchar* name);
ValaCCodeExpression* vala_ccode_base_module_default_value_for_type (ValaCCodeBaseModule* self, ValaDataType* type, gboolean initializer_expression);
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
static void vala_ccode_method_module_create_precondition_statement (ValaCCodeMethodModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaExpression* precondition);
gboolean vala_ccode_base_module_get_current_method_inner_error (ValaCCodeBaseModule* self);
void vala_ccode_base_module_return_default_value (ValaCCodeBaseModule* self, ValaDataType* return_type);
void vala_ccode_base_module_pop_context (ValaCCodeBaseModule* self);
void vala_ccode_method_module_generate_vfunc (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaMap* cparam_map, ValaMap* carg_map, const gchar* suffix, gint direction);
ValaCCodeParameter* vala_ccode_method_module_generate_parameter (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
static ValaCCodeParameter* vala_ccode_method_module_real_generate_parameter (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
static void vala_ccode_method_module_real_generate_cparameters (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
static ValaTypeSymbol* vala_ccode_method_module_find_parent_type (ValaCCodeMethodModule* self, ValaSymbol* sym);
void vala_ccode_base_module_create_postcondition_statement (ValaCCodeBaseModule* self, ValaExpression* postcondition);
void vala_ccode_base_module_create_type_check_statement (ValaCCodeBaseModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaTypeSymbol* t, gboolean non_null, const gchar* var_name);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr);
static void vala_ccode_method_module_real_visit_creation_method (ValaCodeVisitor* base, ValaCreationMethod* m);
ValaCCodeMethodModule* vala_ccode_method_module_construct (GType object_type);
ValaCCodeStructModule* vala_ccode_struct_module_construct (GType object_type);


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


static gchar* vala_ccode_method_module_real_get_custom_creturn_type (ValaCCodeBaseModule* base, ValaMethod* m) {
      ValaCCodeMethodModule * self;
      gchar* result = NULL;
      ValaAttribute* _tmp0_ = NULL;
      ValaAttribute* attr;
      self = (ValaCCodeMethodModule*) base;
      g_return_val_if_fail (m != NULL, NULL);
      _tmp0_ = vala_code_node_get_attribute ((ValaCodeNode*) m, "CCode");
      attr = _tmp0_;
      if (attr != NULL) {
            gchar* _tmp1_ = NULL;
            gchar* type;
            _tmp1_ = vala_attribute_get_string (attr, "type");
            type = _tmp1_;
            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 gchar* vala_ccode_method_module_get_creturn_type (ValaCCodeMethodModule* self, ValaMethod* m, const gchar* default_value) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* 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);
      _tmp0_ = vala_ccode_base_module_get_custom_creturn_type ((ValaCCodeBaseModule*) self, m);
      type = _tmp0_;
      if (type == NULL) {
            gchar* _tmp1_;
            _tmp1_ = g_strdup (default_value);
            result = _tmp1_;
            _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_ = NULL;
      ValaSymbol* _tmp1_;
      ValaClass* _tmp2_;
      ValaClass* cl;
      gboolean _tmp3_ = FALSE;
      gboolean _tmp4_ = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (m != NULL, FALSE);
      _result_ = FALSE;
      _tmp0_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
      _tmp1_ = _tmp0_;
      _tmp2_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp1_) ? ((ValaClass*) _tmp1_) : NULL);
      cl = _tmp2_;
      if (VALA_IS_CREATION_METHOD (m)) {
            _tmp4_ = cl != NULL;
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            gboolean _tmp5_;
            _tmp5_ = vala_class_get_is_compact (cl);
            _tmp3_ = !_tmp5_;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            _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, ValaCCodeFile* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map) {
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp1_;
      ValaDataType* creturn_type;
      gchar* _tmp9_ = NULL;
      gchar* _tmp10_;
      gchar* _tmp11_ = NULL;
      gchar* _tmp12_;
      ValaDataType* _tmp13_ = NULL;
      ValaDataType* _tmp14_ = NULL;
      gboolean _tmp15_;
      gboolean _tmp73_ = FALSE;
      gboolean _tmp74_ = FALSE;
      ValaList* _tmp75_ = NULL;
      ValaList* _tmp76_;
      gint _tmp77_;
      gboolean _tmp78_;
      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);
      _tmp0_ = vala_method_get_return_type (m);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      creturn_type = _tmp1_;
      if (VALA_IS_CREATION_METHOD (m)) {
            ValaSymbol* _tmp2_ = NULL;
            ValaSymbol* _tmp3_;
            ValaClass* _tmp4_;
            ValaClass* cl;
            _tmp2_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
            _tmp3_ = _tmp2_;
            _tmp4_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp3_) ? ((ValaClass*) _tmp3_) : NULL);
            cl = _tmp4_;
            if (cl != NULL) {
                  ValaObjectType* _tmp5_ = NULL;
                  _tmp5_ = vala_object_type_new ((ValaObjectTypeSymbol*) cl);
                  _vala_code_node_unref0 (creturn_type);
                  creturn_type = (ValaDataType*) _tmp5_;
            }
            _vala_code_node_unref0 (cl);
      } else {
            ValaDataType* _tmp6_ = NULL;
            gboolean _tmp7_;
            _tmp6_ = vala_method_get_return_type (m);
            _tmp7_ = vala_data_type_is_real_non_null_struct_type (_tmp6_);
            if (_tmp7_) {
                  ValaVoidType* _tmp8_ = NULL;
                  _tmp8_ = vala_void_type_new (NULL);
                  _vala_code_node_unref0 (creturn_type);
                  creturn_type = (ValaDataType*) _tmp8_;
            }
      }
      _tmp9_ = vala_data_type_get_cname (creturn_type);
      _tmp10_ = _tmp9_;
      _tmp11_ = vala_ccode_method_module_get_creturn_type (self, m, _tmp10_);
      _tmp12_ = _tmp11_;
      vala_ccode_function_set_return_type (cfunc, _tmp12_);
      _g_free0 (_tmp12_);
      _g_free0 (_tmp10_);
      _tmp13_ = vala_method_get_return_type (m);
      vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp13_, decl_space);
      _tmp14_ = vala_method_get_return_type (m);
      _tmp15_ = vala_data_type_is_real_non_null_struct_type (_tmp14_);
      if (_tmp15_) {
            ValaDataType* _tmp16_ = NULL;
            gchar* _tmp17_ = NULL;
            gchar* _tmp18_;
            gchar* _tmp19_;
            gchar* _tmp20_;
            ValaCCodeParameter* _tmp21_ = NULL;
            ValaCCodeParameter* _tmp22_;
            ValaCCodeParameter* cparam;
            gint _tmp23_;
            _tmp16_ = vala_method_get_return_type (m);
            _tmp17_ = vala_data_type_get_cname (_tmp16_);
            _tmp18_ = _tmp17_;
            _tmp19_ = g_strconcat (_tmp18_, "*", NULL);
            _tmp20_ = _tmp19_;
            _tmp21_ = vala_ccode_parameter_new ("result", _tmp20_);
            _tmp22_ = _tmp21_;
            _g_free0 (_tmp20_);
            _g_free0 (_tmp18_);
            cparam = _tmp22_;
            _tmp23_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-3), FALSE);
            vala_map_set (cparam_map, GINT_TO_POINTER (_tmp23_), cparam);
            if (carg_map != NULL) {
                  gint _tmp24_;
                  ValaCCodeExpression* _tmp25_ = NULL;
                  ValaCCodeExpression* _tmp26_;
                  _tmp24_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-3), FALSE);
                  _tmp25_ = vala_ccode_base_module_get_result_cexpression ((ValaCCodeBaseModule*) self, "result");
                  _tmp26_ = _tmp25_;
                  vala_map_set (carg_map, GINT_TO_POINTER (_tmp24_), _tmp26_);
                  _vala_ccode_node_unref0 (_tmp26_);
            }
            _vala_ccode_node_unref0 (cparam);
      } else {
            gboolean _tmp27_ = FALSE;
            gboolean _tmp28_;
            _tmp28_ = vala_method_get_no_array_length (m);
            if (!_tmp28_) {
                  ValaDataType* _tmp29_ = NULL;
                  _tmp29_ = vala_method_get_return_type (m);
                  _tmp27_ = VALA_IS_ARRAY_TYPE (_tmp29_);
            } else {
                  _tmp27_ = FALSE;
            }
            if (_tmp27_) {
                  ValaDataType* _tmp30_ = NULL;
                  ValaArrayType* _tmp31_;
                  ValaArrayType* array_type;
                  _tmp30_ = vala_method_get_return_type (m);
                  _tmp31_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp30_));
                  array_type = _tmp31_;
                  {
                        gint dim;
                        dim = 1;
                        {
                              gboolean _tmp32_;
                              _tmp32_ = TRUE;
                              while (TRUE) {
                                    gint _tmp33_;
                                    gchar* _tmp34_ = NULL;
                                    gchar* _tmp35_;
                                    ValaCCodeParameter* _tmp36_ = NULL;
                                    ValaCCodeParameter* _tmp37_;
                                    ValaCCodeParameter* cparam;
                                    gdouble _tmp38_;
                                    gint _tmp39_;
                                    if (!_tmp32_) {
                                          dim++;
                                    }
                                    _tmp32_ = FALSE;
                                    _tmp33_ = vala_array_type_get_rank (array_type);
                                    if (!(dim <= _tmp33_)) {
                                          break;
                                    }
                                    _tmp34_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
                                    _tmp35_ = _tmp34_;
                                    _tmp36_ = vala_ccode_parameter_new (_tmp35_, "int*");
                                    _tmp37_ = _tmp36_;
                                    _g_free0 (_tmp35_);
                                    cparam = _tmp37_;
                                    _tmp38_ = vala_method_get_carray_length_parameter_position (m);
                                    _tmp39_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp38_ + (0.01 * dim), FALSE);
                                    vala_map_set (cparam_map, GINT_TO_POINTER (_tmp39_), cparam);
                                    if (carg_map != NULL) {
                                          gdouble _tmp40_;
                                          gint _tmp41_;
                                          const gchar* _tmp42_ = NULL;
                                          ValaCCodeExpression* _tmp43_ = NULL;
                                          ValaCCodeExpression* _tmp44_;
                                          _tmp40_ = vala_method_get_carray_length_parameter_position (m);
                                          _tmp41_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp40_ + (0.01 * dim), FALSE);
                                          _tmp42_ = vala_ccode_parameter_get_name (cparam);
                                          _tmp43_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp42_);
                                          _tmp44_ = _tmp43_;
                                          vala_map_set (carg_map, GINT_TO_POINTER (_tmp41_), _tmp44_);
                                          _vala_ccode_node_unref0 (_tmp44_);
                                    }
                                    _vala_ccode_node_unref0 (cparam);
                              }
                        }
                  }
                  _vala_code_node_unref0 (array_type);
            } else {
                  ValaDataType* _tmp45_ = NULL;
                  _tmp45_ = vala_method_get_return_type (m);
                  if (VALA_IS_DELEGATE_TYPE (_tmp45_)) {
                        ValaDataType* _tmp46_ = NULL;
                        ValaDelegateType* _tmp47_;
                        ValaDelegateType* deleg_type;
                        ValaDelegate* _tmp48_ = NULL;
                        ValaDelegate* _tmp49_;
                        ValaDelegate* d;
                        gboolean _tmp50_;
                        _tmp46_ = vala_method_get_return_type (m);
                        _tmp47_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp46_));
                        deleg_type = _tmp47_;
                        _tmp48_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                        _tmp49_ = _vala_code_node_ref0 (_tmp48_);
                        d = _tmp49_;
                        _tmp50_ = vala_delegate_get_has_target (d);
                        if (_tmp50_) {
                              gchar* _tmp51_ = NULL;
                              gchar* _tmp52_;
                              ValaCCodeParameter* _tmp53_ = NULL;
                              ValaCCodeParameter* _tmp54_;
                              ValaCCodeParameter* cparam;
                              gdouble _tmp55_;
                              gint _tmp56_;
                              gboolean _tmp62_;
                              _tmp51_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp52_ = _tmp51_;
                              _tmp53_ = vala_ccode_parameter_new (_tmp52_, "void**");
                              _tmp54_ = _tmp53_;
                              _g_free0 (_tmp52_);
                              cparam = _tmp54_;
                              _tmp55_ = vala_method_get_cdelegate_target_parameter_position (m);
                              _tmp56_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp55_, FALSE);
                              vala_map_set (cparam_map, GINT_TO_POINTER (_tmp56_), cparam);
                              if (carg_map != NULL) {
                                    gdouble _tmp57_;
                                    gint _tmp58_;
                                    const gchar* _tmp59_ = NULL;
                                    ValaCCodeExpression* _tmp60_ = NULL;
                                    ValaCCodeExpression* _tmp61_;
                                    _tmp57_ = vala_method_get_cdelegate_target_parameter_position (m);
                                    _tmp58_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp57_, FALSE);
                                    _tmp59_ = vala_ccode_parameter_get_name (cparam);
                                    _tmp60_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp59_);
                                    _tmp61_ = _tmp60_;
                                    vala_map_set (carg_map, GINT_TO_POINTER (_tmp58_), _tmp61_);
                                    _vala_ccode_node_unref0 (_tmp61_);
                              }
                              _tmp62_ = vala_data_type_get_value_owned ((ValaDataType*) deleg_type);
                              if (_tmp62_) {
                                    gchar* _tmp63_ = NULL;
                                    gchar* _tmp64_;
                                    ValaCCodeParameter* _tmp65_ = NULL;
                                    gdouble _tmp66_;
                                    gint _tmp67_;
                                    _tmp63_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, "result");
                                    _tmp64_ = _tmp63_;
                                    _tmp65_ = vala_ccode_parameter_new (_tmp64_, "GDestroyNotify*");
                                    _vala_ccode_node_unref0 (cparam);
                                    cparam = _tmp65_;
                                    _g_free0 (_tmp64_);
                                    _tmp66_ = vala_method_get_cdelegate_target_parameter_position (m);
                                    _tmp67_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp66_ + 0.01, FALSE);
                                    vala_map_set (cparam_map, GINT_TO_POINTER (_tmp67_), cparam);
                                    if (carg_map != NULL) {
                                          gdouble _tmp68_;
                                          gint _tmp69_;
                                          const gchar* _tmp70_ = NULL;
                                          ValaCCodeExpression* _tmp71_ = NULL;
                                          ValaCCodeExpression* _tmp72_;
                                          _tmp68_ = vala_method_get_cdelegate_target_parameter_position (m);
                                          _tmp69_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp68_ + 0.01, FALSE);
                                          _tmp70_ = vala_ccode_parameter_get_name (cparam);
                                          _tmp71_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp70_);
                                          _tmp72_ = _tmp71_;
                                          vala_map_set (carg_map, GINT_TO_POINTER (_tmp69_), _tmp72_);
                                          _vala_ccode_node_unref0 (_tmp72_);
                                    }
                              }
                              _vala_ccode_node_unref0 (cparam);
                        }
                        _vala_code_node_unref0 (d);
                        _vala_code_node_unref0 (deleg_type);
                  }
            }
      }
      _tmp75_ = vala_code_node_get_error_types ((ValaCodeNode*) m);
      _tmp76_ = _tmp75_;
      _tmp77_ = vala_collection_get_size ((ValaCollection*) _tmp76_);
      _tmp78_ = _tmp77_ > 0;
      _vala_iterable_unref0 (_tmp76_);
      if (_tmp78_) {
            _tmp74_ = TRUE;
      } else {
            gboolean _tmp79_ = FALSE;
            ValaMethod* _tmp80_ = NULL;
            _tmp80_ = vala_method_get_base_method (m);
            if (_tmp80_ != NULL) {
                  ValaMethod* _tmp81_ = NULL;
                  ValaList* _tmp82_ = NULL;
                  ValaList* _tmp83_;
                  gint _tmp84_;
                  _tmp81_ = vala_method_get_base_method (m);
                  _tmp82_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp81_);
                  _tmp83_ = _tmp82_;
                  _tmp84_ = vala_collection_get_size ((ValaCollection*) _tmp83_);
                  _tmp79_ = _tmp84_ > 0;
                  _vala_iterable_unref0 (_tmp83_);
            } else {
                  _tmp79_ = FALSE;
            }
            _tmp74_ = _tmp79_;
      }
      if (_tmp74_) {
            _tmp73_ = TRUE;
      } else {
            gboolean _tmp85_ = FALSE;
            ValaMethod* _tmp86_ = NULL;
            _tmp86_ = vala_method_get_base_interface_method (m);
            if (_tmp86_ != NULL) {
                  ValaMethod* _tmp87_ = NULL;
                  ValaList* _tmp88_ = NULL;
                  ValaList* _tmp89_;
                  gint _tmp90_;
                  _tmp87_ = vala_method_get_base_interface_method (m);
                  _tmp88_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp87_);
                  _tmp89_ = _tmp88_;
                  _tmp90_ = vala_collection_get_size ((ValaCollection*) _tmp89_);
                  _tmp85_ = _tmp90_ > 0;
                  _vala_iterable_unref0 (_tmp89_);
            } else {
                  _tmp85_ = FALSE;
            }
            _tmp73_ = _tmp85_;
      }
      if (_tmp73_) {
            ValaCCodeParameter* _tmp94_ = NULL;
            ValaCCodeParameter* cparam;
            gint _tmp95_;
            {
                  ValaList* _tmp91_ = NULL;
                  ValaList* _error_type_list;
                  gint _tmp92_;
                  gint _error_type_size;
                  gint _error_type_index;
                  _tmp91_ = vala_code_node_get_error_types ((ValaCodeNode*) m);
                  _error_type_list = _tmp91_;
                  _tmp92_ = vala_collection_get_size ((ValaCollection*) _error_type_list);
                  _error_type_size = _tmp92_;
                  _error_type_index = -1;
                  while (TRUE) {
                        gpointer _tmp93_ = NULL;
                        ValaDataType* error_type;
                        _error_type_index = _error_type_index + 1;
                        if (!(_error_type_index < _error_type_size)) {
                              break;
                        }
                        _tmp93_ = vala_list_get (_error_type_list, _error_type_index);
                        error_type = (ValaDataType*) _tmp93_;
                        vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, error_type, decl_space);
                        _vala_code_node_unref0 (error_type);
                  }
                  _vala_iterable_unref0 (_error_type_list);
            }
            _tmp94_ = vala_ccode_parameter_new ("error", "GError**");
            cparam = _tmp94_;
            _tmp95_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-1), FALSE);
            vala_map_set (cparam_map, GINT_TO_POINTER (_tmp95_), cparam);
            if (carg_map != NULL) {
                  gint _tmp96_;
                  const gchar* _tmp97_ = NULL;
                  ValaCCodeIdentifier* _tmp98_ = NULL;
                  ValaCCodeIdentifier* _tmp99_;
                  _tmp96_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-1), FALSE);
                  _tmp97_ = vala_ccode_parameter_get_name (cparam);
                  _tmp98_ = vala_ccode_identifier_new (_tmp97_);
                  _tmp99_ = _tmp98_;
                  vala_map_set (carg_map, GINT_TO_POINTER (_tmp96_), (ValaCCodeExpression*) _tmp99_);
                  _vala_ccode_node_unref0 (_tmp99_);
            }
            _vala_ccode_node_unref0 (cparam);
      }
      _vala_code_node_unref0 (creturn_type);
}


void vala_ccode_method_module_generate_method_result_declaration (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeFile* 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);
}


void vala_ccode_method_module_complete_async (ValaCCodeMethodModule* self) {
      ValaCCodeIdentifier* _tmp0_ = NULL;
      ValaCCodeIdentifier* _tmp1_;
      ValaCCodeMemberAccess* _tmp2_ = NULL;
      ValaCCodeMemberAccess* _tmp3_;
      ValaCCodeMemberAccess* state;
      ValaCCodeConstant* _tmp4_ = NULL;
      ValaCCodeConstant* zero;
      ValaCCodeBinaryExpression* _tmp5_ = NULL;
      ValaCCodeBinaryExpression* state_is_zero;
      ValaCCodeFunction* _tmp6_ = NULL;
      ValaCCodeIdentifier* _tmp7_ = NULL;
      ValaCCodeIdentifier* _tmp8_;
      ValaCCodeMemberAccess* _tmp9_ = NULL;
      ValaCCodeMemberAccess* _tmp10_;
      ValaCCodeMemberAccess* async_result_expr;
      ValaCCodeIdentifier* _tmp11_ = NULL;
      ValaCCodeIdentifier* _tmp12_;
      ValaCCodeFunctionCall* _tmp13_ = NULL;
      ValaCCodeFunctionCall* _tmp14_;
      ValaCCodeFunctionCall* idle_call;
      ValaCCodeFunction* _tmp15_ = NULL;
      ValaCCodeFunction* _tmp16_ = NULL;
      ValaCCodeIdentifier* _tmp17_ = NULL;
      ValaCCodeIdentifier* _tmp18_;
      ValaCCodeFunctionCall* _tmp19_ = NULL;
      ValaCCodeFunctionCall* _tmp20_;
      ValaCCodeFunctionCall* direct_call;
      ValaCCodeFunction* _tmp21_ = NULL;
      ValaCCodeFunction* _tmp22_ = NULL;
      ValaCCodeIdentifier* _tmp23_ = NULL;
      ValaCCodeIdentifier* _tmp24_;
      ValaCCodeFunctionCall* _tmp25_ = NULL;
      ValaCCodeFunctionCall* _tmp26_;
      ValaCCodeFunctionCall* unref;
      ValaCCodeFunction* _tmp27_ = NULL;
      ValaCCodeFunction* _tmp28_ = NULL;
      ValaCCodeConstant* _tmp29_ = NULL;
      ValaCCodeConstant* _tmp30_;
      g_return_if_fail (self != NULL);
      _tmp0_ = vala_ccode_identifier_new ("data");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp1_, "_state_");
      _tmp3_ = _tmp2_;
      _vala_ccode_node_unref0 (_tmp1_);
      state = _tmp3_;
      _tmp4_ = vala_ccode_constant_new ("0");
      zero = _tmp4_;
      _tmp5_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) state, (ValaCCodeExpression*) zero);
      state_is_zero = _tmp5_;
      _tmp6_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_if (_tmp6_, (ValaCCodeExpression*) state_is_zero);
      _tmp7_ = vala_ccode_identifier_new ("data");
      _tmp8_ = _tmp7_;
      _tmp9_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp8_, "_async_result");
      _tmp10_ = _tmp9_;
      _vala_ccode_node_unref0 (_tmp8_);
      async_result_expr = _tmp10_;
      _tmp11_ = vala_ccode_identifier_new ("g_simple_async_result_complete_in_idle");
      _tmp12_ = _tmp11_;
      _tmp13_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp12_);
      _tmp14_ = _tmp13_;
      _vala_ccode_node_unref0 (_tmp12_);
      idle_call = _tmp14_;
      vala_ccode_function_call_add_argument (idle_call, (ValaCCodeExpression*) async_result_expr);
      _tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp15_, (ValaCCodeExpression*) idle_call);
      _tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_else (_tmp16_);
      _tmp17_ = vala_ccode_identifier_new ("g_simple_async_result_complete");
      _tmp18_ = _tmp17_;
      _tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp18_);
      _tmp20_ = _tmp19_;
      _vala_ccode_node_unref0 (_tmp18_);
      direct_call = _tmp20_;
      vala_ccode_function_call_add_argument (direct_call, (ValaCCodeExpression*) async_result_expr);
      _tmp21_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp21_, (ValaCCodeExpression*) direct_call);
      _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp22_);
      _tmp23_ = vala_ccode_identifier_new ("g_object_unref");
      _tmp24_ = _tmp23_;
      _tmp25_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp24_);
      _tmp26_ = _tmp25_;
      _vala_ccode_node_unref0 (_tmp24_);
      unref = _tmp26_;
      vala_ccode_function_call_add_argument (unref, (ValaCCodeExpression*) async_result_expr);
      _tmp27_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp27_, (ValaCCodeExpression*) unref);
      _tmp28_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp29_ = vala_ccode_constant_new ("FALSE");
      _tmp30_ = _tmp29_;
      vala_ccode_function_add_return (_tmp28_, (ValaCCodeExpression*) _tmp30_);
      _vala_ccode_node_unref0 (_tmp30_);
      _vala_ccode_node_unref0 (unref);
      _vala_ccode_node_unref0 (direct_call);
      _vala_ccode_node_unref0 (idle_call);
      _vala_ccode_node_unref0 (async_result_expr);
      _vala_ccode_node_unref0 (state_is_zero);
      _vala_ccode_node_unref0 (zero);
      _vala_ccode_node_unref0 (state);
}


static void vala_ccode_method_module_real_generate_method_declaration (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeFile* decl_space) {
      ValaCCodeMethodModule * self;
      gboolean _tmp0_;
      gchar* _tmp1_ = NULL;
      gchar* _tmp2_;
      gboolean _tmp3_;
      gboolean _tmp4_;
      gchar* _tmp5_ = NULL;
      gchar* _tmp6_;
      ValaCCodeFunction* _tmp7_ = NULL;
      ValaCCodeFunction* _tmp8_;
      ValaCCodeFunction* function;
      gboolean _tmp9_ = FALSE;
      gboolean _tmp10_;
      gboolean _tmp15_;
      ValaHashMap* _tmp17_ = NULL;
      ValaHashMap* cparam_map;
      ValaHashMap* _tmp18_ = NULL;
      ValaHashMap* carg_map;
      ValaSymbol* _tmp19_ = NULL;
      ValaSymbol* _tmp20_;
      ValaClass* _tmp21_;
      ValaClass* cl;
      gboolean _tmp22_ = FALSE;
      gboolean _tmp23_ = FALSE;
      gboolean _tmp29_ = FALSE;
      self = (ValaCCodeMethodModule*) base;
      g_return_if_fail (m != NULL);
      g_return_if_fail (decl_space != NULL);
      _tmp0_ = vala_method_get_is_async_callback (m);
      if (_tmp0_) {
            return;
      }
      _tmp1_ = vala_method_get_cname (m);
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_ccode_base_module_add_symbol_declaration ((ValaCCodeBaseModule*) self, decl_space, (ValaSymbol*) m, _tmp2_);
      _tmp4_ = _tmp3_;
      _g_free0 (_tmp2_);
      if (_tmp4_) {
            return;
      }
      _tmp5_ = vala_method_get_cname (m);
      _tmp6_ = _tmp5_;
      _tmp7_ = vala_ccode_function_new (_tmp6_, "void");
      _tmp8_ = _tmp7_;
      _g_free0 (_tmp6_);
      function = _tmp8_;
      _tmp10_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
      if (_tmp10_) {
            gboolean _tmp11_;
            _tmp11_ = vala_symbol_get_external ((ValaSymbol*) m);
            _tmp9_ = !_tmp11_;
      } else {
            _tmp9_ = FALSE;
      }
      if (_tmp9_) {
            ValaCCodeModifiers _tmp12_;
            gboolean _tmp13_;
            _tmp12_ = vala_ccode_function_get_modifiers (function);
            vala_ccode_function_set_modifiers (function, _tmp12_ | VALA_CCODE_MODIFIERS_STATIC);
            _tmp13_ = vala_method_get_is_inline (m);
            if (_tmp13_) {
                  ValaCCodeModifiers _tmp14_;
                  _tmp14_ = vala_ccode_function_get_modifiers (function);
                  vala_ccode_function_set_modifiers (function, _tmp14_ | VALA_CCODE_MODIFIERS_INLINE);
            }
      }
      _tmp15_ = vala_symbol_get_deprecated ((ValaSymbol*) m);
      if (_tmp15_) {
            ValaCCodeModifiers _tmp16_;
            _tmp16_ = vala_ccode_function_get_modifiers (function);
            vala_ccode_function_set_modifiers (function, _tmp16_ | VALA_CCODE_MODIFIERS_DEPRECATED);
      }
      _tmp17_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
      cparam_map = _tmp17_;
      _tmp18_ = 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);
      carg_map = _tmp18_;
      _tmp19_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
      _tmp20_ = _tmp19_;
      _tmp21_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp20_) ? ((ValaClass*) _tmp20_) : NULL);
      cl = _tmp21_;
      if (VALA_IS_CREATION_METHOD (m)) {
            _tmp23_ = cl != NULL;
      } else {
            _tmp23_ = FALSE;
      }
      if (_tmp23_) {
            gboolean _tmp24_;
            _tmp24_ = vala_class_get_is_abstract (cl);
            _tmp22_ = _tmp24_;
      } else {
            _tmp22_ = FALSE;
      }
      if (!_tmp22_) {
            ValaCCodeIdentifier* _tmp25_ = NULL;
            ValaCCodeIdentifier* _tmp26_;
            ValaCCodeFunctionCall* _tmp27_ = NULL;
            ValaCCodeFunctionCall* _tmp28_;
            _tmp25_ = vala_ccode_identifier_new ("fake");
            _tmp26_ = _tmp25_;
            _tmp27_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp26_);
            _tmp28_ = _tmp27_;
            vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, function, NULL, (ValaMap*) carg_map, _tmp28_, 3);
            _vala_ccode_node_unref0 (_tmp28_);
            _vala_ccode_node_unref0 (_tmp26_);
            vala_ccode_file_add_function_declaration (decl_space, function);
      }
      if (VALA_IS_CREATION_METHOD (m)) {
            _tmp29_ = cl != NULL;
      } else {
            _tmp29_ = FALSE;
      }
      if (_tmp29_) {
            gchar* _tmp30_ = NULL;
            gchar* _tmp31_;
            ValaCCodeFunction* _tmp32_ = NULL;
            gboolean _tmp33_;
            ValaHashMap* _tmp35_ = NULL;
            _tmp30_ = vala_method_get_real_cname (m);
            _tmp31_ = _tmp30_;
            _tmp32_ = vala_ccode_function_new (_tmp31_, "void");
            _vala_ccode_node_unref0 (function);
            function = _tmp32_;
            _g_free0 (_tmp31_);
            _tmp33_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
            if (_tmp33_) {
                  ValaCCodeModifiers _tmp34_;
                  _tmp34_ = vala_ccode_function_get_modifiers (function);
                  vala_ccode_function_set_modifiers (function, _tmp34_ | VALA_CCODE_MODIFIERS_STATIC);
            }
            _tmp35_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
            _vala_map_unref0 (cparam_map);
            cparam_map = _tmp35_;
            vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, function, NULL, NULL, NULL, 3);
            vala_ccode_file_add_function_declaration (decl_space, function);
      }
      _vala_code_node_unref0 (cl);
      _vala_map_unref0 (carg_map);
      _vala_map_unref0 (cparam_map);
      _vala_ccode_node_unref0 (function);
}


static void vala_ccode_method_module_register_plugin_types (ValaCCodeMethodModule* self, ValaSymbol* sym, ValaSet* registered_types) {
      ValaSymbol* _tmp0_;
      ValaNamespace* _tmp1_;
      ValaNamespace* ns;
      ValaSymbol* _tmp2_;
      ValaClass* _tmp3_;
      ValaClass* cl;
      ValaSymbol* _tmp4_;
      ValaInterface* _tmp5_;
      ValaInterface* iface;
      g_return_if_fail (self != NULL);
      g_return_if_fail (sym != NULL);
      g_return_if_fail (registered_types != NULL);
      _tmp0_ = sym;
      _tmp1_ = _vala_code_node_ref0 (VALA_IS_NAMESPACE (_tmp0_) ? ((ValaNamespace*) _tmp0_) : NULL);
      ns = _tmp1_;
      _tmp2_ = sym;
      _tmp3_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp2_) ? ((ValaClass*) _tmp2_) : NULL);
      cl = _tmp3_;
      _tmp4_ = sym;
      _tmp5_ = _vala_code_node_ref0 (VALA_IS_INTERFACE (_tmp4_) ? ((ValaInterface*) _tmp4_) : NULL);
      iface = _tmp5_;
      if (ns != NULL) {
            {
                  ValaList* _tmp6_ = NULL;
                  ValaList* _ns_ns_list;
                  gint _tmp7_;
                  gint _ns_ns_size;
                  gint _ns_ns_index;
                  _tmp6_ = vala_namespace_get_namespaces (ns);
                  _ns_ns_list = _tmp6_;
                  _tmp7_ = vala_collection_get_size ((ValaCollection*) _ns_ns_list);
                  _ns_ns_size = _tmp7_;
                  _ns_ns_index = -1;
                  while (TRUE) {
                        gpointer _tmp8_ = NULL;
                        ValaNamespace* ns_ns;
                        _ns_ns_index = _ns_ns_index + 1;
                        if (!(_ns_ns_index < _ns_ns_size)) {
                              break;
                        }
                        _tmp8_ = vala_list_get (_ns_ns_list, _ns_ns_index);
                        ns_ns = (ValaNamespace*) _tmp8_;
                        vala_ccode_method_module_register_plugin_types (self, (ValaSymbol*) ns_ns, registered_types);
                        _vala_code_node_unref0 (ns_ns);
                  }
                  _vala_iterable_unref0 (_ns_ns_list);
            }
            {
                  ValaList* _tmp9_ = NULL;
                  ValaList* _ns_cl_list;
                  gint _tmp10_;
                  gint _ns_cl_size;
                  gint _ns_cl_index;
                  _tmp9_ = vala_namespace_get_classes (ns);
                  _ns_cl_list = _tmp9_;
                  _tmp10_ = vala_collection_get_size ((ValaCollection*) _ns_cl_list);
                  _ns_cl_size = _tmp10_;
                  _ns_cl_index = -1;
                  while (TRUE) {
                        gpointer _tmp11_ = NULL;
                        ValaClass* ns_cl;
                        _ns_cl_index = _ns_cl_index + 1;
                        if (!(_ns_cl_index < _ns_cl_size)) {
                              break;
                        }
                        _tmp11_ = vala_list_get (_ns_cl_list, _ns_cl_index);
                        ns_cl = (ValaClass*) _tmp11_;
                        vala_ccode_method_module_register_plugin_types (self, (ValaSymbol*) ns_cl, registered_types);
                        _vala_code_node_unref0 (ns_cl);
                  }
                  _vala_iterable_unref0 (_ns_cl_list);
            }
            {
                  ValaList* _tmp12_ = NULL;
                  ValaList* _ns_iface_list;
                  gint _tmp13_;
                  gint _ns_iface_size;
                  gint _ns_iface_index;
                  _tmp12_ = vala_namespace_get_interfaces (ns);
                  _ns_iface_list = _tmp12_;
                  _tmp13_ = vala_collection_get_size ((ValaCollection*) _ns_iface_list);
                  _ns_iface_size = _tmp13_;
                  _ns_iface_index = -1;
                  while (TRUE) {
                        gpointer _tmp14_ = NULL;
                        ValaInterface* ns_iface;
                        _ns_iface_index = _ns_iface_index + 1;
                        if (!(_ns_iface_index < _ns_iface_size)) {
                              break;
                        }
                        _tmp14_ = vala_list_get (_ns_iface_list, _ns_iface_index);
                        ns_iface = (ValaInterface*) _tmp14_;
                        vala_ccode_method_module_register_plugin_types (self, (ValaSymbol*) ns_iface, registered_types);
                        _vala_code_node_unref0 (ns_iface);
                  }
                  _vala_iterable_unref0 (_ns_iface_list);
            }
      } else {
            if (cl != NULL) {
                  vala_ccode_method_module_register_plugin_type (self, (ValaObjectTypeSymbol*) cl, registered_types);
                  {
                        ValaList* _tmp15_ = NULL;
                        ValaList* _cl_cl_list;
                        gint _tmp16_;
                        gint _cl_cl_size;
                        gint _cl_cl_index;
                        _tmp15_ = vala_class_get_classes (cl);
                        _cl_cl_list = _tmp15_;
                        _tmp16_ = vala_collection_get_size ((ValaCollection*) _cl_cl_list);
                        _cl_cl_size = _tmp16_;
                        _cl_cl_index = -1;
                        while (TRUE) {
                              gpointer _tmp17_ = NULL;
                              ValaClass* cl_cl;
                              _cl_cl_index = _cl_cl_index + 1;
                              if (!(_cl_cl_index < _cl_cl_size)) {
                                    break;
                              }
                              _tmp17_ = vala_list_get (_cl_cl_list, _cl_cl_index);
                              cl_cl = (ValaClass*) _tmp17_;
                              vala_ccode_method_module_register_plugin_types (self, (ValaSymbol*) cl_cl, registered_types);
                              _vala_code_node_unref0 (cl_cl);
                        }
                        _vala_iterable_unref0 (_cl_cl_list);
                  }
            } else {
                  if (iface != NULL) {
                        vala_ccode_method_module_register_plugin_type (self, (ValaObjectTypeSymbol*) iface, registered_types);
                        {
                              ValaList* _tmp18_ = NULL;
                              ValaList* _iface_cl_list;
                              gint _tmp19_;
                              gint _iface_cl_size;
                              gint _iface_cl_index;
                              _tmp18_ = vala_interface_get_classes (iface);
                              _iface_cl_list = _tmp18_;
                              _tmp19_ = vala_collection_get_size ((ValaCollection*) _iface_cl_list);
                              _iface_cl_size = _tmp19_;
                              _iface_cl_index = -1;
                              while (TRUE) {
                                    gpointer _tmp20_ = NULL;
                                    ValaClass* iface_cl;
                                    _iface_cl_index = _iface_cl_index + 1;
                                    if (!(_iface_cl_index < _iface_cl_size)) {
                                          break;
                                    }
                                    _tmp20_ = vala_list_get (_iface_cl_list, _iface_cl_index);
                                    iface_cl = (ValaClass*) _tmp20_;
                                    vala_ccode_method_module_register_plugin_types (self, (ValaSymbol*) iface_cl, registered_types);
                                    _vala_code_node_unref0 (iface_cl);
                              }
                              _vala_iterable_unref0 (_iface_cl_list);
                        }
                  }
            }
      }
      _vala_code_node_unref0 (iface);
      _vala_code_node_unref0 (cl);
      _vala_code_node_unref0 (ns);
}


static void vala_ccode_method_module_register_plugin_type (ValaCCodeMethodModule* self, ValaObjectTypeSymbol* type_symbol, ValaSet* registered_types) {
      gboolean _tmp0_;
      gboolean _tmp1_;
      ValaObjectTypeSymbol* _tmp2_;
      ValaClass* _tmp3_;
      ValaClass* cl;
      gchar* _tmp9_ = NULL;
      gchar* _tmp10_;
      gchar* _tmp11_ = NULL;
      gchar* _tmp12_;
      ValaCCodeIdentifier* _tmp13_ = NULL;
      ValaCCodeIdentifier* _tmp14_;
      ValaCCodeFunctionCall* _tmp15_ = NULL;
      ValaCCodeFunctionCall* _tmp16_;
      ValaCCodeFunctionCall* register_call;
      ValaCCodeIdentifier* _tmp17_ = NULL;
      ValaCCodeIdentifier* _tmp18_;
      ValaCCodeFunction* _tmp19_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (type_symbol != NULL);
      g_return_if_fail (registered_types != NULL);
      _tmp0_ = vala_symbol_get_external_package ((ValaSymbol*) type_symbol);
      if (_tmp0_) {
            return;
      }
      _tmp1_ = vala_collection_add ((ValaCollection*) registered_types, (ValaSymbol*) type_symbol);
      if (!_tmp1_) {
            return;
      }
      _tmp2_ = type_symbol;
      _tmp3_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp2_) ? ((ValaClass*) _tmp2_) : NULL);
      cl = _tmp3_;
      if (cl != NULL) {
            gboolean _tmp4_;
            _tmp4_ = vala_class_get_is_compact (cl);
            if (_tmp4_) {
                  _vala_code_node_unref0 (cl);
                  return;
            }
            {
                  ValaList* _tmp5_ = NULL;
                  ValaList* _base_type_list;
                  gint _tmp6_;
                  gint _base_type_size;
                  gint _base_type_index;
                  _tmp5_ = vala_class_get_base_types (cl);
                  _base_type_list = _tmp5_;
                  _tmp6_ = vala_collection_get_size ((ValaCollection*) _base_type_list);
                  _base_type_size = _tmp6_;
                  _base_type_index = -1;
                  while (TRUE) {
                        gpointer _tmp7_ = NULL;
                        ValaDataType* base_type;
                        ValaTypeSymbol* _tmp8_ = NULL;
                        _base_type_index = _base_type_index + 1;
                        if (!(_base_type_index < _base_type_size)) {
                              break;
                        }
                        _tmp7_ = vala_list_get (_base_type_list, _base_type_index);
                        base_type = (ValaDataType*) _tmp7_;
                        _tmp8_ = vala_data_type_get_data_type (base_type);
                        vala_ccode_method_module_register_plugin_type (self, VALA_OBJECT_TYPE_SYMBOL (_tmp8_), registered_types);
                        _vala_code_node_unref0 (base_type);
                  }
                  _vala_iterable_unref0 (_base_type_list);
            }
      }
      _tmp9_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) type_symbol, NULL);
      _tmp10_ = _tmp9_;
      _tmp11_ = g_strdup_printf ("%s_register_type", _tmp10_);
      _tmp12_ = _tmp11_;
      _tmp13_ = vala_ccode_identifier_new (_tmp12_);
      _tmp14_ = _tmp13_;
      _tmp15_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp14_);
      _tmp16_ = _tmp15_;
      _vala_ccode_node_unref0 (_tmp14_);
      _g_free0 (_tmp12_);
      _g_free0 (_tmp10_);
      register_call = _tmp16_;
      _tmp17_ = vala_ccode_identifier_new (((ValaCCodeBaseModule*) self)->module_init_param_name);
      _tmp18_ = _tmp17_;
      vala_ccode_function_call_add_argument (register_call, (ValaCCodeExpression*) _tmp18_);
      _vala_ccode_node_unref0 (_tmp18_);
      _tmp19_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp19_, (ValaCCodeExpression*) register_call);
      _vala_ccode_node_unref0 (register_call);
      _vala_code_node_unref0 (cl);
}


static void vala_ccode_method_module_real_visit_method (ValaCodeVisitor* base, ValaMethod* m) {
      ValaCCodeMethodModule * self;
      ValaCCodeBaseModuleEmitContext* _tmp0_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp1_;
      gboolean in_gobject_creation_method;
      gboolean in_fundamental_creation_method;
      ValaDataType* _tmp2_ = NULL;
      gboolean _tmp11_;
      ValaDataType* _tmp12_ = NULL;
      ValaDataType* _tmp13_;
      ValaDataType* creturn_type;
      ValaDataType* _tmp14_ = NULL;
      gboolean _tmp15_;
      gboolean _tmp17_ = FALSE;
      ValaMemberBinding _tmp18_;
      gboolean _tmp23_ = FALSE;
      gboolean _tmp24_ = FALSE;
      gboolean _tmp25_;
      ValaCCodeFunction* function = NULL;
      gchar* _tmp32_ = NULL;
      gchar* _tmp33_;
      ValaCCodeFunction* _tmp34_ = NULL;
      gboolean _tmp35_;
      ValaHashMap* _tmp37_ = NULL;
      ValaHashMap* cparam_map;
      gboolean _tmp38_ = FALSE;
      gboolean _tmp39_;
      ValaComment* _tmp65_ = NULL;
      gboolean _tmp70_ = FALSE;
      gboolean _tmp71_;
      ValaBlock* _tmp471_ = NULL;
      gboolean _tmp473_ = FALSE;
      gboolean _tmp474_;
      gboolean _tmp563_ = FALSE;
      gboolean _tmp564_;
      gboolean _tmp589_ = FALSE;
      gboolean _tmp590_ = FALSE;
      gboolean _tmp591_ = FALSE;
      gboolean _tmp592_;
      gboolean _tmp598_;
      self = (ValaCCodeMethodModule*) base;
      g_return_if_fail (m != NULL);
      _tmp0_ = vala_ccode_base_module_emit_context_new ((ValaSymbol*) m);
      _tmp1_ = _tmp0_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp1_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp1_);
      in_gobject_creation_method = FALSE;
      in_fundamental_creation_method = FALSE;
      _tmp2_ = vala_method_get_return_type (m);
      vala_ccode_base_module_check_type ((ValaCCodeBaseModule*) self, _tmp2_);
      if (VALA_IS_CREATION_METHOD (m)) {
            ValaTypeSymbol* _tmp3_ = NULL;
            ValaTypeSymbol* _tmp4_;
            ValaClass* _tmp5_;
            ValaClass* cl;
            gboolean _tmp6_ = FALSE;
            _tmp3_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
            _tmp4_ = _tmp3_;
            _tmp5_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp4_) ? ((ValaClass*) _tmp4_) : NULL);
            cl = _tmp5_;
            if (cl != NULL) {
                  gboolean _tmp7_;
                  _tmp7_ = vala_class_get_is_compact (cl);
                  _tmp6_ = !_tmp7_;
            } else {
                  _tmp6_ = FALSE;
            }
            if (_tmp6_) {
                  ValaClass* _tmp8_ = NULL;
                  _tmp8_ = vala_class_get_base_class (cl);
                  if (_tmp8_ == NULL) {
                        in_fundamental_creation_method = TRUE;
                  } else {
                        gboolean _tmp9_ = FALSE;
                        if (((ValaCCodeBaseModule*) self)->gobject_type != NULL) {
                              gboolean _tmp10_;
                              _tmp10_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) cl, ((ValaCCodeBaseModule*) self)->gobject_type);
                              _tmp9_ = _tmp10_;
                        } else {
                              _tmp9_ = FALSE;
                        }
                        if (_tmp9_) {
                              in_gobject_creation_method = TRUE;
                        }
                  }
            }
            _vala_code_node_unref0 (cl);
      }
      _tmp11_ = vala_method_get_coroutine (m);
      if (_tmp11_) {
            ((ValaCCodeBaseModule*) self)->next_coroutine_state = 1;
      }
      _tmp12_ = vala_method_get_return_type (m);
      _tmp13_ = _vala_code_node_ref0 (_tmp12_);
      creturn_type = _tmp13_;
      _tmp14_ = vala_method_get_return_type (m);
      _tmp15_ = vala_data_type_is_real_non_null_struct_type (_tmp14_);
      if (_tmp15_) {
            ValaVoidType* _tmp16_ = NULL;
            _tmp16_ = vala_void_type_new (NULL);
            _vala_code_node_unref0 (creturn_type);
            creturn_type = (ValaDataType*) _tmp16_;
      }
      _tmp18_ = vala_method_get_binding (m);
      if (_tmp18_ == VALA_MEMBER_BINDING_CLASS) {
            _tmp17_ = TRUE;
      } else {
            ValaMemberBinding _tmp19_;
            _tmp19_ = vala_method_get_binding (m);
            _tmp17_ = _tmp19_ == VALA_MEMBER_BINDING_STATIC;
      }
      if (_tmp17_) {
            ((ValaCCodeBaseModule*) self)->in_static_or_class_context = TRUE;
      }
      {
            ValaList* _tmp20_ = NULL;
            ValaList* _param_list;
            gint _tmp21_;
            gint _param_size;
            gint _param_index;
            _tmp20_ = vala_method_get_parameters (m);
            _param_list = _tmp20_;
            _tmp21_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp21_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp22_ = NULL;
                  ValaParameter* param;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp22_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp22_;
                  vala_code_node_accept ((ValaCodeNode*) param, (ValaCodeVisitor*) self);
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp25_ = vala_method_get_is_abstract (m);
      if (_tmp25_) {
            _tmp24_ = TRUE;
      } else {
            gboolean _tmp26_;
            _tmp26_ = vala_method_get_is_virtual (m);
            _tmp24_ = _tmp26_;
      }
      if (_tmp24_) {
            _tmp23_ = TRUE;
      } else {
            gboolean _tmp27_ = FALSE;
            ValaMethod* _tmp28_ = NULL;
            _tmp28_ = vala_method_get_base_method (m);
            if (_tmp28_ == NULL) {
                  ValaMethod* _tmp29_ = NULL;
                  _tmp29_ = vala_method_get_base_interface_method (m);
                  _tmp27_ = _tmp29_ == NULL;
            } else {
                  _tmp27_ = FALSE;
            }
            _tmp23_ = _tmp27_;
      }
      if (_tmp23_) {
            gboolean _tmp30_;
            gboolean _tmp31_;
            vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->cfile);
            _tmp30_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
            if (!_tmp30_) {
                  vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->header_file);
            }
            _tmp31_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
            if (!_tmp31_) {
                  vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->internal_header_file);
            }
      }
      _tmp32_ = vala_method_get_real_cname (m);
      _tmp33_ = _tmp32_;
      _tmp34_ = vala_ccode_function_new (_tmp33_, "void");
      _vala_ccode_node_unref0 (function);
      function = _tmp34_;
      _g_free0 (_tmp33_);
      _tmp35_ = vala_method_get_is_inline (m);
      if (_tmp35_) {
            ValaCCodeModifiers _tmp36_;
            _tmp36_ = vala_ccode_function_get_modifiers (function);
            vala_ccode_function_set_modifiers (function, _tmp36_ | VALA_CCODE_MODIFIERS_INLINE);
      }
      _tmp37_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
      cparam_map = _tmp37_;
      vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->cfile, (ValaMap*) cparam_map, function, NULL, NULL, NULL, 3);
      _tmp39_ = vala_method_get_is_abstract (m);
      if (!_tmp39_) {
            _tmp38_ = TRUE;
      } else {
            gboolean _tmp40_ = FALSE;
            gboolean _tmp41_;
            _tmp41_ = vala_method_get_is_abstract (m);
            if (_tmp41_) {
                  ValaTypeSymbol* _tmp42_ = NULL;
                  _tmp42_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                  _tmp40_ = VALA_IS_CLASS (_tmp42_);
            } else {
                  _tmp40_ = FALSE;
            }
            _tmp38_ = _tmp40_;
      }
      if (_tmp38_) {
            gboolean _tmp43_;
            _tmp43_ = vala_method_get_coroutine (m);
            if (!_tmp43_) {
                  gboolean _tmp44_ = FALSE;
                  ValaMethod* _tmp45_ = NULL;
                  _tmp45_ = vala_method_get_base_method (m);
                  if (_tmp45_ != NULL) {
                        _tmp44_ = TRUE;
                  } else {
                        ValaMethod* _tmp46_ = NULL;
                        _tmp46_ = vala_method_get_base_interface_method (m);
                        _tmp44_ = _tmp46_ != NULL;
                  }
                  if (_tmp44_) {
                        ValaCCodeModifiers _tmp47_;
                        _tmp47_ = vala_ccode_function_get_modifiers (function);
                        vala_ccode_function_set_modifiers (function, _tmp47_ | VALA_CCODE_MODIFIERS_STATIC);
                        vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, function);
                  } else {
                        gboolean _tmp48_;
                        _tmp48_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
                        if (_tmp48_) {
                              ValaCCodeModifiers _tmp49_;
                              _tmp49_ = vala_ccode_function_get_modifiers (function);
                              vala_ccode_function_set_modifiers (function, _tmp49_ | VALA_CCODE_MODIFIERS_STATIC);
                        }
                  }
            } else {
                  ValaBlock* _tmp50_ = NULL;
                  _tmp50_ = vala_subroutine_get_body ((ValaSubroutine*) m);
                  if (_tmp50_ != NULL) {
                        gchar* _tmp51_ = NULL;
                        gchar* _tmp52_;
                        gchar* _tmp53_;
                        gchar* _tmp54_;
                        ValaCCodeFunction* _tmp55_ = NULL;
                        gchar* _tmp56_ = NULL;
                        gchar* _tmp57_;
                        gchar* _tmp58_ = NULL;
                        gchar* _tmp59_;
                        gchar* _tmp60_;
                        gchar* _tmp61_;
                        ValaCCodeParameter* _tmp62_ = NULL;
                        ValaCCodeParameter* _tmp63_;
                        ValaCCodeModifiers _tmp64_;
                        _tmp51_ = vala_method_get_real_cname (m);
                        _tmp52_ = _tmp51_;
                        _tmp53_ = g_strconcat (_tmp52_, "_co", NULL);
                        _tmp54_ = _tmp53_;
                        _tmp55_ = vala_ccode_function_new (_tmp54_, "gboolean");
                        _vala_ccode_node_unref0 (function);
                        function = _tmp55_;
                        _g_free0 (_tmp54_);
                        _g_free0 (_tmp52_);
                        _tmp56_ = vala_method_get_cname (m);
                        _tmp57_ = _tmp56_;
                        _tmp58_ = vala_symbol_lower_case_to_camel_case (_tmp57_);
                        _tmp59_ = _tmp58_;
                        _tmp60_ = g_strconcat (_tmp59_, "Data*", NULL);
                        _tmp61_ = _tmp60_;
                        _tmp62_ = vala_ccode_parameter_new ("data", _tmp61_);
                        _tmp63_ = _tmp62_;
                        vala_ccode_function_add_parameter (function, _tmp63_);
                        _vala_ccode_node_unref0 (_tmp63_);
                        _g_free0 (_tmp61_);
                        _g_free0 (_tmp59_);
                        _g_free0 (_tmp57_);
                        _tmp64_ = vala_ccode_function_get_modifiers (function);
                        vala_ccode_function_set_modifiers (function, _tmp64_ | VALA_CCODE_MODIFIERS_STATIC);
                        vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, function);
                  }
            }
      }
      _tmp65_ = vala_symbol_get_comment ((ValaSymbol*) m);
      if (_tmp65_ != NULL) {
            ValaComment* _tmp66_ = NULL;
            const gchar* _tmp67_ = NULL;
            ValaCCodeComment* _tmp68_ = NULL;
            ValaCCodeComment* _tmp69_;
            _tmp66_ = vala_symbol_get_comment ((ValaSymbol*) m);
            _tmp67_ = vala_comment_get_content (_tmp66_);
            _tmp68_ = vala_ccode_comment_new (_tmp67_);
            _tmp69_ = _tmp68_;
            vala_ccode_file_add_type_member_definition (((ValaCCodeBaseModule*) self)->cfile, (ValaCCodeNode*) _tmp69_);
            _vala_ccode_node_unref0 (_tmp69_);
      }
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, function);
      _tmp71_ = vala_method_get_is_abstract (m);
      if (!_tmp71_) {
            _tmp70_ = TRUE;
      } else {
            gboolean _tmp72_ = FALSE;
            gboolean _tmp73_;
            _tmp73_ = vala_method_get_is_abstract (m);
            if (_tmp73_) {
                  ValaTypeSymbol* _tmp74_ = NULL;
                  _tmp74_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                  _tmp72_ = VALA_IS_CLASS (_tmp74_);
            } else {
                  _tmp72_ = FALSE;
            }
            _tmp70_ = _tmp72_;
      }
      if (_tmp70_) {
            ValaBlock* _tmp75_ = NULL;
            _tmp75_ = vala_subroutine_get_body ((ValaSubroutine*) m);
            if (_tmp75_ != NULL) {
                  gboolean _tmp76_;
                  gboolean _tmp104_;
                  gboolean _tmp316_ = FALSE;
                  gboolean _tmp317_ = FALSE;
                  ValaDataType* _tmp318_ = NULL;
                  gboolean _tmp461_ = FALSE;
                  ValaCodeContext* _tmp462_ = NULL;
                  ValaMethod* _tmp463_ = NULL;
                  _tmp76_ = vala_method_get_coroutine (m);
                  if (_tmp76_) {
                        ValaCCodeFunction* _tmp77_ = NULL;
                        ValaCCodeIdentifier* _tmp78_ = NULL;
                        ValaCCodeIdentifier* _tmp79_;
                        ValaCCodeMemberAccess* _tmp80_ = NULL;
                        ValaCCodeMemberAccess* _tmp81_;
                        ValaCCodeFunction* _tmp82_ = NULL;
                        ValaCCodeConstant* _tmp83_ = NULL;
                        ValaCCodeConstant* _tmp84_;
                        ValaCCodeFunction* _tmp85_ = NULL;
                        ValaCCodeFunction* _tmp96_ = NULL;
                        ValaCCodeFunction* _tmp97_ = NULL;
                        ValaCCodeIdentifier* _tmp98_ = NULL;
                        ValaCCodeIdentifier* _tmp99_;
                        ValaCCodeFunctionCall* _tmp100_ = NULL;
                        ValaCCodeFunctionCall* _tmp101_;
                        ValaCCodeFunction* _tmp102_ = NULL;
                        ValaCCodeFunction* _tmp103_ = NULL;
                        _tmp77_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp78_ = vala_ccode_identifier_new ("data");
                        _tmp79_ = _tmp78_;
                        _tmp80_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp79_, "_state_");
                        _tmp81_ = _tmp80_;
                        vala_ccode_function_open_switch (_tmp77_, (ValaCCodeExpression*) _tmp81_);
                        _vala_ccode_node_unref0 (_tmp81_);
                        _vala_ccode_node_unref0 (_tmp79_);
                        _tmp82_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp83_ = vala_ccode_constant_new ("0");
                        _tmp84_ = _tmp83_;
                        vala_ccode_function_add_case (_tmp82_, (ValaCCodeExpression*) _tmp84_);
                        _vala_ccode_node_unref0 (_tmp84_);
                        _tmp85_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        vala_ccode_function_add_goto (_tmp85_, "_state_0");
                        {
                              gint state;
                              state = 1;
                              {
                                    gboolean _tmp86_;
                                    _tmp86_ = TRUE;
                                    while (TRUE) {
                                          gint _tmp87_;
                                          ValaCCodeFunction* _tmp88_ = NULL;
                                          gchar* _tmp89_ = NULL;
                                          gchar* _tmp90_;
                                          ValaCCodeConstant* _tmp91_ = NULL;
                                          ValaCCodeConstant* _tmp92_;
                                          ValaCCodeFunction* _tmp93_ = NULL;
                                          gchar* _tmp94_ = NULL;
                                          gchar* _tmp95_;
                                          if (!_tmp86_) {
                                                state++;
                                          }
                                          _tmp86_ = FALSE;
                                          _tmp87_ = vala_method_get_yield_count (m);
                                          if (!(state <= _tmp87_)) {
                                                break;
                                          }
                                          _tmp88_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                          _tmp89_ = g_strdup_printf ("%i", state);
                                          _tmp90_ = _tmp89_;
                                          _tmp91_ = vala_ccode_constant_new (_tmp90_);
                                          _tmp92_ = _tmp91_;
                                          vala_ccode_function_add_case (_tmp88_, (ValaCCodeExpression*) _tmp92_);
                                          _vala_ccode_node_unref0 (_tmp92_);
                                          _g_free0 (_tmp90_);
                                          _tmp93_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                          _tmp94_ = g_strdup_printf ("_state_%d", state);
                                          _tmp95_ = _tmp94_;
                                          vala_ccode_function_add_goto (_tmp93_, _tmp95_);
                                          _g_free0 (_tmp95_);
                                    }
                              }
                        }
                        _tmp96_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        vala_ccode_function_add_default (_tmp96_);
                        _tmp97_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp98_ = vala_ccode_identifier_new ("g_assert_not_reached");
                        _tmp99_ = _tmp98_;
                        _tmp100_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp99_);
                        _tmp101_ = _tmp100_;
                        vala_ccode_function_add_expression (_tmp97_, (ValaCCodeExpression*) _tmp101_);
                        _vala_ccode_node_unref0 (_tmp101_);
                        _vala_ccode_node_unref0 (_tmp99_);
                        _tmp102_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        vala_ccode_function_close (_tmp102_);
                        _tmp103_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        vala_ccode_function_add_label (_tmp103_, "_state_0");
                  }
                  _tmp104_ = vala_method_get_closure (m);
                  if (_tmp104_) {
                        ValaBlock* _tmp105_ = NULL;
                        ValaBlock* _tmp106_;
                        ValaBlock* closure_block;
                        gint _tmp107_;
                        gint block_id;
                        ValaMemberBinding _tmp133_;
                        _tmp105_ = vala_ccode_base_module_get_current_closure_block ((ValaCCodeBaseModule*) self);
                        _tmp106_ = _vala_code_node_ref0 (_tmp105_);
                        closure_block = _tmp106_;
                        _tmp107_ = vala_ccode_base_module_get_block_id ((ValaCCodeBaseModule*) self, closure_block);
                        block_id = _tmp107_;
                        while (TRUE) {
                              ValaSymbol* _tmp108_ = NULL;
                              ValaBlock* _tmp109_ = NULL;
                              ValaBlock* _tmp110_;
                              ValaBlock* parent_closure_block;
                              gint _tmp111_;
                              gint parent_block_id;
                              gchar* _tmp112_ = NULL;
                              gchar* _tmp113_;
                              ValaCCodeIdentifier* _tmp114_ = NULL;
                              ValaCCodeIdentifier* _tmp115_;
                              gchar* _tmp116_ = NULL;
                              gchar* _tmp117_;
                              ValaCCodeMemberAccess* _tmp118_ = NULL;
                              ValaCCodeMemberAccess* _tmp119_;
                              ValaCCodeMemberAccess* parent_data;
                              ValaCCodeFunction* _tmp120_ = NULL;
                              gchar* _tmp121_ = NULL;
                              gchar* _tmp122_;
                              gchar* _tmp123_ = NULL;
                              gchar* _tmp124_;
                              ValaCCodeVariableDeclarator* _tmp125_ = NULL;
                              ValaCCodeVariableDeclarator* _tmp126_;
                              ValaCCodeFunction* _tmp127_ = NULL;
                              gchar* _tmp128_ = NULL;
                              gchar* _tmp129_;
                              ValaCCodeIdentifier* _tmp130_ = NULL;
                              ValaCCodeIdentifier* _tmp131_;
                              ValaBlock* _tmp132_;
                              _tmp108_ = vala_symbol_get_parent_symbol ((ValaSymbol*) closure_block);
                              _tmp109_ = vala_ccode_base_module_next_closure_block ((ValaCCodeBaseModule*) self, _tmp108_);
                              _tmp110_ = _vala_code_node_ref0 (_tmp109_);
                              parent_closure_block = _tmp110_;
                              if (parent_closure_block == NULL) {
                                    _vala_code_node_unref0 (parent_closure_block);
                                    break;
                              }
                              _tmp111_ = vala_ccode_base_module_get_block_id ((ValaCCodeBaseModule*) self, parent_closure_block);
                              parent_block_id = _tmp111_;
                              _tmp112_ = g_strdup_printf ("_data%d_", block_id);
                              _tmp113_ = _tmp112_;
                              _tmp114_ = vala_ccode_identifier_new (_tmp113_);
                              _tmp115_ = _tmp114_;
                              _tmp116_ = g_strdup_printf ("_data%d_", parent_block_id);
                              _tmp117_ = _tmp116_;
                              _tmp118_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp115_, _tmp117_);
                              _tmp119_ = _tmp118_;
                              _g_free0 (_tmp117_);
                              _vala_ccode_node_unref0 (_tmp115_);
                              _g_free0 (_tmp113_);
                              parent_data = _tmp119_;
                              _tmp120_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp121_ = g_strdup_printf ("Block%dData*", parent_block_id);
                              _tmp122_ = _tmp121_;
                              _tmp123_ = g_strdup_printf ("_data%d_", parent_block_id);
                              _tmp124_ = _tmp123_;
                              _tmp125_ = vala_ccode_variable_declarator_new (_tmp124_, NULL, NULL);
                              _tmp126_ = _tmp125_;
                              vala_ccode_function_add_declaration (_tmp120_, _tmp122_, (ValaCCodeDeclarator*) _tmp126_, 0);
                              _vala_ccode_node_unref0 (_tmp126_);
                              _g_free0 (_tmp124_);
                              _g_free0 (_tmp122_);
                              _tmp127_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp128_ = g_strdup_printf ("_data%d_", parent_block_id);
                              _tmp129_ = _tmp128_;
                              _tmp130_ = vala_ccode_identifier_new (_tmp129_);
                              _tmp131_ = _tmp130_;
                              vala_ccode_function_add_assignment (_tmp127_, (ValaCCodeExpression*) _tmp131_, (ValaCCodeExpression*) parent_data);
                              _vala_ccode_node_unref0 (_tmp131_);
                              _g_free0 (_tmp129_);
                              _tmp132_ = _vala_code_node_ref0 (parent_closure_block);
                              _vala_code_node_unref0 (closure_block);
                              closure_block = _tmp132_;
                              block_id = parent_block_id;
                              _vala_ccode_node_unref0 (parent_data);
                              _vala_code_node_unref0 (parent_closure_block);
                        }
                        _tmp133_ = vala_method_get_binding (m);
                        if (_tmp133_ == VALA_MEMBER_BINDING_INSTANCE) {
                              gchar* _tmp134_ = NULL;
                              gchar* _tmp135_;
                              ValaCCodeIdentifier* _tmp136_ = NULL;
                              ValaCCodeIdentifier* _tmp137_;
                              ValaCCodeMemberAccess* _tmp138_ = NULL;
                              ValaCCodeMemberAccess* _tmp139_;
                              ValaCCodeMemberAccess* cself;
                              ValaCCodeFunction* _tmp140_ = NULL;
                              ValaClass* _tmp141_ = NULL;
                              gchar* _tmp142_ = NULL;
                              gchar* _tmp143_;
                              gchar* _tmp144_ = NULL;
                              gchar* _tmp145_;
                              ValaCCodeVariableDeclarator* _tmp146_ = NULL;
                              ValaCCodeVariableDeclarator* _tmp147_;
                              ValaCCodeFunction* _tmp148_ = NULL;
                              ValaCCodeIdentifier* _tmp149_ = NULL;
                              ValaCCodeIdentifier* _tmp150_;
                              _tmp134_ = g_strdup_printf ("_data%d_", block_id);
                              _tmp135_ = _tmp134_;
                              _tmp136_ = vala_ccode_identifier_new (_tmp135_);
                              _tmp137_ = _tmp136_;
                              _tmp138_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp137_, "self");
                              _tmp139_ = _tmp138_;
                              _vala_ccode_node_unref0 (_tmp137_);
                              _g_free0 (_tmp135_);
                              cself = _tmp139_;
                              _tmp140_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp141_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
                              _tmp142_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) _tmp141_, FALSE);
                              _tmp143_ = _tmp142_;
                              _tmp144_ = g_strdup_printf ("%s *", _tmp143_);
                              _tmp145_ = _tmp144_;
                              _tmp146_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
                              _tmp147_ = _tmp146_;
                              vala_ccode_function_add_declaration (_tmp140_, _tmp145_, (ValaCCodeDeclarator*) _tmp147_, 0);
                              _vala_ccode_node_unref0 (_tmp147_);
                              _g_free0 (_tmp145_);
                              _g_free0 (_tmp143_);
                              _tmp148_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp149_ = vala_ccode_identifier_new ("self");
                              _tmp150_ = _tmp149_;
                              vala_ccode_function_add_assignment (_tmp148_, (ValaCCodeExpression*) _tmp150_, (ValaCCodeExpression*) cself);
                              _vala_ccode_node_unref0 (_tmp150_);
                              _vala_ccode_node_unref0 (cself);
                        }
                        {
                              ValaList* _tmp151_ = NULL;
                              ValaList* _type_param_list;
                              gint _tmp152_;
                              gint _type_param_size;
                              gint _type_param_index;
                              _tmp151_ = vala_method_get_type_parameters (m);
                              _type_param_list = _tmp151_;
                              _tmp152_ = vala_collection_get_size ((ValaCollection*) _type_param_list);
                              _type_param_size = _tmp152_;
                              _type_param_index = -1;
                              while (TRUE) {
                                    gpointer _tmp153_ = NULL;
                                    ValaTypeParameter* type_param;
                                    gchar* func_name = NULL;
                                    const gchar* _tmp154_ = NULL;
                                    gchar* _tmp155_ = NULL;
                                    gchar* _tmp156_;
                                    gchar* _tmp157_ = NULL;
                                    ValaCCodeFunction* _tmp158_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp159_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp160_;
                                    ValaCCodeFunction* _tmp161_ = NULL;
                                    ValaCCodeIdentifier* _tmp162_ = NULL;
                                    ValaCCodeIdentifier* _tmp163_;
                                    gchar* _tmp164_ = NULL;
                                    gchar* _tmp165_;
                                    ValaCCodeExpression* _tmp166_ = NULL;
                                    ValaCCodeExpression* _tmp167_;
                                    ValaCCodeMemberAccess* _tmp168_ = NULL;
                                    ValaCCodeMemberAccess* _tmp169_;
                                    const gchar* _tmp170_ = NULL;
                                    gchar* _tmp171_ = NULL;
                                    gchar* _tmp172_;
                                    gchar* _tmp173_ = NULL;
                                    ValaCCodeFunction* _tmp174_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp175_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp176_;
                                    ValaCCodeFunction* _tmp177_ = NULL;
                                    ValaCCodeIdentifier* _tmp178_ = NULL;
                                    ValaCCodeIdentifier* _tmp179_;
                                    gchar* _tmp180_ = NULL;
                                    gchar* _tmp181_;
                                    ValaCCodeExpression* _tmp182_ = NULL;
                                    ValaCCodeExpression* _tmp183_;
                                    ValaCCodeMemberAccess* _tmp184_ = NULL;
                                    ValaCCodeMemberAccess* _tmp185_;
                                    const gchar* _tmp186_ = NULL;
                                    gchar* _tmp187_ = NULL;
                                    gchar* _tmp188_;
                                    gchar* _tmp189_ = NULL;
                                    ValaCCodeFunction* _tmp190_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp191_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp192_;
                                    ValaCCodeFunction* _tmp193_ = NULL;
                                    ValaCCodeIdentifier* _tmp194_ = NULL;
                                    ValaCCodeIdentifier* _tmp195_;
                                    gchar* _tmp196_ = NULL;
                                    gchar* _tmp197_;
                                    ValaCCodeExpression* _tmp198_ = NULL;
                                    ValaCCodeExpression* _tmp199_;
                                    ValaCCodeMemberAccess* _tmp200_ = NULL;
                                    ValaCCodeMemberAccess* _tmp201_;
                                    _type_param_index = _type_param_index + 1;
                                    if (!(_type_param_index < _type_param_size)) {
                                          break;
                                    }
                                    _tmp153_ = vala_list_get (_type_param_list, _type_param_index);
                                    type_param = (ValaTypeParameter*) _tmp153_;
                                    _tmp154_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                    _tmp155_ = g_utf8_strdown (_tmp154_, (gssize) (-1));
                                    _tmp156_ = _tmp155_;
                                    _tmp157_ = g_strdup_printf ("%s_type", _tmp156_);
                                    _g_free0 (func_name);
                                    func_name = _tmp157_;
                                    _g_free0 (_tmp156_);
                                    _tmp158_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp159_ = vala_ccode_variable_declarator_new (func_name, NULL, NULL);
                                    _tmp160_ = _tmp159_;
                                    vala_ccode_function_add_declaration (_tmp158_, "GType", (ValaCCodeDeclarator*) _tmp160_, 0);
                                    _vala_ccode_node_unref0 (_tmp160_);
                                    _tmp161_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp162_ = vala_ccode_identifier_new (func_name);
                                    _tmp163_ = _tmp162_;
                                    _tmp164_ = g_strdup_printf ("_data%d_", block_id);
                                    _tmp165_ = _tmp164_;
                                    _tmp166_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp165_);
                                    _tmp167_ = _tmp166_;
                                    _tmp168_ = vala_ccode_member_access_new_pointer (_tmp167_, func_name);
                                    _tmp169_ = _tmp168_;
                                    vala_ccode_function_add_assignment (_tmp161_, (ValaCCodeExpression*) _tmp163_, (ValaCCodeExpression*) _tmp169_);
                                    _vala_ccode_node_unref0 (_tmp169_);
                                    _vala_ccode_node_unref0 (_tmp167_);
                                    _g_free0 (_tmp165_);
                                    _vala_ccode_node_unref0 (_tmp163_);
                                    _tmp170_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                    _tmp171_ = g_utf8_strdown (_tmp170_, (gssize) (-1));
                                    _tmp172_ = _tmp171_;
                                    _tmp173_ = g_strdup_printf ("%s_dup_func", _tmp172_);
                                    _g_free0 (func_name);
                                    func_name = _tmp173_;
                                    _g_free0 (_tmp172_);
                                    _tmp174_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp175_ = vala_ccode_variable_declarator_new (func_name, NULL, NULL);
                                    _tmp176_ = _tmp175_;
                                    vala_ccode_function_add_declaration (_tmp174_, "GBoxedCopyFunc", (ValaCCodeDeclarator*) _tmp176_, 0);
                                    _vala_ccode_node_unref0 (_tmp176_);
                                    _tmp177_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp178_ = vala_ccode_identifier_new (func_name);
                                    _tmp179_ = _tmp178_;
                                    _tmp180_ = g_strdup_printf ("_data%d_", block_id);
                                    _tmp181_ = _tmp180_;
                                    _tmp182_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp181_);
                                    _tmp183_ = _tmp182_;
                                    _tmp184_ = vala_ccode_member_access_new_pointer (_tmp183_, func_name);
                                    _tmp185_ = _tmp184_;
                                    vala_ccode_function_add_assignment (_tmp177_, (ValaCCodeExpression*) _tmp179_, (ValaCCodeExpression*) _tmp185_);
                                    _vala_ccode_node_unref0 (_tmp185_);
                                    _vala_ccode_node_unref0 (_tmp183_);
                                    _g_free0 (_tmp181_);
                                    _vala_ccode_node_unref0 (_tmp179_);
                                    _tmp186_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                    _tmp187_ = g_utf8_strdown (_tmp186_, (gssize) (-1));
                                    _tmp188_ = _tmp187_;
                                    _tmp189_ = g_strdup_printf ("%s_destroy_func", _tmp188_);
                                    _g_free0 (func_name);
                                    func_name = _tmp189_;
                                    _g_free0 (_tmp188_);
                                    _tmp190_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp191_ = vala_ccode_variable_declarator_new (func_name, NULL, NULL);
                                    _tmp192_ = _tmp191_;
                                    vala_ccode_function_add_declaration (_tmp190_, "GDestroyNotify", (ValaCCodeDeclarator*) _tmp192_, 0);
                                    _vala_ccode_node_unref0 (_tmp192_);
                                    _tmp193_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp194_ = vala_ccode_identifier_new (func_name);
                                    _tmp195_ = _tmp194_;
                                    _tmp196_ = g_strdup_printf ("_data%d_", block_id);
                                    _tmp197_ = _tmp196_;
                                    _tmp198_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp197_);
                                    _tmp199_ = _tmp198_;
                                    _tmp200_ = vala_ccode_member_access_new_pointer (_tmp199_, func_name);
                                    _tmp201_ = _tmp200_;
                                    vala_ccode_function_add_assignment (_tmp193_, (ValaCCodeExpression*) _tmp195_, (ValaCCodeExpression*) _tmp201_);
                                    _vala_ccode_node_unref0 (_tmp201_);
                                    _vala_ccode_node_unref0 (_tmp199_);
                                    _g_free0 (_tmp197_);
                                    _vala_ccode_node_unref0 (_tmp195_);
                                    _g_free0 (func_name);
                                    _vala_code_node_unref0 (type_param);
                              }
                              _vala_iterable_unref0 (_type_param_list);
                        }
                        _vala_code_node_unref0 (closure_block);
                  } else {
                        gboolean _tmp202_ = FALSE;
                        ValaSymbol* _tmp203_ = NULL;
                        _tmp203_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                        if (VALA_IS_CLASS (_tmp203_)) {
                              gboolean _tmp204_;
                              _tmp204_ = vala_method_get_coroutine (m);
                              _tmp202_ = !_tmp204_;
                        } else {
                              _tmp202_ = FALSE;
                        }
                        if (_tmp202_) {
                              ValaSymbol* _tmp205_ = NULL;
                              ValaClass* _tmp206_;
                              ValaClass* cl;
                              gboolean _tmp207_ = FALSE;
                              gboolean _tmp208_;
                              _tmp205_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                              _tmp206_ = _vala_code_node_ref0 (VALA_CLASS (_tmp205_));
                              cl = _tmp206_;
                              _tmp208_ = vala_method_get_overrides (m);
                              if (_tmp208_) {
                                    _tmp207_ = TRUE;
                              } else {
                                    gboolean _tmp209_ = FALSE;
                                    gboolean _tmp210_ = FALSE;
                                    ValaMethod* _tmp211_ = NULL;
                                    _tmp211_ = vala_method_get_base_interface_method (m);
                                    if (_tmp211_ != NULL) {
                                          gboolean _tmp212_;
                                          _tmp212_ = vala_method_get_is_abstract (m);
                                          _tmp210_ = !_tmp212_;
                                    } else {
                                          _tmp210_ = FALSE;
                                    }
                                    if (_tmp210_) {
                                          gboolean _tmp213_;
                                          _tmp213_ = vala_method_get_is_virtual (m);
                                          _tmp209_ = !_tmp213_;
                                    } else {
                                          _tmp209_ = FALSE;
                                    }
                                    _tmp207_ = _tmp209_;
                              }
                              if (_tmp207_) {
                                    ValaMethod* base_method = NULL;
                                    ValaReferenceType* base_expression_type = NULL;
                                    gboolean _tmp214_;
                                    ValaObjectType* _tmp223_ = NULL;
                                    ValaObjectType* self_target_type;
                                    ValaCCodeIdentifier* _tmp224_ = NULL;
                                    ValaCCodeIdentifier* _tmp225_;
                                    ValaCCodeExpression* _tmp226_ = NULL;
                                    ValaCCodeExpression* _tmp227_;
                                    ValaCCodeExpression* cself;
                                    ValaCCodeFunction* _tmp228_ = NULL;
                                    gchar* _tmp229_ = NULL;
                                    gchar* _tmp230_;
                                    gchar* _tmp231_ = NULL;
                                    gchar* _tmp232_;
                                    ValaCCodeVariableDeclarator* _tmp233_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp234_;
                                    ValaCCodeFunction* _tmp235_ = NULL;
                                    ValaCCodeIdentifier* _tmp236_ = NULL;
                                    ValaCCodeIdentifier* _tmp237_;
                                    _tmp214_ = vala_method_get_overrides (m);
                                    if (_tmp214_) {
                                          ValaMethod* _tmp215_ = NULL;
                                          ValaMethod* _tmp216_;
                                          ValaSymbol* _tmp217_ = NULL;
                                          ValaObjectType* _tmp218_ = NULL;
                                          _tmp215_ = vala_method_get_base_method (m);
                                          _tmp216_ = _vala_code_node_ref0 (_tmp215_);
                                          _vala_code_node_unref0 (base_method);
                                          base_method = _tmp216_;
                                          _tmp217_ = vala_symbol_get_parent_symbol ((ValaSymbol*) base_method);
                                          _tmp218_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (_tmp217_));
                                          _vala_code_node_unref0 (base_expression_type);
                                          base_expression_type = (ValaReferenceType*) _tmp218_;
                                    } else {
                                          ValaMethod* _tmp219_ = NULL;
                                          ValaMethod* _tmp220_;
                                          ValaSymbol* _tmp221_ = NULL;
                                          ValaObjectType* _tmp222_ = NULL;
                                          _tmp219_ = vala_method_get_base_interface_method (m);
                                          _tmp220_ = _vala_code_node_ref0 (_tmp219_);
                                          _vala_code_node_unref0 (base_method);
                                          base_method = _tmp220_;
                                          _tmp221_ = vala_symbol_get_parent_symbol ((ValaSymbol*) base_method);
                                          _tmp222_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (_tmp221_));
                                          _vala_code_node_unref0 (base_expression_type);
                                          base_expression_type = (ValaReferenceType*) _tmp222_;
                                    }
                                    _tmp223_ = vala_object_type_new ((ValaObjectTypeSymbol*) cl);
                                    self_target_type = _tmp223_;
                                    _tmp224_ = vala_ccode_identifier_new ("base");
                                    _tmp225_ = _tmp224_;
                                    _tmp226_ = vala_ccode_base_module_transform_expression ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) _tmp225_, (ValaDataType*) base_expression_type, (ValaDataType*) self_target_type, NULL);
                                    _tmp227_ = _tmp226_;
                                    _vala_ccode_node_unref0 (_tmp225_);
                                    cself = _tmp227_;
                                    _tmp228_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp229_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE);
                                    _tmp230_ = _tmp229_;
                                    _tmp231_ = g_strdup_printf ("%s *", _tmp230_);
                                    _tmp232_ = _tmp231_;
                                    _tmp233_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
                                    _tmp234_ = _tmp233_;
                                    vala_ccode_function_add_declaration (_tmp228_, _tmp232_, (ValaCCodeDeclarator*) _tmp234_, 0);
                                    _vala_ccode_node_unref0 (_tmp234_);
                                    _g_free0 (_tmp232_);
                                    _g_free0 (_tmp230_);
                                    _tmp235_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp236_ = vala_ccode_identifier_new ("self");
                                    _tmp237_ = _tmp236_;
                                    vala_ccode_function_add_assignment (_tmp235_, (ValaCCodeExpression*) _tmp237_, cself);
                                    _vala_ccode_node_unref0 (_tmp237_);
                                    _vala_ccode_node_unref0 (cself);
                                    _vala_code_node_unref0 (self_target_type);
                                    _vala_code_node_unref0 (base_expression_type);
                                    _vala_code_node_unref0 (base_method);
                              } else {
                                    gboolean _tmp238_ = FALSE;
                                    ValaMemberBinding _tmp239_;
                                    _tmp239_ = vala_method_get_binding (m);
                                    if (_tmp239_ == VALA_MEMBER_BINDING_INSTANCE) {
                                          _tmp238_ = !VALA_IS_CREATION_METHOD (m);
                                    } else {
                                          _tmp238_ = FALSE;
                                    }
                                    if (_tmp238_) {
                                          vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, (ValaTypeSymbol*) cl, TRUE, "self");
                                    }
                              }
                              _vala_code_node_unref0 (cl);
                        }
                  }
                  {
                        ValaList* _tmp240_ = NULL;
                        ValaList* _param_list;
                        gint _tmp241_;
                        gint _param_size;
                        gint _param_index;
                        _tmp240_ = vala_method_get_parameters (m);
                        _param_list = _tmp240_;
                        _tmp241_ = vala_collection_get_size ((ValaCollection*) _param_list);
                        _param_size = _tmp241_;
                        _param_index = -1;
                        while (TRUE) {
                              gpointer _tmp242_ = NULL;
                              ValaParameter* param;
                              gboolean _tmp243_;
                              ValaParameterDirection _tmp244_;
                              _param_index = _param_index + 1;
                              if (!(_param_index < _param_size)) {
                                    break;
                              }
                              _tmp242_ = vala_list_get (_param_list, _param_index);
                              param = (ValaParameter*) _tmp242_;
                              _tmp243_ = vala_parameter_get_ellipsis (param);
                              if (_tmp243_) {
                                    _vala_code_node_unref0 (param);
                                    break;
                              }
                              _tmp244_ = vala_parameter_get_direction (param);
                              if (_tmp244_ != VALA_PARAMETER_DIRECTION_OUT) {
                                    ValaDataType* _tmp245_ = NULL;
                                    ValaTypeSymbol* _tmp246_ = NULL;
                                    ValaTypeSymbol* _tmp247_;
                                    ValaTypeSymbol* t;
                                    gboolean _tmp248_ = FALSE;
                                    _tmp245_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                    _tmp246_ = vala_data_type_get_data_type (_tmp245_);
                                    _tmp247_ = _vala_code_node_ref0 (_tmp246_);
                                    t = _tmp247_;
                                    if (t != NULL) {
                                          gboolean _tmp249_;
                                          _tmp249_ = vala_typesymbol_is_reference_type (t);
                                          _tmp248_ = _tmp249_;
                                    } else {
                                          _tmp248_ = FALSE;
                                    }
                                    if (_tmp248_) {
                                          ValaDataType* _tmp250_ = NULL;
                                          gboolean _tmp251_;
                                          const gchar* _tmp252_ = NULL;
                                          gchar* _tmp253_ = NULL;
                                          gchar* _tmp254_;
                                          _tmp250_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                          _tmp251_ = vala_data_type_get_nullable (_tmp250_);
                                          _tmp252_ = vala_symbol_get_name ((ValaSymbol*) param);
                                          _tmp253_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp252_);
                                          _tmp254_ = _tmp253_;
                                          vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, t, !_tmp251_, _tmp254_);
                                          _g_free0 (_tmp254_);
                                    }
                                    _vala_code_node_unref0 (t);
                              } else {
                                    gboolean _tmp255_;
                                    _tmp255_ = vala_method_get_coroutine (m);
                                    if (!_tmp255_) {
                                          const gchar* _tmp256_ = NULL;
                                          gchar* _tmp257_;
                                          gchar* _tmp258_;
                                          gchar* _tmp259_ = NULL;
                                          gchar* _tmp260_;
                                          ValaDataType* _tmp261_ = NULL;
                                          ValaCCodeExpression* _tmp262_ = NULL;
                                          ValaCCodeExpression* _tmp263_;
                                          ValaCCodeVariableDeclarator* _tmp264_ = NULL;
                                          ValaCCodeVariableDeclarator* _tmp265_;
                                          ValaCCodeVariableDeclarator* vardecl;
                                          ValaCCodeFunction* _tmp266_ = NULL;
                                          ValaDataType* _tmp267_ = NULL;
                                          gchar* _tmp268_ = NULL;
                                          gchar* _tmp269_;
                                          ValaDataType* _tmp270_ = NULL;
                                          _tmp256_ = vala_symbol_get_name ((ValaSymbol*) param);
                                          _tmp257_ = g_strconcat ("_", _tmp256_, NULL);
                                          _tmp258_ = _tmp257_;
                                          _tmp259_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp258_);
                                          _tmp260_ = _tmp259_;
                                          _tmp261_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                          _tmp262_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, _tmp261_, TRUE);
                                          _tmp263_ = _tmp262_;
                                          _tmp264_ = vala_ccode_variable_declarator_new_zero (_tmp260_, _tmp263_, NULL);
                                          _tmp265_ = _tmp264_;
                                          _vala_ccode_node_unref0 (_tmp263_);
                                          _g_free0 (_tmp260_);
                                          _g_free0 (_tmp258_);
                                          vardecl = _tmp265_;
                                          _tmp266_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                          _tmp267_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                          _tmp268_ = vala_data_type_get_cname (_tmp267_);
                                          _tmp269_ = _tmp268_;
                                          vala_ccode_function_add_declaration (_tmp266_, _tmp269_, (ValaCCodeDeclarator*) vardecl, 0);
                                          _g_free0 (_tmp269_);
                                          _tmp270_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                          if (VALA_IS_ARRAY_TYPE (_tmp270_)) {
                                                ValaDataType* _tmp271_ = NULL;
                                                ValaArrayType* _tmp272_;
                                                ValaArrayType* array_type;
                                                gboolean _tmp273_;
                                                _tmp271_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                                _tmp272_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp271_));
                                                array_type = _tmp272_;
                                                _tmp273_ = vala_array_type_get_fixed_length (array_type);
                                                if (!_tmp273_) {
                                                      {
                                                            gint dim;
                                                            dim = 1;
                                                            {
                                                                  gboolean _tmp274_;
                                                                  _tmp274_ = TRUE;
                                                                  while (TRUE) {
                                                                        gint _tmp275_;
                                                                        const gchar* _tmp276_ = NULL;
                                                                        gchar* _tmp277_;
                                                                        gchar* _tmp278_;
                                                                        gchar* _tmp279_ = NULL;
                                                                        gchar* _tmp280_;
                                                                        gchar* _tmp281_ = NULL;
                                                                        gchar* _tmp282_;
                                                                        ValaCCodeConstant* _tmp283_ = NULL;
                                                                        ValaCCodeConstant* _tmp284_;
                                                                        ValaCCodeVariableDeclarator* _tmp285_ = NULL;
                                                                        ValaCCodeFunction* _tmp286_ = NULL;
                                                                        if (!_tmp274_) {
                                                                              dim++;
                                                                        }
                                                                        _tmp274_ = FALSE;
                                                                        _tmp275_ = vala_array_type_get_rank (array_type);
                                                                        if (!(dim <= _tmp275_)) {
                                                                              break;
                                                                        }
                                                                        _tmp276_ = vala_symbol_get_name ((ValaSymbol*) param);
                                                                        _tmp277_ = g_strconcat ("_", _tmp276_, NULL);
                                                                        _tmp278_ = _tmp277_;
                                                                        _tmp279_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp278_);
                                                                        _tmp280_ = _tmp279_;
                                                                        _tmp281_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp280_, dim);
                                                                        _tmp282_ = _tmp281_;
                                                                        _tmp283_ = vala_ccode_constant_new ("0");
                                                                        _tmp284_ = _tmp283_;
                                                                        _tmp285_ = vala_ccode_variable_declarator_new_zero (_tmp282_, (ValaCCodeExpression*) _tmp284_, NULL);
                                                                        _vala_ccode_node_unref0 (vardecl);
                                                                        vardecl = _tmp285_;
                                                                        _vala_ccode_node_unref0 (_tmp284_);
                                                                        _g_free0 (_tmp282_);
                                                                        _g_free0 (_tmp280_);
                                                                        _g_free0 (_tmp278_);
                                                                        _tmp286_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                                        vala_ccode_function_add_declaration (_tmp286_, "int", (ValaCCodeDeclarator*) vardecl, 0);
                                                                  }
                                                            }
                                                      }
                                                }
                                                _vala_code_node_unref0 (array_type);
                                          } else {
                                                ValaDataType* _tmp287_ = NULL;
                                                _tmp287_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                                if (VALA_IS_DELEGATE_TYPE (_tmp287_)) {
                                                      ValaDataType* _tmp288_ = NULL;
                                                      ValaDelegateType* _tmp289_;
                                                      ValaDelegateType* deleg_type;
                                                      ValaDelegate* _tmp290_ = NULL;
                                                      ValaDelegate* _tmp291_;
                                                      ValaDelegate* d;
                                                      gboolean _tmp292_;
                                                      _tmp288_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                                      _tmp289_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp288_));
                                                      deleg_type = _tmp289_;
                                                      _tmp290_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                                                      _tmp291_ = _vala_code_node_ref0 (_tmp290_);
                                                      d = _tmp291_;
                                                      _tmp292_ = vala_delegate_get_has_target (d);
                                                      if (_tmp292_) {
                                                            const gchar* _tmp293_ = NULL;
                                                            gchar* _tmp294_;
                                                            gchar* _tmp295_;
                                                            gchar* _tmp296_ = NULL;
                                                            gchar* _tmp297_;
                                                            gchar* _tmp298_ = NULL;
                                                            gchar* _tmp299_;
                                                            ValaCCodeConstant* _tmp300_ = NULL;
                                                            ValaCCodeConstant* _tmp301_;
                                                            ValaCCodeVariableDeclarator* _tmp302_ = NULL;
                                                            ValaCCodeFunction* _tmp303_ = NULL;
                                                            gboolean _tmp304_;
                                                            _tmp293_ = vala_symbol_get_name ((ValaSymbol*) param);
                                                            _tmp294_ = g_strconcat ("_", _tmp293_, NULL);
                                                            _tmp295_ = _tmp294_;
                                                            _tmp296_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp295_);
                                                            _tmp297_ = _tmp296_;
                                                            _tmp298_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, _tmp297_);
                                                            _tmp299_ = _tmp298_;
                                                            _tmp300_ = vala_ccode_constant_new ("NULL");
                                                            _tmp301_ = _tmp300_;
                                                            _tmp302_ = vala_ccode_variable_declarator_new_zero (_tmp299_, (ValaCCodeExpression*) _tmp301_, NULL);
                                                            _vala_ccode_node_unref0 (vardecl);
                                                            vardecl = _tmp302_;
                                                            _vala_ccode_node_unref0 (_tmp301_);
                                                            _g_free0 (_tmp299_);
                                                            _g_free0 (_tmp297_);
                                                            _g_free0 (_tmp295_);
                                                            _tmp303_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                            vala_ccode_function_add_declaration (_tmp303_, "void *", (ValaCCodeDeclarator*) vardecl, 0);
                                                            _tmp304_ = vala_data_type_get_value_owned ((ValaDataType*) deleg_type);
                                                            if (_tmp304_) {
                                                                  const gchar* _tmp305_ = NULL;
                                                                  gchar* _tmp306_;
                                                                  gchar* _tmp307_;
                                                                  gchar* _tmp308_ = NULL;
                                                                  gchar* _tmp309_;
                                                                  gchar* _tmp310_ = NULL;
                                                                  gchar* _tmp311_;
                                                                  ValaCCodeConstant* _tmp312_ = NULL;
                                                                  ValaCCodeConstant* _tmp313_;
                                                                  ValaCCodeVariableDeclarator* _tmp314_ = NULL;
                                                                  ValaCCodeFunction* _tmp315_ = NULL;
                                                                  _tmp305_ = vala_symbol_get_name ((ValaSymbol*) param);
                                                                  _tmp306_ = g_strconcat ("_", _tmp305_, NULL);
                                                                  _tmp307_ = _tmp306_;
                                                                  _tmp308_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp307_);
                                                                  _tmp309_ = _tmp308_;
                                                                  _tmp310_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, _tmp309_);
                                                                  _tmp311_ = _tmp310_;
                                                                  _tmp312_ = vala_ccode_constant_new ("NULL");
                                                                  _tmp313_ = _tmp312_;
                                                                  _tmp314_ = vala_ccode_variable_declarator_new_zero (_tmp311_, (ValaCCodeExpression*) _tmp313_, NULL);
                                                                  _vala_ccode_node_unref0 (vardecl);
                                                                  vardecl = _tmp314_;
                                                                  _vala_ccode_node_unref0 (_tmp313_);
                                                                  _g_free0 (_tmp311_);
                                                                  _g_free0 (_tmp309_);
                                                                  _g_free0 (_tmp307_);
                                                                  _tmp315_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                                  vala_ccode_function_add_declaration (_tmp315_, "GDestroyNotify", (ValaCCodeDeclarator*) vardecl, 0);
                                                            }
                                                      }
                                                      _vala_code_node_unref0 (d);
                                                      _vala_code_node_unref0 (deleg_type);
                                                }
                                          }
                                          _vala_ccode_node_unref0 (vardecl);
                                    }
                              }
                              _vala_code_node_unref0 (param);
                        }
                        _vala_iterable_unref0 (_param_list);
                  }
                  _tmp318_ = vala_method_get_return_type (m);
                  if (!VALA_IS_VOID_TYPE (_tmp318_)) {
                        ValaDataType* _tmp319_ = NULL;
                        gboolean _tmp320_;
                        _tmp319_ = vala_method_get_return_type (m);
                        _tmp320_ = vala_data_type_is_real_non_null_struct_type (_tmp319_);
                        _tmp317_ = !_tmp320_;
                  } else {
                        _tmp317_ = FALSE;
                  }
                  if (_tmp317_) {
                        gboolean _tmp321_;
                        _tmp321_ = vala_method_get_coroutine (m);
                        _tmp316_ = !_tmp321_;
                  } else {
                        _tmp316_ = FALSE;
                  }
                  if (_tmp316_) {
                        ValaDataType* _tmp322_ = NULL;
                        ValaCCodeExpression* _tmp323_ = NULL;
                        ValaCCodeExpression* _tmp324_;
                        ValaCCodeVariableDeclarator* _tmp325_ = NULL;
                        ValaCCodeVariableDeclarator* _tmp326_;
                        ValaCCodeVariableDeclarator* vardecl;
                        ValaCCodeFunction* _tmp327_ = NULL;
                        ValaDataType* _tmp328_ = NULL;
                        gchar* _tmp329_ = NULL;
                        gchar* _tmp330_;
                        _tmp322_ = vala_method_get_return_type (m);
                        _tmp323_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, _tmp322_, TRUE);
                        _tmp324_ = _tmp323_;
                        _tmp325_ = vala_ccode_variable_declarator_new ("result", _tmp324_, NULL);
                        _tmp326_ = _tmp325_;
                        _vala_ccode_node_unref0 (_tmp324_);
                        vardecl = _tmp326_;
                        vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
                        _tmp327_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp328_ = vala_method_get_return_type (m);
                        _tmp329_ = vala_data_type_get_cname (_tmp328_);
                        _tmp330_ = _tmp329_;
                        vala_ccode_function_add_declaration (_tmp327_, _tmp330_, (ValaCCodeDeclarator*) vardecl, 0);
                        _g_free0 (_tmp330_);
                        _vala_ccode_node_unref0 (vardecl);
                  }
                  if (VALA_IS_CREATION_METHOD (m)) {
                        if (in_gobject_creation_method) {
                              ValaCCodeFunction* _tmp331_ = NULL;
                              ValaTypeSymbol* _tmp332_ = NULL;
                              gchar* _tmp333_ = NULL;
                              gchar* _tmp334_;
                              gchar* _tmp335_ = NULL;
                              gchar* _tmp336_;
                              ValaCCodeConstant* _tmp337_ = NULL;
                              ValaCCodeConstant* _tmp338_;
                              ValaCCodeVariableDeclarator* _tmp339_ = NULL;
                              ValaCCodeVariableDeclarator* _tmp340_;
                              _tmp331_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp332_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                              _tmp333_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_CLASS (_tmp332_), FALSE);
                              _tmp334_ = _tmp333_;
                              _tmp335_ = g_strdup_printf ("%s *", _tmp334_);
                              _tmp336_ = _tmp335_;
                              _tmp337_ = vala_ccode_constant_new ("NULL");
                              _tmp338_ = _tmp337_;
                              _tmp339_ = vala_ccode_variable_declarator_new_zero ("self", (ValaCCodeExpression*) _tmp338_, NULL);
                              _tmp340_ = _tmp339_;
                              vala_ccode_function_add_declaration (_tmp331_, _tmp336_, (ValaCCodeDeclarator*) _tmp340_, 0);
                              _vala_ccode_node_unref0 (_tmp340_);
                              _vala_ccode_node_unref0 (_tmp338_);
                              _g_free0 (_tmp336_);
                              _g_free0 (_tmp334_);
                        } else {
                              gboolean _tmp341_;
                              _tmp341_ = vala_ccode_method_module_is_gtypeinstance_creation_method (self, m);
                              if (_tmp341_) {
                                    ValaSymbol* _tmp342_ = NULL;
                                    ValaClass* _tmp343_;
                                    ValaClass* cl;
                                    ValaCCodeFunction* _tmp344_ = NULL;
                                    gchar* _tmp345_ = NULL;
                                    gchar* _tmp346_;
                                    gchar* _tmp347_;
                                    gchar* _tmp348_;
                                    ValaCCodeConstant* _tmp349_ = NULL;
                                    ValaCCodeConstant* _tmp350_;
                                    ValaCCodeVariableDeclarator* _tmp351_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp352_;
                                    gboolean _tmp353_;
                                    _tmp342_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                                    _tmp343_ = _vala_code_node_ref0 (VALA_CLASS (_tmp342_));
                                    cl = _tmp343_;
                                    _tmp344_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp345_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE);
                                    _tmp346_ = _tmp345_;
                                    _tmp347_ = g_strconcat (_tmp346_, "*", NULL);
                                    _tmp348_ = _tmp347_;
                                    _tmp349_ = vala_ccode_constant_new ("NULL");
                                    _tmp350_ = _tmp349_;
                                    _tmp351_ = vala_ccode_variable_declarator_new_zero ("self", (ValaCCodeExpression*) _tmp350_, NULL);
                                    _tmp352_ = _tmp351_;
                                    vala_ccode_function_add_declaration (_tmp344_, _tmp348_, (ValaCCodeDeclarator*) _tmp352_, 0);
                                    _vala_ccode_node_unref0 (_tmp352_);
                                    _vala_ccode_node_unref0 (_tmp350_);
                                    _g_free0 (_tmp348_);
                                    _g_free0 (_tmp346_);
                                    _tmp353_ = vala_class_is_fundamental (cl);
                                    if (_tmp353_) {
                                          ValaCCodeIdentifier* _tmp354_ = NULL;
                                          ValaCCodeIdentifier* _tmp355_;
                                          ValaCCodeFunctionCall* _tmp356_ = NULL;
                                          ValaCCodeFunctionCall* _tmp357_;
                                          ValaCCodeFunctionCall* ccall;
                                          ValaCCodeIdentifier* _tmp358_ = NULL;
                                          ValaCCodeIdentifier* _tmp359_;
                                          ValaCCodeFunction* _tmp360_ = NULL;
                                          ValaCCodeIdentifier* _tmp361_ = NULL;
                                          ValaCCodeIdentifier* _tmp362_;
                                          gchar* _tmp363_ = NULL;
                                          gchar* _tmp364_;
                                          gchar* _tmp365_;
                                          gchar* _tmp366_;
                                          ValaCCodeCastExpression* _tmp367_ = NULL;
                                          ValaCCodeCastExpression* _tmp368_;
                                          _tmp354_ = vala_ccode_identifier_new ("g_type_create_instance");
                                          _tmp355_ = _tmp354_;
                                          _tmp356_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp355_);
                                          _tmp357_ = _tmp356_;
                                          _vala_ccode_node_unref0 (_tmp355_);
                                          ccall = _tmp357_;
                                          _tmp358_ = vala_ccode_identifier_new ("object_type");
                                          _tmp359_ = _tmp358_;
                                          vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp359_);
                                          _vala_ccode_node_unref0 (_tmp359_);
                                          _tmp360_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                          _tmp361_ = vala_ccode_identifier_new ("self");
                                          _tmp362_ = _tmp361_;
                                          _tmp363_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE);
                                          _tmp364_ = _tmp363_;
                                          _tmp365_ = g_strconcat (_tmp364_, "*", NULL);
                                          _tmp366_ = _tmp365_;
                                          _tmp367_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) ccall, _tmp366_);
                                          _tmp368_ = _tmp367_;
                                          vala_ccode_function_add_assignment (_tmp360_, (ValaCCodeExpression*) _tmp362_, (ValaCCodeExpression*) _tmp368_);
                                          _vala_ccode_node_unref0 (_tmp368_);
                                          _g_free0 (_tmp366_);
                                          _g_free0 (_tmp364_);
                                          _vala_ccode_node_unref0 (_tmp362_);
                                          {
                                                ValaClass* _tmp369_ = NULL;
                                                ValaList* _tmp370_ = NULL;
                                                ValaList* _type_param_list;
                                                gint _tmp371_;
                                                gint _type_param_size;
                                                gint _type_param_index;
                                                _tmp369_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
                                                _tmp370_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) _tmp369_);
                                                _type_param_list = _tmp370_;
                                                _tmp371_ = vala_collection_get_size ((ValaCollection*) _type_param_list);
                                                _type_param_size = _tmp371_;
                                                _type_param_index = -1;
                                                while (TRUE) {
                                                      gpointer _tmp372_ = NULL;
                                                      ValaTypeParameter* type_param;
                                                      ValaCCodeIdentifier* param_name = NULL;
                                                      ValaCCodeAssignment* assign = NULL;
                                                      ValaCCodeIdentifier* _tmp373_ = NULL;
                                                      ValaCCodeIdentifier* _tmp374_;
                                                      ValaCCodeMemberAccess* _tmp375_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp376_;
                                                      ValaCCodeMemberAccess* priv_access;
                                                      const gchar* _tmp377_ = NULL;
                                                      gchar* _tmp378_ = NULL;
                                                      gchar* _tmp379_;
                                                      gchar* _tmp380_ = NULL;
                                                      gchar* _tmp381_;
                                                      ValaCCodeIdentifier* _tmp382_ = NULL;
                                                      const gchar* _tmp383_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp384_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp385_;
                                                      ValaCCodeAssignment* _tmp386_ = NULL;
                                                      ValaCCodeFunction* _tmp387_ = NULL;
                                                      const gchar* _tmp388_ = NULL;
                                                      gchar* _tmp389_ = NULL;
                                                      gchar* _tmp390_;
                                                      gchar* _tmp391_ = NULL;
                                                      gchar* _tmp392_;
                                                      ValaCCodeIdentifier* _tmp393_ = NULL;
                                                      const gchar* _tmp394_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp395_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp396_;
                                                      ValaCCodeAssignment* _tmp397_ = NULL;
                                                      ValaCCodeFunction* _tmp398_ = NULL;
                                                      const gchar* _tmp399_ = NULL;
                                                      gchar* _tmp400_ = NULL;
                                                      gchar* _tmp401_;
                                                      gchar* _tmp402_ = NULL;
                                                      gchar* _tmp403_;
                                                      ValaCCodeIdentifier* _tmp404_ = NULL;
                                                      const gchar* _tmp405_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp406_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp407_;
                                                      ValaCCodeAssignment* _tmp408_ = NULL;
                                                      ValaCCodeFunction* _tmp409_ = NULL;
                                                      _type_param_index = _type_param_index + 1;
                                                      if (!(_type_param_index < _type_param_size)) {
                                                            break;
                                                      }
                                                      _tmp372_ = vala_list_get (_type_param_list, _type_param_index);
                                                      type_param = (ValaTypeParameter*) _tmp372_;
                                                      _tmp373_ = vala_ccode_identifier_new ("self");
                                                      _tmp374_ = _tmp373_;
                                                      _tmp375_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp374_, "priv");
                                                      _tmp376_ = _tmp375_;
                                                      _vala_ccode_node_unref0 (_tmp374_);
                                                      priv_access = _tmp376_;
                                                      _tmp377_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                                      _tmp378_ = g_utf8_strdown (_tmp377_, (gssize) (-1));
                                                      _tmp379_ = _tmp378_;
                                                      _tmp380_ = g_strdup_printf ("%s_type", _tmp379_);
                                                      _tmp381_ = _tmp380_;
                                                      _tmp382_ = vala_ccode_identifier_new (_tmp381_);
                                                      _vala_ccode_node_unref0 (param_name);
                                                      param_name = _tmp382_;
                                                      _g_free0 (_tmp381_);
                                                      _g_free0 (_tmp379_);
                                                      _tmp383_ = vala_ccode_identifier_get_name (param_name);
                                                      _tmp384_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, _tmp383_);
                                                      _tmp385_ = _tmp384_;
                                                      _tmp386_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp385_, (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                                                      _vala_ccode_node_unref0 (assign);
                                                      assign = _tmp386_;
                                                      _vala_ccode_node_unref0 (_tmp385_);
                                                      _tmp387_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                      vala_ccode_function_add_expression (_tmp387_, (ValaCCodeExpression*) assign);
                                                      _tmp388_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                                      _tmp389_ = g_utf8_strdown (_tmp388_, (gssize) (-1));
                                                      _tmp390_ = _tmp389_;
                                                      _tmp391_ = g_strdup_printf ("%s_dup_func", _tmp390_);
                                                      _tmp392_ = _tmp391_;
                                                      _tmp393_ = vala_ccode_identifier_new (_tmp392_);
                                                      _vala_ccode_node_unref0 (param_name);
                                                      param_name = _tmp393_;
                                                      _g_free0 (_tmp392_);
                                                      _g_free0 (_tmp390_);
                                                      _tmp394_ = vala_ccode_identifier_get_name (param_name);
                                                      _tmp395_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, _tmp394_);
                                                      _tmp396_ = _tmp395_;
                                                      _tmp397_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp396_, (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                                                      _vala_ccode_node_unref0 (assign);
                                                      assign = _tmp397_;
                                                      _vala_ccode_node_unref0 (_tmp396_);
                                                      _tmp398_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                      vala_ccode_function_add_expression (_tmp398_, (ValaCCodeExpression*) assign);
                                                      _tmp399_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                                      _tmp400_ = g_utf8_strdown (_tmp399_, (gssize) (-1));
                                                      _tmp401_ = _tmp400_;
                                                      _tmp402_ = g_strdup_printf ("%s_destroy_func", _tmp401_);
                                                      _tmp403_ = _tmp402_;
                                                      _tmp404_ = vala_ccode_identifier_new (_tmp403_);
                                                      _vala_ccode_node_unref0 (param_name);
                                                      param_name = _tmp404_;
                                                      _g_free0 (_tmp403_);
                                                      _g_free0 (_tmp401_);
                                                      _tmp405_ = vala_ccode_identifier_get_name (param_name);
                                                      _tmp406_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, _tmp405_);
                                                      _tmp407_ = _tmp406_;
                                                      _tmp408_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp407_, (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                                                      _vala_ccode_node_unref0 (assign);
                                                      assign = _tmp408_;
                                                      _vala_ccode_node_unref0 (_tmp407_);
                                                      _tmp409_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                      vala_ccode_function_add_expression (_tmp409_, (ValaCCodeExpression*) assign);
                                                      _vala_ccode_node_unref0 (priv_access);
                                                      _vala_ccode_node_unref0 (assign);
                                                      _vala_ccode_node_unref0 (param_name);
                                                      _vala_code_node_unref0 (type_param);
                                                }
                                                _vala_iterable_unref0 (_type_param_list);
                                          }
                                          _vala_ccode_node_unref0 (ccall);
                                    }
                                    _vala_code_node_unref0 (cl);
                              } else {
                                    ValaTypeSymbol* _tmp410_ = NULL;
                                    _tmp410_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                                    if (VALA_IS_CLASS (_tmp410_)) {
                                          ValaSymbol* _tmp411_ = NULL;
                                          ValaClass* _tmp412_;
                                          ValaClass* cl;
                                          ValaCCodeFunction* _tmp413_ = NULL;
                                          gchar* _tmp414_ = NULL;
                                          gchar* _tmp415_;
                                          gchar* _tmp416_;
                                          gchar* _tmp417_;
                                          ValaCCodeVariableDeclarator* _tmp418_ = NULL;
                                          ValaCCodeVariableDeclarator* _tmp419_;
                                          gboolean _tmp420_;
                                          ValaClass* _tmp432_ = NULL;
                                          _tmp411_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                                          _tmp412_ = _vala_code_node_ref0 (VALA_CLASS (_tmp411_));
                                          cl = _tmp412_;
                                          _tmp413_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                          _tmp414_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE);
                                          _tmp415_ = _tmp414_;
                                          _tmp416_ = g_strconcat (_tmp415_, "*", NULL);
                                          _tmp417_ = _tmp416_;
                                          _tmp418_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
                                          _tmp419_ = _tmp418_;
                                          vala_ccode_function_add_declaration (_tmp413_, _tmp417_, (ValaCCodeDeclarator*) _tmp419_, 0);
                                          _vala_ccode_node_unref0 (_tmp419_);
                                          _g_free0 (_tmp417_);
                                          _g_free0 (_tmp415_);
                                          _tmp420_ = vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m));
                                          if (!_tmp420_) {
                                                ValaCCodeIdentifier* _tmp421_ = NULL;
                                                ValaCCodeIdentifier* _tmp422_;
                                                ValaCCodeFunctionCall* _tmp423_ = NULL;
                                                ValaCCodeFunctionCall* _tmp424_;
                                                ValaCCodeFunctionCall* ccall;
                                                gchar* _tmp425_ = NULL;
                                                gchar* _tmp426_;
                                                ValaCCodeIdentifier* _tmp427_ = NULL;
                                                ValaCCodeIdentifier* _tmp428_;
                                                ValaCCodeFunction* _tmp429_ = NULL;
                                                ValaCCodeIdentifier* _tmp430_ = NULL;
                                                ValaCCodeIdentifier* _tmp431_;
                                                _tmp421_ = vala_ccode_identifier_new ("g_slice_new0");
                                                _tmp422_ = _tmp421_;
                                                _tmp423_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp422_);
                                                _tmp424_ = _tmp423_;
                                                _vala_ccode_node_unref0 (_tmp422_);
                                                ccall = _tmp424_;
                                                _tmp425_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE);
                                                _tmp426_ = _tmp425_;
                                                _tmp427_ = vala_ccode_identifier_new (_tmp426_);
                                                _tmp428_ = _tmp427_;
                                                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp428_);
                                                _vala_ccode_node_unref0 (_tmp428_);
                                                _g_free0 (_tmp426_);
                                                _tmp429_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                _tmp430_ = vala_ccode_identifier_new ("self");
                                                _tmp431_ = _tmp430_;
                                                vala_ccode_function_add_assignment (_tmp429_, (ValaCCodeExpression*) _tmp431_, (ValaCCodeExpression*) ccall);
                                                _vala_ccode_node_unref0 (_tmp431_);
                                                _vala_ccode_node_unref0 (ccall);
                                          }
                                          _tmp432_ = vala_class_get_base_class (cl);
                                          if (_tmp432_ == NULL) {
                                                gchar* _tmp433_ = NULL;
                                                gchar* _tmp434_;
                                                gchar* _tmp435_ = NULL;
                                                gchar* _tmp436_;
                                                ValaCCodeIdentifier* _tmp437_ = NULL;
                                                ValaCCodeIdentifier* _tmp438_;
                                                ValaCCodeFunctionCall* _tmp439_ = NULL;
                                                ValaCCodeFunctionCall* _tmp440_;
                                                ValaCCodeFunctionCall* cinitcall;
                                                ValaCCodeIdentifier* _tmp441_ = NULL;
                                                ValaCCodeIdentifier* _tmp442_;
                                                ValaCCodeFunction* _tmp443_ = NULL;
                                                _tmp433_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) cl, NULL);
                                                _tmp434_ = _tmp433_;
                                                _tmp435_ = g_strdup_printf ("%s_instance_init", _tmp434_);
                                                _tmp436_ = _tmp435_;
                                                _tmp437_ = vala_ccode_identifier_new (_tmp436_);
                                                _tmp438_ = _tmp437_;
                                                _tmp439_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp438_);
                                                _tmp440_ = _tmp439_;
                                                _vala_ccode_node_unref0 (_tmp438_);
                                                _g_free0 (_tmp436_);
                                                _g_free0 (_tmp434_);
                                                cinitcall = _tmp440_;
                                                _tmp441_ = vala_ccode_identifier_new ("self");
                                                _tmp442_ = _tmp441_;
                                                vala_ccode_function_call_add_argument (cinitcall, (ValaCCodeExpression*) _tmp442_);
                                                _vala_ccode_node_unref0 (_tmp442_);
                                                _tmp443_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                vala_ccode_function_add_expression (_tmp443_, (ValaCCodeExpression*) cinitcall);
                                                _vala_ccode_node_unref0 (cinitcall);
                                          }
                                          _vala_code_node_unref0 (cl);
                                    } else {
                                          ValaSymbol* _tmp444_ = NULL;
                                          ValaStruct* _tmp445_;
                                          ValaStruct* st;
                                          ValaCCodeIdentifier* _tmp446_ = NULL;
                                          ValaCCodeIdentifier* _tmp447_;
                                          ValaCCodeFunctionCall* _tmp448_ = NULL;
                                          ValaCCodeFunctionCall* _tmp449_;
                                          ValaCCodeFunctionCall* czero;
                                          ValaCCodeIdentifier* _tmp450_ = NULL;
                                          ValaCCodeIdentifier* _tmp451_;
                                          ValaCCodeConstant* _tmp452_ = NULL;
                                          ValaCCodeConstant* _tmp453_;
                                          gchar* _tmp454_ = NULL;
                                          gchar* _tmp455_;
                                          gchar* _tmp456_ = NULL;
                                          gchar* _tmp457_;
                                          ValaCCodeIdentifier* _tmp458_ = NULL;
                                          ValaCCodeIdentifier* _tmp459_;
                                          ValaCCodeFunction* _tmp460_ = NULL;
                                          _tmp444_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                                          _tmp445_ = _vala_code_node_ref0 (VALA_STRUCT (_tmp444_));
                                          st = _tmp445_;
                                          vala_ccode_file_add_include (((ValaCCodeBaseModule*) self)->cfile, "string.h", FALSE);
                                          _tmp446_ = vala_ccode_identifier_new ("memset");
                                          _tmp447_ = _tmp446_;
                                          _tmp448_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp447_);
                                          _tmp449_ = _tmp448_;
                                          _vala_ccode_node_unref0 (_tmp447_);
                                          czero = _tmp449_;
                                          _tmp450_ = vala_ccode_identifier_new ("self");
                                          _tmp451_ = _tmp450_;
                                          vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) _tmp451_);
                                          _vala_ccode_node_unref0 (_tmp451_);
                                          _tmp452_ = vala_ccode_constant_new ("0");
                                          _tmp453_ = _tmp452_;
                                          vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) _tmp453_);
                                          _vala_ccode_node_unref0 (_tmp453_);
                                          _tmp454_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE);
                                          _tmp455_ = _tmp454_;
                                          _tmp456_ = g_strdup_printf ("sizeof (%s)", _tmp455_);
                                          _tmp457_ = _tmp456_;
                                          _tmp458_ = vala_ccode_identifier_new (_tmp457_);
                                          _tmp459_ = _tmp458_;
                                          vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) _tmp459_);
                                          _vala_ccode_node_unref0 (_tmp459_);
                                          _g_free0 (_tmp457_);
                                          _g_free0 (_tmp455_);
                                          _tmp460_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                          vala_ccode_function_add_expression (_tmp460_, (ValaCCodeExpression*) czero);
                                          _vala_ccode_node_unref0 (czero);
                                          _vala_code_node_unref0 (st);
                                    }
                              }
                        }
                  }
                  _tmp462_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
                  _tmp463_ = vala_code_context_get_module_init_method (_tmp462_);
                  if (_tmp463_ == m) {
                        _tmp461_ = ((ValaCCodeBaseModule*) self)->in_plugin;
                  } else {
                        _tmp461_ = FALSE;
                  }
                  if (_tmp461_) {
                        ValaCodeContext* _tmp464_ = NULL;
                        ValaNamespace* _tmp465_ = NULL;
                        ValaHashSet* _tmp466_ = NULL;
                        ValaHashSet* _tmp467_;
                        _tmp464_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
                        _tmp465_ = vala_code_context_get_root (_tmp464_);
                        _tmp466_ = vala_hash_set_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_hash, g_direct_equal);
                        _tmp467_ = _tmp466_;
                        vala_ccode_method_module_register_plugin_types (self, (ValaSymbol*) _tmp465_, (ValaSet*) _tmp467_);
                        _vala_iterable_unref0 (_tmp467_);
                  }
                  {
                        ValaList* _tmp468_ = NULL;
                        ValaList* _precondition_list;
                        gint _tmp469_;
                        gint _precondition_size;
                        gint _precondition_index;
                        _tmp468_ = vala_method_get_preconditions (m);
                        _precondition_list = _tmp468_;
                        _tmp469_ = vala_collection_get_size ((ValaCollection*) _precondition_list);
                        _precondition_size = _tmp469_;
                        _precondition_index = -1;
                        while (TRUE) {
                              gpointer _tmp470_ = NULL;
                              ValaExpression* precondition;
                              _precondition_index = _precondition_index + 1;
                              if (!(_precondition_index < _precondition_size)) {
                                    break;
                              }
                              _tmp470_ = vala_list_get (_precondition_list, _precondition_index);
                              precondition = (ValaExpression*) _tmp470_;
                              vala_ccode_method_module_create_precondition_statement (self, (ValaCodeNode*) m, creturn_type, precondition);
                              _vala_code_node_unref0 (precondition);
                        }
                        _vala_iterable_unref0 (_precondition_list);
                  }
            }
      }
      _tmp471_ = vala_subroutine_get_body ((ValaSubroutine*) m);
      if (_tmp471_ != NULL) {
            ValaBlock* _tmp472_ = NULL;
            _tmp472_ = vala_subroutine_get_body ((ValaSubroutine*) m);
            vala_code_node_emit ((ValaCodeNode*) _tmp472_, (ValaCodeGenerator*) self);
      }
      _tmp474_ = vala_method_get_is_abstract (m);
      if (!_tmp474_) {
            _tmp473_ = TRUE;
      } else {
            gboolean _tmp475_ = FALSE;
            gboolean _tmp476_;
            _tmp476_ = vala_method_get_is_abstract (m);
            if (_tmp476_) {
                  ValaTypeSymbol* _tmp477_ = NULL;
                  _tmp477_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                  _tmp475_ = VALA_IS_CLASS (_tmp477_);
            } else {
                  _tmp475_ = FALSE;
            }
            _tmp473_ = _tmp475_;
      }
      if (_tmp473_) {
            ValaBlock* _tmp478_ = NULL;
            _tmp478_ = vala_subroutine_get_body ((ValaSubroutine*) m);
            if (_tmp478_ != NULL) {
                  gboolean _tmp479_;
                  gboolean _tmp486_;
                  gboolean _tmp487_ = FALSE;
                  gboolean _tmp488_ = FALSE;
                  ValaDataType* _tmp489_ = NULL;
                  ValaCCodeFunction* _tmp562_ = NULL;
                  _tmp479_ = vala_ccode_base_module_get_current_method_inner_error ((ValaCCodeBaseModule*) self);
                  if (_tmp479_) {
                        gboolean _tmp480_;
                        _tmp480_ = vala_method_get_coroutine (m);
                        if (_tmp480_) {
                              vala_ccode_struct_add_field (((ValaCCodeBaseModule*) self)->closure_struct, "GError *", "_inner_error_", NULL);
                        } else {
                              ValaCCodeFunction* _tmp481_ = NULL;
                              ValaCCodeConstant* _tmp482_ = NULL;
                              ValaCCodeConstant* _tmp483_;
                              ValaCCodeVariableDeclarator* _tmp484_ = NULL;
                              ValaCCodeVariableDeclarator* _tmp485_;
                              _tmp481_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp482_ = vala_ccode_constant_new ("NULL");
                              _tmp483_ = _tmp482_;
                              _tmp484_ = vala_ccode_variable_declarator_new_zero ("_inner_error_", (ValaCCodeExpression*) _tmp483_, NULL);
                              _tmp485_ = _tmp484_;
                              vala_ccode_function_add_declaration (_tmp481_, "GError *", (ValaCCodeDeclarator*) _tmp485_, 0);
                              _vala_ccode_node_unref0 (_tmp485_);
                              _vala_ccode_node_unref0 (_tmp483_);
                        }
                  }
                  _tmp486_ = vala_method_get_coroutine (m);
                  if (_tmp486_) {
                        vala_ccode_method_module_complete_async (self);
                  }
                  _tmp489_ = vala_method_get_return_type (m);
                  if (!VALA_IS_VOID_TYPE (_tmp489_)) {
                        ValaDataType* _tmp490_ = NULL;
                        gboolean _tmp491_;
                        _tmp490_ = vala_method_get_return_type (m);
                        _tmp491_ = vala_data_type_is_real_non_null_struct_type (_tmp490_);
                        _tmp488_ = !_tmp491_;
                  } else {
                        _tmp488_ = FALSE;
                  }
                  if (_tmp488_) {
                        gboolean _tmp492_;
                        _tmp492_ = vala_method_get_coroutine (m);
                        _tmp487_ = !_tmp492_;
                  } else {
                        _tmp487_ = FALSE;
                  }
                  if (_tmp487_) {
                        gboolean _tmp493_ = FALSE;
                        ValaBasicBlock* _tmp494_ = NULL;
                        _tmp494_ = vala_subroutine_get_return_block ((ValaSubroutine*) m);
                        if (_tmp494_ != NULL) {
                              ValaBasicBlock* _tmp495_ = NULL;
                              ValaList* _tmp496_ = NULL;
                              ValaList* _tmp497_;
                              gint _tmp498_;
                              _tmp495_ = vala_subroutine_get_return_block ((ValaSubroutine*) m);
                              _tmp496_ = vala_basic_block_get_predecessors (_tmp495_);
                              _tmp497_ = _tmp496_;
                              _tmp498_ = vala_collection_get_size ((ValaCollection*) _tmp497_);
                              _tmp493_ = _tmp498_ == 0;
                              _vala_iterable_unref0 (_tmp497_);
                        } else {
                              _tmp493_ = FALSE;
                        }
                        if (_tmp493_) {
                              ValaCCodeFunction* _tmp499_ = NULL;
                              ValaCCodeIdentifier* _tmp500_ = NULL;
                              ValaCCodeIdentifier* _tmp501_;
                              _tmp499_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp500_ = vala_ccode_identifier_new ("result");
                              _tmp501_ = _tmp500_;
                              vala_ccode_function_add_return (_tmp499_, (ValaCCodeExpression*) _tmp501_);
                              _vala_ccode_node_unref0 (_tmp501_);
                        }
                  }
                  if (VALA_IS_CREATION_METHOD (m)) {
                        ValaTypeSymbol* _tmp502_ = NULL;
                        gboolean _tmp506_ = FALSE;
                        gboolean _tmp507_ = FALSE;
                        gboolean _tmp508_ = FALSE;
                        gboolean _tmp509_ = FALSE;
                        ValaTypeSymbol* _tmp510_ = NULL;
                        ValaTypeSymbol* _tmp553_ = NULL;
                        _tmp502_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                        if (VALA_IS_CLASS (_tmp502_)) {
                              ValaClass* _tmp503_ = NULL;
                              ValaObjectType* _tmp504_ = NULL;
                              _tmp503_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
                              _tmp504_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp503_);
                              _vala_code_node_unref0 (creturn_type);
                              creturn_type = (ValaDataType*) _tmp504_;
                        } else {
                              ValaVoidType* _tmp505_ = NULL;
                              _tmp505_ = vala_void_type_new (NULL);
                              _vala_code_node_unref0 (creturn_type);
                              creturn_type = (ValaDataType*) _tmp505_;
                        }
                        _tmp510_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                        if (VALA_IS_CLASS (_tmp510_)) {
                              _tmp509_ = ((ValaCCodeBaseModule*) self)->gobject_type != NULL;
                        } else {
                              _tmp509_ = FALSE;
                        }
                        if (_tmp509_) {
                              ValaClass* _tmp511_ = NULL;
                              gboolean _tmp512_;
                              _tmp511_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
                              _tmp512_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) _tmp511_, ((ValaCCodeBaseModule*) self)->gobject_type);
                              _tmp508_ = _tmp512_;
                        } else {
                              _tmp508_ = FALSE;
                        }
                        if (_tmp508_) {
                              ValaClass* _tmp513_ = NULL;
                              ValaList* _tmp514_ = NULL;
                              ValaList* _tmp515_;
                              gint _tmp516_;
                              _tmp513_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
                              _tmp514_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) _tmp513_);
                              _tmp515_ = _tmp514_;
                              _tmp516_ = vala_collection_get_size ((ValaCollection*) _tmp515_);
                              _tmp507_ = _tmp516_ > 0;
                              _vala_iterable_unref0 (_tmp515_);
                        } else {
                              _tmp507_ = FALSE;
                        }
                        if (_tmp507_) {
                              gboolean _tmp517_;
                              _tmp517_ = vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m));
                              _tmp506_ = !_tmp517_;
                        } else {
                              _tmp506_ = FALSE;
                        }
                        if (_tmp506_) {
                              ValaCCodeIdentifier* _tmp518_ = NULL;
                              ValaCCodeIdentifier* _tmp519_;
                              ValaCCodeIdentifier* _tmp520_ = NULL;
                              ValaCCodeIdentifier* _tmp521_;
                              ValaCCodeBinaryExpression* _tmp522_ = NULL;
                              ValaCCodeBinaryExpression* _tmp523_;
                              ValaCCodeBinaryExpression* ccond;
                              ValaCCodeBlock* _tmp524_ = NULL;
                              ValaCCodeBlock* cdofreeparam;
                              ValaCCodeIdentifier* _tmp525_ = NULL;
                              ValaCCodeIdentifier* _tmp526_;
                              ValaCCodeUnaryExpression* _tmp527_ = NULL;
                              ValaCCodeUnaryExpression* _tmp528_;
                              ValaCCodeExpressionStatement* _tmp529_ = NULL;
                              ValaCCodeExpressionStatement* _tmp530_;
                              ValaCCodeIdentifier* _tmp531_ = NULL;
                              ValaCCodeIdentifier* _tmp532_;
                              ValaCCodeFunctionCall* _tmp533_ = NULL;
                              ValaCCodeFunctionCall* _tmp534_;
                              ValaCCodeFunctionCall* cunsetcall;
                              ValaCCodeIdentifier* _tmp535_ = NULL;
                              ValaCCodeIdentifier* _tmp536_;
                              ValaCCodeMemberAccess* _tmp537_ = NULL;
                              ValaCCodeMemberAccess* _tmp538_;
                              ValaCCodeUnaryExpression* _tmp539_ = NULL;
                              ValaCCodeUnaryExpression* _tmp540_;
                              ValaCCodeExpressionStatement* _tmp541_ = NULL;
                              ValaCCodeExpressionStatement* _tmp542_;
                              ValaCCodeFunction* _tmp543_ = NULL;
                              ValaCCodeWhileStatement* _tmp544_ = NULL;
                              ValaCCodeWhileStatement* _tmp545_;
                              ValaCCodeIdentifier* _tmp546_ = NULL;
                              ValaCCodeIdentifier* _tmp547_;
                              ValaCCodeFunctionCall* _tmp548_ = NULL;
                              ValaCCodeFunctionCall* _tmp549_;
                              ValaCCodeFunctionCall* cfreeparams;
                              ValaCCodeIdentifier* _tmp550_ = NULL;
                              ValaCCodeIdentifier* _tmp551_;
                              ValaCCodeFunction* _tmp552_ = NULL;
                              _tmp518_ = vala_ccode_identifier_new ("__params_it");
                              _tmp519_ = _tmp518_;
                              _tmp520_ = vala_ccode_identifier_new ("__params");
                              _tmp521_ = _tmp520_;
                              _tmp522_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_GREATER_THAN, (ValaCCodeExpression*) _tmp519_, (ValaCCodeExpression*) _tmp521_);
                              _tmp523_ = _tmp522_;
                              _vala_ccode_node_unref0 (_tmp521_);
                              _vala_ccode_node_unref0 (_tmp519_);
                              ccond = _tmp523_;
                              _tmp524_ = vala_ccode_block_new ();
                              cdofreeparam = _tmp524_;
                              _tmp525_ = vala_ccode_identifier_new ("__params_it");
                              _tmp526_ = _tmp525_;
                              _tmp527_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_PREFIX_DECREMENT, (ValaCCodeExpression*) _tmp526_);
                              _tmp528_ = _tmp527_;
                              _tmp529_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp528_);
                              _tmp530_ = _tmp529_;
                              vala_ccode_block_add_statement (cdofreeparam, (ValaCCodeNode*) _tmp530_);
                              _vala_ccode_node_unref0 (_tmp530_);
                              _vala_ccode_node_unref0 (_tmp528_);
                              _vala_ccode_node_unref0 (_tmp526_);
                              _tmp531_ = vala_ccode_identifier_new ("g_value_unset");
                              _tmp532_ = _tmp531_;
                              _tmp533_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp532_);
                              _tmp534_ = _tmp533_;
                              _vala_ccode_node_unref0 (_tmp532_);
                              cunsetcall = _tmp534_;
                              _tmp535_ = vala_ccode_identifier_new ("__params_it");
                              _tmp536_ = _tmp535_;
                              _tmp537_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp536_, "value");
                              _tmp538_ = _tmp537_;
                              _tmp539_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp538_);
                              _tmp540_ = _tmp539_;
                              vala_ccode_function_call_add_argument (cunsetcall, (ValaCCodeExpression*) _tmp540_);
                              _vala_ccode_node_unref0 (_tmp540_);
                              _vala_ccode_node_unref0 (_tmp538_);
                              _vala_ccode_node_unref0 (_tmp536_);
                              _tmp541_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cunsetcall);
                              _tmp542_ = _tmp541_;
                              vala_ccode_block_add_statement (cdofreeparam, (ValaCCodeNode*) _tmp542_);
                              _vala_ccode_node_unref0 (_tmp542_);
                              _tmp543_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp544_ = vala_ccode_while_statement_new ((ValaCCodeExpression*) ccond, (ValaCCodeStatement*) cdofreeparam);
                              _tmp545_ = _tmp544_;
                              vala_ccode_function_add_statement (_tmp543_, (ValaCCodeNode*) _tmp545_);
                              _vala_ccode_node_unref0 (_tmp545_);
                              _tmp546_ = vala_ccode_identifier_new ("g_free");
                              _tmp547_ = _tmp546_;
                              _tmp548_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp547_);
                              _tmp549_ = _tmp548_;
                              _vala_ccode_node_unref0 (_tmp547_);
                              cfreeparams = _tmp549_;
                              _tmp550_ = vala_ccode_identifier_new ("__params");
                              _tmp551_ = _tmp550_;
                              vala_ccode_function_call_add_argument (cfreeparams, (ValaCCodeExpression*) _tmp551_);
                              _vala_ccode_node_unref0 (_tmp551_);
                              _tmp552_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              vala_ccode_function_add_expression (_tmp552_, (ValaCCodeExpression*) cfreeparams);
                              _vala_ccode_node_unref0 (cfreeparams);
                              _vala_ccode_node_unref0 (cunsetcall);
                              _vala_ccode_node_unref0 (cdofreeparam);
                              _vala_ccode_node_unref0 (ccond);
                        }
                        _tmp553_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
                        if (VALA_IS_CLASS (_tmp553_)) {
                              ValaCCodeIdentifier* _tmp554_ = NULL;
                              ValaCCodeExpression* cresult;
                              gchar* _tmp555_ = NULL;
                              gchar* _tmp556_;
                              gboolean _tmp557_;
                              ValaCCodeFunction* _tmp561_ = NULL;
                              _tmp554_ = vala_ccode_identifier_new ("self");
                              cresult = (ValaCCodeExpression*) _tmp554_;
                              _tmp555_ = vala_ccode_base_module_get_custom_creturn_type ((ValaCCodeBaseModule*) self, m);
                              _tmp556_ = _tmp555_;
                              _tmp557_ = _tmp556_ != NULL;
                              _g_free0 (_tmp556_);
                              if (_tmp557_) {
                                    gchar* _tmp558_ = NULL;
                                    gchar* _tmp559_;
                                    ValaCCodeCastExpression* _tmp560_ = NULL;
                                    _tmp558_ = vala_ccode_base_module_get_custom_creturn_type ((ValaCCodeBaseModule*) self, m);
                                    _tmp559_ = _tmp558_;
                                    _tmp560_ = vala_ccode_cast_expression_new (cresult, _tmp559_);
                                    _vala_ccode_node_unref0 (cresult);
                                    cresult = (ValaCCodeExpression*) _tmp560_;
                                    _g_free0 (_tmp559_);
                              }
                              _tmp561_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              vala_ccode_function_add_return (_tmp561_, cresult);
                              _vala_ccode_node_unref0 (cresult);
                        }
                  }
                  _tmp562_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, _tmp562_);
            }
      }
      _tmp564_ = vala_method_get_is_abstract (m);
      if (_tmp564_) {
            ValaTypeSymbol* _tmp565_ = NULL;
            _tmp565_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
            _tmp563_ = VALA_IS_CLASS (_tmp565_);
      } else {
            _tmp563_ = FALSE;
      }
      if (_tmp563_) {
            ValaTypeSymbol* _tmp566_ = NULL;
            ValaCCodeIdentifier* _tmp567_ = NULL;
            ValaCCodeIdentifier* _tmp568_;
            ValaCCodeFunctionCall* _tmp569_ = NULL;
            ValaCCodeFunctionCall* _tmp570_;
            ValaCCodeFunctionCall* type_from_instance_call;
            ValaCCodeIdentifier* _tmp571_ = NULL;
            ValaCCodeIdentifier* _tmp572_;
            ValaCCodeIdentifier* _tmp573_ = NULL;
            ValaCCodeIdentifier* _tmp574_;
            ValaCCodeFunctionCall* _tmp575_ = NULL;
            ValaCCodeFunctionCall* _tmp576_;
            ValaCCodeFunctionCall* type_name_call;
            gchar* _tmp577_ = NULL;
            gchar* _tmp578_;
            gchar* _tmp579_ = NULL;
            gchar* _tmp580_;
            gchar* error_string;
            ValaCCodeIdentifier* _tmp581_ = NULL;
            ValaCCodeIdentifier* _tmp582_;
            ValaCCodeFunctionCall* _tmp583_ = NULL;
            ValaCCodeFunctionCall* _tmp584_;
            ValaCCodeFunctionCall* cerrorcall;
            ValaCCodeConstant* _tmp585_ = NULL;
            ValaCCodeConstant* _tmp586_;
            ValaCCodeFunction* _tmp587_ = NULL;
            ValaCCodeFunction* _tmp588_ = NULL;
            _tmp566_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
            vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, _tmp566_, TRUE, "self");
            _tmp567_ = vala_ccode_identifier_new ("G_TYPE_FROM_INSTANCE");
            _tmp568_ = _tmp567_;
            _tmp569_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp568_);
            _tmp570_ = _tmp569_;
            _vala_ccode_node_unref0 (_tmp568_);
            type_from_instance_call = _tmp570_;
            _tmp571_ = vala_ccode_identifier_new ("self");
            _tmp572_ = _tmp571_;
            vala_ccode_function_call_add_argument (type_from_instance_call, (ValaCCodeExpression*) _tmp572_);
            _vala_ccode_node_unref0 (_tmp572_);
            _tmp573_ = vala_ccode_identifier_new ("g_type_name");
            _tmp574_ = _tmp573_;
            _tmp575_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp574_);
            _tmp576_ = _tmp575_;
            _vala_ccode_node_unref0 (_tmp574_);
            type_name_call = _tmp576_;
            vala_ccode_function_call_add_argument (type_name_call, (ValaCCodeExpression*) type_from_instance_call);
            _tmp577_ = vala_method_get_cname (m);
            _tmp578_ = _tmp577_;
            _tmp579_ = g_strdup_printf ("\"Type `%%s' does not implement abstract method `%s'\"", _tmp578_);
            _tmp580_ = _tmp579_;
            _g_free0 (_tmp578_);
            error_string = _tmp580_;
            _tmp581_ = vala_ccode_identifier_new ("g_critical");
            _tmp582_ = _tmp581_;
            _tmp583_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp582_);
            _tmp584_ = _tmp583_;
            _vala_ccode_node_unref0 (_tmp582_);
            cerrorcall = _tmp584_;
            _tmp585_ = vala_ccode_constant_new (error_string);
            _tmp586_ = _tmp585_;
            vala_ccode_function_call_add_argument (cerrorcall, (ValaCCodeExpression*) _tmp586_);
            _vala_ccode_node_unref0 (_tmp586_);
            vala_ccode_function_call_add_argument (cerrorcall, (ValaCCodeExpression*) type_name_call);
            _tmp587_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_expression (_tmp587_, (ValaCCodeExpression*) cerrorcall);
            vala_ccode_base_module_return_default_value ((ValaCCodeBaseModule*) self, creturn_type);
            _tmp588_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, _tmp588_);
            _vala_ccode_node_unref0 (cerrorcall);
            _g_free0 (error_string);
            _vala_ccode_node_unref0 (type_name_call);
            _vala_ccode_node_unref0 (type_from_instance_call);
      }
      ((ValaCCodeBaseModule*) self)->in_static_or_class_context = FALSE;
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      _tmp592_ = vala_method_get_is_abstract (m);
      if (_tmp592_) {
            _tmp591_ = TRUE;
      } else {
            gboolean _tmp593_;
            _tmp593_ = vala_method_get_is_virtual (m);
            _tmp591_ = _tmp593_;
      }
      if (_tmp591_) {
            gboolean _tmp594_;
            _tmp594_ = vala_method_get_coroutine (m);
            _tmp590_ = !_tmp594_;
      } else {
            _tmp590_ = FALSE;
      }
      if (_tmp590_) {
            ValaSignal* _tmp595_ = NULL;
            _tmp595_ = vala_method_get_signal_reference (m);
            _tmp589_ = _tmp595_ == NULL;
      } else {
            _tmp589_ = FALSE;
      }
      if (_tmp589_) {
            ValaHashMap* _tmp596_ = NULL;
            ValaHashMap* _tmp597_ = NULL;
            ValaHashMap* carg_map;
            _tmp596_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
            _vala_map_unref0 (cparam_map);
            cparam_map = _tmp596_;
            _tmp597_ = 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);
            carg_map = _tmp597_;
            vala_ccode_method_module_generate_vfunc (self, m, creturn_type, (ValaMap*) cparam_map, (ValaMap*) carg_map, "", 3);
            _vala_map_unref0 (carg_map);
      }
      _tmp598_ = vala_method_get_entry_point (m);
      if (_tmp598_) {
            ValaCCodeFunction* _tmp599_ = NULL;
            ValaCCodeFunction* cmain;
            ValaCCodeLineDirective* _tmp600_ = NULL;
            ValaCCodeParameter* _tmp601_ = NULL;
            ValaCCodeParameter* _tmp602_;
            ValaCCodeParameter* _tmp603_ = NULL;
            ValaCCodeParameter* _tmp604_;
            ValaCCodeBlock* _tmp605_ = NULL;
            ValaCCodeBlock* main_block;
            ValaCodeContext* _tmp606_ = NULL;
            ValaProfile _tmp607_;
            const gchar* _tmp637_ = NULL;
            ValaCCodeIdentifier* _tmp638_ = NULL;
            ValaCCodeIdentifier* _tmp639_;
            ValaCCodeFunctionCall* _tmp640_ = NULL;
            ValaCCodeFunctionCall* _tmp641_;
            ValaCCodeFunctionCall* main_call;
            ValaList* _tmp642_ = NULL;
            ValaList* _tmp643_;
            gint _tmp644_;
            gboolean _tmp645_;
            ValaDataType* _tmp650_ = NULL;
            _tmp599_ = vala_ccode_function_new ("main", "int");
            cmain = _tmp599_;
            _tmp600_ = vala_ccode_node_get_line ((ValaCCodeNode*) function);
            vala_ccode_node_set_line ((ValaCCodeNode*) cmain, _tmp600_);
            _tmp601_ = vala_ccode_parameter_new ("argc", "int");
            _tmp602_ = _tmp601_;
            vala_ccode_function_add_parameter (cmain, _tmp602_);
            _vala_ccode_node_unref0 (_tmp602_);
            _tmp603_ = vala_ccode_parameter_new ("argv", "char **");
            _tmp604_ = _tmp603_;
            vala_ccode_function_add_parameter (cmain, _tmp604_);
            _vala_ccode_node_unref0 (_tmp604_);
            _tmp605_ = vala_ccode_block_new ();
            main_block = _tmp605_;
            _tmp606_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
            _tmp607_ = vala_code_context_get_profile (_tmp606_);
            if (_tmp607_ == VALA_PROFILE_GOBJECT) {
                  ValaCodeContext* _tmp608_ = NULL;
                  gboolean _tmp609_;
                  ValaCodeContext* _tmp619_ = NULL;
                  gboolean _tmp620_;
                  ValaCCodeIdentifier* _tmp630_ = NULL;
                  ValaCCodeIdentifier* _tmp631_;
                  ValaCCodeFunctionCall* _tmp632_ = NULL;
                  ValaCCodeFunctionCall* _tmp633_;
                  ValaCCodeExpressionStatement* _tmp634_ = NULL;
                  ValaCCodeExpressionStatement* _tmp635_;
                  ValaCCodeExpressionStatement* type_init_call;
                  ValaCCodeLineDirective* _tmp636_ = NULL;
                  _tmp608_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
                  _tmp609_ = vala_code_context_get_mem_profiler (_tmp608_);
                  if (_tmp609_) {
                        ValaCCodeIdentifier* _tmp610_ = NULL;
                        ValaCCodeIdentifier* _tmp611_;
                        ValaCCodeFunctionCall* _tmp612_ = NULL;
                        ValaCCodeFunctionCall* _tmp613_;
                        ValaCCodeFunctionCall* mem_profiler_init_call;
                        ValaCCodeLineDirective* _tmp614_ = NULL;
                        ValaCCodeConstant* _tmp615_ = NULL;
                        ValaCCodeConstant* _tmp616_;
                        ValaCCodeExpressionStatement* _tmp617_ = NULL;
                        ValaCCodeExpressionStatement* _tmp618_;
                        _tmp610_ = vala_ccode_identifier_new ("g_mem_set_vtable");
                        _tmp611_ = _tmp610_;
                        _tmp612_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp611_);
                        _tmp613_ = _tmp612_;
                        _vala_ccode_node_unref0 (_tmp611_);
                        mem_profiler_init_call = _tmp613_;
                        _tmp614_ = vala_ccode_node_get_line ((ValaCCodeNode*) cmain);
                        vala_ccode_node_set_line ((ValaCCodeNode*) mem_profiler_init_call, _tmp614_);
                        _tmp615_ = vala_ccode_constant_new ("glib_mem_profiler_table");
                        _tmp616_ = _tmp615_;
                        vala_ccode_function_call_add_argument (mem_profiler_init_call, (ValaCCodeExpression*) _tmp616_);
                        _vala_ccode_node_unref0 (_tmp616_);
                        _tmp617_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) mem_profiler_init_call);
                        _tmp618_ = _tmp617_;
                        vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) _tmp618_);
                        _vala_ccode_node_unref0 (_tmp618_);
                        _vala_ccode_node_unref0 (mem_profiler_init_call);
                  }
                  _tmp619_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
                  _tmp620_ = vala_code_context_get_thread (_tmp619_);
                  if (_tmp620_) {
                        ValaCCodeIdentifier* _tmp621_ = NULL;
                        ValaCCodeIdentifier* _tmp622_;
                        ValaCCodeFunctionCall* _tmp623_ = NULL;
                        ValaCCodeFunctionCall* _tmp624_;
                        ValaCCodeFunctionCall* thread_init_call;
                        ValaCCodeLineDirective* _tmp625_ = NULL;
                        ValaCCodeConstant* _tmp626_ = NULL;
                        ValaCCodeConstant* _tmp627_;
                        ValaCCodeExpressionStatement* _tmp628_ = NULL;
                        ValaCCodeExpressionStatement* _tmp629_;
                        _tmp621_ = vala_ccode_identifier_new ("g_thread_init");
                        _tmp622_ = _tmp621_;
                        _tmp623_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp622_);
                        _tmp624_ = _tmp623_;
                        _vala_ccode_node_unref0 (_tmp622_);
                        thread_init_call = _tmp624_;
                        _tmp625_ = vala_ccode_node_get_line ((ValaCCodeNode*) cmain);
                        vala_ccode_node_set_line ((ValaCCodeNode*) thread_init_call, _tmp625_);
                        _tmp626_ = vala_ccode_constant_new ("NULL");
                        _tmp627_ = _tmp626_;
                        vala_ccode_function_call_add_argument (thread_init_call, (ValaCCodeExpression*) _tmp627_);
                        _vala_ccode_node_unref0 (_tmp627_);
                        _tmp628_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) thread_init_call);
                        _tmp629_ = _tmp628_;
                        vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) _tmp629_);
                        _vala_ccode_node_unref0 (_tmp629_);
                        _vala_ccode_node_unref0 (thread_init_call);
                  }
                  _tmp630_ = vala_ccode_identifier_new ("g_type_init");
                  _tmp631_ = _tmp630_;
                  _tmp632_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp631_);
                  _tmp633_ = _tmp632_;
                  _tmp634_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp633_);
                  _tmp635_ = _tmp634_;
                  _vala_ccode_node_unref0 (_tmp633_);
                  _vala_ccode_node_unref0 (_tmp631_);
                  type_init_call = _tmp635_;
                  _tmp636_ = vala_ccode_node_get_line ((ValaCCodeNode*) cmain);
                  vala_ccode_node_set_line ((ValaCCodeNode*) type_init_call, _tmp636_);
                  vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) type_init_call);
                  _vala_ccode_node_unref0 (type_init_call);
            }
            _tmp637_ = vala_ccode_function_get_name (function);
            _tmp638_ = vala_ccode_identifier_new (_tmp637_);
            _tmp639_ = _tmp638_;
            _tmp640_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp639_);
            _tmp641_ = _tmp640_;
            _vala_ccode_node_unref0 (_tmp639_);
            main_call = _tmp641_;
            _tmp642_ = vala_method_get_parameters (m);
            _tmp643_ = _tmp642_;
            _tmp644_ = vala_collection_get_size ((ValaCollection*) _tmp643_);
            _tmp645_ = _tmp644_ == 1;
            _vala_iterable_unref0 (_tmp643_);
            if (_tmp645_) {
                  ValaCCodeIdentifier* _tmp646_ = NULL;
                  ValaCCodeIdentifier* _tmp647_;
                  ValaCCodeIdentifier* _tmp648_ = NULL;
                  ValaCCodeIdentifier* _tmp649_;
                  _tmp646_ = vala_ccode_identifier_new ("argv");
                  _tmp647_ = _tmp646_;
                  vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) _tmp647_);
                  _vala_ccode_node_unref0 (_tmp647_);
                  _tmp648_ = vala_ccode_identifier_new ("argc");
                  _tmp649_ = _tmp648_;
                  vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) _tmp649_);
                  _vala_ccode_node_unref0 (_tmp649_);
            }
            _tmp650_ = vala_method_get_return_type (m);
            if (VALA_IS_VOID_TYPE (_tmp650_)) {
                  ValaCCodeExpressionStatement* _tmp651_ = NULL;
                  ValaCCodeExpressionStatement* main_stmt;
                  ValaCCodeLineDirective* _tmp652_ = NULL;
                  ValaCCodeConstant* _tmp653_ = NULL;
                  ValaCCodeConstant* _tmp654_;
                  ValaCCodeReturnStatement* _tmp655_ = NULL;
                  ValaCCodeReturnStatement* _tmp656_;
                  ValaCCodeReturnStatement* ret_stmt;
                  ValaCCodeLineDirective* _tmp657_ = NULL;
                  _tmp651_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) main_call);
                  main_stmt = _tmp651_;
                  _tmp652_ = vala_ccode_node_get_line ((ValaCCodeNode*) cmain);
                  vala_ccode_node_set_line ((ValaCCodeNode*) main_stmt, _tmp652_);
                  vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) main_stmt);
                  _tmp653_ = vala_ccode_constant_new ("0");
                  _tmp654_ = _tmp653_;
                  _tmp655_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp654_);
                  _tmp656_ = _tmp655_;
                  _vala_ccode_node_unref0 (_tmp654_);
                  ret_stmt = _tmp656_;
                  _tmp657_ = vala_ccode_node_get_line ((ValaCCodeNode*) cmain);
                  vala_ccode_node_set_line ((ValaCCodeNode*) ret_stmt, _tmp657_);
                  vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) ret_stmt);
                  _vala_ccode_node_unref0 (ret_stmt);
                  _vala_ccode_node_unref0 (main_stmt);
            } else {
                  ValaCCodeReturnStatement* _tmp658_ = NULL;
                  ValaCCodeReturnStatement* main_stmt;
                  ValaCCodeLineDirective* _tmp659_ = NULL;
                  _tmp658_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) main_call);
                  main_stmt = _tmp658_;
                  _tmp659_ = vala_ccode_node_get_line ((ValaCCodeNode*) cmain);
                  vala_ccode_node_set_line ((ValaCCodeNode*) main_stmt, _tmp659_);
                  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_file_add_function (((ValaCCodeBaseModule*) self)->cfile, cmain);
            _vala_ccode_node_unref0 (main_call);
            _vala_ccode_node_unref0 (main_block);
            _vala_ccode_node_unref0 (cmain);
      }
      _vala_map_unref0 (cparam_map);
      _vala_ccode_node_unref0 (function);
      _vala_code_node_unref0 (creturn_type);
}


static ValaCCodeParameter* vala_ccode_method_module_real_generate_parameter (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map) {
      ValaCCodeParameter* result = NULL;
      ValaCCodeParameter* cparam = NULL;
      gboolean _tmp0_;
      gdouble _tmp27_;
      gboolean _tmp28_;
      gint _tmp29_;
      gboolean _tmp30_ = FALSE;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (param != NULL, NULL);
      g_return_val_if_fail (decl_space != NULL, NULL);
      g_return_val_if_fail (cparam_map != NULL, NULL);
      _tmp0_ = vala_parameter_get_ellipsis (param);
      if (!_tmp0_) {
            ValaDataType* _tmp1_ = NULL;
            gchar* _tmp2_ = NULL;
            gchar* ctypename;
            ValaDataType* _tmp3_ = NULL;
            ValaDataType* _tmp4_ = NULL;
            ValaTypeSymbol* _tmp5_ = NULL;
            ValaParameterDirection _tmp20_;
            const gchar* _tmp22_ = NULL;
            gchar* _tmp23_ = NULL;
            gchar* _tmp24_;
            ValaCCodeParameter* _tmp25_ = NULL;
            _tmp1_ = vala_variable_get_variable_type ((ValaVariable*) param);
            _tmp2_ = vala_data_type_get_cname (_tmp1_);
            ctypename = _tmp2_;
            _tmp3_ = vala_variable_get_variable_type ((ValaVariable*) param);
            vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp3_, decl_space);
            _tmp4_ = vala_variable_get_variable_type ((ValaVariable*) param);
            _tmp5_ = vala_data_type_get_data_type (_tmp4_);
            if (VALA_IS_STRUCT (_tmp5_)) {
                  ValaDataType* _tmp6_ = NULL;
                  ValaTypeSymbol* _tmp7_ = NULL;
                  ValaStruct* _tmp8_;
                  ValaStruct* st;
                  gboolean _tmp9_ = FALSE;
                  gboolean _tmp10_;
                  _tmp6_ = vala_variable_get_variable_type ((ValaVariable*) param);
                  _tmp7_ = vala_data_type_get_data_type (_tmp6_);
                  _tmp8_ = _vala_code_node_ref0 (VALA_STRUCT (_tmp7_));
                  st = _tmp8_;
                  _tmp10_ = vala_struct_is_simple_type (st);
                  if (!_tmp10_) {
                        ValaParameterDirection _tmp11_;
                        _tmp11_ = vala_parameter_get_direction (param);
                        _tmp9_ = _tmp11_ == VALA_PARAMETER_DIRECTION_IN;
                  } else {
                        _tmp9_ = FALSE;
                  }
                  if (_tmp9_) {
                        gboolean _tmp12_ = FALSE;
                        gboolean _tmp13_;
                        ValaDataType* _tmp17_ = NULL;
                        gboolean _tmp18_;
                        _tmp13_ = vala_struct_get_is_immutable (st);
                        if (_tmp13_) {
                              ValaDataType* _tmp14_ = NULL;
                              gboolean _tmp15_;
                              _tmp14_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp15_ = vala_data_type_get_value_owned (_tmp14_);
                              _tmp12_ = !_tmp15_;
                        } else {
                              _tmp12_ = FALSE;
                        }
                        if (_tmp12_) {
                              gchar* _tmp16_;
                              _tmp16_ = g_strconcat ("const ", ctypename, NULL);
                              _g_free0 (ctypename);
                              ctypename = _tmp16_;
                        }
                        _tmp17_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp18_ = vala_data_type_get_nullable (_tmp17_);
                        if (!_tmp18_) {
                              gchar* _tmp19_;
                              _tmp19_ = g_strconcat (ctypename, "*", NULL);
                              _g_free0 (ctypename);
                              ctypename = _tmp19_;
                        }
                  }
                  _vala_code_node_unref0 (st);
            }
            _tmp20_ = vala_parameter_get_direction (param);
            if (_tmp20_ != VALA_PARAMETER_DIRECTION_IN) {
                  gchar* _tmp21_;
                  _tmp21_ = g_strconcat (ctypename, "*", NULL);
                  _g_free0 (ctypename);
                  ctypename = _tmp21_;
            }
            _tmp22_ = vala_symbol_get_name ((ValaSymbol*) param);
            _tmp23_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp22_);
            _tmp24_ = _tmp23_;
            _tmp25_ = vala_ccode_parameter_new (_tmp24_, ctypename);
            _vala_ccode_node_unref0 (cparam);
            cparam = _tmp25_;
            _g_free0 (_tmp24_);
            _g_free0 (ctypename);
      } else {
            ValaCCodeParameter* _tmp26_ = NULL;
            _tmp26_ = vala_ccode_parameter_new_with_ellipsis ();
            _vala_ccode_node_unref0 (cparam);
            cparam = _tmp26_;
      }
      _tmp27_ = vala_parameter_get_cparameter_position (param);
      _tmp28_ = vala_parameter_get_ellipsis (param);
      _tmp29_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp27_, _tmp28_);
      vala_map_set (cparam_map, GINT_TO_POINTER (_tmp29_), cparam);
      if (carg_map != NULL) {
            gboolean _tmp31_;
            _tmp31_ = vala_parameter_get_ellipsis (param);
            _tmp30_ = !_tmp31_;
      } else {
            _tmp30_ = FALSE;
      }
      if (_tmp30_) {
            gdouble _tmp32_;
            gboolean _tmp33_;
            gint _tmp34_;
            const gchar* _tmp35_ = NULL;
            ValaCCodeExpression* _tmp36_ = NULL;
            ValaCCodeExpression* _tmp37_;
            _tmp32_ = vala_parameter_get_cparameter_position (param);
            _tmp33_ = vala_parameter_get_ellipsis (param);
            _tmp34_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp32_, _tmp33_);
            _tmp35_ = vala_symbol_get_name ((ValaSymbol*) param);
            _tmp36_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp35_);
            _tmp37_ = _tmp36_;
            vala_map_set (carg_map, GINT_TO_POINTER (_tmp34_), _tmp37_);
            _vala_ccode_node_unref0 (_tmp37_);
      }
      result = cparam;
      return result;
}


ValaCCodeParameter* vala_ccode_method_module_generate_parameter (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map) {
      return 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, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction) {
      ValaCCodeMethodModule * self;
      gboolean _tmp0_;
      gboolean _tmp70_;
      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);
      _tmp0_ = vala_method_get_closure (m);
      if (_tmp0_) {
            ValaBlock* _tmp1_ = NULL;
            ValaBlock* _tmp2_;
            ValaBlock* closure_block;
            gint _tmp3_;
            gint block_id;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            gchar* _tmp6_ = NULL;
            gchar* _tmp7_;
            ValaCCodeParameter* _tmp8_ = NULL;
            ValaCCodeParameter* _tmp9_;
            ValaCCodeParameter* instance_param;
            gdouble _tmp10_;
            gint _tmp11_;
            _tmp1_ = vala_ccode_base_module_get_current_closure_block ((ValaCCodeBaseModule*) self);
            _tmp2_ = _vala_code_node_ref0 (_tmp1_);
            closure_block = _tmp2_;
            _tmp3_ = vala_ccode_base_module_get_block_id ((ValaCCodeBaseModule*) self, closure_block);
            block_id = _tmp3_;
            _tmp4_ = g_strdup_printf ("_data%d_", block_id);
            _tmp5_ = _tmp4_;
            _tmp6_ = g_strdup_printf ("Block%dData*", block_id);
            _tmp7_ = _tmp6_;
            _tmp8_ = vala_ccode_parameter_new (_tmp5_, _tmp7_);
            _tmp9_ = _tmp8_;
            _g_free0 (_tmp7_);
            _g_free0 (_tmp5_);
            instance_param = _tmp9_;
            _tmp10_ = vala_method_get_cinstance_parameter_position (m);
            _tmp11_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp10_, FALSE);
            vala_map_set (cparam_map, GINT_TO_POINTER (_tmp11_), instance_param);
            _vala_ccode_node_unref0 (instance_param);
            _vala_code_node_unref0 (closure_block);
      } else {
            gboolean _tmp12_ = FALSE;
            ValaSymbol* _tmp13_ = NULL;
            _tmp13_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
            if (VALA_IS_CLASS (_tmp13_)) {
                  _tmp12_ = VALA_IS_CREATION_METHOD (m);
            } else {
                  _tmp12_ = FALSE;
            }
            if (_tmp12_) {
                  ValaSymbol* _tmp14_ = NULL;
                  ValaClass* _tmp15_;
                  ValaClass* cl;
                  gboolean _tmp16_ = FALSE;
                  gboolean _tmp17_;
                  _tmp14_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                  _tmp15_ = _vala_code_node_ref0 (VALA_CLASS (_tmp14_));
                  cl = _tmp15_;
                  _tmp17_ = vala_class_get_is_compact (cl);
                  if (!_tmp17_) {
                        _tmp16_ = vcall == NULL;
                  } else {
                        _tmp16_ = FALSE;
                  }
                  if (_tmp16_) {
                        gdouble _tmp18_;
                        gint _tmp19_;
                        ValaCCodeParameter* _tmp20_ = NULL;
                        ValaCCodeParameter* _tmp21_;
                        _tmp18_ = vala_method_get_cinstance_parameter_position (m);
                        _tmp19_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp18_, FALSE);
                        _tmp20_ = vala_ccode_parameter_new ("object_type", "GType");
                        _tmp21_ = _tmp20_;
                        vala_map_set (cparam_map, GINT_TO_POINTER (_tmp19_), _tmp21_);
                        _vala_ccode_node_unref0 (_tmp21_);
                  }
                  _vala_code_node_unref0 (cl);
            } else {
                  gboolean _tmp22_ = FALSE;
                  ValaMemberBinding _tmp23_;
                  _tmp23_ = vala_method_get_binding (m);
                  if (_tmp23_ == VALA_MEMBER_BINDING_INSTANCE) {
                        _tmp22_ = TRUE;
                  } else {
                        gboolean _tmp24_ = FALSE;
                        ValaSymbol* _tmp25_ = NULL;
                        _tmp25_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                        if (VALA_IS_STRUCT (_tmp25_)) {
                              _tmp24_ = VALA_IS_CREATION_METHOD (m);
                        } else {
                              _tmp24_ = FALSE;
                        }
                        _tmp22_ = _tmp24_;
                  }
                  if (_tmp22_) {
                        ValaTypeSymbol* _tmp26_ = NULL;
                        ValaTypeSymbol* parent_type;
                        ValaDataType* this_type = NULL;
                        ValaCCodeParameter* instance_param;
                        gboolean _tmp31_ = FALSE;
                        gboolean _tmp32_ = FALSE;
                        ValaMethod* _tmp33_ = NULL;
                        gdouble _tmp59_;
                        gint _tmp60_;
                        _tmp26_ = vala_ccode_method_module_find_parent_type (self, (ValaSymbol*) m);
                        parent_type = _tmp26_;
                        if (VALA_IS_CLASS (parent_type)) {
                              ValaObjectType* _tmp27_ = NULL;
                              _tmp27_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (parent_type));
                              _vala_code_node_unref0 (this_type);
                              this_type = (ValaDataType*) _tmp27_;
                        } else {
                              if (VALA_IS_INTERFACE (parent_type)) {
                                    ValaObjectType* _tmp28_ = NULL;
                                    _tmp28_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (parent_type));
                                    _vala_code_node_unref0 (this_type);
                                    this_type = (ValaDataType*) _tmp28_;
                              } else {
                                    if (VALA_IS_STRUCT (parent_type)) {
                                          ValaStructValueType* _tmp29_ = NULL;
                                          _tmp29_ = vala_struct_value_type_new (VALA_STRUCT (parent_type));
                                          _vala_code_node_unref0 (this_type);
                                          this_type = (ValaDataType*) _tmp29_;
                                    } else {
                                          if (VALA_IS_ENUM (parent_type)) {
                                                ValaEnumValueType* _tmp30_ = NULL;
                                                _tmp30_ = vala_enum_value_type_new (VALA_ENUM (parent_type));
                                                _vala_code_node_unref0 (this_type);
                                                this_type = (ValaDataType*) _tmp30_;
                                          } else {
                                                g_assert_not_reached ();
                                          }
                                    }
                              }
                        }
                        vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, this_type, decl_space);
                        instance_param = NULL;
                        _tmp33_ = vala_method_get_base_interface_method (m);
                        if (_tmp33_ != NULL) {
                              gboolean _tmp34_;
                              _tmp34_ = vala_method_get_is_abstract (m);
                              _tmp32_ = !_tmp34_;
                        } else {
                              _tmp32_ = FALSE;
                        }
                        if (_tmp32_) {
                              gboolean _tmp35_;
                              _tmp35_ = vala_method_get_is_virtual (m);
                              _tmp31_ = !_tmp35_;
                        } else {
                              _tmp31_ = FALSE;
                        }
                        if (_tmp31_) {
                              ValaMethod* _tmp36_ = NULL;
                              ValaSymbol* _tmp37_ = NULL;
                              ValaObjectType* _tmp38_ = NULL;
                              ValaObjectType* base_type;
                              gchar* _tmp39_ = NULL;
                              gchar* _tmp40_;
                              ValaCCodeParameter* _tmp41_ = NULL;
                              _tmp36_ = vala_method_get_base_interface_method (m);
                              _tmp37_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp36_);
                              _tmp38_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (_tmp37_));
                              base_type = _tmp38_;
                              _tmp39_ = vala_data_type_get_cname ((ValaDataType*) base_type);
                              _tmp40_ = _tmp39_;
                              _tmp41_ = vala_ccode_parameter_new ("base", _tmp40_);
                              _vala_ccode_node_unref0 (instance_param);
                              instance_param = _tmp41_;
                              _g_free0 (_tmp40_);
                              _vala_code_node_unref0 (base_type);
                        } else {
                              gboolean _tmp42_;
                              _tmp42_ = vala_method_get_overrides (m);
                              if (_tmp42_) {
                                    ValaMethod* _tmp43_ = NULL;
                                    ValaSymbol* _tmp44_ = NULL;
                                    ValaObjectType* _tmp45_ = NULL;
                                    ValaObjectType* base_type;
                                    gchar* _tmp46_ = NULL;
                                    gchar* _tmp47_;
                                    ValaCCodeParameter* _tmp48_ = NULL;
                                    _tmp43_ = vala_method_get_base_method (m);
                                    _tmp44_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp43_);
                                    _tmp45_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (_tmp44_));
                                    base_type = _tmp45_;
                                    _tmp46_ = vala_data_type_get_cname ((ValaDataType*) base_type);
                                    _tmp47_ = _tmp46_;
                                    _tmp48_ = vala_ccode_parameter_new ("base", _tmp47_);
                                    _vala_ccode_node_unref0 (instance_param);
                                    instance_param = _tmp48_;
                                    _g_free0 (_tmp47_);
                                    _vala_code_node_unref0 (base_type);
                              } else {
                                    gboolean _tmp49_ = FALSE;
                                    ValaSymbol* _tmp50_ = NULL;
                                    _tmp50_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                                    if (VALA_IS_STRUCT (_tmp50_)) {
                                          ValaSymbol* _tmp51_ = NULL;
                                          gboolean _tmp52_;
                                          _tmp51_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
                                          _tmp52_ = vala_struct_is_simple_type (VALA_STRUCT (_tmp51_));
                                          _tmp49_ = !_tmp52_;
                                    } else {
                                          _tmp49_ = FALSE;
                                    }
                                    if (_tmp49_) {
                                          gchar* _tmp53_ = NULL;
                                          gchar* _tmp54_;
                                          ValaCCodeParameter* _tmp55_ = NULL;
                                          _tmp53_ = vala_data_type_get_cname (this_type);
                                          _tmp54_ = _tmp53_;
                                          _tmp55_ = vala_ccode_parameter_new ("*self", _tmp54_);
                                          _vala_ccode_node_unref0 (instance_param);
                                          instance_param = _tmp55_;
                                          _g_free0 (_tmp54_);
                                    } else {
                                          gchar* _tmp56_ = NULL;
                                          gchar* _tmp57_;
                                          ValaCCodeParameter* _tmp58_ = NULL;
                                          _tmp56_ = vala_data_type_get_cname (this_type);
                                          _tmp57_ = _tmp56_;
                                          _tmp58_ = vala_ccode_parameter_new ("self", _tmp57_);
                                          _vala_ccode_node_unref0 (instance_param);
                                          instance_param = _tmp58_;
                                          _g_free0 (_tmp57_);
                                    }
                              }
                        }
                        _tmp59_ = vala_method_get_cinstance_parameter_position (m);
                        _tmp60_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp59_, FALSE);
                        vala_map_set (cparam_map, GINT_TO_POINTER (_tmp60_), instance_param);
                        _vala_ccode_node_unref0 (instance_param);
                        _vala_code_node_unref0 (this_type);
                        _vala_code_node_unref0 (parent_type);
                  } else {
                        ValaMemberBinding _tmp61_;
                        _tmp61_ = vala_method_get_binding (m);
                        if (_tmp61_ == VALA_MEMBER_BINDING_CLASS) {
                              ValaTypeSymbol* _tmp62_ = NULL;
                              ValaTypeSymbol* parent_type;
                              ValaDataType* this_type = NULL;
                              ValaClassType* _tmp63_ = NULL;
                              gchar* _tmp64_ = NULL;
                              gchar* _tmp65_;
                              ValaCCodeParameter* _tmp66_ = NULL;
                              ValaCCodeParameter* _tmp67_;
                              ValaCCodeParameter* class_param;
                              gdouble _tmp68_;
                              gint _tmp69_;
                              _tmp62_ = vala_ccode_method_module_find_parent_type (self, (ValaSymbol*) m);
                              parent_type = _tmp62_;
                              _tmp63_ = vala_class_type_new (VALA_CLASS (parent_type));
                              _vala_code_node_unref0 (this_type);
                              this_type = (ValaDataType*) _tmp63_;
                              _tmp64_ = vala_data_type_get_cname (this_type);
                              _tmp65_ = _tmp64_;
                              _tmp66_ = vala_ccode_parameter_new ("klass", _tmp65_);
                              _tmp67_ = _tmp66_;
                              _g_free0 (_tmp65_);
                              class_param = _tmp67_;
                              _tmp68_ = vala_method_get_cinstance_parameter_position (m);
                              _tmp69_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp68_, FALSE);
                              vala_map_set (cparam_map, GINT_TO_POINTER (_tmp69_), class_param);
                              _vala_ccode_node_unref0 (class_param);
                              _vala_code_node_unref0 (this_type);
                              _vala_code_node_unref0 (parent_type);
                        }
                  }
            }
      }
      _tmp70_ = vala_ccode_method_module_is_gtypeinstance_creation_method (self, m);
      if (_tmp70_) {
            gint type_param_index;
            ValaSymbol* _tmp71_ = NULL;
            ValaClass* _tmp72_;
            ValaClass* cl;
            type_param_index = 0;
            _tmp71_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
            _tmp72_ = _vala_code_node_ref0 (VALA_CLASS (_tmp71_));
            cl = _tmp72_;
            {
                  ValaList* _tmp73_ = NULL;
                  ValaList* _type_param_list;
                  gint _tmp74_;
                  gint _type_param_size;
                  gint _type_param_index;
                  _tmp73_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) cl);
                  _type_param_list = _tmp73_;
                  _tmp74_ = vala_collection_get_size ((ValaCollection*) _type_param_list);
                  _type_param_size = _tmp74_;
                  _type_param_index = -1;
                  while (TRUE) {
                        gpointer _tmp75_ = NULL;
                        ValaTypeParameter* type_param;
                        gint _tmp76_;
                        const gchar* _tmp77_ = NULL;
                        gchar* _tmp78_ = NULL;
                        gchar* _tmp79_;
                        gchar* _tmp80_ = NULL;
                        gchar* _tmp81_;
                        ValaCCodeParameter* _tmp82_ = NULL;
                        ValaCCodeParameter* _tmp83_;
                        gint _tmp84_;
                        const gchar* _tmp85_ = NULL;
                        gchar* _tmp86_ = NULL;
                        gchar* _tmp87_;
                        gchar* _tmp88_ = NULL;
                        gchar* _tmp89_;
                        ValaCCodeParameter* _tmp90_ = NULL;
                        ValaCCodeParameter* _tmp91_;
                        gint _tmp92_;
                        const gchar* _tmp93_ = NULL;
                        gchar* _tmp94_ = NULL;
                        gchar* _tmp95_;
                        gchar* _tmp96_ = NULL;
                        gchar* _tmp97_;
                        ValaCCodeParameter* _tmp98_ = NULL;
                        ValaCCodeParameter* _tmp99_;
                        _type_param_index = _type_param_index + 1;
                        if (!(_type_param_index < _type_param_size)) {
                              break;
                        }
                        _tmp75_ = vala_list_get (_type_param_list, _type_param_index);
                        type_param = (ValaTypeParameter*) _tmp75_;
                        _tmp76_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE);
                        _tmp77_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                        _tmp78_ = g_utf8_strdown (_tmp77_, (gssize) (-1));
                        _tmp79_ = _tmp78_;
                        _tmp80_ = g_strdup_printf ("%s_type", _tmp79_);
                        _tmp81_ = _tmp80_;
                        _tmp82_ = vala_ccode_parameter_new (_tmp81_, "GType");
                        _tmp83_ = _tmp82_;
                        vala_map_set (cparam_map, GINT_TO_POINTER (_tmp76_), _tmp83_);
                        _vala_ccode_node_unref0 (_tmp83_);
                        _g_free0 (_tmp81_);
                        _g_free0 (_tmp79_);
                        _tmp84_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE);
                        _tmp85_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                        _tmp86_ = g_utf8_strdown (_tmp85_, (gssize) (-1));
                        _tmp87_ = _tmp86_;
                        _tmp88_ = g_strdup_printf ("%s_dup_func", _tmp87_);
                        _tmp89_ = _tmp88_;
                        _tmp90_ = vala_ccode_parameter_new (_tmp89_, "GBoxedCopyFunc");
                        _tmp91_ = _tmp90_;
                        vala_map_set (cparam_map, GINT_TO_POINTER (_tmp84_), _tmp91_);
                        _vala_ccode_node_unref0 (_tmp91_);
                        _g_free0 (_tmp89_);
                        _g_free0 (_tmp87_);
                        _tmp92_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE);
                        _tmp93_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                        _tmp94_ = g_utf8_strdown (_tmp93_, (gssize) (-1));
                        _tmp95_ = _tmp94_;
                        _tmp96_ = g_strdup_printf ("%s_destroy_func", _tmp95_);
                        _tmp97_ = _tmp96_;
                        _tmp98_ = vala_ccode_parameter_new (_tmp97_, "GDestroyNotify");
                        _tmp99_ = _tmp98_;
                        vala_map_set (cparam_map, GINT_TO_POINTER (_tmp92_), _tmp99_);
                        _vala_ccode_node_unref0 (_tmp99_);
                        _g_free0 (_tmp97_);
                        _g_free0 (_tmp95_);
                        if (carg_map != NULL) {
                              gint _tmp100_;
                              const gchar* _tmp101_ = NULL;
                              gchar* _tmp102_ = NULL;
                              gchar* _tmp103_;
                              gchar* _tmp104_ = NULL;
                              gchar* _tmp105_;
                              ValaCCodeIdentifier* _tmp106_ = NULL;
                              ValaCCodeIdentifier* _tmp107_;
                              gint _tmp108_;
                              const gchar* _tmp109_ = NULL;
                              gchar* _tmp110_ = NULL;
                              gchar* _tmp111_;
                              gchar* _tmp112_ = NULL;
                              gchar* _tmp113_;
                              ValaCCodeIdentifier* _tmp114_ = NULL;
                              ValaCCodeIdentifier* _tmp115_;
                              gint _tmp116_;
                              const gchar* _tmp117_ = NULL;
                              gchar* _tmp118_ = NULL;
                              gchar* _tmp119_;
                              gchar* _tmp120_ = NULL;
                              gchar* _tmp121_;
                              ValaCCodeIdentifier* _tmp122_ = NULL;
                              ValaCCodeIdentifier* _tmp123_;
                              _tmp100_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE);
                              _tmp101_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                              _tmp102_ = g_utf8_strdown (_tmp101_, (gssize) (-1));
                              _tmp103_ = _tmp102_;
                              _tmp104_ = g_strdup_printf ("%s_type", _tmp103_);
                              _tmp105_ = _tmp104_;
                              _tmp106_ = vala_ccode_identifier_new (_tmp105_);
                              _tmp107_ = _tmp106_;
                              vala_map_set (carg_map, GINT_TO_POINTER (_tmp100_), (ValaCCodeExpression*) _tmp107_);
                              _vala_ccode_node_unref0 (_tmp107_);
                              _g_free0 (_tmp105_);
                              _g_free0 (_tmp103_);
                              _tmp108_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE);
                              _tmp109_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                              _tmp110_ = g_utf8_strdown (_tmp109_, (gssize) (-1));
                              _tmp111_ = _tmp110_;
                              _tmp112_ = g_strdup_printf ("%s_dup_func", _tmp111_);
                              _tmp113_ = _tmp112_;
                              _tmp114_ = vala_ccode_identifier_new (_tmp113_);
                              _tmp115_ = _tmp114_;
                              vala_map_set (carg_map, GINT_TO_POINTER (_tmp108_), (ValaCCodeExpression*) _tmp115_);
                              _vala_ccode_node_unref0 (_tmp115_);
                              _g_free0 (_tmp113_);
                              _g_free0 (_tmp111_);
                              _tmp116_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE);
                              _tmp117_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                              _tmp118_ = g_utf8_strdown (_tmp117_, (gssize) (-1));
                              _tmp119_ = _tmp118_;
                              _tmp120_ = g_strdup_printf ("%s_destroy_func", _tmp119_);
                              _tmp121_ = _tmp120_;
                              _tmp122_ = vala_ccode_identifier_new (_tmp121_);
                              _tmp123_ = _tmp122_;
                              vala_map_set (carg_map, GINT_TO_POINTER (_tmp116_), (ValaCCodeExpression*) _tmp123_);
                              _vala_ccode_node_unref0 (_tmp123_);
                              _g_free0 (_tmp121_);
                              _g_free0 (_tmp119_);
                        }
                        type_param_index++;
                        _vala_code_node_unref0 (type_param);
                  }
                  _vala_iterable_unref0 (_type_param_list);
            }
            _vala_code_node_unref0 (cl);
      } else {
            gboolean _tmp124_;
            _tmp124_ = vala_method_get_closure (m);
            if (!_tmp124_) {
                  gint type_param_index;
                  type_param_index = 0;
                  {
                        ValaList* _tmp125_ = NULL;
                        ValaList* _type_param_list;
                        gint _tmp126_;
                        gint _type_param_size;
                        gint _type_param_index;
                        _tmp125_ = vala_method_get_type_parameters (m);
                        _type_param_list = _tmp125_;
                        _tmp126_ = vala_collection_get_size ((ValaCollection*) _type_param_list);
                        _type_param_size = _tmp126_;
                        _type_param_index = -1;
                        while (TRUE) {
                              gpointer _tmp127_ = NULL;
                              ValaTypeParameter* type_param;
                              gint _tmp128_;
                              const gchar* _tmp129_ = NULL;
                              gchar* _tmp130_ = NULL;
                              gchar* _tmp131_;
                              gchar* _tmp132_ = NULL;
                              gchar* _tmp133_;
                              ValaCCodeParameter* _tmp134_ = NULL;
                              ValaCCodeParameter* _tmp135_;
                              gint _tmp136_;
                              const gchar* _tmp137_ = NULL;
                              gchar* _tmp138_ = NULL;
                              gchar* _tmp139_;
                              gchar* _tmp140_ = NULL;
                              gchar* _tmp141_;
                              ValaCCodeParameter* _tmp142_ = NULL;
                              ValaCCodeParameter* _tmp143_;
                              gint _tmp144_;
                              const gchar* _tmp145_ = NULL;
                              gchar* _tmp146_ = NULL;
                              gchar* _tmp147_;
                              gchar* _tmp148_ = NULL;
                              gchar* _tmp149_;
                              ValaCCodeParameter* _tmp150_ = NULL;
                              ValaCCodeParameter* _tmp151_;
                              _type_param_index = _type_param_index + 1;
                              if (!(_type_param_index < _type_param_size)) {
                                    break;
                              }
                              _tmp127_ = vala_list_get (_type_param_list, _type_param_index);
                              type_param = (ValaTypeParameter*) _tmp127_;
                              _tmp128_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE);
                              _tmp129_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                              _tmp130_ = g_utf8_strdown (_tmp129_, (gssize) (-1));
                              _tmp131_ = _tmp130_;
                              _tmp132_ = g_strdup_printf ("%s_type", _tmp131_);
                              _tmp133_ = _tmp132_;
                              _tmp134_ = vala_ccode_parameter_new (_tmp133_, "GType");
                              _tmp135_ = _tmp134_;
                              vala_map_set (cparam_map, GINT_TO_POINTER (_tmp128_), _tmp135_);
                              _vala_ccode_node_unref0 (_tmp135_);
                              _g_free0 (_tmp133_);
                              _g_free0 (_tmp131_);
                              _tmp136_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE);
                              _tmp137_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                              _tmp138_ = g_utf8_strdown (_tmp137_, (gssize) (-1));
                              _tmp139_ = _tmp138_;
                              _tmp140_ = g_strdup_printf ("%s_dup_func", _tmp139_);
                              _tmp141_ = _tmp140_;
                              _tmp142_ = vala_ccode_parameter_new (_tmp141_, "GBoxedCopyFunc");
                              _tmp143_ = _tmp142_;
                              vala_map_set (cparam_map, GINT_TO_POINTER (_tmp136_), _tmp143_);
                              _vala_ccode_node_unref0 (_tmp143_);
                              _g_free0 (_tmp141_);
                              _g_free0 (_tmp139_);
                              _tmp144_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE);
                              _tmp145_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                              _tmp146_ = g_utf8_strdown (_tmp145_, (gssize) (-1));
                              _tmp147_ = _tmp146_;
                              _tmp148_ = g_strdup_printf ("%s_destroy_func", _tmp147_);
                              _tmp149_ = _tmp148_;
                              _tmp150_ = vala_ccode_parameter_new (_tmp149_, "GDestroyNotify");
                              _tmp151_ = _tmp150_;
                              vala_map_set (cparam_map, GINT_TO_POINTER (_tmp144_), _tmp151_);
                              _vala_ccode_node_unref0 (_tmp151_);
                              _g_free0 (_tmp149_);
                              _g_free0 (_tmp147_);
                              if (carg_map != NULL) {
                                    gint _tmp152_;
                                    const gchar* _tmp153_ = NULL;
                                    gchar* _tmp154_ = NULL;
                                    gchar* _tmp155_;
                                    gchar* _tmp156_ = NULL;
                                    gchar* _tmp157_;
                                    ValaCCodeIdentifier* _tmp158_ = NULL;
                                    ValaCCodeIdentifier* _tmp159_;
                                    gint _tmp160_;
                                    const gchar* _tmp161_ = NULL;
                                    gchar* _tmp162_ = NULL;
                                    gchar* _tmp163_;
                                    gchar* _tmp164_ = NULL;
                                    gchar* _tmp165_;
                                    ValaCCodeIdentifier* _tmp166_ = NULL;
                                    ValaCCodeIdentifier* _tmp167_;
                                    gint _tmp168_;
                                    const gchar* _tmp169_ = NULL;
                                    gchar* _tmp170_ = NULL;
                                    gchar* _tmp171_;
                                    gchar* _tmp172_ = NULL;
                                    gchar* _tmp173_;
                                    ValaCCodeIdentifier* _tmp174_ = NULL;
                                    ValaCCodeIdentifier* _tmp175_;
                                    _tmp152_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE);
                                    _tmp153_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                    _tmp154_ = g_utf8_strdown (_tmp153_, (gssize) (-1));
                                    _tmp155_ = _tmp154_;
                                    _tmp156_ = g_strdup_printf ("%s_type", _tmp155_);
                                    _tmp157_ = _tmp156_;
                                    _tmp158_ = vala_ccode_identifier_new (_tmp157_);
                                    _tmp159_ = _tmp158_;
                                    vala_map_set (carg_map, GINT_TO_POINTER (_tmp152_), (ValaCCodeExpression*) _tmp159_);
                                    _vala_ccode_node_unref0 (_tmp159_);
                                    _g_free0 (_tmp157_);
                                    _g_free0 (_tmp155_);
                                    _tmp160_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE);
                                    _tmp161_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                    _tmp162_ = g_utf8_strdown (_tmp161_, (gssize) (-1));
                                    _tmp163_ = _tmp162_;
                                    _tmp164_ = g_strdup_printf ("%s_dup_func", _tmp163_);
                                    _tmp165_ = _tmp164_;
                                    _tmp166_ = vala_ccode_identifier_new (_tmp165_);
                                    _tmp167_ = _tmp166_;
                                    vala_map_set (carg_map, GINT_TO_POINTER (_tmp160_), (ValaCCodeExpression*) _tmp167_);
                                    _vala_ccode_node_unref0 (_tmp167_);
                                    _g_free0 (_tmp165_);
                                    _g_free0 (_tmp163_);
                                    _tmp168_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE);
                                    _tmp169_ = vala_symbol_get_name ((ValaSymbol*) type_param);
                                    _tmp170_ = g_utf8_strdown (_tmp169_, (gssize) (-1));
                                    _tmp171_ = _tmp170_;
                                    _tmp172_ = g_strdup_printf ("%s_destroy_func", _tmp171_);
                                    _tmp173_ = _tmp172_;
                                    _tmp174_ = vala_ccode_identifier_new (_tmp173_);
                                    _tmp175_ = _tmp174_;
                                    vala_map_set (carg_map, GINT_TO_POINTER (_tmp168_), (ValaCCodeExpression*) _tmp175_);
                                    _vala_ccode_node_unref0 (_tmp175_);
                                    _g_free0 (_tmp173_);
                                    _g_free0 (_tmp171_);
                              }
                              type_param_index++;
                              _vala_code_node_unref0 (type_param);
                        }
                        _vala_iterable_unref0 (_type_param_list);
                  }
            }
      }
      {
            ValaList* _tmp176_ = NULL;
            ValaList* _param_list;
            gint _tmp177_;
            gint _param_size;
            gint _param_index;
            _tmp176_ = vala_method_get_parameters (m);
            _param_list = _tmp176_;
            _tmp177_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp177_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp178_ = NULL;
                  ValaParameter* param;
                  ValaParameterDirection _tmp179_;
                  ValaCCodeParameter* _tmp180_ = NULL;
                  ValaCCodeParameter* _tmp181_;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp178_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp178_;
                  _tmp179_ = vala_parameter_get_direction (param);
                  if (_tmp179_ != 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;
                        }
                  }
                  _tmp180_ = vala_ccode_method_module_generate_parameter (self, param, decl_space, cparam_map, carg_map);
                  _tmp181_ = _tmp180_;
                  _vala_ccode_node_unref0 (_tmp181_);
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      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) {
            gpointer _tmp190_ = NULL;
            ValaCCodeParameter* _tmp191_;
            min_pos = -1;
            {
                  ValaSet* _tmp182_ = NULL;
                  ValaSet* _tmp183_;
                  ValaIterator* _tmp184_ = NULL;
                  ValaIterator* _tmp185_;
                  ValaIterator* _pos_it;
                  _tmp182_ = vala_map_get_keys (cparam_map);
                  _tmp183_ = _tmp182_;
                  _tmp184_ = vala_iterable_iterator ((ValaIterable*) _tmp183_);
                  _tmp185_ = _tmp184_;
                  _vala_iterable_unref0 (_tmp183_);
                  _pos_it = _tmp185_;
                  while (TRUE) {
                        gboolean _tmp186_;
                        gpointer _tmp187_ = NULL;
                        gint pos;
                        gboolean _tmp188_ = FALSE;
                        _tmp186_ = vala_iterator_next (_pos_it);
                        if (!_tmp186_) {
                              break;
                        }
                        _tmp187_ = vala_iterator_get (_pos_it);
                        pos = GPOINTER_TO_INT (_tmp187_);
                        if (pos > last_pos) {
                              gboolean _tmp189_ = FALSE;
                              if (min_pos == (-1)) {
                                    _tmp189_ = TRUE;
                              } else {
                                    _tmp189_ = pos < min_pos;
                              }
                              _tmp188_ = _tmp189_;
                        } else {
                              _tmp188_ = FALSE;
                        }
                        if (_tmp188_) {
                              min_pos = pos;
                        }
                  }
                  _vala_iterator_unref0 (_pos_it);
            }
            if (min_pos == (-1)) {
                  break;
            }
            _tmp190_ = vala_map_get (cparam_map, GINT_TO_POINTER (min_pos));
            _tmp191_ = (ValaCCodeParameter*) _tmp190_;
            vala_ccode_function_add_parameter (func, _tmp191_);
            _vala_ccode_node_unref0 (_tmp191_);
            if (vdeclarator != NULL) {
                  gpointer _tmp192_ = NULL;
                  ValaCCodeParameter* _tmp193_;
                  _tmp192_ = vala_map_get (cparam_map, GINT_TO_POINTER (min_pos));
                  _tmp193_ = (ValaCCodeParameter*) _tmp192_;
                  vala_ccode_function_declarator_add_parameter (vdeclarator, _tmp193_);
                  _vala_ccode_node_unref0 (_tmp193_);
            }
            if (vcall != NULL) {
                  gpointer _tmp194_ = NULL;
                  ValaCCodeExpression* arg;
                  _tmp194_ = vala_map_get (carg_map, GINT_TO_POINTER (min_pos));
                  arg = (ValaCCodeExpression*) _tmp194_;
                  if (arg != NULL) {
                        vala_ccode_function_call_add_argument (vcall, arg);
                  }
                  _vala_ccode_node_unref0 (arg);
            }
            last_pos = min_pos;
      }
}


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


static gchar* string_substring (const gchar* self, glong offset, glong len) {
      gchar* result = NULL;
      glong string_length = 0L;
      gboolean _tmp0_ = FALSE;
      gchar* _tmp3_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (offset >= 0) {
            _tmp0_ = len >= 0;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            glong _tmp1_;
            _tmp1_ = string_strnlen ((gchar*) self, offset + len);
            string_length = _tmp1_;
      } else {
            gint _tmp2_;
            _tmp2_ = strlen (self);
            string_length = (glong) _tmp2_;
      }
      if (offset < 0) {
            offset = string_length + offset;
            g_return_val_if_fail (offset >= 0, NULL);
      } else {
            g_return_val_if_fail (offset <= string_length, NULL);
      }
      if (len < 0) {
            len = string_length - offset;
      }
      g_return_val_if_fail ((offset + len) <= string_length, NULL);
      _tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
      result = _tmp3_;
      return result;
}


void vala_ccode_method_module_generate_vfunc (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaMap* cparam_map, ValaMap* carg_map, const gchar* suffix, gint direction) {
      ValaCCodeBaseModuleEmitContext* _tmp0_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* cname;
      gboolean _tmp3_ = FALSE;
      gchar* _tmp8_;
      gchar* _tmp9_;
      ValaCCodeFunction* _tmp10_ = NULL;
      ValaCCodeFunction* _tmp11_;
      ValaCCodeFunction* vfunc;
      ValaCCodeFunctionCall* vcast;
      ValaSymbol* _tmp12_ = NULL;
      ValaCCodeIdentifier* _tmp31_ = NULL;
      ValaCCodeIdentifier* _tmp32_;
      const gchar* _tmp33_ = NULL;
      gchar* _tmp34_;
      gboolean _tmp35_ = FALSE;
      gchar* _tmp40_;
      gchar* _tmp41_;
      ValaCCodeMemberAccess* _tmp42_ = NULL;
      ValaCCodeMemberAccess* _tmp43_;
      ValaCCodeFunctionCall* _tmp44_ = NULL;
      ValaCCodeFunctionCall* _tmp45_;
      ValaCCodeFunctionCall* vcall;
      gdouble _tmp46_;
      gint _tmp47_;
      ValaCCodeIdentifier* _tmp48_ = NULL;
      ValaCCodeIdentifier* _tmp49_;
      gboolean _tmp53_ = FALSE;
      ValaList* _tmp71_ = NULL;
      ValaList* _tmp72_;
      gint _tmp73_;
      gboolean _tmp74_;
      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);
      _tmp0_ = vala_ccode_base_module_emit_context_new (NULL);
      _tmp1_ = _tmp0_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp1_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp1_);
      _tmp2_ = vala_method_get_cname (m);
      cname = _tmp2_;
      if (g_strcmp0 (suffix, "_finish") == 0) {
            gboolean _tmp4_;
            _tmp4_ = g_str_has_suffix (cname, "_async");
            _tmp3_ = _tmp4_;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            gint _tmp5_;
            gint _tmp6_;
            gchar* _tmp7_ = NULL;
            _tmp5_ = strlen (cname);
            _tmp6_ = strlen ("_async");
            _tmp7_ = string_substring (cname, (glong) 0, (glong) (_tmp5_ - _tmp6_));
            _g_free0 (cname);
            cname = _tmp7_;
      }
      _tmp8_ = g_strconcat (cname, suffix, NULL);
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_function_new (_tmp9_, "void");
      _tmp11_ = _tmp10_;
      _g_free0 (_tmp9_);
      vfunc = _tmp11_;
      vcast = NULL;
      _tmp12_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
      if (VALA_IS_INTERFACE (_tmp12_)) {
            ValaSymbol* _tmp13_ = NULL;
            ValaInterface* _tmp14_;
            ValaInterface* iface;
            gchar* _tmp15_ = NULL;
            gchar* _tmp16_;
            gchar* _tmp17_ = NULL;
            gchar* _tmp18_;
            ValaCCodeIdentifier* _tmp19_ = NULL;
            ValaCCodeIdentifier* _tmp20_;
            ValaCCodeFunctionCall* _tmp21_ = NULL;
            _tmp13_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
            _tmp14_ = _vala_code_node_ref0 (VALA_INTERFACE (_tmp13_));
            iface = _tmp14_;
            _tmp15_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) iface, NULL);
            _tmp16_ = _tmp15_;
            _tmp17_ = g_strdup_printf ("%s_GET_INTERFACE", _tmp16_);
            _tmp18_ = _tmp17_;
            _tmp19_ = vala_ccode_identifier_new (_tmp18_);
            _tmp20_ = _tmp19_;
            _tmp21_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp20_);
            _vala_ccode_node_unref0 (vcast);
            vcast = _tmp21_;
            _vala_ccode_node_unref0 (_tmp20_);
            _g_free0 (_tmp18_);
            _g_free0 (_tmp16_);
            _vala_code_node_unref0 (iface);
      } else {
            ValaSymbol* _tmp22_ = NULL;
            ValaClass* _tmp23_;
            ValaClass* cl;
            gchar* _tmp24_ = NULL;
            gchar* _tmp25_;
            gchar* _tmp26_ = NULL;
            gchar* _tmp27_;
            ValaCCodeIdentifier* _tmp28_ = NULL;
            ValaCCodeIdentifier* _tmp29_;
            ValaCCodeFunctionCall* _tmp30_ = NULL;
            _tmp22_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
            _tmp23_ = _vala_code_node_ref0 (VALA_CLASS (_tmp22_));
            cl = _tmp23_;
            _tmp24_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) cl, NULL);
            _tmp25_ = _tmp24_;
            _tmp26_ = g_strdup_printf ("%s_GET_CLASS", _tmp25_);
            _tmp27_ = _tmp26_;
            _tmp28_ = vala_ccode_identifier_new (_tmp27_);
            _tmp29_ = _tmp28_;
            _tmp30_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp29_);
            _vala_ccode_node_unref0 (vcast);
            vcast = _tmp30_;
            _vala_ccode_node_unref0 (_tmp29_);
            _g_free0 (_tmp27_);
            _g_free0 (_tmp25_);
            _vala_code_node_unref0 (cl);
      }
      _tmp31_ = vala_ccode_identifier_new ("self");
      _tmp32_ = _tmp31_;
      vala_ccode_function_call_add_argument (vcast, (ValaCCodeExpression*) _tmp32_);
      _vala_ccode_node_unref0 (_tmp32_);
      _tmp33_ = vala_method_get_vfunc_name (m);
      _tmp34_ = g_strdup (_tmp33_);
      _g_free0 (cname);
      cname = _tmp34_;
      if (g_strcmp0 (suffix, "_finish") == 0) {
            gboolean _tmp36_;
            _tmp36_ = g_str_has_suffix (cname, "_async");
            _tmp35_ = _tmp36_;
      } else {
            _tmp35_ = FALSE;
      }
      if (_tmp35_) {
            gint _tmp37_;
            gint _tmp38_;
            gchar* _tmp39_ = NULL;
            _tmp37_ = strlen (cname);
            _tmp38_ = strlen ("_async");
            _tmp39_ = string_substring (cname, (glong) 0, (glong) (_tmp37_ - _tmp38_));
            _g_free0 (cname);
            cname = _tmp39_;
      }
      _tmp40_ = g_strconcat (cname, suffix, NULL);
      _tmp41_ = _tmp40_;
      _tmp42_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp41_);
      _tmp43_ = _tmp42_;
      _tmp44_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp43_);
      _tmp45_ = _tmp44_;
      _vala_ccode_node_unref0 (_tmp43_);
      _g_free0 (_tmp41_);
      vcall = _tmp45_;
      _tmp46_ = vala_method_get_cinstance_parameter_position (m);
      _tmp47_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp46_, FALSE);
      _tmp48_ = vala_ccode_identifier_new ("self");
      _tmp49_ = _tmp48_;
      vala_map_set (carg_map, GINT_TO_POINTER (_tmp47_), (ValaCCodeExpression*) _tmp49_);
      _vala_ccode_node_unref0 (_tmp49_);
      vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->cfile, cparam_map, vfunc, NULL, carg_map, vcall, direction);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, vfunc);
      {
            ValaList* _tmp50_ = NULL;
            ValaList* _precondition_list;
            gint _tmp51_;
            gint _precondition_size;
            gint _precondition_index;
            _tmp50_ = vala_method_get_preconditions (m);
            _precondition_list = _tmp50_;
            _tmp51_ = vala_collection_get_size ((ValaCollection*) _precondition_list);
            _precondition_size = _tmp51_;
            _precondition_index = -1;
            while (TRUE) {
                  gpointer _tmp52_ = NULL;
                  ValaExpression* precondition;
                  _precondition_index = _precondition_index + 1;
                  if (!(_precondition_index < _precondition_size)) {
                        break;
                  }
                  _tmp52_ = vala_list_get (_precondition_list, _precondition_index);
                  precondition = (ValaExpression*) _tmp52_;
                  vala_ccode_method_module_create_precondition_statement (self, (ValaCodeNode*) m, return_type, precondition);
                  _vala_code_node_unref0 (precondition);
            }
            _vala_iterable_unref0 (_precondition_list);
      }
      if (VALA_IS_VOID_TYPE (return_type)) {
            _tmp53_ = TRUE;
      } else {
            gboolean _tmp54_;
            _tmp54_ = vala_data_type_is_real_non_null_struct_type (return_type);
            _tmp53_ = _tmp54_;
      }
      if (_tmp53_) {
            ValaCCodeFunction* _tmp55_ = NULL;
            _tmp55_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_expression (_tmp55_, (ValaCCodeExpression*) vcall);
      } else {
            ValaList* _tmp56_ = NULL;
            ValaList* _tmp57_;
            gint _tmp58_;
            gboolean _tmp59_;
            _tmp56_ = vala_method_get_postconditions (m);
            _tmp57_ = _tmp56_;
            _tmp58_ = vala_collection_get_size ((ValaCollection*) _tmp57_);
            _tmp59_ = _tmp58_ == 0;
            _vala_iterable_unref0 (_tmp57_);
            if (_tmp59_) {
                  ValaCCodeFunction* _tmp60_ = NULL;
                  _tmp60_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  vala_ccode_function_add_return (_tmp60_, (ValaCCodeExpression*) vcall);
            } else {
                  ValaCCodeFunction* _tmp61_ = NULL;
                  gchar* _tmp62_ = NULL;
                  gchar* _tmp63_;
                  gchar* _tmp64_ = NULL;
                  gchar* _tmp65_;
                  ValaCCodeVariableDeclarator* _tmp66_ = NULL;
                  ValaCCodeVariableDeclarator* _tmp67_;
                  ValaCCodeFunction* _tmp68_ = NULL;
                  ValaCCodeIdentifier* _tmp69_ = NULL;
                  ValaCCodeIdentifier* _tmp70_;
                  _tmp61_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp62_ = vala_data_type_get_cname (return_type);
                  _tmp63_ = _tmp62_;
                  _tmp64_ = vala_ccode_method_module_get_creturn_type (self, m, _tmp63_);
                  _tmp65_ = _tmp64_;
                  _tmp66_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
                  _tmp67_ = _tmp66_;
                  vala_ccode_function_add_declaration (_tmp61_, _tmp65_, (ValaCCodeDeclarator*) _tmp67_, 0);
                  _vala_ccode_node_unref0 (_tmp67_);
                  _g_free0 (_tmp65_);
                  _g_free0 (_tmp63_);
                  _tmp68_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp69_ = vala_ccode_identifier_new ("result");
                  _tmp70_ = _tmp69_;
                  vala_ccode_function_add_assignment (_tmp68_, (ValaCCodeExpression*) _tmp70_, (ValaCCodeExpression*) vcall);
                  _vala_ccode_node_unref0 (_tmp70_);
            }
      }
      _tmp71_ = vala_method_get_postconditions (m);
      _tmp72_ = _tmp71_;
      _tmp73_ = vala_collection_get_size ((ValaCollection*) _tmp72_);
      _tmp74_ = _tmp73_ > 0;
      _vala_iterable_unref0 (_tmp72_);
      if (_tmp74_) {
            {
                  ValaList* _tmp75_ = NULL;
                  ValaList* _postcondition_list;
                  gint _tmp76_;
                  gint _postcondition_size;
                  gint _postcondition_index;
                  _tmp75_ = vala_method_get_postconditions (m);
                  _postcondition_list = _tmp75_;
                  _tmp76_ = vala_collection_get_size ((ValaCollection*) _postcondition_list);
                  _postcondition_size = _tmp76_;
                  _postcondition_index = -1;
                  while (TRUE) {
                        gpointer _tmp77_ = NULL;
                        ValaExpression* postcondition;
                        _postcondition_index = _postcondition_index + 1;
                        if (!(_postcondition_index < _postcondition_size)) {
                              break;
                        }
                        _tmp77_ = vala_list_get (_postcondition_list, _postcondition_index);
                        postcondition = (ValaExpression*) _tmp77_;
                        vala_ccode_base_module_create_postcondition_statement ((ValaCCodeBaseModule*) self, postcondition);
                        _vala_code_node_unref0 (postcondition);
                  }
                  _vala_iterable_unref0 (_postcondition_list);
            }
            if (!VALA_IS_VOID_TYPE (return_type)) {
                  ValaCCodeFunction* _tmp78_ = NULL;
                  ValaCCodeIdentifier* _tmp79_ = NULL;
                  ValaCCodeIdentifier* _tmp80_;
                  _tmp78_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp79_ = vala_ccode_identifier_new ("result");
                  _tmp80_ = _tmp79_;
                  vala_ccode_function_add_return (_tmp78_, (ValaCCodeExpression*) _tmp80_);
                  _vala_ccode_node_unref0 (_tmp80_);
            }
      }
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, vfunc);
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      _vala_ccode_node_unref0 (vcall);
      _vala_ccode_node_unref0 (vcast);
      _vala_ccode_node_unref0 (vfunc);
      _g_free0 (cname);
}


static void vala_ccode_method_module_create_method_type_check_statement (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaTypeSymbol* t, gboolean non_null, const gchar* var_name) {
      gboolean _tmp0_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != NULL);
      g_return_if_fail (return_type != NULL);
      g_return_if_fail (t != NULL);
      g_return_if_fail (var_name != NULL);
      _tmp0_ = vala_method_get_coroutine (m);
      if (!_tmp0_) {
            vala_ccode_base_module_create_type_check_statement ((ValaCCodeBaseModule*) self, (ValaCodeNode*) m, return_type, t, non_null, var_name);
      }
}


static void vala_ccode_method_module_create_precondition_statement (ValaCCodeMethodModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaExpression* precondition) {
      ValaCCodeFunctionCall* _tmp0_ = NULL;
      ValaCCodeFunctionCall* ccheck;
      ValaCCodeExpression* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp2_;
      ValaCCodeFunction* _tmp18_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (method_node != NULL);
      g_return_if_fail (ret_type != NULL);
      g_return_if_fail (precondition != NULL);
      _tmp0_ = vala_ccode_function_call_new (NULL);
      ccheck = _tmp0_;
      vala_code_node_emit ((ValaCodeNode*) precondition, (ValaCodeGenerator*) self);
      _tmp1_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, precondition);
      _tmp2_ = _tmp1_;
      vala_ccode_function_call_add_argument (ccheck, _tmp2_);
      _vala_ccode_node_unref0 (_tmp2_);
      if (VALA_IS_CREATION_METHOD (method_node)) {
            ValaCCodeIdentifier* _tmp3_ = NULL;
            ValaCCodeIdentifier* _tmp4_;
            ValaCCodeConstant* _tmp5_ = NULL;
            ValaCCodeConstant* _tmp6_;
            _tmp3_ = vala_ccode_identifier_new ("g_return_val_if_fail");
            _tmp4_ = _tmp3_;
            vala_ccode_function_call_set_call (ccheck, (ValaCCodeExpression*) _tmp4_);
            _vala_ccode_node_unref0 (_tmp4_);
            _tmp5_ = vala_ccode_constant_new ("NULL");
            _tmp6_ = _tmp5_;
            vala_ccode_function_call_add_argument (ccheck, (ValaCCodeExpression*) _tmp6_);
            _vala_ccode_node_unref0 (_tmp6_);
      } else {
            gboolean _tmp7_ = FALSE;
            if (VALA_IS_METHOD (method_node)) {
                  gboolean _tmp8_;
                  _tmp8_ = vala_method_get_coroutine (VALA_METHOD (method_node));
                  _tmp7_ = _tmp8_;
            } else {
                  _tmp7_ = FALSE;
            }
            if (_tmp7_) {
                  ValaCCodeIdentifier* _tmp9_ = NULL;
                  ValaCCodeIdentifier* _tmp10_;
                  ValaCCodeConstant* _tmp11_ = NULL;
                  ValaCCodeConstant* _tmp12_;
                  _tmp9_ = vala_ccode_identifier_new ("g_return_val_if_fail");
                  _tmp10_ = _tmp9_;
                  vala_ccode_function_call_set_call (ccheck, (ValaCCodeExpression*) _tmp10_);
                  _vala_ccode_node_unref0 (_tmp10_);
                  _tmp11_ = vala_ccode_constant_new ("FALSE");
                  _tmp12_ = _tmp11_;
                  vala_ccode_function_call_add_argument (ccheck, (ValaCCodeExpression*) _tmp12_);
                  _vala_ccode_node_unref0 (_tmp12_);
            } else {
                  if (VALA_IS_VOID_TYPE (ret_type)) {
                        ValaCCodeIdentifier* _tmp13_ = NULL;
                        ValaCCodeIdentifier* _tmp14_;
                        _tmp13_ = vala_ccode_identifier_new ("g_return_if_fail");
                        _tmp14_ = _tmp13_;
                        vala_ccode_function_call_set_call (ccheck, (ValaCCodeExpression*) _tmp14_);
                        _vala_ccode_node_unref0 (_tmp14_);
                  } else {
                        ValaCCodeIdentifier* _tmp15_ = NULL;
                        ValaCCodeIdentifier* _tmp16_;
                        ValaCCodeExpression* _tmp17_ = NULL;
                        ValaCCodeExpression* cdefault;
                        _tmp15_ = vala_ccode_identifier_new ("g_return_val_if_fail");
                        _tmp16_ = _tmp15_;
                        vala_ccode_function_call_set_call (ccheck, (ValaCCodeExpression*) _tmp16_);
                        _vala_ccode_node_unref0 (_tmp16_);
                        _tmp17_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, ret_type, FALSE);
                        cdefault = _tmp17_;
                        if (cdefault != NULL) {
                              vala_ccode_function_call_add_argument (ccheck, cdefault);
                        } else {
                              _vala_ccode_node_unref0 (cdefault);
                              _vala_ccode_node_unref0 (ccheck);
                              return;
                        }
                        _vala_ccode_node_unref0 (cdefault);
                  }
            }
      }
      _tmp18_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp18_, (ValaCCodeExpression*) ccheck);
      _vala_ccode_node_unref0 (ccheck);
}


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) {
            ValaSymbol* _tmp1_ = NULL;
            if (!(sym != NULL)) {
                  break;
            }
            if (VALA_IS_TYPESYMBOL (sym)) {
                  ValaTypeSymbol* _tmp0_;
                  _tmp0_ = _vala_code_node_ref0 (VALA_TYPESYMBOL (sym));
                  result = _tmp0_;
                  return result;
            }
            _tmp1_ = vala_symbol_get_parent_symbol (sym);
            sym = _tmp1_;
      }
      result = NULL;
      return result;
}


static void vala_ccode_method_module_real_visit_creation_method (ValaCodeVisitor* base, ValaCreationMethod* m) {
      ValaCCodeMethodModule * self;
      gboolean _tmp0_;
      gboolean visible;
      ValaSourceFileType _tmp1_;
      gboolean _tmp2_ = FALSE;
      gboolean _tmp3_ = FALSE;
      ValaTypeSymbol* _tmp4_ = NULL;
      self = (ValaCCodeMethodModule*) base;
      g_return_if_fail (m != NULL);
      _tmp0_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
      visible = !_tmp0_;
      vala_code_visitor_visit_method ((ValaCodeVisitor*) self, (ValaMethod*) m);
      _tmp1_ = vala_symbol_get_source_type ((ValaSymbol*) m);
      if (_tmp1_ == VALA_SOURCE_FILE_TYPE_FAST) {
            return;
      }
      _tmp4_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
      if (VALA_IS_CLASS (_tmp4_)) {
            ValaClass* _tmp5_ = NULL;
            gboolean _tmp6_;
            _tmp5_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
            _tmp6_ = vala_class_get_is_compact (_tmp5_);
            _tmp3_ = !_tmp6_;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            ValaClass* _tmp7_ = NULL;
            gboolean _tmp8_;
            _tmp7_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
            _tmp8_ = vala_class_get_is_abstract (_tmp7_);
            _tmp2_ = !_tmp8_;
      } else {
            _tmp2_ = FALSE;
      }
      if (_tmp2_) {
            gchar* _tmp9_ = NULL;
            gchar* _tmp10_;
            ValaCCodeFunction* _tmp11_ = NULL;
            ValaCCodeFunction* _tmp12_;
            ValaCCodeFunction* vfunc;
            ValaHashMap* _tmp13_ = NULL;
            ValaHashMap* cparam_map;
            ValaHashMap* _tmp14_ = NULL;
            ValaHashMap* carg_map;
            ValaCCodeBlock* _tmp15_ = NULL;
            ValaCCodeBlock* vblock;
            gchar* _tmp16_ = NULL;
            gchar* _tmp17_;
            ValaCCodeIdentifier* _tmp18_ = NULL;
            ValaCCodeIdentifier* _tmp19_;
            ValaCCodeFunctionCall* _tmp20_ = NULL;
            ValaCCodeFunctionCall* _tmp21_;
            ValaCCodeFunctionCall* vcall;
            ValaClass* _tmp22_ = NULL;
            gchar* _tmp23_ = NULL;
            gchar* _tmp24_;
            ValaCCodeIdentifier* _tmp25_ = NULL;
            ValaCCodeIdentifier* _tmp26_;
            ValaCCodeReturnStatement* _tmp27_ = NULL;
            ValaCCodeStatement* cstmt;
            ValaCCodeLineDirective* _tmp28_ = NULL;
            _tmp9_ = vala_method_get_cname ((ValaMethod*) m);
            _tmp10_ = _tmp9_;
            _tmp11_ = vala_ccode_function_new (_tmp10_, "void");
            _tmp12_ = _tmp11_;
            _g_free0 (_tmp10_);
            vfunc = _tmp12_;
            _tmp13_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
            cparam_map = _tmp13_;
            _tmp14_ = 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);
            carg_map = _tmp14_;
            _tmp15_ = vala_ccode_block_new ();
            vblock = _tmp15_;
            _tmp16_ = vala_method_get_real_cname ((ValaMethod*) m);
            _tmp17_ = _tmp16_;
            _tmp18_ = vala_ccode_identifier_new (_tmp17_);
            _tmp19_ = _tmp18_;
            _tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp19_);
            _tmp21_ = _tmp20_;
            _vala_ccode_node_unref0 (_tmp19_);
            _g_free0 (_tmp17_);
            vcall = _tmp21_;
            _tmp22_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
            _tmp23_ = vala_typesymbol_get_type_id ((ValaTypeSymbol*) _tmp22_);
            _tmp24_ = _tmp23_;
            _tmp25_ = vala_ccode_identifier_new (_tmp24_);
            _tmp26_ = _tmp25_;
            vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) _tmp26_);
            _vala_ccode_node_unref0 (_tmp26_);
            _g_free0 (_tmp24_);
            vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, (ValaMethod*) m, ((ValaCCodeBaseModule*) self)->cfile, (ValaMap*) cparam_map, vfunc, NULL, (ValaMap*) carg_map, vcall, 3);
            _tmp27_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) vcall);
            cstmt = (ValaCCodeStatement*) _tmp27_;
            _tmp28_ = vala_ccode_node_get_line ((ValaCCodeNode*) vfunc);
            vala_ccode_node_set_line ((ValaCCodeNode*) cstmt, _tmp28_);
            vala_ccode_block_add_statement (vblock, (ValaCCodeNode*) cstmt);
            if (!visible) {
                  ValaCCodeModifiers _tmp29_;
                  _tmp29_ = vala_ccode_function_get_modifiers (vfunc);
                  vala_ccode_function_set_modifiers (vfunc, _tmp29_ | VALA_CCODE_MODIFIERS_STATIC);
            }
            vala_ccode_function_set_block (vfunc, vblock);
            vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, vfunc);
            _vala_ccode_node_unref0 (cstmt);
            _vala_ccode_node_unref0 (vcall);
            _vala_ccode_node_unref0 (vblock);
            _vala_map_unref0 (carg_map);
            _vala_map_unref0 (cparam_map);
            _vala_ccode_node_unref0 (vfunc);
      }
}


ValaCCodeMethodModule* vala_ccode_method_module_construct (GType object_type) {
      ValaCCodeMethodModule* self = NULL;
      self = (ValaCCodeMethodModule*) vala_ccode_struct_module_construct (object_type);
      return self;
}


static void vala_ccode_method_module_class_init (ValaCCodeMethodModuleClass * klass) {
      vala_ccode_method_module_parent_class = g_type_class_peek_parent (klass);
      VALA_CCODE_BASE_MODULE_CLASS (klass)->method_has_wrapper = vala_ccode_method_module_real_method_has_wrapper;
      VALA_CCODE_BASE_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_CODE_VISITOR_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_CODE_VISITOR_CLASS (klass)->visit_creation_method = vala_ccode_method_module_real_visit_creation_method;
}


static void vala_ccode_method_module_instance_init (ValaCCodeMethodModule * self) {
}


/**
 * The link between a method and generated code.
 */
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, G_TYPE_FLAG_ABSTRACT);
            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;
}




Generated by  Doxygen 1.6.0   Back to index