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

typedef struct _ValaGLibValue ValaGLibValue;
typedef struct _ValaGLibValueClass ValaGLibValueClass;
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))
#define _vala_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;
      gboolean in_plugin;
      gchar* module_init_param_name;
      gboolean gvaluecollector_h_needed;
      gboolean requires_array_free;
      gboolean requires_array_move;
      gboolean requires_array_length;
      ValaSet* wrappers;
};

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

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

struct _ValaCCodeStructModuleClass {
      ValaCCodeBaseModuleClass parent_class;
};

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

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

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;
};

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);
void vala_ccode_base_module_push_function (ValaCCodeBaseModule* self, ValaCCodeFunction* func);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
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_destroy_local (ValaCCodeBaseModule* self, ValaLocalVariable* local);
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);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue_ (ValaCCodeBaseModule* self, ValaTargetValue* value);
ValaTargetValue* vala_ccode_base_module_transform_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaDataType* target_type, ValaCodeNode* node);
ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue);
ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue);
GType vala_glib_value_get_type (void) G_GNUC_CONST;
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type);
ValaTargetValue* vala_ccode_base_module_copy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node);
ValaMethod* vala_ccode_base_module_get_current_method (ValaCCodeBaseModule* self);
static void vala_gasync_module_append_struct (ValaGAsyncModule* self, ValaCCodeStruct* structure);
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_return_out_parameter (ValaCCodeBaseModule* self, ValaParameter* param);
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);
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* _tmp56_ = 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;
                  gboolean _tmp22_ = FALSE;
                  ValaDataType* _tmp23_ = NULL;
                  gboolean is_unowned_delegate;
                  ValaDataType* _tmp26_ = NULL;
                  ValaDataType* _tmp27_ = NULL;
                  ValaDataType* param_type;
                  gchar* _tmp28_ = NULL;
                  gchar* _tmp29_;
                  const gchar* _tmp30_ = NULL;
                  gchar* _tmp31_ = NULL;
                  gchar* _tmp32_;
                  ValaDataType* _tmp33_ = NULL;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp21_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp21_;
                  _tmp23_ = vala_variable_get_variable_type ((ValaVariable*) param);
                  if (VALA_IS_DELEGATE_TYPE (_tmp23_)) {
                        ValaDataType* _tmp24_ = NULL;
                        gboolean _tmp25_;
                        _tmp24_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp25_ = vala_data_type_get_value_owned (_tmp24_);
                        _tmp22_ = !_tmp25_;
                  } else {
                        _tmp22_ = FALSE;
                  }
                  is_unowned_delegate = _tmp22_;
                  _tmp26_ = vala_variable_get_variable_type ((ValaVariable*) param);
                  _tmp27_ = vala_data_type_copy (_tmp26_);
                  param_type = _tmp27_;
                  vala_data_type_set_value_owned (param_type, TRUE);
                  _tmp28_ = vala_data_type_get_cname (param_type);
                  _tmp29_ = _tmp28_;
                  _tmp30_ = vala_symbol_get_name ((ValaSymbol*) param);
                  _tmp31_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp30_);
                  _tmp32_ = _tmp31_;
                  vala_ccode_struct_add_field (data, _tmp29_, _tmp32_, NULL);
                  _g_free0 (_tmp32_);
                  _g_free0 (_tmp29_);
                  _tmp33_ = vala_variable_get_variable_type ((ValaVariable*) param);
                  if (VALA_IS_ARRAY_TYPE (_tmp33_)) {
                        ValaDataType* _tmp34_ = NULL;
                        ValaArrayType* _tmp35_;
                        ValaArrayType* array_type;
                        gboolean _tmp36_;
                        _tmp34_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp35_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp34_));
                        array_type = _tmp35_;
                        _tmp36_ = vala_variable_get_no_array_length ((ValaVariable*) param);
                        if (!_tmp36_) {
                              {
                                    gint dim;
                                    dim = 1;
                                    {
                                          gboolean _tmp37_;
                                          _tmp37_ = TRUE;
                                          while (TRUE) {
                                                gint _tmp38_;
                                                gchar* _tmp39_ = NULL;
                                                gchar* _tmp40_;
                                                if (!_tmp37_) {
                                                      dim++;
                                                }
                                                _tmp37_ = FALSE;
                                                _tmp38_ = vala_array_type_get_rank (array_type);
                                                if (!(dim <= _tmp38_)) {
                                                      break;
                                                }
                                                _tmp39_ = vala_ccode_base_module_get_parameter_array_length_cname ((ValaCCodeBaseModule*) self, param, dim);
                                                _tmp40_ = _tmp39_;
                                                vala_ccode_struct_add_field (data, "gint", _tmp40_, NULL);
                                                _g_free0 (_tmp40_);
                                          }
                                    }
                              }
                        }
                        _vala_code_node_unref0 (array_type);
                  } else {
                        ValaDataType* _tmp41_ = NULL;
                        _tmp41_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (VALA_IS_DELEGATE_TYPE (_tmp41_)) {
                              ValaDataType* _tmp42_ = NULL;
                              ValaDelegateType* _tmp43_;
                              ValaDelegateType* deleg_type;
                              ValaDelegate* _tmp44_ = NULL;
                              gboolean _tmp45_;
                              _tmp42_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp43_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp42_));
                              deleg_type = _tmp43_;
                              _tmp44_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                              _tmp45_ = vala_delegate_get_has_target (_tmp44_);
                              if (_tmp45_) {
                                    const gchar* _tmp46_ = NULL;
                                    gchar* _tmp47_ = NULL;
                                    gchar* _tmp48_;
                                    gchar* _tmp49_ = NULL;
                                    gchar* _tmp50_;
                                    _tmp46_ = vala_symbol_get_name ((ValaSymbol*) param);
                                    _tmp47_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp46_);
                                    _tmp48_ = _tmp47_;
                                    _tmp49_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, _tmp48_);
                                    _tmp50_ = _tmp49_;
                                    vala_ccode_struct_add_field (data, "gpointer", _tmp50_, NULL);
                                    _g_free0 (_tmp50_);
                                    _g_free0 (_tmp48_);
                                    if (!is_unowned_delegate) {
                                          const gchar* _tmp51_ = NULL;
                                          gchar* _tmp52_ = NULL;
                                          gchar* _tmp53_;
                                          gchar* _tmp54_ = NULL;
                                          gchar* _tmp55_;
                                          _tmp51_ = vala_symbol_get_name ((ValaSymbol*) param);
                                          _tmp52_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp51_);
                                          _tmp53_ = _tmp52_;
                                          _tmp54_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, _tmp53_);
                                          _tmp55_ = _tmp54_;
                                          vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp55_, NULL);
                                          _g_free0 (_tmp55_);
                                          _g_free0 (_tmp53_);
                                    }
                              }
                              _vala_code_node_unref0 (deleg_type);
                        }
                  }
                  _vala_code_node_unref0 (param_type);
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp56_ = vala_method_get_return_type (m);
      if (!VALA_IS_VOID_TYPE (_tmp56_)) {
            ValaDataType* _tmp57_ = NULL;
            gchar* _tmp58_ = NULL;
            gchar* _tmp59_;
            ValaDataType* _tmp60_ = NULL;
            _tmp57_ = vala_method_get_return_type (m);
            _tmp58_ = vala_data_type_get_cname (_tmp57_);
            _tmp59_ = _tmp58_;
            vala_ccode_struct_add_field (data, _tmp59_, "result", NULL);
            _g_free0 (_tmp59_);
            _tmp60_ = vala_method_get_return_type (m);
            if (VALA_IS_ARRAY_TYPE (_tmp60_)) {
                  ValaDataType* _tmp61_ = NULL;
                  ValaArrayType* _tmp62_;
                  ValaArrayType* array_type;
                  gboolean _tmp63_;
                  _tmp61_ = vala_method_get_return_type (m);
                  _tmp62_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp61_));
                  array_type = _tmp62_;
                  _tmp63_ = vala_method_get_no_array_length (m);
                  if (!_tmp63_) {
                        {
                              gint dim;
                              dim = 1;
                              {
                                    gboolean _tmp64_;
                                    _tmp64_ = TRUE;
                                    while (TRUE) {
                                          gint _tmp65_;
                                          gchar* _tmp66_ = NULL;
                                          gchar* _tmp67_;
                                          if (!_tmp64_) {
                                                dim++;
                                          }
                                          _tmp64_ = FALSE;
                                          _tmp65_ = vala_array_type_get_rank (array_type);
                                          if (!(dim <= _tmp65_)) {
                                                break;
                                          }
                                          _tmp66_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
                                          _tmp67_ = _tmp66_;
                                          vala_ccode_struct_add_field (data, "gint", _tmp67_, NULL);
                                          _g_free0 (_tmp67_);
                                    }
                              }
                        }
                  }
                  _vala_code_node_unref0 (array_type);
            } else {
                  ValaDataType* _tmp68_ = NULL;
                  _tmp68_ = vala_method_get_return_type (m);
                  if (VALA_IS_DELEGATE_TYPE (_tmp68_)) {
                        ValaDataType* _tmp69_ = NULL;
                        ValaDelegateType* _tmp70_;
                        ValaDelegateType* deleg_type;
                        ValaDelegate* _tmp71_ = NULL;
                        gboolean _tmp72_;
                        _tmp69_ = vala_method_get_return_type (m);
                        _tmp70_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp69_));
                        deleg_type = _tmp70_;
                        _tmp71_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                        _tmp72_ = vala_delegate_get_has_target (_tmp71_);
                        if (_tmp72_) {
                              gchar* _tmp73_ = NULL;
                              gchar* _tmp74_;
                              gchar* _tmp75_ = NULL;
                              gchar* _tmp76_;
                              _tmp73_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp74_ = _tmp73_;
                              vala_ccode_struct_add_field (data, "gpointer", _tmp74_, NULL);
                              _g_free0 (_tmp74_);
                              _tmp75_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp76_ = _tmp75_;
                              vala_ccode_struct_add_field (data, "GDestroyNotify", _tmp76_, NULL);
                              _g_free0 (_tmp76_);
                        }
                        _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_;
      ValaCCodeBaseModuleEmitContext* _tmp14_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp15_;
      ValaCCodeFunction* _tmp16_ = NULL;
      gchar* _tmp17_;
      gchar* _tmp18_;
      ValaCCodeIdentifier* _tmp19_ = NULL;
      ValaCCodeIdentifier* _tmp20_;
      ValaCCodeVariableDeclarator* _tmp21_ = NULL;
      ValaCCodeVariableDeclarator* _tmp22_;
      ValaDataType* _tmp39_ = NULL;
      gboolean _tmp40_;
      ValaMemberBinding _tmp46_;
      ValaCCodeIdentifier* _tmp55_ = NULL;
      ValaCCodeIdentifier* _tmp56_;
      ValaCCodeFunctionCall* _tmp57_ = NULL;
      ValaCCodeFunctionCall* _tmp58_;
      ValaCCodeFunctionCall* freecall;
      ValaCCodeIdentifier* _tmp59_ = NULL;
      ValaCCodeIdentifier* _tmp60_;
      ValaCCodeIdentifier* _tmp61_ = NULL;
      ValaCCodeIdentifier* _tmp62_;
      ValaCCodeFunction* _tmp63_ = 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_ = 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_base_module_emit_context_new ((ValaSymbol*) m);
      _tmp15_ = _tmp14_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp15_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp15_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, freefunc);
      _tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp17_ = g_strconcat (dataname, "*", NULL);
      _tmp18_ = _tmp17_;
      _tmp19_ = vala_ccode_identifier_new ("_data");
      _tmp20_ = _tmp19_;
      _tmp21_ = vala_ccode_variable_declarator_new ("_data_", (ValaCCodeExpression*) _tmp20_, NULL);
      _tmp22_ = _tmp21_;
      vala_ccode_function_add_declaration (_tmp16_, _tmp18_, (ValaCCodeDeclarator*) _tmp22_, 0);
      _vala_ccode_node_unref0 (_tmp22_);
      _vala_ccode_node_unref0 (_tmp20_);
      _g_free0 (_tmp18_);
      {
            ValaList* _tmp23_ = NULL;
            ValaList* _param_list;
            gint _tmp24_;
            gint _param_size;
            gint _param_index;
            _tmp23_ = vala_method_get_parameters (m);
            _param_list = _tmp23_;
            _tmp24_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp24_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp25_ = NULL;
                  ValaParameter* param;
                  ValaParameterDirection _tmp26_;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp25_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp25_;
                  _tmp26_ = vala_parameter_get_direction (param);
                  if (_tmp26_ != VALA_PARAMETER_DIRECTION_OUT) {
                        gboolean _tmp27_ = FALSE;
                        ValaDataType* _tmp28_ = NULL;
                        gboolean is_unowned_delegate;
                        ValaDataType* _tmp31_ = NULL;
                        ValaDataType* _tmp32_ = NULL;
                        ValaDataType* param_type;
                        gboolean _tmp33_ = FALSE;
                        gboolean _tmp34_;
                        _tmp28_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (VALA_IS_DELEGATE_TYPE (_tmp28_)) {
                              ValaDataType* _tmp29_ = NULL;
                              gboolean _tmp30_;
                              _tmp29_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp30_ = vala_data_type_get_value_owned (_tmp29_);
                              _tmp27_ = !_tmp30_;
                        } else {
                              _tmp27_ = FALSE;
                        }
                        is_unowned_delegate = _tmp27_;
                        _tmp31_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp32_ = vala_data_type_copy (_tmp31_);
                        param_type = _tmp32_;
                        vala_data_type_set_value_owned (param_type, TRUE);
                        _tmp34_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, param_type);
                        if (_tmp34_) {
                              _tmp33_ = !is_unowned_delegate;
                        } else {
                              _tmp33_ = FALSE;
                        }
                        if (_tmp33_) {
                              gboolean _tmp35_;
                              gboolean old_captured;
                              ValaCCodeFunction* _tmp36_ = NULL;
                              ValaCCodeExpression* _tmp37_ = NULL;
                              ValaCCodeExpression* _tmp38_;
                              _tmp35_ = vala_parameter_get_captured (param);
                              old_captured = _tmp35_;
                              vala_parameter_set_captured (param, FALSE);
                              _tmp36_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp37_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, param);
                              _tmp38_ = _tmp37_;
                              vala_ccode_function_add_expression (_tmp36_, _tmp38_);
                              _vala_ccode_node_unref0 (_tmp38_);
                              vala_parameter_set_captured (param, old_captured);
                        }
                        _vala_code_node_unref0 (param_type);
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp39_ = vala_method_get_return_type (m);
      _tmp40_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp39_);
      if (_tmp40_) {
            ValaDataType* _tmp41_ = NULL;
            ValaLocalVariable* _tmp42_ = NULL;
            ValaLocalVariable* v;
            ValaCCodeFunction* _tmp43_ = NULL;
            ValaCCodeExpression* _tmp44_ = NULL;
            ValaCCodeExpression* _tmp45_;
            _tmp41_ = vala_method_get_return_type (m);
            _tmp42_ = vala_local_variable_new (_tmp41_, ".result", NULL, NULL);
            v = _tmp42_;
            _tmp43_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp44_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, v);
            _tmp45_ = _tmp44_;
            vala_ccode_function_add_expression (_tmp43_, _tmp45_);
            _vala_ccode_node_unref0 (_tmp45_);
            _vala_code_node_unref0 (v);
      }
      _tmp46_ = vala_method_get_binding (m);
      if (_tmp46_ == VALA_MEMBER_BINDING_INSTANCE) {
            ValaParameter* _tmp47_ = NULL;
            ValaDataType* _tmp48_ = NULL;
            ValaDataType* _tmp49_ = NULL;
            ValaDataType* this_type;
            gboolean _tmp50_;
            _tmp47_ = vala_method_get_this_parameter (m);
            _tmp48_ = vala_variable_get_variable_type ((ValaVariable*) _tmp47_);
            _tmp49_ = vala_data_type_copy (_tmp48_);
            this_type = _tmp49_;
            vala_data_type_set_value_owned (this_type, TRUE);
            _tmp50_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, this_type);
            if (_tmp50_) {
                  ValaCCodeFunction* _tmp51_ = NULL;
                  ValaParameter* _tmp52_ = NULL;
                  ValaCCodeExpression* _tmp53_ = NULL;
                  ValaCCodeExpression* _tmp54_;
                  _tmp51_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp52_ = vala_method_get_this_parameter (m);
                  _tmp53_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, _tmp52_);
                  _tmp54_ = _tmp53_;
                  vala_ccode_function_add_expression (_tmp51_, _tmp54_);
                  _vala_ccode_node_unref0 (_tmp54_);
            }
            _vala_code_node_unref0 (this_type);
      }
      _tmp55_ = vala_ccode_identifier_new ("g_slice_free");
      _tmp56_ = _tmp55_;
      _tmp57_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp56_);
      _tmp58_ = _tmp57_;
      _vala_ccode_node_unref0 (_tmp56_);
      freecall = _tmp58_;
      _tmp59_ = vala_ccode_identifier_new (dataname);
      _tmp60_ = _tmp59_;
      vala_ccode_function_call_add_argument (freecall, (ValaCCodeExpression*) _tmp60_);
      _vala_ccode_node_unref0 (_tmp60_);
      _tmp61_ = vala_ccode_identifier_new ("_data_");
      _tmp62_ = _tmp61_;
      vala_ccode_function_call_add_argument (freecall, (ValaCCodeExpression*) _tmp62_);
      _vala_ccode_node_unref0 (_tmp62_);
      _tmp63_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp63_, (ValaCCodeExpression*) freecall);
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, freefunc);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, freefunc);
      result = freefunc;
      _vala_ccode_node_unref0 (freecall);
      _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* _tmp61_ = NULL;
      ValaCCodeIdentifier* _tmp62_;
      ValaCCodeFunctionCall* _tmp63_ = NULL;
      ValaCCodeFunctionCall* _tmp64_;
      ValaCCodeFunctionCall* dataalloc;
      ValaCCodeIdentifier* _tmp65_ = NULL;
      ValaCCodeIdentifier* _tmp66_;
      ValaCCodeIdentifier* _tmp67_ = NULL;
      ValaCCodeIdentifier* data_var;
      ValaCCodeFunction* _tmp68_ = NULL;
      gchar* _tmp69_;
      gchar* _tmp70_;
      ValaCCodeVariableDeclarator* _tmp71_ = NULL;
      ValaCCodeVariableDeclarator* _tmp72_;
      ValaCCodeFunction* _tmp73_ = NULL;
      ValaCCodeIdentifier* _tmp74_ = NULL;
      ValaCCodeIdentifier* _tmp75_;
      ValaCCodeFunctionCall* _tmp76_ = NULL;
      ValaCCodeFunctionCall* _tmp77_;
      ValaCCodeFunctionCall* create_result;
      ValaSymbol* _tmp78_ = NULL;
      ValaSymbol* _tmp79_;
      ValaClass* _tmp80_;
      ValaClass* cl;
      gboolean _tmp81_ = FALSE;
      gboolean _tmp82_ = FALSE;
      ValaMemberBinding _tmp83_;
      ValaCCodeIdentifier* _tmp105_ = NULL;
      ValaCCodeIdentifier* _tmp106_;
      ValaCCodeIdentifier* _tmp107_ = NULL;
      ValaCCodeIdentifier* _tmp108_;
      gchar* _tmp109_ = NULL;
      gchar* _tmp110_;
      ValaCCodeIdentifier* _tmp111_ = NULL;
      ValaCCodeIdentifier* _tmp112_;
      ValaCCodeFunction* _tmp113_ = NULL;
      ValaCCodeMemberAccess* _tmp114_ = NULL;
      ValaCCodeMemberAccess* _tmp115_;
      ValaCCodeIdentifier* _tmp116_ = NULL;
      ValaCCodeIdentifier* _tmp117_;
      ValaCCodeFunctionCall* _tmp118_ = NULL;
      ValaCCodeFunctionCall* _tmp119_;
      ValaCCodeFunctionCall* set_op_res_call;
      ValaCCodeMemberAccess* _tmp120_ = NULL;
      ValaCCodeMemberAccess* _tmp121_;
      gchar* _tmp122_ = NULL;
      gchar* _tmp123_;
      gchar* _tmp124_;
      gchar* _tmp125_;
      ValaCCodeIdentifier* _tmp126_ = NULL;
      ValaCCodeIdentifier* _tmp127_;
      ValaCCodeFunction* _tmp128_ = NULL;
      ValaMemberBinding _tmp129_;
      gchar* _tmp168_ = NULL;
      gchar* _tmp169_;
      gchar* _tmp170_;
      gchar* _tmp171_;
      ValaCCodeIdentifier* _tmp172_ = NULL;
      ValaCCodeIdentifier* _tmp173_;
      ValaCCodeFunctionCall* _tmp174_ = NULL;
      ValaCCodeFunctionCall* _tmp175_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeFunction* _tmp176_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != NULL);
      _tmp0_ = vala_ccode_base_module_emit_context_new ((ValaSymbol*) m);
      _tmp1_ = _tmp0_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp1_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp1_);
      _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_;
            ValaGLibValue* _tmp45_ = NULL;
            ValaGLibValue* _tmp46_;
            ValaTargetValue* _tmp47_ = NULL;
            ValaTargetValue* _tmp48_;
            ValaCCodeExpression* _tmp49_ = NULL;
            ValaCCodeExpression* _tmp50_;
            ValaCCodeExpression* cself;
            ValaCCodeFunction* _tmp51_ = NULL;
            gchar* _tmp52_ = NULL;
            gchar* _tmp53_;
            gchar* _tmp54_ = NULL;
            gchar* _tmp55_;
            ValaCCodeVariableDeclarator* _tmp56_ = NULL;
            ValaCCodeVariableDeclarator* _tmp57_;
            ValaCCodeFunction* _tmp58_ = NULL;
            ValaCCodeIdentifier* _tmp59_ = NULL;
            ValaCCodeIdentifier* _tmp60_;
            _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_glib_value_new ((ValaDataType*) base_expression_type, (ValaCCodeExpression*) _tmp44_);
            _tmp46_ = _tmp45_;
            _tmp47_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp46_, (ValaDataType*) self_target_type, (ValaCodeNode*) m);
            _tmp48_ = _tmp47_;
            _tmp49_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp48_);
            _tmp50_ = _tmp49_;
            _vala_target_value_unref0 (_tmp48_);
            _vala_target_value_unref0 (_tmp46_);
            _vala_ccode_node_unref0 (_tmp44_);
            cself = _tmp50_;
            _tmp51_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp52_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) type_symbol, FALSE);
            _tmp53_ = _tmp52_;
            _tmp54_ = g_strdup_printf ("%s *", _tmp53_);
            _tmp55_ = _tmp54_;
            _tmp56_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
            _tmp57_ = _tmp56_;
            vala_ccode_function_add_declaration (_tmp51_, _tmp55_, (ValaCCodeDeclarator*) _tmp57_, 0);
            _vala_ccode_node_unref0 (_tmp57_);
            _g_free0 (_tmp55_);
            _g_free0 (_tmp53_);
            _tmp58_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp59_ = vala_ccode_identifier_new ("self");
            _tmp60_ = _tmp59_;
            vala_ccode_function_add_assignment (_tmp58_, (ValaCCodeExpression*) _tmp60_, cself);
            _vala_ccode_node_unref0 (_tmp60_);
            _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);
      }
      _tmp61_ = vala_ccode_identifier_new ("g_slice_new0");
      _tmp62_ = _tmp61_;
      _tmp63_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp62_);
      _tmp64_ = _tmp63_;
      _vala_ccode_node_unref0 (_tmp62_);
      dataalloc = _tmp64_;
      _tmp65_ = vala_ccode_identifier_new (dataname);
      _tmp66_ = _tmp65_;
      vala_ccode_function_call_add_argument (dataalloc, (ValaCCodeExpression*) _tmp66_);
      _vala_ccode_node_unref0 (_tmp66_);
      _tmp67_ = vala_ccode_identifier_new ("_data_");
      data_var = _tmp67_;
      _tmp68_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp69_ = g_strconcat (dataname, "*", NULL);
      _tmp70_ = _tmp69_;
      _tmp71_ = vala_ccode_variable_declarator_new ("_data_", NULL, NULL);
      _tmp72_ = _tmp71_;
      vala_ccode_function_add_declaration (_tmp68_, _tmp70_, (ValaCCodeDeclarator*) _tmp72_, 0);
      _vala_ccode_node_unref0 (_tmp72_);
      _g_free0 (_tmp70_);
      _tmp73_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_assignment (_tmp73_, (ValaCCodeExpression*) data_var, (ValaCCodeExpression*) dataalloc);
      _tmp74_ = vala_ccode_identifier_new ("g_simple_async_result_new");
      _tmp75_ = _tmp74_;
      _tmp76_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp75_);
      _tmp77_ = _tmp76_;
      _vala_ccode_node_unref0 (_tmp75_);
      create_result = _tmp77_;
      _tmp78_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
      _tmp79_ = _tmp78_;
      _tmp80_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp79_) ? ((ValaClass*) _tmp79_) : NULL);
      cl = _tmp80_;
      _tmp83_ = vala_method_get_binding (m);
      if (_tmp83_ == VALA_MEMBER_BINDING_INSTANCE) {
            _tmp82_ = cl != NULL;
      } else {
            _tmp82_ = FALSE;
      }
      if (_tmp82_) {
            gboolean _tmp84_;
            _tmp84_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) cl, ((ValaCCodeBaseModule*) self)->gobject_type);
            _tmp81_ = _tmp84_;
      } else {
            _tmp81_ = FALSE;
      }
      if (_tmp81_) {
            ValaCCodeIdentifier* _tmp85_ = NULL;
            ValaCCodeIdentifier* _tmp86_;
            ValaCCodeFunctionCall* _tmp87_ = NULL;
            ValaCCodeFunctionCall* _tmp88_;
            ValaCCodeFunctionCall* gobject_cast;
            ValaCCodeIdentifier* _tmp89_ = NULL;
            ValaCCodeIdentifier* _tmp90_;
            _tmp85_ = vala_ccode_identifier_new ("G_OBJECT");
            _tmp86_ = _tmp85_;
            _tmp87_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp86_);
            _tmp88_ = _tmp87_;
            _vala_ccode_node_unref0 (_tmp86_);
            gobject_cast = _tmp88_;
            _tmp89_ = vala_ccode_identifier_new ("self");
            _tmp90_ = _tmp89_;
            vala_ccode_function_call_add_argument (gobject_cast, (ValaCCodeExpression*) _tmp90_);
            _vala_ccode_node_unref0 (_tmp90_);
            vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) gobject_cast);
            _vala_ccode_node_unref0 (gobject_cast);
      } else {
            ValaCodeContext* _tmp91_ = NULL;
            gboolean _tmp92_;
            _tmp91_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
            _tmp92_ = vala_code_context_require_glib_version (_tmp91_, 2, 20);
            if (_tmp92_) {
                  ValaCCodeConstant* _tmp93_ = NULL;
                  ValaCCodeConstant* _tmp94_;
                  _tmp93_ = vala_ccode_constant_new ("NULL");
                  _tmp94_ = _tmp93_;
                  vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp94_);
                  _vala_ccode_node_unref0 (_tmp94_);
            } else {
                  ValaCCodeIdentifier* _tmp95_ = NULL;
                  ValaCCodeIdentifier* _tmp96_;
                  ValaCCodeFunctionCall* _tmp97_ = NULL;
                  ValaCCodeFunctionCall* _tmp98_;
                  ValaCCodeFunctionCall* object_creation;
                  ValaCCodeConstant* _tmp99_ = NULL;
                  ValaCCodeConstant* _tmp100_;
                  ValaCCodeConstant* _tmp101_ = NULL;
                  ValaCCodeConstant* _tmp102_;
                  ValaCCodeConstant* _tmp103_ = NULL;
                  ValaCCodeConstant* _tmp104_;
                  _tmp95_ = vala_ccode_identifier_new ("g_object_newv");
                  _tmp96_ = _tmp95_;
                  _tmp97_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp96_);
                  _tmp98_ = _tmp97_;
                  _vala_ccode_node_unref0 (_tmp96_);
                  object_creation = _tmp98_;
                  _tmp99_ = vala_ccode_constant_new ("G_TYPE_OBJECT");
                  _tmp100_ = _tmp99_;
                  vala_ccode_function_call_add_argument (object_creation, (ValaCCodeExpression*) _tmp100_);
                  _vala_ccode_node_unref0 (_tmp100_);
                  _tmp101_ = vala_ccode_constant_new ("0");
                  _tmp102_ = _tmp101_;
                  vala_ccode_function_call_add_argument (object_creation, (ValaCCodeExpression*) _tmp102_);
                  _vala_ccode_node_unref0 (_tmp102_);
                  _tmp103_ = vala_ccode_constant_new ("NULL");
                  _tmp104_ = _tmp103_;
                  vala_ccode_function_call_add_argument (object_creation, (ValaCCodeExpression*) _tmp104_);
                  _vala_ccode_node_unref0 (_tmp104_);
                  vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) object_creation);
                  _vala_ccode_node_unref0 (object_creation);
            }
      }
      _tmp105_ = vala_ccode_identifier_new ("_callback_");
      _tmp106_ = _tmp105_;
      vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp106_);
      _vala_ccode_node_unref0 (_tmp106_);
      _tmp107_ = vala_ccode_identifier_new ("_user_data_");
      _tmp108_ = _tmp107_;
      vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp108_);
      _vala_ccode_node_unref0 (_tmp108_);
      _tmp109_ = vala_method_get_real_cname (m);
      _tmp110_ = _tmp109_;
      _tmp111_ = vala_ccode_identifier_new (_tmp110_);
      _tmp112_ = _tmp111_;
      vala_ccode_function_call_add_argument (create_result, (ValaCCodeExpression*) _tmp112_);
      _vala_ccode_node_unref0 (_tmp112_);
      _g_free0 (_tmp110_);
      _tmp113_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp114_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "_async_result");
      _tmp115_ = _tmp114_;
      vala_ccode_function_add_assignment (_tmp113_, (ValaCCodeExpression*) _tmp115_, (ValaCCodeExpression*) create_result);
      _vala_ccode_node_unref0 (_tmp115_);
      _tmp116_ = vala_ccode_identifier_new ("g_simple_async_result_set_op_res_gpointer");
      _tmp117_ = _tmp116_;
      _tmp118_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp117_);
      _tmp119_ = _tmp118_;
      _vala_ccode_node_unref0 (_tmp117_);
      set_op_res_call = _tmp119_;
      _tmp120_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "_async_result");
      _tmp121_ = _tmp120_;
      vala_ccode_function_call_add_argument (set_op_res_call, (ValaCCodeExpression*) _tmp121_);
      _vala_ccode_node_unref0 (_tmp121_);
      vala_ccode_function_call_add_argument (set_op_res_call, (ValaCCodeExpression*) data_var);
      _tmp122_ = vala_method_get_real_cname (m);
      _tmp123_ = _tmp122_;
      _tmp124_ = g_strconcat (_tmp123_, "_data_free", NULL);
      _tmp125_ = _tmp124_;
      _tmp126_ = vala_ccode_identifier_new (_tmp125_);
      _tmp127_ = _tmp126_;
      vala_ccode_function_call_add_argument (set_op_res_call, (ValaCCodeExpression*) _tmp127_);
      _vala_ccode_node_unref0 (_tmp127_);
      _g_free0 (_tmp125_);
      _g_free0 (_tmp123_);
      _tmp128_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp128_, (ValaCCodeExpression*) set_op_res_call);
      _tmp129_ = vala_method_get_binding (m);
      if (_tmp129_ == VALA_MEMBER_BINDING_INSTANCE) {
            ValaParameter* _tmp130_ = NULL;
            ValaDataType* _tmp131_ = NULL;
            ValaDataType* _tmp132_ = NULL;
            ValaDataType* this_type;
            ValaCCodeIdentifier* _tmp133_ = NULL;
            ValaCCodeExpression* cself;
            gboolean _tmp134_;
            gboolean _tmp136_;
            ValaCCodeFunction* _tmp145_ = NULL;
            ValaCCodeMemberAccess* _tmp146_ = NULL;
            ValaCCodeMemberAccess* _tmp147_;
            _tmp130_ = vala_method_get_this_parameter (m);
            _tmp131_ = vala_variable_get_variable_type ((ValaVariable*) _tmp130_);
            _tmp132_ = vala_data_type_copy (_tmp131_);
            this_type = _tmp132_;
            vala_data_type_set_value_owned (this_type, TRUE);
            _tmp133_ = vala_ccode_identifier_new ("self");
            cself = (ValaCCodeExpression*) _tmp133_;
            _tmp134_ = vala_data_type_is_real_non_null_struct_type (this_type);
            if (_tmp134_) {
                  ValaCCodeUnaryExpression* _tmp135_ = NULL;
                  _tmp135_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cself);
                  _vala_ccode_node_unref0 (cself);
                  cself = (ValaCCodeExpression*) _tmp135_;
            }
            _tmp136_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, this_type);
            if (_tmp136_) {
                  ValaParameter* _tmp137_ = NULL;
                  ValaDataType* _tmp138_ = NULL;
                  ValaGLibValue* _tmp139_ = NULL;
                  ValaGLibValue* _tmp140_;
                  ValaParameter* _tmp141_ = NULL;
                  ValaTargetValue* _tmp142_ = NULL;
                  ValaTargetValue* _tmp143_;
                  ValaCCodeExpression* _tmp144_ = NULL;
                  _tmp137_ = vala_method_get_this_parameter (m);
                  _tmp138_ = vala_variable_get_variable_type ((ValaVariable*) _tmp137_);
                  _tmp139_ = vala_glib_value_new (_tmp138_, cself);
                  _tmp140_ = _tmp139_;
                  _tmp141_ = vala_method_get_this_parameter (m);
                  _tmp142_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp140_, (ValaCodeNode*) _tmp141_);
                  _tmp143_ = _tmp142_;
                  _tmp144_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp143_);
                  _vala_ccode_node_unref0 (cself);
                  cself = _tmp144_;
                  _vala_target_value_unref0 (_tmp143_);
                  _vala_target_value_unref0 (_tmp140_);
            }
            _tmp145_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp146_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "self");
            _tmp147_ = _tmp146_;
            vala_ccode_function_add_assignment (_tmp145_, (ValaCCodeExpression*) _tmp147_, cself);
            _vala_ccode_node_unref0 (_tmp147_);
            _vala_ccode_node_unref0 (cself);
            _vala_code_node_unref0 (this_type);
      }
      {
            ValaList* _tmp148_ = NULL;
            ValaList* _param_list;
            gint _tmp149_;
            gint _param_size;
            gint _param_index;
            _tmp148_ = vala_method_get_parameters (m);
            _param_list = _tmp148_;
            _tmp149_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp149_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp150_ = NULL;
                  ValaParameter* param;
                  ValaParameterDirection _tmp151_;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp150_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp150_;
                  _tmp151_ = vala_parameter_get_direction (param);
                  if (_tmp151_ != VALA_PARAMETER_DIRECTION_OUT) {
                        gboolean _tmp152_ = FALSE;
                        ValaDataType* _tmp153_ = NULL;
                        gboolean is_unowned_delegate;
                        ValaDataType* _tmp156_ = NULL;
                        ValaDataType* _tmp157_ = NULL;
                        ValaDataType* param_type;
                        gboolean _tmp158_;
                        gboolean old_captured;
                        ValaMethod* _tmp159_ = NULL;
                        ValaTargetValue* _tmp160_ = NULL;
                        ValaTargetValue* value;
                        gboolean _tmp161_ = FALSE;
                        gboolean _tmp162_ = FALSE;
                        gboolean _tmp163_;
                        ValaMethod* _tmp167_ = NULL;
                        _tmp153_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (VALA_IS_DELEGATE_TYPE (_tmp153_)) {
                              ValaDataType* _tmp154_ = NULL;
                              gboolean _tmp155_;
                              _tmp154_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp155_ = vala_data_type_get_value_owned (_tmp154_);
                              _tmp152_ = !_tmp155_;
                        } else {
                              _tmp152_ = FALSE;
                        }
                        is_unowned_delegate = _tmp152_;
                        _tmp156_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp157_ = vala_data_type_copy (_tmp156_);
                        param_type = _tmp157_;
                        vala_data_type_set_value_owned (param_type, TRUE);
                        _tmp158_ = vala_parameter_get_captured (param);
                        old_captured = _tmp158_;
                        vala_parameter_set_captured (param, FALSE);
                        _tmp159_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
                        vala_method_set_coroutine (_tmp159_, FALSE);
                        _tmp160_ = vala_code_generator_load_parameter ((ValaCodeGenerator*) self, param);
                        value = _tmp160_;
                        _tmp163_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, param_type);
                        if (_tmp163_) {
                              ValaDataType* _tmp164_ = NULL;
                              gboolean _tmp165_;
                              _tmp164_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp165_ = vala_data_type_get_value_owned (_tmp164_);
                              _tmp162_ = !_tmp165_;
                        } else {
                              _tmp162_ = FALSE;
                        }
                        if (_tmp162_) {
                              _tmp161_ = !is_unowned_delegate;
                        } else {
                              _tmp161_ = FALSE;
                        }
                        if (_tmp161_) {
                              ValaTargetValue* _tmp166_ = NULL;
                              _tmp166_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, value, (ValaCodeNode*) param);
                              _vala_target_value_unref0 (value);
                              value = _tmp166_;
                        }
                        _tmp167_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
                        vala_method_set_coroutine (_tmp167_, TRUE);
                        vala_code_generator_store_parameter ((ValaCodeGenerator*) self, param, value);
                        vala_parameter_set_captured (param, old_captured);
                        _vala_target_value_unref0 (value);
                        _vala_code_node_unref0 (param_type);
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp168_ = vala_method_get_real_cname (m);
      _tmp169_ = _tmp168_;
      _tmp170_ = g_strconcat (_tmp169_, "_co", NULL);
      _tmp171_ = _tmp170_;
      _tmp172_ = vala_ccode_identifier_new (_tmp171_);
      _tmp173_ = _tmp172_;
      _tmp174_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp173_);
      _tmp175_ = _tmp174_;
      _vala_ccode_node_unref0 (_tmp173_);
      _g_free0 (_tmp171_);
      _g_free0 (_tmp169_);
      ccall = _tmp175_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) data_var);
      _tmp176_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp176_, (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 >= ((glong) 0)) {
            _tmp0_ = len >= ((glong) 0);
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            glong _tmp1_;
            _tmp1_ = string_strnlen ((gchar*) self, offset + len);
            string_length = _tmp1_;
      } else {
            gint _tmp2_;
            _tmp2_ = strlen (self);
            string_length = (glong) _tmp2_;
      }
      if (offset < ((glong) 0)) {
            offset = string_length + offset;
            g_return_val_if_fail (offset >= ((glong) 0), NULL);
      } else {
            g_return_val_if_fail (offset <= string_length, NULL);
      }
      if (len < ((glong) 0)) {
            len = string_length - offset;
      }
      g_return_val_if_fail ((offset + len) <= string_length, NULL);
      _tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
      result = _tmp3_;
      return result;
}


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_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_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 _tmp77_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != NULL);
      _tmp0_ = vala_ccode_base_module_emit_context_new ((ValaSymbol*) m);
      _tmp1_ = _tmp0_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp1_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp1_);
      _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) {
                        gboolean _tmp65_ = FALSE;
                        ValaDataType* _tmp66_ = NULL;
                        vala_ccode_base_module_return_out_parameter ((ValaCCodeBaseModule*) self, param);
                        _tmp66_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (!VALA_IS_VALUE_TYPE (_tmp66_)) {
                              _tmp65_ = TRUE;
                        } else {
                              ValaDataType* _tmp67_ = NULL;
                              gboolean _tmp68_;
                              _tmp67_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp68_ = vala_data_type_get_nullable (_tmp67_);
                              _tmp65_ = _tmp68_;
                        }
                        if (_tmp65_) {
                              ValaCCodeFunction* _tmp69_ = NULL;
                              const gchar* _tmp70_ = NULL;
                              gchar* _tmp71_ = NULL;
                              gchar* _tmp72_;
                              ValaCCodeMemberAccess* _tmp73_ = NULL;
                              ValaCCodeMemberAccess* _tmp74_;
                              ValaCCodeConstant* _tmp75_ = NULL;
                              ValaCCodeConstant* _tmp76_;
                              _tmp69_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp70_ = vala_symbol_get_name ((ValaSymbol*) param);
                              _tmp71_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp70_);
                              _tmp72_ = _tmp71_;
                              _tmp73_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp72_);
                              _tmp74_ = _tmp73_;
                              _tmp75_ = vala_ccode_constant_new ("NULL");
                              _tmp76_ = _tmp75_;
                              vala_ccode_function_add_assignment (_tmp69_, (ValaCCodeExpression*) _tmp74_, (ValaCCodeExpression*) _tmp76_);
                              _vala_ccode_node_unref0 (_tmp76_);
                              _vala_ccode_node_unref0 (_tmp74_);
                              _g_free0 (_tmp72_);
                        }
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _tmp77_ = vala_data_type_is_real_non_null_struct_type (return_type);
      if (_tmp77_) {
            ValaCCodeMemberAccess* _tmp78_ = NULL;
            ValaCCodeExpression* cexpr;
            gboolean _tmp79_;
            ValaCCodeFunction* _tmp85_ = NULL;
            ValaCCodeIdentifier* _tmp86_ = NULL;
            ValaCCodeIdentifier* _tmp87_;
            ValaCCodeUnaryExpression* _tmp88_ = NULL;
            ValaCCodeUnaryExpression* _tmp89_;
            _tmp78_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "result");
            cexpr = (ValaCCodeExpression*) _tmp78_;
            _tmp79_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, return_type);
            if (_tmp79_) {
                  ValaGLibValue* _tmp80_ = NULL;
                  ValaGLibValue* _tmp81_;
                  ValaTargetValue* _tmp82_ = NULL;
                  ValaTargetValue* _tmp83_;
                  ValaCCodeExpression* _tmp84_ = NULL;
                  _tmp80_ = vala_glib_value_new (return_type, cexpr);
                  _tmp81_ = _tmp80_;
                  _tmp82_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp81_, (ValaCodeNode*) return_type);
                  _tmp83_ = _tmp82_;
                  _tmp84_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp83_);
                  _vala_ccode_node_unref0 (cexpr);
                  cexpr = _tmp84_;
                  _vala_target_value_unref0 (_tmp83_);
                  _vala_target_value_unref0 (_tmp81_);
            }
            _tmp85_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp86_ = vala_ccode_identifier_new ("result");
            _tmp87_ = _tmp86_;
            _tmp88_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp87_);
            _tmp89_ = _tmp88_;
            vala_ccode_function_add_assignment (_tmp85_, (ValaCCodeExpression*) _tmp89_, cexpr);
            _vala_ccode_node_unref0 (_tmp89_);
            _vala_ccode_node_unref0 (_tmp87_);
            _vala_ccode_node_unref0 (cexpr);
      } else {
            if (!VALA_IS_VOID_TYPE (return_type)) {
                  ValaCCodeFunction* _tmp90_ = NULL;
                  ValaCCodeIdentifier* _tmp91_ = NULL;
                  ValaCCodeIdentifier* _tmp92_;
                  ValaCCodeMemberAccess* _tmp93_ = NULL;
                  ValaCCodeMemberAccess* _tmp94_;
                  gboolean _tmp124_ = FALSE;
                  ValaCCodeFunction* _tmp131_ = NULL;
                  ValaCCodeIdentifier* _tmp132_ = NULL;
                  ValaCCodeIdentifier* _tmp133_;
                  _tmp90_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp91_ = vala_ccode_identifier_new ("result");
                  _tmp92_ = _tmp91_;
                  _tmp93_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "result");
                  _tmp94_ = _tmp93_;
                  vala_ccode_function_add_assignment (_tmp90_, (ValaCCodeExpression*) _tmp92_, (ValaCCodeExpression*) _tmp94_);
                  _vala_ccode_node_unref0 (_tmp94_);
                  _vala_ccode_node_unref0 (_tmp92_);
                  if (VALA_IS_ARRAY_TYPE (return_type)) {
                        ValaArrayType* _tmp95_;
                        ValaArrayType* array_type;
                        gboolean _tmp96_;
                        _tmp95_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (return_type));
                        array_type = _tmp95_;
                        _tmp96_ = vala_method_get_no_array_length (m);
                        if (!_tmp96_) {
                              {
                                    gint dim;
                                    dim = 1;
                                    {
                                          gboolean _tmp97_;
                                          _tmp97_ = TRUE;
                                          while (TRUE) {
                                                gint _tmp98_;
                                                ValaCCodeFunction* _tmp99_ = NULL;
                                                gchar* _tmp100_ = NULL;
                                                gchar* _tmp101_;
                                                ValaCCodeIdentifier* _tmp102_ = NULL;
                                                ValaCCodeIdentifier* _tmp103_;
                                                ValaCCodeUnaryExpression* _tmp104_ = NULL;
                                                ValaCCodeUnaryExpression* _tmp105_;
                                                gchar* _tmp106_ = NULL;
                                                gchar* _tmp107_;
                                                ValaCCodeMemberAccess* _tmp108_ = NULL;
                                                ValaCCodeMemberAccess* _tmp109_;
                                                if (!_tmp97_) {
                                                      dim++;
                                                }
                                                _tmp97_ = FALSE;
                                                _tmp98_ = vala_array_type_get_rank (array_type);
                                                if (!(dim <= _tmp98_)) {
                                                      break;
                                                }
                                                _tmp99_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                                _tmp100_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
                                                _tmp101_ = _tmp100_;
                                                _tmp102_ = vala_ccode_identifier_new (_tmp101_);
                                                _tmp103_ = _tmp102_;
                                                _tmp104_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp103_);
                                                _tmp105_ = _tmp104_;
                                                _tmp106_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
                                                _tmp107_ = _tmp106_;
                                                _tmp108_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp107_);
                                                _tmp109_ = _tmp108_;
                                                vala_ccode_function_add_assignment (_tmp99_, (ValaCCodeExpression*) _tmp105_, (ValaCCodeExpression*) _tmp109_);
                                                _vala_ccode_node_unref0 (_tmp109_);
                                                _g_free0 (_tmp107_);
                                                _vala_ccode_node_unref0 (_tmp105_);
                                                _vala_ccode_node_unref0 (_tmp103_);
                                                _g_free0 (_tmp101_);
                                          }
                                    }
                              }
                        }
                        _vala_code_node_unref0 (array_type);
                  } else {
                        gboolean _tmp110_ = FALSE;
                        if (VALA_IS_DELEGATE_TYPE (return_type)) {
                              ValaDelegate* _tmp111_ = NULL;
                              gboolean _tmp112_;
                              _tmp111_ = vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (return_type));
                              _tmp112_ = vala_delegate_get_has_target (_tmp111_);
                              _tmp110_ = _tmp112_;
                        } else {
                              _tmp110_ = FALSE;
                        }
                        if (_tmp110_) {
                              ValaCCodeFunction* _tmp113_ = NULL;
                              gchar* _tmp114_ = NULL;
                              gchar* _tmp115_;
                              ValaCCodeIdentifier* _tmp116_ = NULL;
                              ValaCCodeIdentifier* _tmp117_;
                              ValaCCodeUnaryExpression* _tmp118_ = NULL;
                              ValaCCodeUnaryExpression* _tmp119_;
                              gchar* _tmp120_ = NULL;
                              gchar* _tmp121_;
                              ValaCCodeMemberAccess* _tmp122_ = NULL;
                              ValaCCodeMemberAccess* _tmp123_;
                              _tmp113_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                              _tmp114_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp115_ = _tmp114_;
                              _tmp116_ = vala_ccode_identifier_new (_tmp115_);
                              _tmp117_ = _tmp116_;
                              _tmp118_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp117_);
                              _tmp119_ = _tmp118_;
                              _tmp120_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
                              _tmp121_ = _tmp120_;
                              _tmp122_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, _tmp121_);
                              _tmp123_ = _tmp122_;
                              vala_ccode_function_add_assignment (_tmp113_, (ValaCCodeExpression*) _tmp119_, (ValaCCodeExpression*) _tmp123_);
                              _vala_ccode_node_unref0 (_tmp123_);
                              _g_free0 (_tmp121_);
                              _vala_ccode_node_unref0 (_tmp119_);
                              _vala_ccode_node_unref0 (_tmp117_);
                              _g_free0 (_tmp115_);
                        }
                  }
                  if (!VALA_IS_VALUE_TYPE (return_type)) {
                        _tmp124_ = TRUE;
                  } else {
                        gboolean _tmp125_;
                        _tmp125_ = vala_data_type_get_nullable (return_type);
                        _tmp124_ = _tmp125_;
                  }
                  if (_tmp124_) {
                        ValaCCodeFunction* _tmp126_ = NULL;
                        ValaCCodeMemberAccess* _tmp127_ = NULL;
                        ValaCCodeMemberAccess* _tmp128_;
                        ValaCCodeConstant* _tmp129_ = NULL;
                        ValaCCodeConstant* _tmp130_;
                        _tmp126_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp127_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) data_var, "result");
                        _tmp128_ = _tmp127_;
                        _tmp129_ = vala_ccode_constant_new ("NULL");
                        _tmp130_ = _tmp129_;
                        vala_ccode_function_add_assignment (_tmp126_, (ValaCCodeExpression*) _tmp128_, (ValaCCodeExpression*) _tmp130_);
                        _vala_ccode_node_unref0 (_tmp130_);
                        _vala_ccode_node_unref0 (_tmp128_);
                  }
                  _tmp131_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp132_ = vala_ccode_identifier_new ("result");
                  _tmp133_ = _tmp132_;
                  vala_ccode_function_add_return (_tmp131_, (ValaCCodeExpression*) _tmp133_);
                  _vala_ccode_node_unref0 (_tmp133_);
            }
      }
      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_;
      ValaCCodeFunction* _tmp22_ = NULL;
      gchar* _tmp23_;
      gchar* _tmp24_;
      ValaCCodeVariableDeclarator* _tmp25_ = NULL;
      ValaCCodeVariableDeclarator* _tmp26_;
      ValaCCodeFunction* _tmp27_ = NULL;
      ValaCCodeIdentifier* _tmp28_ = NULL;
      ValaCCodeIdentifier* _tmp29_;
      ValaCCodeIdentifier* _tmp30_ = NULL;
      ValaCCodeIdentifier* _tmp31_;
      ValaCCodeFunction* _tmp32_ = NULL;
      ValaCCodeIdentifier* _tmp33_ = NULL;
      ValaCCodeIdentifier* _tmp34_;
      ValaCCodeMemberAccess* _tmp35_ = NULL;
      ValaCCodeMemberAccess* _tmp36_;
      ValaCCodeIdentifier* _tmp37_ = NULL;
      ValaCCodeIdentifier* _tmp38_;
      ValaCCodeFunction* _tmp39_ = NULL;
      ValaCCodeIdentifier* _tmp40_ = NULL;
      ValaCCodeIdentifier* _tmp41_;
      ValaCCodeMemberAccess* _tmp42_ = NULL;
      ValaCCodeMemberAccess* _tmp43_;
      ValaCCodeIdentifier* _tmp44_ = NULL;
      ValaCCodeIdentifier* _tmp45_;
      gchar* _tmp46_ = NULL;
      gchar* _tmp47_;
      gchar* _tmp48_;
      gchar* _tmp49_;
      ValaCCodeIdentifier* _tmp50_ = NULL;
      ValaCCodeIdentifier* _tmp51_;
      ValaCCodeFunctionCall* _tmp52_ = NULL;
      ValaCCodeFunctionCall* _tmp53_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeIdentifier* _tmp54_ = NULL;
      ValaCCodeIdentifier* _tmp55_;
      ValaCCodeFunction* _tmp56_ = NULL;
      ValaCCodeModifiers _tmp57_;
      const gchar* _tmp58_ = NULL;
      gchar* _tmp59_;
      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_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, readyfunc);
      _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp23_ = g_strconcat (dataname, "*", NULL);
      _tmp24_ = _tmp23_;
      _tmp25_ = vala_ccode_variable_declarator_new ("_data_", NULL, NULL);
      _tmp26_ = _tmp25_;
      vala_ccode_function_add_declaration (_tmp22_, _tmp24_, (ValaCCodeDeclarator*) _tmp26_, 0);
      _vala_ccode_node_unref0 (_tmp26_);
      _g_free0 (_tmp24_);
      _tmp27_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp28_ = vala_ccode_identifier_new ("_data_");
      _tmp29_ = _tmp28_;
      _tmp30_ = vala_ccode_identifier_new ("_user_data_");
      _tmp31_ = _tmp30_;
      vala_ccode_function_add_assignment (_tmp27_, (ValaCCodeExpression*) _tmp29_, (ValaCCodeExpression*) _tmp31_);
      _vala_ccode_node_unref0 (_tmp31_);
      _vala_ccode_node_unref0 (_tmp29_);
      _tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp33_ = vala_ccode_identifier_new ("_data_");
      _tmp34_ = _tmp33_;
      _tmp35_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp34_, "_source_object_");
      _tmp36_ = _tmp35_;
      _tmp37_ = vala_ccode_identifier_new ("source_object");
      _tmp38_ = _tmp37_;
      vala_ccode_function_add_assignment (_tmp32_, (ValaCCodeExpression*) _tmp36_, (ValaCCodeExpression*) _tmp38_);
      _vala_ccode_node_unref0 (_tmp38_);
      _vala_ccode_node_unref0 (_tmp36_);
      _vala_ccode_node_unref0 (_tmp34_);
      _tmp39_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp40_ = vala_ccode_identifier_new ("_data_");
      _tmp41_ = _tmp40_;
      _tmp42_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp41_, "_res_");
      _tmp43_ = _tmp42_;
      _tmp44_ = vala_ccode_identifier_new ("_res_");
      _tmp45_ = _tmp44_;
      vala_ccode_function_add_assignment (_tmp39_, (ValaCCodeExpression*) _tmp43_, (ValaCCodeExpression*) _tmp45_);
      _vala_ccode_node_unref0 (_tmp45_);
      _vala_ccode_node_unref0 (_tmp43_);
      _vala_ccode_node_unref0 (_tmp41_);
      _tmp46_ = vala_method_get_real_cname (m);
      _tmp47_ = _tmp46_;
      _tmp48_ = g_strconcat (_tmp47_, "_co", NULL);
      _tmp49_ = _tmp48_;
      _tmp50_ = vala_ccode_identifier_new (_tmp49_);
      _tmp51_ = _tmp50_;
      _tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp51_);
      _tmp53_ = _tmp52_;
      _vala_ccode_node_unref0 (_tmp51_);
      _g_free0 (_tmp49_);
      _g_free0 (_tmp47_);
      ccall = _tmp53_;
      _tmp54_ = vala_ccode_identifier_new ("_data_");
      _tmp55_ = _tmp54_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp55_);
      _vala_ccode_node_unref0 (_tmp55_);
      _tmp56_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp56_, (ValaCCodeExpression*) ccall);
      _tmp57_ = vala_ccode_function_get_modifiers (readyfunc);
      vala_ccode_function_set_modifiers (readyfunc, _tmp57_ | VALA_CCODE_MODIFIERS_STATIC);
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, readyfunc);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, readyfunc);
      _tmp58_ = vala_ccode_function_get_name (readyfunc);
      _tmp59_ = g_strdup (_tmp58_);
      result = _tmp59_;
      _vala_ccode_node_unref0 (ccall);
      _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