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

valagasyncmodule.c

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

/* valagasyncmodule.vala
 *
 * Copyright (C) 2008-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>
 */

#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_TYPE_CCODE_CONTROL_FLOW_MODULE (vala_ccode_control_flow_module_get_type ())
#define VALA_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModule))
#define VALA_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_CCODE_CONTROL_FLOW_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#define VALA_TYPE_GASYNC_MODULE (vala_gasync_module_get_type ())
#define VALA_GASYNC_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GASYNC_MODULE, ValaGAsyncModule))
#define VALA_GASYNC_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GASYNC_MODULE, ValaGAsyncModuleClass))
#define VALA_IS_GASYNC_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GASYNC_MODULE))
#define VALA_IS_GASYNC_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GASYNC_MODULE))
#define VALA_GASYNC_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GASYNC_MODULE, ValaGAsyncModuleClass))

typedef struct _ValaGAsyncModule ValaGAsyncModule;
typedef struct _ValaGAsyncModuleClass ValaGAsyncModuleClass;
typedef struct _ValaGAsyncModulePrivate ValaGAsyncModulePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_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_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))

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

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

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

struct _ValaCCodeStructModuleClass {
      ValaCCodeBaseModuleClass parent_class;
};

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

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

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

struct _ValaCCodeControlFlowModuleClass {
      ValaCCodeMethodModuleClass parent_class;
};

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

struct _ValaCCodeMemberAccessModuleClass {
      ValaCCodeControlFlowModuleClass parent_class;
};

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

struct _ValaCCodeAssignmentModuleClass {
      ValaCCodeMemberAccessModuleClass parent_class;
};

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

struct _ValaCCodeMethodCallModuleClass {
      ValaCCodeAssignmentModuleClass parent_class;
};

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

struct _ValaCCodeArrayModuleClass {
      ValaCCodeMethodCallModuleClass parent_class;
};

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

struct _ValaCCodeDelegateModuleClass {
      ValaCCodeArrayModuleClass parent_class;
};

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

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

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

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

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

struct _ValaGObjectModuleClass {
      ValaGTypeModuleClass parent_class;
};

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

struct _ValaGSignalModuleClass {
      ValaGObjectModuleClass parent_class;
      ValaCCodeExpression* (*get_dbus_g_type) (ValaGSignalModule* self, ValaDataType* data_type);
};

struct _ValaGAsyncModule {
      ValaGSignalModule parent_instance;
      ValaGAsyncModulePrivate * priv;
};

struct _ValaGAsyncModuleClass {
      ValaGSignalModuleClass parent_class;
};


static gpointer vala_gasync_module_parent_class = NULL;

GType vala_ccode_base_module_get_type (void) G_GNUC_CONST;
gpointer vala_ccode_base_module_emit_context_ref (gpointer instance);
void vala_ccode_base_module_emit_context_unref (gpointer instance);
GParamSpec* vala_ccode_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_ccode_base_module_value_set_emit_context (GValue* value, gpointer v_object);
void vala_ccode_base_module_value_take_emit_context (GValue* value, gpointer v_object);
gpointer vala_ccode_base_module_value_get_emit_context (const GValue* value);
GType vala_ccode_base_module_emit_context_get_type (void) G_GNUC_CONST;
GType vala_ccode_struct_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_control_flow_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_member_access_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_assignment_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_call_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_array_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_delegate_module_get_type (void) G_GNUC_CONST;
GType vala_gerror_module_get_type (void) G_GNUC_CONST;
GType vala_gtype_module_get_type (void) G_GNUC_CONST;
GType vala_gobject_module_get_type (void) G_GNUC_CONST;
GType vala_gsignal_module_get_type (void) G_GNUC_CONST;
GType vala_gasync_module_get_type (void) G_GNUC_CONST;
enum  {
      VALA_GASYNC_MODULE_DUMMY_PROPERTY
};
static ValaCCodeStruct* vala_gasync_module_generate_data_struct (ValaGAsyncModule* self, ValaMethod* m);
gchar* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const gchar* name);
gchar* vala_ccode_base_module_get_parameter_array_length_cname (ValaCCodeBaseModule* self, ValaParameter* param, gint dim);
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);
gchar* vala_ccode_base_module_get_array_length_cname (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim);
static ValaCCodeFunction* vala_gasync_module_generate_free_function (ValaGAsyncModule* self, 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);
gboolean vala_ccode_base_module_requires_destroy (ValaCCodeBaseModule* self, ValaDataType* type);
ValaCCodeExpression* vala_ccode_base_module_destroy_parameter (ValaCCodeBaseModule* self, ValaParameter* param);
ValaCCodeExpression* vala_ccode_base_module_get_unref_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cvar, ValaDataType* type, ValaExpression* expr, gboolean is_macro_definition);
void vala_ccode_base_module_pop_context (ValaCCodeBaseModule* self);
static void vala_gasync_module_generate_async_function (ValaGAsyncModule* self, ValaMethod* m);
gint vala_ccode_base_module_get_param_pos (ValaCCodeBaseModule* self, gdouble param_pos, gboolean ellipsis);
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);
void vala_ccode_base_module_push_function (ValaCCodeBaseModule* self, ValaCCodeFunction* func);
ValaCCodeExpression* vala_ccode_base_module_transform_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type);
ValaCCodeExpression* vala_ccode_base_module_get_ref_cexpression (ValaCCodeBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node);
static void vala_gasync_module_append_struct (ValaGAsyncModule* self, ValaCCodeStruct* structure);
static void vala_gasync_module_append_function (ValaGAsyncModule* self, ValaCCodeFunction* function);
static void vala_gasync_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_method_declaration (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
static void vala_gasync_module_real_visit_method (ValaCodeVisitor* base, ValaMethod* m);
static void vala_gasync_module_generate_finish_function (ValaGAsyncModule* self, ValaMethod* m);
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_return_default_value (ValaCCodeBaseModule* self, ValaDataType* return_type);
void vala_ccode_base_module_pop_function (ValaCCodeBaseModule* self);
static gchar* vala_gasync_module_real_generate_ready_function (ValaCCodeBaseModule* base, ValaMethod* m);
gboolean vala_ccode_base_module_add_wrapper (ValaCCodeBaseModule* self, const gchar* wrapper_name);
static void vala_gasync_module_real_generate_virtual_method_declaration (ValaGTypeModule* base, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeStruct* type_struct);
void vala_gtype_module_generate_virtual_method_declaration (ValaGTypeModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeStruct* type_struct);
static void vala_gasync_module_real_visit_yield_statement (ValaCodeVisitor* base, ValaYieldStatement* stmt);
gboolean vala_ccode_base_module_is_in_coroutine (ValaCCodeBaseModule* self);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr);
void vala_ccode_base_module_add_simple_check (ValaCCodeBaseModule* self, ValaCodeNode* node, gboolean always_fails);
ValaArrayList* vala_ccode_base_module_get_temp_ref_vars (ValaCCodeBaseModule* self);
ValaCCodeExpression* vala_ccode_base_module_destroy_local (ValaCCodeBaseModule* self, ValaLocalVariable* local);
static void vala_gasync_module_real_return_with_exception (ValaGErrorModule* base, ValaCCodeExpression* error_expr);
void vala_gerror_module_return_with_exception (ValaGErrorModule* self, ValaCCodeExpression* error_expr);
void vala_ccode_base_module_append_local_free (ValaCCodeBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at);
ValaSymbol* vala_ccode_base_module_get_current_symbol (ValaCCodeBaseModule* self);
void vala_ccode_method_module_complete_async (ValaCCodeMethodModule* self);
static void vala_gasync_module_real_visit_return_statement (ValaCodeVisitor* base, ValaReturnStatement* stmt);
static void vala_gasync_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);
gchar* vala_gasync_module_generate_async_callback_wrapper (ValaGAsyncModule* self);
ValaGAsyncModule* vala_gasync_module_new (void);
ValaGAsyncModule* vala_gasync_module_construct (GType object_type);
ValaGSignalModule* vala_gsignal_module_new (void);
ValaGSignalModule* vala_gsignal_module_construct (GType object_type);


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


static ValaCCodeStruct* vala_gasync_module_generate_data_struct (ValaGAsyncModule* self, ValaMethod* m) {
      ValaCCodeStruct* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_;
      gchar* _tmp5_;
      gchar* dataname;
      gchar* _tmp6_;
      gchar* _tmp7_;
      ValaCCodeStruct* _tmp8_ = NULL;
      ValaCCodeStruct* _tmp9_;
      ValaCCodeStruct* data;
      ValaMemberBinding _tmp10_;
      ValaDataType* _tmp52_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (m != NULL, NULL);
      _tmp0_ = vala_method_get_cname (m);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_symbol_lower_case_to_camel_case (_tmp1_);
      _tmp3_ = _tmp2_;
      _tmp4_ = g_strconcat (_tmp3_, "Data", NULL);
      _tmp5_ = _tmp4_;
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      dataname = _tmp5_;
      _tmp6_ = g_strconcat ("_", dataname, NULL);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_ccode_struct_new (_tmp7_);
      _tmp9_ = _tmp8_;
      _g_free0 (_tmp7_);
      data = _tmp9_;
      vala_ccode_struct_add_field (data, "int", "_state_", NULL);
      vala_ccode_struct_add_field (data, "GObject*", "_source_object_", NULL);
      vala_ccode_struct_add_field (data, "GAsyncResult*", "_res_", NULL);
      vala_ccode_struct_add_field (data, "GSimpleAsyncResult*", "_async_result", NULL);
      _tmp10_ = vala_method_get_binding (m);
      if (_tmp10_ == VALA_MEMBER_BINDING_INSTANCE) {
            ValaSymbol* _tmp11_ = NULL;
            ValaTypeSymbol* _tmp12_;
            ValaTypeSymbol* type_sym;
            _tmp11_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
            _tmp12_ = _vala_code_node_ref0 (VALA_TYPESYMBOL (_tmp11_));
            type_sym = _tmp12_;
            if (VALA_IS_OBJECT_TYPE_SYMBOL (type_sym)) {
                  gchar* _tmp13_ = NULL;
                  gchar* _tmp14_;
                  gchar* _tmp15_;
                  gchar* _tmp16_;
                  _tmp13_ = vala_typesymbol_get_cname (type_sym, FALSE);
                  _tmp14_ = _tmp13_;
                  _tmp15_ = g_strconcat (_tmp14_, "*", NULL);
                  _tmp16_ = _tmp15_;
                  vala_ccode_struct_add_field (data, _tmp16_, "self", NULL);
                  _g_free0 (_tmp16_);
                  _g_free0 (_tmp14_);
            } else {
                  gchar* _tmp17_ = NULL;
                  gchar* _tmp18_;
                  _tmp17_ = vala_typesymbol_get_cname (type_sym, FALSE);
                  _tmp18_ = _tmp17_;
                  vala_ccode_struct_add_field (data, _tmp18_, "self", NULL);
                  _g_free0 (_tmp18_);
            }
            _vala_code_node_unref0 (type_sym);
      }
      {
            ValaList* _tmp19_ = NULL;
            ValaList* _param_list;
            gint _tmp20_;
            gint _param_size;
            gint _param_index;
            _tmp19_ = vala_method_get_parameters (m);
            _param_list = _tmp19_;
            _tmp20_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp20_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp21_ = NULL;
                  ValaParameter* param;
                  ValaDataType* _tmp22_ = NULL;
                  ValaDataType* _tmp23_ = NULL;
                  ValaDataType* param_type;
                  gchar* _tmp24_ = NULL;
                  gchar* _tmp25_;
                  const gchar* _tmp26_ = NULL;
                  gchar* _tmp27_ = NULL;
                  gchar* _tmp28_;
                  ValaDataType* _tmp29_ = NULL;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp21_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp21_;
                  _tmp22_ = vala_variable_get_variable_type ((ValaVariable*) param);
                  _tmp23_ = vala_data_type_copy (_tmp22_);
                  param_type = _tmp23_;
                  vala_data_type_set_value_owned (param_type, TRUE);
                  _tmp24_ = vala_data_type_get_cname (param_type);
                  _tmp25_ = _tmp24_;
                  _tmp26_ = vala_symbol_get_name ((ValaSymbol*) param);
                  _tmp27_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp26_);
                  _tmp28_ = _tmp27_;
                  vala_ccode_struct_add_field (data, _tmp25_, _tmp28_, NULL);
                  _g_free0 (_tmp28_);
                  _g_free0 (_tmp25_);
                  _tmp29_ = vala_variable_get_variable_type ((ValaVariable*) param);
                  if (VALA_IS_ARRAY_TYPE (_tmp29_)) {
                        ValaDataType* _tmp30_ = NULL;
                        ValaArrayType* _tmp31_;
                        ValaArrayType* array_type;
                        gboolean _tmp32_;
                        _tmp30_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp31_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp30_));
                        array_type = _tmp31_;
                        _tmp32_ = vala_variable_get_no_array_length ((ValaVariable*) param);
                        if (!_tmp32_) {
                              {
                                    gint dim;
                                    dim = 1;
                                    {
                                          gboolean _tmp33_;
                                          _tmp33_ = TRUE;
                                          while (TRUE) {
                                                gint _tmp34_;
                                                gchar* _tmp35_ = NULL;
                                                gchar* _tmp36_;
                                                if (!_tmp33_) {
                                                      dim++;
                                                }
                                                _tmp33_ = FALSE;
                                                _tmp34_ = vala_array_type_get_rank (array_type);
                                                if (!(dim <= _tmp34_)) {
                                                      break;
                                                }
                                                _tmp35_ = vala_ccode_base_module_get_parameter_array_length_cname ((ValaCCodeBaseModule*) self, param, dim);
                                                _tmp36_ = _tmp35_;
                                                vala_ccode_struct_add_field (data, "gint", _tmp36_, NULL);
                                                _g_free0 (_tmp36_);
                                          }
                                    }
                              }
                        }
                        _vala_code_node_unref0 (array_type);
                  } else {
                        ValaDataType* _tmp37_ = NULL;
                        _tmp37_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (VALA_IS_DELEGATE_TYPE (_tmp37_)) {
                              ValaDataType* _tmp38_ = NULL;
                              ValaDelegateType* _tmp39_;
                              ValaDelegateType* deleg_type;
                              ValaDelegate* _tmp40_ = NULL;
                              gboolean _tmp41_;
                              _tmp38_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp39_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp38_));
                              deleg_type = _tmp39_;
                              _tmp40_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                              _tmp41_ = vala_delegate_get_has_target (_tmp40_);
                              if (_tmp41_) {
                                    const gchar* _tmp42_ = NULL;
                                    gchar* _tmp43_ = NULL;
                                    gchar* _tmp44_;
                                    gchar* _tmp45_ = NULL;
                                    gchar* _tmp46_;
                                    const gchar* _tmp47_ = NULL;
                                    gchar* _tmp48_ = NULL;
                                    gchar* _tmp49_;
                                    gchar* _tmp50_ = NULL;
                                    gchar* _tmp51_;
                                    _tmp42_ = vala_symbol_get_name ((ValaSymbol*) param);
                                    _tmp43_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp42_);
                                    _tmp44_ = _tmp43_;
                                    _tmp45_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, _tmp44_);
                                    _tmp46_ = _tmp45_;
                                    vala_ccode_struct_add_field (data, "gpointer", _tmp46_, NULL);
                                    _g_free0 (_tmp46_);
                                    _g_free0 (_tmp44_);
                                    _tmp47_ = vala_symbol_get_name ((ValaSymbol*) param);
                                    _tmp48_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp47_);
                                    _tmp49_ = _tmp48_;
                                    _tmp50_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, _tmp49_);
                                    _tmp51_ = _tmp50_;
                                    vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp51_, NULL);
                                    _g_free0 (_tmp51_);
                                    _g_free0 (_tmp49_);
                              }
                              _vala_code_node_unref0 (deleg_type);
                        }
                  }
                  _vala_code_node_unref0 (param_type);
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp52_ = vala_method_get_return_type (m);
      if (!VALA_IS_VOID_TYPE (_tmp52_)) {
            ValaDataType* _tmp53_ = NULL;
            gchar* _tmp54_ = NULL;
            gchar* _tmp55_;
            ValaDataType* _tmp56_ = NULL;
            _tmp53_ = vala_method_get_return_type (m);
            _tmp54_ = vala_data_type_get_cname (_tmp53_);
            _tmp55_ = _tmp54_;
            vala_ccode_struct_add_field (data, _tmp55_, "result", NULL);
            _g_free0 (_tmp55_);
            _tmp56_ = vala_method_get_return_type (m);
            if (VALA_IS_ARRAY_TYPE (_tmp56_)) {
                  ValaDataType* _tmp57_ = NULL;
                  ValaArrayType* _tmp58_;
                  ValaArrayType* array_type;
                  gboolean _tmp59_;
                  _tmp57_ = vala_method_get_return_type (m);
                  _tmp58_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp57_));
                  array_type = _tmp58_;
                  _tmp59_ = vala_method_get_no_array_length (m);
                  if (!_tmp59_) {
                        {
                              gint dim;
                              dim = 1;
                              {
                                    gboolean _tmp60_;
                                    _tmp60_ = TRUE;
                                    while (TRUE) {
                                          gint _tmp61_;
                                          gchar* _tmp62_ = NULL;
                                          gchar* _tmp63_;
                                          if (!_tmp60_) {
                                                dim++;
                                          }
                                          _tmp60_ = FALSE;
                                          _tmp61_ = vala_array_type_get_rank (array_type);
                                          if (!(dim <= _tmp61_)) {
                                                break;
                                          }
                                          _tmp62_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
                                          _tmp63_ = _tmp62_;
                                          vala_ccode_struct_add_field (data, "gint", _tmp63_, NULL);
                                          _g_free0 (_tmp63_);
                                    }
                              }
                        }
                  }
                  _vala_code_node_unref0 (array_type);
            } else {
                  ValaDataType* _tmp64_ = NULL;
                  _tmp64_ = vala_method_get_return_type (m);
                  if (VALA_IS_DELEGATE_TYPE (_tmp64_)) {
                        ValaDataType* _tmp65_ = NULL;
                        ValaDelegateType* _tmp66_;
                        ValaDelegateType* deleg_type;
                        ValaDelegate* _tmp67_ = NULL;
                        gboolean _tmp68_;
                        _tmp65_ = vala_method_get_return_type (m);
                        _tmp66_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp65_));
                        deleg_type = _tmp66_;
                        _tmp67_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                        _tmp68_ = vala_delegate_get_has_target (_tmp67_);
                        if (_tmp68_) {
                              gchar* _tmp69_ = NULL;
                              gchar* _tmp70_;
                              gchar* _tmp71_ = NULL;
                              gchar* _tmp72_;
                              _tmp69_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp70_ = _tmp69_;
                              vala_ccode_struct_add_field (data, "gpointer", _tmp70_, NULL);
                              _g_free0 (_tmp70_);
                              _tmp71_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp72_ = _tmp71_;
                              vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp72_, NULL);
                              _g_free0 (_tmp72_);
                        }
                        _vala_code_node_unref0 (deleg_type);
                  }
            }
      }
      result = data;
      _g_free0 (dataname);
      return result;
}


static ValaCCodeFunction* vala_gasync_module_generate_free_function (ValaGAsyncModule* self, ValaMethod* m) {
      ValaCCodeFunction* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_;
      gchar* _tmp5_;
      gchar* dataname;
      gchar* _tmp6_ = NULL;
      gchar* _tmp7_;
      gchar* _tmp8_;
      gchar* _tmp9_;
      ValaCCodeFunction* _tmp10_ = NULL;
      ValaCCodeFunction* _tmp11_;
      ValaCCodeFunction* freefunc;
      ValaCCodeParameter* _tmp12_ = NULL;
      ValaCCodeParameter* _tmp13_;
      ValaCCodeBlock* _tmp14_ = NULL;
      ValaCCodeBlock* freeblock;
      gchar* _tmp15_;
      gchar* _tmp16_;
      ValaCCodeDeclaration* _tmp17_ = NULL;
      ValaCCodeDeclaration* _tmp18_;
      ValaCCodeDeclaration* datadecl;
      ValaCCodeIdentifier* _tmp19_ = NULL;
      ValaCCodeIdentifier* _tmp20_;
      ValaCCodeVariableDeclarator* _tmp21_ = NULL;
      ValaCCodeVariableDeclarator* _tmp22_;
      ValaCCodeBaseModuleEmitContext* _tmp23_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp24_;
      ValaDataType* _tmp42_ = NULL;
      gboolean _tmp43_;
      ValaMemberBinding _tmp59_;
      ValaCCodeIdentifier* _tmp80_ = NULL;
      ValaCCodeIdentifier* _tmp81_;
      ValaCCodeFunctionCall* _tmp82_ = NULL;
      ValaCCodeFunctionCall* _tmp83_;
      ValaCCodeFunctionCall* freecall;
      ValaCCodeIdentifier* _tmp84_ = NULL;
      ValaCCodeIdentifier* _tmp85_;
      ValaCCodeIdentifier* _tmp86_ = NULL;
      ValaCCodeIdentifier* _tmp87_;
      ValaCCodeExpressionStatement* _tmp88_ = NULL;
      ValaCCodeExpressionStatement* _tmp89_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (m != NULL, NULL);
      _tmp0_ = vala_method_get_cname (m);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_symbol_lower_case_to_camel_case (_tmp1_);
      _tmp3_ = _tmp2_;
      _tmp4_ = g_strconcat (_tmp3_, "Data", NULL);
      _tmp5_ = _tmp4_;
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      dataname = _tmp5_;
      _tmp6_ = vala_method_get_real_cname (m);
      _tmp7_ = _tmp6_;
      _tmp8_ = g_strconcat (_tmp7_, "_data_free", NULL);
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_function_new (_tmp9_, "void");
      _tmp11_ = _tmp10_;
      _g_free0 (_tmp9_);
      _g_free0 (_tmp7_);
      freefunc = _tmp11_;
      vala_ccode_function_set_modifiers (freefunc, VALA_CCODE_MODIFIERS_STATIC);
      _tmp12_ = vala_ccode_parameter_new ("_data", "gpointer");
      _tmp13_ = _tmp12_;
      vala_ccode_function_add_parameter (freefunc, _tmp13_);
      _vala_ccode_node_unref0 (_tmp13_);
      _tmp14_ = vala_ccode_block_new ();
      freeblock = _tmp14_;
      vala_ccode_function_set_block (freefunc, freeblock);
      _tmp15_ = g_strconcat (dataname, "*", NULL);
      _tmp16_ = _tmp15_;
      _tmp17_ = vala_ccode_declaration_new (_tmp16_);
      _tmp18_ = _tmp17_;
      _g_free0 (_tmp16_);
      datadecl = _tmp18_;
      _tmp19_ = vala_ccode_identifier_new ("_data");
      _tmp20_ = _tmp19_;
      _tmp21_ = vala_ccode_variable_declarator_new ("data", (ValaCCodeExpression*) _tmp20_, NULL);
      _tmp22_ = _tmp21_;
      vala_ccode_declaration_add_declarator (datadecl, (ValaCCodeDeclarator*) _tmp22_);
      _vala_ccode_node_unref0 (_tmp22_);
      _vala_ccode_node_unref0 (_tmp20_);
      vala_ccode_block_add_statement (freeblock, (ValaCCodeNode*) datadecl);
      _tmp23_ = vala_ccode_base_module_emit_context_new ((ValaSymbol*) m);
      _tmp24_ = _tmp23_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp24_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp24_);
      {
            ValaList* _tmp25_ = NULL;
            ValaList* _param_list;
            gint _tmp26_;
            gint _param_size;
            gint _param_index;
            _tmp25_ = vala_method_get_parameters (m);
            _param_list = _tmp25_;
            _tmp26_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp26_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp27_ = NULL;
                  ValaParameter* param;
                  ValaParameterDirection _tmp28_;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp27_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp27_;
                  _tmp28_ = vala_parameter_get_direction (param);
                  if (_tmp28_ != VALA_PARAMETER_DIRECTION_OUT) {
                        gboolean _tmp29_ = FALSE;
                        ValaDataType* _tmp30_ = NULL;
                        gboolean is_unowned_delegate;
                        ValaDataType* _tmp33_ = NULL;
                        ValaDataType* _tmp34_ = NULL;
                        ValaDataType* param_type;
                        gboolean _tmp35_ = FALSE;
                        gboolean _tmp36_;
                        _tmp30_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (VALA_IS_DELEGATE_TYPE (_tmp30_)) {
                              ValaDataType* _tmp31_ = NULL;
                              gboolean _tmp32_;
                              _tmp31_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp32_ = vala_data_type_get_value_owned (_tmp31_);
                              _tmp29_ = !_tmp32_;
                        } else {
                              _tmp29_ = FALSE;
                        }
                        is_unowned_delegate = _tmp29_;
                        _tmp33_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp34_ = vala_data_type_copy (_tmp33_);
                        param_type = _tmp34_;
                        vala_data_type_set_value_owned (param_type, TRUE);
                        _tmp36_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, param_type);
                        if (_tmp36_) {
                              _tmp35_ = !is_unowned_delegate;
                        } else {
                              _tmp35_ = FALSE;
                        }
                        if (_tmp35_) {
                              gboolean _tmp37_;
                              gboolean old_captured;
                              ValaCCodeExpression* _tmp38_ = NULL;
                              ValaCCodeExpression* _tmp39_;
                              ValaCCodeExpressionStatement* _tmp40_ = NULL;
                              ValaCCodeExpressionStatement* _tmp41_;
                              _tmp37_ = vala_parameter_get_captured (param);
                              old_captured = _tmp37_;
                              vala_parameter_set_captured (param, FALSE);
                              _tmp38_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, param);
                              _tmp39_ = _tmp38_;
                              _tmp40_ = vala_ccode_expression_statement_new (_tmp39_);
                              _tmp41_ = _tmp40_;
                              vala_ccode_block_add_statement (freeblock, (ValaCCodeNode*) _tmp41_);
                              _vala_ccode_node_unref0 (_tmp41_);
                              _vala_ccode_node_unref0 (_tmp39_);
                              vala_parameter_set_captured (param, old_captured);
                        }
                        _vala_code_node_unref0 (param_type);
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp42_ = vala_method_get_return_type (m);
      _tmp43_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp42_);
      if (_tmp43_) {
            ValaDataType* _tmp44_ = NULL;
            ValaLocalVariable* _tmp45_ = NULL;
            ValaLocalVariable* v;
            ValaMemberAccess* _tmp46_ = NULL;
            ValaMemberAccess* ma;
            ValaDataType* _tmp47_ = NULL;
            ValaDataType* _tmp48_ = NULL;
            ValaDataType* _tmp49_;
            ValaCCodeIdentifier* _tmp50_ = NULL;
            ValaCCodeIdentifier* _tmp51_;
            ValaCCodeMemberAccess* _tmp52_ = NULL;
            ValaCCodeMemberAccess* _tmp53_;
            ValaDataType* _tmp54_ = NULL;
            ValaCCodeExpression* _tmp55_ = NULL;
            ValaCCodeExpression* _tmp56_;
            ValaCCodeExpression* unref_expr;
            ValaCCodeExpressionStatement* _tmp57_ = NULL;
            ValaCCodeExpressionStatement* _tmp58_;
            _tmp44_ = vala_method_get_return_type (m);
            _tmp45_ = vala_local_variable_new (_tmp44_, ".result", NULL, NULL);
            v = _tmp45_;
            _tmp46_ = vala_member_access_new_simple (".result", NULL);
            ma = _tmp46_;
            vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) v);
            _tmp47_ = vala_variable_get_variable_type ((ValaVariable*) v);
            _tmp48_ = vala_data_type_copy (_tmp47_);
            _tmp49_ = _tmp48_;
            vala_expression_set_value_type ((ValaExpression*) ma, _tmp49_);
            _vala_code_node_unref0 (_tmp49_);
            vala_code_visitor_visit_member_access ((ValaCodeVisitor*) self, ma);
            _tmp50_ = vala_ccode_identifier_new ("data");
            _tmp51_ = _tmp50_;
            _tmp52_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp51_, "result");
            _tmp53_ = _tmp52_;
            _tmp54_ = vala_method_get_return_type (m);
            _tmp55_ = vala_ccode_base_module_get_unref_expression ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) _tmp53_, _tmp54_, (ValaExpression*) ma, FALSE);
            _tmp56_ = _tmp55_;
            _vala_ccode_node_unref0 (_tmp53_);
            _vala_ccode_node_unref0 (_tmp51_);
            unref_expr = _tmp56_;
            _tmp57_ = vala_ccode_expression_statement_new (unref_expr);
            _tmp58_ = _tmp57_;
            vala_ccode_block_add_statement (freeblock, (ValaCCodeNode*) _tmp58_);
            _vala_ccode_node_unref0 (_tmp58_);
            _vala_ccode_node_unref0 (unref_expr);
            _vala_code_node_unref0 (ma);
            _vala_code_node_unref0 (v);
      }
      _tmp59_ = vala_method_get_binding (m);
      if (_tmp59_ == VALA_MEMBER_BINDING_INSTANCE) {
            ValaParameter* _tmp60_ = NULL;
            ValaDataType* _tmp61_ = NULL;
            ValaDataType* _tmp62_ = NULL;
            ValaDataType* this_type;
            gboolean _tmp63_;
            _tmp60_ = vala_method_get_this_parameter (m);
            _tmp61_ = vala_variable_get_variable_type ((ValaVariable*) _tmp60_);
            _tmp62_ = vala_data_type_copy (_tmp61_);
            this_type = _tmp62_;
            vala_data_type_set_value_owned (this_type, TRUE);
            _tmp63_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, this_type);
            if (_tmp63_) {
                  ValaMemberAccess* _tmp64_ = NULL;
                  ValaMemberAccess* ma;
                  ValaParameter* _tmp65_ = NULL;
                  ValaParameter* _tmp66_ = NULL;
                  ValaDataType* _tmp67_ = NULL;
                  ValaDataType* _tmp68_ = NULL;
                  ValaDataType* _tmp69_;
                  ValaCCodeIdentifier* _tmp70_ = NULL;
                  ValaCCodeIdentifier* _tmp71_;
                  ValaCCodeMemberAccess* _tmp72_ = NULL;
                  ValaCCodeMemberAccess* _tmp73_;
                  ValaParameter* _tmp74_ = NULL;
                  ValaDataType* _tmp75_ = NULL;
                  ValaCCodeExpression* _tmp76_ = NULL;
                  ValaCCodeExpression* _tmp77_;
                  ValaCCodeExpressionStatement* _tmp78_ = NULL;
                  ValaCCodeExpressionStatement* _tmp79_;
                  _tmp64_ = vala_member_access_new_simple ("this", NULL);
                  ma = _tmp64_;
                  _tmp65_ = vala_method_get_this_parameter (m);
                  vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) _tmp65_);
                  _tmp66_ = vala_method_get_this_parameter (m);
                  _tmp67_ = vala_variable_get_variable_type ((ValaVariable*) _tmp66_);
                  _tmp68_ = vala_data_type_copy (_tmp67_);
                  _tmp69_ = _tmp68_;
                  vala_expression_set_value_type ((ValaExpression*) ma, _tmp69_);
                  _vala_code_node_unref0 (_tmp69_);
                  vala_code_visitor_visit_member_access ((ValaCodeVisitor*) self, ma);
                  _tmp70_ = vala_ccode_identifier_new ("data");
                  _tmp71_ = _tmp70_;
                  _tmp72_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp71_, "self");
                  _tmp73_ = _tmp72_;
                  _tmp74_ = vala_method_get_this_parameter (m);
                  _tmp75_ = vala_variable_get_variable_type ((ValaVariable*) _tmp74_);
                  _tmp76_ = vala_ccode_base_module_get_unref_expression ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) _tmp73_, _tmp75_, (ValaExpression*) ma, FALSE);
                  _tmp77_ = _tmp76_;
                  _tmp78_ = vala_ccode_expression_statement_new (_tmp77_);
                  _tmp79_ = _tmp78_;
                  vala_ccode_block_add_statement (freeblock, (ValaCCodeNode*) _tmp79_);
                  _vala_ccode_node_unref0 (_tmp79_);
                  _vala_ccode_node_unref0 (_tmp77_);
                  _vala_ccode_node_unref0 (_tmp73_);
                  _vala_ccode_node_unref0 (_tmp71_);
                  _vala_code_node_unref0 (ma);
            }
            _vala_code_node_unref0 (this_type);
      }
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      _tmp80_ = vala_ccode_identifier_new ("g_slice_free");
      _tmp81_ = _tmp80_;
      _tmp82_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp81_);
      _tmp83_ = _tmp82_;
      _vala_ccode_node_unref0 (_tmp81_);
      freecall = _tmp83_;
      _tmp84_ = vala_ccode_identifier_new (dataname);
      _tmp85_ = _tmp84_;
      vala_ccode_function_call_add_argument (freecall, (ValaCCodeExpression*) _tmp85_);
      _vala_ccode_node_unref0 (_tmp85_);
      _tmp86_ = vala_ccode_identifier_new ("data");
      _tmp87_ = _tmp86_;
      vala_ccode_function_call_add_argument (freecall, (ValaCCodeExpression*) _tmp87_);
      _vala_ccode_node_unref0 (_tmp87_);
      _tmp88_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) freecall);
      _tmp89_ = _tmp88_;
      vala_ccode_block_add_statement (freeblock, (ValaCCodeNode*) _tmp89_);
      _vala_ccode_node_unref0 (_tmp89_);
      result = freefunc;
      _vala_ccode_node_unref0 (freecall);
      _vala_ccode_node_unref0 (datadecl);
      _vala_ccode_node_unref0 (freeblock);
      _g_free0 (dataname);
      return result;
}


static void vala_gasync_module_generate_async_function (ValaGAsyncModule* self, ValaMethod* m) {
      ValaCCodeBaseModuleEmitContext* _tmp0_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      gchar* _tmp6_;
      gchar* _tmp7_;
      gchar* dataname;
      gchar* _tmp8_ = NULL;
      gchar* _tmp9_;
      ValaCCodeFunction* _tmp10_ = NULL;
      ValaCCodeFunction* _tmp11_;
      ValaCCodeFunction* asyncfunc;
      ValaHashMap* _tmp12_ = NULL;
      ValaHashMap* cparam_map;
      gint _tmp13_;
      ValaCCodeParameter* _tmp14_ = NULL;
      ValaCCodeParameter* _tmp15_;
      gint _tmp16_;
      ValaCCodeParameter* _tmp17_ = NULL;
      ValaCCodeParameter* _tmp18_;
      gboolean _tmp19_ = FALSE;
      ValaMethod* _tmp20_ = NULL;
      gboolean _tmp25_ = FALSE;
      gboolean _tmp26_;
      ValaCCodeIdentifier* _tmp57_ = NULL;
      ValaCCodeIdentifier* _tmp58_;
      ValaCCodeFunctionCall* _tmp59_ = NULL;
      ValaCCodeFunctionCall* _tmp60_;
      ValaCCodeFunctionCall* dataalloc;
      ValaCCodeIdentifier* _tmp61_ = NULL;
      ValaCCodeIdentifier* _tmp62_;
      ValaCCodeIdentifier* _tmp63_ = NULL;
      ValaCCodeIdentifier* data_var;
      ValaCCodeFunction* _tmp64_ = NULL;
      gchar* _tmp65_;
      gchar* _tmp66_;
      ValaCCodeVariableDeclarator* _tmp67_ = NULL;
      ValaCCodeVariableDeclarator* _tmp68_;
      ValaCCodeFunction* _tmp69_ = NULL;
      ValaCCodeIdentifier* _tmp70_ = NULL;
      ValaCCodeIdentifier* _tmp71_;
      ValaCCodeFunctionCall* _tmp72_ = NULL;
      ValaCCodeFunctionCall* _tmp73_;
      ValaCCodeFunctionCall* create_result;
      ValaSymbol* _tmp74_ = NULL;
      ValaSymbol* _tmp75_;
      ValaClass* _tmp76_;
      ValaClass* cl;
      gboolean _tmp77_ = FALSE;
      gboolean _tmp78_ = FALSE;
      ValaMemberBinding _tmp79_;
      ValaCCodeIdentifier* _tmp101_ = NULL;
      ValaCCodeIdentifier* _tmp102_;
      ValaCCodeIdentifier* _tmp103_ = NULL;
      ValaCCodeIdentifier* _tmp104_;
      gchar* _tmp105_ = NULL;
      gchar* _tmp106_;
      ValaCCodeIdentifier* _tmp107_ = NULL;
      ValaCCodeIdentifier* _tmp108_;
      ValaCCodeFunction* _tmp109_ = NULL;
      ValaCCodeMemberAccess* _tmp110_ = NULL;
      ValaCCodeMemberAccess* _tmp111_;
      ValaCCodeIdentifier* _tmp112_ = NULL;
      ValaCCodeIdentifier* _tmp113_;
      ValaCCodeFunctionCall* _tmp114_ = NULL;
      ValaCCodeFunctionCall* _tmp115_;
      ValaCCodeFunctionCall* set_op_res_call;
      ValaCCodeMemberAccess* _tmp116_ = NULL;
      ValaCCodeMemberAccess* _tmp117_;
      gchar* _tmp118_ = NULL;
      gchar* _tmp119_;
      gchar* _tmp120_;
      gchar* _tmp121_;
      ValaCCodeIdentifier* _tmp122_ = NULL;
      ValaCCodeIdentifier* _tmp123_;
      ValaCCodeFunction* _tmp124_ = NULL;
      ValaMemberBinding _tmp125_;
      gchar* _tmp228_ = NULL;
      gchar* _tmp229_;
      gchar* _tmp230_;
      gchar* _tmp231_;
      ValaCCodeIdentifier* _tmp232_ = NULL;
      ValaCCodeIdentifier* _tmp233_;
      ValaCCodeFunctionCall* _tmp234_ = NULL;
      ValaCCodeFunctionCall* _tmp235_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeFunction* _tmp236_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != 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);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_symbol_lower_case_to_camel_case (_tmp3_);
      _tmp5_ = _tmp4_;
      _tmp6_ = g_strconcat (_tmp5_, "Data", NULL);
      _tmp7_ = _tmp6_;
      _g_free0 (_tmp5_);
      _g_free0 (_tmp3_);
      dataname = _tmp7_;
      _tmp8_ = vala_method_get_real_cname (m);
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_function_new (_tmp9_, "void");
      _tmp11_ = _tmp10_;
      _g_free0 (_tmp9_);
      asyncfunc = _tmp11_;
      _tmp12_ = 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 = _tmp12_;
      _tmp13_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-1), FALSE);
      _tmp14_ = vala_ccode_parameter_new ("_callback_", "GAsyncReadyCallback");
      _tmp15_ = _tmp14_;
      vala_map_set ((ValaMap*) cparam_map, GINT_TO_POINTER (_tmp13_), _tmp15_);
      _vala_ccode_node_unref0 (_tmp15_);
      _tmp16_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, -0.9, FALSE);
      _tmp17_ = vala_ccode_parameter_new ("_user_data_", "gpointer");
      _tmp18_ = _tmp17_;
      vala_map_set ((ValaMap*) cparam_map, GINT_TO_POINTER (_tmp16_), _tmp18_);
      _vala_ccode_node_unref0 (_tmp18_);
      vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->cfile, (ValaMap*) cparam_map, asyncfunc, NULL, NULL, NULL, 1);
      _tmp20_ = vala_method_get_base_method (m);
      if (_tmp20_ != NULL) {
            _tmp19_ = TRUE;
      } else {
            ValaMethod* _tmp21_ = NULL;
            _tmp21_ = vala_method_get_base_interface_method (m);
            _tmp19_ = _tmp21_ != NULL;
      }
      if (_tmp19_) {
            ValaCCodeModifiers _tmp22_;
            _tmp22_ = vala_ccode_function_get_modifiers (asyncfunc);
            vala_ccode_function_set_modifiers (asyncfunc, _tmp22_ | VALA_CCODE_MODIFIERS_STATIC);
            vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, asyncfunc);
      } else {
            gboolean _tmp23_;
            _tmp23_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
            if (_tmp23_) {
                  ValaCCodeModifiers _tmp24_;
                  _tmp24_ = vala_ccode_function_get_modifiers (asyncfunc);
                  vala_ccode_function_set_modifiers (asyncfunc, _tmp24_ | VALA_CCODE_MODIFIERS_STATIC);
            }
      }
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, asyncfunc);
      _tmp26_ = vala_method_get_overrides (m);
      if (_tmp26_) {
            _tmp25_ = TRUE;
      } else {
            gboolean _tmp27_ = FALSE;
            gboolean _tmp28_ = FALSE;
            ValaMethod* _tmp29_ = NULL;
            _tmp29_ = vala_method_get_base_interface_method (m);
            if (_tmp29_ != NULL) {
                  gboolean _tmp30_;
                  _tmp30_ = vala_method_get_is_abstract (m);
                  _tmp28_ = !_tmp30_;
            } else {
                  _tmp28_ = FALSE;
            }
            if (_tmp28_) {
                  gboolean _tmp31_;
                  _tmp31_ = vala_method_get_is_virtual (m);
                  _tmp27_ = !_tmp31_;
            } else {
                  _tmp27_ = FALSE;
            }
            _tmp25_ = _tmp27_;
      }
      if (_tmp25_) {
            ValaMethod* base_method = NULL;
            gboolean _tmp32_;
            ValaSymbol* _tmp37_ = NULL;
            ValaObjectType* _tmp38_ = NULL;
            ValaObjectType* base_expression_type;
            ValaSymbol* _tmp39_ = NULL;
            ValaSymbol* _tmp40_;
            ValaObjectTypeSymbol* _tmp41_;
            ValaObjectTypeSymbol* type_symbol;
            ValaObjectType* _tmp42_ = NULL;
            ValaObjectType* self_target_type;
            ValaCCodeIdentifier* _tmp43_ = NULL;
            ValaCCodeIdentifier* _tmp44_;
            ValaCCodeExpression* _tmp45_ = NULL;
            ValaCCodeExpression* _tmp46_;
            ValaCCodeExpression* cself;
            ValaCCodeFunction* _tmp47_ = NULL;
            gchar* _tmp48_ = NULL;
            gchar* _tmp49_;
            gchar* _tmp50_ = NULL;
            gchar* _tmp51_;
            ValaCCodeVariableDeclarator* _tmp52_ = NULL;
            ValaCCodeVariableDeclarator* _tmp53_;
            ValaCCodeFunction* _tmp54_ = NULL;
            ValaCCodeIdentifier* _tmp55_ = NULL;
            ValaCCodeIdentifier* _tmp56_;
            _tmp32_ = vala_method_get_overrides (m);
            if (_tmp32_) {
                  ValaMethod* _tmp33_ = NULL;
                  ValaMethod* _tmp34_;
                  _tmp33_ = vala_method_get_base_method (m);
                  _tmp34_ = _vala_code_node_ref0 (_tmp33_);
                  _vala_code_node_unref0 (base_method);
                  base_method = _tmp34_;
            } else {
                  ValaMethod* _tmp35_ = NULL;
                  ValaMethod* _tmp36_;
                  _tmp35_ = vala_method_get_base_interface_method (m);
                  _tmp36_ = _vala_code_node_ref0 (_tmp35_);
                  _vala_code_node_unref0 (base_method);
                  base_method = _tmp36_;
            }
            _tmp37_ = vala_symbol_get_parent_symbol ((ValaSymbol*) base_method);
            _tmp38_ = vala_object_type_new (VALA_OBJECT_TYPE_SYMBOL (_tmp37_));
            base_expression_type = _tmp38_;
            _tmp39_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
            _tmp40_ = _tmp39_;
            _tmp41_ = _vala_code_node_ref0 (VALA_IS_OBJECT_TYPE_SYMBOL (_tmp40_) ? ((ValaObjectTypeSymbol*) _tmp40_) : NULL);
            type_symbol = _tmp41_;
            _tmp42_ = vala_object_type_new (type_symbol);
            self_target_type = _tmp42_;
            _tmp43_ = vala_ccode_identifier_new ("base");
            _tmp44_ = _tmp43_;
            _tmp45_ = vala_ccode_base_module_transform_expression ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) _tmp44_, (ValaDataType*) base_expression_type, (ValaDataType*) self_target_type, NULL);
            _tmp46_ = _tmp45_;
            _vala_ccode_node_unref0 (_tmp44_);
            cself = _tmp46_;
            _tmp47_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp48_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) type_symbol, FALSE);
            _tmp49_ = _tmp48_;
            _tmp50_ = g_strdup_printf ("%s *", _tmp49_);
            _tmp51_ = _tmp50_;
            _tmp52_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
            _tmp53_ = _tmp52_;
            vala_ccode_function_add_declaration (_tmp47_, _tmp51_, (ValaCCodeDeclarator*) _tmp53_, 0);
            _vala_ccode_node_unref0 (_tmp53_);
            _g_free0 (_tmp51_);
            _g_free0 (_tmp49_);
            _tmp54_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp55_ = vala_ccode_identifier_new ("self");
            _tmp56_ = _tmp55_;
            vala_ccode_function_add_assignment (_tmp54_, (ValaCCodeExpression*) _tmp56_, cself);
            _vala_ccode_node_unref0 (_tmp56_);
            _vala_ccode_node_unref0 (cself);
            _vala_code_node_unref0 (self_target_type);
            _vala_code_node_unref0 (type_symbol);
            _vala_code_node_unref0 (base_expression_type);
            _vala_code_node_unref0 (base_method);
      }
      _tmp57_ = vala_ccode_identifier_new ("g_slice_new0");
      _tmp58_ = _tmp57_;
      _tmp59_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp58_);
      _tmp60_ = _tmp59_;
      _vala_ccode_node_unref0 (_tmp58_);
      dataalloc = _tmp60_;
      _tmp61_ = vala_ccode_identifier_new (dataname);
      _tmp62_ = _tmp61_;
      vala_ccode_function_call_add_argument (dataalloc, (ValaCCodeExpression*) _tmp62_);
      _vala_ccode_node_unref0 (_tmp62_);
      _tmp63_ = vala_ccode_identifier_new ("_data_");
      data_var = _tmp63_;
      _tmp64_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp65_ = g_strconcat (dataname, "*", NULL);
      _tmp66_ = _tmp65_;
      _tmp67_ = vala_ccode_variable_declarator_new ("_data_", NULL, NULL);
      _tmp68_ = _tmp67_;
      vala_ccode_function_add_declaration (_tmp64_, _tmp66_, (ValaCCodeDeclarator*) _tmp68_, 0);
      _vala_ccode_node_unref0 (_tmp68_);
      _g_free0 (_tmp66_);
      _tmp69_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_assignment (_tmp69_, (ValaCCodeExpression*) data_var, (ValaCCodeExpression*) dataalloc);
      _tmp70_ = vala_ccode_identifier_new ("g_simple_async_result_new");
      _tmp71_ = _tmp70_;
      _tmp72_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp71_);
      _tmp73_ = _tmp72_;
      _vala_ccode_node_unref0 (_tmp71_);
      create_result = _tmp73_;
      _tmp74_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
      _tmp75_ = _tmp74_;
      _tmp76_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp75_) ? ((ValaClass*) _tmp75_) : NULL);
      cl = _tmp76_;
      _tmp79_ = vala_method_get_binding (m);
      if (_tmp79_ == VALA_MEMBER_BINDING_INSTANCE) {
            _tmp78_ = cl != NULL;
      } else {
            _tmp78_ = FALSE;
      }
      if (_tmp78_) {
            gboolean _tmp80_;
            _tmp80_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) cl, ((ValaCCodeBaseModule*) self)->gobject_type);
            _tmp77_ = _tmp80_;
      } else {
            _tmp77_ = FALSE;
      }
      if (_tmp77_) {
            ValaCCodeIdentifier* _tmp81_ = NULL;
            ValaCCodeIdentifier* _tmp82_;
            ValaCCodeFunctionCall* _tmp83_ = NULL;
            ValaCCodeFunctionCall* _tmp84_;
            ValaCCodeFunctionCall* gobject_cast;
            ValaCCodeIdentifier* _tmp85_ = NULL;
            ValaCCodeIdentifier* _tmp86_;
            _tmp81_ = vala_ccode_identifier_new ("G_OBJECT");
            _tmp82_ = _tmp81_;
            _tmp83_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp82_);
            _tmp84_ = _tmp83_;
            _vala_ccode_node_unref0 (_tmp82_);
            gobject_cast = _tmp84_;
            _tmp85_ = vala_ccode_identifier_new ("self");
            _tmp86_ = _tmp85_;
            vala_ccode_function_call_add_argument (gobject_cast, (ValaCCodeExpression*) _tmp86_);
            _vala_ccode_node_unref0 (_tmp86_);
            vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) gobject_cast);
            _vala_ccode_node_unref0 (gobject_cast);
      } else {
            ValaCodeContext* _tmp87_ = NULL;
            gboolean _tmp88_;
            _tmp87_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
            _tmp88_ = vala_code_context_require_glib_version (_tmp87_, 2, 20);
            if (_tmp88_) {
                  ValaCCodeConstant* _tmp89_ = NULL;
                  ValaCCodeConstant* _tmp90_;
                  _tmp89_ = vala_ccode_constant_new ("NULL");
                  _tmp90_ = _tmp89_;
                  vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp90_);
                  _vala_ccode_node_unref0 (_tmp90_);
            } else {
                  ValaCCodeIdentifier* _tmp91_ = NULL;
                  ValaCCodeIdentifier* _tmp92_;
                  ValaCCodeFunctionCall* _tmp93_ = NULL;
                  ValaCCodeFunctionCall* _tmp94_;
                  ValaCCodeFunctionCall* object_creation;
                  ValaCCodeConstant* _tmp95_ = NULL;
                  ValaCCodeConstant* _tmp96_;
                  ValaCCodeConstant* _tmp97_ = NULL;
                  ValaCCodeConstant* _tmp98_;
                  ValaCCodeConstant* _tmp99_ = NULL;
                  ValaCCodeConstant* _tmp100_;
                  _tmp91_ = vala_ccode_identifier_new ("g_object_newv");
                  _tmp92_ = _tmp91_;
                  _tmp93_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp92_);
                  _tmp94_ = _tmp93_;
                  _vala_ccode_node_unref0 (_tmp92_);
                  object_creation = _tmp94_;
                  _tmp95_ = vala_ccode_constant_new ("G_TYPE_OBJECT");
                  _tmp96_ = _tmp95_;
                  vala_ccode_function_call_add_argument (object_creation, (ValaCCodeExpression*) _tmp96_);
                  _vala_ccode_node_unref0 (_tmp96_);
                  _tmp97_ = vala_ccode_constant_new ("0");
                  _tmp98_ = _tmp97_;
                  vala_ccode_function_call_add_argument (object_creation, (ValaCCodeExpression*) _tmp98_);
                  _vala_ccode_node_unref0 (_tmp98_);
                  _tmp99_ = vala_ccode_constant_new ("NULL");
                  _tmp100_ = _tmp99_;
                  vala_ccode_function_call_add_argument (object_creation, (ValaCCodeExpression*) _tmp100_);
                  _vala_ccode_node_unref0 (_tmp100_);
                  vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) object_creation);
                  _vala_ccode_node_unref0 (object_creation);
            }
      }
      _tmp101_ = vala_ccode_identifier_new ("_callback_");
      _tmp102_ = _tmp101_;
      vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp102_);
      _vala_ccode_node_unref0 (_tmp102_);
      _tmp103_ = vala_ccode_identifier_new ("_user_data_");
      _tmp104_ = _tmp103_;
      vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp104_);
      _vala_ccode_node_unref0 (_tmp104_);
      _tmp105_ = vala_method_get_real_cname (m);
      _tmp106_ = _tmp105_;
      _tmp107_ = vala_ccode_identifier_new (_tmp106_);
      _tmp108_ = _tmp107_;
      vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp108_);
      _vala_ccode_node_unref0 (_tmp108_);
      _g_free0 (_tmp106_);
      _tmp109_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp110_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "_async_result");
      _tmp111_ = _tmp110_;
      vala_ccode_function_add_assignment (_tmp109_, (ValaCCodeExpression*) _tmp111_, (ValaCCodeExpression*) create_result);
      _vala_ccode_node_unref0 (_tmp111_);
      _tmp112_ = vala_ccode_identifier_new ("g_simple_async_result_set_op_res_gpointer");
      _tmp113_ = _tmp112_;
      _tmp114_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp113_);
      _tmp115_ = _tmp114_;
      _vala_ccode_node_unref0 (_tmp113_);
      set_op_res_call = _tmp115_;
      _tmp116_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "_async_result");
      _tmp117_ = _tmp116_;
      vala_ccode_function_call_add_argument (set_op_res_call, (ValaCCodeExpression*) _tmp117_);
      _vala_ccode_node_unref0 (_tmp117_);
      vala_ccode_function_call_add_argument (set_op_res_call, (ValaCCodeExpression*) data_var);
      _tmp118_ = vala_method_get_real_cname (m);
      _tmp119_ = _tmp118_;
      _tmp120_ = g_strconcat (_tmp119_, "_data_free", NULL);
      _tmp121_ = _tmp120_;
      _tmp122_ = vala_ccode_identifier_new (_tmp121_);
      _tmp123_ = _tmp122_;
      vala_ccode_function_call_add_argument (set_op_res_call, (ValaCCodeExpression*) _tmp123_);
      _vala_ccode_node_unref0 (_tmp123_);
      _g_free0 (_tmp121_);
      _g_free0 (_tmp119_);
      _tmp124_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp124_, (ValaCCodeExpression*) set_op_res_call);
      _tmp125_ = vala_method_get_binding (m);
      if (_tmp125_ == VALA_MEMBER_BINDING_INSTANCE) {
            ValaParameter* _tmp126_ = NULL;
            ValaDataType* _tmp127_ = NULL;
            ValaDataType* _tmp128_ = NULL;
            ValaDataType* this_type;
            ValaCCodeIdentifier* _tmp129_ = NULL;
            ValaCCodeExpression* cself;
            gboolean _tmp130_;
            gboolean _tmp132_;
            ValaCCodeFunction* _tmp143_ = NULL;
            ValaCCodeMemberAccess* _tmp144_ = NULL;
            ValaCCodeMemberAccess* _tmp145_;
            _tmp126_ = vala_method_get_this_parameter (m);
            _tmp127_ = vala_variable_get_variable_type ((ValaVariable*) _tmp126_);
            _tmp128_ = vala_data_type_copy (_tmp127_);
            this_type = _tmp128_;
            vala_data_type_set_value_owned (this_type, TRUE);
            _tmp129_ = vala_ccode_identifier_new ("self");
            cself = (ValaCCodeExpression*) _tmp129_;
            _tmp130_ = vala_data_type_is_real_non_null_struct_type (this_type);
            if (_tmp130_) {
                  ValaCCodeUnaryExpression* _tmp131_ = NULL;
                  _tmp131_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cself);
                  _vala_ccode_node_unref0 (cself);
                  cself = (ValaCCodeExpression*) _tmp131_;
            }
            _tmp132_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, this_type);
            if (_tmp132_) {
                  ValaMemberAccess* _tmp133_ = NULL;
                  ValaMemberAccess* ma;
                  ValaParameter* _tmp134_ = NULL;
                  ValaParameter* _tmp135_ = NULL;
                  ValaDataType* _tmp136_ = NULL;
                  ValaDataType* _tmp137_ = NULL;
                  ValaDataType* _tmp138_;
                  ValaParameter* _tmp139_ = NULL;
                  ValaDataType* _tmp140_ = NULL;
                  ValaParameter* _tmp141_ = NULL;
                  ValaCCodeExpression* _tmp142_ = NULL;
                  _tmp133_ = vala_member_access_new_simple ("this", NULL);
                  ma = _tmp133_;
                  _tmp134_ = vala_method_get_this_parameter (m);
                  vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) _tmp134_);
                  _tmp135_ = vala_method_get_this_parameter (m);
                  _tmp136_ = vala_variable_get_variable_type ((ValaVariable*) _tmp135_);
                  _tmp137_ = vala_data_type_copy (_tmp136_);
                  _tmp138_ = _tmp137_;
                  vala_expression_set_value_type ((ValaExpression*) ma, _tmp138_);
                  _vala_code_node_unref0 (_tmp138_);
                  vala_code_visitor_visit_member_access ((ValaCodeVisitor*) self, ma);
                  _tmp139_ = vala_method_get_this_parameter (m);
                  _tmp140_ = vala_variable_get_variable_type ((ValaVariable*) _tmp139_);
                  _tmp141_ = vala_method_get_this_parameter (m);
                  _tmp142_ = vala_ccode_base_module_get_ref_cexpression ((ValaCCodeBaseModule*) self, _tmp140_, cself, (ValaExpression*) ma, (ValaCodeNode*) _tmp141_);
                  _vala_ccode_node_unref0 (cself);
                  cself = _tmp142_;
                  _vala_code_node_unref0 (ma);
            }
            _tmp143_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp144_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "self");
            _tmp145_ = _tmp144_;
            vala_ccode_function_add_assignment (_tmp143_, (ValaCCodeExpression*) _tmp145_, cself);
            _vala_ccode_node_unref0 (_tmp145_);
            _vala_ccode_node_unref0 (cself);
            _vala_code_node_unref0 (this_type);
      }
      {
            ValaList* _tmp146_ = NULL;
            ValaList* _param_list;
            gint _tmp147_;
            gint _param_size;
            gint _param_index;
            _tmp146_ = vala_method_get_parameters (m);
            _param_list = _tmp146_;
            _tmp147_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp147_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp148_ = NULL;
                  ValaParameter* param;
                  ValaParameterDirection _tmp149_;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp148_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp148_;
                  _tmp149_ = vala_parameter_get_direction (param);
                  if (_tmp149_ != VALA_PARAMETER_DIRECTION_OUT) {
                        ValaDataType* _tmp150_ = NULL;
                        ValaDataType* _tmp151_ = NULL;
                        ValaDataType* param_type;
                        const gchar* _tmp152_ = NULL;
                        gchar* _tmp153_ = NULL;
                        gchar* _tmp154_;
                        ValaCCodeIdentifier* _tmp155_ = NULL;
                        ValaCCodeExpression* _tmp156_;
                        ValaCCodeExpression* cparam;
                        ValaDataType* _tmp157_ = NULL;
                        gboolean _tmp158_;
                        gboolean _tmp160_ = FALSE;
                        gboolean _tmp161_;
                        ValaCCodeFunction* _tmp171_ = NULL;
                        const gchar* _tmp172_ = NULL;
                        gchar* _tmp173_ = NULL;
                        gchar* _tmp174_;
                        ValaCCodeMemberAccess* _tmp175_ = NULL;
                        ValaCCodeMemberAccess* _tmp176_;
                        ValaDataType* _tmp177_ = NULL;
                        _tmp150_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp151_ = vala_data_type_copy (_tmp150_);
                        param_type = _tmp151_;
                        vala_data_type_set_value_owned (param_type, TRUE);
                        _tmp152_ = vala_symbol_get_name ((ValaSymbol*) param);
                        _tmp153_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp152_);
                        _tmp154_ = _tmp153_;
                        _tmp155_ = vala_ccode_identifier_new (_tmp154_);
                        _tmp156_ = (ValaCCodeExpression*) _tmp155_;
                        _g_free0 (_tmp154_);
                        cparam = _tmp156_;
                        _tmp157_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp158_ = vala_data_type_is_real_non_null_struct_type (_tmp157_);
                        if (_tmp158_) {
                              ValaCCodeUnaryExpression* _tmp159_ = NULL;
                              _tmp159_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cparam);
                              _vala_ccode_node_unref0 (cparam);
                              cparam = (ValaCCodeExpression*) _tmp159_;
                        }
                        _tmp161_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, param_type);
                        if (_tmp161_) {
                              ValaDataType* _tmp162_ = NULL;
                              gboolean _tmp163_;
                              _tmp162_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp163_ = vala_data_type_get_value_owned (_tmp162_);
                              _tmp160_ = !_tmp163_;
                        } else {
                              _tmp160_ = FALSE;
                        }
                        if (_tmp160_) {
                              const gchar* _tmp164_ = NULL;
                              ValaMemberAccess* _tmp165_ = NULL;
                              ValaMemberAccess* ma;
                              ValaDataType* _tmp166_ = NULL;
                              ValaDataType* _tmp167_ = NULL;
                              ValaDataType* _tmp168_;
                              ValaDataType* _tmp169_ = NULL;
                              ValaCCodeExpression* _tmp170_ = NULL;
                              _tmp164_ = vala_symbol_get_name ((ValaSymbol*) param);
                              _tmp165_ = vala_member_access_new_simple (_tmp164_, NULL);
                              ma = _tmp165_;
                              vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
                              _tmp166_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp167_ = vala_data_type_copy (_tmp166_);
                              _tmp168_ = _tmp167_;
                              vala_expression_set_value_type ((ValaExpression*) ma, _tmp168_);
                              _vala_code_node_unref0 (_tmp168_);
                              vala_code_visitor_visit_member_access ((ValaCodeVisitor*) self, ma);
                              _tmp169_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp170_ = vala_ccode_base_module_get_ref_cexpression ((ValaCCodeBaseModule*) self, _tmp169_, cparam, (ValaExpression*) ma, (ValaCodeNode*) param);
                              _vala_ccode_node_unref0 (cparam);
                              cparam = _tmp170_;
                              _vala_code_node_unref0 (ma);
                        }
                        _tmp171_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp172_ = vala_symbol_get_name ((ValaSymbol*) param);
                        _tmp173_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp172_);
                        _tmp174_ = _tmp173_;
                        _tmp175_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp174_);
                        _tmp176_ = _tmp175_;
                        vala_ccode_function_add_assignment (_tmp171_, (ValaCCodeExpression*) _tmp176_, cparam);
                        _vala_ccode_node_unref0 (_tmp176_);
                        _g_free0 (_tmp174_);
                        _tmp177_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (VALA_IS_ARRAY_TYPE (_tmp177_)) {
                              ValaDataType* _tmp178_ = NULL;
                              ValaArrayType* _tmp179_;
                              ValaArrayType* array_type;
                              gboolean _tmp180_;
                              _tmp178_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp179_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp178_));
                              array_type = _tmp179_;
                              _tmp180_ = vala_variable_get_no_array_length ((ValaVariable*) param);
                              if (!_tmp180_) {
                                    {
                                          gint dim;
                                          dim = 1;
                                          {
                                                gboolean _tmp181_;
                                                _tmp181_ = TRUE;
                                                while (TRUE) {
                                                      gint _tmp182_;
                                                      ValaCCodeFunction* _tmp183_ = NULL;
                                                      gchar* _tmp184_ = NULL;
                                                      gchar* _tmp185_;
                                                      ValaCCodeMemberAccess* _tmp186_ = NULL;
                                                      ValaCCodeMemberAccess* _tmp187_;
                                                      gchar* _tmp188_ = NULL;
                                                      gchar* _tmp189_;
                                                      ValaCCodeIdentifier* _tmp190_ = NULL;
                                                      ValaCCodeIdentifier* _tmp191_;
                                                      if (!_tmp181_) {
                                                            dim++;
                                                      }
                                                      _tmp181_ = FALSE;
                                                      _tmp182_ = vala_array_type_get_rank (array_type);
                                                      if (!(dim <= _tmp182_)) {
                                                            break;
                                                      }
                                                      _tmp183_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                      _tmp184_ = vala_ccode_base_module_get_parameter_array_length_cname ((ValaCCodeBaseModule*) self, param, dim);
                                                      _tmp185_ = _tmp184_;
                                                      _tmp186_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp185_);
                                                      _tmp187_ = _tmp186_;
                                                      _tmp188_ = vala_ccode_base_module_get_parameter_array_length_cname ((ValaCCodeBaseModule*) self, param, dim);
                                                      _tmp189_ = _tmp188_;
                                                      _tmp190_ = vala_ccode_identifier_new (_tmp189_);
                                                      _tmp191_ = _tmp190_;
                                                      vala_ccode_function_add_assignment (_tmp183_, (ValaCCodeExpression*) _tmp187_, (ValaCCodeExpression*) _tmp191_);
                                                      _vala_ccode_node_unref0 (_tmp191_);
                                                      _g_free0 (_tmp189_);
                                                      _vala_ccode_node_unref0 (_tmp187_);
                                                      _g_free0 (_tmp185_);
                                                }
                                          }
                                    }
                              }
                              _vala_code_node_unref0 (array_type);
                        } else {
                              ValaDataType* _tmp192_ = NULL;
                              _tmp192_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              if (VALA_IS_DELEGATE_TYPE (_tmp192_)) {
                                    ValaDataType* _tmp193_ = NULL;
                                    ValaDelegateType* _tmp194_;
                                    ValaDelegateType* deleg_type;
                                    ValaDelegate* _tmp195_ = NULL;
                                    gboolean _tmp196_;
                                    _tmp193_ = vala_variable_get_variable_type ((ValaVariable*) param);
                                    _tmp194_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp193_));
                                    deleg_type = _tmp194_;
                                    _tmp195_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                                    _tmp196_ = vala_delegate_get_has_target (_tmp195_);
                                    if (_tmp196_) {
                                          ValaCCodeFunction* _tmp197_ = NULL;
                                          const gchar* _tmp198_ = NULL;
                                          gchar* _tmp199_ = NULL;
                                          gchar* _tmp200_;
                                          gchar* _tmp201_ = NULL;
                                          gchar* _tmp202_;
                                          ValaCCodeMemberAccess* _tmp203_ = NULL;
                                          ValaCCodeMemberAccess* _tmp204_;
                                          const gchar* _tmp205_ = NULL;
                                          gchar* _tmp206_ = NULL;
                                          gchar* _tmp207_;
                                          gchar* _tmp208_ = NULL;
                                          gchar* _tmp209_;
                                          ValaCCodeIdentifier* _tmp210_ = NULL;
                                          ValaCCodeIdentifier* _tmp211_;
                                          gboolean _tmp212_;
                                          _tmp197_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                          _tmp198_ = vala_symbol_get_name ((ValaSymbol*) param);
                                          _tmp199_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp198_);
                                          _tmp200_ = _tmp199_;
                                          _tmp201_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, _tmp200_);
                                          _tmp202_ = _tmp201_;
                                          _tmp203_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp202_);
                                          _tmp204_ = _tmp203_;
                                          _tmp205_ = vala_symbol_get_name ((ValaSymbol*) param);
                                          _tmp206_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp205_);
                                          _tmp207_ = _tmp206_;
                                          _tmp208_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, _tmp207_);
                                          _tmp209_ = _tmp208_;
                                          _tmp210_ = vala_ccode_identifier_new (_tmp209_);
                                          _tmp211_ = _tmp210_;
                                          vala_ccode_function_add_assignment (_tmp197_, (ValaCCodeExpression*) _tmp204_, (ValaCCodeExpression*) _tmp211_);
                                          _vala_ccode_node_unref0 (_tmp211_);
                                          _g_free0 (_tmp209_);
                                          _g_free0 (_tmp207_);
                                          _vala_ccode_node_unref0 (_tmp204_);
                                          _g_free0 (_tmp202_);
                                          _g_free0 (_tmp200_);
                                          _tmp212_ = vala_data_type_get_value_owned ((ValaDataType*) deleg_type);
                                          if (_tmp212_) {
                                                ValaCCodeFunction* _tmp213_ = NULL;
                                                const gchar* _tmp214_ = NULL;
                                                gchar* _tmp215_ = NULL;
                                                gchar* _tmp216_;
                                                gchar* _tmp217_ = NULL;
                                                gchar* _tmp218_;
                                                ValaCCodeMemberAccess* _tmp219_ = NULL;
                                                ValaCCodeMemberAccess* _tmp220_;
                                                const gchar* _tmp221_ = NULL;
                                                gchar* _tmp222_ = NULL;
                                                gchar* _tmp223_;
                                                gchar* _tmp224_ = NULL;
                                                gchar* _tmp225_;
                                                ValaCCodeIdentifier* _tmp226_ = NULL;
                                                ValaCCodeIdentifier* _tmp227_;
                                                _tmp213_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                _tmp214_ = vala_symbol_get_name ((ValaSymbol*) param);
                                                _tmp215_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp214_);
                                                _tmp216_ = _tmp215_;
                                                _tmp217_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, _tmp216_);
                                                _tmp218_ = _tmp217_;
                                                _tmp219_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp218_);
                                                _tmp220_ = _tmp219_;
                                                _tmp221_ = vala_symbol_get_name ((ValaSymbol*) param);
                                                _tmp222_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp221_);
                                                _tmp223_ = _tmp222_;
                                                _tmp224_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, _tmp223_);
                                                _tmp225_ = _tmp224_;
                                                _tmp226_ = vala_ccode_identifier_new (_tmp225_);
                                                _tmp227_ = _tmp226_;
                                                vala_ccode_function_add_assignment (_tmp213_, (ValaCCodeExpression*) _tmp220_, (ValaCCodeExpression*) _tmp227_);
                                                _vala_ccode_node_unref0 (_tmp227_);
                                                _g_free0 (_tmp225_);
                                                _g_free0 (_tmp223_);
                                                _vala_ccode_node_unref0 (_tmp220_);
                                                _g_free0 (_tmp218_);
                                                _g_free0 (_tmp216_);
                                          }
                                    }
                                    _vala_code_node_unref0 (deleg_type);
                              }
                        }
                        _vala_ccode_node_unref0 (cparam);
                        _vala_code_node_unref0 (param_type);
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp228_ = vala_method_get_real_cname (m);
      _tmp229_ = _tmp228_;
      _tmp230_ = g_strconcat (_tmp229_, "_co", NULL);
      _tmp231_ = _tmp230_;
      _tmp232_ = vala_ccode_identifier_new (_tmp231_);
      _tmp233_ = _tmp232_;
      _tmp234_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp233_);
      _tmp235_ = _tmp234_;
      _vala_ccode_node_unref0 (_tmp233_);
      _g_free0 (_tmp231_);
      _g_free0 (_tmp229_);
      ccall = _tmp235_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) data_var);
      _tmp236_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp236_, (ValaCCodeExpression*) ccall);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, asyncfunc);
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (set_op_res_call);
      _vala_code_node_unref0 (cl);
      _vala_ccode_node_unref0 (create_result);
      _vala_ccode_node_unref0 (data_var);
      _vala_ccode_node_unref0 (dataalloc);
      _vala_map_unref0 (cparam_map);
      _vala_ccode_node_unref0 (asyncfunc);
      _g_free0 (dataname);
}


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


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


static void vala_gasync_module_append_struct (ValaGAsyncModule* self, ValaCCodeStruct* structure) {
      const gchar* _tmp0_ = NULL;
      gchar* _tmp1_ = NULL;
      gchar* _tmp2_;
      ValaCCodeVariableDeclarator* _tmp3_ = NULL;
      ValaCCodeVariableDeclarator* _tmp4_;
      ValaCCodeVariableDeclarator* typename;
      const gchar* _tmp5_ = NULL;
      gchar* _tmp6_;
      gchar* _tmp7_;
      ValaCCodeTypeDefinition* _tmp8_ = NULL;
      ValaCCodeTypeDefinition* _tmp9_;
      ValaCCodeTypeDefinition* _typedef_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (structure != NULL);
      _tmp0_ = vala_ccode_struct_get_name (structure);
      _tmp1_ = string_substring (_tmp0_, (glong) 1, (glong) (-1));
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_ccode_variable_declarator_new (_tmp2_, NULL, NULL);
      _tmp4_ = _tmp3_;
      _g_free0 (_tmp2_);
      typename = _tmp4_;
      _tmp5_ = vala_ccode_struct_get_name (structure);
      _tmp6_ = g_strconcat ("struct ", _tmp5_, NULL);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_ccode_type_definition_new (_tmp7_, (ValaCCodeDeclarator*) typename);
      _tmp9_ = _tmp8_;
      _g_free0 (_tmp7_);
      _typedef_ = _tmp9_;
      vala_ccode_file_add_type_declaration (((ValaCCodeBaseModule*) self)->cfile, (ValaCCodeNode*) _typedef_);
      vala_ccode_file_add_type_definition (((ValaCCodeBaseModule*) self)->cfile, (ValaCCodeNode*) structure);
      _vala_ccode_node_unref0 (_typedef_);
      _vala_ccode_node_unref0 (typename);
}


static void vala_gasync_module_append_function (ValaGAsyncModule* self, ValaCCodeFunction* function) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (function != NULL);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, function);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, function);
}


static void vala_gasync_module_real_generate_method_declaration (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeFile* decl_space) {
      ValaGAsyncModule * self;
      gboolean _tmp0_;
      self = (ValaGAsyncModule*) base;
      g_return_if_fail (m != NULL);
      g_return_if_fail (decl_space != NULL);
      _tmp0_ = vala_method_get_coroutine (m);
      if (_tmp0_) {
            gchar* _tmp1_ = NULL;
            gchar* _tmp2_;
            gboolean _tmp3_;
            gboolean _tmp4_;
            gchar* _tmp5_ = NULL;
            gchar* _tmp6_;
            ValaCCodeFunction* _tmp7_ = NULL;
            ValaCCodeFunction* _tmp8_;
            ValaCCodeFunction* asyncfunc;
            ValaHashMap* _tmp9_ = NULL;
            ValaHashMap* cparam_map;
            gint _tmp10_;
            ValaCCodeParameter* _tmp11_ = NULL;
            ValaCCodeParameter* _tmp12_;
            gint _tmp13_;
            ValaCCodeParameter* _tmp14_ = NULL;
            ValaCCodeParameter* _tmp15_;
            gboolean _tmp16_;
            gchar* _tmp18_ = NULL;
            gchar* _tmp19_;
            ValaCCodeFunction* _tmp20_ = NULL;
            ValaCCodeFunction* _tmp21_;
            ValaCCodeFunction* finishfunc;
            ValaHashMap* _tmp22_ = NULL;
            gint _tmp23_;
            ValaCCodeParameter* _tmp24_ = NULL;
            ValaCCodeParameter* _tmp25_;
            gboolean _tmp26_;
            _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_);
            asyncfunc = _tmp8_;
            _tmp9_ = 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 = _tmp9_;
            _tmp10_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-1), FALSE);
            _tmp11_ = vala_ccode_parameter_new ("_callback_", "GAsyncReadyCallback");
            _tmp12_ = _tmp11_;
            vala_map_set ((ValaMap*) cparam_map, GINT_TO_POINTER (_tmp10_), _tmp12_);
            _vala_ccode_node_unref0 (_tmp12_);
            _tmp13_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, -0.9, FALSE);
            _tmp14_ = vala_ccode_parameter_new ("_user_data_", "gpointer");
            _tmp15_ = _tmp14_;
            vala_map_set ((ValaMap*) cparam_map, GINT_TO_POINTER (_tmp13_), _tmp15_);
            _vala_ccode_node_unref0 (_tmp15_);
            vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, asyncfunc, NULL, NULL, NULL, 1);
            _tmp16_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
            if (_tmp16_) {
                  ValaCCodeModifiers _tmp17_;
                  _tmp17_ = vala_ccode_function_get_modifiers (asyncfunc);
                  vala_ccode_function_set_modifiers (asyncfunc, _tmp17_ | VALA_CCODE_MODIFIERS_STATIC);
            }
            vala_ccode_file_add_function_declaration (decl_space, asyncfunc);
            _tmp18_ = vala_method_get_finish_cname (m);
            _tmp19_ = _tmp18_;
            _tmp20_ = vala_ccode_function_new (_tmp19_, "void");
            _tmp21_ = _tmp20_;
            _g_free0 (_tmp19_);
            finishfunc = _tmp21_;
            _tmp22_ = 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 = _tmp22_;
            _tmp23_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, 0.1, FALSE);
            _tmp24_ = vala_ccode_parameter_new ("_res_", "GAsyncResult*");
            _tmp25_ = _tmp24_;
            vala_map_set ((ValaMap*) cparam_map, GINT_TO_POINTER (_tmp23_), _tmp25_);
            _vala_ccode_node_unref0 (_tmp25_);
            vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, finishfunc, NULL, NULL, NULL, 2);
            _tmp26_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
            if (_tmp26_) {
                  ValaCCodeModifiers _tmp27_;
                  _tmp27_ = vala_ccode_function_get_modifiers (finishfunc);
                  vala_ccode_function_set_modifiers (finishfunc, _tmp27_ | VALA_CCODE_MODIFIERS_STATIC);
            }
            vala_ccode_file_add_function_declaration (decl_space, finishfunc);
            _vala_ccode_node_unref0 (finishfunc);
            _vala_map_unref0 (cparam_map);
            _vala_ccode_node_unref0 (asyncfunc);
      } else {
            VALA_CCODE_BASE_MODULE_CLASS (vala_gasync_module_parent_class)->generate_method_declaration ((ValaCCodeBaseModule*) VALA_GSIGNAL_MODULE (self), m, decl_space);
      }
}


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


static void vala_gasync_module_real_visit_method (ValaCodeVisitor* base, ValaMethod* m) {
      ValaGAsyncModule * self;
      gboolean _tmp0_;
      self = (ValaGAsyncModule*) base;
      g_return_if_fail (m != NULL);
      _tmp0_ = vala_method_get_coroutine (m);
      if (_tmp0_) {
            gboolean _tmp1_;
            gboolean _tmp2_ = FALSE;
            gboolean _tmp3_;
            gboolean _tmp11_ = FALSE;
            gboolean _tmp12_;
            vala_ccode_file_add_include (((ValaCCodeBaseModule*) self)->cfile, "gio/gio.h", FALSE);
            _tmp1_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
            if (!_tmp1_) {
                  vala_ccode_file_add_include (((ValaCCodeBaseModule*) self)->header_file, "gio/gio.h", FALSE);
            }
            _tmp3_ = vala_method_get_is_abstract (m);
            if (!_tmp3_) {
                  ValaBlock* _tmp4_ = NULL;
                  _tmp4_ = vala_subroutine_get_body ((ValaSubroutine*) m);
                  _tmp2_ = _tmp4_ != NULL;
            } else {
                  _tmp2_ = FALSE;
            }
            if (_tmp2_) {
                  ValaCCodeStruct* _tmp5_ = NULL;
                  ValaCCodeStruct* data;
                  ValaCCodeStruct* _tmp6_;
                  ValaCCodeFunction* _tmp7_ = NULL;
                  ValaCCodeFunction* _tmp8_;
                  _tmp5_ = vala_gasync_module_generate_data_struct (self, m);
                  data = _tmp5_;
                  _tmp6_ = _vala_ccode_node_ref0 (data);
                  _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->closure_struct);
                  ((ValaCCodeBaseModule*) self)->closure_struct = _tmp6_;
                  _tmp7_ = vala_gasync_module_generate_free_function (self, m);
                  _tmp8_ = _tmp7_;
                  vala_gasync_module_append_function (self, _tmp8_);
                  _vala_ccode_node_unref0 (_tmp8_);
                  vala_gasync_module_generate_async_function (self, m);
                  vala_gasync_module_generate_finish_function (self, m);
                  VALA_CODE_VISITOR_CLASS (vala_gasync_module_parent_class)->visit_method ((ValaCodeVisitor*) VALA_GSIGNAL_MODULE (self), m);
                  _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->closure_struct);
                  ((ValaCCodeBaseModule*) self)->closure_struct = NULL;
                  vala_gasync_module_append_struct (self, data);
                  _vala_ccode_node_unref0 (data);
            } else {
                  gboolean _tmp9_;
                  gboolean _tmp10_;
                  vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->cfile);
                  _tmp9_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
                  if (!_tmp9_) {
                        vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->header_file);
                  }
                  _tmp10_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
                  if (!_tmp10_) {
                        vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->internal_header_file);
                  }
            }
            _tmp12_ = vala_method_get_is_abstract (m);
            if (_tmp12_) {
                  _tmp11_ = TRUE;
            } else {
                  gboolean _tmp13_;
                  _tmp13_ = vala_method_get_is_virtual (m);
                  _tmp11_ = _tmp13_;
            }
            if (_tmp11_) {
                  ValaHashMap* _tmp14_ = NULL;
                  ValaHashMap* cparam_map;
                  ValaHashMap* _tmp15_ = NULL;
                  ValaHashMap* carg_map;
                  ValaVoidType* _tmp16_ = NULL;
                  ValaVoidType* _tmp17_;
                  ValaHashMap* _tmp18_ = NULL;
                  ValaHashMap* _tmp19_ = NULL;
                  ValaDataType* _tmp20_ = NULL;
                  _tmp14_ = 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 = _tmp14_;
                  _tmp15_ = 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 = _tmp15_;
                  _tmp16_ = vala_void_type_new (NULL);
                  _tmp17_ = _tmp16_;
                  vala_ccode_method_module_generate_vfunc ((ValaCCodeMethodModule*) self, m, (ValaDataType*) _tmp17_, (ValaMap*) cparam_map, (ValaMap*) carg_map, "", 1);
                  _vala_code_node_unref0 (_tmp17_);
                  _tmp18_ = 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 = _tmp18_;
                  _tmp19_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
                  _vala_map_unref0 (carg_map);
                  carg_map = _tmp19_;
                  _tmp20_ = vala_method_get_return_type (m);
                  vala_ccode_method_module_generate_vfunc ((ValaCCodeMethodModule*) self, m, _tmp20_, (ValaMap*) cparam_map, (ValaMap*) carg_map, "_finish", 2);
                  _vala_map_unref0 (carg_map);
                  _vala_map_unref0 (cparam_map);
            }
      } else {
            VALA_CODE_VISITOR_CLASS (vala_gasync_module_parent_class)->visit_method ((ValaCodeVisitor*) VALA_GSIGNAL_MODULE (self), m);
      }
}


static void vala_gasync_module_generate_finish_function (ValaGAsyncModule* self, ValaMethod* m) {
      ValaCCodeBaseModuleEmitContext* _tmp0_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      gchar* _tmp6_;
      gchar* _tmp7_;
      gchar* dataname;
      gchar* _tmp8_ = NULL;
      gchar* _tmp9_;
      ValaCCodeFunction* _tmp10_ = NULL;
      ValaCCodeFunction* _tmp11_;
      ValaCCodeFunction* finishfunc;
      ValaHashMap* _tmp12_ = NULL;
      ValaHashMap* cparam_map;
      gint _tmp13_;
      ValaCCodeParameter* _tmp14_ = NULL;
      ValaCCodeParameter* _tmp15_;
      gboolean _tmp16_ = FALSE;
      gboolean _tmp17_ = FALSE;
      gboolean _tmp18_;
      ValaDataType* _tmp22_ = NULL;
      ValaDataType* _tmp23_;
      ValaDataType* return_type;
      gboolean _tmp24_ = FALSE;
      ValaCCodeIdentifier* _tmp32_ = NULL;
      ValaCCodeIdentifier* data_var;
      ValaCCodeFunction* _tmp33_ = NULL;
      gchar* _tmp34_;
      gchar* _tmp35_;
      ValaCCodeVariableDeclarator* _tmp36_ = NULL;
      ValaCCodeVariableDeclarator* _tmp37_;
      ValaCCodeIdentifier* _tmp38_ = NULL;
      ValaCCodeIdentifier* _tmp39_;
      ValaCCodeFunctionCall* _tmp40_ = NULL;
      ValaCCodeFunctionCall* _tmp41_;
      ValaCCodeFunctionCall* simple_async_result_cast;
      ValaCCodeIdentifier* _tmp42_ = NULL;
      ValaCCodeIdentifier* _tmp43_;
      ValaList* _tmp44_ = NULL;
      ValaList* _tmp45_;
      gint _tmp46_;
      gboolean _tmp47_;
      ValaCCodeIdentifier* _tmp56_ = NULL;
      ValaCCodeIdentifier* _tmp57_;
      ValaCCodeFunctionCall* _tmp58_ = NULL;
      ValaCCodeFunctionCall* _tmp59_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeFunction* _tmp60_ = NULL;
      gboolean _tmp88_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != 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);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_symbol_lower_case_to_camel_case (_tmp3_);
      _tmp5_ = _tmp4_;
      _tmp6_ = g_strconcat (_tmp5_, "Data", NULL);
      _tmp7_ = _tmp6_;
      _g_free0 (_tmp5_);
      _g_free0 (_tmp3_);
      dataname = _tmp7_;
      _tmp8_ = vala_method_get_finish_real_cname (m);
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_function_new (_tmp9_, "void");
      _tmp11_ = _tmp10_;
      _g_free0 (_tmp9_);
      finishfunc = _tmp11_;
      _tmp12_ = 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 = _tmp12_;
      _tmp13_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, 0.1, FALSE);
      _tmp14_ = vala_ccode_parameter_new ("_res_", "GAsyncResult*");
      _tmp15_ = _tmp14_;
      vala_map_set ((ValaMap*) cparam_map, GINT_TO_POINTER (_tmp13_), _tmp15_);
      _vala_ccode_node_unref0 (_tmp15_);
      vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->cfile, (ValaMap*) cparam_map, finishfunc, NULL, NULL, NULL, 2);
      _tmp18_ = vala_symbol_is_private_symbol ((ValaSymbol*) m);
      if (_tmp18_) {
            _tmp17_ = TRUE;
      } else {
            ValaMethod* _tmp19_ = NULL;
            _tmp19_ = vala_method_get_base_method (m);
            _tmp17_ = _tmp19_ != NULL;
      }
      if (_tmp17_) {
            _tmp16_ = TRUE;
      } else {
            ValaMethod* _tmp20_ = NULL;
            _tmp20_ = vala_method_get_base_interface_method (m);
            _tmp16_ = _tmp20_ != NULL;
      }
      if (_tmp16_) {
            ValaCCodeModifiers _tmp21_;
            _tmp21_ = vala_ccode_function_get_modifiers (finishfunc);
            vala_ccode_function_set_modifiers (finishfunc, _tmp21_ | VALA_CCODE_MODIFIERS_STATIC);
      }
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, finishfunc);
      _tmp22_ = vala_method_get_return_type (m);
      _tmp23_ = _vala_code_node_ref0 (_tmp22_);
      return_type = _tmp23_;
      if (!VALA_IS_VOID_TYPE (return_type)) {
            gboolean _tmp25_;
            _tmp25_ = vala_data_type_is_real_non_null_struct_type (return_type);
            _tmp24_ = !_tmp25_;
      } else {
            _tmp24_ = FALSE;
      }
      if (_tmp24_) {
            ValaCCodeFunction* _tmp26_ = NULL;
            ValaDataType* _tmp27_ = NULL;
            gchar* _tmp28_ = NULL;
            gchar* _tmp29_;
            ValaCCodeVariableDeclarator* _tmp30_ = NULL;
            ValaCCodeVariableDeclarator* _tmp31_;
            _tmp26_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp27_ = vala_method_get_return_type (m);
            _tmp28_ = vala_data_type_get_cname (_tmp27_);
            _tmp29_ = _tmp28_;
            _tmp30_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
            _tmp31_ = _tmp30_;
            vala_ccode_function_add_declaration (_tmp26_, _tmp29_, (ValaCCodeDeclarator*) _tmp31_, 0);
            _vala_ccode_node_unref0 (_tmp31_);
            _g_free0 (_tmp29_);
      }
      _tmp32_ = vala_ccode_identifier_new ("_data_");
      data_var = _tmp32_;
      _tmp33_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp34_ = g_strconcat (dataname, "*", NULL);
      _tmp35_ = _tmp34_;
      _tmp36_ = vala_ccode_variable_declarator_new ("_data_", NULL, NULL);
      _tmp37_ = _tmp36_;
      vala_ccode_function_add_declaration (_tmp33_, _tmp35_, (ValaCCodeDeclarator*) _tmp37_, 0);
      _vala_ccode_node_unref0 (_tmp37_);
      _g_free0 (_tmp35_);
      _tmp38_ = vala_ccode_identifier_new ("G_SIMPLE_ASYNC_RESULT");
      _tmp39_ = _tmp38_;
      _tmp40_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp39_);
      _tmp41_ = _tmp40_;
      _vala_ccode_node_unref0 (_tmp39_);
      simple_async_result_cast = _tmp41_;
      _tmp42_ = vala_ccode_identifier_new ("_res_");
      _tmp43_ = _tmp42_;
      vala_ccode_function_call_add_argument (simple_async_result_cast, (ValaCCodeExpression*) _tmp43_);
      _vala_ccode_node_unref0 (_tmp43_);
      _tmp44_ = vala_code_node_get_error_types ((ValaCodeNode*) m);
      _tmp45_ = _tmp44_;
      _tmp46_ = vala_collection_get_size ((ValaCollection*) _tmp45_);
      _tmp47_ = _tmp46_ > 0;
      _vala_iterable_unref0 (_tmp45_);
      if (_tmp47_) {
            ValaCCodeIdentifier* _tmp48_ = NULL;
            ValaCCodeIdentifier* _tmp49_;
            ValaCCodeFunctionCall* _tmp50_ = NULL;
            ValaCCodeFunctionCall* _tmp51_;
            ValaCCodeFunctionCall* propagate_error;
            ValaCCodeIdentifier* _tmp52_ = NULL;
            ValaCCodeIdentifier* _tmp53_;
            ValaCCodeFunction* _tmp54_ = NULL;
            ValaCCodeFunction* _tmp55_ = NULL;
            _tmp48_ = vala_ccode_identifier_new ("g_simple_async_result_propagate_error");
            _tmp49_ = _tmp48_;
            _tmp50_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp49_);
            _tmp51_ = _tmp50_;
            _vala_ccode_node_unref0 (_tmp49_);
            propagate_error = _tmp51_;
            vala_ccode_function_call_add_argument (propagate_error, (ValaCCodeExpression*) simple_async_result_cast);
            _tmp52_ = vala_ccode_identifier_new ("error");
            _tmp53_ = _tmp52_;
            vala_ccode_function_call_add_argument (propagate_error, (ValaCCodeExpression*) _tmp53_);
            _vala_ccode_node_unref0 (_tmp53_);
            _tmp54_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_open_if (_tmp54_, (ValaCCodeExpression*) propagate_error);
            vala_ccode_base_module_return_default_value ((ValaCCodeBaseModule*) self, return_type);
            _tmp55_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_close (_tmp55_);
            _vala_ccode_node_unref0 (propagate_error);
      }
      _tmp56_ = vala_ccode_identifier_new ("g_simple_async_result_get_op_res_gpointer");
      _tmp57_ = _tmp56_;
      _tmp58_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp57_);
      _tmp59_ = _tmp58_;
      _vala_ccode_node_unref0 (_tmp57_);
      ccall = _tmp59_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) simple_async_result_cast);
      _tmp60_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_assignment (_tmp60_, (ValaCCodeExpression*) data_var, (ValaCCodeExpression*) ccall);
      {
            ValaList* _tmp61_ = NULL;
            ValaList* _param_list;
            gint _tmp62_;
            gint _param_size;
            gint _param_index;
            _tmp61_ = vala_method_get_parameters (m);
            _param_list = _tmp61_;
            _tmp62_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp62_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp63_ = NULL;
                  ValaParameter* param;
                  ValaParameterDirection _tmp64_;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp63_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp63_;
                  _tmp64_ = vala_parameter_get_direction (param);
                  if (_tmp64_ != VALA_PARAMETER_DIRECTION_IN) {
                        ValaCCodeFunction* _tmp65_ = NULL;
                        const gchar* _tmp66_ = NULL;
                        ValaCCodeIdentifier* _tmp67_ = NULL;
                        ValaCCodeIdentifier* _tmp68_;
                        ValaCCodeUnaryExpression* _tmp69_ = NULL;
                        ValaCCodeUnaryExpression* _tmp70_;
                        const gchar* _tmp71_ = NULL;
                        gchar* _tmp72_ = NULL;
                        gchar* _tmp73_;
                        ValaCCodeMemberAccess* _tmp74_ = NULL;
                        ValaCCodeMemberAccess* _tmp75_;
                        gboolean _tmp76_ = FALSE;
                        ValaDataType* _tmp77_ = NULL;
                        _tmp65_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp66_ = vala_symbol_get_name ((ValaSymbol*) param);
                        _tmp67_ = vala_ccode_identifier_new (_tmp66_);
                        _tmp68_ = _tmp67_;
                        _tmp69_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp68_);
                        _tmp70_ = _tmp69_;
                        _tmp71_ = vala_symbol_get_name ((ValaSymbol*) param);
                        _tmp72_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp71_);
                        _tmp73_ = _tmp72_;
                        _tmp74_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp73_);
                        _tmp75_ = _tmp74_;
                        vala_ccode_function_add_assignment (_tmp65_, (ValaCCodeExpression*) _tmp70_, (ValaCCodeExpression*) _tmp75_);
                        _vala_ccode_node_unref0 (_tmp75_);
                        _g_free0 (_tmp73_);
                        _vala_ccode_node_unref0 (_tmp70_);
                        _vala_ccode_node_unref0 (_tmp68_);
                        _tmp77_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (!VALA_IS_VALUE_TYPE (_tmp77_)) {
                              _tmp76_ = TRUE;
                        } else {
                              ValaDataType* _tmp78_ = NULL;
                              gboolean _tmp79_;
                              _tmp78_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp79_ = vala_data_type_get_nullable (_tmp78_);
                              _tmp76_ = _tmp79_;
                        }
                        if (_tmp76_) {
                              ValaCCodeFunction* _tmp80_ = NULL;
                              const gchar* _tmp81_ = NULL;
                              gchar* _tmp82_ = NULL;
                              gchar* _tmp83_;
                              ValaCCodeMemberAccess* _tmp84_ = NULL;
                              ValaCCodeMemberAccess* _tmp85_;
                              ValaCCodeConstant* _tmp86_ = NULL;
                              ValaCCodeConstant* _tmp87_;
                              _tmp80_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp81_ = vala_symbol_get_name ((ValaSymbol*) param);
                              _tmp82_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp81_);
                              _tmp83_ = _tmp82_;
                              _tmp84_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp83_);
                              _tmp85_ = _tmp84_;
                              _tmp86_ = vala_ccode_constant_new ("NULL");
                              _tmp87_ = _tmp86_;
                              vala_ccode_function_add_assignment (_tmp80_, (ValaCCodeExpression*) _tmp85_, (ValaCCodeExpression*) _tmp87_);
                              _vala_ccode_node_unref0 (_tmp87_);
                              _vala_ccode_node_unref0 (_tmp85_);
                              _g_free0 (_tmp83_);
                        }
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp88_ = vala_data_type_is_real_non_null_struct_type (return_type);
      if (_tmp88_) {
            ValaCCodeMemberAccess* _tmp89_ = NULL;
            ValaCCodeExpression* cexpr;
            gboolean _tmp90_;
            ValaCCodeFunction* _tmp92_ = NULL;
            ValaCCodeIdentifier* _tmp93_ = NULL;
            ValaCCodeIdentifier* _tmp94_;
            ValaCCodeUnaryExpression* _tmp95_ = NULL;
            ValaCCodeUnaryExpression* _tmp96_;
            _tmp89_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "result");
            cexpr = (ValaCCodeExpression*) _tmp89_;
            _tmp90_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, return_type);
            if (_tmp90_) {
                  ValaCCodeExpression* _tmp91_ = NULL;
                  _tmp91_ = vala_ccode_base_module_get_ref_cexpression ((ValaCCodeBaseModule*) self, return_type, cexpr, NULL, (ValaCodeNode*) return_type);
                  _vala_ccode_node_unref0 (cexpr);
                  cexpr = _tmp91_;
            }
            _tmp92_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp93_ = vala_ccode_identifier_new ("result");
            _tmp94_ = _tmp93_;
            _tmp95_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp94_);
            _tmp96_ = _tmp95_;
            vala_ccode_function_add_assignment (_tmp92_, (ValaCCodeExpression*) _tmp96_, cexpr);
            _vala_ccode_node_unref0 (_tmp96_);
            _vala_ccode_node_unref0 (_tmp94_);
            _vala_ccode_node_unref0 (cexpr);
      } else {
            if (!VALA_IS_VOID_TYPE (return_type)) {
                  ValaCCodeFunction* _tmp97_ = NULL;
                  ValaCCodeIdentifier* _tmp98_ = NULL;
                  ValaCCodeIdentifier* _tmp99_;
                  ValaCCodeMemberAccess* _tmp100_ = NULL;
                  ValaCCodeMemberAccess* _tmp101_;
                  gboolean _tmp131_ = FALSE;
                  ValaCCodeFunction* _tmp138_ = NULL;
                  ValaCCodeIdentifier* _tmp139_ = NULL;
                  ValaCCodeIdentifier* _tmp140_;
                  _tmp97_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp98_ = vala_ccode_identifier_new ("result");
                  _tmp99_ = _tmp98_;
                  _tmp100_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "result");
                  _tmp101_ = _tmp100_;
                  vala_ccode_function_add_assignment (_tmp97_, (ValaCCodeExpression*) _tmp99_, (ValaCCodeExpression*) _tmp101_);
                  _vala_ccode_node_unref0 (_tmp101_);
                  _vala_ccode_node_unref0 (_tmp99_);
                  if (VALA_IS_ARRAY_TYPE (return_type)) {
                        ValaArrayType* _tmp102_;
                        ValaArrayType* array_type;
                        gboolean _tmp103_;
                        _tmp102_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (return_type));
                        array_type = _tmp102_;
                        _tmp103_ = vala_method_get_no_array_length (m);
                        if (!_tmp103_) {
                              {
                                    gint dim;
                                    dim = 1;
                                    {
                                          gboolean _tmp104_;
                                          _tmp104_ = TRUE;
                                          while (TRUE) {
                                                gint _tmp105_;
                                                ValaCCodeFunction* _tmp106_ = NULL;
                                                gchar* _tmp107_ = NULL;
                                                gchar* _tmp108_;
                                                ValaCCodeIdentifier* _tmp109_ = NULL;
                                                ValaCCodeIdentifier* _tmp110_;
                                                ValaCCodeUnaryExpression* _tmp111_ = NULL;
                                                ValaCCodeUnaryExpression* _tmp112_;
                                                gchar* _tmp113_ = NULL;
                                                gchar* _tmp114_;
                                                ValaCCodeMemberAccess* _tmp115_ = NULL;
                                                ValaCCodeMemberAccess* _tmp116_;
                                                if (!_tmp104_) {
                                                      dim++;
                                                }
                                                _tmp104_ = FALSE;
                                                _tmp105_ = vala_array_type_get_rank (array_type);
                                                if (!(dim <= _tmp105_)) {
                                                      break;
                                                }
                                                _tmp106_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                _tmp107_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
                                                _tmp108_ = _tmp107_;
                                                _tmp109_ = vala_ccode_identifier_new (_tmp108_);
                                                _tmp110_ = _tmp109_;
                                                _tmp111_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp110_);
                                                _tmp112_ = _tmp111_;
                                                _tmp113_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
                                                _tmp114_ = _tmp113_;
                                                _tmp115_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp114_);
                                                _tmp116_ = _tmp115_;
                                                vala_ccode_function_add_assignment (_tmp106_, (ValaCCodeExpression*) _tmp112_, (ValaCCodeExpression*) _tmp116_);
                                                _vala_ccode_node_unref0 (_tmp116_);
                                                _g_free0 (_tmp114_);
                                                _vala_ccode_node_unref0 (_tmp112_);
                                                _vala_ccode_node_unref0 (_tmp110_);
                                                _g_free0 (_tmp108_);
                                          }
                                    }
                              }
                        }
                        _vala_code_node_unref0 (array_type);
                  } else {
                        gboolean _tmp117_ = FALSE;
                        if (VALA_IS_DELEGATE_TYPE (return_type)) {
                              ValaDelegate* _tmp118_ = NULL;
                              gboolean _tmp119_;
                              _tmp118_ = vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (return_type));
                              _tmp119_ = vala_delegate_get_has_target (_tmp118_);
                              _tmp117_ = _tmp119_;
                        } else {
                              _tmp117_ = FALSE;
                        }
                        if (_tmp117_) {
                              ValaCCodeFunction* _tmp120_ = NULL;
                              gchar* _tmp121_ = NULL;
                              gchar* _tmp122_;
                              ValaCCodeIdentifier* _tmp123_ = NULL;
                              ValaCCodeIdentifier* _tmp124_;
                              ValaCCodeUnaryExpression* _tmp125_ = NULL;
                              ValaCCodeUnaryExpression* _tmp126_;
                              gchar* _tmp127_ = NULL;
                              gchar* _tmp128_;
                              ValaCCodeMemberAccess* _tmp129_ = NULL;
                              ValaCCodeMemberAccess* _tmp130_;
                              _tmp120_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp121_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp122_ = _tmp121_;
                              _tmp123_ = vala_ccode_identifier_new (_tmp122_);
                              _tmp124_ = _tmp123_;
                              _tmp125_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp124_);
                              _tmp126_ = _tmp125_;
                              _tmp127_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp128_ = _tmp127_;
                              _tmp129_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp128_);
                              _tmp130_ = _tmp129_;
                              vala_ccode_function_add_assignment (_tmp120_, (ValaCCodeExpression*) _tmp126_, (ValaCCodeExpression*) _tmp130_);
                              _vala_ccode_node_unref0 (_tmp130_);
                              _g_free0 (_tmp128_);
                              _vala_ccode_node_unref0 (_tmp126_);
                              _vala_ccode_node_unref0 (_tmp124_);
                              _g_free0 (_tmp122_);
                        }
                  }
                  if (!VALA_IS_VALUE_TYPE (return_type)) {
                        _tmp131_ = TRUE;
                  } else {
                        gboolean _tmp132_;
                        _tmp132_ = vala_data_type_get_nullable (return_type);
                        _tmp131_ = _tmp132_;
                  }
                  if (_tmp131_) {
                        ValaCCodeFunction* _tmp133_ = NULL;
                        ValaCCodeMemberAccess* _tmp134_ = NULL;
                        ValaCCodeMemberAccess* _tmp135_;
                        ValaCCodeConstant* _tmp136_ = NULL;
                        ValaCCodeConstant* _tmp137_;
                        _tmp133_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp134_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "result");
                        _tmp135_ = _tmp134_;
                        _tmp136_ = vala_ccode_constant_new ("NULL");
                        _tmp137_ = _tmp136_;
                        vala_ccode_function_add_assignment (_tmp133_, (ValaCCodeExpression*) _tmp135_, (ValaCCodeExpression*) _tmp137_);
                        _vala_ccode_node_unref0 (_tmp137_);
                        _vala_ccode_node_unref0 (_tmp135_);
                  }
                  _tmp138_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp139_ = vala_ccode_identifier_new ("result");
                  _tmp140_ = _tmp139_;
                  vala_ccode_function_add_return (_tmp138_, (ValaCCodeExpression*) _tmp140_);
                  _vala_ccode_node_unref0 (_tmp140_);
            }
      }
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, finishfunc);
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (simple_async_result_cast);
      _vala_ccode_node_unref0 (data_var);
      _vala_code_node_unref0 (return_type);
      _vala_map_unref0 (cparam_map);
      _vala_ccode_node_unref0 (finishfunc);
      _g_free0 (dataname);
}


static gchar* vala_gasync_module_real_generate_ready_function (ValaCCodeBaseModule* base, ValaMethod* m) {
      ValaGAsyncModule * self;
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_;
      gchar* _tmp5_;
      gchar* dataname;
      gchar* _tmp6_ = NULL;
      gchar* _tmp7_;
      gchar* _tmp8_;
      gchar* _tmp9_;
      ValaCCodeFunction* _tmp10_ = NULL;
      ValaCCodeFunction* _tmp11_;
      ValaCCodeFunction* readyfunc;
      const gchar* _tmp12_ = NULL;
      gboolean _tmp13_;
      ValaCCodeParameter* _tmp16_ = NULL;
      ValaCCodeParameter* _tmp17_;
      ValaCCodeParameter* _tmp18_ = NULL;
      ValaCCodeParameter* _tmp19_;
      ValaCCodeParameter* _tmp20_ = NULL;
      ValaCCodeParameter* _tmp21_;
      ValaCCodeBlock* _tmp22_ = NULL;
      ValaCCodeBlock* readyblock;
      gchar* _tmp23_;
      gchar* _tmp24_;
      ValaCCodeDeclaration* _tmp25_ = NULL;
      ValaCCodeDeclaration* _tmp26_;
      ValaCCodeDeclaration* datadecl;
      ValaCCodeVariableDeclarator* _tmp27_ = NULL;
      ValaCCodeVariableDeclarator* _tmp28_;
      ValaCCodeIdentifier* _tmp29_ = NULL;
      ValaCCodeIdentifier* _tmp30_;
      ValaCCodeIdentifier* _tmp31_ = NULL;
      ValaCCodeIdentifier* _tmp32_;
      ValaCCodeAssignment* _tmp33_ = NULL;
      ValaCCodeAssignment* _tmp34_;
      ValaCCodeExpressionStatement* _tmp35_ = NULL;
      ValaCCodeExpressionStatement* _tmp36_;
      ValaCCodeIdentifier* _tmp37_ = NULL;
      ValaCCodeIdentifier* _tmp38_;
      ValaCCodeMemberAccess* _tmp39_ = NULL;
      ValaCCodeMemberAccess* _tmp40_;
      ValaCCodeIdentifier* _tmp41_ = NULL;
      ValaCCodeIdentifier* _tmp42_;
      ValaCCodeAssignment* _tmp43_ = NULL;
      ValaCCodeAssignment* _tmp44_;
      ValaCCodeExpressionStatement* _tmp45_ = NULL;
      ValaCCodeExpressionStatement* _tmp46_;
      ValaCCodeIdentifier* _tmp47_ = NULL;
      ValaCCodeIdentifier* _tmp48_;
      ValaCCodeMemberAccess* _tmp49_ = NULL;
      ValaCCodeMemberAccess* _tmp50_;
      ValaCCodeIdentifier* _tmp51_ = NULL;
      ValaCCodeIdentifier* _tmp52_;
      ValaCCodeAssignment* _tmp53_ = NULL;
      ValaCCodeAssignment* _tmp54_;
      ValaCCodeExpressionStatement* _tmp55_ = NULL;
      ValaCCodeExpressionStatement* _tmp56_;
      gchar* _tmp57_ = NULL;
      gchar* _tmp58_;
      gchar* _tmp59_;
      gchar* _tmp60_;
      ValaCCodeIdentifier* _tmp61_ = NULL;
      ValaCCodeIdentifier* _tmp62_;
      ValaCCodeFunctionCall* _tmp63_ = NULL;
      ValaCCodeFunctionCall* _tmp64_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeIdentifier* _tmp65_ = NULL;
      ValaCCodeIdentifier* _tmp66_;
      ValaCCodeExpressionStatement* _tmp67_ = NULL;
      ValaCCodeExpressionStatement* _tmp68_;
      ValaCCodeModifiers _tmp69_;
      const gchar* _tmp70_ = NULL;
      gchar* _tmp71_;
      self = (ValaGAsyncModule*) base;
      g_return_val_if_fail (m != NULL, NULL);
      _tmp0_ = vala_method_get_cname (m);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_symbol_lower_case_to_camel_case (_tmp1_);
      _tmp3_ = _tmp2_;
      _tmp4_ = g_strconcat (_tmp3_, "Data", NULL);
      _tmp5_ = _tmp4_;
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      dataname = _tmp5_;
      _tmp6_ = vala_method_get_cname (m);
      _tmp7_ = _tmp6_;
      _tmp8_ = g_strconcat (_tmp7_, "_ready", NULL);
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_function_new (_tmp9_, "void");
      _tmp11_ = _tmp10_;
      _g_free0 (_tmp9_);
      _g_free0 (_tmp7_);
      readyfunc = _tmp11_;
      _tmp12_ = vala_ccode_function_get_name (readyfunc);
      _tmp13_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp12_);
      if (!_tmp13_) {
            const gchar* _tmp14_ = NULL;
            gchar* _tmp15_;
            _tmp14_ = vala_ccode_function_get_name (readyfunc);
            _tmp15_ = g_strdup (_tmp14_);
            result = _tmp15_;
            _vala_ccode_node_unref0 (readyfunc);
            _g_free0 (dataname);
            return result;
      }
      _tmp16_ = vala_ccode_parameter_new ("source_object", "GObject*");
      _tmp17_ = _tmp16_;
      vala_ccode_function_add_parameter (readyfunc, _tmp17_);
      _vala_ccode_node_unref0 (_tmp17_);
      _tmp18_ = vala_ccode_parameter_new ("_res_", "GAsyncResult*");
      _tmp19_ = _tmp18_;
      vala_ccode_function_add_parameter (readyfunc, _tmp19_);
      _vala_ccode_node_unref0 (_tmp19_);
      _tmp20_ = vala_ccode_parameter_new ("_user_data_", "gpointer");
      _tmp21_ = _tmp20_;
      vala_ccode_function_add_parameter (readyfunc, _tmp21_);
      _vala_ccode_node_unref0 (_tmp21_);
      _tmp22_ = vala_ccode_block_new ();
      readyblock = _tmp22_;
      _tmp23_ = g_strconcat (dataname, "*", NULL);
      _tmp24_ = _tmp23_;
      _tmp25_ = vala_ccode_declaration_new (_tmp24_);
      _tmp26_ = _tmp25_;
      _g_free0 (_tmp24_);
      datadecl = _tmp26_;
      _tmp27_ = vala_ccode_variable_declarator_new ("data", NULL, NULL);
      _tmp28_ = _tmp27_;
      vala_ccode_declaration_add_declarator (datadecl, (ValaCCodeDeclarator*) _tmp28_);
      _vala_ccode_node_unref0 (_tmp28_);
      vala_ccode_block_add_statement (readyblock, (ValaCCodeNode*) datadecl);
      _tmp29_ = vala_ccode_identifier_new ("data");
      _tmp30_ = _tmp29_;
      _tmp31_ = vala_ccode_identifier_new ("_user_data_");
      _tmp32_ = _tmp31_;
      _tmp33_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp30_, (ValaCCodeExpression*) _tmp32_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp34_ = _tmp33_;
      _tmp35_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp34_);
      _tmp36_ = _tmp35_;
      vala_ccode_block_add_statement (readyblock, (ValaCCodeNode*) _tmp36_);
      _vala_ccode_node_unref0 (_tmp36_);
      _vala_ccode_node_unref0 (_tmp34_);
      _vala_ccode_node_unref0 (_tmp32_);
      _vala_ccode_node_unref0 (_tmp30_);
      _tmp37_ = vala_ccode_identifier_new ("data");
      _tmp38_ = _tmp37_;
      _tmp39_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp38_, "_source_object_");
      _tmp40_ = _tmp39_;
      _tmp41_ = vala_ccode_identifier_new ("source_object");
      _tmp42_ = _tmp41_;
      _tmp43_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp40_, (ValaCCodeExpression*) _tmp42_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp44_ = _tmp43_;
      _tmp45_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp44_);
      _tmp46_ = _tmp45_;
      vala_ccode_block_add_statement (readyblock, (ValaCCodeNode*) _tmp46_);
      _vala_ccode_node_unref0 (_tmp46_);
      _vala_ccode_node_unref0 (_tmp44_);
      _vala_ccode_node_unref0 (_tmp42_);
      _vala_ccode_node_unref0 (_tmp40_);
      _vala_ccode_node_unref0 (_tmp38_);
      _tmp47_ = vala_ccode_identifier_new ("data");
      _tmp48_ = _tmp47_;
      _tmp49_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp48_, "_res_");
      _tmp50_ = _tmp49_;
      _tmp51_ = vala_ccode_identifier_new ("_res_");
      _tmp52_ = _tmp51_;
      _tmp53_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp50_, (ValaCCodeExpression*) _tmp52_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp54_ = _tmp53_;
      _tmp55_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp54_);
      _tmp56_ = _tmp55_;
      vala_ccode_block_add_statement (readyblock, (ValaCCodeNode*) _tmp56_);
      _vala_ccode_node_unref0 (_tmp56_);
      _vala_ccode_node_unref0 (_tmp54_);
      _vala_ccode_node_unref0 (_tmp52_);
      _vala_ccode_node_unref0 (_tmp50_);
      _vala_ccode_node_unref0 (_tmp48_);
      _tmp57_ = vala_method_get_real_cname (m);
      _tmp58_ = _tmp57_;
      _tmp59_ = g_strconcat (_tmp58_, "_co", NULL);
      _tmp60_ = _tmp59_;
      _tmp61_ = vala_ccode_identifier_new (_tmp60_);
      _tmp62_ = _tmp61_;
      _tmp63_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp62_);
      _tmp64_ = _tmp63_;
      _vala_ccode_node_unref0 (_tmp62_);
      _g_free0 (_tmp60_);
      _g_free0 (_tmp58_);
      ccall = _tmp64_;
      _tmp65_ = vala_ccode_identifier_new ("data");
      _tmp66_ = _tmp65_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp66_);
      _vala_ccode_node_unref0 (_tmp66_);
      _tmp67_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) ccall);
      _tmp68_ = _tmp67_;
      vala_ccode_block_add_statement (readyblock, (ValaCCodeNode*) _tmp68_);
      _vala_ccode_node_unref0 (_tmp68_);
      _tmp69_ = vala_ccode_function_get_modifiers (readyfunc);
      vala_ccode_function_set_modifiers (readyfunc, _tmp69_ | VALA_CCODE_MODIFIERS_STATIC);
      vala_ccode_function_set_block (readyfunc, readyblock);
      vala_gasync_module_append_function (self, readyfunc);
      _tmp70_ = vala_ccode_function_get_name (readyfunc);
      _tmp71_ = g_strdup (_tmp70_);
      result = _tmp71_;
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (datadecl);
      _vala_ccode_node_unref0 (readyblock);
      _vala_ccode_node_unref0 (readyfunc);
      _g_free0 (dataname);
      return result;
}


static void vala_gasync_module_real_generate_virtual_method_declaration (ValaGTypeModule* base, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeStruct* type_struct) {
      ValaGAsyncModule * self;
      gboolean _tmp0_;
      gboolean _tmp1_ = FALSE;
      gboolean _tmp2_;
      ValaDataType* _tmp4_ = NULL;
      ValaDataType* _tmp5_;
      ValaDataType* creturn_type;
      ValaDataType* _tmp6_ = NULL;
      gboolean _tmp7_;
      const gchar* _tmp9_ = NULL;
      ValaCCodeFunctionDeclarator* _tmp10_ = NULL;
      ValaCCodeFunctionDeclarator* vdeclarator;
      ValaHashMap* _tmp11_ = NULL;
      ValaHashMap* cparam_map;
      ValaCCodeFunction* _tmp12_ = NULL;
      ValaCCodeFunction* _tmp13_;
      ValaCCodeDeclaration* _tmp14_ = NULL;
      ValaCCodeDeclaration* vdecl;
      gchar* _tmp15_ = NULL;
      gchar* _tmp16_;
      ValaCCodeFunctionDeclarator* _tmp17_ = NULL;
      ValaHashMap* _tmp18_ = NULL;
      ValaCCodeFunction* _tmp19_ = NULL;
      ValaCCodeFunction* _tmp20_;
      gchar* _tmp21_ = NULL;
      gchar* _tmp22_;
      ValaCCodeDeclaration* _tmp23_ = NULL;
      self = (ValaGAsyncModule*) base;
      g_return_if_fail (m != NULL);
      g_return_if_fail (decl_space != NULL);
      g_return_if_fail (type_struct != NULL);
      _tmp0_ = vala_method_get_coroutine (m);
      if (!_tmp0_) {
            VALA_GTYPE_MODULE_CLASS (vala_gasync_module_parent_class)->generate_virtual_method_declaration ((ValaGTypeModule*) VALA_GSIGNAL_MODULE (self), m, decl_space, type_struct);
            return;
      }
      _tmp2_ = vala_method_get_is_abstract (m);
      if (!_tmp2_) {
            gboolean _tmp3_;
            _tmp3_ = vala_method_get_is_virtual (m);
            _tmp1_ = !_tmp3_;
      } else {
            _tmp1_ = FALSE;
      }
      if (_tmp1_) {
            return;
      }
      _tmp4_ = vala_method_get_return_type (m);
      _tmp5_ = _vala_code_node_ref0 (_tmp4_);
      creturn_type = _tmp5_;
      _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_method_get_vfunc_name (m);
      _tmp10_ = vala_ccode_function_declarator_new (_tmp9_);
      vdeclarator = _tmp10_;
      _tmp11_ = 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 = _tmp11_;
      _tmp12_ = vala_ccode_function_new ("fake", "void");
      _tmp13_ = _tmp12_;
      vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, _tmp13_, vdeclarator, NULL, NULL, 1);
      _vala_ccode_node_unref0 (_tmp13_);
      _tmp14_ = vala_ccode_declaration_new ("void");
      vdecl = _tmp14_;
      vala_ccode_declaration_add_declarator (vdecl, (ValaCCodeDeclarator*) vdeclarator);
      vala_ccode_struct_add_declaration (type_struct, vdecl);
      _tmp15_ = vala_method_get_finish_vfunc_name (m);
      _tmp16_ = _tmp15_;
      _tmp17_ = vala_ccode_function_declarator_new (_tmp16_);
      _vala_ccode_node_unref0 (vdeclarator);
      vdeclarator = _tmp17_;
      _g_free0 (_tmp16_);
      _tmp18_ = 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 = _tmp18_;
      _tmp19_ = vala_ccode_function_new ("fake", "void");
      _tmp20_ = _tmp19_;
      vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, _tmp20_, vdeclarator, NULL, NULL, 2);
      _vala_ccode_node_unref0 (_tmp20_);
      _tmp21_ = vala_data_type_get_cname (creturn_type);
      _tmp22_ = _tmp21_;
      _tmp23_ = vala_ccode_declaration_new (_tmp22_);
      _vala_ccode_node_unref0 (vdecl);
      vdecl = _tmp23_;
      _g_free0 (_tmp22_);
      vala_ccode_declaration_add_declarator (vdecl, (ValaCCodeDeclarator*) vdeclarator);
      vala_ccode_struct_add_declaration (type_struct, vdecl);
      _vala_ccode_node_unref0 (vdecl);
      _vala_map_unref0 (cparam_map);
      _vala_ccode_node_unref0 (vdeclarator);
      _vala_code_node_unref0 (creturn_type);
}


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


static void vala_gasync_module_real_visit_yield_statement (ValaCodeVisitor* base, ValaYieldStatement* stmt) {
      ValaGAsyncModule * self;
      gboolean _tmp0_;
      ValaExpression* _tmp1_ = NULL;
      ValaExpression* _tmp21_ = NULL;
      gboolean _tmp22_;
      ValaCCodeFunction* _tmp23_ = NULL;
      ValaExpression* _tmp24_ = NULL;
      ValaCCodeExpression* _tmp25_ = NULL;
      ValaCCodeExpression* _tmp26_;
      gboolean _tmp27_ = FALSE;
      gboolean _tmp28_;
      ValaArrayList* _tmp39_ = NULL;
      self = (ValaGAsyncModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
      if (!_tmp0_) {
            return;
      }
      _tmp1_ = vala_yield_statement_get_yield_expression (stmt);
      if (_tmp1_ == NULL) {
            gint _tmp2_;
            gint state;
            ValaCCodeFunction* _tmp3_ = NULL;
            ValaCCodeIdentifier* _tmp4_ = NULL;
            ValaCCodeIdentifier* _tmp5_;
            ValaCCodeMemberAccess* _tmp6_ = NULL;
            ValaCCodeMemberAccess* _tmp7_;
            gchar* _tmp8_ = NULL;
            gchar* _tmp9_;
            ValaCCodeConstant* _tmp10_ = NULL;
            ValaCCodeConstant* _tmp11_;
            ValaCCodeFunction* _tmp12_ = NULL;
            ValaCCodeConstant* _tmp13_ = NULL;
            ValaCCodeConstant* _tmp14_;
            ValaCCodeFunction* _tmp15_ = NULL;
            gchar* _tmp16_ = NULL;
            gchar* _tmp17_;
            ValaCCodeFunction* _tmp18_ = NULL;
            ValaCCodeEmptyStatement* _tmp19_ = NULL;
            ValaCCodeEmptyStatement* _tmp20_;
            _tmp2_ = ((ValaCCodeBaseModule*) self)->next_coroutine_state;
            ((ValaCCodeBaseModule*) self)->next_coroutine_state = _tmp2_ + 1;
            state = _tmp2_;
            _tmp3_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp4_ = vala_ccode_identifier_new ("data");
            _tmp5_ = _tmp4_;
            _tmp6_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp5_, "_state_");
            _tmp7_ = _tmp6_;
            _tmp8_ = g_strdup_printf ("%i", state);
            _tmp9_ = _tmp8_;
            _tmp10_ = vala_ccode_constant_new (_tmp9_);
            _tmp11_ = _tmp10_;
            vala_ccode_function_add_assignment (_tmp3_, (ValaCCodeExpression*) _tmp7_, (ValaCCodeExpression*) _tmp11_);
            _vala_ccode_node_unref0 (_tmp11_);
            _g_free0 (_tmp9_);
            _vala_ccode_node_unref0 (_tmp7_);
            _vala_ccode_node_unref0 (_tmp5_);
            _tmp12_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp13_ = vala_ccode_constant_new ("FALSE");
            _tmp14_ = _tmp13_;
            vala_ccode_function_add_return (_tmp12_, (ValaCCodeExpression*) _tmp14_);
            _vala_ccode_node_unref0 (_tmp14_);
            _tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp16_ = g_strdup_printf ("_state_%d", state);
            _tmp17_ = _tmp16_;
            vala_ccode_function_add_label (_tmp15_, _tmp17_);
            _g_free0 (_tmp17_);
            _tmp18_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp19_ = vala_ccode_empty_statement_new ();
            _tmp20_ = _tmp19_;
            vala_ccode_function_add_statement (_tmp18_, (ValaCCodeNode*) _tmp20_);
            _vala_ccode_node_unref0 (_tmp20_);
            return;
      }
      _tmp21_ = vala_yield_statement_get_yield_expression (stmt);
      _tmp22_ = vala_code_node_get_error ((ValaCodeNode*) _tmp21_);
      if (_tmp22_) {
            vala_code_node_set_error ((ValaCodeNode*) stmt, TRUE);
            return;
      }
      _tmp23_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp24_ = vala_yield_statement_get_yield_expression (stmt);
      _tmp25_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp24_);
      _tmp26_ = _tmp25_;
      vala_ccode_function_add_expression (_tmp23_, _tmp26_);
      _vala_ccode_node_unref0 (_tmp26_);
      _tmp28_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) stmt);
      if (_tmp28_) {
            ValaExpression* _tmp29_ = NULL;
            gboolean _tmp30_;
            _tmp29_ = vala_yield_statement_get_yield_expression (stmt);
            _tmp30_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) _tmp29_);
            _tmp27_ = _tmp30_;
      } else {
            _tmp27_ = FALSE;
      }
      if (_tmp27_) {
            ValaExpression* _tmp31_ = NULL;
            _tmp31_ = vala_yield_statement_get_yield_expression (stmt);
            vala_ccode_base_module_add_simple_check ((ValaCCodeBaseModule*) self, (ValaCodeNode*) _tmp31_, FALSE);
      }
      {
            ValaArrayList* _tmp32_ = NULL;
            ValaArrayList* _tmp33_;
            ValaArrayList* _local_list;
            gint _tmp34_;
            gint _local_size;
            gint _local_index;
            _tmp32_ = vala_ccode_base_module_get_temp_ref_vars ((ValaCCodeBaseModule*) self);
            _tmp33_ = _vala_iterable_ref0 (_tmp32_);
            _local_list = _tmp33_;
            _tmp34_ = vala_collection_get_size ((ValaCollection*) _local_list);
            _local_size = _tmp34_;
            _local_index = -1;
            while (TRUE) {
                  gpointer _tmp35_ = NULL;
                  ValaLocalVariable* local;
                  ValaCCodeFunction* _tmp36_ = NULL;
                  ValaCCodeExpression* _tmp37_ = NULL;
                  ValaCCodeExpression* _tmp38_;
                  _local_index = _local_index + 1;
                  if (!(_local_index < _local_size)) {
                        break;
                  }
                  _tmp35_ = vala_list_get ((ValaList*) _local_list, _local_index);
                  local = (ValaLocalVariable*) _tmp35_;
                  _tmp36_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp37_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, local);
                  _tmp38_ = _tmp37_;
                  vala_ccode_function_add_expression (_tmp36_, _tmp38_);
                  _vala_ccode_node_unref0 (_tmp38_);
                  _vala_code_node_unref0 (local);
            }
            _vala_iterable_unref0 (_local_list);
      }
      _tmp39_ = vala_ccode_base_module_get_temp_ref_vars ((ValaCCodeBaseModule*) self);
      vala_collection_clear ((ValaCollection*) _tmp39_);
}


static void vala_gasync_module_real_return_with_exception (ValaGErrorModule* base, ValaCCodeExpression* error_expr) {
      ValaGAsyncModule * self;
      gboolean _tmp0_;
      ValaCCodeIdentifier* _tmp1_ = NULL;
      ValaCCodeIdentifier* _tmp2_;
      ValaCCodeFunctionCall* _tmp3_ = NULL;
      ValaCCodeFunctionCall* _tmp4_;
      ValaCCodeFunctionCall* set_error;
      ValaCCodeIdentifier* _tmp5_ = NULL;
      ValaCCodeIdentifier* _tmp6_;
      ValaCCodeMemberAccess* _tmp7_ = NULL;
      ValaCCodeMemberAccess* _tmp8_;
      ValaCCodeFunction* _tmp9_ = NULL;
      ValaCCodeIdentifier* _tmp10_ = NULL;
      ValaCCodeIdentifier* _tmp11_;
      ValaCCodeFunctionCall* _tmp12_ = NULL;
      ValaCCodeFunctionCall* _tmp13_;
      ValaCCodeFunctionCall* free_error;
      ValaCCodeFunction* _tmp14_ = NULL;
      ValaSymbol* _tmp15_ = NULL;
      self = (ValaGAsyncModule*) base;
      g_return_if_fail (error_expr != NULL);
      _tmp0_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
      if (!_tmp0_) {
            VALA_GERROR_MODULE_CLASS (vala_gasync_module_parent_class)->return_with_exception ((ValaGErrorModule*) VALA_GSIGNAL_MODULE (self), error_expr);
            return;
      }
      _tmp1_ = vala_ccode_identifier_new ("g_simple_async_result_set_from_error");
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp2_);
      _tmp4_ = _tmp3_;
      _vala_ccode_node_unref0 (_tmp2_);
      set_error = _tmp4_;
      _tmp5_ = vala_ccode_identifier_new ("data");
      _tmp6_ = _tmp5_;
      _tmp7_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp6_, "_async_result");
      _tmp8_ = _tmp7_;
      vala_ccode_function_call_add_argument (set_error, (ValaCCodeExpression*) _tmp8_);
      _vala_ccode_node_unref0 (_tmp8_);
      _vala_ccode_node_unref0 (_tmp6_);
      vala_ccode_function_call_add_argument (set_error, error_expr);
      _tmp9_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp9_, (ValaCCodeExpression*) set_error);
      _tmp10_ = vala_ccode_identifier_new ("g_error_free");
      _tmp11_ = _tmp10_;
      _tmp12_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp11_);
      _tmp13_ = _tmp12_;
      _vala_ccode_node_unref0 (_tmp11_);
      free_error = _tmp13_;
      vala_ccode_function_call_add_argument (free_error, error_expr);
      _tmp14_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp14_, (ValaCCodeExpression*) free_error);
      _tmp15_ = vala_ccode_base_module_get_current_symbol ((ValaCCodeBaseModule*) self);
      vala_ccode_base_module_append_local_free ((ValaCCodeBaseModule*) self, _tmp15_, FALSE, NULL);
      vala_ccode_method_module_complete_async ((ValaCCodeMethodModule*) self);
      _vala_ccode_node_unref0 (free_error);
      _vala_ccode_node_unref0 (set_error);
}


static void vala_gasync_module_real_visit_return_statement (ValaCodeVisitor* base, ValaReturnStatement* stmt) {
      ValaGAsyncModule * self;
      gboolean _tmp0_;
      self = (ValaGAsyncModule*) base;
      g_return_if_fail (stmt != NULL);
      VALA_CODE_VISITOR_CLASS (vala_gasync_module_parent_class)->visit_return_statement ((ValaCodeVisitor*) VALA_GSIGNAL_MODULE (self), stmt);
      _tmp0_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
      if (!_tmp0_) {
            return;
      }
      vala_ccode_method_module_complete_async ((ValaCCodeMethodModule*) self);
}


static void vala_gasync_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) {
      ValaGAsyncModule * self;
      gboolean _tmp0_;
      self = (ValaGAsyncModule*) 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_coroutine (m);
      if (_tmp0_) {
            vala_ccode_file_add_include (decl_space, "gio/gio.h", FALSE);
            if (direction == 1) {
                  gint _tmp1_;
                  ValaCCodeParameter* _tmp2_ = NULL;
                  ValaCCodeParameter* _tmp3_;
                  gint _tmp4_;
                  ValaCCodeParameter* _tmp5_ = NULL;
                  ValaCCodeParameter* _tmp6_;
                  _tmp1_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-1), FALSE);
                  _tmp2_ = vala_ccode_parameter_new ("_callback_", "GAsyncReadyCallback");
                  _tmp3_ = _tmp2_;
                  vala_map_set (cparam_map, GINT_TO_POINTER (_tmp1_), _tmp3_);
                  _vala_ccode_node_unref0 (_tmp3_);
                  _tmp4_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, -0.9, FALSE);
                  _tmp5_ = vala_ccode_parameter_new ("_user_data_", "gpointer");
                  _tmp6_ = _tmp5_;
                  vala_map_set (cparam_map, GINT_TO_POINTER (_tmp4_), _tmp6_);
                  _vala_ccode_node_unref0 (_tmp6_);
                  if (carg_map != NULL) {
                        gint _tmp7_;
                        ValaCCodeIdentifier* _tmp8_ = NULL;
                        ValaCCodeIdentifier* _tmp9_;
                        gint _tmp10_;
                        ValaCCodeIdentifier* _tmp11_ = NULL;
                        ValaCCodeIdentifier* _tmp12_;
                        _tmp7_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) (-1), FALSE);
                        _tmp8_ = vala_ccode_identifier_new ("_callback_");
                        _tmp9_ = _tmp8_;
                        vala_map_set (carg_map, GINT_TO_POINTER (_tmp7_), (ValaCCodeExpression*) _tmp9_);
                        _vala_ccode_node_unref0 (_tmp9_);
                        _tmp10_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, -0.9, FALSE);
                        _tmp11_ = vala_ccode_identifier_new ("_user_data_");
                        _tmp12_ = _tmp11_;
                        vala_map_set (carg_map, GINT_TO_POINTER (_tmp10_), (ValaCCodeExpression*) _tmp12_);
                        _vala_ccode_node_unref0 (_tmp12_);
                  }
            } else {
                  if (direction == 2) {
                        gint _tmp13_;
                        ValaCCodeParameter* _tmp14_ = NULL;
                        ValaCCodeParameter* _tmp15_;
                        _tmp13_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, 0.1, FALSE);
                        _tmp14_ = vala_ccode_parameter_new ("_res_", "GAsyncResult*");
                        _tmp15_ = _tmp14_;
                        vala_map_set (cparam_map, GINT_TO_POINTER (_tmp13_), _tmp15_);
                        _vala_ccode_node_unref0 (_tmp15_);
                        if (carg_map != NULL) {
                              gint _tmp16_;
                              ValaCCodeIdentifier* _tmp17_ = NULL;
                              ValaCCodeIdentifier* _tmp18_;
                              _tmp16_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, 0.1, FALSE);
                              _tmp17_ = vala_ccode_identifier_new ("_res_");
                              _tmp18_ = _tmp17_;
                              vala_map_set (carg_map, GINT_TO_POINTER (_tmp16_), (ValaCCodeExpression*) _tmp18_);
                              _vala_ccode_node_unref0 (_tmp18_);
                        }
                  }
            }
      }
      VALA_CCODE_BASE_MODULE_CLASS (vala_gasync_module_parent_class)->generate_cparameters ((ValaCCodeBaseModule*) VALA_GSIGNAL_MODULE (self), m, decl_space, cparam_map, func, vdeclarator, carg_map, vcall, direction);
}


gchar* vala_gasync_module_generate_async_callback_wrapper (ValaGAsyncModule* self) {
      gchar* result = NULL;
      gchar* _tmp0_;
      gchar* async_callback_wrapper_func;
      gboolean _tmp1_;
      ValaCCodeFunction* _tmp2_ = NULL;
      ValaCCodeFunction* function;
      ValaCCodeParameter* _tmp3_ = NULL;
      ValaCCodeParameter* _tmp4_;
      ValaCCodeParameter* _tmp5_ = NULL;
      ValaCCodeParameter* _tmp6_;
      ValaCCodeParameter* _tmp7_ = NULL;
      ValaCCodeParameter* _tmp8_;
      ValaCCodeIdentifier* _tmp9_ = NULL;
      ValaCCodeIdentifier* _tmp10_;
      ValaCCodeFunctionCall* _tmp11_ = NULL;
      ValaCCodeFunctionCall* _tmp12_;
      ValaCCodeFunctionCall* res_ref;
      ValaCCodeIdentifier* _tmp13_ = NULL;
      ValaCCodeIdentifier* _tmp14_;
      ValaCCodeIdentifier* _tmp15_ = NULL;
      ValaCCodeIdentifier* _tmp16_;
      ValaCCodeFunctionCall* _tmp17_ = NULL;
      ValaCCodeFunctionCall* _tmp18_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeIdentifier* _tmp19_ = NULL;
      ValaCCodeIdentifier* _tmp20_;
      ValaCCodeIdentifier* _tmp21_ = NULL;
      ValaCCodeIdentifier* _tmp22_;
      ValaCCodeFunction* _tmp23_ = NULL;
      ValaCCodeIdentifier* _tmp24_ = NULL;
      ValaCCodeIdentifier* _tmp25_;
      ValaCCodeFunctionCall* _tmp26_ = NULL;
      ValaCCodeIdentifier* _tmp27_ = NULL;
      ValaCCodeIdentifier* _tmp28_;
      ValaCCodeFunction* _tmp29_ = NULL;
      ValaCCodeIdentifier* _tmp30_ = NULL;
      ValaCCodeIdentifier* _tmp31_;
      ValaCCodeFunctionCall* _tmp32_ = NULL;
      ValaCCodeIdentifier* _tmp33_ = NULL;
      ValaCCodeIdentifier* _tmp34_;
      ValaCCodeFunction* _tmp35_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = g_strdup ("_vala_g_async_ready_callback");
      async_callback_wrapper_func = _tmp0_;
      _tmp1_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, async_callback_wrapper_func);
      if (!_tmp1_) {
            result = async_callback_wrapper_func;
            return result;
      }
      _tmp2_ = vala_ccode_function_new (async_callback_wrapper_func, "void");
      function = _tmp2_;
      vala_ccode_function_set_modifiers (function, VALA_CCODE_MODIFIERS_STATIC);
      _tmp3_ = vala_ccode_parameter_new ("*source_object", "GObject");
      _tmp4_ = _tmp3_;
      vala_ccode_function_add_parameter (function, _tmp4_);
      _vala_ccode_node_unref0 (_tmp4_);
      _tmp5_ = vala_ccode_parameter_new ("*res", "GAsyncResult");
      _tmp6_ = _tmp5_;
      vala_ccode_function_add_parameter (function, _tmp6_);
      _vala_ccode_node_unref0 (_tmp6_);
      _tmp7_ = vala_ccode_parameter_new ("*user_data", "void");
      _tmp8_ = _tmp7_;
      vala_ccode_function_add_parameter (function, _tmp8_);
      _vala_ccode_node_unref0 (_tmp8_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, function);
      _tmp9_ = vala_ccode_identifier_new ("g_object_ref");
      _tmp10_ = _tmp9_;
      _tmp11_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp10_);
      _tmp12_ = _tmp11_;
      _vala_ccode_node_unref0 (_tmp10_);
      res_ref = _tmp12_;
      _tmp13_ = vala_ccode_identifier_new ("res");
      _tmp14_ = _tmp13_;
      vala_ccode_function_call_add_argument (res_ref, (ValaCCodeExpression*) _tmp14_);
      _vala_ccode_node_unref0 (_tmp14_);
      _tmp15_ = vala_ccode_identifier_new ("g_simple_async_result_set_op_res_gpointer");
      _tmp16_ = _tmp15_;
      _tmp17_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp16_);
      _tmp18_ = _tmp17_;
      _vala_ccode_node_unref0 (_tmp16_);
      ccall = _tmp18_;
      _tmp19_ = vala_ccode_identifier_new ("user_data");
      _tmp20_ = _tmp19_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp20_);
      _vala_ccode_node_unref0 (_tmp20_);
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) res_ref);
      _tmp21_ = vala_ccode_identifier_new ("g_object_unref");
      _tmp22_ = _tmp21_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp22_);
      _vala_ccode_node_unref0 (_tmp22_);
      _tmp23_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp23_, (ValaCCodeExpression*) ccall);
      _tmp24_ = vala_ccode_identifier_new ("g_simple_async_result_complete");
      _tmp25_ = _tmp24_;
      _tmp26_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp25_);
      _vala_ccode_node_unref0 (ccall);
      ccall = _tmp26_;
      _vala_ccode_node_unref0 (_tmp25_);
      _tmp27_ = vala_ccode_identifier_new ("user_data");
      _tmp28_ = _tmp27_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp28_);
      _vala_ccode_node_unref0 (_tmp28_);
      _tmp29_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp29_, (ValaCCodeExpression*) ccall);
      _tmp30_ = vala_ccode_identifier_new ("g_object_unref");
      _tmp31_ = _tmp30_;
      _tmp32_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp31_);
      _vala_ccode_node_unref0 (ccall);
      ccall = _tmp32_;
      _vala_ccode_node_unref0 (_tmp31_);
      _tmp33_ = vala_ccode_identifier_new ("user_data");
      _tmp34_ = _tmp33_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp34_);
      _vala_ccode_node_unref0 (_tmp34_);
      _tmp35_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp35_, (ValaCCodeExpression*) ccall);
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, function);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, function);
      result = async_callback_wrapper_func;
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (res_ref);
      _vala_ccode_node_unref0 (function);
      return result;
}


ValaGAsyncModule* vala_gasync_module_construct (GType object_type) {
      ValaGAsyncModule* self = NULL;
      self = (ValaGAsyncModule*) vala_gsignal_module_construct (object_type);
      return self;
}


ValaGAsyncModule* vala_gasync_module_new (void) {
      return vala_gasync_module_construct (VALA_TYPE_GASYNC_MODULE);
}


static void vala_gasync_module_class_init (ValaGAsyncModuleClass * klass) {
      vala_gasync_module_parent_class = g_type_class_peek_parent (klass);
      VALA_CCODE_BASE_MODULE_CLASS (klass)->generate_method_declaration = vala_gasync_module_real_generate_method_declaration;
      VALA_CODE_VISITOR_CLASS (klass)->visit_method = vala_gasync_module_real_visit_method;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->generate_ready_function = vala_gasync_module_real_generate_ready_function;
      VALA_GTYPE_MODULE_CLASS (klass)->generate_virtual_method_declaration = vala_gasync_module_real_generate_virtual_method_declaration;
      VALA_CODE_VISITOR_CLASS (klass)->visit_yield_statement = vala_gasync_module_real_visit_yield_statement;
      VALA_GERROR_MODULE_CLASS (klass)->return_with_exception = vala_gasync_module_real_return_with_exception;
      VALA_CODE_VISITOR_CLASS (klass)->visit_return_statement = vala_gasync_module_real_visit_return_statement;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->generate_cparameters = vala_gasync_module_real_generate_cparameters;
}


static void vala_gasync_module_instance_init (ValaGAsyncModule * self) {
}


GType vala_gasync_module_get_type (void) {
      static volatile gsize vala_gasync_module_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gasync_module_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (ValaGAsyncModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gasync_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGAsyncModule), 0, (GInstanceInitFunc) vala_gasync_module_instance_init, NULL };
            GType vala_gasync_module_type_id;
            vala_gasync_module_type_id = g_type_register_static (VALA_TYPE_GSIGNAL_MODULE, "ValaGAsyncModule", &g_define_type_info, 0);
            g_once_init_leave (&vala_gasync_module_type_id__volatile, vala_gasync_module_type_id);
      }
      return vala_gasync_module_type_id__volatile;
}




Generated by  Doxygen 1.6.0   Back to index