Logo Search packages:      
Sourcecode: vala-0.14 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_TYPE_GLIB_VALUE (vala_glib_value_get_type ())
#define VALA_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValue))
#define VALA_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))
#define VALA_IS_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GLIB_VALUE))
#define VALA_IS_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GLIB_VALUE))
#define VALA_GLIB_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))

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