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

/* valagasyncmodule.vala
 *
 * Copyright (C) 2008-2012  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 "valacodegen.h"
#include <vala.h>
#include <valaccode.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>
#include <glib-object.h>
#include <float.h>
#include <math.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#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_ccode_declarator_suffix_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_declarator_suffix_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_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)))

static gpointer vala_gasync_module_parent_class = NULL;

static ValaCCodeStruct* vala_gasync_module_generate_data_struct (ValaGAsyncModule* self,
                                                          ValaMethod* m);
static ValaCCodeFunction* vala_gasync_module_generate_free_function (ValaGAsyncModule* self,
                                                              ValaMethod* m);
static void vala_gasync_module_generate_async_function (ValaGAsyncModule* self,
                                                 ValaMethod* m);
static gboolean vala_gasync_module_real_generate_method_declaration (ValaCCodeBaseModule* base,
                                                              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);
static void vala_gasync_module_real_visit_creation_method (ValaCodeVisitor* base,
                                                    ValaCreationMethod* m);
static gchar* vala_gasync_module_real_generate_ready_function (ValaCCodeBaseModule* base,
                                                        ValaMethod* m);
static void vala_gasync_module_real_generate_virtual_method_declaration (ValaGTypeModule* base,
                                                                  ValaMethod* m,
                                                                  ValaCCodeFile* decl_space,
                                                                  ValaCCodeStruct* type_struct);
static void vala_gasync_module_real_visit_yield_statement (ValaCodeVisitor* base,
                                                    ValaYieldStatement* stmt);
static void vala_gasync_module_real_return_with_exception (ValaGErrorModule* base,
                                                    ValaCCodeExpression* error_expr);
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);
static GType vala_gasync_module_get_type_once (void);

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)
{
	gchar* dataname = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ValaCCodeStruct* data = NULL;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	ValaCCodeStruct* _tmp9_;
	ValaCCodeStruct* _tmp10_;
	ValaCCodeStruct* _tmp11_;
	ValaCCodeStruct* _tmp12_;
	ValaCCodeStruct* _tmp13_;
	ValaCCodeStruct* _tmp14_;
	ValaMemberBinding _tmp16_;
	ValaMemberBinding _tmp17_;
	ValaDataType* _tmp126_;
	ValaDataType* _tmp127_;
	ValaCCodeStruct* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (m != NULL, NULL);
	_tmp0_ = vala_get_ccode_name ((ValaCodeNode*) 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_ = dataname;
	_tmp7_ = g_strconcat ("_", _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_ccode_struct_new (_tmp8_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	data = _tmp10_;
	_tmp11_ = data;
	vala_ccode_struct_add_field (_tmp11_, "int", "_state_", 0, NULL);
	_tmp12_ = data;
	vala_ccode_struct_add_field (_tmp12_, "GObject*", "_source_object_", 0, NULL);
	_tmp13_ = data;
	vala_ccode_struct_add_field (_tmp13_, "GAsyncResult*", "_res_", 0, NULL);
	_tmp14_ = data;
	vala_ccode_struct_add_field (_tmp14_, "GTask*", "_async_result", 0, NULL);
	if (G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
		ValaCCodeStruct* _tmp15_;
		_tmp15_ = data;
		vala_ccode_struct_add_field (_tmp15_, "GType", "object_type", 0, NULL);
	}
	_tmp16_ = vala_method_get_binding (m);
	_tmp17_ = _tmp16_;
	if (_tmp17_ == VALA_MEMBER_BINDING_INSTANCE) {
		ValaTypeSymbol* type_sym = NULL;
		ValaSymbol* _tmp18_;
		ValaSymbol* _tmp19_;
		ValaTypeSymbol* _tmp20_;
		ValaTypeSymbol* _tmp21_;
		_tmp18_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
		_tmp19_ = _tmp18_;
		_tmp20_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol));
		type_sym = _tmp20_;
		_tmp21_ = type_sym;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALA_TYPE_OBJECT_TYPE_SYMBOL)) {
			ValaCCodeStruct* _tmp22_;
			ValaTypeSymbol* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			_tmp22_ = data;
			_tmp23_ = type_sym;
			_tmp24_ = vala_get_ccode_name ((ValaCodeNode*) _tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = g_strconcat (_tmp25_, "*", NULL);
			_tmp27_ = _tmp26_;
			vala_ccode_struct_add_field (_tmp22_, _tmp27_, "self", 0, NULL);
			_g_free0 (_tmp27_);
			_g_free0 (_tmp25_);
		} else {
			ValaCCodeStruct* _tmp28_;
			ValaTypeSymbol* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			_tmp28_ = data;
			_tmp29_ = type_sym;
			_tmp30_ = vala_get_ccode_name ((ValaCodeNode*) _tmp29_);
			_tmp31_ = _tmp30_;
			vala_ccode_struct_add_field (_tmp28_, _tmp31_, "self", 0, NULL);
			_g_free0 (_tmp31_);
		}
		_vala_code_node_unref0 (type_sym);
	}
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp32_;
		gint _param_size = 0;
		ValaList* _tmp33_;
		gint _tmp34_;
		gint _tmp35_;
		gint _param_index = 0;
		_tmp32_ = vala_callable_get_parameters ((ValaCallable*) m);
		_param_list = _tmp32_;
		_tmp33_ = _param_list;
		_tmp34_ = vala_collection_get_size ((ValaCollection*) _tmp33_);
		_tmp35_ = _tmp34_;
		_param_size = _tmp35_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp36_;
			gint _tmp37_;
			ValaParameter* param = NULL;
			ValaList* _tmp38_;
			gpointer _tmp39_;
			ValaDataType* param_type = NULL;
			ValaParameter* _tmp40_;
			ValaDataType* _tmp41_;
			ValaDataType* _tmp42_;
			ValaDataType* _tmp43_;
			ValaDataType* _tmp44_;
			ValaCCodeStruct* _tmp45_;
			ValaDataType* _tmp46_;
			gchar* _tmp47_;
			gchar* _tmp48_;
			ValaParameter* _tmp49_;
			gchar* _tmp50_;
			gchar* _tmp51_;
			ValaDataType* _tmp52_;
			ValaCCodeDeclaratorSuffix* _tmp53_;
			ValaCCodeDeclaratorSuffix* _tmp54_;
			ValaParameter* _tmp55_;
			ValaDataType* _tmp56_;
			ValaDataType* _tmp57_;
			_param_index = _param_index + 1;
			_tmp36_ = _param_index;
			_tmp37_ = _param_size;
			if (!(_tmp36_ < _tmp37_)) {
				break;
			}
			_tmp38_ = _param_list;
			_tmp39_ = vala_list_get (_tmp38_, _param_index);
			param = (ValaParameter*) _tmp39_;
			_tmp40_ = param;
			_tmp41_ = vala_variable_get_variable_type ((ValaVariable*) _tmp40_);
			_tmp42_ = _tmp41_;
			_tmp43_ = vala_data_type_copy (_tmp42_);
			param_type = _tmp43_;
			_tmp44_ = param_type;
			vala_data_type_set_value_owned (_tmp44_, TRUE);
			_tmp45_ = data;
			_tmp46_ = param_type;
			_tmp47_ = vala_get_ccode_name ((ValaCodeNode*) _tmp46_);
			_tmp48_ = _tmp47_;
			_tmp49_ = param;
			_tmp50_ = vala_get_ccode_name ((ValaCodeNode*) _tmp49_);
			_tmp51_ = _tmp50_;
			_tmp52_ = param_type;
			_tmp53_ = vala_ccode_base_module_get_ccode_declarator_suffix ((ValaCCodeBaseModule*) self, _tmp52_);
			_tmp54_ = _tmp53_;
			vala_ccode_struct_add_field (_tmp45_, _tmp48_, _tmp51_, 0, _tmp54_);
			_vala_ccode_declarator_suffix_unref0 (_tmp54_);
			_g_free0 (_tmp51_);
			_g_free0 (_tmp48_);
			_tmp55_ = param;
			_tmp56_ = vala_variable_get_variable_type ((ValaVariable*) _tmp55_);
			_tmp57_ = _tmp56_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, VALA_TYPE_ARRAY_TYPE)) {
				ValaArrayType* array_type = NULL;
				ValaParameter* _tmp58_;
				ValaDataType* _tmp59_;
				ValaDataType* _tmp60_;
				ValaArrayType* _tmp61_;
				gboolean _tmp62_ = FALSE;
				ValaParameter* _tmp63_;
				_tmp58_ = param;
				_tmp59_ = vala_variable_get_variable_type ((ValaVariable*) _tmp58_);
				_tmp60_ = _tmp59_;
				_tmp61_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
				array_type = _tmp61_;
				_tmp63_ = param;
				if (vala_get_ccode_array_length ((ValaCodeNode*) _tmp63_)) {
					ValaArrayType* _tmp64_;
					gboolean _tmp65_;
					gboolean _tmp66_;
					_tmp64_ = array_type;
					_tmp65_ = vala_array_type_get_fixed_length (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
					_tmp66_ = _tmp65_;
					_tmp62_ = !_tmp66_;
				} else {
					_tmp62_ = FALSE;
				}
				if (_tmp62_) {
					gchar* length_ctype = NULL;
					ValaParameter* _tmp67_;
					gchar* _tmp68_;
					_tmp67_ = param;
					_tmp68_ = vala_get_ccode_array_length_type ((ValaCodeNode*) _tmp67_);
					length_ctype = _tmp68_;
					{
						gint dim = 0;
						dim = 1;
						{
							gboolean _tmp69_ = FALSE;
							_tmp69_ = TRUE;
							while (TRUE) {
								ValaArrayType* _tmp71_;
								gint _tmp72_;
								gint _tmp73_;
								ValaCCodeStruct* _tmp74_;
								const gchar* _tmp75_;
								ValaParameter* _tmp76_;
								gchar* _tmp77_;
								gchar* _tmp78_;
								if (!_tmp69_) {
									gint _tmp70_;
									_tmp70_ = dim;
									dim = _tmp70_ + 1;
								}
								_tmp69_ = FALSE;
								_tmp71_ = array_type;
								_tmp72_ = vala_array_type_get_rank (_tmp71_);
								_tmp73_ = _tmp72_;
								if (!(dim <= _tmp73_)) {
									break;
								}
								_tmp74_ = data;
								_tmp75_ = length_ctype;
								_tmp76_ = param;
								_tmp77_ = vala_ccode_base_module_get_variable_array_length_cname ((ValaCCodeBaseModule*) self, (ValaVariable*) _tmp76_, dim);
								_tmp78_ = _tmp77_;
								vala_ccode_struct_add_field (_tmp74_, _tmp75_, _tmp78_, 0, NULL);
								_g_free0 (_tmp78_);
							}
						}
					}
					_g_free0 (length_ctype);
				}
				_vala_code_node_unref0 (array_type);
			} else {
				ValaParameter* _tmp79_;
				ValaDataType* _tmp80_;
				ValaDataType* _tmp81_;
				_tmp79_ = param;
				_tmp80_ = vala_variable_get_variable_type ((ValaVariable*) _tmp79_);
				_tmp81_ = _tmp80_;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp81_, VALA_TYPE_DELEGATE_TYPE)) {
					ValaDelegateType* deleg_type = NULL;
					ValaParameter* _tmp82_;
					ValaDataType* _tmp83_;
					ValaDataType* _tmp84_;
					ValaDelegateType* _tmp85_;
					ValaDelegateType* _tmp86_;
					ValaDelegate* _tmp87_;
					ValaDelegate* _tmp88_;
					gboolean _tmp89_;
					gboolean _tmp90_;
					_tmp82_ = param;
					_tmp83_ = vala_variable_get_variable_type ((ValaVariable*) _tmp82_);
					_tmp84_ = _tmp83_;
					_tmp85_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp84_, VALA_TYPE_DELEGATE_TYPE, ValaDelegateType));
					deleg_type = _tmp85_;
					_tmp86_ = deleg_type;
					_tmp87_ = vala_delegate_type_get_delegate_symbol (_tmp86_);
					_tmp88_ = _tmp87_;
					_tmp89_ = vala_delegate_get_has_target (_tmp88_);
					_tmp90_ = _tmp89_;
					if (_tmp90_) {
						ValaCCodeStruct* _tmp91_;
						ValaDataType* _tmp92_;
						gchar* _tmp93_;
						gchar* _tmp94_;
						ValaParameter* _tmp95_;
						gchar* _tmp96_;
						gchar* _tmp97_;
						ValaDelegateType* _tmp98_;
						_tmp91_ = data;
						_tmp92_ = ((ValaCCodeBaseModule*) self)->delegate_target_type;
						_tmp93_ = vala_get_ccode_name ((ValaCodeNode*) _tmp92_);
						_tmp94_ = _tmp93_;
						_tmp95_ = param;
						_tmp96_ = vala_get_ccode_delegate_target_name ((ValaVariable*) _tmp95_);
						_tmp97_ = _tmp96_;
						vala_ccode_struct_add_field (_tmp91_, _tmp94_, _tmp97_, 0, NULL);
						_g_free0 (_tmp97_);
						_g_free0 (_tmp94_);
						_tmp98_ = deleg_type;
						if (vala_data_type_is_disposable ((ValaDataType*) _tmp98_)) {
							ValaCCodeStruct* _tmp99_;
							ValaDelegateType* _tmp100_;
							gchar* _tmp101_;
							gchar* _tmp102_;
							ValaParameter* _tmp103_;
							gchar* _tmp104_;
							gchar* _tmp105_;
							_tmp99_ = data;
							_tmp100_ = ((ValaCCodeBaseModule*) self)->delegate_target_destroy_type;
							_tmp101_ = vala_get_ccode_name ((ValaCodeNode*) _tmp100_);
							_tmp102_ = _tmp101_;
							_tmp103_ = param;
							_tmp104_ = vala_get_ccode_delegate_target_destroy_notify_name ((ValaVariable*) _tmp103_);
							_tmp105_ = _tmp104_;
							vala_ccode_struct_add_field (_tmp99_, _tmp102_, _tmp105_, 0, NULL);
							_g_free0 (_tmp105_);
							_g_free0 (_tmp102_);
						}
					}
					_vala_code_node_unref0 (deleg_type);
				}
			}
			_vala_code_node_unref0 (param_type);
			_vala_code_node_unref0 (param);
		}
	}
	{
		ValaList* _type_param_list = NULL;
		ValaList* _tmp106_;
		gint _type_param_size = 0;
		ValaList* _tmp107_;
		gint _tmp108_;
		gint _tmp109_;
		gint _type_param_index = 0;
		_tmp106_ = vala_method_get_type_parameters (m);
		_type_param_list = _tmp106_;
		_tmp107_ = _type_param_list;
		_tmp108_ = vala_collection_get_size ((ValaCollection*) _tmp107_);
		_tmp109_ = _tmp108_;
		_type_param_size = _tmp109_;
		_type_param_index = -1;
		while (TRUE) {
			gint _tmp110_;
			gint _tmp111_;
			ValaTypeParameter* type_param = NULL;
			ValaList* _tmp112_;
			gpointer _tmp113_;
			ValaCCodeStruct* _tmp114_;
			ValaTypeParameter* _tmp115_;
			gchar* _tmp116_;
			gchar* _tmp117_;
			ValaCCodeStruct* _tmp118_;
			ValaTypeParameter* _tmp119_;
			gchar* _tmp120_;
			gchar* _tmp121_;
			ValaCCodeStruct* _tmp122_;
			ValaTypeParameter* _tmp123_;
			gchar* _tmp124_;
			gchar* _tmp125_;
			_type_param_index = _type_param_index + 1;
			_tmp110_ = _type_param_index;
			_tmp111_ = _type_param_size;
			if (!(_tmp110_ < _tmp111_)) {
				break;
			}
			_tmp112_ = _type_param_list;
			_tmp113_ = vala_list_get (_tmp112_, _type_param_index);
			type_param = (ValaTypeParameter*) _tmp113_;
			_tmp114_ = data;
			_tmp115_ = type_param;
			_tmp116_ = vala_get_ccode_type_id ((ValaCodeNode*) _tmp115_);
			_tmp117_ = _tmp116_;
			vala_ccode_struct_add_field (_tmp114_, "GType", _tmp117_, 0, NULL);
			_g_free0 (_tmp117_);
			_tmp118_ = data;
			_tmp119_ = type_param;
			_tmp120_ = vala_get_ccode_copy_function ((ValaTypeSymbol*) _tmp119_);
			_tmp121_ = _tmp120_;
			vala_ccode_struct_add_field (_tmp118_, "GBoxedCopyFunc", _tmp121_, 0, NULL);
			_g_free0 (_tmp121_);
			_tmp122_ = data;
			_tmp123_ = type_param;
			_tmp124_ = vala_get_ccode_destroy_function ((ValaTypeSymbol*) _tmp123_);
			_tmp125_ = _tmp124_;
			vala_ccode_struct_add_field (_tmp122_, "GDestroyNotify", _tmp125_, 0, NULL);
			_g_free0 (_tmp125_);
			_vala_code_node_unref0 (type_param);
		}
	}
	_tmp126_ = vala_callable_get_return_type ((ValaCallable*) m);
	_tmp127_ = _tmp126_;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp127_, VALA_TYPE_VOID_TYPE)) {
		ValaCCodeStruct* _tmp128_;
		ValaDataType* _tmp129_;
		ValaDataType* _tmp130_;
		gchar* _tmp131_;
		gchar* _tmp132_;
		ValaDataType* _tmp133_;
		ValaDataType* _tmp134_;
		_tmp128_ = data;
		_tmp129_ = vala_callable_get_return_type ((ValaCallable*) m);
		_tmp130_ = _tmp129_;
		_tmp131_ = vala_get_ccode_name ((ValaCodeNode*) _tmp130_);
		_tmp132_ = _tmp131_;
		vala_ccode_struct_add_field (_tmp128_, _tmp132_, "result", 0, NULL);
		_g_free0 (_tmp132_);
		_tmp133_ = vala_callable_get_return_type ((ValaCallable*) m);
		_tmp134_ = _tmp133_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp134_, VALA_TYPE_ARRAY_TYPE)) {
			ValaArrayType* array_type = NULL;
			ValaDataType* _tmp135_;
			ValaDataType* _tmp136_;
			ValaArrayType* _tmp137_;
			_tmp135_ = vala_callable_get_return_type ((ValaCallable*) m);
			_tmp136_ = _tmp135_;
			_tmp137_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp136_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
			array_type = _tmp137_;
			if (vala_get_ccode_array_length ((ValaCodeNode*) m)) {
				gchar* length_ctype = NULL;
				gchar* _tmp138_;
				_tmp138_ = vala_get_ccode_array_length_type ((ValaCodeNode*) m);
				length_ctype = _tmp138_;
				{
					gint dim = 0;
					dim = 1;
					{
						gboolean _tmp139_ = FALSE;
						_tmp139_ = TRUE;
						while (TRUE) {
							ValaArrayType* _tmp141_;
							gint _tmp142_;
							gint _tmp143_;
							ValaCCodeStruct* _tmp144_;
							const gchar* _tmp145_;
							gchar* _tmp146_;
							gchar* _tmp147_;
							if (!_tmp139_) {
								gint _tmp140_;
								_tmp140_ = dim;
								dim = _tmp140_ + 1;
							}
							_tmp139_ = FALSE;
							_tmp141_ = array_type;
							_tmp142_ = vala_array_type_get_rank (_tmp141_);
							_tmp143_ = _tmp142_;
							if (!(dim <= _tmp143_)) {
								break;
							}
							_tmp144_ = data;
							_tmp145_ = length_ctype;
							_tmp146_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
							_tmp147_ = _tmp146_;
							vala_ccode_struct_add_field (_tmp144_, _tmp145_, _tmp147_, 0, NULL);
							_g_free0 (_tmp147_);
						}
					}
				}
				_g_free0 (length_ctype);
			}
			_vala_code_node_unref0 (array_type);
		} else {
			ValaDataType* _tmp148_;
			ValaDataType* _tmp149_;
			_tmp148_ = vala_callable_get_return_type ((ValaCallable*) m);
			_tmp149_ = _tmp148_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp149_, VALA_TYPE_DELEGATE_TYPE)) {
				ValaDelegateType* deleg_type = NULL;
				ValaDataType* _tmp150_;
				ValaDataType* _tmp151_;
				ValaDelegateType* _tmp152_;
				ValaDelegateType* _tmp153_;
				ValaDelegate* _tmp154_;
				ValaDelegate* _tmp155_;
				gboolean _tmp156_;
				gboolean _tmp157_;
				_tmp150_ = vala_callable_get_return_type ((ValaCallable*) m);
				_tmp151_ = _tmp150_;
				_tmp152_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp151_, VALA_TYPE_DELEGATE_TYPE, ValaDelegateType));
				deleg_type = _tmp152_;
				_tmp153_ = deleg_type;
				_tmp154_ = vala_delegate_type_get_delegate_symbol (_tmp153_);
				_tmp155_ = _tmp154_;
				_tmp156_ = vala_delegate_get_has_target (_tmp155_);
				_tmp157_ = _tmp156_;
				if (_tmp157_) {
					ValaCCodeStruct* _tmp158_;
					ValaDataType* _tmp159_;
					gchar* _tmp160_;
					gchar* _tmp161_;
					gchar* _tmp162_;
					gchar* _tmp163_;
					ValaCCodeStruct* _tmp164_;
					ValaDelegateType* _tmp165_;
					gchar* _tmp166_;
					gchar* _tmp167_;
					gchar* _tmp168_;
					gchar* _tmp169_;
					_tmp158_ = data;
					_tmp159_ = ((ValaCCodeBaseModule*) self)->delegate_target_type;
					_tmp160_ = vala_get_ccode_name ((ValaCodeNode*) _tmp159_);
					_tmp161_ = _tmp160_;
					_tmp162_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
					_tmp163_ = _tmp162_;
					vala_ccode_struct_add_field (_tmp158_, _tmp161_, _tmp163_, 0, NULL);
					_g_free0 (_tmp163_);
					_g_free0 (_tmp161_);
					_tmp164_ = data;
					_tmp165_ = ((ValaCCodeBaseModule*) self)->delegate_target_destroy_type;
					_tmp166_ = vala_get_ccode_name ((ValaCodeNode*) _tmp165_);
					_tmp167_ = _tmp166_;
					_tmp168_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, "result");
					_tmp169_ = _tmp168_;
					vala_ccode_struct_add_field (_tmp164_, _tmp167_, _tmp169_, 0, NULL);
					_g_free0 (_tmp169_);
					_g_free0 (_tmp167_);
				}
				_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)
{
	gchar* dataname = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ValaCCodeFunction* freefunc = NULL;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaCCodeFunction* _tmp12_;
	ValaCCodeFunction* _tmp13_;
	ValaCCodeParameter* _tmp14_;
	ValaCCodeParameter* _tmp15_;
	ValaCCodeBaseModuleEmitContext* _tmp16_;
	ValaCCodeBaseModuleEmitContext* _tmp17_;
	ValaCCodeFunction* _tmp18_;
	ValaCCodeFunction* _tmp19_;
	ValaCCodeFunction* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	ValaCCodeIdentifier* _tmp24_;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeVariableDeclarator* _tmp26_;
	ValaCCodeVariableDeclarator* _tmp27_;
	ValaDataType* _tmp58_;
	ValaDataType* _tmp59_;
	ValaMemberBinding _tmp83_;
	ValaMemberBinding _tmp84_;
	ValaCCodeFunctionCall* freecall = NULL;
	ValaCCodeIdentifier* _tmp98_;
	ValaCCodeIdentifier* _tmp99_;
	ValaCCodeFunctionCall* _tmp100_;
	ValaCCodeFunctionCall* _tmp101_;
	const gchar* _tmp102_;
	ValaCCodeIdentifier* _tmp103_;
	ValaCCodeIdentifier* _tmp104_;
	ValaCCodeIdentifier* _tmp105_;
	ValaCCodeIdentifier* _tmp106_;
	ValaCCodeFunction* _tmp107_;
	ValaCCodeFunction* _tmp108_;
	ValaCCodeFile* _tmp109_;
	ValaCCodeFunction* _tmp110_;
	ValaCCodeFile* _tmp111_;
	ValaCCodeFunction* _tmp112_;
	ValaCCodeFunction* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (m != NULL, NULL);
	_tmp0_ = vala_get_ccode_name ((ValaCodeNode*) 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_get_ccode_real_name ((ValaSymbol*) 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_;
	_tmp12_ = freefunc;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp12_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp13_ = freefunc;
	_tmp14_ = vala_ccode_parameter_new ("_data", "gpointer");
	_tmp15_ = _tmp14_;
	vala_ccode_function_add_parameter (_tmp13_, _tmp15_);
	_vala_ccode_node_unref0 (_tmp15_);
	_tmp16_ = vala_ccode_base_module_emit_context_new ((ValaSymbol*) m);
	_tmp17_ = _tmp16_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp17_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp17_);
	_tmp18_ = freefunc;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp18_);
	_tmp19_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp20_ = _tmp19_;
	_tmp21_ = dataname;
	_tmp22_ = g_strconcat (_tmp21_, "*", NULL);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_ccode_identifier_new ("_data");
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_ccode_variable_declarator_new ("_data_", (ValaCCodeExpression*) _tmp25_, NULL);
	_tmp27_ = _tmp26_;
	vala_ccode_function_add_declaration (_tmp20_, _tmp23_, (ValaCCodeDeclarator*) _tmp27_, 0);
	_vala_ccode_node_unref0 (_tmp27_);
	_vala_ccode_node_unref0 (_tmp25_);
	_g_free0 (_tmp23_);
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp28_;
		gint _param_size = 0;
		ValaList* _tmp29_;
		gint _tmp30_;
		gint _tmp31_;
		gint _param_index = 0;
		_tmp28_ = vala_callable_get_parameters ((ValaCallable*) m);
		_param_list = _tmp28_;
		_tmp29_ = _param_list;
		_tmp30_ = vala_collection_get_size ((ValaCollection*) _tmp29_);
		_tmp31_ = _tmp30_;
		_param_size = _tmp31_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp32_;
			gint _tmp33_;
			ValaParameter* param = NULL;
			ValaList* _tmp34_;
			gpointer _tmp35_;
			gboolean _tmp36_ = FALSE;
			ValaParameter* _tmp37_;
			gboolean _tmp38_;
			gboolean _tmp39_;
			_param_index = _param_index + 1;
			_tmp32_ = _param_index;
			_tmp33_ = _param_size;
			if (!(_tmp32_ < _tmp33_)) {
				break;
			}
			_tmp34_ = _param_list;
			_tmp35_ = vala_list_get (_tmp34_, _param_index);
			param = (ValaParameter*) _tmp35_;
			_tmp37_ = param;
			_tmp38_ = vala_parameter_get_captured (_tmp37_);
			_tmp39_ = _tmp38_;
			if (!_tmp39_) {
				ValaParameter* _tmp40_;
				ValaParameterDirection _tmp41_;
				ValaParameterDirection _tmp42_;
				_tmp40_ = param;
				_tmp41_ = vala_parameter_get_direction (_tmp40_);
				_tmp42_ = _tmp41_;
				_tmp36_ = _tmp42_ != VALA_PARAMETER_DIRECTION_OUT;
			} else {
				_tmp36_ = FALSE;
			}
			if (_tmp36_) {
				ValaDataType* param_type = NULL;
				ValaParameter* _tmp43_;
				ValaDataType* _tmp44_;
				ValaDataType* _tmp45_;
				ValaDataType* _tmp46_;
				ValaDataType* _tmp47_;
				gboolean _tmp48_;
				gboolean _tmp49_;
				ValaDataType* _tmp52_;
				_tmp43_ = param;
				_tmp44_ = vala_variable_get_variable_type ((ValaVariable*) _tmp43_);
				_tmp45_ = _tmp44_;
				_tmp46_ = vala_data_type_copy (_tmp45_);
				param_type = _tmp46_;
				_tmp47_ = param_type;
				_tmp48_ = vala_data_type_get_value_owned (_tmp47_);
				_tmp49_ = _tmp48_;
				if (!_tmp49_) {
					ValaDataType* _tmp50_;
					ValaDataType* _tmp51_;
					_tmp50_ = param_type;
					_tmp51_ = param_type;
					vala_data_type_set_value_owned (_tmp50_, !vala_ccode_base_module_no_implicit_copy ((ValaCCodeBaseModule*) self, _tmp51_));
				}
				_tmp52_ = param_type;
				if (vala_ccode_base_module_requires_destroy (_tmp52_)) {
					ValaCCodeFunction* _tmp53_;
					ValaCCodeFunction* _tmp54_;
					ValaParameter* _tmp55_;
					ValaCCodeExpression* _tmp56_;
					ValaCCodeExpression* _tmp57_;
					_tmp53_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp54_ = _tmp53_;
					_tmp55_ = param;
					_tmp56_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, _tmp55_);
					_tmp57_ = _tmp56_;
					vala_ccode_function_add_expression (_tmp54_, _tmp57_);
					_vala_ccode_node_unref0 (_tmp57_);
				}
				_vala_code_node_unref0 (param_type);
			}
			_vala_code_node_unref0 (param);
		}
	}
	_tmp58_ = vala_callable_get_return_type ((ValaCallable*) m);
	_tmp59_ = _tmp58_;
	if (vala_ccode_base_module_requires_destroy (_tmp59_)) {
		gboolean _tmp60_ = FALSE;
		if (vala_get_ccode_array_length ((ValaCodeNode*) m)) {
			_tmp60_ = TRUE;
		} else {
			ValaDataType* _tmp61_;
			ValaDataType* _tmp62_;
			_tmp61_ = vala_callable_get_return_type ((ValaCallable*) m);
			_tmp62_ = _tmp61_;
			_tmp60_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp62_, VALA_TYPE_ARRAY_TYPE);
		}
		if (_tmp60_) {
			ValaLocalVariable* v = NULL;
			ValaDataType* _tmp63_;
			ValaDataType* _tmp64_;
			ValaLocalVariable* _tmp65_;
			ValaCCodeFunction* _tmp66_;
			ValaCCodeFunction* _tmp67_;
			ValaLocalVariable* _tmp68_;
			ValaCCodeExpression* _tmp69_;
			ValaCCodeExpression* _tmp70_;
			_tmp63_ = vala_callable_get_return_type ((ValaCallable*) m);
			_tmp64_ = _tmp63_;
			_tmp65_ = vala_local_variable_new (_tmp64_, ".result", NULL, NULL);
			v = _tmp65_;
			_tmp66_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp67_ = _tmp66_;
			_tmp68_ = v;
			_tmp69_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, _tmp68_);
			_tmp70_ = _tmp69_;
			vala_ccode_function_add_expression (_tmp67_, _tmp70_);
			_vala_ccode_node_unref0 (_tmp70_);
			_vala_code_node_unref0 (v);
		} else {
			ValaGLibValue* v = NULL;
			ValaDataType* _tmp71_;
			ValaDataType* _tmp72_;
			ValaCCodeIdentifier* _tmp73_;
			ValaCCodeIdentifier* _tmp74_;
			ValaGLibValue* _tmp75_;
			ValaGLibValue* _tmp76_;
			ValaGLibValue* _tmp77_;
			ValaCCodeFunction* _tmp78_;
			ValaCCodeFunction* _tmp79_;
			ValaGLibValue* _tmp80_;
			ValaCCodeExpression* _tmp81_;
			ValaCCodeExpression* _tmp82_;
			_tmp71_ = vala_callable_get_return_type ((ValaCallable*) m);
			_tmp72_ = _tmp71_;
			_tmp73_ = vala_ccode_identifier_new ("_data_->result");
			_tmp74_ = _tmp73_;
			_tmp75_ = vala_glib_value_new (_tmp72_, (ValaCCodeExpression*) _tmp74_, TRUE);
			_tmp76_ = _tmp75_;
			_vala_ccode_node_unref0 (_tmp74_);
			v = _tmp76_;
			_tmp77_ = v;
			_tmp77_->array_null_terminated = vala_get_ccode_array_null_terminated ((ValaCodeNode*) m);
			_tmp78_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp79_ = _tmp78_;
			_tmp80_ = v;
			_tmp81_ = vala_ccode_base_module_destroy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp80_, FALSE);
			_tmp82_ = _tmp81_;
			vala_ccode_function_add_expression (_tmp79_, _tmp82_);
			_vala_ccode_node_unref0 (_tmp82_);
			_vala_target_value_unref0 (v);
		}
	}
	_tmp83_ = vala_method_get_binding (m);
	_tmp84_ = _tmp83_;
	if (_tmp84_ == VALA_MEMBER_BINDING_INSTANCE) {
		ValaDataType* this_type = NULL;
		ValaParameter* _tmp85_;
		ValaParameter* _tmp86_;
		ValaDataType* _tmp87_;
		ValaDataType* _tmp88_;
		ValaDataType* _tmp89_;
		ValaDataType* _tmp90_;
		ValaDataType* _tmp91_;
		_tmp85_ = vala_method_get_this_parameter (m);
		_tmp86_ = _tmp85_;
		_tmp87_ = vala_variable_get_variable_type ((ValaVariable*) _tmp86_);
		_tmp88_ = _tmp87_;
		_tmp89_ = vala_data_type_copy (_tmp88_);
		this_type = _tmp89_;
		_tmp90_ = this_type;
		vala_data_type_set_value_owned (_tmp90_, TRUE);
		_tmp91_ = this_type;
		if (vala_ccode_base_module_requires_destroy (_tmp91_)) {
			ValaCCodeFunction* _tmp92_;
			ValaCCodeFunction* _tmp93_;
			ValaParameter* _tmp94_;
			ValaParameter* _tmp95_;
			ValaCCodeExpression* _tmp96_;
			ValaCCodeExpression* _tmp97_;
			_tmp92_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp93_ = _tmp92_;
			_tmp94_ = vala_method_get_this_parameter (m);
			_tmp95_ = _tmp94_;
			_tmp96_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, _tmp95_);
			_tmp97_ = _tmp96_;
			vala_ccode_function_add_expression (_tmp93_, _tmp97_);
			_vala_ccode_node_unref0 (_tmp97_);
		}
		_vala_code_node_unref0 (this_type);
	}
	_tmp98_ = vala_ccode_identifier_new ("g_slice_free");
	_tmp99_ = _tmp98_;
	_tmp100_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp99_);
	_tmp101_ = _tmp100_;
	_vala_ccode_node_unref0 (_tmp99_);
	freecall = _tmp101_;
	_tmp102_ = dataname;
	_tmp103_ = vala_ccode_identifier_new (_tmp102_);
	_tmp104_ = _tmp103_;
	vala_ccode_function_call_add_argument (freecall, (ValaCCodeExpression*) _tmp104_);
	_vala_ccode_node_unref0 (_tmp104_);
	_tmp105_ = vala_ccode_identifier_new ("_data_");
	_tmp106_ = _tmp105_;
	vala_ccode_function_call_add_argument (freecall, (ValaCCodeExpression*) _tmp106_);
	_vala_ccode_node_unref0 (_tmp106_);
	_tmp107_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp108_ = _tmp107_;
	vala_ccode_function_add_expression (_tmp108_, (ValaCCodeExpression*) freecall);
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_tmp109_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp110_ = freefunc;
	vala_ccode_file_add_function_declaration (_tmp109_, _tmp110_);
	_tmp111_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp112_ = freefunc;
	vala_ccode_file_add_function (_tmp111_, _tmp112_);
	result = freefunc;
	_vala_ccode_node_unref0 (freecall);
	_g_free0 (dataname);
	return result;
}

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

static void
vala_gasync_module_generate_async_function (ValaGAsyncModule* self,
                                            ValaMethod* m)
{
	ValaCCodeBaseModuleEmitContext* _tmp0_;
	ValaCCodeBaseModuleEmitContext* _tmp1_;
	gchar* dataname = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	ValaCCodeFunction* asyncfunc = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaHashMap* cparam_map = NULL;
	GHashFunc _tmp12_;
	GEqualFunc _tmp13_;
	GEqualFunc _tmp14_;
	ValaHashMap* _tmp15_;
	ValaHashMap* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeParameter* _tmp18_;
	ValaHashMap* _tmp19_;
	ValaCCodeParameter* _tmp20_;
	ValaCCodeParameter* _tmp21_;
	ValaCCodeFile* _tmp22_;
	ValaHashMap* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	gboolean _tmp25_ = FALSE;
	ValaMethod* _tmp26_;
	ValaMethod* _tmp27_;
	ValaCCodeFunction* _tmp49_;
	ValaClass* cl = NULL;
	ValaSymbol* _tmp50_;
	ValaSymbol* _tmp51_;
	ValaClass* _tmp52_;
	gboolean _tmp106_ = FALSE;
	gboolean _tmp107_;
	gboolean _tmp108_;
	ValaCCodeFunctionCall* dataalloc = NULL;
	ValaCCodeIdentifier* _tmp162_;
	ValaCCodeIdentifier* _tmp163_;
	ValaCCodeFunctionCall* _tmp164_;
	ValaCCodeFunctionCall* _tmp165_;
	ValaCCodeFunctionCall* _tmp166_;
	const gchar* _tmp167_;
	ValaCCodeIdentifier* _tmp168_;
	ValaCCodeIdentifier* _tmp169_;
	ValaCCodeIdentifier* data_var = NULL;
	ValaCCodeIdentifier* _tmp170_;
	ValaCCodeFunction* _tmp171_;
	ValaCCodeFunction* _tmp172_;
	const gchar* _tmp173_;
	gchar* _tmp174_;
	gchar* _tmp175_;
	ValaCCodeVariableDeclarator* _tmp176_;
	ValaCCodeVariableDeclarator* _tmp177_;
	ValaCCodeFunction* _tmp178_;
	ValaCCodeFunction* _tmp179_;
	ValaCCodeIdentifier* _tmp180_;
	ValaCCodeFunctionCall* _tmp181_;
	ValaCCodeFunctionCall* create_result = NULL;
	ValaCCodeIdentifier* _tmp182_;
	ValaCCodeIdentifier* _tmp183_;
	ValaCCodeFunctionCall* _tmp184_;
	ValaCCodeFunctionCall* _tmp185_;
	ValaTypeSymbol* t = NULL;
	ValaSymbol* _tmp186_;
	ValaSymbol* _tmp187_;
	ValaTypeSymbol* _tmp188_;
	gboolean _tmp189_ = FALSE;
	gboolean _tmp190_ = FALSE;
	gboolean _tmp191_ = FALSE;
	ValaParameter* cancellable_param = NULL;
	ValaParameter* _tmp230_;
	ValaCCodeFunctionCall* _tmp240_;
	ValaCCodeIdentifier* _tmp241_;
	ValaCCodeIdentifier* _tmp242_;
	ValaCCodeFunctionCall* _tmp243_;
	ValaCCodeIdentifier* _tmp244_;
	ValaCCodeIdentifier* _tmp245_;
	ValaCCodeFunction* _tmp246_;
	ValaCCodeFunction* _tmp247_;
	ValaCCodeIdentifier* _tmp248_;
	ValaCCodeMemberAccess* _tmp249_;
	ValaCCodeMemberAccess* _tmp250_;
	ValaCCodeFunctionCall* _tmp251_;
	ValaCCodeFunctionCall* attach_data_call = NULL;
	ValaCCodeIdentifier* _tmp252_;
	ValaCCodeIdentifier* _tmp253_;
	ValaCCodeFunctionCall* _tmp254_;
	ValaCCodeFunctionCall* _tmp255_;
	ValaCCodeFunctionCall* _tmp256_;
	ValaCCodeIdentifier* _tmp257_;
	ValaCCodeMemberAccess* _tmp258_;
	ValaCCodeMemberAccess* _tmp259_;
	ValaCCodeFunctionCall* _tmp260_;
	ValaCCodeIdentifier* _tmp261_;
	ValaCCodeFunctionCall* _tmp262_;
	gchar* _tmp263_;
	gchar* _tmp264_;
	gchar* _tmp265_;
	gchar* _tmp266_;
	ValaCCodeIdentifier* _tmp267_;
	ValaCCodeIdentifier* _tmp268_;
	ValaCCodeFunction* _tmp269_;
	ValaCCodeFunction* _tmp270_;
	ValaCCodeFunctionCall* _tmp271_;
	ValaCCodeBaseModuleEmitContext* _tmp311_;
	ValaCCodeBaseModuleEmitContext* _tmp343_;
	ValaCCodeFunctionCall* ccall = NULL;
	gchar* _tmp385_;
	gchar* _tmp386_;
	gchar* _tmp387_;
	gchar* _tmp388_;
	ValaCCodeIdentifier* _tmp389_;
	ValaCCodeIdentifier* _tmp390_;
	ValaCCodeFunctionCall* _tmp391_;
	ValaCCodeFunctionCall* _tmp392_;
	ValaCCodeIdentifier* _tmp393_;
	ValaCCodeFunction* _tmp394_;
	ValaCCodeFunction* _tmp395_;
	ValaCCodeFile* _tmp396_;
	ValaCCodeFunction* _tmp397_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (m != NULL);
	_tmp0_ = vala_ccode_base_module_emit_context_new (NULL);
	_tmp1_ = _tmp0_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp1_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp1_);
	_tmp2_ = vala_get_ccode_name ((ValaCodeNode*) 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_get_ccode_real_name ((ValaSymbol*) m);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_ccode_function_new (_tmp9_, "void");
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	asyncfunc = _tmp11_;
	_tmp12_ = g_direct_hash;
	_tmp13_ = g_direct_equal;
	_tmp14_ = g_direct_equal;
	_tmp15_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp12_, _tmp13_, _tmp14_);
	cparam_map = _tmp15_;
	_tmp16_ = cparam_map;
	_tmp17_ = vala_ccode_parameter_new ("_callback_", "GAsyncReadyCallback");
	_tmp18_ = _tmp17_;
	vala_map_set ((ValaMap*) _tmp16_, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) -1, FALSE)), _tmp18_);
	_vala_ccode_node_unref0 (_tmp18_);
	_tmp19_ = cparam_map;
	_tmp20_ = vala_ccode_parameter_new ("_user_data_", "gpointer");
	_tmp21_ = _tmp20_;
	vala_map_set ((ValaMap*) _tmp19_, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, -0.9, FALSE)), _tmp21_);
	_vala_ccode_node_unref0 (_tmp21_);
	_tmp22_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp23_ = cparam_map;
	_tmp24_ = asyncfunc;
	vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, _tmp22_, (ValaMap*) _tmp23_, _tmp24_, NULL, NULL, NULL, 1);
	_tmp26_ = vala_method_get_base_method (m);
	_tmp27_ = _tmp26_;
	if (_tmp27_ != NULL) {
		_tmp25_ = TRUE;
	} else {
		ValaMethod* _tmp28_;
		ValaMethod* _tmp29_;
		_tmp28_ = vala_method_get_base_interface_method (m);
		_tmp29_ = _tmp28_;
		_tmp25_ = _tmp29_ != NULL;
	}
	if (_tmp25_) {
		ValaCCodeFunction* _tmp30_;
		ValaCCodeFunction* _tmp31_;
		ValaCCodeModifiers _tmp32_;
		ValaCCodeModifiers _tmp33_;
		ValaCCodeFile* _tmp34_;
		ValaCCodeFunction* _tmp35_;
		_tmp30_ = asyncfunc;
		_tmp31_ = asyncfunc;
		_tmp32_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp31_);
		_tmp33_ = _tmp32_;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp31_, _tmp33_ | VALA_CCODE_MODIFIERS_STATIC);
		_tmp34_ = ((ValaCCodeBaseModule*) self)->cfile;
		_tmp35_ = asyncfunc;
		vala_ccode_file_add_function_declaration (_tmp34_, _tmp35_);
	} else {
		if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
			ValaCCodeFunction* _tmp36_;
			ValaCCodeFunction* _tmp37_;
			ValaCCodeModifiers _tmp38_;
			ValaCCodeModifiers _tmp39_;
			_tmp36_ = asyncfunc;
			_tmp37_ = asyncfunc;
			_tmp38_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp37_);
			_tmp39_ = _tmp38_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp37_, _tmp39_ | VALA_CCODE_MODIFIERS_STATIC);
		} else {
			gboolean _tmp40_ = FALSE;
			ValaCodeContext* _tmp41_;
			ValaCodeContext* _tmp42_;
			gboolean _tmp43_;
			gboolean _tmp44_;
			_tmp41_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
			_tmp42_ = _tmp41_;
			_tmp43_ = vala_code_context_get_hide_internal (_tmp42_);
			_tmp44_ = _tmp43_;
			if (_tmp44_) {
				_tmp40_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
			} else {
				_tmp40_ = FALSE;
			}
			if (_tmp40_) {
				ValaCCodeFunction* _tmp45_;
				ValaCCodeFunction* _tmp46_;
				ValaCCodeModifiers _tmp47_;
				ValaCCodeModifiers _tmp48_;
				_tmp45_ = asyncfunc;
				_tmp46_ = asyncfunc;
				_tmp47_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp46_);
				_tmp48_ = _tmp47_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp46_, _tmp48_ | VALA_CCODE_MODIFIERS_INTERNAL);
			}
		}
	}
	_tmp49_ = asyncfunc;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp49_);
	_tmp50_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
	_tmp51_ = _tmp50_;
	cl = G_TYPE_CHECK_INSTANCE_TYPE (_tmp51_, VALA_TYPE_CLASS) ? ((ValaClass*) _tmp51_) : NULL;
	_tmp52_ = cl;
	if (_tmp52_ != NULL) {
		gboolean _tmp53_ = FALSE;
		gboolean _tmp54_ = FALSE;
		gboolean _tmp55_ = FALSE;
		ValaMemberBinding _tmp56_;
		ValaMemberBinding _tmp57_;
		_tmp56_ = vala_method_get_binding (m);
		_tmp57_ = _tmp56_;
		if (_tmp57_ == VALA_MEMBER_BINDING_INSTANCE) {
			_tmp55_ = !G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD);
		} else {
			_tmp55_ = FALSE;
		}
		if (_tmp55_) {
			ValaMethod* _tmp58_;
			ValaMethod* _tmp59_;
			_tmp58_ = vala_method_get_base_method (m);
			_tmp59_ = _tmp58_;
			_tmp54_ = _tmp59_ == NULL;
		} else {
			_tmp54_ = FALSE;
		}
		if (_tmp54_) {
			ValaMethod* _tmp60_;
			ValaMethod* _tmp61_;
			_tmp60_ = vala_method_get_base_interface_method (m);
			_tmp61_ = _tmp60_;
			_tmp53_ = _tmp61_ == NULL;
		} else {
			_tmp53_ = FALSE;
		}
		if (_tmp53_) {
			ValaVoidType* _tmp62_;
			ValaVoidType* _tmp63_;
			ValaClass* _tmp64_;
			_tmp62_ = vala_void_type_new (NULL);
			_tmp63_ = _tmp62_;
			_tmp64_ = cl;
			vala_ccode_base_module_create_type_check_statement ((ValaCCodeBaseModule*) self, (ValaCodeNode*) m, (ValaDataType*) _tmp63_, (ValaTypeSymbol*) _tmp64_, TRUE, "self");
			_vala_code_node_unref0 (_tmp63_);
		}
	}
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp65_;
		gint _param_size = 0;
		ValaList* _tmp66_;
		gint _tmp67_;
		gint _tmp68_;
		gint _param_index = 0;
		_tmp65_ = vala_callable_get_parameters ((ValaCallable*) m);
		_param_list = _tmp65_;
		_tmp66_ = _param_list;
		_tmp67_ = vala_collection_get_size ((ValaCollection*) _tmp66_);
		_tmp68_ = _tmp67_;
		_param_size = _tmp68_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp69_;
			gint _tmp70_;
			ValaParameter* param = NULL;
			ValaList* _tmp71_;
			gpointer _tmp72_;
			gboolean _tmp73_ = FALSE;
			ValaParameter* _tmp74_;
			gboolean _tmp75_;
			gboolean _tmp76_;
			ValaParameter* _tmp80_;
			ValaParameterDirection _tmp81_;
			ValaParameterDirection _tmp82_;
			_param_index = _param_index + 1;
			_tmp69_ = _param_index;
			_tmp70_ = _param_size;
			if (!(_tmp69_ < _tmp70_)) {
				break;
			}
			_tmp71_ = _param_list;
			_tmp72_ = vala_list_get (_tmp71_, _param_index);
			param = (ValaParameter*) _tmp72_;
			_tmp74_ = param;
			_tmp75_ = vala_parameter_get_ellipsis (_tmp74_);
			_tmp76_ = _tmp75_;
			if (_tmp76_) {
				_tmp73_ = TRUE;
			} else {
				ValaParameter* _tmp77_;
				gboolean _tmp78_;
				gboolean _tmp79_;
				_tmp77_ = param;
				_tmp78_ = vala_parameter_get_params_array (_tmp77_);
				_tmp79_ = _tmp78_;
				_tmp73_ = _tmp79_;
			}
			if (_tmp73_) {
				_vala_code_node_unref0 (param);
				break;
			}
			_tmp80_ = param;
			_tmp81_ = vala_parameter_get_direction (_tmp80_);
			_tmp82_ = _tmp81_;
			if (_tmp82_ == VALA_PARAMETER_DIRECTION_IN) {
				ValaTypeSymbol* t = NULL;
				ValaParameter* _tmp83_;
				ValaDataType* _tmp84_;
				ValaDataType* _tmp85_;
				ValaTypeSymbol* _tmp86_;
				ValaTypeSymbol* _tmp87_;
				gboolean _tmp88_ = FALSE;
				ValaTypeSymbol* _tmp89_;
				_tmp83_ = param;
				_tmp84_ = vala_variable_get_variable_type ((ValaVariable*) _tmp83_);
				_tmp85_ = _tmp84_;
				_tmp86_ = vala_data_type_get_type_symbol (_tmp85_);
				_tmp87_ = _tmp86_;
				t = _tmp87_;
				_tmp89_ = t;
				if (_tmp89_ != NULL) {
					gboolean _tmp90_ = FALSE;
					ValaTypeSymbol* _tmp91_;
					_tmp91_ = t;
					if (vala_typesymbol_is_reference_type (_tmp91_)) {
						_tmp90_ = TRUE;
					} else {
						ValaParameter* _tmp92_;
						ValaDataType* _tmp93_;
						ValaDataType* _tmp94_;
						_tmp92_ = param;
						_tmp93_ = vala_variable_get_variable_type ((ValaVariable*) _tmp92_);
						_tmp94_ = _tmp93_;
						_tmp90_ = vala_data_type_is_real_struct_type (_tmp94_);
					}
					_tmp88_ = _tmp90_;
				} else {
					_tmp88_ = FALSE;
				}
				if (_tmp88_) {
					ValaVoidType* _tmp95_;
					ValaVoidType* _tmp96_;
					ValaTypeSymbol* _tmp97_;
					ValaParameter* _tmp98_;
					ValaDataType* _tmp99_;
					ValaDataType* _tmp100_;
					gboolean _tmp101_;
					gboolean _tmp102_;
					ValaParameter* _tmp103_;
					gchar* _tmp104_;
					gchar* _tmp105_;
					_tmp95_ = vala_void_type_new (NULL);
					_tmp96_ = _tmp95_;
					_tmp97_ = t;
					_tmp98_ = param;
					_tmp99_ = vala_variable_get_variable_type ((ValaVariable*) _tmp98_);
					_tmp100_ = _tmp99_;
					_tmp101_ = vala_data_type_get_nullable (_tmp100_);
					_tmp102_ = _tmp101_;
					_tmp103_ = param;
					_tmp104_ = vala_get_ccode_name ((ValaCodeNode*) _tmp103_);
					_tmp105_ = _tmp104_;
					vala_ccode_base_module_create_type_check_statement ((ValaCCodeBaseModule*) self, (ValaCodeNode*) m, (ValaDataType*) _tmp96_, _tmp97_, !_tmp102_, _tmp105_);
					_g_free0 (_tmp105_);
					_vala_code_node_unref0 (_tmp96_);
				}
			}
			_vala_code_node_unref0 (param);
		}
	}
	_tmp107_ = vala_method_get_overrides (m);
	_tmp108_ = _tmp107_;
	if (_tmp108_) {
		_tmp106_ = TRUE;
	} else {
		gboolean _tmp109_ = FALSE;
		gboolean _tmp110_ = FALSE;
		ValaMethod* _tmp111_;
		ValaMethod* _tmp112_;
		_tmp111_ = vala_method_get_base_interface_method (m);
		_tmp112_ = _tmp111_;
		if (_tmp112_ != NULL) {
			gboolean _tmp113_;
			gboolean _tmp114_;
			_tmp113_ = vala_method_get_is_abstract (m);
			_tmp114_ = _tmp113_;
			_tmp110_ = !_tmp114_;
		} else {
			_tmp110_ = FALSE;
		}
		if (_tmp110_) {
			gboolean _tmp115_;
			gboolean _tmp116_;
			_tmp115_ = vala_method_get_is_virtual (m);
			_tmp116_ = _tmp115_;
			_tmp109_ = !_tmp116_;
		} else {
			_tmp109_ = FALSE;
		}
		_tmp106_ = _tmp109_;
	}
	if (_tmp106_) {
		ValaMethod* base_method = NULL;
		gboolean _tmp117_ = FALSE;
		gboolean _tmp118_;
		gboolean _tmp119_;
		ValaObjectType* base_expression_type = NULL;
		ValaMethod* _tmp128_;
		ValaSymbol* _tmp129_;
		ValaSymbol* _tmp130_;
		ValaObjectType* _tmp131_;
		ValaObjectTypeSymbol* type_symbol = NULL;
		ValaSymbol* _tmp132_;
		ValaSymbol* _tmp133_;
		ValaObjectTypeSymbol* _tmp134_;
		ValaObjectType* self_target_type = NULL;
		ValaObjectTypeSymbol* _tmp135_;
		ValaObjectType* _tmp136_;
		ValaCCodeExpression* cself = NULL;
		ValaObjectType* _tmp137_;
		ValaCCodeIdentifier* _tmp138_;
		ValaCCodeIdentifier* _tmp139_;
		ValaGLibValue* _tmp140_;
		ValaGLibValue* _tmp141_;
		ValaObjectType* _tmp142_;
		ValaTargetValue* _tmp143_;
		ValaTargetValue* _tmp144_;
		ValaCCodeExpression* _tmp145_;
		ValaCCodeExpression* _tmp146_;
		ValaCCodeExpression* _tmp147_;
		ValaCCodeFunction* _tmp148_;
		ValaCCodeFunction* _tmp149_;
		ValaObjectTypeSymbol* _tmp150_;
		gchar* _tmp151_;
		gchar* _tmp152_;
		gchar* _tmp153_;
		gchar* _tmp154_;
		ValaCCodeVariableDeclarator* _tmp155_;
		ValaCCodeVariableDeclarator* _tmp156_;
		ValaCCodeFunction* _tmp157_;
		ValaCCodeFunction* _tmp158_;
		ValaCCodeIdentifier* _tmp159_;
		ValaCCodeIdentifier* _tmp160_;
		ValaCCodeExpression* _tmp161_;
		_tmp118_ = vala_method_get_overrides (m);
		_tmp119_ = _tmp118_;
		if (_tmp119_) {
			ValaMethod* _tmp120_;
			ValaMethod* _tmp121_;
			_tmp120_ = vala_method_get_base_method (m);
			_tmp121_ = _tmp120_;
			_tmp117_ = _tmp121_ != NULL;
		} else {
			_tmp117_ = FALSE;
		}
		if (_tmp117_) {
			ValaMethod* _tmp122_;
			ValaMethod* _tmp123_;
			ValaMethod* _tmp124_;
			_tmp122_ = vala_method_get_base_method (m);
			_tmp123_ = _tmp122_;
			_tmp124_ = _vala_code_node_ref0 (_tmp123_);
			_vala_code_node_unref0 (base_method);
			base_method = _tmp124_;
		} else {
			ValaMethod* _tmp125_;
			ValaMethod* _tmp126_;
			ValaMethod* _tmp127_;
			_tmp125_ = vala_method_get_base_interface_method (m);
			_tmp126_ = _tmp125_;
			_tmp127_ = _vala_code_node_ref0 (_tmp126_);
			_vala_code_node_unref0 (base_method);
			base_method = _tmp127_;
		}
		_tmp128_ = base_method;
		_tmp129_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp128_);
		_tmp130_ = _tmp129_;
		_tmp131_ = vala_object_type_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp130_, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol), NULL);
		base_expression_type = _tmp131_;
		_tmp132_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
		_tmp133_ = _tmp132_;
		_tmp134_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp133_, VALA_TYPE_OBJECT_TYPE_SYMBOL) ? ((ValaObjectTypeSymbol*) _tmp133_) : NULL);
		type_symbol = _tmp134_;
		_tmp135_ = type_symbol;
		_tmp136_ = vala_object_type_new (_tmp135_, NULL);
		self_target_type = _tmp136_;
		_tmp137_ = base_expression_type;
		_tmp138_ = vala_ccode_identifier_new ("base");
		_tmp139_ = _tmp138_;
		_tmp140_ = vala_glib_value_new ((ValaDataType*) _tmp137_, (ValaCCodeExpression*) _tmp139_, TRUE);
		_tmp141_ = _tmp140_;
		_tmp142_ = self_target_type;
		_tmp143_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp141_, (ValaDataType*) _tmp142_, (ValaCodeNode*) m);
		_tmp144_ = _tmp143_;
		_tmp145_ = vala_get_cvalue_ (_tmp144_);
		_tmp146_ = _vala_ccode_node_ref0 (_tmp145_);
		_tmp147_ = _tmp146_;
		_vala_target_value_unref0 (_tmp144_);
		_vala_target_value_unref0 (_tmp141_);
		_vala_ccode_node_unref0 (_tmp139_);
		cself = _tmp147_;
		_tmp148_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp149_ = _tmp148_;
		_tmp150_ = type_symbol;
		_tmp151_ = vala_get_ccode_name ((ValaCodeNode*) _tmp150_);
		_tmp152_ = _tmp151_;
		_tmp153_ = g_strdup_printf ("%s *", _tmp152_);
		_tmp154_ = _tmp153_;
		_tmp155_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
		_tmp156_ = _tmp155_;
		vala_ccode_function_add_declaration (_tmp149_, _tmp154_, (ValaCCodeDeclarator*) _tmp156_, 0);
		_vala_ccode_node_unref0 (_tmp156_);
		_g_free0 (_tmp154_);
		_g_free0 (_tmp152_);
		_tmp157_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp158_ = _tmp157_;
		_tmp159_ = vala_ccode_identifier_new ("self");
		_tmp160_ = _tmp159_;
		_tmp161_ = cself;
		vala_ccode_function_add_assignment (_tmp158_, (ValaCCodeExpression*) _tmp160_, _tmp161_);
		_vala_ccode_node_unref0 (_tmp160_);
		_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);
	}
	_tmp162_ = vala_ccode_identifier_new ("g_slice_new0");
	_tmp163_ = _tmp162_;
	_tmp164_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp163_);
	_tmp165_ = _tmp164_;
	_vala_ccode_node_unref0 (_tmp163_);
	dataalloc = _tmp165_;
	_tmp166_ = dataalloc;
	_tmp167_ = dataname;
	_tmp168_ = vala_ccode_identifier_new (_tmp167_);
	_tmp169_ = _tmp168_;
	vala_ccode_function_call_add_argument (_tmp166_, (ValaCCodeExpression*) _tmp169_);
	_vala_ccode_node_unref0 (_tmp169_);
	_tmp170_ = vala_ccode_identifier_new ("_data_");
	data_var = _tmp170_;
	_tmp171_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp172_ = _tmp171_;
	_tmp173_ = dataname;
	_tmp174_ = g_strconcat (_tmp173_, "*", NULL);
	_tmp175_ = _tmp174_;
	_tmp176_ = vala_ccode_variable_declarator_new ("_data_", NULL, NULL);
	_tmp177_ = _tmp176_;
	vala_ccode_function_add_declaration (_tmp172_, _tmp175_, (ValaCCodeDeclarator*) _tmp177_, 0);
	_vala_ccode_node_unref0 (_tmp177_);
	_g_free0 (_tmp175_);
	_tmp178_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp179_ = _tmp178_;
	_tmp180_ = data_var;
	_tmp181_ = dataalloc;
	vala_ccode_function_add_assignment (_tmp179_, (ValaCCodeExpression*) _tmp180_, (ValaCCodeExpression*) _tmp181_);
	_tmp182_ = vala_ccode_identifier_new ("g_task_new");
	_tmp183_ = _tmp182_;
	_tmp184_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp183_);
	_tmp185_ = _tmp184_;
	_vala_ccode_node_unref0 (_tmp183_);
	create_result = _tmp185_;
	_tmp186_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
	_tmp187_ = _tmp186_;
	_tmp188_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp187_, VALA_TYPE_TYPESYMBOL) ? ((ValaTypeSymbol*) _tmp187_) : NULL);
	t = _tmp188_;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
		ValaMemberBinding _tmp192_;
		ValaMemberBinding _tmp193_;
		_tmp192_ = vala_method_get_binding (m);
		_tmp193_ = _tmp192_;
		_tmp191_ = _tmp193_ == VALA_MEMBER_BINDING_INSTANCE;
	} else {
		_tmp191_ = FALSE;
	}
	if (_tmp191_) {
		ValaTypeSymbol* _tmp194_;
		_tmp194_ = t;
		_tmp190_ = _tmp194_ != NULL;
	} else {
		_tmp190_ = FALSE;
	}
	if (_tmp190_) {
		ValaTypeSymbol* _tmp195_;
		ValaTypeSymbol* _tmp196_;
		_tmp195_ = t;
		_tmp196_ = ((ValaCCodeBaseModule*) self)->gobject_type;
		_tmp189_ = vala_typesymbol_is_subtype_of (_tmp195_, _tmp196_);
	} else {
		_tmp189_ = FALSE;
	}
	if (_tmp189_) {
		ValaCCodeFunctionCall* gobject_cast = NULL;
		ValaCCodeIdentifier* _tmp197_;
		ValaCCodeIdentifier* _tmp198_;
		ValaCCodeFunctionCall* _tmp199_;
		ValaCCodeFunctionCall* _tmp200_;
		ValaCCodeFunctionCall* _tmp201_;
		ValaCCodeIdentifier* _tmp202_;
		ValaCCodeIdentifier* _tmp203_;
		ValaCCodeFunctionCall* _tmp204_;
		ValaCCodeFunctionCall* _tmp205_;
		_tmp197_ = vala_ccode_identifier_new ("G_OBJECT");
		_tmp198_ = _tmp197_;
		_tmp199_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp198_);
		_tmp200_ = _tmp199_;
		_vala_ccode_node_unref0 (_tmp198_);
		gobject_cast = _tmp200_;
		_tmp201_ = gobject_cast;
		_tmp202_ = vala_ccode_identifier_new ("self");
		_tmp203_ = _tmp202_;
		vala_ccode_function_call_add_argument (_tmp201_, (ValaCCodeExpression*) _tmp203_);
		_vala_ccode_node_unref0 (_tmp203_);
		_tmp204_ = create_result;
		_tmp205_ = gobject_cast;
		vala_ccode_function_call_add_argument (_tmp204_, (ValaCCodeExpression*) _tmp205_);
		_vala_ccode_node_unref0 (gobject_cast);
	} else {
		ValaCCodeFunctionCall* _tmp206_;
		ValaCCodeConstant* _tmp207_;
		ValaCCodeConstant* _tmp208_;
		_tmp206_ = create_result;
		_tmp207_ = vala_ccode_constant_new ("NULL");
		_tmp208_ = _tmp207_;
		vala_ccode_function_call_add_argument (_tmp206_, (ValaCCodeExpression*) _tmp208_);
		_vala_ccode_node_unref0 (_tmp208_);
	}
	cancellable_param = NULL;
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp209_;
		gint _param_size = 0;
		ValaList* _tmp210_;
		gint _tmp211_;
		gint _tmp212_;
		gint _param_index = 0;
		_tmp209_ = vala_callable_get_parameters ((ValaCallable*) m);
		_param_list = _tmp209_;
		_tmp210_ = _param_list;
		_tmp211_ = vala_collection_get_size ((ValaCollection*) _tmp210_);
		_tmp212_ = _tmp211_;
		_param_size = _tmp212_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp213_;
			gint _tmp214_;
			ValaParameter* param = NULL;
			ValaList* _tmp215_;
			gpointer _tmp216_;
			gboolean _tmp217_ = FALSE;
			ValaParameter* _tmp218_;
			ValaDataType* _tmp219_;
			ValaDataType* _tmp220_;
			_param_index = _param_index + 1;
			_tmp213_ = _param_index;
			_tmp214_ = _param_size;
			if (!(_tmp213_ < _tmp214_)) {
				break;
			}
			_tmp215_ = _param_list;
			_tmp216_ = vala_list_get (_tmp215_, _param_index);
			param = (ValaParameter*) _tmp216_;
			_tmp218_ = param;
			_tmp219_ = vala_variable_get_variable_type ((ValaVariable*) _tmp218_);
			_tmp220_ = _tmp219_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp220_, VALA_TYPE_OBJECT_TYPE)) {
				ValaParameter* _tmp221_;
				ValaDataType* _tmp222_;
				ValaDataType* _tmp223_;
				ValaTypeSymbol* _tmp224_;
				ValaTypeSymbol* _tmp225_;
				gchar* _tmp226_;
				gchar* _tmp227_;
				_tmp221_ = param;
				_tmp222_ = vala_variable_get_variable_type ((ValaVariable*) _tmp221_);
				_tmp223_ = _tmp222_;
				_tmp224_ = vala_data_type_get_type_symbol (_tmp223_);
				_tmp225_ = _tmp224_;
				_tmp226_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp225_);
				_tmp227_ = _tmp226_;
				_tmp217_ = g_strcmp0 (_tmp227_, "GLib.Cancellable") == 0;
				_g_free0 (_tmp227_);
			} else {
				_tmp217_ = FALSE;
			}
			if (_tmp217_) {
				ValaParameter* _tmp228_;
				ValaParameter* _tmp229_;
				_tmp228_ = param;
				_tmp229_ = _vala_code_node_ref0 (_tmp228_);
				_vala_code_node_unref0 (cancellable_param);
				cancellable_param = _tmp229_;
				_vala_code_node_unref0 (param);
				break;
			}
			_vala_code_node_unref0 (param);
		}
	}
	_tmp230_ = cancellable_param;
	if (_tmp230_ == NULL) {
		ValaCCodeFunctionCall* _tmp231_;
		ValaCCodeConstant* _tmp232_;
		ValaCCodeConstant* _tmp233_;
		_tmp231_ = create_result;
		_tmp232_ = vala_ccode_constant_new ("NULL");
		_tmp233_ = _tmp232_;
		vala_ccode_function_call_add_argument (_tmp231_, (ValaCCodeExpression*) _tmp233_);
		_vala_ccode_node_unref0 (_tmp233_);
	} else {
		ValaCCodeFunctionCall* _tmp234_;
		ValaParameter* _tmp235_;
		gchar* _tmp236_;
		gchar* _tmp237_;
		ValaCCodeIdentifier* _tmp238_;
		ValaCCodeIdentifier* _tmp239_;
		_tmp234_ = create_result;
		_tmp235_ = cancellable_param;
		_tmp236_ = vala_get_ccode_name ((ValaCodeNode*) _tmp235_);
		_tmp237_ = _tmp236_;
		_tmp238_ = vala_ccode_identifier_new (_tmp237_);
		_tmp239_ = _tmp238_;
		vala_ccode_function_call_add_argument (_tmp234_, (ValaCCodeExpression*) _tmp239_);
		_vala_ccode_node_unref0 (_tmp239_);
		_g_free0 (_tmp237_);
	}
	_tmp240_ = create_result;
	_tmp241_ = vala_ccode_identifier_new ("_callback_");
	_tmp242_ = _tmp241_;
	vala_ccode_function_call_add_argument (_tmp240_, (ValaCCodeExpression*) _tmp242_);
	_vala_ccode_node_unref0 (_tmp242_);
	_tmp243_ = create_result;
	_tmp244_ = vala_ccode_identifier_new ("_user_data_");
	_tmp245_ = _tmp244_;
	vala_ccode_function_call_add_argument (_tmp243_, (ValaCCodeExpression*) _tmp245_);
	_vala_ccode_node_unref0 (_tmp245_);
	_tmp246_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp247_ = _tmp246_;
	_tmp248_ = data_var;
	_tmp249_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp248_, "_async_result");
	_tmp250_ = _tmp249_;
	_tmp251_ = create_result;
	vala_ccode_function_add_assignment (_tmp247_, (ValaCCodeExpression*) _tmp250_, (ValaCCodeExpression*) _tmp251_);
	_vala_ccode_node_unref0 (_tmp250_);
	_tmp252_ = vala_ccode_identifier_new ("g_task_set_task_data");
	_tmp253_ = _tmp252_;
	_tmp254_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp253_);
	_tmp255_ = _tmp254_;
	_vala_ccode_node_unref0 (_tmp253_);
	attach_data_call = _tmp255_;
	_tmp256_ = attach_data_call;
	_tmp257_ = data_var;
	_tmp258_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp257_, "_async_result");
	_tmp259_ = _tmp258_;
	vala_ccode_function_call_add_argument (_tmp256_, (ValaCCodeExpression*) _tmp259_);
	_vala_ccode_node_unref0 (_tmp259_);
	_tmp260_ = attach_data_call;
	_tmp261_ = data_var;
	vala_ccode_function_call_add_argument (_tmp260_, (ValaCCodeExpression*) _tmp261_);
	_tmp262_ = attach_data_call;
	_tmp263_ = vala_get_ccode_real_name ((ValaSymbol*) m);
	_tmp264_ = _tmp263_;
	_tmp265_ = g_strconcat (_tmp264_, "_data_free", NULL);
	_tmp266_ = _tmp265_;
	_tmp267_ = vala_ccode_identifier_new (_tmp266_);
	_tmp268_ = _tmp267_;
	vala_ccode_function_call_add_argument (_tmp262_, (ValaCCodeExpression*) _tmp268_);
	_vala_ccode_node_unref0 (_tmp268_);
	_g_free0 (_tmp266_);
	_g_free0 (_tmp264_);
	_tmp269_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp270_ = _tmp269_;
	_tmp271_ = attach_data_call;
	vala_ccode_function_add_expression (_tmp270_, (ValaCCodeExpression*) _tmp271_);
	if (G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
		ValaCCodeFunction* _tmp272_;
		ValaCCodeFunction* _tmp273_;
		ValaCCodeIdentifier* _tmp274_;
		ValaCCodeMemberAccess* _tmp275_;
		ValaCCodeMemberAccess* _tmp276_;
		ValaCCodeIdentifier* _tmp277_;
		ValaCCodeIdentifier* _tmp278_;
		_tmp272_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp273_ = _tmp272_;
		_tmp274_ = data_var;
		_tmp275_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp274_, "object_type");
		_tmp276_ = _tmp275_;
		_tmp277_ = vala_ccode_identifier_new ("object_type");
		_tmp278_ = _tmp277_;
		vala_ccode_function_add_assignment (_tmp273_, (ValaCCodeExpression*) _tmp276_, (ValaCCodeExpression*) _tmp278_);
		_vala_ccode_node_unref0 (_tmp278_);
		_vala_ccode_node_unref0 (_tmp276_);
	} else {
		ValaMemberBinding _tmp279_;
		ValaMemberBinding _tmp280_;
		_tmp279_ = vala_method_get_binding (m);
		_tmp280_ = _tmp279_;
		if (_tmp280_ == VALA_MEMBER_BINDING_INSTANCE) {
			ValaDataType* this_type = NULL;
			ValaParameter* _tmp281_;
			ValaParameter* _tmp282_;
			ValaDataType* _tmp283_;
			ValaDataType* _tmp284_;
			ValaDataType* _tmp285_;
			ValaDataType* _tmp286_;
			ValaCCodeExpression* cself = NULL;
			ValaCCodeIdentifier* _tmp287_;
			ValaDataType* _tmp288_;
			ValaDataType* _tmp291_;
			ValaCCodeFunction* _tmp305_;
			ValaCCodeFunction* _tmp306_;
			ValaCCodeIdentifier* _tmp307_;
			ValaCCodeMemberAccess* _tmp308_;
			ValaCCodeMemberAccess* _tmp309_;
			ValaCCodeExpression* _tmp310_;
			_tmp281_ = vala_method_get_this_parameter (m);
			_tmp282_ = _tmp281_;
			_tmp283_ = vala_variable_get_variable_type ((ValaVariable*) _tmp282_);
			_tmp284_ = _tmp283_;
			_tmp285_ = vala_data_type_copy (_tmp284_);
			this_type = _tmp285_;
			_tmp286_ = this_type;
			vala_data_type_set_value_owned (_tmp286_, TRUE);
			_tmp287_ = vala_ccode_identifier_new ("self");
			cself = (ValaCCodeExpression*) _tmp287_;
			_tmp288_ = this_type;
			if (vala_data_type_is_real_non_null_struct_type (_tmp288_)) {
				ValaCCodeExpression* _tmp289_;
				ValaCCodeUnaryExpression* _tmp290_;
				_tmp289_ = cself;
				_tmp290_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp289_);
				_vala_ccode_node_unref0 (cself);
				cself = (ValaCCodeExpression*) _tmp290_;
			}
			_tmp291_ = this_type;
			if (vala_ccode_base_module_requires_copy (_tmp291_)) {
				ValaParameter* _tmp292_;
				ValaParameter* _tmp293_;
				ValaDataType* _tmp294_;
				ValaDataType* _tmp295_;
				ValaCCodeExpression* _tmp296_;
				ValaGLibValue* _tmp297_;
				ValaGLibValue* _tmp298_;
				ValaParameter* _tmp299_;
				ValaParameter* _tmp300_;
				ValaTargetValue* _tmp301_;
				ValaTargetValue* _tmp302_;
				ValaCCodeExpression* _tmp303_;
				ValaCCodeExpression* _tmp304_;
				_tmp292_ = vala_method_get_this_parameter (m);
				_tmp293_ = _tmp292_;
				_tmp294_ = vala_variable_get_variable_type ((ValaVariable*) _tmp293_);
				_tmp295_ = _tmp294_;
				_tmp296_ = cself;
				_tmp297_ = vala_glib_value_new (_tmp295_, _tmp296_, TRUE);
				_tmp298_ = _tmp297_;
				_tmp299_ = vala_method_get_this_parameter (m);
				_tmp300_ = _tmp299_;
				_tmp301_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp298_, (ValaCodeNode*) _tmp300_);
				_tmp302_ = _tmp301_;
				_tmp303_ = vala_get_cvalue_ (_tmp302_);
				_tmp304_ = _vala_ccode_node_ref0 (_tmp303_);
				_vala_ccode_node_unref0 (cself);
				cself = _tmp304_;
				_vala_target_value_unref0 (_tmp302_);
				_vala_target_value_unref0 (_tmp298_);
			}
			_tmp305_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp306_ = _tmp305_;
			_tmp307_ = data_var;
			_tmp308_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp307_, "self");
			_tmp309_ = _tmp308_;
			_tmp310_ = cself;
			vala_ccode_function_add_assignment (_tmp306_, (ValaCCodeExpression*) _tmp309_, _tmp310_);
			_vala_ccode_node_unref0 (_tmp309_);
			_vala_ccode_node_unref0 (cself);
			_vala_code_node_unref0 (this_type);
		}
	}
	_tmp311_ = ((ValaCCodeBaseModule*) self)->emit_context;
	vala_ccode_base_module_emit_context_push_symbol (_tmp311_, (ValaSymbol*) m);
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp312_;
		gint _param_size = 0;
		ValaList* _tmp313_;
		gint _tmp314_;
		gint _tmp315_;
		gint _param_index = 0;
		_tmp312_ = vala_callable_get_parameters ((ValaCallable*) m);
		_param_list = _tmp312_;
		_tmp313_ = _param_list;
		_tmp314_ = vala_collection_get_size ((ValaCollection*) _tmp313_);
		_tmp315_ = _tmp314_;
		_param_size = _tmp315_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp316_;
			gint _tmp317_;
			ValaParameter* param = NULL;
			ValaList* _tmp318_;
			gpointer _tmp319_;
			ValaParameter* _tmp320_;
			ValaParameterDirection _tmp321_;
			ValaParameterDirection _tmp322_;
			_param_index = _param_index + 1;
			_tmp316_ = _param_index;
			_tmp317_ = _param_size;
			if (!(_tmp316_ < _tmp317_)) {
				break;
			}
			_tmp318_ = _param_list;
			_tmp319_ = vala_list_get (_tmp318_, _param_index);
			param = (ValaParameter*) _tmp319_;
			_tmp320_ = param;
			_tmp321_ = vala_parameter_get_direction (_tmp320_);
			_tmp322_ = _tmp321_;
			if (_tmp322_ != VALA_PARAMETER_DIRECTION_OUT) {
				gboolean old_captured = FALSE;
				ValaParameter* _tmp323_;
				gboolean _tmp324_;
				gboolean _tmp325_;
				ValaParameter* _tmp326_;
				ValaMethod* _tmp327_;
				ValaMethod* _tmp328_;
				ValaTargetValue* value = NULL;
				ValaParameter* _tmp329_;
				ValaDataType* _tmp330_;
				ValaDataType* _tmp331_;
				gboolean _tmp332_;
				gboolean _tmp333_;
				ValaMethod* _tmp338_;
				ValaMethod* _tmp339_;
				ValaParameter* _tmp340_;
				ValaTargetValue* _tmp341_;
				ValaParameter* _tmp342_;
				_tmp323_ = param;
				_tmp324_ = vala_parameter_get_captured (_tmp323_);
				_tmp325_ = _tmp324_;
				old_captured = _tmp325_;
				_tmp326_ = param;
				vala_parameter_set_captured (_tmp326_, FALSE);
				_tmp327_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
				_tmp328_ = _tmp327_;
				vala_method_set_coroutine (_tmp328_, FALSE);
				_tmp329_ = param;
				_tmp330_ = vala_variable_get_variable_type ((ValaVariable*) _tmp329_);
				_tmp331_ = _tmp330_;
				_tmp332_ = vala_data_type_get_value_owned (_tmp331_);
				_tmp333_ = _tmp332_;
				if (_tmp333_) {
					ValaParameter* _tmp334_;
					ValaTargetValue* _tmp335_;
					_tmp334_ = param;
					_tmp335_ = vala_ccode_base_module_get_parameter_cvalue ((ValaCCodeBaseModule*) self, _tmp334_);
					_vala_target_value_unref0 (value);
					value = _tmp335_;
				} else {
					ValaParameter* _tmp336_;
					ValaTargetValue* _tmp337_;
					_tmp336_ = param;
					_tmp337_ = vala_code_generator_load_parameter ((ValaCodeGenerator*) self, _tmp336_, NULL);
					_vala_target_value_unref0 (value);
					value = _tmp337_;
				}
				_tmp338_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
				_tmp339_ = _tmp338_;
				vala_method_set_coroutine (_tmp339_, TRUE);
				_tmp340_ = param;
				_tmp341_ = value;
				vala_code_generator_store_parameter ((ValaCodeGenerator*) self, _tmp340_, _tmp341_, FALSE, NULL);
				_tmp342_ = param;
				vala_parameter_set_captured (_tmp342_, old_captured);
				_vala_target_value_unref0 (value);
			}
			_vala_code_node_unref0 (param);
		}
	}
	_tmp343_ = ((ValaCCodeBaseModule*) self)->emit_context;
	vala_ccode_base_module_emit_context_pop_symbol (_tmp343_);
	{
		ValaList* _type_param_list = NULL;
		ValaList* _tmp344_;
		gint _type_param_size = 0;
		ValaList* _tmp345_;
		gint _tmp346_;
		gint _tmp347_;
		gint _type_param_index = 0;
		_tmp344_ = vala_method_get_type_parameters (m);
		_type_param_list = _tmp344_;
		_tmp345_ = _type_param_list;
		_tmp346_ = vala_collection_get_size ((ValaCollection*) _tmp345_);
		_tmp347_ = _tmp346_;
		_type_param_size = _tmp347_;
		_type_param_index = -1;
		while (TRUE) {
			gint _tmp348_;
			gint _tmp349_;
			ValaTypeParameter* type_param = NULL;
			ValaList* _tmp350_;
			gpointer _tmp351_;
			gchar* type = NULL;
			ValaTypeParameter* _tmp352_;
			gchar* _tmp353_;
			gchar* dup_func = NULL;
			ValaTypeParameter* _tmp354_;
			gchar* _tmp355_;
			gchar* destroy_func = NULL;
			ValaTypeParameter* _tmp356_;
			gchar* _tmp357_;
			ValaCCodeFunction* _tmp358_;
			ValaCCodeFunction* _tmp359_;
			ValaCCodeIdentifier* _tmp360_;
			const gchar* _tmp361_;
			ValaCCodeMemberAccess* _tmp362_;
			ValaCCodeMemberAccess* _tmp363_;
			const gchar* _tmp364_;
			ValaCCodeIdentifier* _tmp365_;
			ValaCCodeIdentifier* _tmp366_;
			ValaCCodeFunction* _tmp367_;
			ValaCCodeFunction* _tmp368_;
			ValaCCodeIdentifier* _tmp369_;
			const gchar* _tmp370_;
			ValaCCodeMemberAccess* _tmp371_;
			ValaCCodeMemberAccess* _tmp372_;
			const gchar* _tmp373_;
			ValaCCodeIdentifier* _tmp374_;
			ValaCCodeIdentifier* _tmp375_;
			ValaCCodeFunction* _tmp376_;
			ValaCCodeFunction* _tmp377_;
			ValaCCodeIdentifier* _tmp378_;
			const gchar* _tmp379_;
			ValaCCodeMemberAccess* _tmp380_;
			ValaCCodeMemberAccess* _tmp381_;
			const gchar* _tmp382_;
			ValaCCodeIdentifier* _tmp383_;
			ValaCCodeIdentifier* _tmp384_;
			_type_param_index = _type_param_index + 1;
			_tmp348_ = _type_param_index;
			_tmp349_ = _type_param_size;
			if (!(_tmp348_ < _tmp349_)) {
				break;
			}
			_tmp350_ = _type_param_list;
			_tmp351_ = vala_list_get (_tmp350_, _type_param_index);
			type_param = (ValaTypeParameter*) _tmp351_;
			_tmp352_ = type_param;
			_tmp353_ = vala_get_ccode_type_id ((ValaCodeNode*) _tmp352_);
			type = _tmp353_;
			_tmp354_ = type_param;
			_tmp355_ = vala_get_ccode_copy_function ((ValaTypeSymbol*) _tmp354_);
			dup_func = _tmp355_;
			_tmp356_ = type_param;
			_tmp357_ = vala_get_ccode_destroy_function ((ValaTypeSymbol*) _tmp356_);
			destroy_func = _tmp357_;
			_tmp358_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp359_ = _tmp358_;
			_tmp360_ = data_var;
			_tmp361_ = type;
			_tmp362_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp360_, _tmp361_);
			_tmp363_ = _tmp362_;
			_tmp364_ = type;
			_tmp365_ = vala_ccode_identifier_new (_tmp364_);
			_tmp366_ = _tmp365_;
			vala_ccode_function_add_assignment (_tmp359_, (ValaCCodeExpression*) _tmp363_, (ValaCCodeExpression*) _tmp366_);
			_vala_ccode_node_unref0 (_tmp366_);
			_vala_ccode_node_unref0 (_tmp363_);
			_tmp367_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp368_ = _tmp367_;
			_tmp369_ = data_var;
			_tmp370_ = dup_func;
			_tmp371_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp369_, _tmp370_);
			_tmp372_ = _tmp371_;
			_tmp373_ = dup_func;
			_tmp374_ = vala_ccode_identifier_new (_tmp373_);
			_tmp375_ = _tmp374_;
			vala_ccode_function_add_assignment (_tmp368_, (ValaCCodeExpression*) _tmp372_, (ValaCCodeExpression*) _tmp375_);
			_vala_ccode_node_unref0 (_tmp375_);
			_vala_ccode_node_unref0 (_tmp372_);
			_tmp376_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp377_ = _tmp376_;
			_tmp378_ = data_var;
			_tmp379_ = destroy_func;
			_tmp380_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp378_, _tmp379_);
			_tmp381_ = _tmp380_;
			_tmp382_ = destroy_func;
			_tmp383_ = vala_ccode_identifier_new (_tmp382_);
			_tmp384_ = _tmp383_;
			vala_ccode_function_add_assignment (_tmp377_, (ValaCCodeExpression*) _tmp381_, (ValaCCodeExpression*) _tmp384_);
			_vala_ccode_node_unref0 (_tmp384_);
			_vala_ccode_node_unref0 (_tmp381_);
			_g_free0 (destroy_func);
			_g_free0 (dup_func);
			_g_free0 (type);
			_vala_code_node_unref0 (type_param);
		}
	}
	_tmp385_ = vala_get_ccode_real_name ((ValaSymbol*) m);
	_tmp386_ = _tmp385_;
	_tmp387_ = g_strconcat (_tmp386_, "_co", NULL);
	_tmp388_ = _tmp387_;
	_tmp389_ = vala_ccode_identifier_new (_tmp388_);
	_tmp390_ = _tmp389_;
	_tmp391_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp390_);
	_tmp392_ = _tmp391_;
	_vala_ccode_node_unref0 (_tmp390_);
	_g_free0 (_tmp388_);
	_g_free0 (_tmp386_);
	ccall = _tmp392_;
	_tmp393_ = data_var;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp393_);
	_tmp394_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp395_ = _tmp394_;
	vala_ccode_function_add_expression (_tmp395_, (ValaCCodeExpression*) ccall);
	_tmp396_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp397_ = asyncfunc;
	vala_ccode_file_add_function (_tmp396_, _tmp397_);
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_vala_ccode_node_unref0 (ccall);
	_vala_ccode_node_unref0 (attach_data_call);
	_vala_code_node_unref0 (cancellable_param);
	_vala_code_node_unref0 (t);
	_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)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

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

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

static gboolean
vala_gasync_module_real_generate_method_declaration (ValaCCodeBaseModule* base,
                                                     ValaMethod* m,
                                                     ValaCCodeFile* decl_space)
{
	ValaGAsyncModule * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	self = (ValaGAsyncModule*) base;
	g_return_val_if_fail (m != NULL, FALSE);
	g_return_val_if_fail (decl_space != NULL, FALSE);
	_tmp0_ = vala_method_get_coroutine (m);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
		gboolean _tmp5_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gboolean _tmp10_;
		ValaMethodType* _tmp11_;
		ValaMethodType* _tmp12_;
		ValaClass* cl = NULL;
		ValaSymbol* _tmp13_;
		ValaSymbol* _tmp14_;
		ValaClass* _tmp15_;
		ValaCCodeFunction* asyncfunc = NULL;
		gchar* _tmp16_;
		gchar* _tmp17_;
		ValaCCodeFunction* _tmp18_;
		ValaCCodeFunction* _tmp19_;
		ValaHashMap* cparam_map = NULL;
		GHashFunc _tmp20_;
		GEqualFunc _tmp21_;
		GEqualFunc _tmp22_;
		ValaHashMap* _tmp23_;
		ValaHashMap* carg_map = NULL;
		GHashFunc _tmp24_;
		GEqualFunc _tmp25_;
		GEqualFunc _tmp26_;
		ValaHashMap* _tmp27_;
		gboolean _tmp28_ = FALSE;
		gboolean _tmp48_ = FALSE;
		gboolean _tmp49_ = FALSE;
		ValaCCodeFunction* finishfunc = NULL;
		gchar* _tmp62_;
		gchar* _tmp63_;
		ValaCCodeFunction* _tmp64_;
		ValaCCodeFunction* _tmp65_;
		GHashFunc _tmp66_;
		GEqualFunc _tmp67_;
		GEqualFunc _tmp68_;
		ValaHashMap* _tmp69_;
		GHashFunc _tmp70_;
		GEqualFunc _tmp71_;
		GEqualFunc _tmp72_;
		ValaHashMap* _tmp73_;
		gboolean _tmp74_ = FALSE;
		gboolean _tmp94_ = FALSE;
		gboolean _tmp95_ = FALSE;
		gboolean _tmp108_ = FALSE;
		_tmp4_ = vala_method_get_is_abstract (m);
		_tmp5_ = _tmp4_;
		if (_tmp5_) {
			_tmp3_ = TRUE;
		} else {
			gboolean _tmp6_;
			gboolean _tmp7_;
			_tmp6_ = vala_method_get_is_virtual (m);
			_tmp7_ = _tmp6_;
			_tmp3_ = _tmp7_;
		}
		if (_tmp3_) {
			_tmp2_ = vala_get_ccode_no_wrapper (m);
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			result = FALSE;
			return result;
		}
		_tmp8_ = vala_get_ccode_name ((ValaCodeNode*) m);
		_tmp9_ = _tmp8_;
		_tmp10_ = vala_ccode_base_module_add_symbol_declaration ((ValaCCodeBaseModule*) self, decl_space, (ValaSymbol*) m, _tmp9_);
		_g_free0 (_tmp9_);
		if (_tmp10_) {
			result = FALSE;
			return result;
		}
		_tmp11_ = vala_method_type_new (m, NULL);
		_tmp12_ = _tmp11_;
		vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp12_, decl_space);
		_vala_code_node_unref0 (_tmp12_);
		_tmp13_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
		_tmp14_ = _tmp13_;
		_tmp15_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, VALA_TYPE_CLASS) ? ((ValaClass*) _tmp14_) : NULL);
		cl = _tmp15_;
		_tmp16_ = vala_get_ccode_name ((ValaCodeNode*) m);
		_tmp17_ = _tmp16_;
		_tmp18_ = vala_ccode_function_new (_tmp17_, "void");
		_tmp19_ = _tmp18_;
		_g_free0 (_tmp17_);
		asyncfunc = _tmp19_;
		_tmp20_ = g_direct_hash;
		_tmp21_ = g_direct_equal;
		_tmp22_ = g_direct_equal;
		_tmp23_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp20_, _tmp21_, _tmp22_);
		cparam_map = _tmp23_;
		_tmp24_ = g_direct_hash;
		_tmp25_ = g_direct_equal;
		_tmp26_ = g_direct_equal;
		_tmp27_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp24_, _tmp25_, _tmp26_);
		carg_map = _tmp27_;
		if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
			_tmp28_ = TRUE;
		} else {
			gboolean _tmp29_;
			gboolean _tmp30_;
			_tmp29_ = vala_method_get_entry_point (m);
			_tmp30_ = _tmp29_;
			_tmp28_ = _tmp30_;
		}
		if (_tmp28_) {
			ValaCCodeFunction* _tmp31_;
			ValaCCodeFunction* _tmp32_;
			ValaCCodeModifiers _tmp33_;
			ValaCCodeModifiers _tmp34_;
			_tmp31_ = asyncfunc;
			_tmp32_ = asyncfunc;
			_tmp33_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp32_);
			_tmp34_ = _tmp33_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp32_, _tmp34_ | VALA_CCODE_MODIFIERS_STATIC);
		} else {
			gboolean _tmp35_ = FALSE;
			ValaCodeContext* _tmp36_;
			ValaCodeContext* _tmp37_;
			gboolean _tmp38_;
			gboolean _tmp39_;
			_tmp36_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
			_tmp37_ = _tmp36_;
			_tmp38_ = vala_code_context_get_hide_internal (_tmp37_);
			_tmp39_ = _tmp38_;
			if (_tmp39_) {
				_tmp35_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
			} else {
				_tmp35_ = FALSE;
			}
			if (_tmp35_) {
				ValaCCodeFunction* _tmp40_;
				ValaCCodeFunction* _tmp41_;
				ValaCCodeModifiers _tmp42_;
				ValaCCodeModifiers _tmp43_;
				_tmp40_ = asyncfunc;
				_tmp41_ = asyncfunc;
				_tmp42_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp41_);
				_tmp43_ = _tmp42_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp41_, _tmp43_ | VALA_CCODE_MODIFIERS_INTERNAL);
			} else {
				ValaCCodeFunction* _tmp44_;
				ValaCCodeFunction* _tmp45_;
				ValaCCodeModifiers _tmp46_;
				ValaCCodeModifiers _tmp47_;
				_tmp44_ = asyncfunc;
				_tmp45_ = asyncfunc;
				_tmp46_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp45_);
				_tmp47_ = _tmp46_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp45_, _tmp47_ | VALA_CCODE_MODIFIERS_EXTERN);
				((ValaCCodeBaseModule*) self)->requires_vala_extern = TRUE;
			}
		}
		if (G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
			ValaClass* _tmp50_;
			_tmp50_ = cl;
			_tmp49_ = _tmp50_ != NULL;
		} else {
			_tmp49_ = FALSE;
		}
		if (_tmp49_) {
			ValaClass* _tmp51_;
			gboolean _tmp52_;
			gboolean _tmp53_;
			_tmp51_ = cl;
			_tmp52_ = vala_class_get_is_abstract (_tmp51_);
			_tmp53_ = _tmp52_;
			_tmp48_ = _tmp53_;
		} else {
			_tmp48_ = FALSE;
		}
		if (!_tmp48_) {
			ValaHashMap* _tmp54_;
			ValaCCodeFunction* _tmp55_;
			ValaHashMap* _tmp56_;
			ValaCCodeIdentifier* _tmp57_;
			ValaCCodeIdentifier* _tmp58_;
			ValaCCodeFunctionCall* _tmp59_;
			ValaCCodeFunctionCall* _tmp60_;
			ValaCCodeFunction* _tmp61_;
			_tmp54_ = cparam_map;
			_tmp55_ = asyncfunc;
			_tmp56_ = carg_map;
			_tmp57_ = vala_ccode_identifier_new ("fake");
			_tmp58_ = _tmp57_;
			_tmp59_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp58_);
			_tmp60_ = _tmp59_;
			vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) _tmp54_, _tmp55_, NULL, (ValaMap*) _tmp56_, _tmp60_, 1);
			_vala_ccode_node_unref0 (_tmp60_);
			_vala_ccode_node_unref0 (_tmp58_);
			_tmp61_ = asyncfunc;
			vala_ccode_file_add_function_declaration (decl_space, _tmp61_);
		}
		_tmp62_ = vala_get_ccode_finish_name (m);
		_tmp63_ = _tmp62_;
		_tmp64_ = vala_ccode_function_new (_tmp63_, "void");
		_tmp65_ = _tmp64_;
		_g_free0 (_tmp63_);
		finishfunc = _tmp65_;
		_tmp66_ = g_direct_hash;
		_tmp67_ = g_direct_equal;
		_tmp68_ = g_direct_equal;
		_tmp69_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp66_, _tmp67_, _tmp68_);
		_vala_map_unref0 (cparam_map);
		cparam_map = _tmp69_;
		_tmp70_ = g_direct_hash;
		_tmp71_ = g_direct_equal;
		_tmp72_ = g_direct_equal;
		_tmp73_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp70_, _tmp71_, _tmp72_);
		_vala_map_unref0 (carg_map);
		carg_map = _tmp73_;
		if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
			_tmp74_ = TRUE;
		} else {
			gboolean _tmp75_;
			gboolean _tmp76_;
			_tmp75_ = vala_method_get_entry_point (m);
			_tmp76_ = _tmp75_;
			_tmp74_ = _tmp76_;
		}
		if (_tmp74_) {
			ValaCCodeFunction* _tmp77_;
			ValaCCodeFunction* _tmp78_;
			ValaCCodeModifiers _tmp79_;
			ValaCCodeModifiers _tmp80_;
			_tmp77_ = finishfunc;
			_tmp78_ = finishfunc;
			_tmp79_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp78_);
			_tmp80_ = _tmp79_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp78_, _tmp80_ | VALA_CCODE_MODIFIERS_STATIC);
		} else {
			gboolean _tmp81_ = FALSE;
			ValaCodeContext* _tmp82_;
			ValaCodeContext* _tmp83_;
			gboolean _tmp84_;
			gboolean _tmp85_;
			_tmp82_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
			_tmp83_ = _tmp82_;
			_tmp84_ = vala_code_context_get_hide_internal (_tmp83_);
			_tmp85_ = _tmp84_;
			if (_tmp85_) {
				_tmp81_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
			} else {
				_tmp81_ = FALSE;
			}
			if (_tmp81_) {
				ValaCCodeFunction* _tmp86_;
				ValaCCodeFunction* _tmp87_;
				ValaCCodeModifiers _tmp88_;
				ValaCCodeModifiers _tmp89_;
				_tmp86_ = finishfunc;
				_tmp87_ = finishfunc;
				_tmp88_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp87_);
				_tmp89_ = _tmp88_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp87_, _tmp89_ | VALA_CCODE_MODIFIERS_INTERNAL);
			} else {
				ValaCCodeFunction* _tmp90_;
				ValaCCodeFunction* _tmp91_;
				ValaCCodeModifiers _tmp92_;
				ValaCCodeModifiers _tmp93_;
				_tmp90_ = finishfunc;
				_tmp91_ = finishfunc;
				_tmp92_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp91_);
				_tmp93_ = _tmp92_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp91_, _tmp93_ | VALA_CCODE_MODIFIERS_EXTERN);
				((ValaCCodeBaseModule*) self)->requires_vala_extern = TRUE;
			}
		}
		if (G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
			ValaClass* _tmp96_;
			_tmp96_ = cl;
			_tmp95_ = _tmp96_ != NULL;
		} else {
			_tmp95_ = FALSE;
		}
		if (_tmp95_) {
			ValaClass* _tmp97_;
			gboolean _tmp98_;
			gboolean _tmp99_;
			_tmp97_ = cl;
			_tmp98_ = vala_class_get_is_abstract (_tmp97_);
			_tmp99_ = _tmp98_;
			_tmp94_ = _tmp99_;
		} else {
			_tmp94_ = FALSE;
		}
		if (!_tmp94_) {
			ValaHashMap* _tmp100_;
			ValaCCodeFunction* _tmp101_;
			ValaHashMap* _tmp102_;
			ValaCCodeIdentifier* _tmp103_;
			ValaCCodeIdentifier* _tmp104_;
			ValaCCodeFunctionCall* _tmp105_;
			ValaCCodeFunctionCall* _tmp106_;
			ValaCCodeFunction* _tmp107_;
			_tmp100_ = cparam_map;
			_tmp101_ = finishfunc;
			_tmp102_ = carg_map;
			_tmp103_ = vala_ccode_identifier_new ("fake");
			_tmp104_ = _tmp103_;
			_tmp105_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp104_);
			_tmp106_ = _tmp105_;
			vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) _tmp100_, _tmp101_, NULL, (ValaMap*) _tmp102_, _tmp106_, 2);
			_vala_ccode_node_unref0 (_tmp106_);
			_vala_ccode_node_unref0 (_tmp104_);
			_tmp107_ = finishfunc;
			vala_ccode_file_add_function_declaration (decl_space, _tmp107_);
		}
		if (G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
			ValaClass* _tmp109_;
			_tmp109_ = cl;
			_tmp108_ = _tmp109_ != NULL;
		} else {
			_tmp108_ = FALSE;
		}
		if (_tmp108_) {
			ValaCCodeFunction* function = NULL;
			gchar* _tmp110_;
			gchar* _tmp111_;
			ValaCCodeFunction* _tmp112_;
			ValaCCodeFunction* _tmp113_;
			GHashFunc _tmp131_;
			GEqualFunc _tmp132_;
			GEqualFunc _tmp133_;
			ValaHashMap* _tmp134_;
			ValaHashMap* _tmp135_;
			ValaCCodeFunction* _tmp136_;
			ValaCCodeFunction* _tmp137_;
			gchar* _tmp138_;
			gchar* _tmp139_;
			ValaCCodeFunction* _tmp140_;
			GHashFunc _tmp158_;
			GEqualFunc _tmp159_;
			GEqualFunc _tmp160_;
			ValaHashMap* _tmp161_;
			ValaHashMap* _tmp162_;
			ValaCCodeFunction* _tmp163_;
			ValaCCodeFunction* _tmp164_;
			_tmp110_ = vala_get_ccode_real_name ((ValaSymbol*) m);
			_tmp111_ = _tmp110_;
			_tmp112_ = vala_ccode_function_new (_tmp111_, "void");
			_tmp113_ = _tmp112_;
			_g_free0 (_tmp111_);
			function = _tmp113_;
			if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
				ValaCCodeFunction* _tmp114_;
				ValaCCodeFunction* _tmp115_;
				ValaCCodeModifiers _tmp116_;
				ValaCCodeModifiers _tmp117_;
				_tmp114_ = function;
				_tmp115_ = function;
				_tmp116_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp115_);
				_tmp117_ = _tmp116_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp115_, _tmp117_ | VALA_CCODE_MODIFIERS_STATIC);
			} else {
				gboolean _tmp118_ = FALSE;
				ValaCodeContext* _tmp119_;
				ValaCodeContext* _tmp120_;
				gboolean _tmp121_;
				gboolean _tmp122_;
				_tmp119_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
				_tmp120_ = _tmp119_;
				_tmp121_ = vala_code_context_get_hide_internal (_tmp120_);
				_tmp122_ = _tmp121_;
				if (_tmp122_) {
					_tmp118_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
				} else {
					_tmp118_ = FALSE;
				}
				if (_tmp118_) {
					ValaCCodeFunction* _tmp123_;
					ValaCCodeFunction* _tmp124_;
					ValaCCodeModifiers _tmp125_;
					ValaCCodeModifiers _tmp126_;
					_tmp123_ = function;
					_tmp124_ = function;
					_tmp125_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp124_);
					_tmp126_ = _tmp125_;
					vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp124_, _tmp126_ | VALA_CCODE_MODIFIERS_INTERNAL);
				} else {
					ValaCCodeFunction* _tmp127_;
					ValaCCodeFunction* _tmp128_;
					ValaCCodeModifiers _tmp129_;
					ValaCCodeModifiers _tmp130_;
					_tmp127_ = function;
					_tmp128_ = function;
					_tmp129_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp128_);
					_tmp130_ = _tmp129_;
					vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp128_, _tmp130_ | VALA_CCODE_MODIFIERS_EXTERN);
					((ValaCCodeBaseModule*) self)->requires_vala_extern = TRUE;
				}
			}
			_tmp131_ = g_direct_hash;
			_tmp132_ = g_direct_equal;
			_tmp133_ = g_direct_equal;
			_tmp134_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp131_, _tmp132_, _tmp133_);
			_vala_map_unref0 (cparam_map);
			cparam_map = _tmp134_;
			_tmp135_ = cparam_map;
			_tmp136_ = function;
			vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) _tmp135_, _tmp136_, NULL, NULL, NULL, 1);
			_tmp137_ = function;
			vala_ccode_file_add_function_declaration (decl_space, _tmp137_);
			_tmp138_ = vala_get_ccode_finish_real_name (m);
			_tmp139_ = _tmp138_;
			_tmp140_ = vala_ccode_function_new (_tmp139_, "void");
			_vala_ccode_node_unref0 (function);
			function = _tmp140_;
			_g_free0 (_tmp139_);
			if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
				ValaCCodeFunction* _tmp141_;
				ValaCCodeFunction* _tmp142_;
				ValaCCodeModifiers _tmp143_;
				ValaCCodeModifiers _tmp144_;
				_tmp141_ = function;
				_tmp142_ = function;
				_tmp143_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp142_);
				_tmp144_ = _tmp143_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp142_, _tmp144_ | VALA_CCODE_MODIFIERS_STATIC);
			} else {
				gboolean _tmp145_ = FALSE;
				ValaCodeContext* _tmp146_;
				ValaCodeContext* _tmp147_;
				gboolean _tmp148_;
				gboolean _tmp149_;
				_tmp146_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
				_tmp147_ = _tmp146_;
				_tmp148_ = vala_code_context_get_hide_internal (_tmp147_);
				_tmp149_ = _tmp148_;
				if (_tmp149_) {
					_tmp145_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
				} else {
					_tmp145_ = FALSE;
				}
				if (_tmp145_) {
					ValaCCodeFunction* _tmp150_;
					ValaCCodeFunction* _tmp151_;
					ValaCCodeModifiers _tmp152_;
					ValaCCodeModifiers _tmp153_;
					_tmp150_ = function;
					_tmp151_ = function;
					_tmp152_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp151_);
					_tmp153_ = _tmp152_;
					vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp151_, _tmp153_ | VALA_CCODE_MODIFIERS_INTERNAL);
				} else {
					ValaCCodeFunction* _tmp154_;
					ValaCCodeFunction* _tmp155_;
					ValaCCodeModifiers _tmp156_;
					ValaCCodeModifiers _tmp157_;
					_tmp154_ = function;
					_tmp155_ = function;
					_tmp156_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp155_);
					_tmp157_ = _tmp156_;
					vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp155_, _tmp157_ | VALA_CCODE_MODIFIERS_EXTERN);
					((ValaCCodeBaseModule*) self)->requires_vala_extern = TRUE;
				}
			}
			_tmp158_ = g_direct_hash;
			_tmp159_ = g_direct_equal;
			_tmp160_ = g_direct_equal;
			_tmp161_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp158_, _tmp159_, _tmp160_);
			_vala_map_unref0 (cparam_map);
			cparam_map = _tmp161_;
			_tmp162_ = cparam_map;
			_tmp163_ = function;
			vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) _tmp162_, _tmp163_, NULL, NULL, NULL, 2);
			_tmp164_ = function;
			vala_ccode_file_add_function_declaration (decl_space, _tmp164_);
			_vala_ccode_node_unref0 (function);
		}
		result = TRUE;
		_vala_ccode_node_unref0 (finishfunc);
		_vala_map_unref0 (carg_map);
		_vala_map_unref0 (cparam_map);
		_vala_ccode_node_unref0 (asyncfunc);
		_vala_code_node_unref0 (cl);
		return result;
	} else {
		result = VALA_CCODE_BASE_MODULE_CLASS (vala_gasync_module_parent_class)->generate_method_declaration ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), m, decl_space);
		return result;
	}
}

static void
vala_gasync_module_real_visit_method (ValaCodeVisitor* base,
                                      ValaMethod* m)
{
	ValaGAsyncModule * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = (ValaGAsyncModule*) base;
	g_return_if_fail (m != NULL);
	_tmp0_ = vala_method_get_coroutine (m);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		ValaCCodeFile* _tmp2_;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp18_ = FALSE;
		gboolean _tmp19_ = FALSE;
		gboolean _tmp20_;
		gboolean _tmp21_;
		_tmp2_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp2_, "gio/gio.h", FALSE);
		if (!vala_symbol_is_internal_symbol ((ValaSymbol*) m)) {
			ValaCCodeFile* _tmp3_;
			_tmp3_ = ((ValaCCodeBaseModule*) self)->header_file;
			vala_ccode_file_add_include (_tmp3_, "gio/gio.h", FALSE);
		}
		_tmp5_ = vala_method_get_is_abstract (m);
		_tmp6_ = _tmp5_;
		if (!_tmp6_) {
			ValaBlock* _tmp7_;
			ValaBlock* _tmp8_;
			_tmp7_ = vala_subroutine_get_body ((ValaSubroutine*) m);
			_tmp8_ = _tmp7_;
			_tmp4_ = _tmp8_ != NULL;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			ValaCCodeStruct* data = NULL;
			ValaCCodeStruct* _tmp9_;
			ValaCCodeStruct* _tmp10_;
			ValaCCodeStruct* _tmp11_;
			ValaCCodeFunction* _tmp12_;
			ValaCCodeFunction* _tmp13_;
			ValaCCodeStruct* _tmp14_;
			_tmp9_ = vala_gasync_module_generate_data_struct (self, m);
			data = _tmp9_;
			_tmp10_ = data;
			_tmp11_ = _vala_ccode_node_ref0 (_tmp10_);
			_vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->closure_struct);
			((ValaCCodeBaseModule*) self)->closure_struct = _tmp11_;
			_tmp12_ = vala_gasync_module_generate_free_function (self, m);
			_tmp13_ = _tmp12_;
			_vala_ccode_node_unref0 (_tmp13_);
			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*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), m);
			_vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->closure_struct);
			((ValaCCodeBaseModule*) self)->closure_struct = NULL;
			_tmp14_ = data;
			vala_gasync_module_append_struct (self, _tmp14_);
			_vala_ccode_node_unref0 (data);
		} else {
			ValaCCodeFile* _tmp15_;
			_tmp15_ = ((ValaCCodeBaseModule*) self)->cfile;
			vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, _tmp15_);
			if (!vala_symbol_is_internal_symbol ((ValaSymbol*) m)) {
				ValaCCodeFile* _tmp16_;
				_tmp16_ = ((ValaCCodeBaseModule*) self)->header_file;
				vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, _tmp16_);
			}
			if (!vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
				ValaCCodeFile* _tmp17_;
				_tmp17_ = ((ValaCCodeBaseModule*) self)->internal_header_file;
				vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, _tmp17_);
			}
		}
		_tmp20_ = vala_method_get_is_abstract (m);
		_tmp21_ = _tmp20_;
		if (_tmp21_) {
			_tmp19_ = TRUE;
		} else {
			gboolean _tmp22_;
			gboolean _tmp23_;
			_tmp22_ = vala_method_get_is_virtual (m);
			_tmp23_ = _tmp22_;
			_tmp19_ = _tmp23_;
		}
		if (_tmp19_) {
			_tmp18_ = !vala_get_ccode_no_wrapper (m);
		} else {
			_tmp18_ = FALSE;
		}
		if (_tmp18_) {
			ValaHashMap* cparam_map = NULL;
			GHashFunc _tmp24_;
			GEqualFunc _tmp25_;
			GEqualFunc _tmp26_;
			ValaHashMap* _tmp27_;
			ValaHashMap* carg_map = NULL;
			GHashFunc _tmp28_;
			GEqualFunc _tmp29_;
			GEqualFunc _tmp30_;
			ValaHashMap* _tmp31_;
			ValaVoidType* _tmp32_;
			ValaVoidType* _tmp33_;
			ValaHashMap* _tmp34_;
			ValaHashMap* _tmp35_;
			GHashFunc _tmp36_;
			GEqualFunc _tmp37_;
			GEqualFunc _tmp38_;
			ValaHashMap* _tmp39_;
			GHashFunc _tmp40_;
			GEqualFunc _tmp41_;
			GEqualFunc _tmp42_;
			ValaHashMap* _tmp43_;
			ValaDataType* _tmp44_;
			ValaDataType* _tmp45_;
			ValaHashMap* _tmp46_;
			ValaHashMap* _tmp47_;
			_tmp24_ = g_direct_hash;
			_tmp25_ = g_direct_equal;
			_tmp26_ = g_direct_equal;
			_tmp27_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp24_, _tmp25_, _tmp26_);
			cparam_map = _tmp27_;
			_tmp28_ = g_direct_hash;
			_tmp29_ = g_direct_equal;
			_tmp30_ = g_direct_equal;
			_tmp31_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp28_, _tmp29_, _tmp30_);
			carg_map = _tmp31_;
			_tmp32_ = vala_void_type_new (NULL);
			_tmp33_ = _tmp32_;
			_tmp34_ = cparam_map;
			_tmp35_ = carg_map;
			vala_ccode_method_module_generate_vfunc ((ValaCCodeMethodModule*) self, m, (ValaDataType*) _tmp33_, (ValaMap*) _tmp34_, (ValaMap*) _tmp35_, "", 1);
			_vala_code_node_unref0 (_tmp33_);
			_tmp36_ = g_direct_hash;
			_tmp37_ = g_direct_equal;
			_tmp38_ = g_direct_equal;
			_tmp39_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp36_, _tmp37_, _tmp38_);
			_vala_map_unref0 (cparam_map);
			cparam_map = _tmp39_;
			_tmp40_ = g_direct_hash;
			_tmp41_ = g_direct_equal;
			_tmp42_ = g_direct_equal;
			_tmp43_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp40_, _tmp41_, _tmp42_);
			_vala_map_unref0 (carg_map);
			carg_map = _tmp43_;
			_tmp44_ = vala_callable_get_return_type ((ValaCallable*) m);
			_tmp45_ = _tmp44_;
			_tmp46_ = cparam_map;
			_tmp47_ = carg_map;
			vala_ccode_method_module_generate_vfunc ((ValaCCodeMethodModule*) self, m, _tmp45_, (ValaMap*) _tmp46_, (ValaMap*) _tmp47_, "_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*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), m);
	}
}

static void
vala_gasync_module_real_visit_creation_method (ValaCodeVisitor* base,
                                               ValaCreationMethod* m)
{
	ValaGAsyncModule * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = (ValaGAsyncModule*) base;
	g_return_if_fail (m != NULL);
	_tmp0_ = vala_method_get_coroutine ((ValaMethod*) m);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		VALA_CODE_VISITOR_CLASS (vala_gasync_module_parent_class)->visit_creation_method ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), m);
	} else {
		ValaSourceReference* _tmp2_;
		ValaSourceReference* _tmp3_;
		gboolean visible = FALSE;
		ValaSourceFileType _tmp4_;
		ValaSourceFileType _tmp5_;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		ValaTypeSymbol* _tmp8_;
		ValaTypeSymbol* _tmp9_;
		_tmp2_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
		_tmp3_ = _tmp2_;
		vala_ccode_base_module_push_line ((ValaCCodeBaseModule*) self, _tmp3_);
		visible = !vala_symbol_is_private_symbol ((ValaSymbol*) m);
		vala_code_visitor_visit_method ((ValaCodeVisitor*) self, (ValaMethod*) m);
		_tmp4_ = vala_symbol_get_source_type ((ValaSymbol*) m);
		_tmp5_ = _tmp4_;
		if (_tmp5_ == VALA_SOURCE_FILE_TYPE_FAST) {
			return;
		}
		_tmp8_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self);
		_tmp9_ = _tmp8_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, VALA_TYPE_CLASS)) {
			ValaClass* _tmp10_;
			ValaClass* _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp10_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
			_tmp11_ = _tmp10_;
			_tmp12_ = vala_class_get_is_compact (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp7_ = !_tmp13_;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			ValaClass* _tmp14_;
			ValaClass* _tmp15_;
			gboolean _tmp16_;
			gboolean _tmp17_;
			_tmp14_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
			_tmp15_ = _tmp14_;
			_tmp16_ = vala_class_get_is_abstract (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp6_ = !_tmp17_;
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			ValaCCodeFunction* vfunc = NULL;
			gchar* _tmp18_;
			gchar* _tmp19_;
			ValaCCodeFunction* _tmp20_;
			ValaCCodeFunction* _tmp21_;
			ValaHashMap* cparam_map = NULL;
			GHashFunc _tmp22_;
			GEqualFunc _tmp23_;
			GEqualFunc _tmp24_;
			ValaHashMap* _tmp25_;
			ValaHashMap* carg_map = NULL;
			GHashFunc _tmp26_;
			GEqualFunc _tmp27_;
			GEqualFunc _tmp28_;
			ValaHashMap* _tmp29_;
			ValaCCodeFunction* _tmp30_;
			ValaCCodeFunctionCall* vcall = NULL;
			gchar* _tmp31_;
			gchar* _tmp32_;
			ValaCCodeIdentifier* _tmp33_;
			ValaCCodeIdentifier* _tmp34_;
			ValaCCodeFunctionCall* _tmp35_;
			ValaCCodeFunctionCall* _tmp36_;
			ValaCCodeFunctionCall* _tmp37_;
			ValaClass* _tmp38_;
			ValaClass* _tmp39_;
			gchar* _tmp40_;
			gchar* _tmp41_;
			ValaCCodeIdentifier* _tmp42_;
			ValaCCodeIdentifier* _tmp43_;
			ValaCCodeFile* _tmp44_;
			ValaHashMap* _tmp45_;
			ValaCCodeFunction* _tmp46_;
			ValaHashMap* _tmp47_;
			ValaCCodeFunctionCall* _tmp48_;
			ValaCCodeFunction* _tmp49_;
			ValaCCodeFunction* _tmp50_;
			ValaCCodeFunctionCall* _tmp51_;
			ValaCCodeFile* _tmp56_;
			ValaCCodeFunction* _tmp57_;
			gchar* _tmp58_;
			gchar* _tmp59_;
			ValaCCodeFunction* _tmp60_;
			GHashFunc _tmp61_;
			GEqualFunc _tmp62_;
			GEqualFunc _tmp63_;
			ValaHashMap* _tmp64_;
			GHashFunc _tmp65_;
			GEqualFunc _tmp66_;
			GEqualFunc _tmp67_;
			ValaHashMap* _tmp68_;
			ValaCCodeFunction* _tmp69_;
			gchar* _tmp70_;
			gchar* _tmp71_;
			ValaCCodeIdentifier* _tmp72_;
			ValaCCodeIdentifier* _tmp73_;
			ValaCCodeFunctionCall* _tmp74_;
			ValaCCodeFile* _tmp75_;
			ValaHashMap* _tmp76_;
			ValaCCodeFunction* _tmp77_;
			ValaHashMap* _tmp78_;
			ValaCCodeFunctionCall* _tmp79_;
			ValaCCodeFunction* _tmp80_;
			ValaCCodeFunction* _tmp81_;
			ValaCCodeFunctionCall* _tmp82_;
			ValaCCodeFile* _tmp87_;
			ValaCCodeFunction* _tmp88_;
			_tmp18_ = vala_get_ccode_name ((ValaCodeNode*) m);
			_tmp19_ = _tmp18_;
			_tmp20_ = vala_ccode_function_new (_tmp19_, "void");
			_tmp21_ = _tmp20_;
			_g_free0 (_tmp19_);
			vfunc = _tmp21_;
			_tmp22_ = g_direct_hash;
			_tmp23_ = g_direct_equal;
			_tmp24_ = g_direct_equal;
			_tmp25_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp22_, _tmp23_, _tmp24_);
			cparam_map = _tmp25_;
			_tmp26_ = g_direct_hash;
			_tmp27_ = g_direct_equal;
			_tmp28_ = g_direct_equal;
			_tmp29_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp26_, _tmp27_, _tmp28_);
			carg_map = _tmp29_;
			_tmp30_ = vfunc;
			vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp30_);
			_tmp31_ = vala_get_ccode_real_name ((ValaSymbol*) m);
			_tmp32_ = _tmp31_;
			_tmp33_ = vala_ccode_identifier_new (_tmp32_);
			_tmp34_ = _tmp33_;
			_tmp35_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp34_);
			_tmp36_ = _tmp35_;
			_vala_ccode_node_unref0 (_tmp34_);
			_g_free0 (_tmp32_);
			vcall = _tmp36_;
			_tmp37_ = vcall;
			_tmp38_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
			_tmp39_ = _tmp38_;
			_tmp40_ = vala_get_ccode_type_id ((ValaCodeNode*) _tmp39_);
			_tmp41_ = _tmp40_;
			_tmp42_ = vala_ccode_identifier_new (_tmp41_);
			_tmp43_ = _tmp42_;
			vala_ccode_function_call_add_argument (_tmp37_, (ValaCCodeExpression*) _tmp43_);
			_vala_ccode_node_unref0 (_tmp43_);
			_g_free0 (_tmp41_);
			_tmp44_ = ((ValaCCodeBaseModule*) self)->cfile;
			_tmp45_ = cparam_map;
			_tmp46_ = vfunc;
			_tmp47_ = carg_map;
			_tmp48_ = vcall;
			vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, (ValaMethod*) m, _tmp44_, (ValaMap*) _tmp45_, _tmp46_, NULL, (ValaMap*) _tmp47_, _tmp48_, 1);
			_tmp49_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp50_ = _tmp49_;
			_tmp51_ = vcall;
			vala_ccode_function_add_expression (_tmp50_, (ValaCCodeExpression*) _tmp51_);
			if (!visible) {
				ValaCCodeFunction* _tmp52_;
				ValaCCodeFunction* _tmp53_;
				ValaCCodeModifiers _tmp54_;
				ValaCCodeModifiers _tmp55_;
				_tmp52_ = vfunc;
				_tmp53_ = vfunc;
				_tmp54_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp53_);
				_tmp55_ = _tmp54_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp53_, _tmp55_ | VALA_CCODE_MODIFIERS_STATIC);
			}
			vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
			_tmp56_ = ((ValaCCodeBaseModule*) self)->cfile;
			_tmp57_ = vfunc;
			vala_ccode_file_add_function (_tmp56_, _tmp57_);
			_tmp58_ = vala_get_ccode_finish_name ((ValaMethod*) m);
			_tmp59_ = _tmp58_;
			_tmp60_ = vala_ccode_function_new (_tmp59_, "void");
			_vala_ccode_node_unref0 (vfunc);
			vfunc = _tmp60_;
			_g_free0 (_tmp59_);
			_tmp61_ = g_direct_hash;
			_tmp62_ = g_direct_equal;
			_tmp63_ = g_direct_equal;
			_tmp64_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp61_, _tmp62_, _tmp63_);
			_vala_map_unref0 (cparam_map);
			cparam_map = _tmp64_;
			_tmp65_ = g_direct_hash;
			_tmp66_ = g_direct_equal;
			_tmp67_ = g_direct_equal;
			_tmp68_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp65_, _tmp66_, _tmp67_);
			_vala_map_unref0 (carg_map);
			carg_map = _tmp68_;
			_tmp69_ = vfunc;
			vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp69_);
			_tmp70_ = vala_get_ccode_finish_real_name ((ValaMethod*) m);
			_tmp71_ = _tmp70_;
			_tmp72_ = vala_ccode_identifier_new (_tmp71_);
			_tmp73_ = _tmp72_;
			_tmp74_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp73_);
			_vala_ccode_node_unref0 (vcall);
			vcall = _tmp74_;
			_vala_ccode_node_unref0 (_tmp73_);
			_g_free0 (_tmp71_);
			_tmp75_ = ((ValaCCodeBaseModule*) self)->cfile;
			_tmp76_ = cparam_map;
			_tmp77_ = vfunc;
			_tmp78_ = carg_map;
			_tmp79_ = vcall;
			vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, (ValaMethod*) m, _tmp75_, (ValaMap*) _tmp76_, _tmp77_, NULL, (ValaMap*) _tmp78_, _tmp79_, 2);
			_tmp80_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp81_ = _tmp80_;
			_tmp82_ = vcall;
			vala_ccode_function_add_return (_tmp81_, (ValaCCodeExpression*) _tmp82_);
			if (!visible) {
				ValaCCodeFunction* _tmp83_;
				ValaCCodeFunction* _tmp84_;
				ValaCCodeModifiers _tmp85_;
				ValaCCodeModifiers _tmp86_;
				_tmp83_ = vfunc;
				_tmp84_ = vfunc;
				_tmp85_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp84_);
				_tmp86_ = _tmp85_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp84_, _tmp86_ | VALA_CCODE_MODIFIERS_STATIC);
			}
			vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
			_tmp87_ = ((ValaCCodeBaseModule*) self)->cfile;
			_tmp88_ = vfunc;
			vala_ccode_file_add_function (_tmp87_, _tmp88_);
			_vala_ccode_node_unref0 (vcall);
			_vala_map_unref0 (carg_map);
			_vala_map_unref0 (cparam_map);
			_vala_ccode_node_unref0 (vfunc);
		}
		vala_ccode_base_module_pop_line ((ValaCCodeBaseModule*) self);
	}
}

static void
vala_gasync_module_generate_finish_function (ValaGAsyncModule* self,
                                             ValaMethod* m)
{
	ValaCCodeBaseModuleEmitContext* _tmp0_;
	ValaCCodeBaseModuleEmitContext* _tmp1_;
	gchar* dataname = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	ValaCCodeFunction* finishfunc = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaHashMap* cparam_map = NULL;
	GHashFunc _tmp12_;
	GEqualFunc _tmp13_;
	GEqualFunc _tmp14_;
	ValaHashMap* _tmp15_;
	ValaHashMap* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeParameter* _tmp18_;
	ValaCCodeFile* _tmp19_;
	ValaHashMap* _tmp20_;
	ValaCCodeFunction* _tmp21_;
	gboolean _tmp22_ = FALSE;
	gboolean _tmp23_ = FALSE;
	ValaCCodeFunction* _tmp41_;
	ValaDataType* return_type = NULL;
	ValaDataType* _tmp42_;
	ValaDataType* _tmp43_;
	ValaDataType* _tmp44_;
	ValaCCodeIdentifier* data_var = NULL;
	ValaCCodeIdentifier* _tmp71_;
	ValaCCodeFunction* _tmp72_;
	ValaCCodeFunction* _tmp73_;
	const gchar* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	ValaCCodeVariableDeclarator* _tmp77_;
	ValaCCodeVariableDeclarator* _tmp78_;
	ValaCCodeFunctionCall* async_result_cast = NULL;
	ValaCCodeIdentifier* _tmp79_;
	ValaCCodeIdentifier* _tmp80_;
	ValaCCodeFunctionCall* _tmp81_;
	ValaCCodeFunctionCall* _tmp82_;
	ValaCCodeFunctionCall* _tmp83_;
	ValaCCodeIdentifier* _tmp84_;
	ValaCCodeIdentifier* _tmp85_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaCCodeIdentifier* _tmp86_;
	ValaCCodeIdentifier* _tmp87_;
	ValaCCodeFunctionCall* _tmp88_;
	ValaCCodeFunctionCall* _tmp89_;
	ValaCCodeFunctionCall* _tmp90_;
	ValaCCodeFunctionCall* _tmp91_;
	gboolean _tmp92_;
	gboolean _tmp93_;
	ValaCCodeFunction* _tmp100_;
	ValaCCodeFunction* _tmp101_;
	ValaCCodeIdentifier* _tmp102_;
	ValaCCodeFunctionCall* _tmp103_;
	gboolean has_cancellable = FALSE;
	gboolean _tmp123_ = FALSE;
	gboolean _tmp124_;
	gboolean _tmp125_;
	ValaCCodeBaseModuleEmitContext* _tmp137_;
	ValaCCodeBaseModuleEmitContext* _tmp169_;
	ValaCCodeFile* _tmp273_;
	ValaCCodeFunction* _tmp274_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (m != NULL);
	_tmp0_ = vala_ccode_base_module_emit_context_new (NULL);
	_tmp1_ = _tmp0_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp1_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp1_);
	_tmp2_ = vala_get_ccode_name ((ValaCodeNode*) 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_get_ccode_finish_real_name (m);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_ccode_function_new (_tmp9_, "void");
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	finishfunc = _tmp11_;
	_tmp12_ = g_direct_hash;
	_tmp13_ = g_direct_equal;
	_tmp14_ = g_direct_equal;
	_tmp15_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp12_, _tmp13_, _tmp14_);
	cparam_map = _tmp15_;
	_tmp16_ = cparam_map;
	_tmp17_ = vala_ccode_parameter_new ("_res_", "GAsyncResult*");
	_tmp18_ = _tmp17_;
	vala_map_set ((ValaMap*) _tmp16_, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_get_ccode_async_result_pos (m), FALSE)), _tmp18_);
	_vala_ccode_node_unref0 (_tmp18_);
	_tmp19_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp20_ = cparam_map;
	_tmp21_ = finishfunc;
	vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, _tmp19_, (ValaMap*) _tmp20_, _tmp21_, NULL, NULL, NULL, 2);
	if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
		_tmp23_ = TRUE;
	} else {
		ValaMethod* _tmp24_;
		ValaMethod* _tmp25_;
		_tmp24_ = vala_method_get_base_method (m);
		_tmp25_ = _tmp24_;
		_tmp23_ = _tmp25_ != NULL;
	}
	if (_tmp23_) {
		_tmp22_ = TRUE;
	} else {
		ValaMethod* _tmp26_;
		ValaMethod* _tmp27_;
		_tmp26_ = vala_method_get_base_interface_method (m);
		_tmp27_ = _tmp26_;
		_tmp22_ = _tmp27_ != NULL;
	}
	if (_tmp22_) {
		ValaCCodeFunction* _tmp28_;
		ValaCCodeFunction* _tmp29_;
		ValaCCodeModifiers _tmp30_;
		ValaCCodeModifiers _tmp31_;
		_tmp28_ = finishfunc;
		_tmp29_ = finishfunc;
		_tmp30_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp29_);
		_tmp31_ = _tmp30_;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp29_, _tmp31_ | VALA_CCODE_MODIFIERS_STATIC);
	} else {
		gboolean _tmp32_ = FALSE;
		ValaCodeContext* _tmp33_;
		ValaCodeContext* _tmp34_;
		gboolean _tmp35_;
		gboolean _tmp36_;
		_tmp33_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp34_ = _tmp33_;
		_tmp35_ = vala_code_context_get_hide_internal (_tmp34_);
		_tmp36_ = _tmp35_;
		if (_tmp36_) {
			_tmp32_ = vala_symbol_is_internal_symbol ((ValaSymbol*) m);
		} else {
			_tmp32_ = FALSE;
		}
		if (_tmp32_) {
			ValaCCodeFunction* _tmp37_;
			ValaCCodeFunction* _tmp38_;
			ValaCCodeModifiers _tmp39_;
			ValaCCodeModifiers _tmp40_;
			_tmp37_ = finishfunc;
			_tmp38_ = finishfunc;
			_tmp39_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp38_);
			_tmp40_ = _tmp39_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp38_, _tmp40_ | VALA_CCODE_MODIFIERS_INTERNAL);
		}
	}
	_tmp41_ = finishfunc;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp41_);
	_tmp42_ = vala_callable_get_return_type ((ValaCallable*) m);
	_tmp43_ = _tmp42_;
	_tmp44_ = _vala_code_node_ref0 (_tmp43_);
	return_type = _tmp44_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
		ValaTypeSymbol* type_sym = NULL;
		ValaSymbol* _tmp45_;
		ValaSymbol* _tmp46_;
		ValaTypeSymbol* _tmp47_;
		ValaTypeSymbol* _tmp48_;
		_tmp45_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
		_tmp46_ = _tmp45_;
		_tmp47_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol));
		type_sym = _tmp47_;
		_tmp48_ = type_sym;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp48_, VALA_TYPE_OBJECT_TYPE_SYMBOL)) {
			ValaCCodeFunction* _tmp49_;
			ValaCCodeFunction* _tmp50_;
			ValaTypeSymbol* _tmp51_;
			gchar* _tmp52_;
			gchar* _tmp53_;
			gchar* _tmp54_;
			gchar* _tmp55_;
			ValaCCodeVariableDeclarator* _tmp56_;
			ValaCCodeVariableDeclarator* _tmp57_;
			ValaTypeSymbol* _tmp58_;
			ValaDataType* _tmp59_;
			_tmp49_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp50_ = _tmp49_;
			_tmp51_ = type_sym;
			_tmp52_ = vala_get_ccode_name ((ValaCodeNode*) _tmp51_);
			_tmp53_ = _tmp52_;
			_tmp54_ = g_strconcat (_tmp53_, "*", NULL);
			_tmp55_ = _tmp54_;
			_tmp56_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
			_tmp57_ = _tmp56_;
			vala_ccode_function_add_declaration (_tmp50_, _tmp55_, (ValaCCodeDeclarator*) _tmp57_, 0);
			_vala_ccode_node_unref0 (_tmp57_);
			_g_free0 (_tmp55_);
			_g_free0 (_tmp53_);
			_tmp58_ = type_sym;
			_tmp59_ = vala_semantic_analyzer_get_this_type ((ValaSymbol*) m, _tmp58_);
			_vala_code_node_unref0 (return_type);
			return_type = _tmp59_;
		}
		_vala_code_node_unref0 (type_sym);
	} else {
		gboolean _tmp60_ = FALSE;
		ValaDataType* _tmp61_;
		_tmp61_ = return_type;
		if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp61_, VALA_TYPE_VOID_TYPE)) {
			ValaDataType* _tmp62_;
			_tmp62_ = return_type;
			_tmp60_ = !vala_data_type_is_real_non_null_struct_type (_tmp62_);
		} else {
			_tmp60_ = FALSE;
		}
		if (_tmp60_) {
			ValaCCodeFunction* _tmp63_;
			ValaCCodeFunction* _tmp64_;
			ValaDataType* _tmp65_;
			ValaDataType* _tmp66_;
			gchar* _tmp67_;
			gchar* _tmp68_;
			ValaCCodeVariableDeclarator* _tmp69_;
			ValaCCodeVariableDeclarator* _tmp70_;
			_tmp63_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp64_ = _tmp63_;
			_tmp65_ = vala_callable_get_return_type ((ValaCallable*) m);
			_tmp66_ = _tmp65_;
			_tmp67_ = vala_get_ccode_name ((ValaCodeNode*) _tmp66_);
			_tmp68_ = _tmp67_;
			_tmp69_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
			_tmp70_ = _tmp69_;
			vala_ccode_function_add_declaration (_tmp64_, _tmp68_, (ValaCCodeDeclarator*) _tmp70_, 0);
			_vala_ccode_node_unref0 (_tmp70_);
			_g_free0 (_tmp68_);
		}
	}
	_tmp71_ = vala_ccode_identifier_new ("_data_");
	data_var = _tmp71_;
	_tmp72_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp73_ = _tmp72_;
	_tmp74_ = dataname;
	_tmp75_ = g_strconcat (_tmp74_, "*", NULL);
	_tmp76_ = _tmp75_;
	_tmp77_ = vala_ccode_variable_declarator_new ("_data_", NULL, NULL);
	_tmp78_ = _tmp77_;
	vala_ccode_function_add_declaration (_tmp73_, _tmp76_, (ValaCCodeDeclarator*) _tmp78_, 0);
	_vala_ccode_node_unref0 (_tmp78_);
	_g_free0 (_tmp76_);
	_tmp79_ = vala_ccode_identifier_new ("G_TASK");
	_tmp80_ = _tmp79_;
	_tmp81_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp80_);
	_tmp82_ = _tmp81_;
	_vala_ccode_node_unref0 (_tmp80_);
	async_result_cast = _tmp82_;
	_tmp83_ = async_result_cast;
	_tmp84_ = vala_ccode_identifier_new ("_res_");
	_tmp85_ = _tmp84_;
	vala_ccode_function_call_add_argument (_tmp83_, (ValaCCodeExpression*) _tmp85_);
	_vala_ccode_node_unref0 (_tmp85_);
	_tmp86_ = vala_ccode_identifier_new ("g_task_propagate_pointer");
	_tmp87_ = _tmp86_;
	_tmp88_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp87_);
	_tmp89_ = _tmp88_;
	_vala_ccode_node_unref0 (_tmp87_);
	ccall = _tmp89_;
	_tmp90_ = ccall;
	_tmp91_ = async_result_cast;
	vala_ccode_function_call_add_argument (_tmp90_, (ValaCCodeExpression*) _tmp91_);
	_tmp92_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) m);
	_tmp93_ = _tmp92_;
	if (_tmp93_) {
		ValaCCodeFunctionCall* _tmp94_;
		ValaCCodeIdentifier* _tmp95_;
		ValaCCodeIdentifier* _tmp96_;
		_tmp94_ = ccall;
		_tmp95_ = vala_ccode_identifier_new ("error");
		_tmp96_ = _tmp95_;
		vala_ccode_function_call_add_argument (_tmp94_, (ValaCCodeExpression*) _tmp96_);
		_vala_ccode_node_unref0 (_tmp96_);
	} else {
		ValaCCodeFunctionCall* _tmp97_;
		ValaCCodeConstant* _tmp98_;
		ValaCCodeConstant* _tmp99_;
		_tmp97_ = ccall;
		_tmp98_ = vala_ccode_constant_new ("NULL");
		_tmp99_ = _tmp98_;
		vala_ccode_function_call_add_argument (_tmp97_, (ValaCCodeExpression*) _tmp99_);
		_vala_ccode_node_unref0 (_tmp99_);
	}
	_tmp100_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp101_ = _tmp100_;
	_tmp102_ = data_var;
	_tmp103_ = ccall;
	vala_ccode_function_add_assignment (_tmp101_, (ValaCCodeExpression*) _tmp102_, (ValaCCodeExpression*) _tmp103_);
	has_cancellable = FALSE;
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp104_;
		gint _param_size = 0;
		ValaList* _tmp105_;
		gint _tmp106_;
		gint _tmp107_;
		gint _param_index = 0;
		_tmp104_ = vala_callable_get_parameters ((ValaCallable*) m);
		_param_list = _tmp104_;
		_tmp105_ = _param_list;
		_tmp106_ = vala_collection_get_size ((ValaCollection*) _tmp105_);
		_tmp107_ = _tmp106_;
		_param_size = _tmp107_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp108_;
			gint _tmp109_;
			ValaParameter* param = NULL;
			ValaList* _tmp110_;
			gpointer _tmp111_;
			gboolean _tmp112_ = FALSE;
			ValaParameter* _tmp113_;
			ValaDataType* _tmp114_;
			ValaDataType* _tmp115_;
			_param_index = _param_index + 1;
			_tmp108_ = _param_index;
			_tmp109_ = _param_size;
			if (!(_tmp108_ < _tmp109_)) {
				break;
			}
			_tmp110_ = _param_list;
			_tmp111_ = vala_list_get (_tmp110_, _param_index);
			param = (ValaParameter*) _tmp111_;
			_tmp113_ = param;
			_tmp114_ = vala_variable_get_variable_type ((ValaVariable*) _tmp113_);
			_tmp115_ = _tmp114_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp115_, VALA_TYPE_OBJECT_TYPE)) {
				ValaParameter* _tmp116_;
				ValaDataType* _tmp117_;
				ValaDataType* _tmp118_;
				ValaTypeSymbol* _tmp119_;
				ValaTypeSymbol* _tmp120_;
				gchar* _tmp121_;
				gchar* _tmp122_;
				_tmp116_ = param;
				_tmp117_ = vala_variable_get_variable_type ((ValaVariable*) _tmp116_);
				_tmp118_ = _tmp117_;
				_tmp119_ = vala_data_type_get_type_symbol (_tmp118_);
				_tmp120_ = _tmp119_;
				_tmp121_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp120_);
				_tmp122_ = _tmp121_;
				_tmp112_ = g_strcmp0 (_tmp122_, "GLib.Cancellable") == 0;
				_g_free0 (_tmp122_);
			} else {
				_tmp112_ = FALSE;
			}
			if (_tmp112_) {
				has_cancellable = TRUE;
				_vala_code_node_unref0 (param);
				break;
			}
			_vala_code_node_unref0 (param);
		}
	}
	_tmp124_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) m);
	_tmp125_ = _tmp124_;
	if (_tmp125_) {
		_tmp123_ = TRUE;
	} else {
		_tmp123_ = has_cancellable;
	}
	if (_tmp123_) {
		ValaCCodeBinaryExpression* is_null = NULL;
		ValaCCodeConstant* _tmp126_;
		ValaCCodeConstant* _tmp127_;
		ValaCCodeIdentifier* _tmp128_;
		ValaCCodeBinaryExpression* _tmp129_;
		ValaCCodeBinaryExpression* _tmp130_;
		ValaCCodeFunction* _tmp131_;
		ValaCCodeFunction* _tmp132_;
		ValaCCodeBinaryExpression* _tmp133_;
		ValaDataType* _tmp134_;
		ValaCCodeFunction* _tmp135_;
		ValaCCodeFunction* _tmp136_;
		_tmp126_ = vala_ccode_constant_new ("NULL");
		_tmp127_ = _tmp126_;
		_tmp128_ = data_var;
		_tmp129_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp127_, (ValaCCodeExpression*) _tmp128_);
		_tmp130_ = _tmp129_;
		_vala_ccode_node_unref0 (_tmp127_);
		is_null = _tmp130_;
		_tmp131_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp132_ = _tmp131_;
		_tmp133_ = is_null;
		vala_ccode_function_open_if (_tmp132_, (ValaCCodeExpression*) _tmp133_);
		_tmp134_ = return_type;
		vala_ccode_base_module_return_default_value ((ValaCCodeBaseModule*) self, _tmp134_, FALSE);
		_tmp135_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp136_ = _tmp135_;
		vala_ccode_function_close (_tmp136_);
		_vala_ccode_node_unref0 (is_null);
	}
	_tmp137_ = ((ValaCCodeBaseModule*) self)->emit_context;
	vala_ccode_base_module_emit_context_push_symbol (_tmp137_, (ValaSymbol*) m);
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp138_;
		gint _param_size = 0;
		ValaList* _tmp139_;
		gint _tmp140_;
		gint _tmp141_;
		gint _param_index = 0;
		_tmp138_ = vala_callable_get_parameters ((ValaCallable*) m);
		_param_list = _tmp138_;
		_tmp139_ = _param_list;
		_tmp140_ = vala_collection_get_size ((ValaCollection*) _tmp139_);
		_tmp141_ = _tmp140_;
		_param_size = _tmp141_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp142_;
			gint _tmp143_;
			ValaParameter* param = NULL;
			ValaList* _tmp144_;
			gpointer _tmp145_;
			ValaParameter* _tmp146_;
			ValaParameterDirection _tmp147_;
			ValaParameterDirection _tmp148_;
			_param_index = _param_index + 1;
			_tmp142_ = _param_index;
			_tmp143_ = _param_size;
			if (!(_tmp142_ < _tmp143_)) {
				break;
			}
			_tmp144_ = _param_list;
			_tmp145_ = vala_list_get (_tmp144_, _param_index);
			param = (ValaParameter*) _tmp145_;
			_tmp146_ = param;
			_tmp147_ = vala_parameter_get_direction (_tmp146_);
			_tmp148_ = _tmp147_;
			if (_tmp148_ != VALA_PARAMETER_DIRECTION_IN) {
				ValaParameter* _tmp149_;
				gboolean _tmp150_ = FALSE;
				ValaParameter* _tmp151_;
				ValaDataType* _tmp152_;
				ValaDataType* _tmp153_;
				_tmp149_ = param;
				vala_ccode_base_module_return_out_parameter ((ValaCCodeBaseModule*) self, _tmp149_);
				_tmp151_ = param;
				_tmp152_ = vala_variable_get_variable_type ((ValaVariable*) _tmp151_);
				_tmp153_ = _tmp152_;
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp153_, VALA_TYPE_VALUE_TYPE)) {
					_tmp150_ = TRUE;
				} else {
					ValaParameter* _tmp154_;
					ValaDataType* _tmp155_;
					ValaDataType* _tmp156_;
					gboolean _tmp157_;
					gboolean _tmp158_;
					_tmp154_ = param;
					_tmp155_ = vala_variable_get_variable_type ((ValaVariable*) _tmp154_);
					_tmp156_ = _tmp155_;
					_tmp157_ = vala_data_type_get_nullable (_tmp156_);
					_tmp158_ = _tmp157_;
					_tmp150_ = _tmp158_;
				}
				if (_tmp150_) {
					ValaCCodeFunction* _tmp159_;
					ValaCCodeFunction* _tmp160_;
					ValaCCodeIdentifier* _tmp161_;
					ValaParameter* _tmp162_;
					gchar* _tmp163_;
					gchar* _tmp164_;
					ValaCCodeMemberAccess* _tmp165_;
					ValaCCodeMemberAccess* _tmp166_;
					ValaCCodeConstant* _tmp167_;
					ValaCCodeConstant* _tmp168_;
					_tmp159_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp160_ = _tmp159_;
					_tmp161_ = data_var;
					_tmp162_ = param;
					_tmp163_ = vala_get_ccode_name ((ValaCodeNode*) _tmp162_);
					_tmp164_ = _tmp163_;
					_tmp165_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp161_, _tmp164_);
					_tmp166_ = _tmp165_;
					_tmp167_ = vala_ccode_constant_new ("NULL");
					_tmp168_ = _tmp167_;
					vala_ccode_function_add_assignment (_tmp160_, (ValaCCodeExpression*) _tmp166_, (ValaCCodeExpression*) _tmp168_);
					_vala_ccode_node_unref0 (_tmp168_);
					_vala_ccode_node_unref0 (_tmp166_);
					_g_free0 (_tmp164_);
				}
			}
			_vala_code_node_unref0 (param);
		}
	}
	_tmp169_ = ((ValaCCodeBaseModule*) self)->emit_context;
	vala_ccode_base_module_emit_context_pop_symbol (_tmp169_);
	if (G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
		ValaCCodeFunction* _tmp170_;
		ValaCCodeFunction* _tmp171_;
		ValaCCodeIdentifier* _tmp172_;
		ValaCCodeIdentifier* _tmp173_;
		ValaCCodeIdentifier* _tmp174_;
		ValaCCodeMemberAccess* _tmp175_;
		ValaCCodeMemberAccess* _tmp176_;
		ValaCCodeFunction* _tmp177_;
		ValaCCodeFunction* _tmp178_;
		ValaCCodeIdentifier* _tmp179_;
		ValaCCodeMemberAccess* _tmp180_;
		ValaCCodeMemberAccess* _tmp181_;
		ValaCCodeConstant* _tmp182_;
		ValaCCodeConstant* _tmp183_;
		ValaCCodeFunction* _tmp184_;
		ValaCCodeFunction* _tmp185_;
		ValaCCodeIdentifier* _tmp186_;
		ValaCCodeIdentifier* _tmp187_;
		_tmp170_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp171_ = _tmp170_;
		_tmp172_ = vala_ccode_identifier_new ("result");
		_tmp173_ = _tmp172_;
		_tmp174_ = data_var;
		_tmp175_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp174_, "self");
		_tmp176_ = _tmp175_;
		vala_ccode_function_add_assignment (_tmp171_, (ValaCCodeExpression*) _tmp173_, (ValaCCodeExpression*) _tmp176_);
		_vala_ccode_node_unref0 (_tmp176_);
		_vala_ccode_node_unref0 (_tmp173_);
		_tmp177_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp178_ = _tmp177_;
		_tmp179_ = data_var;
		_tmp180_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp179_, "self");
		_tmp181_ = _tmp180_;
		_tmp182_ = vala_ccode_constant_new ("NULL");
		_tmp183_ = _tmp182_;
		vala_ccode_function_add_assignment (_tmp178_, (ValaCCodeExpression*) _tmp181_, (ValaCCodeExpression*) _tmp183_);
		_vala_ccode_node_unref0 (_tmp183_);
		_vala_ccode_node_unref0 (_tmp181_);
		_tmp184_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp185_ = _tmp184_;
		_tmp186_ = vala_ccode_identifier_new ("result");
		_tmp187_ = _tmp186_;
		vala_ccode_function_add_return (_tmp185_, (ValaCCodeExpression*) _tmp187_);
		_vala_ccode_node_unref0 (_tmp187_);
	} else {
		ValaDataType* _tmp188_;
		_tmp188_ = return_type;
		if (vala_data_type_is_real_non_null_struct_type (_tmp188_)) {
			ValaCCodeExpression* cexpr = NULL;
			ValaCCodeIdentifier* _tmp189_;
			ValaCCodeMemberAccess* _tmp190_;
			ValaDataType* _tmp191_;
			ValaCCodeFunction* _tmp201_;
			ValaCCodeFunction* _tmp202_;
			ValaCCodeIdentifier* _tmp203_;
			ValaCCodeIdentifier* _tmp204_;
			ValaCCodeUnaryExpression* _tmp205_;
			ValaCCodeUnaryExpression* _tmp206_;
			ValaCCodeExpression* _tmp207_;
			_tmp189_ = data_var;
			_tmp190_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp189_, "result");
			cexpr = (ValaCCodeExpression*) _tmp190_;
			_tmp191_ = return_type;
			if (vala_ccode_base_module_requires_copy (_tmp191_)) {
				ValaDataType* _tmp192_;
				ValaCCodeExpression* _tmp193_;
				ValaGLibValue* _tmp194_;
				ValaGLibValue* _tmp195_;
				ValaDataType* _tmp196_;
				ValaTargetValue* _tmp197_;
				ValaTargetValue* _tmp198_;
				ValaCCodeExpression* _tmp199_;
				ValaCCodeExpression* _tmp200_;
				_tmp192_ = return_type;
				_tmp193_ = cexpr;
				_tmp194_ = vala_glib_value_new (_tmp192_, _tmp193_, TRUE);
				_tmp195_ = _tmp194_;
				_tmp196_ = return_type;
				_tmp197_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp195_, (ValaCodeNode*) _tmp196_);
				_tmp198_ = _tmp197_;
				_tmp199_ = vala_get_cvalue_ (_tmp198_);
				_tmp200_ = _vala_ccode_node_ref0 (_tmp199_);
				_vala_ccode_node_unref0 (cexpr);
				cexpr = _tmp200_;
				_vala_target_value_unref0 (_tmp198_);
				_vala_target_value_unref0 (_tmp195_);
			}
			_tmp201_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp202_ = _tmp201_;
			_tmp203_ = vala_ccode_identifier_new ("result");
			_tmp204_ = _tmp203_;
			_tmp205_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp204_);
			_tmp206_ = _tmp205_;
			_tmp207_ = cexpr;
			vala_ccode_function_add_assignment (_tmp202_, (ValaCCodeExpression*) _tmp206_, _tmp207_);
			_vala_ccode_node_unref0 (_tmp206_);
			_vala_ccode_node_unref0 (_tmp204_);
			_vala_ccode_node_unref0 (cexpr);
		} else {
			ValaDataType* _tmp208_;
			_tmp208_ = return_type;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp208_, VALA_TYPE_VOID_TYPE)) {
				ValaCCodeFunction* _tmp209_;
				ValaCCodeFunction* _tmp210_;
				ValaCCodeIdentifier* _tmp211_;
				ValaCCodeIdentifier* _tmp212_;
				ValaCCodeIdentifier* _tmp213_;
				ValaCCodeMemberAccess* _tmp214_;
				ValaCCodeMemberAccess* _tmp215_;
				ValaDataType* _tmp216_;
				gboolean _tmp257_ = FALSE;
				ValaDataType* _tmp258_;
				ValaCCodeFunction* _tmp269_;
				ValaCCodeFunction* _tmp270_;
				ValaCCodeIdentifier* _tmp271_;
				ValaCCodeIdentifier* _tmp272_;
				_tmp209_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp210_ = _tmp209_;
				_tmp211_ = vala_ccode_identifier_new ("result");
				_tmp212_ = _tmp211_;
				_tmp213_ = data_var;
				_tmp214_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp213_, "result");
				_tmp215_ = _tmp214_;
				vala_ccode_function_add_assignment (_tmp210_, (ValaCCodeExpression*) _tmp212_, (ValaCCodeExpression*) _tmp215_);
				_vala_ccode_node_unref0 (_tmp215_);
				_vala_ccode_node_unref0 (_tmp212_);
				_tmp216_ = return_type;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp216_, VALA_TYPE_ARRAY_TYPE)) {
					ValaArrayType* array_type = NULL;
					ValaDataType* _tmp217_;
					ValaArrayType* _tmp218_;
					_tmp217_ = return_type;
					_tmp218_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp217_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
					array_type = _tmp218_;
					if (vala_get_ccode_array_length ((ValaCodeNode*) m)) {
						{
							gint dim = 0;
							dim = 1;
							{
								gboolean _tmp219_ = FALSE;
								_tmp219_ = TRUE;
								while (TRUE) {
									ValaArrayType* _tmp221_;
									gint _tmp222_;
									gint _tmp223_;
									ValaCCodeFunction* _tmp224_;
									ValaCCodeFunction* _tmp225_;
									gchar* _tmp226_;
									gchar* _tmp227_;
									ValaCCodeIdentifier* _tmp228_;
									ValaCCodeIdentifier* _tmp229_;
									ValaCCodeUnaryExpression* _tmp230_;
									ValaCCodeUnaryExpression* _tmp231_;
									ValaCCodeIdentifier* _tmp232_;
									gchar* _tmp233_;
									gchar* _tmp234_;
									ValaCCodeMemberAccess* _tmp235_;
									ValaCCodeMemberAccess* _tmp236_;
									if (!_tmp219_) {
										gint _tmp220_;
										_tmp220_ = dim;
										dim = _tmp220_ + 1;
									}
									_tmp219_ = FALSE;
									_tmp221_ = array_type;
									_tmp222_ = vala_array_type_get_rank (_tmp221_);
									_tmp223_ = _tmp222_;
									if (!(dim <= _tmp223_)) {
										break;
									}
									_tmp224_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
									_tmp225_ = _tmp224_;
									_tmp226_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
									_tmp227_ = _tmp226_;
									_tmp228_ = vala_ccode_identifier_new (_tmp227_);
									_tmp229_ = _tmp228_;
									_tmp230_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp229_);
									_tmp231_ = _tmp230_;
									_tmp232_ = data_var;
									_tmp233_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim);
									_tmp234_ = _tmp233_;
									_tmp235_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp232_, _tmp234_);
									_tmp236_ = _tmp235_;
									vala_ccode_function_add_assignment (_tmp225_, (ValaCCodeExpression*) _tmp231_, (ValaCCodeExpression*) _tmp236_);
									_vala_ccode_node_unref0 (_tmp236_);
									_g_free0 (_tmp234_);
									_vala_ccode_node_unref0 (_tmp231_);
									_vala_ccode_node_unref0 (_tmp229_);
									_g_free0 (_tmp227_);
								}
							}
						}
					}
					_vala_code_node_unref0 (array_type);
				} else {
					gboolean _tmp237_ = FALSE;
					ValaDataType* _tmp238_;
					_tmp238_ = return_type;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp238_, VALA_TYPE_DELEGATE_TYPE)) {
						ValaDataType* _tmp239_;
						ValaDelegate* _tmp240_;
						ValaDelegate* _tmp241_;
						gboolean _tmp242_;
						gboolean _tmp243_;
						_tmp239_ = return_type;
						_tmp240_ = vala_delegate_type_get_delegate_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp239_, VALA_TYPE_DELEGATE_TYPE, ValaDelegateType));
						_tmp241_ = _tmp240_;
						_tmp242_ = vala_delegate_get_has_target (_tmp241_);
						_tmp243_ = _tmp242_;
						_tmp237_ = _tmp243_;
					} else {
						_tmp237_ = FALSE;
					}
					if (_tmp237_) {
						ValaCCodeFunction* _tmp244_;
						ValaCCodeFunction* _tmp245_;
						gchar* _tmp246_;
						gchar* _tmp247_;
						ValaCCodeIdentifier* _tmp248_;
						ValaCCodeIdentifier* _tmp249_;
						ValaCCodeUnaryExpression* _tmp250_;
						ValaCCodeUnaryExpression* _tmp251_;
						ValaCCodeIdentifier* _tmp252_;
						gchar* _tmp253_;
						gchar* _tmp254_;
						ValaCCodeMemberAccess* _tmp255_;
						ValaCCodeMemberAccess* _tmp256_;
						_tmp244_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp245_ = _tmp244_;
						_tmp246_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
						_tmp247_ = _tmp246_;
						_tmp248_ = vala_ccode_identifier_new (_tmp247_);
						_tmp249_ = _tmp248_;
						_tmp250_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp249_);
						_tmp251_ = _tmp250_;
						_tmp252_ = data_var;
						_tmp253_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result");
						_tmp254_ = _tmp253_;
						_tmp255_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp252_, _tmp254_);
						_tmp256_ = _tmp255_;
						vala_ccode_function_add_assignment (_tmp245_, (ValaCCodeExpression*) _tmp251_, (ValaCCodeExpression*) _tmp256_);
						_vala_ccode_node_unref0 (_tmp256_);
						_g_free0 (_tmp254_);
						_vala_ccode_node_unref0 (_tmp251_);
						_vala_ccode_node_unref0 (_tmp249_);
						_g_free0 (_tmp247_);
					}
				}
				_tmp258_ = return_type;
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp258_, VALA_TYPE_VALUE_TYPE)) {
					_tmp257_ = TRUE;
				} else {
					ValaDataType* _tmp259_;
					gboolean _tmp260_;
					gboolean _tmp261_;
					_tmp259_ = return_type;
					_tmp260_ = vala_data_type_get_nullable (_tmp259_);
					_tmp261_ = _tmp260_;
					_tmp257_ = _tmp261_;
				}
				if (_tmp257_) {
					ValaCCodeFunction* _tmp262_;
					ValaCCodeFunction* _tmp263_;
					ValaCCodeIdentifier* _tmp264_;
					ValaCCodeMemberAccess* _tmp265_;
					ValaCCodeMemberAccess* _tmp266_;
					ValaCCodeConstant* _tmp267_;
					ValaCCodeConstant* _tmp268_;
					_tmp262_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp263_ = _tmp262_;
					_tmp264_ = data_var;
					_tmp265_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp264_, "result");
					_tmp266_ = _tmp265_;
					_tmp267_ = vala_ccode_constant_new ("NULL");
					_tmp268_ = _tmp267_;
					vala_ccode_function_add_assignment (_tmp263_, (ValaCCodeExpression*) _tmp266_, (ValaCCodeExpression*) _tmp268_);
					_vala_ccode_node_unref0 (_tmp268_);
					_vala_ccode_node_unref0 (_tmp266_);
				}
				_tmp269_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp270_ = _tmp269_;
				_tmp271_ = vala_ccode_identifier_new ("result");
				_tmp272_ = _tmp271_;
				vala_ccode_function_add_return (_tmp270_, (ValaCCodeExpression*) _tmp272_);
				_vala_ccode_node_unref0 (_tmp272_);
			}
		}
	}
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp273_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp274_ = finishfunc;
	vala_ccode_file_add_function (_tmp273_, _tmp274_);
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_vala_ccode_node_unref0 (ccall);
	_vala_ccode_node_unref0 (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* dataname = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ValaCCodeFunction* readyfunc = NULL;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaCCodeFunction* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	ValaCCodeFunction* _tmp19_;
	ValaCCodeParameter* _tmp20_;
	ValaCCodeParameter* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeParameter* _tmp24_;
	ValaCCodeFunction* _tmp25_;
	ValaCCodeParameter* _tmp26_;
	ValaCCodeParameter* _tmp27_;
	ValaCCodeFunction* _tmp28_;
	ValaCCodeIdentifier* data_var = NULL;
	ValaCCodeIdentifier* _tmp29_;
	ValaCCodeFunction* _tmp30_;
	ValaCCodeFunction* _tmp31_;
	const gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	ValaCCodeVariableDeclarator* _tmp35_;
	ValaCCodeVariableDeclarator* _tmp36_;
	ValaCCodeFunction* _tmp37_;
	ValaCCodeFunction* _tmp38_;
	ValaCCodeIdentifier* _tmp39_;
	ValaCCodeIdentifier* _tmp40_;
	ValaCCodeIdentifier* _tmp41_;
	ValaCCodeFunction* _tmp42_;
	ValaCCodeFunction* _tmp43_;
	ValaCCodeIdentifier* _tmp44_;
	ValaCCodeMemberAccess* _tmp45_;
	ValaCCodeMemberAccess* _tmp46_;
	ValaCCodeIdentifier* _tmp47_;
	ValaCCodeIdentifier* _tmp48_;
	ValaCCodeFunction* _tmp49_;
	ValaCCodeFunction* _tmp50_;
	ValaCCodeIdentifier* _tmp51_;
	ValaCCodeMemberAccess* _tmp52_;
	ValaCCodeMemberAccess* _tmp53_;
	ValaCCodeIdentifier* _tmp54_;
	ValaCCodeIdentifier* _tmp55_;
	ValaCCodeFunctionCall* ccall = NULL;
	gchar* _tmp56_;
	gchar* _tmp57_;
	gchar* _tmp58_;
	gchar* _tmp59_;
	ValaCCodeIdentifier* _tmp60_;
	ValaCCodeIdentifier* _tmp61_;
	ValaCCodeFunctionCall* _tmp62_;
	ValaCCodeFunctionCall* _tmp63_;
	ValaCCodeFunctionCall* _tmp64_;
	ValaCCodeIdentifier* _tmp65_;
	ValaCCodeFunction* _tmp66_;
	ValaCCodeFunction* _tmp67_;
	ValaCCodeFunctionCall* _tmp68_;
	ValaCCodeFunction* _tmp69_;
	ValaCCodeFunction* _tmp70_;
	ValaCCodeModifiers _tmp71_;
	ValaCCodeModifiers _tmp72_;
	ValaCCodeFile* _tmp73_;
	ValaCCodeFunction* _tmp74_;
	ValaCCodeFile* _tmp75_;
	ValaCCodeFunction* _tmp76_;
	ValaCCodeFunction* _tmp77_;
	const gchar* _tmp78_;
	const gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* result;
	self = (ValaGAsyncModule*) base;
	g_return_val_if_fail (m != NULL, NULL);
	_tmp0_ = vala_get_ccode_name ((ValaCodeNode*) 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_get_ccode_name ((ValaCodeNode*) 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_ = readyfunc;
	_tmp13_ = vala_ccode_function_get_name (_tmp12_);
	_tmp14_ = _tmp13_;
	if (!vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp14_)) {
		ValaCCodeFunction* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp15_ = readyfunc;
		_tmp16_ = vala_ccode_function_get_name (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_strdup (_tmp17_);
		result = _tmp18_;
		_vala_ccode_node_unref0 (readyfunc);
		_g_free0 (dataname);
		return result;
	}
	_tmp19_ = readyfunc;
	_tmp20_ = vala_ccode_parameter_new ("source_object", "GObject*");
	_tmp21_ = _tmp20_;
	vala_ccode_function_add_parameter (_tmp19_, _tmp21_);
	_vala_ccode_node_unref0 (_tmp21_);
	_tmp22_ = readyfunc;
	_tmp23_ = vala_ccode_parameter_new ("_res_", "GAsyncResult*");
	_tmp24_ = _tmp23_;
	vala_ccode_function_add_parameter (_tmp22_, _tmp24_);
	_vala_ccode_node_unref0 (_tmp24_);
	_tmp25_ = readyfunc;
	_tmp26_ = vala_ccode_parameter_new ("_user_data_", "gpointer");
	_tmp27_ = _tmp26_;
	vala_ccode_function_add_parameter (_tmp25_, _tmp27_);
	_vala_ccode_node_unref0 (_tmp27_);
	_tmp28_ = readyfunc;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp28_);
	_tmp29_ = vala_ccode_identifier_new ("_data_");
	data_var = _tmp29_;
	_tmp30_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp31_ = _tmp30_;
	_tmp32_ = dataname;
	_tmp33_ = g_strconcat (_tmp32_, "*", NULL);
	_tmp34_ = _tmp33_;
	_tmp35_ = vala_ccode_variable_declarator_new ("_data_", NULL, NULL);
	_tmp36_ = _tmp35_;
	vala_ccode_function_add_declaration (_tmp31_, _tmp34_, (ValaCCodeDeclarator*) _tmp36_, 0);
	_vala_ccode_node_unref0 (_tmp36_);
	_g_free0 (_tmp34_);
	_tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp38_ = _tmp37_;
	_tmp39_ = data_var;
	_tmp40_ = vala_ccode_identifier_new ("_user_data_");
	_tmp41_ = _tmp40_;
	vala_ccode_function_add_assignment (_tmp38_, (ValaCCodeExpression*) _tmp39_, (ValaCCodeExpression*) _tmp41_);
	_vala_ccode_node_unref0 (_tmp41_);
	_tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp43_ = _tmp42_;
	_tmp44_ = data_var;
	_tmp45_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp44_, "_source_object_");
	_tmp46_ = _tmp45_;
	_tmp47_ = vala_ccode_identifier_new ("source_object");
	_tmp48_ = _tmp47_;
	vala_ccode_function_add_assignment (_tmp43_, (ValaCCodeExpression*) _tmp46_, (ValaCCodeExpression*) _tmp48_);
	_vala_ccode_node_unref0 (_tmp48_);
	_vala_ccode_node_unref0 (_tmp46_);
	_tmp49_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp50_ = _tmp49_;
	_tmp51_ = data_var;
	_tmp52_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp51_, "_res_");
	_tmp53_ = _tmp52_;
	_tmp54_ = vala_ccode_identifier_new ("_res_");
	_tmp55_ = _tmp54_;
	vala_ccode_function_add_assignment (_tmp50_, (ValaCCodeExpression*) _tmp53_, (ValaCCodeExpression*) _tmp55_);
	_vala_ccode_node_unref0 (_tmp55_);
	_vala_ccode_node_unref0 (_tmp53_);
	_tmp56_ = vala_get_ccode_real_name ((ValaSymbol*) m);
	_tmp57_ = _tmp56_;
	_tmp58_ = g_strconcat (_tmp57_, "_co", NULL);
	_tmp59_ = _tmp58_;
	_tmp60_ = vala_ccode_identifier_new (_tmp59_);
	_tmp61_ = _tmp60_;
	_tmp62_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp61_);
	_tmp63_ = _tmp62_;
	_vala_ccode_node_unref0 (_tmp61_);
	_g_free0 (_tmp59_);
	_g_free0 (_tmp57_);
	ccall = _tmp63_;
	_tmp64_ = ccall;
	_tmp65_ = data_var;
	vala_ccode_function_call_add_argument (_tmp64_, (ValaCCodeExpression*) _tmp65_);
	_tmp66_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp67_ = _tmp66_;
	_tmp68_ = ccall;
	vala_ccode_function_add_expression (_tmp67_, (ValaCCodeExpression*) _tmp68_);
	_tmp69_ = readyfunc;
	_tmp70_ = readyfunc;
	_tmp71_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp70_);
	_tmp72_ = _tmp71_;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp70_, _tmp72_ | VALA_CCODE_MODIFIERS_STATIC);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp73_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp74_ = readyfunc;
	vala_ccode_file_add_function_declaration (_tmp73_, _tmp74_);
	_tmp75_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp76_ = readyfunc;
	vala_ccode_file_add_function (_tmp75_, _tmp76_);
	_tmp77_ = readyfunc;
	_tmp78_ = vala_ccode_function_get_name (_tmp77_);
	_tmp79_ = _tmp78_;
	_tmp80_ = g_strdup (_tmp79_);
	result = _tmp80_;
	_vala_ccode_node_unref0 (ccall);
	_vala_ccode_node_unref0 (data_var);
	_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_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	gboolean _tmp4_;
	ValaDataType* creturn_type = NULL;
	ValaDataType* _tmp7_;
	ValaCCodeFunctionDeclarator* vdeclarator = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeFunctionDeclarator* _tmp10_;
	ValaCCodeFunctionDeclarator* _tmp11_;
	ValaHashMap* cparam_map = NULL;
	GHashFunc _tmp12_;
	GEqualFunc _tmp13_;
	GEqualFunc _tmp14_;
	ValaHashMap* _tmp15_;
	ValaHashMap* _tmp16_;
	ValaCCodeFunction* _tmp17_;
	ValaCCodeFunction* _tmp18_;
	ValaCCodeFunctionDeclarator* _tmp19_;
	ValaCCodeDeclaration* vdecl = NULL;
	ValaCCodeDeclaration* _tmp20_;
	ValaCCodeDeclaration* _tmp21_;
	ValaCCodeFunctionDeclarator* _tmp22_;
	ValaCCodeDeclaration* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	ValaCCodeFunctionDeclarator* _tmp26_;
	GHashFunc _tmp27_;
	GEqualFunc _tmp28_;
	GEqualFunc _tmp29_;
	ValaHashMap* _tmp30_;
	ValaHashMap* _tmp31_;
	ValaCCodeFunction* _tmp32_;
	ValaCCodeFunction* _tmp33_;
	ValaCCodeFunctionDeclarator* _tmp34_;
	ValaDataType* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	ValaCCodeDeclaration* _tmp38_;
	ValaCCodeDeclaration* _tmp39_;
	ValaCCodeFunctionDeclarator* _tmp40_;
	ValaCCodeDeclaration* _tmp41_;
	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);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		VALA_GTYPE_MODULE_CLASS (vala_gasync_module_parent_class)->generate_virtual_method_declaration ((ValaGTypeModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), m, decl_space, type_struct);
		return;
	}
	_tmp3_ = vala_method_get_is_abstract (m);
	_tmp4_ = _tmp3_;
	if (!_tmp4_) {
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp5_ = vala_method_get_is_virtual (m);
		_tmp6_ = _tmp5_;
		_tmp2_ = !_tmp6_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		return;
	}
	_tmp7_ = vala_ccode_base_module_get_callable_creturn_type ((ValaCallable*) m);
	creturn_type = _tmp7_;
	_tmp8_ = vala_get_ccode_vfunc_name (m);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_ccode_function_declarator_new (_tmp9_);
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	vdeclarator = _tmp11_;
	_tmp12_ = g_direct_hash;
	_tmp13_ = g_direct_equal;
	_tmp14_ = g_direct_equal;
	_tmp15_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp12_, _tmp13_, _tmp14_);
	cparam_map = _tmp15_;
	_tmp16_ = cparam_map;
	_tmp17_ = vala_ccode_function_new ("fake", "void");
	_tmp18_ = _tmp17_;
	_tmp19_ = vdeclarator;
	vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) _tmp16_, _tmp18_, _tmp19_, NULL, NULL, 1);
	_vala_ccode_node_unref0 (_tmp18_);
	_tmp20_ = vala_ccode_declaration_new ("void");
	vdecl = _tmp20_;
	_tmp21_ = vdecl;
	_tmp22_ = vdeclarator;
	vala_ccode_declaration_add_declarator (_tmp21_, (ValaCCodeDeclarator*) _tmp22_);
	_tmp23_ = vdecl;
	vala_ccode_struct_add_declaration (type_struct, _tmp23_);
	_tmp24_ = vala_get_ccode_finish_vfunc_name (m);
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_ccode_function_declarator_new (_tmp25_);
	_vala_ccode_node_unref0 (vdeclarator);
	vdeclarator = _tmp26_;
	_g_free0 (_tmp25_);
	_tmp27_ = g_direct_hash;
	_tmp28_ = g_direct_equal;
	_tmp29_ = g_direct_equal;
	_tmp30_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp27_, _tmp28_, _tmp29_);
	_vala_map_unref0 (cparam_map);
	cparam_map = _tmp30_;
	_tmp31_ = cparam_map;
	_tmp32_ = vala_ccode_function_new ("fake", "void");
	_tmp33_ = _tmp32_;
	_tmp34_ = vdeclarator;
	vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) _tmp31_, _tmp33_, _tmp34_, NULL, NULL, 2);
	_vala_ccode_node_unref0 (_tmp33_);
	_tmp35_ = creturn_type;
	_tmp36_ = vala_get_ccode_name ((ValaCodeNode*) _tmp35_);
	_tmp37_ = _tmp36_;
	_tmp38_ = vala_ccode_declaration_new (_tmp37_);
	_vala_ccode_node_unref0 (vdecl);
	vdecl = _tmp38_;
	_g_free0 (_tmp37_);
	_tmp39_ = vdecl;
	_tmp40_ = vdeclarator;
	vala_ccode_declaration_add_declarator (_tmp39_, (ValaCCodeDeclarator*) _tmp40_);
	_tmp41_ = vdecl;
	vala_ccode_struct_add_declaration (type_struct, _tmp41_);
	_vala_ccode_node_unref0 (vdecl);
	_vala_map_unref0 (cparam_map);
	_vala_ccode_node_unref0 (vdeclarator);
	_vala_code_node_unref0 (creturn_type);
}

static void
vala_gasync_module_real_visit_yield_statement (ValaCodeVisitor* base,
                                               ValaYieldStatement* stmt)
{
	ValaGAsyncModule * self;
	gint state = 0;
	ValaCCodeBaseModuleEmitContext* _tmp0_;
	gint _tmp1_;
	ValaCCodeFunction* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	ValaCCodeIdentifier* _tmp4_;
	ValaCCodeIdentifier* _tmp5_;
	ValaCCodeMemberAccess* _tmp6_;
	ValaCCodeMemberAccess* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeConstant* _tmp10_;
	ValaCCodeConstant* _tmp11_;
	ValaCCodeFunction* _tmp12_;
	ValaCCodeFunction* _tmp13_;
	ValaCCodeConstant* _tmp14_;
	ValaCCodeConstant* _tmp15_;
	ValaCCodeFunction* _tmp16_;
	ValaCCodeFunction* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	ValaCCodeFunction* _tmp20_;
	ValaCCodeFunction* _tmp21_;
	ValaCCodeEmptyStatement* _tmp22_;
	ValaCCodeEmptyStatement* _tmp23_;
	self = (ValaGAsyncModule*) base;
	g_return_if_fail (stmt != NULL);
	if (!vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self)) {
		return;
	}
	_tmp0_ = ((ValaCCodeBaseModule*) self)->emit_context;
	_tmp1_ = _tmp0_->next_coroutine_state;
	_tmp0_->next_coroutine_state = _tmp1_ + 1;
	state = _tmp1_;
	_tmp2_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp3_ = _tmp2_;
	_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_ = _tmp12_;
	_tmp14_ = vala_ccode_constant_new ("FALSE");
	_tmp15_ = _tmp14_;
	vala_ccode_function_add_return (_tmp13_, (ValaCCodeExpression*) _tmp15_);
	_vala_ccode_node_unref0 (_tmp15_);
	_tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strdup_printf ("_state_%d", state);
	_tmp19_ = _tmp18_;
	vala_ccode_function_add_label (_tmp17_, _tmp19_);
	_g_free0 (_tmp19_);
	_tmp20_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_empty_statement_new ();
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_statement (_tmp21_, (ValaCCodeNode*) _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
}

static void
vala_gasync_module_real_return_with_exception (ValaGErrorModule* base,
                                               ValaCCodeExpression* error_expr)
{
	ValaGAsyncModule * self;
	ValaCCodeMemberAccess* async_result_expr = NULL;
	ValaCCodeIdentifier* _tmp0_;
	ValaCCodeIdentifier* _tmp1_;
	ValaCCodeMemberAccess* _tmp2_;
	ValaCCodeMemberAccess* _tmp3_;
	ValaCCodeFunctionCall* set_error = NULL;
	ValaCCodeIdentifier* _tmp4_;
	ValaCCodeIdentifier* _tmp5_;
	ValaCCodeFunctionCall* _tmp6_;
	ValaCCodeFunctionCall* _tmp7_;
	ValaCCodeMemberAccess* _tmp8_;
	ValaCCodeFunctionCall* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaCCodeFunctionCall* _tmp12_;
	ValaSymbol* _tmp13_;
	ValaSymbol* _tmp14_;
	ValaMethod* _tmp15_;
	ValaMethod* _tmp16_;
	ValaCCodeFunctionCall* unref = NULL;
	ValaCCodeIdentifier* _tmp17_;
	ValaCCodeIdentifier* _tmp18_;
	ValaCCodeFunctionCall* _tmp19_;
	ValaCCodeFunctionCall* _tmp20_;
	ValaCCodeFunctionCall* _tmp21_;
	ValaCCodeMemberAccess* _tmp22_;
	ValaCCodeFunction* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	ValaCCodeFunctionCall* _tmp25_;
	ValaCCodeFunction* _tmp26_;
	ValaCCodeFunction* _tmp27_;
	ValaCCodeConstant* _tmp28_;
	ValaCCodeConstant* _tmp29_;
	self = (ValaGAsyncModule*) base;
	g_return_if_fail (error_expr != NULL);
	if (!vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self)) {
		VALA_GERROR_MODULE_CLASS (vala_gasync_module_parent_class)->return_with_exception ((ValaGErrorModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), error_expr);
		return;
	}
	_tmp0_ = vala_ccode_identifier_new ("_data_");
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp1_, "_async_result");
	_tmp3_ = _tmp2_;
	_vala_ccode_node_unref0 (_tmp1_);
	async_result_expr = _tmp3_;
	set_error = NULL;
	_tmp4_ = vala_ccode_identifier_new ("g_task_return_error");
	_tmp5_ = _tmp4_;
	_tmp6_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp5_);
	_vala_ccode_node_unref0 (set_error);
	set_error = _tmp6_;
	_vala_ccode_node_unref0 (_tmp5_);
	_tmp7_ = set_error;
	_tmp8_ = async_result_expr;
	vala_ccode_function_call_add_argument (_tmp7_, (ValaCCodeExpression*) _tmp8_);
	_tmp9_ = set_error;
	vala_ccode_function_call_add_argument (_tmp9_, error_expr);
	_tmp10_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = set_error;
	vala_ccode_function_add_expression (_tmp11_, (ValaCCodeExpression*) _tmp12_);
	_tmp13_ = vala_ccode_base_module_get_current_symbol ((ValaCCodeBaseModule*) self);
	_tmp14_ = _tmp13_;
	vala_ccode_base_module_append_local_free ((ValaCCodeBaseModule*) self, _tmp14_, NULL, NULL);
	_tmp15_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
	_tmp16_ = _tmp15_;
	vala_ccode_base_module_append_out_param_free ((ValaCCodeBaseModule*) self, _tmp16_);
	_tmp17_ = vala_ccode_identifier_new ("g_object_unref");
	_tmp18_ = _tmp17_;
	_tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp18_);
	_tmp20_ = _tmp19_;
	_vala_ccode_node_unref0 (_tmp18_);
	unref = _tmp20_;
	_tmp21_ = unref;
	_tmp22_ = async_result_expr;
	vala_ccode_function_call_add_argument (_tmp21_, (ValaCCodeExpression*) _tmp22_);
	_tmp23_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp24_ = _tmp23_;
	_tmp25_ = unref;
	vala_ccode_function_add_expression (_tmp24_, (ValaCCodeExpression*) _tmp25_);
	_tmp26_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp27_ = _tmp26_;
	_tmp28_ = vala_ccode_constant_new ("FALSE");
	_tmp29_ = _tmp28_;
	vala_ccode_function_add_return (_tmp27_, (ValaCCodeExpression*) _tmp29_);
	_vala_ccode_node_unref0 (_tmp29_);
	_vala_ccode_node_unref0 (unref);
	_vala_ccode_node_unref0 (set_error);
	_vala_ccode_node_unref0 (async_result_expr);
}

static void
vala_gasync_module_real_visit_return_statement (ValaCodeVisitor* base,
                                                ValaReturnStatement* stmt)
{
	ValaGAsyncModule * self;
	self = (ValaGAsyncModule*) base;
	g_return_if_fail (stmt != NULL);
	VALA_CODE_VISITOR_CLASS (vala_gasync_module_parent_class)->visit_return_statement ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), stmt);
	if (!vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self)) {
		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_;
	gboolean _tmp1_;
	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);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		vala_ccode_file_add_include (decl_space, "gio/gio.h", FALSE);
		if (direction == 1) {
			ValaCCodeParameter* _tmp2_;
			ValaCCodeParameter* _tmp3_;
			ValaCCodeParameter* _tmp4_;
			ValaCCodeParameter* _tmp5_;
			_tmp2_ = vala_ccode_parameter_new ("_callback_", "GAsyncReadyCallback");
			_tmp3_ = _tmp2_;
			vala_map_set (cparam_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) -1, FALSE)), _tmp3_);
			_vala_ccode_node_unref0 (_tmp3_);
			_tmp4_ = vala_ccode_parameter_new ("_user_data_", "gpointer");
			_tmp5_ = _tmp4_;
			vala_map_set (cparam_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, -0.9, FALSE)), _tmp5_);
			_vala_ccode_node_unref0 (_tmp5_);
			if (carg_map != NULL) {
				ValaCCodeIdentifier* _tmp6_;
				ValaCCodeIdentifier* _tmp7_;
				ValaCCodeIdentifier* _tmp8_;
				ValaCCodeIdentifier* _tmp9_;
				_tmp6_ = vala_ccode_identifier_new ("_callback_");
				_tmp7_ = _tmp6_;
				vala_map_set (carg_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (gdouble) -1, FALSE)), (ValaCCodeExpression*) _tmp7_);
				_vala_ccode_node_unref0 (_tmp7_);
				_tmp8_ = vala_ccode_identifier_new ("_user_data_");
				_tmp9_ = _tmp8_;
				vala_map_set (carg_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, -0.9, FALSE)), (ValaCCodeExpression*) _tmp9_);
				_vala_ccode_node_unref0 (_tmp9_);
			}
		} else {
			if (direction == 2) {
				ValaCCodeParameter* _tmp10_;
				ValaCCodeParameter* _tmp11_;
				_tmp10_ = vala_ccode_parameter_new ("_res_", "GAsyncResult*");
				_tmp11_ = _tmp10_;
				vala_map_set (cparam_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_get_ccode_async_result_pos (m), FALSE)), _tmp11_);
				_vala_ccode_node_unref0 (_tmp11_);
				if (carg_map != NULL) {
					ValaCCodeIdentifier* _tmp12_;
					ValaCCodeIdentifier* _tmp13_;
					_tmp12_ = vala_ccode_identifier_new ("_res_");
					_tmp13_ = _tmp12_;
					vala_map_set (carg_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_get_ccode_async_result_pos (m), FALSE)), (ValaCCodeExpression*) _tmp13_);
					_vala_ccode_node_unref0 (_tmp13_);
				}
			}
		}
	}
	VALA_CCODE_BASE_MODULE_CLASS (vala_gasync_module_parent_class)->generate_cparameters ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GTK_MODULE, ValaGtkModule), m, decl_space, cparam_map, func, vdeclarator, carg_map, vcall, direction);
}

gchar*
vala_gasync_module_generate_async_callback_wrapper (ValaGAsyncModule* self)
{
	gchar* async_callback_wrapper_func = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	ValaCCodeFunction* function = NULL;
	const gchar* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	ValaCCodeFunction* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaCCodeParameter* _tmp6_;
	ValaCCodeParameter* _tmp7_;
	ValaCCodeFunction* _tmp8_;
	ValaCCodeParameter* _tmp9_;
	ValaCCodeParameter* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaCCodeParameter* _tmp12_;
	ValaCCodeParameter* _tmp13_;
	ValaCCodeFunction* _tmp14_;
	ValaCCodeFunctionCall* res_ref = NULL;
	ValaCCodeIdentifier* _tmp15_;
	ValaCCodeIdentifier* _tmp16_;
	ValaCCodeFunctionCall* _tmp17_;
	ValaCCodeFunctionCall* _tmp18_;
	ValaCCodeFunctionCall* _tmp19_;
	ValaCCodeIdentifier* _tmp20_;
	ValaCCodeIdentifier* _tmp21_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaCCodeIdentifier* _tmp22_;
	ValaCCodeIdentifier* _tmp23_;
	ValaCCodeFunctionCall* _tmp24_;
	ValaCCodeFunctionCall* _tmp25_;
	ValaCCodeIdentifier* _tmp26_;
	ValaCCodeIdentifier* _tmp27_;
	ValaCCodeFunctionCall* _tmp28_;
	ValaCCodeFunctionCall* _tmp29_;
	ValaCCodeFunctionCall* _tmp30_;
	ValaCCodeIdentifier* _tmp31_;
	ValaCCodeIdentifier* _tmp32_;
	ValaCCodeFunction* _tmp33_;
	ValaCCodeFunction* _tmp34_;
	ValaCCodeFunctionCall* _tmp35_;
	ValaCCodeIdentifier* _tmp36_;
	ValaCCodeIdentifier* _tmp37_;
	ValaCCodeFunctionCall* _tmp38_;
	ValaCCodeFunctionCall* _tmp39_;
	ValaCCodeIdentifier* _tmp40_;
	ValaCCodeIdentifier* _tmp41_;
	ValaCCodeFunction* _tmp42_;
	ValaCCodeFunction* _tmp43_;
	ValaCCodeFunctionCall* _tmp44_;
	ValaCCodeFile* _tmp45_;
	ValaCCodeFunction* _tmp46_;
	ValaCCodeFile* _tmp47_;
	ValaCCodeFunction* _tmp48_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("_vala_g_async_ready_callback");
	async_callback_wrapper_func = _tmp0_;
	_tmp1_ = async_callback_wrapper_func;
	if (!vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp1_)) {
		result = async_callback_wrapper_func;
		return result;
	}
	_tmp2_ = async_callback_wrapper_func;
	_tmp3_ = vala_ccode_function_new (_tmp2_, "void");
	function = _tmp3_;
	_tmp4_ = function;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp4_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp5_ = function;
	_tmp6_ = vala_ccode_parameter_new ("*source_object", "GObject");
	_tmp7_ = _tmp6_;
	vala_ccode_function_add_parameter (_tmp5_, _tmp7_);
	_vala_ccode_node_unref0 (_tmp7_);
	_tmp8_ = function;
	_tmp9_ = vala_ccode_parameter_new ("*res", "GAsyncResult");
	_tmp10_ = _tmp9_;
	vala_ccode_function_add_parameter (_tmp8_, _tmp10_);
	_vala_ccode_node_unref0 (_tmp10_);
	_tmp11_ = function;
	_tmp12_ = vala_ccode_parameter_new ("*user_data", "void");
	_tmp13_ = _tmp12_;
	vala_ccode_function_add_parameter (_tmp11_, _tmp13_);
	_vala_ccode_node_unref0 (_tmp13_);
	_tmp14_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp14_);
	_tmp15_ = vala_ccode_identifier_new ("g_object_ref");
	_tmp16_ = _tmp15_;
	_tmp17_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp16_);
	_tmp18_ = _tmp17_;
	_vala_ccode_node_unref0 (_tmp16_);
	res_ref = _tmp18_;
	_tmp19_ = res_ref;
	_tmp20_ = vala_ccode_identifier_new ("res");
	_tmp21_ = _tmp20_;
	vala_ccode_function_call_add_argument (_tmp19_, (ValaCCodeExpression*) _tmp21_);
	_vala_ccode_node_unref0 (_tmp21_);
	ccall = NULL;
	_tmp22_ = vala_ccode_identifier_new ("g_task_return_pointer");
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp23_);
	_vala_ccode_node_unref0 (ccall);
	ccall = _tmp24_;
	_vala_ccode_node_unref0 (_tmp23_);
	_tmp25_ = ccall;
	_tmp26_ = vala_ccode_identifier_new ("user_data");
	_tmp27_ = _tmp26_;
	vala_ccode_function_call_add_argument (_tmp25_, (ValaCCodeExpression*) _tmp27_);
	_vala_ccode_node_unref0 (_tmp27_);
	_tmp28_ = ccall;
	_tmp29_ = res_ref;
	vala_ccode_function_call_add_argument (_tmp28_, (ValaCCodeExpression*) _tmp29_);
	_tmp30_ = ccall;
	_tmp31_ = vala_ccode_identifier_new ("g_object_unref");
	_tmp32_ = _tmp31_;
	vala_ccode_function_call_add_argument (_tmp30_, (ValaCCodeExpression*) _tmp32_);
	_vala_ccode_node_unref0 (_tmp32_);
	_tmp33_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp34_ = _tmp33_;
	_tmp35_ = ccall;
	vala_ccode_function_add_expression (_tmp34_, (ValaCCodeExpression*) _tmp35_);
	_tmp36_ = vala_ccode_identifier_new ("g_object_unref");
	_tmp37_ = _tmp36_;
	_tmp38_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp37_);
	_vala_ccode_node_unref0 (ccall);
	ccall = _tmp38_;
	_vala_ccode_node_unref0 (_tmp37_);
	_tmp39_ = ccall;
	_tmp40_ = vala_ccode_identifier_new ("user_data");
	_tmp41_ = _tmp40_;
	vala_ccode_function_call_add_argument (_tmp39_, (ValaCCodeExpression*) _tmp41_);
	_vala_ccode_node_unref0 (_tmp41_);
	_tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp43_ = _tmp42_;
	_tmp44_ = ccall;
	vala_ccode_function_add_expression (_tmp43_, (ValaCCodeExpression*) _tmp44_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp45_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp46_ = function;
	vala_ccode_file_add_function_declaration (_tmp45_, _tmp46_);
	_tmp47_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp48_ = function;
	vala_ccode_file_add_function (_tmp47_, _tmp48_);
	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_gtk_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,
                               gpointer klass_data)
{
	vala_gasync_module_parent_class = g_type_class_peek_parent (klass);
	((ValaCCodeBaseModuleClass *) klass)->generate_method_declaration = (gboolean (*) (ValaCCodeBaseModule*, ValaMethod*, ValaCCodeFile*)) vala_gasync_module_real_generate_method_declaration;
	((ValaCodeVisitorClass *) klass)->visit_method = (void (*) (ValaCodeVisitor*, ValaMethod*)) vala_gasync_module_real_visit_method;
	((ValaCodeVisitorClass *) klass)->visit_creation_method = (void (*) (ValaCodeVisitor*, ValaCreationMethod*)) vala_gasync_module_real_visit_creation_method;
	((ValaCCodeBaseModuleClass *) klass)->generate_ready_function = (gchar* (*) (ValaCCodeBaseModule*, ValaMethod*)) vala_gasync_module_real_generate_ready_function;
	((ValaGTypeModuleClass *) klass)->generate_virtual_method_declaration = (void (*) (ValaGTypeModule*, ValaMethod*, ValaCCodeFile*, ValaCCodeStruct*)) vala_gasync_module_real_generate_virtual_method_declaration;
	((ValaCodeVisitorClass *) klass)->visit_yield_statement = (void (*) (ValaCodeVisitor*, ValaYieldStatement*)) vala_gasync_module_real_visit_yield_statement;
	((ValaGErrorModuleClass *) klass)->return_with_exception = (void (*) (ValaGErrorModule*, ValaCCodeExpression*)) vala_gasync_module_real_return_with_exception;
	((ValaCodeVisitorClass *) klass)->visit_return_statement = (void (*) (ValaCodeVisitor*, ValaReturnStatement*)) vala_gasync_module_real_visit_return_statement;
	((ValaCCodeBaseModuleClass *) klass)->generate_cparameters = (void (*) (ValaCCodeBaseModule*, ValaMethod*, ValaCCodeFile*, ValaMap*, ValaCCodeFunction*, ValaCCodeFunctionDeclarator*, ValaMap*, ValaCCodeFunctionCall*, gint)) vala_gasync_module_real_generate_cparameters;
}

static void
vala_gasync_module_instance_init (ValaGAsyncModule * self,
                                  gpointer klass)
{
}

static GType
vala_gasync_module_get_type_once (void)
{
	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_GTK_MODULE, "ValaGAsyncModule", &g_define_type_info, 0);
	return vala_gasync_module_type_id;
}

GType
vala_gasync_module_get_type (void)
{
	static volatile gsize vala_gasync_module_type_id__once = 0;
	if (g_once_init_enter (&vala_gasync_module_type_id__once)) {
		GType vala_gasync_module_type_id;
		vala_gasync_module_type_id = vala_gasync_module_get_type_once ();
		g_once_init_leave (&vala_gasync_module_type_id__once, vala_gasync_module_type_id);
	}
	return vala_gasync_module_type_id__once;
}

