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

/* valamethod.vala
 *
 * Copyright (C) 2006-2010  Jürg Billeter
 * Copyright (C) 2006-2008  Raffaele Sandrini
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Jürg Billeter <j@bitron.ch>
 *	Raffaele Sandrini <raffaele@sandrini.ch>
 */

#include <glib.h>
#include <glib-object.h>
#include "vala.h"
#include <valagee.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>

#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ValaMethodPrivate {
	ValaList* type_parameters;
	ValaMemberBinding _binding;
	gboolean _is_abstract;
	gboolean _is_virtual;
	gboolean _overrides;
	gboolean _is_inline;
	gboolean _entry_point;
	ValaParameter* _this_parameter;
	ValaSignal* _signal_reference;
	gboolean _closure;
	gboolean _coroutine;
	gboolean _is_async_callback;
	ValaList* parameters;
	ValaList* preconditions;
	ValaList* postconditions;
	ValaDataType* _return_type;
	ValaMethod* _base_method;
	ValaMethod* _base_interface_method;
	ValaDataType* _base_interface_type;
	gboolean base_methods_valid;
	ValaMethod* callback_method;
	ValaMethod* end_method;
	ValaList* captured_variables;
};


static gpointer vala_method_parent_class = NULL;
static ValaList* vala_method__empty_expression_list;
static ValaList* vala_method__empty_expression_list = NULL;
static ValaList* vala_method__empty_type_parameter_list;
static ValaList* vala_method__empty_type_parameter_list = NULL;
static ValaCallableIface * vala_method_vala_callable_parent_iface = NULL;

#define VALA_METHOD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_METHOD, ValaMethodPrivate))
static void vala_method_real_add_parameter (ValaCallable* base, ValaParameter* param);
static ValaList* vala_method_real_get_parameters (ValaCallable* base);
static void vala_method_real_accept (ValaCodeNode* base, ValaCodeVisitor* visitor);
static void vala_method_real_accept_children (ValaCodeNode* base, ValaCodeVisitor* visitor);
static void vala_method_real_replace_type (ValaCodeNode* base, ValaDataType* old_type, ValaDataType* new_type);
static void vala_method_find_base_methods (ValaMethod* self);
static void vala_method_find_base_interface_method (ValaMethod* self, ValaClass* cl);
static void vala_method_find_base_class_method (ValaMethod* self, ValaClass* cl);
static gboolean vala_method_real_check (ValaCodeNode* base, ValaCodeContext* context);
static gboolean vala_method_is_possible_entry_point (ValaMethod* self, ValaCodeContext* context);
static void vala_method_set_entry_point (ValaMethod* self, gboolean value);
static void vala_method_real_get_defined_variables (ValaCodeNode* base, ValaCollection* collection);
static void vala_method_finalize (ValaCodeNode * obj);


/**
 * Creates a new method.
 *
 * @param name              method name
 * @param return_type       method return type
 * @param source_reference  reference to source code
 * @return                  newly created method
 */
ValaMethod* vala_method_construct (GType object_type, const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment) {
	ValaMethod* self = NULL;
	const gchar* _tmp0_;
	ValaSourceReference* _tmp1_;
	ValaComment* _tmp2_;
	ValaDataType* _tmp3_;
	g_return_val_if_fail (return_type != NULL, NULL);
	_tmp0_ = name;
	_tmp1_ = source_reference;
	_tmp2_ = comment;
	self = (ValaMethod*) vala_subroutine_construct (object_type, _tmp0_, _tmp1_, _tmp2_);
	_tmp3_ = return_type;
	vala_callable_set_return_type ((ValaCallable*) self, _tmp3_);
	return self;
}


ValaMethod* vala_method_new (const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment) {
	return vala_method_construct (VALA_TYPE_METHOD, name, return_type, source_reference, comment);
}


/**
 * Appends parameter to this method.
 *
 * @param param a formal parameter
 */
static void vala_method_real_add_parameter (ValaCallable* base, ValaParameter* param) {
	ValaMethod * self;
	ValaList* _tmp0_;
	ValaParameter* _tmp1_;
	ValaScope* _tmp2_;
	ValaScope* _tmp3_;
	ValaParameter* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	ValaParameter* _tmp7_;
	self = (ValaMethod*) base;
	g_return_if_fail (param != NULL);
	_tmp0_ = self->priv->parameters;
	_tmp1_ = param;
	vala_collection_add ((ValaCollection*) _tmp0_, _tmp1_);
	_tmp2_ = vala_symbol_get_scope ((ValaSymbol*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = param;
	_tmp5_ = vala_symbol_get_name ((ValaSymbol*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = param;
	vala_scope_add (_tmp3_, _tmp6_, (ValaSymbol*) _tmp7_);
}


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


static ValaList* vala_method_real_get_parameters (ValaCallable* base) {
	ValaMethod * self;
	ValaList* result = NULL;
	ValaList* _tmp0_;
	ValaList* _tmp1_;
	self = (ValaMethod*) base;
	_tmp0_ = self->priv->parameters;
	_tmp1_ = _vala_iterable_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Remove all parameters from this method.
 */
void vala_method_clear_parameters (ValaMethod* self) {
	ValaList* _tmp19_;
	g_return_if_fail (self != NULL);
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp0_;
		ValaList* _tmp1_;
		gint _param_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _param_index = 0;
		_tmp0_ = self->priv->parameters;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_param_list = _tmp1_;
		_tmp2_ = _param_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_param_size = _tmp4_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaParameter* param = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaParameter* _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp5_ = _param_index;
			_param_index = _tmp5_ + 1;
			_tmp6_ = _param_index;
			_tmp7_ = _param_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _param_list;
			_tmp9_ = _param_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			param = (ValaParameter*) _tmp10_;
			_tmp11_ = param;
			_tmp12_ = vala_parameter_get_ellipsis (_tmp11_);
			_tmp13_ = _tmp12_;
			if (!_tmp13_) {
				ValaScope* _tmp14_;
				ValaScope* _tmp15_;
				ValaParameter* _tmp16_;
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				_tmp14_ = vala_symbol_get_scope ((ValaSymbol*) self);
				_tmp15_ = _tmp14_;
				_tmp16_ = param;
				_tmp17_ = vala_symbol_get_name ((ValaSymbol*) _tmp16_);
				_tmp18_ = _tmp17_;
				vala_scope_remove (_tmp15_, _tmp18_);
			}
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	_tmp19_ = self->priv->parameters;
	vala_collection_clear ((ValaCollection*) _tmp19_);
}


gboolean vala_method_is_variadic (ValaMethod* self) {
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp0_;
		ValaList* _tmp1_;
		gint _param_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _param_index = 0;
		_tmp0_ = self->priv->parameters;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_param_list = _tmp1_;
		_tmp2_ = _param_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_param_size = _tmp4_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaParameter* param = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaParameter* _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp5_ = _param_index;
			_param_index = _tmp5_ + 1;
			_tmp6_ = _param_index;
			_tmp7_ = _param_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _param_list;
			_tmp9_ = _param_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			param = (ValaParameter*) _tmp10_;
			_tmp11_ = param;
			_tmp12_ = vala_parameter_get_ellipsis (_tmp11_);
			_tmp13_ = _tmp12_;
			if (_tmp13_) {
				result = TRUE;
				_vala_code_node_unref0 (param);
				_vala_iterable_unref0 (_param_list);
				return result;
			}
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	result = FALSE;
	return result;
}


static void vala_method_real_accept (ValaCodeNode* base, ValaCodeVisitor* visitor) {
	ValaMethod * self;
	ValaCodeVisitor* _tmp0_;
	self = (ValaMethod*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = visitor;
	vala_code_visitor_visit_method (_tmp0_, self);
}


static void vala_method_real_accept_children (ValaCodeNode* base, ValaCodeVisitor* visitor) {
	ValaMethod * self;
	ValaDataType* _tmp12_;
	ValaDataType* _tmp13_;
	ValaDataType* _tmp17_;
	ValaDataType* _tmp18_;
	ValaLocalVariable* _tmp47_;
	ValaLocalVariable* _tmp48_;
	ValaList* _tmp52_;
	ValaList* _tmp66_;
	ValaBlock* _tmp80_;
	ValaBlock* _tmp81_;
	self = (ValaMethod*) base;
	g_return_if_fail (visitor != NULL);
	{
		ValaList* _p_list = NULL;
		ValaList* _tmp0_;
		gint _p_size = 0;
		ValaList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _p_index = 0;
		_tmp0_ = vala_method_get_type_parameters (self);
		_p_list = _tmp0_;
		_tmp1_ = _p_list;
		_tmp2_ = vala_collection_get_size ((ValaCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_p_size = _tmp3_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			gint _tmp6_;
			ValaTypeParameter* p = NULL;
			ValaList* _tmp7_;
			gint _tmp8_;
			gpointer _tmp9_;
			ValaTypeParameter* _tmp10_;
			ValaCodeVisitor* _tmp11_;
			_tmp4_ = _p_index;
			_p_index = _tmp4_ + 1;
			_tmp5_ = _p_index;
			_tmp6_ = _p_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _p_list;
			_tmp8_ = _p_index;
			_tmp9_ = vala_list_get (_tmp7_, _tmp8_);
			p = (ValaTypeParameter*) _tmp9_;
			_tmp10_ = p;
			_tmp11_ = visitor;
			vala_code_node_accept ((ValaCodeNode*) _tmp10_, _tmp11_);
			_vala_code_node_unref0 (p);
		}
		_vala_iterable_unref0 (_p_list);
	}
	_tmp12_ = vala_method_get_base_interface_type (self);
	_tmp13_ = _tmp12_;
	if (_tmp13_ != NULL) {
		ValaDataType* _tmp14_;
		ValaDataType* _tmp15_;
		ValaCodeVisitor* _tmp16_;
		_tmp14_ = vala_method_get_base_interface_type (self);
		_tmp15_ = _tmp14_;
		_tmp16_ = visitor;
		vala_code_node_accept ((ValaCodeNode*) _tmp15_, _tmp16_);
	}
	_tmp17_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp18_ = _tmp17_;
	if (_tmp18_ != NULL) {
		ValaDataType* _tmp19_;
		ValaDataType* _tmp20_;
		ValaCodeVisitor* _tmp21_;
		_tmp19_ = vala_callable_get_return_type ((ValaCallable*) self);
		_tmp20_ = _tmp19_;
		_tmp21_ = visitor;
		vala_code_node_accept ((ValaCodeNode*) _tmp20_, _tmp21_);
	}
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp22_;
		ValaList* _tmp23_;
		gint _param_size = 0;
		ValaList* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		gint _param_index = 0;
		_tmp22_ = self->priv->parameters;
		_tmp23_ = _vala_iterable_ref0 (_tmp22_);
		_param_list = _tmp23_;
		_tmp24_ = _param_list;
		_tmp25_ = vala_collection_get_size ((ValaCollection*) _tmp24_);
		_tmp26_ = _tmp25_;
		_param_size = _tmp26_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			ValaParameter* param = NULL;
			ValaList* _tmp30_;
			gint _tmp31_;
			gpointer _tmp32_;
			ValaParameter* _tmp33_;
			ValaCodeVisitor* _tmp34_;
			_tmp27_ = _param_index;
			_param_index = _tmp27_ + 1;
			_tmp28_ = _param_index;
			_tmp29_ = _param_size;
			if (!(_tmp28_ < _tmp29_)) {
				break;
			}
			_tmp30_ = _param_list;
			_tmp31_ = _param_index;
			_tmp32_ = vala_list_get (_tmp30_, _tmp31_);
			param = (ValaParameter*) _tmp32_;
			_tmp33_ = param;
			_tmp34_ = visitor;
			vala_code_node_accept ((ValaCodeNode*) _tmp33_, _tmp34_);
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	{
		ValaList* _error_type_list = NULL;
		ValaList* _tmp35_;
		gint _error_type_size = 0;
		ValaList* _tmp36_;
		gint _tmp37_;
		gint _tmp38_;
		gint _error_type_index = 0;
		_tmp35_ = vala_code_node_get_error_types ((ValaCodeNode*) self);
		_error_type_list = _tmp35_;
		_tmp36_ = _error_type_list;
		_tmp37_ = vala_collection_get_size ((ValaCollection*) _tmp36_);
		_tmp38_ = _tmp37_;
		_error_type_size = _tmp38_;
		_error_type_index = -1;
		while (TRUE) {
			gint _tmp39_;
			gint _tmp40_;
			gint _tmp41_;
			ValaDataType* error_type = NULL;
			ValaList* _tmp42_;
			gint _tmp43_;
			gpointer _tmp44_;
			ValaDataType* _tmp45_;
			ValaCodeVisitor* _tmp46_;
			_tmp39_ = _error_type_index;
			_error_type_index = _tmp39_ + 1;
			_tmp40_ = _error_type_index;
			_tmp41_ = _error_type_size;
			if (!(_tmp40_ < _tmp41_)) {
				break;
			}
			_tmp42_ = _error_type_list;
			_tmp43_ = _error_type_index;
			_tmp44_ = vala_list_get (_tmp42_, _tmp43_);
			error_type = (ValaDataType*) _tmp44_;
			_tmp45_ = error_type;
			_tmp46_ = visitor;
			vala_code_node_accept ((ValaCodeNode*) _tmp45_, _tmp46_);
			_vala_code_node_unref0 (error_type);
		}
		_vala_iterable_unref0 (_error_type_list);
	}
	_tmp47_ = vala_subroutine_get_result_var ((ValaSubroutine*) self);
	_tmp48_ = _tmp47_;
	if (_tmp48_ != NULL) {
		ValaLocalVariable* _tmp49_;
		ValaLocalVariable* _tmp50_;
		ValaCodeVisitor* _tmp51_;
		_tmp49_ = vala_subroutine_get_result_var ((ValaSubroutine*) self);
		_tmp50_ = _tmp49_;
		_tmp51_ = visitor;
		vala_code_node_accept ((ValaCodeNode*) _tmp50_, _tmp51_);
	}
	_tmp52_ = self->priv->preconditions;
	if (_tmp52_ != NULL) {
		{
			ValaList* _precondition_list = NULL;
			ValaList* _tmp53_;
			ValaList* _tmp54_;
			gint _precondition_size = 0;
			ValaList* _tmp55_;
			gint _tmp56_;
			gint _tmp57_;
			gint _precondition_index = 0;
			_tmp53_ = self->priv->preconditions;
			_tmp54_ = _vala_iterable_ref0 (_tmp53_);
			_precondition_list = _tmp54_;
			_tmp55_ = _precondition_list;
			_tmp56_ = vala_collection_get_size ((ValaCollection*) _tmp55_);
			_tmp57_ = _tmp56_;
			_precondition_size = _tmp57_;
			_precondition_index = -1;
			while (TRUE) {
				gint _tmp58_;
				gint _tmp59_;
				gint _tmp60_;
				ValaExpression* precondition = NULL;
				ValaList* _tmp61_;
				gint _tmp62_;
				gpointer _tmp63_;
				ValaExpression* _tmp64_;
				ValaCodeVisitor* _tmp65_;
				_tmp58_ = _precondition_index;
				_precondition_index = _tmp58_ + 1;
				_tmp59_ = _precondition_index;
				_tmp60_ = _precondition_size;
				if (!(_tmp59_ < _tmp60_)) {
					break;
				}
				_tmp61_ = _precondition_list;
				_tmp62_ = _precondition_index;
				_tmp63_ = vala_list_get (_tmp61_, _tmp62_);
				precondition = (ValaExpression*) _tmp63_;
				_tmp64_ = precondition;
				_tmp65_ = visitor;
				vala_code_node_accept ((ValaCodeNode*) _tmp64_, _tmp65_);
				_vala_code_node_unref0 (precondition);
			}
			_vala_iterable_unref0 (_precondition_list);
		}
	}
	_tmp66_ = self->priv->postconditions;
	if (_tmp66_ != NULL) {
		{
			ValaList* _postcondition_list = NULL;
			ValaList* _tmp67_;
			ValaList* _tmp68_;
			gint _postcondition_size = 0;
			ValaList* _tmp69_;
			gint _tmp70_;
			gint _tmp71_;
			gint _postcondition_index = 0;
			_tmp67_ = self->priv->postconditions;
			_tmp68_ = _vala_iterable_ref0 (_tmp67_);
			_postcondition_list = _tmp68_;
			_tmp69_ = _postcondition_list;
			_tmp70_ = vala_collection_get_size ((ValaCollection*) _tmp69_);
			_tmp71_ = _tmp70_;
			_postcondition_size = _tmp71_;
			_postcondition_index = -1;
			while (TRUE) {
				gint _tmp72_;
				gint _tmp73_;
				gint _tmp74_;
				ValaExpression* postcondition = NULL;
				ValaList* _tmp75_;
				gint _tmp76_;
				gpointer _tmp77_;
				ValaExpression* _tmp78_;
				ValaCodeVisitor* _tmp79_;
				_tmp72_ = _postcondition_index;
				_postcondition_index = _tmp72_ + 1;
				_tmp73_ = _postcondition_index;
				_tmp74_ = _postcondition_size;
				if (!(_tmp73_ < _tmp74_)) {
					break;
				}
				_tmp75_ = _postcondition_list;
				_tmp76_ = _postcondition_index;
				_tmp77_ = vala_list_get (_tmp75_, _tmp76_);
				postcondition = (ValaExpression*) _tmp77_;
				_tmp78_ = postcondition;
				_tmp79_ = visitor;
				vala_code_node_accept ((ValaCodeNode*) _tmp78_, _tmp79_);
				_vala_code_node_unref0 (postcondition);
			}
			_vala_iterable_unref0 (_postcondition_list);
		}
	}
	_tmp80_ = vala_subroutine_get_body ((ValaSubroutine*) self);
	_tmp81_ = _tmp80_;
	if (_tmp81_ != NULL) {
		ValaBlock* _tmp82_;
		ValaBlock* _tmp83_;
		ValaCodeVisitor* _tmp84_;
		_tmp82_ = vala_subroutine_get_body ((ValaSubroutine*) self);
		_tmp83_ = _tmp82_;
		_tmp84_ = visitor;
		vala_code_node_accept ((ValaCodeNode*) _tmp83_, _tmp84_);
	}
}


/**
 * Checks whether the parameters and return type of this method are
 * compatible with the specified method
 *
 * @param base_method a method
 * @param invalid_match error string about which check failed
 * @return true if the specified method is compatible to this method
 */
gboolean vala_method_compatible (ValaMethod* self, ValaMethod* base_method, gchar* * invalid_match) {
	gchar* _vala_invalid_match = NULL;
	gboolean result = FALSE;
	ValaMethod* _tmp0_;
	ValaMemberBinding _tmp1_;
	ValaMethod* _tmp2_;
	ValaMemberBinding _tmp3_;
	ValaObjectType* object_type = NULL;
	ValaSymbol* _tmp5_;
	ValaSymbol* _tmp6_;
	ValaList* _tmp28_;
	ValaList* _tmp29_;
	gint _tmp30_;
	gint _tmp31_;
	ValaMethod* _tmp32_;
	ValaList* _tmp33_;
	ValaList* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	gboolean _tmp37_;
	ValaList* method_type_args = NULL;
	ValaList* _tmp50_;
	ValaList* _tmp51_;
	gint _tmp52_;
	gint _tmp53_;
	gboolean _tmp54_;
	ValaDataType* actual_base_type = NULL;
	ValaMethod* _tmp72_;
	ValaDataType* _tmp73_;
	ValaDataType* _tmp74_;
	ValaObjectType* _tmp75_;
	ValaList* _tmp76_;
	ValaDataType* _tmp77_;
	ValaDataType* _tmp78_;
	ValaDataType* _tmp79_;
	ValaDataType* _tmp80_;
	gboolean _tmp81_;
	ValaIterator* method_params_it = NULL;
	ValaList* _tmp90_;
	ValaIterator* _tmp91_;
	gint param_index = 0;
	ValaIterator* _tmp141_;
	gboolean _tmp142_;
	ValaMethod* _tmp173_;
	gboolean _tmp174_;
	gboolean _tmp175_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (base_method != NULL, FALSE);
	_tmp0_ = base_method;
	if (self == _tmp0_) {
		_g_free0 (_vala_invalid_match);
		_vala_invalid_match = NULL;
		result = TRUE;
		if (invalid_match) {
			*invalid_match = _vala_invalid_match;
		} else {
			_g_free0 (_vala_invalid_match);
		}
		return result;
	}
	_tmp1_ = self->priv->_binding;
	_tmp2_ = base_method;
	_tmp3_ = _tmp2_->priv->_binding;
	if (_tmp1_ != _tmp3_) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("incompatible binding");
		_g_free0 (_vala_invalid_match);
		_vala_invalid_match = _tmp4_;
		result = FALSE;
		if (invalid_match) {
			*invalid_match = _vala_invalid_match;
		} else {
			_g_free0 (_vala_invalid_match);
		}
		return result;
	}
	object_type = NULL;
	_tmp5_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
	_tmp6_ = _tmp5_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, VALA_TYPE_OBJECT_TYPE_SYMBOL)) {
		ValaSymbol* _tmp7_;
		ValaSymbol* _tmp8_;
		ValaObjectType* _tmp9_;
		_tmp7_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
		_tmp8_ = _tmp7_;
		_tmp9_ = vala_object_type_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol));
		_vala_code_node_unref0 (object_type);
		object_type = _tmp9_;
		{
			ValaList* _type_parameter_list = NULL;
			ValaObjectType* _tmp10_;
			ValaObjectTypeSymbol* _tmp11_;
			ValaObjectTypeSymbol* _tmp12_;
			ValaList* _tmp13_;
			gint _type_parameter_size = 0;
			ValaList* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			gint _type_parameter_index = 0;
			_tmp10_ = object_type;
			_tmp11_ = vala_object_type_get_type_symbol (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = vala_object_type_symbol_get_type_parameters (_tmp12_);
			_type_parameter_list = _tmp13_;
			_tmp14_ = _type_parameter_list;
			_tmp15_ = vala_collection_get_size ((ValaCollection*) _tmp14_);
			_tmp16_ = _tmp15_;
			_type_parameter_size = _tmp16_;
			_type_parameter_index = -1;
			while (TRUE) {
				gint _tmp17_;
				gint _tmp18_;
				gint _tmp19_;
				ValaTypeParameter* type_parameter = NULL;
				ValaList* _tmp20_;
				gint _tmp21_;
				gpointer _tmp22_;
				ValaGenericType* type_arg = NULL;
				ValaTypeParameter* _tmp23_;
				ValaGenericType* _tmp24_;
				ValaGenericType* _tmp25_;
				ValaObjectType* _tmp26_;
				ValaGenericType* _tmp27_;
				_tmp17_ = _type_parameter_index;
				_type_parameter_index = _tmp17_ + 1;
				_tmp18_ = _type_parameter_index;
				_tmp19_ = _type_parameter_size;
				if (!(_tmp18_ < _tmp19_)) {
					break;
				}
				_tmp20_ = _type_parameter_list;
				_tmp21_ = _type_parameter_index;
				_tmp22_ = vala_list_get (_tmp20_, _tmp21_);
				type_parameter = (ValaTypeParameter*) _tmp22_;
				_tmp23_ = type_parameter;
				_tmp24_ = vala_generic_type_new (_tmp23_);
				type_arg = _tmp24_;
				_tmp25_ = type_arg;
				vala_data_type_set_value_owned ((ValaDataType*) _tmp25_, TRUE);
				_tmp26_ = object_type;
				_tmp27_ = type_arg;
				vala_data_type_add_type_argument ((ValaDataType*) _tmp26_, (ValaDataType*) _tmp27_);
				_vala_code_node_unref0 (type_arg);
				_vala_code_node_unref0 (type_parameter);
			}
			_vala_iterable_unref0 (_type_parameter_list);
		}
	}
	_tmp28_ = vala_method_get_type_parameters (self);
	_tmp29_ = _tmp28_;
	_tmp30_ = vala_collection_get_size ((ValaCollection*) _tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = base_method;
	_tmp33_ = vala_method_get_type_parameters (_tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = vala_collection_get_size ((ValaCollection*) _tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = _tmp31_ < _tmp36_;
	_vala_iterable_unref0 (_tmp34_);
	_vala_iterable_unref0 (_tmp29_);
	if (_tmp37_) {
		gchar* _tmp38_;
		_tmp38_ = g_strdup ("too few type parameters");
		_g_free0 (_vala_invalid_match);
		_vala_invalid_match = _tmp38_;
		result = FALSE;
		_vala_code_node_unref0 (object_type);
		if (invalid_match) {
			*invalid_match = _vala_invalid_match;
		} else {
			_g_free0 (_vala_invalid_match);
		}
		return result;
	} else {
		ValaList* _tmp39_;
		ValaList* _tmp40_;
		gint _tmp41_;
		gint _tmp42_;
		ValaMethod* _tmp43_;
		ValaList* _tmp44_;
		ValaList* _tmp45_;
		gint _tmp46_;
		gint _tmp47_;
		gboolean _tmp48_;
		_tmp39_ = vala_method_get_type_parameters (self);
		_tmp40_ = _tmp39_;
		_tmp41_ = vala_collection_get_size ((ValaCollection*) _tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = base_method;
		_tmp44_ = vala_method_get_type_parameters (_tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = vala_collection_get_size ((ValaCollection*) _tmp45_);
		_tmp47_ = _tmp46_;
		_tmp48_ = _tmp42_ > _tmp47_;
		_vala_iterable_unref0 (_tmp45_);
		_vala_iterable_unref0 (_tmp40_);
		if (_tmp48_) {
			gchar* _tmp49_;
			_tmp49_ = g_strdup ("too many type parameters");
			_g_free0 (_vala_invalid_match);
			_vala_invalid_match = _tmp49_;
			result = FALSE;
			_vala_code_node_unref0 (object_type);
			if (invalid_match) {
				*invalid_match = _vala_invalid_match;
			} else {
				_g_free0 (_vala_invalid_match);
			}
			return result;
		}
	}
	method_type_args = NULL;
	_tmp50_ = vala_method_get_type_parameters (self);
	_tmp51_ = _tmp50_;
	_tmp52_ = vala_collection_get_size ((ValaCollection*) _tmp51_);
	_tmp53_ = _tmp52_;
	_tmp54_ = _tmp53_ > 0;
	_vala_iterable_unref0 (_tmp51_);
	if (_tmp54_) {
		GEqualFunc _tmp55_;
		ValaArrayList* _tmp56_;
		_tmp55_ = g_direct_equal;
		_tmp56_ = vala_array_list_new (VALA_TYPE_DATA_TYPE, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp55_);
		_vala_iterable_unref0 (method_type_args);
		method_type_args = (ValaList*) _tmp56_;
		{
			ValaList* _type_parameter_list = NULL;
			ValaList* _tmp57_;
			gint _type_parameter_size = 0;
			ValaList* _tmp58_;
			gint _tmp59_;
			gint _tmp60_;
			gint _type_parameter_index = 0;
			_tmp57_ = vala_method_get_type_parameters (self);
			_type_parameter_list = _tmp57_;
			_tmp58_ = _type_parameter_list;
			_tmp59_ = vala_collection_get_size ((ValaCollection*) _tmp58_);
			_tmp60_ = _tmp59_;
			_type_parameter_size = _tmp60_;
			_type_parameter_index = -1;
			while (TRUE) {
				gint _tmp61_;
				gint _tmp62_;
				gint _tmp63_;
				ValaTypeParameter* type_parameter = NULL;
				ValaList* _tmp64_;
				gint _tmp65_;
				gpointer _tmp66_;
				ValaGenericType* type_arg = NULL;
				ValaTypeParameter* _tmp67_;
				ValaGenericType* _tmp68_;
				ValaGenericType* _tmp69_;
				ValaList* _tmp70_;
				ValaGenericType* _tmp71_;
				_tmp61_ = _type_parameter_index;
				_type_parameter_index = _tmp61_ + 1;
				_tmp62_ = _type_parameter_index;
				_tmp63_ = _type_parameter_size;
				if (!(_tmp62_ < _tmp63_)) {
					break;
				}
				_tmp64_ = _type_parameter_list;
				_tmp65_ = _type_parameter_index;
				_tmp66_ = vala_list_get (_tmp64_, _tmp65_);
				type_parameter = (ValaTypeParameter*) _tmp66_;
				_tmp67_ = type_parameter;
				_tmp68_ = vala_generic_type_new (_tmp67_);
				type_arg = _tmp68_;
				_tmp69_ = type_arg;
				vala_data_type_set_value_owned ((ValaDataType*) _tmp69_, TRUE);
				_tmp70_ = method_type_args;
				_tmp71_ = type_arg;
				vala_collection_add ((ValaCollection*) _tmp70_, (ValaDataType*) _tmp71_);
				_vala_code_node_unref0 (type_arg);
				_vala_code_node_unref0 (type_parameter);
			}
			_vala_iterable_unref0 (_type_parameter_list);
		}
	}
	_tmp72_ = base_method;
	_tmp73_ = vala_callable_get_return_type ((ValaCallable*) _tmp72_);
	_tmp74_ = _tmp73_;
	_tmp75_ = object_type;
	_tmp76_ = method_type_args;
	_tmp77_ = vala_data_type_get_actual_type (_tmp74_, (ValaDataType*) _tmp75_, _tmp76_, (ValaCodeNode*) self);
	actual_base_type = _tmp77_;
	_tmp78_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp79_ = _tmp78_;
	_tmp80_ = actual_base_type;
	_tmp81_ = vala_data_type_equals (_tmp79_, _tmp80_);
	if (!_tmp81_) {
		ValaDataType* _tmp82_;
		gchar* _tmp83_;
		gchar* _tmp84_;
		ValaDataType* _tmp85_;
		ValaDataType* _tmp86_;
		gchar* _tmp87_;
		gchar* _tmp88_;
		gchar* _tmp89_;
		_tmp82_ = actual_base_type;
		_tmp83_ = vala_data_type_to_prototype_string (_tmp82_, NULL);
		_tmp84_ = _tmp83_;
		_tmp85_ = vala_callable_get_return_type ((ValaCallable*) self);
		_tmp86_ = _tmp85_;
		_tmp87_ = vala_data_type_to_prototype_string (_tmp86_, NULL);
		_tmp88_ = _tmp87_;
		_tmp89_ = g_strdup_printf ("Base method expected return type `%s', but `%s' was provided", _tmp84_, _tmp88_);
		_g_free0 (_vala_invalid_match);
		_vala_invalid_match = _tmp89_;
		_g_free0 (_tmp88_);
		_g_free0 (_tmp84_);
		result = FALSE;
		_vala_code_node_unref0 (actual_base_type);
		_vala_iterable_unref0 (method_type_args);
		_vala_code_node_unref0 (object_type);
		if (invalid_match) {
			*invalid_match = _vala_invalid_match;
		} else {
			_g_free0 (_vala_invalid_match);
		}
		return result;
	}
	_tmp90_ = self->priv->parameters;
	_tmp91_ = vala_iterable_iterator ((ValaIterable*) _tmp90_);
	method_params_it = _tmp91_;
	param_index = 1;
	{
		ValaList* _base_param_list = NULL;
		ValaMethod* _tmp92_;
		ValaList* _tmp93_;
		ValaList* _tmp94_;
		gint _base_param_size = 0;
		ValaList* _tmp95_;
		gint _tmp96_;
		gint _tmp97_;
		gint _base_param_index = 0;
		_tmp92_ = base_method;
		_tmp93_ = _tmp92_->priv->parameters;
		_tmp94_ = _vala_iterable_ref0 (_tmp93_);
		_base_param_list = _tmp94_;
		_tmp95_ = _base_param_list;
		_tmp96_ = vala_collection_get_size ((ValaCollection*) _tmp95_);
		_tmp97_ = _tmp96_;
		_base_param_size = _tmp97_;
		_base_param_index = -1;
		while (TRUE) {
			gint _tmp98_;
			gint _tmp99_;
			gint _tmp100_;
			ValaParameter* base_param = NULL;
			ValaList* _tmp101_;
			gint _tmp102_;
			gpointer _tmp103_;
			ValaIterator* _tmp104_;
			gboolean _tmp105_;
			ValaParameter* param = NULL;
			ValaIterator* _tmp107_;
			gpointer _tmp108_;
			ValaParameter* _tmp109_;
			gboolean _tmp110_;
			gboolean _tmp111_;
			ValaParameter* _tmp112_;
			gboolean _tmp113_;
			gboolean _tmp114_;
			ValaParameter* _tmp116_;
			gboolean _tmp117_;
			gboolean _tmp118_;
			gint _tmp140_;
			_tmp98_ = _base_param_index;
			_base_param_index = _tmp98_ + 1;
			_tmp99_ = _base_param_index;
			_tmp100_ = _base_param_size;
			if (!(_tmp99_ < _tmp100_)) {
				break;
			}
			_tmp101_ = _base_param_list;
			_tmp102_ = _base_param_index;
			_tmp103_ = vala_list_get (_tmp101_, _tmp102_);
			base_param = (ValaParameter*) _tmp103_;
			_tmp104_ = method_params_it;
			_tmp105_ = vala_iterator_next (_tmp104_);
			if (!_tmp105_) {
				gchar* _tmp106_;
				_tmp106_ = g_strdup ("too few parameters");
				_g_free0 (_vala_invalid_match);
				_vala_invalid_match = _tmp106_;
				result = FALSE;
				_vala_code_node_unref0 (base_param);
				_vala_iterable_unref0 (_base_param_list);
				_vala_iterator_unref0 (method_params_it);
				_vala_code_node_unref0 (actual_base_type);
				_vala_iterable_unref0 (method_type_args);
				_vala_code_node_unref0 (object_type);
				if (invalid_match) {
					*invalid_match = _vala_invalid_match;
				} else {
					_g_free0 (_vala_invalid_match);
				}
				return result;
			}
			_tmp107_ = method_params_it;
			_tmp108_ = vala_iterator_get (_tmp107_);
			param = (ValaParameter*) _tmp108_;
			_tmp109_ = base_param;
			_tmp110_ = vala_parameter_get_ellipsis (_tmp109_);
			_tmp111_ = _tmp110_;
			_tmp112_ = param;
			_tmp113_ = vala_parameter_get_ellipsis (_tmp112_);
			_tmp114_ = _tmp113_;
			if (_tmp111_ != _tmp114_) {
				gchar* _tmp115_;
				_tmp115_ = g_strdup ("ellipsis parameter mismatch");
				_g_free0 (_vala_invalid_match);
				_vala_invalid_match = _tmp115_;
				result = FALSE;
				_vala_code_node_unref0 (param);
				_vala_code_node_unref0 (base_param);
				_vala_iterable_unref0 (_base_param_list);
				_vala_iterator_unref0 (method_params_it);
				_vala_code_node_unref0 (actual_base_type);
				_vala_iterable_unref0 (method_type_args);
				_vala_code_node_unref0 (object_type);
				if (invalid_match) {
					*invalid_match = _vala_invalid_match;
				} else {
					_g_free0 (_vala_invalid_match);
				}
				return result;
			}
			_tmp116_ = base_param;
			_tmp117_ = vala_parameter_get_ellipsis (_tmp116_);
			_tmp118_ = _tmp117_;
			if (!_tmp118_) {
				ValaParameter* _tmp119_;
				ValaParameterDirection _tmp120_;
				ValaParameterDirection _tmp121_;
				ValaParameter* _tmp122_;
				ValaParameterDirection _tmp123_;
				ValaParameterDirection _tmp124_;
				ValaParameter* _tmp127_;
				ValaDataType* _tmp128_;
				ValaDataType* _tmp129_;
				ValaObjectType* _tmp130_;
				ValaList* _tmp131_;
				ValaDataType* _tmp132_;
				ValaDataType* _tmp133_;
				ValaParameter* _tmp134_;
				ValaDataType* _tmp135_;
				ValaDataType* _tmp136_;
				gboolean _tmp137_;
				_tmp119_ = base_param;
				_tmp120_ = vala_parameter_get_direction (_tmp119_);
				_tmp121_ = _tmp120_;
				_tmp122_ = param;
				_tmp123_ = vala_parameter_get_direction (_tmp122_);
				_tmp124_ = _tmp123_;
				if (_tmp121_ != _tmp124_) {
					gint _tmp125_;
					gchar* _tmp126_;
					_tmp125_ = param_index;
					_tmp126_ = g_strdup_printf ("incompatible direction of parameter %d", _tmp125_);
					_g_free0 (_vala_invalid_match);
					_vala_invalid_match = _tmp126_;
					result = FALSE;
					_vala_code_node_unref0 (param);
					_vala_code_node_unref0 (base_param);
					_vala_iterable_unref0 (_base_param_list);
					_vala_iterator_unref0 (method_params_it);
					_vala_code_node_unref0 (actual_base_type);
					_vala_iterable_unref0 (method_type_args);
					_vala_code_node_unref0 (object_type);
					if (invalid_match) {
						*invalid_match = _vala_invalid_match;
					} else {
						_g_free0 (_vala_invalid_match);
					}
					return result;
				}
				_tmp127_ = base_param;
				_tmp128_ = vala_variable_get_variable_type ((ValaVariable*) _tmp127_);
				_tmp129_ = _tmp128_;
				_tmp130_ = object_type;
				_tmp131_ = method_type_args;
				_tmp132_ = vala_data_type_get_actual_type (_tmp129_, (ValaDataType*) _tmp130_, _tmp131_, (ValaCodeNode*) self);
				_vala_code_node_unref0 (actual_base_type);
				actual_base_type = _tmp132_;
				_tmp133_ = actual_base_type;
				_tmp134_ = param;
				_tmp135_ = vala_variable_get_variable_type ((ValaVariable*) _tmp134_);
				_tmp136_ = _tmp135_;
				_tmp137_ = vala_data_type_equals (_tmp133_, _tmp136_);
				if (!_tmp137_) {
					gint _tmp138_;
					gchar* _tmp139_;
					_tmp138_ = param_index;
					_tmp139_ = g_strdup_printf ("incompatible type of parameter %d", _tmp138_);
					_g_free0 (_vala_invalid_match);
					_vala_invalid_match = _tmp139_;
					result = FALSE;
					_vala_code_node_unref0 (param);
					_vala_code_node_unref0 (base_param);
					_vala_iterable_unref0 (_base_param_list);
					_vala_iterator_unref0 (method_params_it);
					_vala_code_node_unref0 (actual_base_type);
					_vala_iterable_unref0 (method_type_args);
					_vala_code_node_unref0 (object_type);
					if (invalid_match) {
						*invalid_match = _vala_invalid_match;
					} else {
						_g_free0 (_vala_invalid_match);
					}
					return result;
				}
			}
			_tmp140_ = param_index;
			param_index = _tmp140_ + 1;
			_vala_code_node_unref0 (param);
			_vala_code_node_unref0 (base_param);
		}
		_vala_iterable_unref0 (_base_param_list);
	}
	_tmp141_ = method_params_it;
	_tmp142_ = vala_iterator_next (_tmp141_);
	if (_tmp142_) {
		gchar* _tmp143_;
		_tmp143_ = g_strdup ("too many parameters");
		_g_free0 (_vala_invalid_match);
		_vala_invalid_match = _tmp143_;
		result = FALSE;
		_vala_iterator_unref0 (method_params_it);
		_vala_code_node_unref0 (actual_base_type);
		_vala_iterable_unref0 (method_type_args);
		_vala_code_node_unref0 (object_type);
		if (invalid_match) {
			*invalid_match = _vala_invalid_match;
		} else {
			_g_free0 (_vala_invalid_match);
		}
		return result;
	}
	{
		ValaList* _method_error_type_list = NULL;
		ValaList* _tmp144_;
		gint _method_error_type_size = 0;
		ValaList* _tmp145_;
		gint _tmp146_;
		gint _tmp147_;
		gint _method_error_type_index = 0;
		_tmp144_ = vala_code_node_get_error_types ((ValaCodeNode*) self);
		_method_error_type_list = _tmp144_;
		_tmp145_ = _method_error_type_list;
		_tmp146_ = vala_collection_get_size ((ValaCollection*) _tmp145_);
		_tmp147_ = _tmp146_;
		_method_error_type_size = _tmp147_;
		_method_error_type_index = -1;
		while (TRUE) {
			gint _tmp148_;
			gint _tmp149_;
			gint _tmp150_;
			ValaDataType* method_error_type = NULL;
			ValaList* _tmp151_;
			gint _tmp152_;
			gpointer _tmp153_;
			gboolean match = FALSE;
			gboolean _tmp168_;
			_tmp148_ = _method_error_type_index;
			_method_error_type_index = _tmp148_ + 1;
			_tmp149_ = _method_error_type_index;
			_tmp150_ = _method_error_type_size;
			if (!(_tmp149_ < _tmp150_)) {
				break;
			}
			_tmp151_ = _method_error_type_list;
			_tmp152_ = _method_error_type_index;
			_tmp153_ = vala_list_get (_tmp151_, _tmp152_);
			method_error_type = (ValaDataType*) _tmp153_;
			match = FALSE;
			{
				ValaList* _base_method_error_type_list = NULL;
				ValaMethod* _tmp154_;
				ValaList* _tmp155_;
				gint _base_method_error_type_size = 0;
				ValaList* _tmp156_;
				gint _tmp157_;
				gint _tmp158_;
				gint _base_method_error_type_index = 0;
				_tmp154_ = base_method;
				_tmp155_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp154_);
				_base_method_error_type_list = _tmp155_;
				_tmp156_ = _base_method_error_type_list;
				_tmp157_ = vala_collection_get_size ((ValaCollection*) _tmp156_);
				_tmp158_ = _tmp157_;
				_base_method_error_type_size = _tmp158_;
				_base_method_error_type_index = -1;
				while (TRUE) {
					gint _tmp159_;
					gint _tmp160_;
					gint _tmp161_;
					ValaDataType* base_method_error_type = NULL;
					ValaList* _tmp162_;
					gint _tmp163_;
					gpointer _tmp164_;
					ValaDataType* _tmp165_;
					ValaDataType* _tmp166_;
					gboolean _tmp167_;
					_tmp159_ = _base_method_error_type_index;
					_base_method_error_type_index = _tmp159_ + 1;
					_tmp160_ = _base_method_error_type_index;
					_tmp161_ = _base_method_error_type_size;
					if (!(_tmp160_ < _tmp161_)) {
						break;
					}
					_tmp162_ = _base_method_error_type_list;
					_tmp163_ = _base_method_error_type_index;
					_tmp164_ = vala_list_get (_tmp162_, _tmp163_);
					base_method_error_type = (ValaDataType*) _tmp164_;
					_tmp165_ = method_error_type;
					_tmp166_ = base_method_error_type;
					_tmp167_ = vala_data_type_compatible (_tmp165_, _tmp166_);
					if (_tmp167_) {
						match = TRUE;
						_vala_code_node_unref0 (base_method_error_type);
						break;
					}
					_vala_code_node_unref0 (base_method_error_type);
				}
				_vala_iterable_unref0 (_base_method_error_type_list);
			}
			_tmp168_ = match;
			if (!_tmp168_) {
				ValaDataType* _tmp169_;
				gchar* _tmp170_;
				gchar* _tmp171_;
				gchar* _tmp172_;
				_tmp169_ = method_error_type;
				_tmp170_ = vala_code_node_to_string ((ValaCodeNode*) _tmp169_);
				_tmp171_ = _tmp170_;
				_tmp172_ = g_strdup_printf ("incompatible error type `%s'", _tmp171_);
				_g_free0 (_vala_invalid_match);
				_vala_invalid_match = _tmp172_;
				_g_free0 (_tmp171_);
				result = FALSE;
				_vala_code_node_unref0 (method_error_type);
				_vala_iterable_unref0 (_method_error_type_list);
				_vala_iterator_unref0 (method_params_it);
				_vala_code_node_unref0 (actual_base_type);
				_vala_iterable_unref0 (method_type_args);
				_vala_code_node_unref0 (object_type);
				if (invalid_match) {
					*invalid_match = _vala_invalid_match;
				} else {
					_g_free0 (_vala_invalid_match);
				}
				return result;
			}
			_vala_code_node_unref0 (method_error_type);
		}
		_vala_iterable_unref0 (_method_error_type_list);
	}
	_tmp173_ = base_method;
	_tmp174_ = _tmp173_->priv->_coroutine;
	_tmp175_ = self->priv->_coroutine;
	if (_tmp174_ != _tmp175_) {
		gchar* _tmp176_;
		_tmp176_ = g_strdup ("async mismatch");
		_g_free0 (_vala_invalid_match);
		_vala_invalid_match = _tmp176_;
		result = FALSE;
		_vala_iterator_unref0 (method_params_it);
		_vala_code_node_unref0 (actual_base_type);
		_vala_iterable_unref0 (method_type_args);
		_vala_code_node_unref0 (object_type);
		if (invalid_match) {
			*invalid_match = _vala_invalid_match;
		} else {
			_g_free0 (_vala_invalid_match);
		}
		return result;
	}
	_g_free0 (_vala_invalid_match);
	_vala_invalid_match = NULL;
	result = TRUE;
	_vala_iterator_unref0 (method_params_it);
	_vala_code_node_unref0 (actual_base_type);
	_vala_iterable_unref0 (method_type_args);
	_vala_code_node_unref0 (object_type);
	if (invalid_match) {
		*invalid_match = _vala_invalid_match;
	} else {
		_g_free0 (_vala_invalid_match);
	}
	return result;
}


/**
 * Appends the specified parameter to the list of type parameters.
 *
 * @param p a type parameter
 */
void vala_method_add_type_parameter (ValaMethod* self, ValaTypeParameter* p) {
	ValaList* _tmp0_;
	ValaList* _tmp3_;
	ValaTypeParameter* _tmp4_;
	ValaScope* _tmp5_;
	ValaScope* _tmp6_;
	ValaTypeParameter* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	ValaTypeParameter* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (p != NULL);
	_tmp0_ = self->priv->type_parameters;
	if (_tmp0_ == NULL) {
		GEqualFunc _tmp1_;
		ValaArrayList* _tmp2_;
		_tmp1_ = g_direct_equal;
		_tmp2_ = vala_array_list_new (VALA_TYPE_TYPEPARAMETER, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp1_);
		_vala_iterable_unref0 (self->priv->type_parameters);
		self->priv->type_parameters = (ValaList*) _tmp2_;
	}
	_tmp3_ = self->priv->type_parameters;
	_tmp4_ = p;
	vala_collection_add ((ValaCollection*) _tmp3_, _tmp4_);
	_tmp5_ = vala_symbol_get_scope ((ValaSymbol*) self);
	_tmp6_ = _tmp5_;
	_tmp7_ = p;
	_tmp8_ = vala_symbol_get_name ((ValaSymbol*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = p;
	vala_scope_add (_tmp6_, _tmp9_, (ValaSymbol*) _tmp10_);
}


/**
 * Returns a copy of the type parameter list.
 *
 * @return list of type parameters
 */
ValaList* vala_method_get_type_parameters (ValaMethod* self) {
	ValaList* result = NULL;
	ValaList* _tmp0_;
	ValaList* _tmp3_;
	ValaList* _tmp6_;
	ValaList* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->type_parameters;
	if (_tmp0_ != NULL) {
		ValaList* _tmp1_;
		ValaList* _tmp2_;
		_tmp1_ = self->priv->type_parameters;
		_tmp2_ = _vala_iterable_ref0 (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = vala_method__empty_type_parameter_list;
	if (_tmp3_ == NULL) {
		GEqualFunc _tmp4_;
		ValaArrayList* _tmp5_;
		_tmp4_ = g_direct_equal;
		_tmp5_ = vala_array_list_new (VALA_TYPE_TYPEPARAMETER, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp4_);
		_vala_iterable_unref0 (vala_method__empty_type_parameter_list);
		vala_method__empty_type_parameter_list = (ValaList*) _tmp5_;
	}
	_tmp6_ = vala_method__empty_type_parameter_list;
	_tmp7_ = _vala_iterable_ref0 (_tmp6_);
	result = _tmp7_;
	return result;
}


gint vala_method_get_type_parameter_index (ValaMethod* self, const gchar* name) {
	gint result = 0;
	ValaList* _tmp0_;
	gint i = 0;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (name != NULL, 0);
	_tmp0_ = self->priv->type_parameters;
	if (_tmp0_ == NULL) {
		result = -1;
		return result;
	}
	i = 0;
	{
		ValaList* _parameter_list = NULL;
		ValaList* _tmp1_;
		ValaList* _tmp2_;
		gint _parameter_size = 0;
		ValaList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _parameter_index = 0;
		_tmp1_ = self->priv->type_parameters;
		_tmp2_ = _vala_iterable_ref0 (_tmp1_);
		_parameter_list = _tmp2_;
		_tmp3_ = _parameter_list;
		_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_parameter_size = _tmp5_;
		_parameter_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			ValaTypeParameter* parameter = NULL;
			ValaList* _tmp9_;
			gint _tmp10_;
			gpointer _tmp11_;
			ValaTypeParameter* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			gint _tmp16_;
			_tmp6_ = _parameter_index;
			_parameter_index = _tmp6_ + 1;
			_tmp7_ = _parameter_index;
			_tmp8_ = _parameter_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _parameter_list;
			_tmp10_ = _parameter_index;
			_tmp11_ = vala_list_get (_tmp9_, _tmp10_);
			parameter = (ValaTypeParameter*) _tmp11_;
			_tmp12_ = parameter;
			_tmp13_ = vala_symbol_get_name ((ValaSymbol*) _tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = name;
			if (g_strcmp0 (_tmp14_, _tmp15_) == 0) {
				result = i;
				_vala_code_node_unref0 (parameter);
				_vala_iterable_unref0 (_parameter_list);
				return result;
			}
			_tmp16_ = i;
			i = _tmp16_ + 1;
			_vala_code_node_unref0 (parameter);
		}
		_vala_iterable_unref0 (_parameter_list);
	}
	result = -1;
	return result;
}


/**
 * Adds a precondition to this method.
 *
 * @param precondition a boolean precondition expression
 */
void vala_method_add_precondition (ValaMethod* self, ValaExpression* precondition) {
	ValaList* _tmp0_;
	ValaList* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (precondition != NULL);
	_tmp0_ = self->priv->preconditions;
	if (_tmp0_ == NULL) {
		GEqualFunc _tmp1_;
		ValaArrayList* _tmp2_;
		_tmp1_ = g_direct_equal;
		_tmp2_ = vala_array_list_new (VALA_TYPE_EXPRESSION, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp1_);
		_vala_iterable_unref0 (self->priv->preconditions);
		self->priv->preconditions = (ValaList*) _tmp2_;
	}
	_tmp3_ = self->priv->preconditions;
	_tmp4_ = precondition;
	vala_collection_add ((ValaCollection*) _tmp3_, _tmp4_);
	_tmp5_ = precondition;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp5_, (ValaCodeNode*) self);
}


/**
 * Returns a copy of the list of preconditions of this method.
 *
 * @return list of preconditions
 */
ValaList* vala_method_get_preconditions (ValaMethod* self) {
	ValaList* result = NULL;
	ValaList* _tmp0_;
	ValaList* _tmp3_;
	ValaList* _tmp6_;
	ValaList* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->preconditions;
	if (_tmp0_ != NULL) {
		ValaList* _tmp1_;
		ValaList* _tmp2_;
		_tmp1_ = self->priv->preconditions;
		_tmp2_ = _vala_iterable_ref0 (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = vala_method__empty_expression_list;
	if (_tmp3_ == NULL) {
		GEqualFunc _tmp4_;
		ValaArrayList* _tmp5_;
		_tmp4_ = g_direct_equal;
		_tmp5_ = vala_array_list_new (VALA_TYPE_EXPRESSION, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp4_);
		_vala_iterable_unref0 (vala_method__empty_expression_list);
		vala_method__empty_expression_list = (ValaList*) _tmp5_;
	}
	_tmp6_ = vala_method__empty_expression_list;
	_tmp7_ = _vala_iterable_ref0 (_tmp6_);
	result = _tmp7_;
	return result;
}


/**
 * Adds a postcondition to this method.
 *
 * @param postcondition a boolean postcondition expression
 */
void vala_method_add_postcondition (ValaMethod* self, ValaExpression* postcondition) {
	ValaList* _tmp0_;
	ValaList* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (postcondition != NULL);
	_tmp0_ = self->priv->postconditions;
	if (_tmp0_ == NULL) {
		GEqualFunc _tmp1_;
		ValaArrayList* _tmp2_;
		_tmp1_ = g_direct_equal;
		_tmp2_ = vala_array_list_new (VALA_TYPE_EXPRESSION, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp1_);
		_vala_iterable_unref0 (self->priv->postconditions);
		self->priv->postconditions = (ValaList*) _tmp2_;
	}
	_tmp3_ = self->priv->postconditions;
	_tmp4_ = postcondition;
	vala_collection_add ((ValaCollection*) _tmp3_, _tmp4_);
	_tmp5_ = postcondition;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp5_, (ValaCodeNode*) self);
}


/**
 * Returns a copy of the list of postconditions of this method.
 *
 * @return list of postconditions
 */
ValaList* vala_method_get_postconditions (ValaMethod* self) {
	ValaList* result = NULL;
	ValaList* _tmp0_;
	ValaList* _tmp3_;
	ValaList* _tmp6_;
	ValaList* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->postconditions;
	if (_tmp0_ != NULL) {
		ValaList* _tmp1_;
		ValaList* _tmp2_;
		_tmp1_ = self->priv->postconditions;
		_tmp2_ = _vala_iterable_ref0 (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = vala_method__empty_expression_list;
	if (_tmp3_ == NULL) {
		GEqualFunc _tmp4_;
		ValaArrayList* _tmp5_;
		_tmp4_ = g_direct_equal;
		_tmp5_ = vala_array_list_new (VALA_TYPE_EXPRESSION, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp4_);
		_vala_iterable_unref0 (vala_method__empty_expression_list);
		vala_method__empty_expression_list = (ValaList*) _tmp5_;
	}
	_tmp6_ = vala_method__empty_expression_list;
	_tmp7_ = _vala_iterable_ref0 (_tmp6_);
	result = _tmp7_;
	return result;
}


static void vala_method_real_replace_type (ValaCodeNode* base, ValaDataType* old_type, ValaDataType* new_type) {
	ValaMethod * self;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp4_;
	ValaDataType* _tmp5_;
	ValaDataType* _tmp6_;
	ValaList* error_types = NULL;
	ValaList* _tmp8_;
	self = (ValaMethod*) base;
	g_return_if_fail (old_type != NULL);
	g_return_if_fail (new_type != NULL);
	_tmp0_ = vala_method_get_base_interface_type (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = old_type;
	if (_tmp1_ == _tmp2_) {
		ValaDataType* _tmp3_;
		_tmp3_ = new_type;
		vala_method_set_base_interface_type (self, _tmp3_);
		return;
	}
	_tmp4_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = old_type;
	if (_tmp5_ == _tmp6_) {
		ValaDataType* _tmp7_;
		_tmp7_ = new_type;
		vala_callable_set_return_type ((ValaCallable*) self, _tmp7_);
		return;
	}
	_tmp8_ = vala_code_node_get_error_types ((ValaCodeNode*) self);
	error_types = _tmp8_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp9_ = FALSE;
			_tmp9_ = TRUE;
			while (TRUE) {
				gint _tmp11_;
				ValaList* _tmp12_;
				gint _tmp13_;
				gint _tmp14_;
				ValaList* _tmp15_;
				gint _tmp16_;
				gpointer _tmp17_;
				ValaDataType* _tmp18_;
				ValaDataType* _tmp19_;
				gboolean _tmp20_;
				if (!_tmp9_) {
					gint _tmp10_;
					_tmp10_ = i;
					i = _tmp10_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp11_ = i;
				_tmp12_ = error_types;
				_tmp13_ = vala_collection_get_size ((ValaCollection*) _tmp12_);
				_tmp14_ = _tmp13_;
				if (!(_tmp11_ < _tmp14_)) {
					break;
				}
				_tmp15_ = error_types;
				_tmp16_ = i;
				_tmp17_ = vala_list_get (_tmp15_, _tmp16_);
				_tmp18_ = (ValaDataType*) _tmp17_;
				_tmp19_ = old_type;
				_tmp20_ = _tmp18_ == _tmp19_;
				_vala_code_node_unref0 (_tmp18_);
				if (_tmp20_) {
					ValaList* _tmp21_;
					gint _tmp22_;
					ValaDataType* _tmp23_;
					_tmp21_ = error_types;
					_tmp22_ = i;
					_tmp23_ = new_type;
					vala_list_set (_tmp21_, _tmp22_, _tmp23_);
					_vala_iterable_unref0 (error_types);
					return;
				}
			}
		}
	}
	_vala_iterable_unref0 (error_types);
}


static void vala_method_find_base_methods (ValaMethod* self) {
	gboolean _tmp0_;
	ValaSymbol* _tmp1_;
	ValaSymbol* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->base_methods_valid;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
	_tmp2_ = _tmp1_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_CLASS)) {
		if (!G_TYPE_CHECK_INSTANCE_TYPE (self, VALA_TYPE_CREATION_METHOD)) {
			ValaSymbol* _tmp3_;
			ValaSymbol* _tmp4_;
			gboolean _tmp5_ = FALSE;
			gboolean _tmp6_ = FALSE;
			gboolean _tmp7_;
			_tmp3_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
			_tmp4_ = _tmp3_;
			vala_method_find_base_interface_method (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, VALA_TYPE_CLASS, ValaClass));
			_tmp7_ = self->priv->_is_virtual;
			if (_tmp7_) {
				_tmp6_ = TRUE;
			} else {
				gboolean _tmp8_;
				_tmp8_ = self->priv->_is_abstract;
				_tmp6_ = _tmp8_;
			}
			if (_tmp6_) {
				_tmp5_ = TRUE;
			} else {
				gboolean _tmp9_;
				_tmp9_ = self->priv->_overrides;
				_tmp5_ = _tmp9_;
			}
			if (_tmp5_) {
				ValaSymbol* _tmp10_;
				ValaSymbol* _tmp11_;
				_tmp10_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
				_tmp11_ = _tmp10_;
				vala_method_find_base_class_method (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, VALA_TYPE_CLASS, ValaClass));
			}
		}
	} else {
		ValaSymbol* _tmp12_;
		ValaSymbol* _tmp13_;
		_tmp12_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
		_tmp13_ = _tmp12_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, VALA_TYPE_INTERFACE)) {
			gboolean _tmp14_ = FALSE;
			gboolean _tmp15_;
			_tmp15_ = self->priv->_is_virtual;
			if (_tmp15_) {
				_tmp14_ = TRUE;
			} else {
				gboolean _tmp16_;
				_tmp16_ = self->priv->_is_abstract;
				_tmp14_ = _tmp16_;
			}
			if (_tmp14_) {
				self->priv->_base_interface_method = self;
			}
		}
	}
	self->priv->base_methods_valid = TRUE;
}


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


static void vala_method_find_base_class_method (ValaMethod* self, ValaClass* cl) {
	ValaSymbol* sym = NULL;
	ValaClass* _tmp0_;
	ValaScope* _tmp1_;
	ValaScope* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ValaSymbol* _tmp5_;
	ValaSymbol* _tmp6_;
	ValaSymbol* _tmp13_;
	ValaClass* _tmp37_;
	ValaClass* _tmp38_;
	ValaClass* _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cl != NULL);
	_tmp0_ = cl;
	_tmp1_ = vala_symbol_get_scope ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_symbol_get_name ((ValaSymbol*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_scope_lookup (_tmp2_, _tmp4_);
	sym = _tmp5_;
	_tmp6_ = sym;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, VALA_TYPE_SIGNAL)) {
		ValaSignal* sig = NULL;
		ValaSymbol* _tmp7_;
		ValaSignal* _tmp8_;
		ValaSignal* _tmp9_;
		ValaMethod* _tmp10_;
		ValaMethod* _tmp11_;
		ValaSymbol* _tmp12_;
		_tmp7_ = sym;
		_tmp8_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, VALA_TYPE_SIGNAL, ValaSignal));
		sig = _tmp8_;
		_tmp9_ = sig;
		_tmp10_ = vala_signal_get_default_handler (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp11_);
		_vala_code_node_unref0 (sym);
		sym = _tmp12_;
		_vala_code_node_unref0 (sig);
	}
	_tmp13_ = sym;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, VALA_TYPE_METHOD)) {
		ValaMethod* base_method = NULL;
		ValaSymbol* _tmp14_;
		ValaMethod* _tmp15_;
		gboolean _tmp16_ = FALSE;
		ValaMethod* _tmp17_;
		gboolean _tmp18_;
		_tmp14_ = sym;
		_tmp15_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, VALA_TYPE_METHOD, ValaMethod));
		base_method = _tmp15_;
		_tmp17_ = base_method;
		_tmp18_ = _tmp17_->priv->_is_abstract;
		if (_tmp18_) {
			_tmp16_ = TRUE;
		} else {
			ValaMethod* _tmp19_;
			gboolean _tmp20_;
			_tmp19_ = base_method;
			_tmp20_ = _tmp19_->priv->_is_virtual;
			_tmp16_ = _tmp20_;
		}
		if (_tmp16_) {
			gchar* invalid_match = NULL;
			ValaMethod* _tmp21_;
			gchar* _tmp22_ = NULL;
			gboolean _tmp23_;
			ValaMethod* _tmp36_;
			_tmp21_ = base_method;
			_tmp23_ = vala_method_compatible (self, _tmp21_, &_tmp22_);
			_g_free0 (invalid_match);
			invalid_match = _tmp22_;
			if (!_tmp23_) {
				ValaMethodType* base_method_type = NULL;
				ValaMethod* _tmp24_;
				ValaMethodType* _tmp25_;
				ValaSourceReference* _tmp26_;
				ValaSourceReference* _tmp27_;
				gchar* _tmp28_;
				gchar* _tmp29_;
				ValaMethodType* _tmp30_;
				gchar* _tmp31_;
				gchar* _tmp32_;
				const gchar* _tmp33_;
				gchar* _tmp34_;
				gchar* _tmp35_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp24_ = base_method;
				_tmp25_ = vala_method_type_new (_tmp24_);
				base_method_type = _tmp25_;
				_tmp26_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
				_tmp27_ = _tmp26_;
				_tmp28_ = vala_symbol_get_full_name ((ValaSymbol*) self);
				_tmp29_ = _tmp28_;
				_tmp30_ = base_method_type;
				_tmp31_ = vala_data_type_to_prototype_string ((ValaDataType*) _tmp30_, NULL);
				_tmp32_ = _tmp31_;
				_tmp33_ = invalid_match;
				_tmp34_ = g_strdup_printf ("overriding method `%s' is incompatible with base method `%s': %s.", _tmp29_, _tmp32_, _tmp33_);
				_tmp35_ = _tmp34_;
				vala_report_error (_tmp27_, _tmp35_);
				_g_free0 (_tmp35_);
				_g_free0 (_tmp32_);
				_g_free0 (_tmp29_);
				_vala_code_node_unref0 (base_method_type);
				_g_free0 (invalid_match);
				_vala_code_node_unref0 (base_method);
				_vala_code_node_unref0 (sym);
				return;
			}
			_tmp36_ = base_method;
			self->priv->_base_method = _tmp36_;
			_g_free0 (invalid_match);
			_vala_code_node_unref0 (base_method);
			_vala_code_node_unref0 (sym);
			return;
		}
		_vala_code_node_unref0 (base_method);
	}
	_tmp37_ = cl;
	_tmp38_ = vala_class_get_base_class (_tmp37_);
	_tmp39_ = _tmp38_;
	if (_tmp39_ != NULL) {
		ValaClass* _tmp40_;
		ValaClass* _tmp41_;
		ValaClass* _tmp42_;
		_tmp40_ = cl;
		_tmp41_ = vala_class_get_base_class (_tmp40_);
		_tmp42_ = _tmp41_;
		vala_method_find_base_class_method (self, _tmp42_);
	}
	_vala_code_node_unref0 (sym);
}


static void vala_method_find_base_interface_method (ValaMethod* self, ValaClass* cl) {
	ValaDataType* _tmp85_;
	ValaDataType* _tmp86_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cl != NULL);
	{
		ValaList* _type_list = NULL;
		ValaClass* _tmp0_;
		ValaList* _tmp1_;
		gint _type_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _type_index = 0;
		_tmp0_ = cl;
		_tmp1_ = vala_class_get_base_types (_tmp0_);
		_type_list = _tmp1_;
		_tmp2_ = _type_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_type_size = _tmp4_;
		_type_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaDataType* type = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaDataType* _tmp11_;
			ValaTypeSymbol* _tmp12_;
			ValaTypeSymbol* _tmp13_;
			_tmp5_ = _type_index;
			_type_index = _tmp5_ + 1;
			_tmp6_ = _type_index;
			_tmp7_ = _type_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _type_list;
			_tmp9_ = _type_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			type = (ValaDataType*) _tmp10_;
			_tmp11_ = type;
			_tmp12_ = vala_data_type_get_data_type (_tmp11_);
			_tmp13_ = _tmp12_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, VALA_TYPE_INTERFACE)) {
				gboolean _tmp14_ = FALSE;
				ValaDataType* _tmp15_;
				ValaDataType* _tmp16_;
				ValaSymbol* sym = NULL;
				ValaDataType* _tmp24_;
				ValaTypeSymbol* _tmp25_;
				ValaTypeSymbol* _tmp26_;
				ValaScope* _tmp27_;
				ValaScope* _tmp28_;
				const gchar* _tmp29_;
				const gchar* _tmp30_;
				ValaSymbol* _tmp31_;
				ValaSymbol* _tmp32_;
				ValaSymbol* _tmp39_;
				_tmp15_ = vala_method_get_base_interface_type (self);
				_tmp16_ = _tmp15_;
				if (_tmp16_ != NULL) {
					ValaDataType* _tmp17_;
					ValaDataType* _tmp18_;
					ValaTypeSymbol* _tmp19_;
					ValaTypeSymbol* _tmp20_;
					ValaDataType* _tmp21_;
					ValaTypeSymbol* _tmp22_;
					ValaTypeSymbol* _tmp23_;
					_tmp17_ = vala_method_get_base_interface_type (self);
					_tmp18_ = _tmp17_;
					_tmp19_ = vala_data_type_get_data_type (_tmp18_);
					_tmp20_ = _tmp19_;
					_tmp21_ = type;
					_tmp22_ = vala_data_type_get_data_type (_tmp21_);
					_tmp23_ = _tmp22_;
					_tmp14_ = _tmp20_ != _tmp23_;
				} else {
					_tmp14_ = FALSE;
				}
				if (_tmp14_) {
					_vala_code_node_unref0 (type);
					continue;
				}
				_tmp24_ = type;
				_tmp25_ = vala_data_type_get_data_type (_tmp24_);
				_tmp26_ = _tmp25_;
				_tmp27_ = vala_symbol_get_scope ((ValaSymbol*) _tmp26_);
				_tmp28_ = _tmp27_;
				_tmp29_ = vala_symbol_get_name ((ValaSymbol*) self);
				_tmp30_ = _tmp29_;
				_tmp31_ = vala_scope_lookup (_tmp28_, _tmp30_);
				sym = _tmp31_;
				_tmp32_ = sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, VALA_TYPE_SIGNAL)) {
					ValaSignal* sig = NULL;
					ValaSymbol* _tmp33_;
					ValaSignal* _tmp34_;
					ValaSignal* _tmp35_;
					ValaMethod* _tmp36_;
					ValaMethod* _tmp37_;
					ValaSymbol* _tmp38_;
					_tmp33_ = sym;
					_tmp34_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, VALA_TYPE_SIGNAL, ValaSignal));
					sig = _tmp34_;
					_tmp35_ = sig;
					_tmp36_ = vala_signal_get_default_handler (_tmp35_);
					_tmp37_ = _tmp36_;
					_tmp38_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp37_);
					_vala_code_node_unref0 (sym);
					sym = _tmp38_;
					_vala_code_node_unref0 (sig);
				}
				_tmp39_ = sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, VALA_TYPE_METHOD)) {
					ValaMethod* base_method = NULL;
					ValaSymbol* _tmp40_;
					ValaMethod* _tmp41_;
					gboolean _tmp42_ = FALSE;
					ValaMethod* _tmp43_;
					gboolean _tmp44_;
					_tmp40_ = sym;
					_tmp41_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, VALA_TYPE_METHOD, ValaMethod));
					base_method = _tmp41_;
					_tmp43_ = base_method;
					_tmp44_ = _tmp43_->priv->_is_abstract;
					if (_tmp44_) {
						_tmp42_ = TRUE;
					} else {
						ValaMethod* _tmp45_;
						gboolean _tmp46_;
						_tmp45_ = base_method;
						_tmp46_ = _tmp45_->priv->_is_virtual;
						_tmp42_ = _tmp46_;
					}
					if (_tmp42_) {
						ValaDataType* _tmp47_;
						ValaDataType* _tmp48_;
						gchar* invalid_match = NULL;
						ValaMethod* _tmp69_;
						gchar* _tmp70_ = NULL;
						gboolean _tmp71_;
						ValaMethod* _tmp84_;
						_tmp47_ = vala_method_get_base_interface_type (self);
						_tmp48_ = _tmp47_;
						if (_tmp48_ == NULL) {
							gboolean has_explicit_implementation = FALSE;
							gboolean _tmp68_;
							has_explicit_implementation = FALSE;
							{
								ValaList* _m_list = NULL;
								ValaClass* _tmp49_;
								ValaList* _tmp50_;
								gint _m_size = 0;
								ValaList* _tmp51_;
								gint _tmp52_;
								gint _tmp53_;
								gint _m_index = 0;
								_tmp49_ = cl;
								_tmp50_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) _tmp49_);
								_m_list = _tmp50_;
								_tmp51_ = _m_list;
								_tmp52_ = vala_collection_get_size ((ValaCollection*) _tmp51_);
								_tmp53_ = _tmp52_;
								_m_size = _tmp53_;
								_m_index = -1;
								while (TRUE) {
									gint _tmp54_;
									gint _tmp55_;
									gint _tmp56_;
									ValaMethod* m = NULL;
									ValaList* _tmp57_;
									gint _tmp58_;
									gpointer _tmp59_;
									gboolean _tmp60_ = FALSE;
									ValaMethod* _tmp61_;
									ValaDataType* _tmp62_;
									ValaDataType* _tmp63_;
									_tmp54_ = _m_index;
									_m_index = _tmp54_ + 1;
									_tmp55_ = _m_index;
									_tmp56_ = _m_size;
									if (!(_tmp55_ < _tmp56_)) {
										break;
									}
									_tmp57_ = _m_list;
									_tmp58_ = _m_index;
									_tmp59_ = vala_list_get (_tmp57_, _tmp58_);
									m = (ValaMethod*) _tmp59_;
									_tmp61_ = m;
									_tmp62_ = vala_method_get_base_interface_type (_tmp61_);
									_tmp63_ = _tmp62_;
									if (_tmp63_ != NULL) {
										ValaMethod* _tmp64_;
										ValaMethod* _tmp65_;
										ValaMethod* _tmp66_;
										ValaMethod* _tmp67_;
										_tmp64_ = base_method;
										_tmp65_ = m;
										_tmp66_ = vala_method_get_base_interface_method (_tmp65_);
										_tmp67_ = _tmp66_;
										_tmp60_ = _tmp64_ == _tmp67_;
									} else {
										_tmp60_ = FALSE;
									}
									if (_tmp60_) {
										has_explicit_implementation = TRUE;
										_vala_code_node_unref0 (m);
										break;
									}
									_vala_code_node_unref0 (m);
								}
								_vala_iterable_unref0 (_m_list);
							}
							_tmp68_ = has_explicit_implementation;
							if (_tmp68_) {
								_vala_code_node_unref0 (base_method);
								_vala_code_node_unref0 (sym);
								_vala_code_node_unref0 (type);
								continue;
							}
						}
						invalid_match = NULL;
						_tmp69_ = base_method;
						_tmp71_ = vala_method_compatible (self, _tmp69_, &_tmp70_);
						_g_free0 (invalid_match);
						invalid_match = _tmp70_;
						if (!_tmp71_) {
							ValaMethodType* base_method_type = NULL;
							ValaMethod* _tmp72_;
							ValaMethodType* _tmp73_;
							ValaSourceReference* _tmp74_;
							ValaSourceReference* _tmp75_;
							gchar* _tmp76_;
							gchar* _tmp77_;
							ValaMethodType* _tmp78_;
							gchar* _tmp79_;
							gchar* _tmp80_;
							const gchar* _tmp81_;
							gchar* _tmp82_;
							gchar* _tmp83_;
							vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
							_tmp72_ = base_method;
							_tmp73_ = vala_method_type_new (_tmp72_);
							base_method_type = _tmp73_;
							_tmp74_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
							_tmp75_ = _tmp74_;
							_tmp76_ = vala_symbol_get_full_name ((ValaSymbol*) self);
							_tmp77_ = _tmp76_;
							_tmp78_ = base_method_type;
							_tmp79_ = vala_data_type_to_prototype_string ((ValaDataType*) _tmp78_, NULL);
							_tmp80_ = _tmp79_;
							_tmp81_ = invalid_match;
							_tmp82_ = g_strdup_printf ("overriding method `%s' is incompatible with base method `%s': %s.", _tmp77_, _tmp80_, _tmp81_);
							_tmp83_ = _tmp82_;
							vala_report_error (_tmp75_, _tmp83_);
							_g_free0 (_tmp83_);
							_g_free0 (_tmp80_);
							_g_free0 (_tmp77_);
							_vala_code_node_unref0 (base_method_type);
							_g_free0 (invalid_match);
							_vala_code_node_unref0 (base_method);
							_vala_code_node_unref0 (sym);
							_vala_code_node_unref0 (type);
							_vala_iterable_unref0 (_type_list);
							return;
						}
						_tmp84_ = base_method;
						self->priv->_base_interface_method = _tmp84_;
						_g_free0 (invalid_match);
						_vala_code_node_unref0 (base_method);
						_vala_code_node_unref0 (sym);
						_vala_code_node_unref0 (type);
						_vala_iterable_unref0 (_type_list);
						return;
					}
					_vala_code_node_unref0 (base_method);
				}
				_vala_code_node_unref0 (sym);
			}
			_vala_code_node_unref0 (type);
		}
		_vala_iterable_unref0 (_type_list);
	}
	_tmp85_ = vala_method_get_base_interface_type (self);
	_tmp86_ = _tmp85_;
	if (_tmp86_ != NULL) {
		ValaSourceReference* _tmp87_;
		ValaSourceReference* _tmp88_;
		gchar* _tmp89_;
		gchar* _tmp90_;
		gchar* _tmp91_;
		gchar* _tmp92_;
		_tmp87_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp88_ = _tmp87_;
		_tmp89_ = vala_symbol_get_full_name ((ValaSymbol*) self);
		_tmp90_ = _tmp89_;
		_tmp91_ = g_strdup_printf ("`%s': no suitable interface method found to implement", _tmp90_);
		_tmp92_ = _tmp91_;
		vala_report_error (_tmp88_, _tmp92_);
		_g_free0 (_tmp92_);
		_g_free0 (_tmp90_);
	}
}


static gpointer _vala_source_file_ref0 (gpointer self) {
	return self ? vala_source_file_ref (self) : NULL;
}


static gboolean vala_method_real_check (ValaCodeNode* base, ValaCodeContext* context) {
	ValaMethod * self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaAttribute* _tmp4_;
	ValaAttribute* _tmp5_;
	gboolean _tmp6_;
	ValaAttribute* _tmp10_;
	ValaAttribute* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp15_;
	gboolean _tmp68_ = FALSE;
	gboolean _tmp69_;
	gboolean _tmp109_ = FALSE;
	gboolean _tmp110_ = FALSE;
	gboolean _tmp111_;
	ValaSourceFile* old_source_file = NULL;
	ValaCodeContext* _tmp118_;
	ValaSemanticAnalyzer* _tmp119_;
	ValaSemanticAnalyzer* _tmp120_;
	ValaSourceFile* _tmp121_;
	ValaSourceFile* _tmp122_;
	ValaSourceFile* _tmp123_;
	ValaSymbol* old_symbol = NULL;
	ValaCodeContext* _tmp124_;
	ValaSemanticAnalyzer* _tmp125_;
	ValaSemanticAnalyzer* _tmp126_;
	ValaSymbol* _tmp127_;
	ValaSymbol* _tmp128_;
	ValaSymbol* _tmp129_;
	ValaSourceReference* _tmp130_;
	ValaSourceReference* _tmp131_;
	ValaCodeContext* _tmp139_;
	ValaSemanticAnalyzer* _tmp140_;
	ValaSemanticAnalyzer* _tmp141_;
	ValaDataType* _tmp142_;
	ValaDataType* _tmp143_;
	ValaCodeContext* _tmp144_;
	ValaAttribute* init_attr = NULL;
	ValaAttribute* _tmp145_;
	ValaAttribute* _tmp146_;
	ValaDataType* _tmp153_;
	ValaDataType* _tmp154_;
	gboolean _tmp158_ = FALSE;
	gboolean _tmp159_ = FALSE;
	gboolean _tmp160_ = FALSE;
	ValaList* _tmp161_;
	gint _tmp162_;
	gint _tmp163_;
	gboolean optional_param = FALSE;
	ValaLocalVariable* _tmp240_;
	ValaLocalVariable* _tmp241_;
	ValaList* _tmp245_;
	ValaList* _tmp259_;
	ValaBlock* _tmp273_;
	ValaBlock* _tmp274_;
	ValaCodeContext* _tmp278_;
	ValaSemanticAnalyzer* _tmp279_;
	ValaSemanticAnalyzer* _tmp280_;
	ValaStruct* _tmp281_;
	ValaStruct* _tmp282_;
	gboolean _tmp318_ = FALSE;
	gboolean _tmp319_ = FALSE;
	ValaDataType* _tmp320_;
	ValaDataType* _tmp321_;
	ValaCodeContext* _tmp369_;
	ValaSemanticAnalyzer* _tmp370_;
	ValaSemanticAnalyzer* _tmp371_;
	ValaSourceFile* _tmp372_;
	ValaCodeContext* _tmp373_;
	ValaSemanticAnalyzer* _tmp374_;
	ValaSemanticAnalyzer* _tmp375_;
	ValaSymbol* _tmp376_;
	gboolean _tmp377_ = FALSE;
	gboolean _tmp378_ = FALSE;
	gboolean _tmp379_ = FALSE;
	gboolean _tmp380_;
	gboolean _tmp381_;
	ValaCodeContext* _tmp397_;
	ValaSemanticAnalyzer* _tmp398_;
	ValaSemanticAnalyzer* _tmp399_;
	ValaDataType* _tmp400_;
	ValaDataType* _tmp401_;
	gboolean _tmp402_;
	ValaBlock* _tmp461_;
	ValaBlock* _tmp462_;
	ValaCodeContext* _tmp504_;
	gboolean _tmp505_;
	ValaAttribute* _tmp529_;
	ValaAttribute* _tmp530_;
	gboolean _tmp531_;
	gboolean _tmp532_;
	gboolean _tmp533_;
	self = (ValaMethod*) base;
	g_return_val_if_fail (context != NULL, FALSE);
	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
		_tmp3_ = _tmp2_;
		result = !_tmp3_;
		return result;
	}
	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
	_tmp4_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "DestroysInstance");
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_ != NULL;
	_vala_code_node_unref0 (_tmp5_);
	if (_tmp6_) {
		ValaParameter* _tmp7_;
		ValaDataType* _tmp8_;
		ValaDataType* _tmp9_;
		_tmp7_ = self->priv->_this_parameter;
		_tmp8_ = vala_variable_get_variable_type ((ValaVariable*) _tmp7_);
		_tmp9_ = _tmp8_;
		vala_data_type_set_value_owned (_tmp9_, TRUE);
	}
	_tmp10_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "NoThrow");
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_ != NULL;
	_vala_code_node_unref0 (_tmp11_);
	if (_tmp12_) {
		ValaList* _tmp13_;
		ValaList* _tmp14_;
		_tmp13_ = vala_code_node_get_error_types ((ValaCodeNode*) self);
		_tmp14_ = _tmp13_;
		vala_collection_clear ((ValaCollection*) _tmp14_);
		_vala_iterable_unref0 (_tmp14_);
	}
	_tmp15_ = self->priv->_is_abstract;
	if (_tmp15_) {
		ValaSymbol* _tmp16_;
		ValaSymbol* _tmp17_;
		_tmp16_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
		_tmp17_ = _tmp16_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, VALA_TYPE_CLASS)) {
			ValaClass* cl = NULL;
			ValaSymbol* _tmp18_;
			ValaSymbol* _tmp19_;
			ValaClass* _tmp20_;
			ValaClass* _tmp21_;
			gboolean _tmp22_;
			gboolean _tmp23_;
			_tmp18_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
			_tmp19_ = _tmp18_;
			_tmp20_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, VALA_TYPE_CLASS, ValaClass));
			cl = _tmp20_;
			_tmp21_ = cl;
			_tmp22_ = vala_class_get_is_abstract (_tmp21_);
			_tmp23_ = _tmp22_;
			if (!_tmp23_) {
				ValaSourceReference* _tmp24_;
				ValaSourceReference* _tmp25_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp24_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
				_tmp25_ = _tmp24_;
				vala_report_error (_tmp25_, "Abstract methods may not be declared in non-abstract classes");
				result = FALSE;
				_vala_code_node_unref0 (cl);
				return result;
			}
			_vala_code_node_unref0 (cl);
		} else {
			ValaSymbol* _tmp26_;
			ValaSymbol* _tmp27_;
			_tmp26_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
			_tmp27_ = _tmp26_;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, VALA_TYPE_INTERFACE)) {
				ValaSourceReference* _tmp28_;
				ValaSourceReference* _tmp29_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp28_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
				_tmp29_ = _tmp28_;
				vala_report_error (_tmp29_, "Abstract methods may not be declared outside of classes and interfaces");
				result = FALSE;
				return result;
			}
		}
	} else {
		gboolean _tmp30_;
		_tmp30_ = self->priv->_is_virtual;
		if (_tmp30_) {
			gboolean _tmp31_ = FALSE;
			ValaSymbol* _tmp32_;
			ValaSymbol* _tmp33_;
			ValaSymbol* _tmp38_;
			ValaSymbol* _tmp39_;
			_tmp32_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
			_tmp33_ = _tmp32_;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, VALA_TYPE_CLASS)) {
				ValaSymbol* _tmp34_;
				ValaSymbol* _tmp35_;
				_tmp34_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
				_tmp35_ = _tmp34_;
				_tmp31_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp35_, VALA_TYPE_INTERFACE);
			} else {
				_tmp31_ = FALSE;
			}
			if (_tmp31_) {
				ValaSourceReference* _tmp36_;
				ValaSourceReference* _tmp37_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp36_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
				_tmp37_ = _tmp36_;
				vala_report_error (_tmp37_, "Virtual methods may not be declared outside of classes and interfaces");
				result = FALSE;
				return result;
			}
			_tmp38_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
			_tmp39_ = _tmp38_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, VALA_TYPE_CLASS)) {
				ValaClass* cl = NULL;
				ValaSymbol* _tmp40_;
				ValaSymbol* _tmp41_;
				ValaClass* _tmp42_;
				gboolean _tmp43_ = FALSE;
				ValaClass* _tmp44_;
				gboolean _tmp45_;
				gboolean _tmp46_;
				_tmp40_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
				_tmp41_ = _tmp40_;
				_tmp42_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, VALA_TYPE_CLASS, ValaClass));
				cl = _tmp42_;
				_tmp44_ = cl;
				_tmp45_ = vala_class_get_is_compact (_tmp44_);
				_tmp46_ = _tmp45_;
				if (_tmp46_) {
					ValaClass* _tmp47_;
					ValaCodeContext* _tmp48_;
					ValaSemanticAnalyzer* _tmp49_;
					ValaSemanticAnalyzer* _tmp50_;
					ValaClass* _tmp51_;
					_tmp47_ = cl;
					_tmp48_ = context;
					_tmp49_ = vala_code_context_get_analyzer (_tmp48_);
					_tmp50_ = _tmp49_;
					_tmp51_ = _tmp50_->gsource_type;
					_tmp43_ = _tmp47_ != _tmp51_;
				} else {
					_tmp43_ = FALSE;
				}
				if (_tmp43_) {
					ValaSourceReference* _tmp52_;
					ValaSourceReference* _tmp53_;
					_tmp52_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
					_tmp53_ = _tmp52_;
					vala_report_error (_tmp53_, "Virtual methods may not be declared in compact classes");
					result = FALSE;
					_vala_code_node_unref0 (cl);
					return result;
				}
				_vala_code_node_unref0 (cl);
			}
		} else {
			gboolean _tmp54_;
			_tmp54_ = self->priv->_overrides;
			if (_tmp54_) {
				ValaSymbol* _tmp55_;
				ValaSymbol* _tmp56_;
				_tmp55_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
				_tmp56_ = _tmp55_;
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp56_, VALA_TYPE_CLASS)) {
					ValaSourceReference* _tmp57_;
					ValaSourceReference* _tmp58_;
					vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
					_tmp57_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
					_tmp58_ = _tmp57_;
					vala_report_error (_tmp58_, "Methods may not be overridden outside of classes");
					result = FALSE;
					return result;
				}
			} else {
				ValaSymbolAccessibility _tmp59_;
				ValaSymbolAccessibility _tmp60_;
				_tmp59_ = vala_symbol_get_access ((ValaSymbol*) self);
				_tmp60_ = _tmp59_;
				if (_tmp60_ == VALA_SYMBOL_ACCESSIBILITY_PROTECTED) {
					gboolean _tmp61_ = FALSE;
					ValaSymbol* _tmp62_;
					ValaSymbol* _tmp63_;
					_tmp62_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
					_tmp63_ = _tmp62_;
					if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp63_, VALA_TYPE_CLASS)) {
						ValaSymbol* _tmp64_;
						ValaSymbol* _tmp65_;
						_tmp64_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
						_tmp65_ = _tmp64_;
						_tmp61_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp65_, VALA_TYPE_INTERFACE);
					} else {
						_tmp61_ = FALSE;
					}
					if (_tmp61_) {
						ValaSourceReference* _tmp66_;
						ValaSourceReference* _tmp67_;
						vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
						_tmp66_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
						_tmp67_ = _tmp66_;
						vala_report_error (_tmp67_, "Protected methods may not be declared outside of classes and interface" \
"s");
						result = FALSE;
						return result;
					}
				}
			}
		}
	}
	_tmp69_ = self->priv->_is_abstract;
	if (_tmp69_) {
		ValaBlock* _tmp70_;
		ValaBlock* _tmp71_;
		_tmp70_ = vala_subroutine_get_body ((ValaSubroutine*) self);
		_tmp71_ = _tmp70_;
		_tmp68_ = _tmp71_ != NULL;
	} else {
		_tmp68_ = FALSE;
	}
	if (_tmp68_) {
		ValaSourceReference* _tmp72_;
		ValaSourceReference* _tmp73_;
		_tmp72_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp73_ = _tmp72_;
		vala_report_error (_tmp73_, "Abstract methods cannot have bodies");
	} else {
		gboolean _tmp74_ = FALSE;
		gboolean _tmp75_ = FALSE;
		gboolean _tmp76_ = FALSE;
		gboolean _tmp77_ = FALSE;
		gboolean _tmp78_;
		_tmp78_ = self->priv->_is_abstract;
		if (_tmp78_) {
			_tmp77_ = TRUE;
		} else {
			gboolean _tmp79_;
			_tmp79_ = self->priv->_is_virtual;
			_tmp77_ = _tmp79_;
		}
		if (_tmp77_) {
			gboolean _tmp80_;
			gboolean _tmp81_;
			_tmp80_ = vala_symbol_get_external ((ValaSymbol*) self);
			_tmp81_ = _tmp80_;
			_tmp76_ = _tmp81_;
		} else {
			_tmp76_ = FALSE;
		}
		if (_tmp76_) {
			gboolean _tmp82_;
			gboolean _tmp83_;
			_tmp82_ = vala_symbol_get_external_package ((ValaSymbol*) self);
			_tmp83_ = _tmp82_;
			_tmp75_ = !_tmp83_;
		} else {
			_tmp75_ = FALSE;
		}
		if (_tmp75_) {
			ValaSymbol* _tmp84_;
			ValaSymbol* _tmp85_;
			gboolean _tmp86_;
			gboolean _tmp87_;
			_tmp84_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
			_tmp85_ = _tmp84_;
			_tmp86_ = vala_symbol_get_external (_tmp85_);
			_tmp87_ = _tmp86_;
			_tmp74_ = !_tmp87_;
		} else {
			_tmp74_ = FALSE;
		}
		if (_tmp74_) {
			ValaSourceReference* _tmp88_;
			ValaSourceReference* _tmp89_;
			_tmp88_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp89_ = _tmp88_;
			vala_report_error (_tmp89_, "Extern methods cannot be abstract or virtual");
		} else {
			gboolean _tmp90_ = FALSE;
			gboolean _tmp91_;
			gboolean _tmp92_;
			_tmp91_ = vala_symbol_get_external ((ValaSymbol*) self);
			_tmp92_ = _tmp91_;
			if (_tmp92_) {
				ValaBlock* _tmp93_;
				ValaBlock* _tmp94_;
				_tmp93_ = vala_subroutine_get_body ((ValaSubroutine*) self);
				_tmp94_ = _tmp93_;
				_tmp90_ = _tmp94_ != NULL;
			} else {
				_tmp90_ = FALSE;
			}
			if (_tmp90_) {
				ValaSourceReference* _tmp95_;
				ValaSourceReference* _tmp96_;
				_tmp95_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
				_tmp96_ = _tmp95_;
				vala_report_error (_tmp96_, "Extern methods cannot have bodies");
			} else {
				gboolean _tmp97_ = FALSE;
				gboolean _tmp98_ = FALSE;
				gboolean _tmp99_ = FALSE;
				gboolean _tmp100_;
				_tmp100_ = self->priv->_is_abstract;
				if (!_tmp100_) {
					gboolean _tmp101_;
					gboolean _tmp102_;
					_tmp101_ = vala_symbol_get_external ((ValaSymbol*) self);
					_tmp102_ = _tmp101_;
					_tmp99_ = !_tmp102_;
				} else {
					_tmp99_ = FALSE;
				}
				if (_tmp99_) {
					ValaSourceFileType _tmp103_;
					ValaSourceFileType _tmp104_;
					_tmp103_ = vala_symbol_get_source_type ((ValaSymbol*) self);
					_tmp104_ = _tmp103_;
					_tmp98_ = _tmp104_ == VALA_SOURCE_FILE_TYPE_SOURCE;
				} else {
					_tmp98_ = FALSE;
				}
				if (_tmp98_) {
					ValaBlock* _tmp105_;
					ValaBlock* _tmp106_;
					_tmp105_ = vala_subroutine_get_body ((ValaSubroutine*) self);
					_tmp106_ = _tmp105_;
					_tmp97_ = _tmp106_ == NULL;
				} else {
					_tmp97_ = FALSE;
				}
				if (_tmp97_) {
					ValaSourceReference* _tmp107_;
					ValaSourceReference* _tmp108_;
					_tmp107_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
					_tmp108_ = _tmp107_;
					vala_report_error (_tmp108_, "Non-abstract, non-extern methods must have bodies");
				}
			}
		}
	}
	_tmp111_ = self->priv->_coroutine;
	if (_tmp111_) {
		gboolean _tmp112_;
		gboolean _tmp113_;
		_tmp112_ = vala_symbol_get_external_package ((ValaSymbol*) self);
		_tmp113_ = _tmp112_;
		_tmp110_ = !_tmp113_;
	} else {
		_tmp110_ = FALSE;
	}
	if (_tmp110_) {
		ValaCodeContext* _tmp114_;
		gboolean _tmp115_;
		_tmp114_ = context;
		_tmp115_ = vala_code_context_has_package (_tmp114_, "gio-2.0");
		_tmp109_ = !_tmp115_;
	} else {
		_tmp109_ = FALSE;
	}
	if (_tmp109_) {
		ValaSourceReference* _tmp116_;
		ValaSourceReference* _tmp117_;
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		_tmp116_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp117_ = _tmp116_;
		vala_report_error (_tmp117_, "gio-2.0 package required for async methods");
		result = FALSE;
		return result;
	}
	_tmp118_ = context;
	_tmp119_ = vala_code_context_get_analyzer (_tmp118_);
	_tmp120_ = _tmp119_;
	_tmp121_ = vala_semantic_analyzer_get_current_source_file (_tmp120_);
	_tmp122_ = _tmp121_;
	_tmp123_ = _vala_source_file_ref0 (_tmp122_);
	old_source_file = _tmp123_;
	_tmp124_ = context;
	_tmp125_ = vala_code_context_get_analyzer (_tmp124_);
	_tmp126_ = _tmp125_;
	_tmp127_ = vala_semantic_analyzer_get_current_symbol (_tmp126_);
	_tmp128_ = _tmp127_;
	_tmp129_ = _vala_code_node_ref0 (_tmp128_);
	old_symbol = _tmp129_;
	_tmp130_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
	_tmp131_ = _tmp130_;
	if (_tmp131_ != NULL) {
		ValaCodeContext* _tmp132_;
		ValaSemanticAnalyzer* _tmp133_;
		ValaSemanticAnalyzer* _tmp134_;
		ValaSourceReference* _tmp135_;
		ValaSourceReference* _tmp136_;
		ValaSourceFile* _tmp137_;
		ValaSourceFile* _tmp138_;
		_tmp132_ = context;
		_tmp133_ = vala_code_context_get_analyzer (_tmp132_);
		_tmp134_ = _tmp133_;
		_tmp135_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp136_ = _tmp135_;
		_tmp137_ = vala_source_reference_get_file (_tmp136_);
		_tmp138_ = _tmp137_;
		vala_semantic_analyzer_set_current_source_file (_tmp134_, _tmp138_);
	}
	_tmp139_ = context;
	_tmp140_ = vala_code_context_get_analyzer (_tmp139_);
	_tmp141_ = _tmp140_;
	vala_semantic_analyzer_set_current_symbol (_tmp141_, (ValaSymbol*) self);
	_tmp142_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp143_ = _tmp142_;
	_tmp144_ = context;
	vala_code_node_check ((ValaCodeNode*) _tmp143_, _tmp144_);
	_tmp145_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "ModuleInit");
	init_attr = _tmp145_;
	_tmp146_ = init_attr;
	if (_tmp146_ != NULL) {
		ValaSourceReference* _tmp147_;
		ValaSourceReference* _tmp148_;
		ValaSourceFile* _tmp149_;
		ValaSourceFile* _tmp150_;
		ValaCodeContext* _tmp151_;
		ValaCodeContext* _tmp152_;
		_tmp147_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp148_ = _tmp147_;
		_tmp149_ = vala_source_reference_get_file (_tmp148_);
		_tmp150_ = _tmp149_;
		_tmp151_ = vala_source_file_get_context (_tmp150_);
		_tmp152_ = _tmp151_;
		vala_code_context_set_module_init_method (_tmp152_, self);
	}
	_tmp153_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp154_ = _tmp153_;
	if (_tmp154_ != NULL) {
		ValaDataType* _tmp155_;
		ValaDataType* _tmp156_;
		ValaCodeContext* _tmp157_;
		_tmp155_ = vala_callable_get_return_type ((ValaCallable*) self);
		_tmp156_ = _tmp155_;
		_tmp157_ = context;
		vala_code_node_check ((ValaCodeNode*) _tmp156_, _tmp157_);
	}
	_tmp161_ = self->priv->parameters;
	_tmp162_ = vala_collection_get_size ((ValaCollection*) _tmp161_);
	_tmp163_ = _tmp162_;
	if (_tmp163_ == 1) {
		ValaList* _tmp164_;
		gpointer _tmp165_;
		ValaParameter* _tmp166_;
		gboolean _tmp167_;
		gboolean _tmp168_;
		_tmp164_ = self->priv->parameters;
		_tmp165_ = vala_list_get (_tmp164_, 0);
		_tmp166_ = (ValaParameter*) _tmp165_;
		_tmp167_ = vala_parameter_get_ellipsis (_tmp166_);
		_tmp168_ = _tmp167_;
		_tmp160_ = _tmp168_;
		_vala_code_node_unref0 (_tmp166_);
	} else {
		_tmp160_ = FALSE;
	}
	if (_tmp160_) {
		ValaBlock* _tmp169_;
		ValaBlock* _tmp170_;
		_tmp169_ = vala_subroutine_get_body ((ValaSubroutine*) self);
		_tmp170_ = _tmp169_;
		_tmp159_ = _tmp170_ != NULL;
	} else {
		_tmp159_ = FALSE;
	}
	if (_tmp159_) {
		ValaMemberBinding _tmp171_;
		_tmp171_ = self->priv->_binding;
		_tmp158_ = _tmp171_ != VALA_MEMBER_BINDING_INSTANCE;
	} else {
		_tmp158_ = FALSE;
	}
	if (_tmp158_) {
		ValaList* _tmp172_;
		gpointer _tmp173_;
		ValaParameter* _tmp174_;
		ValaSourceReference* _tmp175_;
		ValaSourceReference* _tmp176_;
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		_tmp172_ = self->priv->parameters;
		_tmp173_ = vala_list_get (_tmp172_, 0);
		_tmp174_ = (ValaParameter*) _tmp173_;
		_tmp175_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp174_);
		_tmp176_ = _tmp175_;
		vala_report_error (_tmp176_, "Named parameter required before `...'");
		_vala_code_node_unref0 (_tmp174_);
	}
	optional_param = FALSE;
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp177_;
		ValaList* _tmp178_;
		gint _param_size = 0;
		ValaList* _tmp179_;
		gint _tmp180_;
		gint _tmp181_;
		gint _param_index = 0;
		_tmp177_ = self->priv->parameters;
		_tmp178_ = _vala_iterable_ref0 (_tmp177_);
		_param_list = _tmp178_;
		_tmp179_ = _param_list;
		_tmp180_ = vala_collection_get_size ((ValaCollection*) _tmp179_);
		_tmp181_ = _tmp180_;
		_param_size = _tmp181_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp182_;
			gint _tmp183_;
			gint _tmp184_;
			ValaParameter* param = NULL;
			ValaList* _tmp185_;
			gint _tmp186_;
			gpointer _tmp187_;
			ValaParameter* _tmp188_;
			ValaCodeContext* _tmp189_;
			gboolean _tmp190_ = FALSE;
			gboolean _tmp191_;
			gboolean _tmp198_;
			gboolean _tmp199_ = FALSE;
			gboolean _tmp200_ = FALSE;
			gboolean _tmp201_;
			_tmp182_ = _param_index;
			_param_index = _tmp182_ + 1;
			_tmp183_ = _param_index;
			_tmp184_ = _param_size;
			if (!(_tmp183_ < _tmp184_)) {
				break;
			}
			_tmp185_ = _param_list;
			_tmp186_ = _param_index;
			_tmp187_ = vala_list_get (_tmp185_, _tmp186_);
			param = (ValaParameter*) _tmp187_;
			_tmp188_ = param;
			_tmp189_ = context;
			vala_code_node_check ((ValaCodeNode*) _tmp188_, _tmp189_);
			_tmp191_ = self->priv->_coroutine;
			if (_tmp191_) {
				ValaParameter* _tmp192_;
				ValaParameterDirection _tmp193_;
				ValaParameterDirection _tmp194_;
				_tmp192_ = param;
				_tmp193_ = vala_parameter_get_direction (_tmp192_);
				_tmp194_ = _tmp193_;
				_tmp190_ = _tmp194_ == VALA_PARAMETER_DIRECTION_REF;
			} else {
				_tmp190_ = FALSE;
			}
			if (_tmp190_) {
				ValaParameter* _tmp195_;
				ValaSourceReference* _tmp196_;
				ValaSourceReference* _tmp197_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp195_ = param;
				_tmp196_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp195_);
				_tmp197_ = _tmp196_;
				vala_report_error (_tmp197_, "Reference parameters are not supported for async methods");
			}
			_tmp198_ = self->priv->_coroutine;
			if (_tmp198_) {
				_vala_code_node_unref0 (param);
				continue;
			}
			_tmp201_ = optional_param;
			if (_tmp201_) {
				ValaParameter* _tmp202_;
				ValaExpression* _tmp203_;
				ValaExpression* _tmp204_;
				_tmp202_ = param;
				_tmp203_ = vala_variable_get_initializer ((ValaVariable*) _tmp202_);
				_tmp204_ = _tmp203_;
				_tmp200_ = _tmp204_ == NULL;
			} else {
				_tmp200_ = FALSE;
			}
			if (_tmp200_) {
				ValaParameter* _tmp205_;
				gboolean _tmp206_;
				gboolean _tmp207_;
				_tmp205_ = param;
				_tmp206_ = vala_parameter_get_ellipsis (_tmp205_);
				_tmp207_ = _tmp206_;
				_tmp199_ = !_tmp207_;
			} else {
				_tmp199_ = FALSE;
			}
			if (_tmp199_) {
				ValaParameter* _tmp208_;
				ValaSourceReference* _tmp209_;
				ValaSourceReference* _tmp210_;
				_tmp208_ = param;
				_tmp209_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp208_);
				_tmp210_ = _tmp209_;
				vala_report_warning (_tmp210_, "parameter without default follows parameter with default");
			} else {
				ValaParameter* _tmp211_;
				ValaExpression* _tmp212_;
				ValaExpression* _tmp213_;
				_tmp211_ = param;
				_tmp212_ = vala_variable_get_initializer ((ValaVariable*) _tmp211_);
				_tmp213_ = _tmp212_;
				if (_tmp213_ != NULL) {
					optional_param = TRUE;
				}
			}
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	{
		ValaList* _error_type_list = NULL;
		ValaList* _tmp214_;
		gint _error_type_size = 0;
		ValaList* _tmp215_;
		gint _tmp216_;
		gint _tmp217_;
		gint _error_type_index = 0;
		_tmp214_ = vala_code_node_get_error_types ((ValaCodeNode*) self);
		_error_type_list = _tmp214_;
		_tmp215_ = _error_type_list;
		_tmp216_ = vala_collection_get_size ((ValaCollection*) _tmp215_);
		_tmp217_ = _tmp216_;
		_error_type_size = _tmp217_;
		_error_type_index = -1;
		while (TRUE) {
			gint _tmp218_;
			gint _tmp219_;
			gint _tmp220_;
			ValaDataType* error_type = NULL;
			ValaList* _tmp221_;
			gint _tmp222_;
			gpointer _tmp223_;
			ValaDataType* _tmp224_;
			ValaCodeContext* _tmp225_;
			ValaCodeContext* _tmp226_;
			ValaSemanticAnalyzer* _tmp227_;
			ValaSemanticAnalyzer* _tmp228_;
			ValaDataType* _tmp229_;
			gboolean _tmp230_;
			_tmp218_ = _error_type_index;
			_error_type_index = _tmp218_ + 1;
			_tmp219_ = _error_type_index;
			_tmp220_ = _error_type_size;
			if (!(_tmp219_ < _tmp220_)) {
				break;
			}
			_tmp221_ = _error_type_list;
			_tmp222_ = _error_type_index;
			_tmp223_ = vala_list_get (_tmp221_, _tmp222_);
			error_type = (ValaDataType*) _tmp223_;
			_tmp224_ = error_type;
			_tmp225_ = context;
			vala_code_node_check ((ValaCodeNode*) _tmp224_, _tmp225_);
			_tmp226_ = context;
			_tmp227_ = vala_code_context_get_analyzer (_tmp226_);
			_tmp228_ = _tmp227_;
			_tmp229_ = error_type;
			_tmp230_ = vala_semantic_analyzer_is_type_accessible (_tmp228_, (ValaSymbol*) self, _tmp229_);
			if (!_tmp230_) {
				ValaSourceReference* _tmp231_;
				ValaSourceReference* _tmp232_;
				ValaDataType* _tmp233_;
				gchar* _tmp234_;
				gchar* _tmp235_;
				gchar* _tmp236_;
				gchar* _tmp237_;
				gchar* _tmp238_;
				gchar* _tmp239_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp231_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
				_tmp232_ = _tmp231_;
				_tmp233_ = error_type;
				_tmp234_ = vala_code_node_to_string ((ValaCodeNode*) _tmp233_);
				_tmp235_ = _tmp234_;
				_tmp236_ = vala_symbol_get_full_name ((ValaSymbol*) self);
				_tmp237_ = _tmp236_;
				_tmp238_ = g_strdup_printf ("error type `%s` is less accessible than method `%s`", _tmp235_, _tmp237_);
				_tmp239_ = _tmp238_;
				vala_report_error (_tmp232_, _tmp239_);
				_g_free0 (_tmp239_);
				_g_free0 (_tmp237_);
				_g_free0 (_tmp235_);
				result = FALSE;
				_vala_code_node_unref0 (error_type);
				_vala_iterable_unref0 (_error_type_list);
				_vala_code_node_unref0 (init_attr);
				_vala_code_node_unref0 (old_symbol);
				_vala_source_file_unref0 (old_source_file);
				return result;
			}
			_vala_code_node_unref0 (error_type);
		}
		_vala_iterable_unref0 (_error_type_list);
	}
	_tmp240_ = vala_subroutine_get_result_var ((ValaSubroutine*) self);
	_tmp241_ = _tmp240_;
	if (_tmp241_ != NULL) {
		ValaLocalVariable* _tmp242_;
		ValaLocalVariable* _tmp243_;
		ValaCodeContext* _tmp244_;
		_tmp242_ = vala_subroutine_get_result_var ((ValaSubroutine*) self);
		_tmp243_ = _tmp242_;
		_tmp244_ = context;
		vala_code_node_check ((ValaCodeNode*) _tmp243_, _tmp244_);
	}
	_tmp245_ = self->priv->preconditions;
	if (_tmp245_ != NULL) {
		{
			ValaList* _precondition_list = NULL;
			ValaList* _tmp246_;
			ValaList* _tmp247_;
			gint _precondition_size = 0;
			ValaList* _tmp248_;
			gint _tmp249_;
			gint _tmp250_;
			gint _precondition_index = 0;
			_tmp246_ = self->priv->preconditions;
			_tmp247_ = _vala_iterable_ref0 (_tmp246_);
			_precondition_list = _tmp247_;
			_tmp248_ = _precondition_list;
			_tmp249_ = vala_collection_get_size ((ValaCollection*) _tmp248_);
			_tmp250_ = _tmp249_;
			_precondition_size = _tmp250_;
			_precondition_index = -1;
			while (TRUE) {
				gint _tmp251_;
				gint _tmp252_;
				gint _tmp253_;
				ValaExpression* precondition = NULL;
				ValaList* _tmp254_;
				gint _tmp255_;
				gpointer _tmp256_;
				ValaExpression* _tmp257_;
				ValaCodeContext* _tmp258_;
				_tmp251_ = _precondition_index;
				_precondition_index = _tmp251_ + 1;
				_tmp252_ = _precondition_index;
				_tmp253_ = _precondition_size;
				if (!(_tmp252_ < _tmp253_)) {
					break;
				}
				_tmp254_ = _precondition_list;
				_tmp255_ = _precondition_index;
				_tmp256_ = vala_list_get (_tmp254_, _tmp255_);
				precondition = (ValaExpression*) _tmp256_;
				_tmp257_ = precondition;
				_tmp258_ = context;
				vala_code_node_check ((ValaCodeNode*) _tmp257_, _tmp258_);
				_vala_code_node_unref0 (precondition);
			}
			_vala_iterable_unref0 (_precondition_list);
		}
	}
	_tmp259_ = self->priv->postconditions;
	if (_tmp259_ != NULL) {
		{
			ValaList* _postcondition_list = NULL;
			ValaList* _tmp260_;
			ValaList* _tmp261_;
			gint _postcondition_size = 0;
			ValaList* _tmp262_;
			gint _tmp263_;
			gint _tmp264_;
			gint _postcondition_index = 0;
			_tmp260_ = self->priv->postconditions;
			_tmp261_ = _vala_iterable_ref0 (_tmp260_);
			_postcondition_list = _tmp261_;
			_tmp262_ = _postcondition_list;
			_tmp263_ = vala_collection_get_size ((ValaCollection*) _tmp262_);
			_tmp264_ = _tmp263_;
			_postcondition_size = _tmp264_;
			_postcondition_index = -1;
			while (TRUE) {
				gint _tmp265_;
				gint _tmp266_;
				gint _tmp267_;
				ValaExpression* postcondition = NULL;
				ValaList* _tmp268_;
				gint _tmp269_;
				gpointer _tmp270_;
				ValaExpression* _tmp271_;
				ValaCodeContext* _tmp272_;
				_tmp265_ = _postcondition_index;
				_postcondition_index = _tmp265_ + 1;
				_tmp266_ = _postcondition_index;
				_tmp267_ = _postcondition_size;
				if (!(_tmp266_ < _tmp267_)) {
					break;
				}
				_tmp268_ = _postcondition_list;
				_tmp269_ = _postcondition_index;
				_tmp270_ = vala_list_get (_tmp268_, _tmp269_);
				postcondition = (ValaExpression*) _tmp270_;
				_tmp271_ = postcondition;
				_tmp272_ = context;
				vala_code_node_check ((ValaCodeNode*) _tmp271_, _tmp272_);
				_vala_code_node_unref0 (postcondition);
			}
			_vala_iterable_unref0 (_postcondition_list);
		}
	}
	_tmp273_ = vala_subroutine_get_body ((ValaSubroutine*) self);
	_tmp274_ = _tmp273_;
	if (_tmp274_ != NULL) {
		ValaBlock* _tmp275_;
		ValaBlock* _tmp276_;
		ValaCodeContext* _tmp277_;
		_tmp275_ = vala_subroutine_get_body ((ValaSubroutine*) self);
		_tmp276_ = _tmp275_;
		_tmp277_ = context;
		vala_code_node_check ((ValaCodeNode*) _tmp276_, _tmp277_);
	}
	_tmp278_ = context;
	_tmp279_ = vala_code_context_get_analyzer (_tmp278_);
	_tmp280_ = _tmp279_;
	_tmp281_ = vala_semantic_analyzer_get_current_struct (_tmp280_);
	_tmp282_ = _tmp281_;
	if (_tmp282_ != NULL) {
		gboolean _tmp283_ = FALSE;
		gboolean _tmp284_ = FALSE;
		gboolean _tmp285_;
		_tmp285_ = self->priv->_is_abstract;
		if (_tmp285_) {
			_tmp284_ = TRUE;
		} else {
			gboolean _tmp286_;
			_tmp286_ = self->priv->_is_virtual;
			_tmp284_ = _tmp286_;
		}
		if (_tmp284_) {
			_tmp283_ = TRUE;
		} else {
			gboolean _tmp287_;
			_tmp287_ = self->priv->_overrides;
			_tmp283_ = _tmp287_;
		}
		if (_tmp283_) {
			ValaSourceReference* _tmp288_;
			ValaSourceReference* _tmp289_;
			gchar* _tmp290_;
			gchar* _tmp291_;
			gchar* _tmp292_;
			gchar* _tmp293_;
			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
			_tmp288_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp289_ = _tmp288_;
			_tmp290_ = vala_symbol_get_full_name ((ValaSymbol*) self);
			_tmp291_ = _tmp290_;
			_tmp292_ = g_strdup_printf ("A struct member `%s' cannot be marked as override, virtual, or abstrac" \
"t", _tmp291_);
			_tmp293_ = _tmp292_;
			vala_report_error (_tmp289_, _tmp293_);
			_g_free0 (_tmp293_);
			_g_free0 (_tmp291_);
			result = FALSE;
			_vala_code_node_unref0 (init_attr);
			_vala_code_node_unref0 (old_symbol);
			_vala_source_file_unref0 (old_source_file);
			return result;
		}
	} else {
		gboolean _tmp294_ = FALSE;
		gboolean _tmp295_;
		_tmp295_ = self->priv->_overrides;
		if (_tmp295_) {
			ValaMethod* _tmp296_;
			ValaMethod* _tmp297_;
			_tmp296_ = vala_method_get_base_method (self);
			_tmp297_ = _tmp296_;
			_tmp294_ = _tmp297_ == NULL;
		} else {
			_tmp294_ = FALSE;
		}
		if (_tmp294_) {
			ValaSourceReference* _tmp298_;
			ValaSourceReference* _tmp299_;
			gchar* _tmp300_;
			gchar* _tmp301_;
			gchar* _tmp302_;
			gchar* _tmp303_;
			_tmp298_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp299_ = _tmp298_;
			_tmp300_ = vala_symbol_get_full_name ((ValaSymbol*) self);
			_tmp301_ = _tmp300_;
			_tmp302_ = g_strdup_printf ("`%s': no suitable method found to override", _tmp301_);
			_tmp303_ = _tmp302_;
			vala_report_error (_tmp299_, _tmp303_);
			_g_free0 (_tmp303_);
			_g_free0 (_tmp301_);
		} else {
			gboolean _tmp304_ = FALSE;
			gboolean _tmp305_ = FALSE;
			gboolean _tmp306_ = FALSE;
			gboolean _tmp307_;
			_tmp307_ = self->priv->_is_abstract;
			if (_tmp307_) {
				_tmp306_ = TRUE;
			} else {
				gboolean _tmp308_;
				_tmp308_ = self->priv->_is_virtual;
				_tmp306_ = _tmp308_;
			}
			if (_tmp306_) {
				_tmp305_ = TRUE;
			} else {
				gboolean _tmp309_;
				_tmp309_ = self->priv->_overrides;
				_tmp305_ = _tmp309_;
			}
			if (_tmp305_) {
				ValaSymbolAccessibility _tmp310_;
				ValaSymbolAccessibility _tmp311_;
				_tmp310_ = vala_symbol_get_access ((ValaSymbol*) self);
				_tmp311_ = _tmp310_;
				_tmp304_ = _tmp311_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
			} else {
				_tmp304_ = FALSE;
			}
			if (_tmp304_) {
				ValaSourceReference* _tmp312_;
				ValaSourceReference* _tmp313_;
				gchar* _tmp314_;
				gchar* _tmp315_;
				gchar* _tmp316_;
				gchar* _tmp317_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp312_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
				_tmp313_ = _tmp312_;
				_tmp314_ = vala_symbol_get_full_name ((ValaSymbol*) self);
				_tmp315_ = _tmp314_;
				_tmp316_ = g_strdup_printf ("Private member `%s' cannot be marked as override, virtual, or abstract", _tmp315_);
				_tmp317_ = _tmp316_;
				vala_report_error (_tmp313_, _tmp317_);
				_g_free0 (_tmp317_);
				_g_free0 (_tmp315_);
				result = FALSE;
				_vala_code_node_unref0 (init_attr);
				_vala_code_node_unref0 (old_symbol);
				_vala_source_file_unref0 (old_source_file);
				return result;
			}
		}
	}
	_tmp320_ = vala_method_get_base_interface_type (self);
	_tmp321_ = _tmp320_;
	if (_tmp321_ != NULL) {
		ValaMethod* _tmp322_;
		ValaMethod* _tmp323_;
		_tmp322_ = vala_method_get_base_interface_method (self);
		_tmp323_ = _tmp322_;
		_tmp319_ = _tmp323_ != NULL;
	} else {
		_tmp319_ = FALSE;
	}
	if (_tmp319_) {
		ValaSymbol* _tmp324_;
		ValaSymbol* _tmp325_;
		_tmp324_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
		_tmp325_ = _tmp324_;
		_tmp318_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp325_, VALA_TYPE_CLASS);
	} else {
		_tmp318_ = FALSE;
	}
	if (_tmp318_) {
		ValaClass* cl = NULL;
		ValaSymbol* _tmp326_;
		ValaSymbol* _tmp327_;
		ValaClass* _tmp328_;
		_tmp326_ = vala_symbol_get_parent_symbol ((ValaSymbol*) self);
		_tmp327_ = _tmp326_;
		_tmp328_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp327_, VALA_TYPE_CLASS, ValaClass));
		cl = _tmp328_;
		{
			ValaList* _m_list = NULL;
			ValaClass* _tmp329_;
			ValaList* _tmp330_;
			gint _m_size = 0;
			ValaList* _tmp331_;
			gint _tmp332_;
			gint _tmp333_;
			gint _m_index = 0;
			_tmp329_ = cl;
			_tmp330_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) _tmp329_);
			_m_list = _tmp330_;
			_tmp331_ = _m_list;
			_tmp332_ = vala_collection_get_size ((ValaCollection*) _tmp331_);
			_tmp333_ = _tmp332_;
			_m_size = _tmp333_;
			_m_index = -1;
			while (TRUE) {
				gint _tmp334_;
				gint _tmp335_;
				gint _tmp336_;
				ValaMethod* m = NULL;
				ValaList* _tmp337_;
				gint _tmp338_;
				gpointer _tmp339_;
				gboolean _tmp340_ = FALSE;
				ValaMethod* _tmp341_;
				_tmp334_ = _m_index;
				_m_index = _tmp334_ + 1;
				_tmp335_ = _m_index;
				_tmp336_ = _m_size;
				if (!(_tmp335_ < _tmp336_)) {
					break;
				}
				_tmp337_ = _m_list;
				_tmp338_ = _m_index;
				_tmp339_ = vala_list_get (_tmp337_, _tmp338_);
				m = (ValaMethod*) _tmp339_;
				_tmp341_ = m;
				if (_tmp341_ != self) {
					ValaMethod* _tmp342_;
					ValaMethod* _tmp343_;
					ValaMethod* _tmp344_;
					ValaMethod* _tmp345_;
					ValaMethod* _tmp346_;
					_tmp342_ = m;
					_tmp343_ = vala_method_get_base_interface_method (_tmp342_);
					_tmp344_ = _tmp343_;
					_tmp345_ = vala_method_get_base_interface_method (self);
					_tmp346_ = _tmp345_;
					_tmp340_ = _tmp344_ == _tmp346_;
				} else {
					_tmp340_ = FALSE;
				}
				if (_tmp340_) {
					ValaMethod* _tmp347_;
					ValaMethod* _tmp348_;
					ValaSourceReference* _tmp349_;
					ValaSourceReference* _tmp350_;
					ValaClass* _tmp351_;
					gchar* _tmp352_;
					gchar* _tmp353_;
					ValaMethod* _tmp354_;
					ValaMethod* _tmp355_;
					gchar* _tmp356_;
					gchar* _tmp357_;
					gchar* _tmp358_;
					gchar* _tmp359_;
					ValaMethod* _tmp360_;
					ValaSourceReference* _tmp361_;
					ValaSourceReference* _tmp362_;
					ValaMethod* _tmp363_;
					ValaMethod* _tmp364_;
					gchar* _tmp365_;
					gchar* _tmp366_;
					gchar* _tmp367_;
					gchar* _tmp368_;
					_tmp347_ = m;
					vala_code_node_set_checked ((ValaCodeNode*) _tmp347_, TRUE);
					_tmp348_ = m;
					vala_code_node_set_error ((ValaCodeNode*) _tmp348_, TRUE);
					vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
					_tmp349_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
					_tmp350_ = _tmp349_;
					_tmp351_ = cl;
					_tmp352_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp351_);
					_tmp353_ = _tmp352_;
					_tmp354_ = vala_method_get_base_interface_method (self);
					_tmp355_ = _tmp354_;
					_tmp356_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp355_);
					_tmp357_ = _tmp356_;
					_tmp358_ = g_strdup_printf ("`%s' already contains an implementation for `%s'", _tmp353_, _tmp357_);
					_tmp359_ = _tmp358_;
					vala_report_error (_tmp350_, _tmp359_);
					_g_free0 (_tmp359_);
					_g_free0 (_tmp357_);
					_g_free0 (_tmp353_);
					_tmp360_ = m;
					_tmp361_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp360_);
					_tmp362_ = _tmp361_;
					_tmp363_ = vala_method_get_base_interface_method (self);
					_tmp364_ = _tmp363_;
					_tmp365_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp364_);
					_tmp366_ = _tmp365_;
					_tmp367_ = g_strdup_printf ("previous implementation of `%s' was here", _tmp366_);
					_tmp368_ = _tmp367_;
					vala_report_notice (_tmp362_, _tmp368_);
					_g_free0 (_tmp368_);
					_g_free0 (_tmp366_);
					result = FALSE;
					_vala_code_node_unref0 (m);
					_vala_iterable_unref0 (_m_list);
					_vala_code_node_unref0 (cl);
					_vala_code_node_unref0 (init_attr);
					_vala_code_node_unref0 (old_symbol);
					_vala_source_file_unref0 (old_source_file);
					return result;
				}
				_vala_code_node_unref0 (m);
			}
			_vala_iterable_unref0 (_m_list);
		}
		_vala_code_node_unref0 (cl);
	}
	_tmp369_ = context;
	_tmp370_ = vala_code_context_get_analyzer (_tmp369_);
	_tmp371_ = _tmp370_;
	_tmp372_ = old_source_file;
	vala_semantic_analyzer_set_current_source_file (_tmp371_, _tmp372_);
	_tmp373_ = context;
	_tmp374_ = vala_code_context_get_analyzer (_tmp373_);
	_tmp375_ = _tmp374_;
	_tmp376_ = old_symbol;
	vala_semantic_analyzer_set_current_symbol (_tmp375_, _tmp376_);
	_tmp380_ = vala_symbol_get_external_package ((ValaSymbol*) self);
	_tmp381_ = _tmp380_;
	if (!_tmp381_) {
		gboolean _tmp382_;
		_tmp382_ = self->priv->_overrides;
		_tmp379_ = !_tmp382_;
	} else {
		_tmp379_ = FALSE;
	}
	if (_tmp379_) {
		gboolean _tmp383_;
		gboolean _tmp384_;
		_tmp383_ = vala_symbol_get_hides ((ValaSymbol*) self);
		_tmp384_ = _tmp383_;
		_tmp378_ = !_tmp384_;
	} else {
		_tmp378_ = FALSE;
	}
	if (_tmp378_) {
		ValaSymbol* _tmp385_;
		ValaSymbol* _tmp386_;
		_tmp385_ = vala_symbol_get_hidden_member ((ValaSymbol*) self);
		_tmp386_ = _tmp385_;
		_tmp377_ = _tmp386_ != NULL;
		_vala_code_node_unref0 (_tmp386_);
	} else {
		_tmp377_ = FALSE;
	}
	if (_tmp377_) {
		ValaSourceReference* _tmp387_;
		ValaSourceReference* _tmp388_;
		gchar* _tmp389_;
		gchar* _tmp390_;
		ValaSymbol* _tmp391_;
		ValaSymbol* _tmp392_;
		gchar* _tmp393_;
		gchar* _tmp394_;
		gchar* _tmp395_;
		gchar* _tmp396_;
		_tmp387_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp388_ = _tmp387_;
		_tmp389_ = vala_symbol_get_full_name ((ValaSymbol*) self);
		_tmp390_ = _tmp389_;
		_tmp391_ = vala_symbol_get_hidden_member ((ValaSymbol*) self);
		_tmp392_ = _tmp391_;
		_tmp393_ = vala_symbol_get_full_name (_tmp392_);
		_tmp394_ = _tmp393_;
		_tmp395_ = g_strdup_printf ("%s hides inherited method `%s'. Use the `new' keyword if hiding was in" \
"tentional", _tmp390_, _tmp394_);
		_tmp396_ = _tmp395_;
		vala_report_warning (_tmp388_, _tmp396_);
		_g_free0 (_tmp396_);
		_g_free0 (_tmp394_);
		_vala_code_node_unref0 (_tmp392_);
		_g_free0 (_tmp390_);
	}
	_tmp397_ = context;
	_tmp398_ = vala_code_context_get_analyzer (_tmp397_);
	_tmp399_ = _tmp398_;
	_tmp400_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp401_ = _tmp400_;
	_tmp402_ = vala_semantic_analyzer_is_type_accessible (_tmp399_, (ValaSymbol*) self, _tmp401_);
	if (!_tmp402_) {
		ValaSourceReference* _tmp403_;
		ValaSourceReference* _tmp404_;
		ValaDataType* _tmp405_;
		ValaDataType* _tmp406_;
		gchar* _tmp407_;
		gchar* _tmp408_;
		gchar* _tmp409_;
		gchar* _tmp410_;
		gchar* _tmp411_;
		gchar* _tmp412_;
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		_tmp403_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp404_ = _tmp403_;
		_tmp405_ = vala_callable_get_return_type ((ValaCallable*) self);
		_tmp406_ = _tmp405_;
		_tmp407_ = vala_code_node_to_string ((ValaCodeNode*) _tmp406_);
		_tmp408_ = _tmp407_;
		_tmp409_ = vala_symbol_get_full_name ((ValaSymbol*) self);
		_tmp410_ = _tmp409_;
		_tmp411_ = g_strdup_printf ("return type `%s` is less accessible than method `%s`", _tmp408_, _tmp410_);
		_tmp412_ = _tmp411_;
		vala_report_error (_tmp404_, _tmp412_);
		_g_free0 (_tmp412_);
		_g_free0 (_tmp410_);
		_g_free0 (_tmp408_);
		result = FALSE;
		_vala_code_node_unref0 (init_attr);
		_vala_code_node_unref0 (old_symbol);
		_vala_source_file_unref0 (old_source_file);
		return result;
	}
	{
		ValaList* _precondition_list = NULL;
		ValaList* _tmp413_;
		gint _precondition_size = 0;
		ValaList* _tmp414_;
		gint _tmp415_;
		gint _tmp416_;
		gint _precondition_index = 0;
		_tmp413_ = vala_method_get_preconditions (self);
		_precondition_list = _tmp413_;
		_tmp414_ = _precondition_list;
		_tmp415_ = vala_collection_get_size ((ValaCollection*) _tmp414_);
		_tmp416_ = _tmp415_;
		_precondition_size = _tmp416_;
		_precondition_index = -1;
		while (TRUE) {
			gint _tmp417_;
			gint _tmp418_;
			gint _tmp419_;
			ValaExpression* precondition = NULL;
			ValaList* _tmp420_;
			gint _tmp421_;
			gpointer _tmp422_;
			ValaExpression* _tmp423_;
			gboolean _tmp424_;
			gboolean _tmp425_;
			ValaExpression* _tmp426_;
			ValaDataType* _tmp427_;
			ValaDataType* _tmp428_;
			ValaCodeContext* _tmp429_;
			ValaSemanticAnalyzer* _tmp430_;
			ValaSemanticAnalyzer* _tmp431_;
			ValaDataType* _tmp432_;
			gboolean _tmp433_;
			_tmp417_ = _precondition_index;
			_precondition_index = _tmp417_ + 1;
			_tmp418_ = _precondition_index;
			_tmp419_ = _precondition_size;
			if (!(_tmp418_ < _tmp419_)) {
				break;
			}
			_tmp420_ = _precondition_list;
			_tmp421_ = _precondition_index;
			_tmp422_ = vala_list_get (_tmp420_, _tmp421_);
			precondition = (ValaExpression*) _tmp422_;
			_tmp423_ = precondition;
			_tmp424_ = vala_code_node_get_error ((ValaCodeNode*) _tmp423_);
			_tmp425_ = _tmp424_;
			if (_tmp425_) {
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				result = FALSE;
				_vala_code_node_unref0 (precondition);
				_vala_iterable_unref0 (_precondition_list);
				_vala_code_node_unref0 (init_attr);
				_vala_code_node_unref0 (old_symbol);
				_vala_source_file_unref0 (old_source_file);
				return result;
			}
			_tmp426_ = precondition;
			_tmp427_ = vala_expression_get_value_type (_tmp426_);
			_tmp428_ = _tmp427_;
			_tmp429_ = context;
			_tmp430_ = vala_code_context_get_analyzer (_tmp429_);
			_tmp431_ = _tmp430_;
			_tmp432_ = _tmp431_->bool_type;
			_tmp433_ = vala_data_type_compatible (_tmp428_, _tmp432_);
			if (!_tmp433_) {
				ValaExpression* _tmp434_;
				ValaSourceReference* _tmp435_;
				ValaSourceReference* _tmp436_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp434_ = precondition;
				_tmp435_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp434_);
				_tmp436_ = _tmp435_;
				vala_report_error (_tmp436_, "Precondition must be boolean");
				result = FALSE;
				_vala_code_node_unref0 (precondition);
				_vala_iterable_unref0 (_precondition_list);
				_vala_code_node_unref0 (init_attr);
				_vala_code_node_unref0 (old_symbol);
				_vala_source_file_unref0 (old_source_file);
				return result;
			}
			_vala_code_node_unref0 (precondition);
		}
		_vala_iterable_unref0 (_precondition_list);
	}
	{
		ValaList* _postcondition_list = NULL;
		ValaList* _tmp437_;
		gint _postcondition_size = 0;
		ValaList* _tmp438_;
		gint _tmp439_;
		gint _tmp440_;
		gint _postcondition_index = 0;
		_tmp437_ = vala_method_get_postconditions (self);
		_postcondition_list = _tmp437_;
		_tmp438_ = _postcondition_list;
		_tmp439_ = vala_collection_get_size ((ValaCollection*) _tmp438_);
		_tmp440_ = _tmp439_;
		_postcondition_size = _tmp440_;
		_postcondition_index = -1;
		while (TRUE) {
			gint _tmp441_;
			gint _tmp442_;
			gint _tmp443_;
			ValaExpression* postcondition = NULL;
			ValaList* _tmp444_;
			gint _tmp445_;
			gpointer _tmp446_;
			ValaExpression* _tmp447_;
			gboolean _tmp448_;
			gboolean _tmp449_;
			ValaExpression* _tmp450_;
			ValaDataType* _tmp451_;
			ValaDataType* _tmp452_;
			ValaCodeContext* _tmp453_;
			ValaSemanticAnalyzer* _tmp454_;
			ValaSemanticAnalyzer* _tmp455_;
			ValaDataType* _tmp456_;
			gboolean _tmp457_;
			_tmp441_ = _postcondition_index;
			_postcondition_index = _tmp441_ + 1;
			_tmp442_ = _postcondition_index;
			_tmp443_ = _postcondition_size;
			if (!(_tmp442_ < _tmp443_)) {
				break;
			}
			_tmp444_ = _postcondition_list;
			_tmp445_ = _postcondition_index;
			_tmp446_ = vala_list_get (_tmp444_, _tmp445_);
			postcondition = (ValaExpression*) _tmp446_;
			_tmp447_ = postcondition;
			_tmp448_ = vala_code_node_get_error ((ValaCodeNode*) _tmp447_);
			_tmp449_ = _tmp448_;
			if (_tmp449_) {
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				result = FALSE;
				_vala_code_node_unref0 (postcondition);
				_vala_iterable_unref0 (_postcondition_list);
				_vala_code_node_unref0 (init_attr);
				_vala_code_node_unref0 (old_symbol);
				_vala_source_file_unref0 (old_source_file);
				return result;
			}
			_tmp450_ = postcondition;
			_tmp451_ = vala_expression_get_value_type (_tmp450_);
			_tmp452_ = _tmp451_;
			_tmp453_ = context;
			_tmp454_ = vala_code_context_get_analyzer (_tmp453_);
			_tmp455_ = _tmp454_;
			_tmp456_ = _tmp455_->bool_type;
			_tmp457_ = vala_data_type_compatible (_tmp452_, _tmp456_);
			if (!_tmp457_) {
				ValaExpression* _tmp458_;
				ValaSourceReference* _tmp459_;
				ValaSourceReference* _tmp460_;
				vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
				_tmp458_ = postcondition;
				_tmp459_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp458_);
				_tmp460_ = _tmp459_;
				vala_report_error (_tmp460_, "Postcondition must be boolean");
				result = FALSE;
				_vala_code_node_unref0 (postcondition);
				_vala_iterable_unref0 (_postcondition_list);
				_vala_code_node_unref0 (init_attr);
				_vala_code_node_unref0 (old_symbol);
				_vala_source_file_unref0 (old_source_file);
				return result;
			}
			_vala_code_node_unref0 (postcondition);
		}
		_vala_iterable_unref0 (_postcondition_list);
	}
	_tmp461_ = vala_subroutine_get_body ((ValaSubroutine*) self);
	_tmp462_ = _tmp461_;
	if (_tmp462_ != NULL) {
		{
			ValaList* _body_error_type_list = NULL;
			ValaBlock* _tmp463_;
			ValaBlock* _tmp464_;
			ValaList* _tmp465_;
			gint _body_error_type_size = 0;
			ValaList* _tmp466_;
			gint _tmp467_;
			gint _tmp468_;
			gint _body_error_type_index = 0;
			_tmp463_ = vala_subroutine_get_body ((ValaSubroutine*) self);
			_tmp464_ = _tmp463_;
			_tmp465_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp464_);
			_body_error_type_list = _tmp465_;
			_tmp466_ = _body_error_type_list;
			_tmp467_ = vala_collection_get_size ((ValaCollection*) _tmp466_);
			_tmp468_ = _tmp467_;
			_body_error_type_size = _tmp468_;
			_body_error_type_index = -1;
			while (TRUE) {
				gint _tmp469_;
				gint _tmp470_;
				gint _tmp471_;
				ValaDataType* body_error_type = NULL;
				ValaList* _tmp472_;
				gint _tmp473_;
				gpointer _tmp474_;
				gboolean can_propagate_error = FALSE;
				gboolean _tmp488_ = FALSE;
				ValaDataType* _tmp489_;
				gboolean is_dynamic_error = FALSE;
				gboolean _tmp493_ = FALSE;
				gboolean _tmp494_;
				_tmp469_ = _body_error_type_index;
				_body_error_type_index = _tmp469_ + 1;
				_tmp470_ = _body_error_type_index;
				_tmp471_ = _body_error_type_size;
				if (!(_tmp470_ < _tmp471_)) {
					break;
				}
				_tmp472_ = _body_error_type_list;
				_tmp473_ = _body_error_type_index;
				_tmp474_ = vala_list_get (_tmp472_, _tmp473_);
				body_error_type = (ValaDataType*) _tmp474_;
				can_propagate_error = FALSE;
				{
					ValaList* _method_error_type_list = NULL;
					ValaList* _tmp475_;
					gint _method_error_type_size = 0;
					ValaList* _tmp476_;
					gint _tmp477_;
					gint _tmp478_;
					gint _method_error_type_index = 0;
					_tmp475_ = vala_code_node_get_error_types ((ValaCodeNode*) self);
					_method_error_type_list = _tmp475_;
					_tmp476_ = _method_error_type_list;
					_tmp477_ = vala_collection_get_size ((ValaCollection*) _tmp476_);
					_tmp478_ = _tmp477_;
					_method_error_type_size = _tmp478_;
					_method_error_type_index = -1;
					while (TRUE) {
						gint _tmp479_;
						gint _tmp480_;
						gint _tmp481_;
						ValaDataType* method_error_type = NULL;
						ValaList* _tmp482_;
						gint _tmp483_;
						gpointer _tmp484_;
						ValaDataType* _tmp485_;
						ValaDataType* _tmp486_;
						gboolean _tmp487_;
						_tmp479_ = _method_error_type_index;
						_method_error_type_index = _tmp479_ + 1;
						_tmp480_ = _method_error_type_index;
						_tmp481_ = _method_error_type_size;
						if (!(_tmp480_ < _tmp481_)) {
							break;
						}
						_tmp482_ = _method_error_type_list;
						_tmp483_ = _method_error_type_index;
						_tmp484_ = vala_list_get (_tmp482_, _tmp483_);
						method_error_type = (ValaDataType*) _tmp484_;
						_tmp485_ = body_error_type;
						_tmp486_ = method_error_type;
						_tmp487_ = vala_data_type_compatible (_tmp485_, _tmp486_);
						if (_tmp487_) {
							can_propagate_error = TRUE;
						}
						_vala_code_node_unref0 (method_error_type);
					}
					_vala_iterable_unref0 (_method_error_type_list);
				}
				_tmp489_ = body_error_type;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp489_, VALA_TYPE_ERROR_TYPE)) {
					ValaDataType* _tmp490_;
					gboolean _tmp491_;
					gboolean _tmp492_;
					_tmp490_ = body_error_type;
					_tmp491_ = vala_error_type_get_dynamic_error (G_TYPE_CHECK_INSTANCE_CAST (_tmp490_, VALA_TYPE_ERROR_TYPE, ValaErrorType));
					_tmp492_ = _tmp491_;
					_tmp488_ = _tmp492_;
				} else {
					_tmp488_ = FALSE;
				}
				is_dynamic_error = _tmp488_;
				_tmp494_ = can_propagate_error;
				if (!_tmp494_) {
					gboolean _tmp495_;
					_tmp495_ = is_dynamic_error;
					_tmp493_ = !_tmp495_;
				} else {
					_tmp493_ = FALSE;
				}
				if (_tmp493_) {
					ValaDataType* _tmp496_;
					ValaSourceReference* _tmp497_;
					ValaSourceReference* _tmp498_;
					ValaDataType* _tmp499_;
					gchar* _tmp500_;
					gchar* _tmp501_;
					gchar* _tmp502_;
					gchar* _tmp503_;
					_tmp496_ = body_error_type;
					_tmp497_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp496_);
					_tmp498_ = _tmp497_;
					_tmp499_ = body_error_type;
					_tmp500_ = vala_code_node_to_string ((ValaCodeNode*) _tmp499_);
					_tmp501_ = _tmp500_;
					_tmp502_ = g_strdup_printf ("unhandled error `%s'", _tmp501_);
					_tmp503_ = _tmp502_;
					vala_report_warning (_tmp498_, _tmp503_);
					_g_free0 (_tmp503_);
					_g_free0 (_tmp501_);
				}
				_vala_code_node_unref0 (body_error_type);
			}
			_vala_iterable_unref0 (_body_error_type_list);
		}
	}
	_tmp504_ = context;
	_tmp505_ = vala_method_is_possible_entry_point (self, _tmp504_);
	if (_tmp505_) {
		ValaCodeContext* _tmp506_;
		ValaMethod* _tmp507_;
		ValaMethod* _tmp508_;
		ValaCodeContext* _tmp518_;
		gboolean _tmp519_;
		gboolean _tmp520_;
		gboolean _tmp523_;
		gboolean _tmp526_;
		_tmp506_ = context;
		_tmp507_ = vala_code_context_get_entry_point (_tmp506_);
		_tmp508_ = _tmp507_;
		if (_tmp508_ != NULL) {
			ValaSourceReference* _tmp509_;
			ValaSourceReference* _tmp510_;
			ValaCodeContext* _tmp511_;
			ValaMethod* _tmp512_;
			ValaMethod* _tmp513_;
			gchar* _tmp514_;
			gchar* _tmp515_;
			gchar* _tmp516_;
			gchar* _tmp517_;
			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
			_tmp509_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp510_ = _tmp509_;
			_tmp511_ = context;
			_tmp512_ = vala_code_context_get_entry_point (_tmp511_);
			_tmp513_ = _tmp512_;
			_tmp514_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp513_);
			_tmp515_ = _tmp514_;
			_tmp516_ = g_strdup_printf ("program already has an entry point `%s'", _tmp515_);
			_tmp517_ = _tmp516_;
			vala_report_error (_tmp510_, _tmp517_);
			_g_free0 (_tmp517_);
			_g_free0 (_tmp515_);
			result = FALSE;
			_vala_code_node_unref0 (init_attr);
			_vala_code_node_unref0 (old_symbol);
			_vala_source_file_unref0 (old_source_file);
			return result;
		}
		vala_method_set_entry_point (self, TRUE);
		_tmp518_ = context;
		vala_code_context_set_entry_point (_tmp518_, self);
		_tmp519_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) self);
		_tmp520_ = _tmp519_;
		if (_tmp520_) {
			ValaSourceReference* _tmp521_;
			ValaSourceReference* _tmp522_;
			_tmp521_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp522_ = _tmp521_;
			vala_report_error (_tmp522_, "\"main\" method cannot throw errors");
		}
		_tmp523_ = self->priv->_is_inline;
		if (_tmp523_) {
			ValaSourceReference* _tmp524_;
			ValaSourceReference* _tmp525_;
			_tmp524_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp525_ = _tmp524_;
			vala_report_error (_tmp525_, "\"main\" method cannot be inline");
		}
		_tmp526_ = self->priv->_coroutine;
		if (_tmp526_) {
			ValaSourceReference* _tmp527_;
			ValaSourceReference* _tmp528_;
			_tmp527_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp528_ = _tmp527_;
			vala_report_error (_tmp528_, "\"main\" method cannot be async");
		}
	}
	_tmp529_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "GtkCallback");
	_tmp530_ = _tmp529_;
	_tmp531_ = _tmp530_ != NULL;
	_vala_code_node_unref0 (_tmp530_);
	if (_tmp531_) {
		vala_symbol_set_used ((ValaSymbol*) self, TRUE);
	}
	_tmp532_ = vala_code_node_get_error ((ValaCodeNode*) self);
	_tmp533_ = _tmp532_;
	result = !_tmp533_;
	_vala_code_node_unref0 (init_attr);
	_vala_code_node_unref0 (old_symbol);
	_vala_source_file_unref0 (old_source_file);
	return result;
}


static gboolean vala_method_is_possible_entry_point (ValaMethod* self, ValaCodeContext* context) {
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaCodeContext* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ValaMemberBinding _tmp16_;
	ValaDataType* _tmp17_;
	ValaDataType* _tmp18_;
	ValaList* params = NULL;
	ValaList* _tmp29_;
	ValaList* _tmp30_;
	gint _tmp31_;
	gint _tmp32_;
	ValaList* _tmp33_;
	gint _tmp34_;
	gint _tmp35_;
	ValaIterator* params_it = NULL;
	ValaList* _tmp36_;
	ValaIterator* _tmp37_;
	ValaIterator* _tmp38_;
	ValaParameter* param = NULL;
	ValaIterator* _tmp39_;
	gpointer _tmp40_;
	ValaParameter* _tmp41_;
	ValaParameterDirection _tmp42_;
	ValaParameterDirection _tmp43_;
	ValaParameter* _tmp44_;
	ValaDataType* _tmp45_;
	ValaDataType* _tmp46_;
	ValaArrayType* array_type = NULL;
	ValaParameter* _tmp47_;
	ValaDataType* _tmp48_;
	ValaDataType* _tmp49_;
	ValaArrayType* _tmp50_;
	ValaArrayType* _tmp51_;
	ValaDataType* _tmp52_;
	ValaDataType* _tmp53_;
	ValaTypeSymbol* _tmp54_;
	ValaTypeSymbol* _tmp55_;
	ValaCodeContext* _tmp56_;
	ValaSemanticAnalyzer* _tmp57_;
	ValaSemanticAnalyzer* _tmp58_;
	ValaDataType* _tmp59_;
	ValaTypeSymbol* _tmp60_;
	ValaTypeSymbol* _tmp61_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (context != NULL, FALSE);
	_tmp0_ = vala_symbol_get_external_package ((ValaSymbol*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		result = FALSE;
		return result;
	}
	_tmp2_ = context;
	_tmp3_ = vala_code_context_get_entry_point_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == NULL) {
		gboolean _tmp5_ = FALSE;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp6_ = vala_symbol_get_name ((ValaSymbol*) self);
		_tmp7_ = _tmp6_;
		if (_tmp7_ == NULL) {
			_tmp5_ = TRUE;
		} else {
			const gchar* _tmp8_;
			const gchar* _tmp9_;
			_tmp8_ = vala_symbol_get_name ((ValaSymbol*) self);
			_tmp9_ = _tmp8_;
			_tmp5_ = g_strcmp0 (_tmp9_, "main") != 0;
		}
		if (_tmp5_) {
			result = FALSE;
			return result;
		}
	} else {
		gchar* _tmp10_;
		gchar* _tmp11_;
		ValaCodeContext* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		gboolean _tmp15_;
		_tmp10_ = vala_symbol_get_full_name ((ValaSymbol*) self);
		_tmp11_ = _tmp10_;
		_tmp12_ = context;
		_tmp13_ = vala_code_context_get_entry_point_name (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strcmp0 (_tmp11_, _tmp14_) != 0;
		_g_free0 (_tmp11_);
		if (_tmp15_) {
			result = FALSE;
			return result;
		}
	}
	_tmp16_ = self->priv->_binding;
	if (_tmp16_ == VALA_MEMBER_BINDING_INSTANCE) {
		result = FALSE;
		return result;
	}
	_tmp17_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp18_ = _tmp17_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, VALA_TYPE_VOID_TYPE)) {
	} else {
		ValaDataType* _tmp19_;
		ValaDataType* _tmp20_;
		ValaTypeSymbol* _tmp21_;
		ValaTypeSymbol* _tmp22_;
		ValaCodeContext* _tmp23_;
		ValaSemanticAnalyzer* _tmp24_;
		ValaSemanticAnalyzer* _tmp25_;
		ValaDataType* _tmp26_;
		ValaTypeSymbol* _tmp27_;
		ValaTypeSymbol* _tmp28_;
		_tmp19_ = vala_callable_get_return_type ((ValaCallable*) self);
		_tmp20_ = _tmp19_;
		_tmp21_ = vala_data_type_get_data_type (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = context;
		_tmp24_ = vala_code_context_get_analyzer (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = _tmp25_->int_type;
		_tmp27_ = vala_data_type_get_data_type (_tmp26_);
		_tmp28_ = _tmp27_;
		if (_tmp22_ == _tmp28_) {
		} else {
			result = FALSE;
			return result;
		}
	}
	_tmp29_ = vala_callable_get_parameters ((ValaCallable*) self);
	params = _tmp29_;
	_tmp30_ = params;
	_tmp31_ = vala_collection_get_size ((ValaCollection*) _tmp30_);
	_tmp32_ = _tmp31_;
	if (_tmp32_ == 0) {
		result = TRUE;
		_vala_iterable_unref0 (params);
		return result;
	}
	_tmp33_ = params;
	_tmp34_ = vala_collection_get_size ((ValaCollection*) _tmp33_);
	_tmp35_ = _tmp34_;
	if (_tmp35_ > 1) {
		result = FALSE;
		_vala_iterable_unref0 (params);
		return result;
	}
	_tmp36_ = params;
	_tmp37_ = vala_iterable_iterator ((ValaIterable*) _tmp36_);
	params_it = _tmp37_;
	_tmp38_ = params_it;
	vala_iterator_next (_tmp38_);
	_tmp39_ = params_it;
	_tmp40_ = vala_iterator_get (_tmp39_);
	param = (ValaParameter*) _tmp40_;
	_tmp41_ = param;
	_tmp42_ = vala_parameter_get_direction (_tmp41_);
	_tmp43_ = _tmp42_;
	if (_tmp43_ == VALA_PARAMETER_DIRECTION_OUT) {
		result = FALSE;
		_vala_code_node_unref0 (param);
		_vala_iterator_unref0 (params_it);
		_vala_iterable_unref0 (params);
		return result;
	}
	_tmp44_ = param;
	_tmp45_ = vala_variable_get_variable_type ((ValaVariable*) _tmp44_);
	_tmp46_ = _tmp45_;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp46_, VALA_TYPE_ARRAY_TYPE)) {
		result = FALSE;
		_vala_code_node_unref0 (param);
		_vala_iterator_unref0 (params_it);
		_vala_iterable_unref0 (params);
		return result;
	}
	_tmp47_ = param;
	_tmp48_ = vala_variable_get_variable_type ((ValaVariable*) _tmp47_);
	_tmp49_ = _tmp48_;
	_tmp50_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
	array_type = _tmp50_;
	_tmp51_ = array_type;
	_tmp52_ = vala_array_type_get_element_type (_tmp51_);
	_tmp53_ = _tmp52_;
	_tmp54_ = vala_data_type_get_data_type (_tmp53_);
	_tmp55_ = _tmp54_;
	_tmp56_ = context;
	_tmp57_ = vala_code_context_get_analyzer (_tmp56_);
	_tmp58_ = _tmp57_;
	_tmp59_ = _tmp58_->string_type;
	_tmp60_ = vala_data_type_get_data_type (_tmp59_);
	_tmp61_ = _tmp60_;
	if (_tmp55_ != _tmp61_) {
		result = FALSE;
		_vala_code_node_unref0 (array_type);
		_vala_code_node_unref0 (param);
		_vala_iterator_unref0 (params_it);
		_vala_iterable_unref0 (params);
		return result;
	}
	result = TRUE;
	_vala_code_node_unref0 (array_type);
	_vala_code_node_unref0 (param);
	_vala_iterator_unref0 (params_it);
	_vala_iterable_unref0 (params);
	return result;
}


gint vala_method_get_required_arguments (ValaMethod* self) {
	gint result = 0;
	gint n = 0;
	g_return_val_if_fail (self != NULL, 0);
	n = 0;
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp0_;
		ValaList* _tmp1_;
		gint _param_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _param_index = 0;
		_tmp0_ = self->priv->parameters;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_param_list = _tmp1_;
		_tmp2_ = _param_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_param_size = _tmp4_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaParameter* param = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			gboolean _tmp11_ = FALSE;
			ValaParameter* _tmp12_;
			ValaExpression* _tmp13_;
			ValaExpression* _tmp14_;
			gint _tmp18_;
			_tmp5_ = _param_index;
			_param_index = _tmp5_ + 1;
			_tmp6_ = _param_index;
			_tmp7_ = _param_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _param_list;
			_tmp9_ = _param_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			param = (ValaParameter*) _tmp10_;
			_tmp12_ = param;
			_tmp13_ = vala_variable_get_initializer ((ValaVariable*) _tmp12_);
			_tmp14_ = _tmp13_;
			if (_tmp14_ != NULL) {
				_tmp11_ = TRUE;
			} else {
				ValaParameter* _tmp15_;
				gboolean _tmp16_;
				gboolean _tmp17_;
				_tmp15_ = param;
				_tmp16_ = vala_parameter_get_ellipsis (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp11_ = _tmp17_;
			}
			if (_tmp11_) {
				_vala_code_node_unref0 (param);
				break;
			}
			_tmp18_ = n;
			n = _tmp18_ + 1;
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	result = n;
	return result;
}


ValaMethod* vala_method_get_end_method (ValaMethod* self) {
	ValaMethod* result = NULL;
	gboolean _tmp0_;
	ValaMethod* _tmp1_;
	ValaMethod* _tmp38_;
	ValaMethod* _tmp39_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_coroutine;
	_vala_assert (_tmp0_, "this.coroutine");
	_tmp1_ = self->priv->end_method;
	if (_tmp1_ == NULL) {
		ValaDataType* _tmp2_;
		ValaDataType* _tmp3_;
		ValaSourceReference* _tmp4_;
		ValaSourceReference* _tmp5_;
		ValaMethod* _tmp6_;
		ValaMethod* _tmp7_;
		ValaMethod* _tmp8_;
		ValaMethod* _tmp9_;
		ValaScope* _tmp10_;
		ValaScope* _tmp11_;
		_tmp2_ = vala_callable_get_return_type ((ValaCallable*) self);
		_tmp3_ = _tmp2_;
		_tmp4_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp5_ = _tmp4_;
		_tmp6_ = vala_method_new ("end", _tmp3_, _tmp5_, NULL);
		_vala_code_node_unref0 (self->priv->end_method);
		self->priv->end_method = _tmp6_;
		_tmp7_ = self->priv->end_method;
		vala_symbol_set_access ((ValaSymbol*) _tmp7_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
		_tmp8_ = self->priv->end_method;
		vala_symbol_set_external ((ValaSymbol*) _tmp8_, TRUE);
		_tmp9_ = self->priv->end_method;
		_tmp10_ = vala_symbol_get_scope ((ValaSymbol*) self);
		_tmp11_ = _tmp10_;
		vala_symbol_set_owner ((ValaSymbol*) _tmp9_, _tmp11_);
		{
			ValaList* _param_list = NULL;
			ValaList* _tmp12_;
			gint _param_size = 0;
			ValaList* _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			gint _param_index = 0;
			_tmp12_ = vala_method_get_async_end_parameters (self);
			_param_list = _tmp12_;
			_tmp13_ = _param_list;
			_tmp14_ = vala_collection_get_size ((ValaCollection*) _tmp13_);
			_tmp15_ = _tmp14_;
			_param_size = _tmp15_;
			_param_index = -1;
			while (TRUE) {
				gint _tmp16_;
				gint _tmp17_;
				gint _tmp18_;
				ValaParameter* param = NULL;
				ValaList* _tmp19_;
				gint _tmp20_;
				gpointer _tmp21_;
				ValaMethod* _tmp22_;
				ValaParameter* _tmp23_;
				ValaParameter* _tmp24_;
				ValaParameter* _tmp25_;
				_tmp16_ = _param_index;
				_param_index = _tmp16_ + 1;
				_tmp17_ = _param_index;
				_tmp18_ = _param_size;
				if (!(_tmp17_ < _tmp18_)) {
					break;
				}
				_tmp19_ = _param_list;
				_tmp20_ = _param_index;
				_tmp21_ = vala_list_get (_tmp19_, _tmp20_);
				param = (ValaParameter*) _tmp21_;
				_tmp22_ = self->priv->end_method;
				_tmp23_ = param;
				_tmp24_ = vala_parameter_copy (_tmp23_);
				_tmp25_ = _tmp24_;
				vala_callable_add_parameter ((ValaCallable*) _tmp22_, _tmp25_);
				_vala_code_node_unref0 (_tmp25_);
				_vala_code_node_unref0 (param);
			}
			_vala_iterable_unref0 (_param_list);
		}
		{
			ValaList* _param_list = NULL;
			ValaList* _tmp26_;
			gint _param_size = 0;
			ValaList* _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			gint _param_index = 0;
			_tmp26_ = vala_method_get_type_parameters (self);
			_param_list = _tmp26_;
			_tmp27_ = _param_list;
			_tmp28_ = vala_collection_get_size ((ValaCollection*) _tmp27_);
			_tmp29_ = _tmp28_;
			_param_size = _tmp29_;
			_param_index = -1;
			while (TRUE) {
				gint _tmp30_;
				gint _tmp31_;
				gint _tmp32_;
				ValaTypeParameter* param = NULL;
				ValaList* _tmp33_;
				gint _tmp34_;
				gpointer _tmp35_;
				ValaMethod* _tmp36_;
				ValaTypeParameter* _tmp37_;
				_tmp30_ = _param_index;
				_param_index = _tmp30_ + 1;
				_tmp31_ = _param_index;
				_tmp32_ = _param_size;
				if (!(_tmp31_ < _tmp32_)) {
					break;
				}
				_tmp33_ = _param_list;
				_tmp34_ = _param_index;
				_tmp35_ = vala_list_get (_tmp33_, _tmp34_);
				param = (ValaTypeParameter*) _tmp35_;
				_tmp36_ = self->priv->end_method;
				_tmp37_ = param;
				vala_method_add_type_parameter (_tmp36_, _tmp37_);
				_vala_code_node_unref0 (param);
			}
			_vala_iterable_unref0 (_param_list);
		}
	}
	_tmp38_ = self->priv->end_method;
	_tmp39_ = _vala_code_node_ref0 (_tmp38_);
	result = _tmp39_;
	return result;
}


ValaMethod* vala_method_get_callback_method (ValaMethod* self) {
	ValaMethod* result = NULL;
	gboolean _tmp0_;
	ValaMethod* _tmp1_;
	ValaMethod* _tmp24_;
	ValaMethod* _tmp25_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_coroutine;
	_vala_assert (_tmp0_, "this.coroutine");
	_tmp1_ = self->priv->callback_method;
	if (_tmp1_ == NULL) {
		ValaBooleanType* bool_type = NULL;
		ValaCodeContext* _tmp2_;
		ValaCodeContext* _tmp3_;
		ValaNamespace* _tmp4_;
		ValaNamespace* _tmp5_;
		ValaScope* _tmp6_;
		ValaScope* _tmp7_;
		ValaSymbol* _tmp8_;
		ValaStruct* _tmp9_;
		ValaBooleanType* _tmp10_;
		ValaBooleanType* _tmp11_;
		ValaBooleanType* _tmp12_;
		ValaBooleanType* _tmp13_;
		ValaSourceReference* _tmp14_;
		ValaSourceReference* _tmp15_;
		ValaMethod* _tmp16_;
		ValaMethod* _tmp17_;
		ValaMethod* _tmp18_;
		ValaMethod* _tmp19_;
		ValaMethod* _tmp20_;
		ValaScope* _tmp21_;
		ValaScope* _tmp22_;
		ValaMethod* _tmp23_;
		_tmp2_ = vala_code_context_get ();
		_tmp3_ = _tmp2_;
		_tmp4_ = vala_code_context_get_root (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = vala_symbol_get_scope ((ValaSymbol*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = vala_scope_lookup (_tmp7_, "bool");
		_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, VALA_TYPE_STRUCT, ValaStruct);
		_tmp10_ = vala_boolean_type_new (_tmp9_);
		_tmp11_ = _tmp10_;
		_vala_code_node_unref0 (_tmp9_);
		_vala_code_context_unref0 (_tmp3_);
		bool_type = _tmp11_;
		_tmp12_ = bool_type;
		vala_data_type_set_value_owned ((ValaDataType*) _tmp12_, TRUE);
		_tmp13_ = bool_type;
		_tmp14_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp15_ = _tmp14_;
		_tmp16_ = vala_method_new ("callback", (ValaDataType*) _tmp13_, _tmp15_, NULL);
		_vala_code_node_unref0 (self->priv->callback_method);
		self->priv->callback_method = _tmp16_;
		_tmp17_ = self->priv->callback_method;
		vala_symbol_set_access ((ValaSymbol*) _tmp17_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
		_tmp18_ = self->priv->callback_method;
		vala_symbol_set_external ((ValaSymbol*) _tmp18_, TRUE);
		_tmp19_ = self->priv->callback_method;
		vala_method_set_binding (_tmp19_, VALA_MEMBER_BINDING_INSTANCE);
		_tmp20_ = self->priv->callback_method;
		_tmp21_ = vala_symbol_get_scope ((ValaSymbol*) self);
		_tmp22_ = _tmp21_;
		vala_symbol_set_owner ((ValaSymbol*) _tmp20_, _tmp22_);
		_tmp23_ = self->priv->callback_method;
		vala_method_set_is_async_callback (_tmp23_, TRUE);
		_vala_code_node_unref0 (bool_type);
	}
	_tmp24_ = self->priv->callback_method;
	_tmp25_ = _vala_code_node_ref0 (_tmp24_);
	result = _tmp25_;
	return result;
}


ValaList* vala_method_get_async_begin_parameters (ValaMethod* self) {
	ValaList* result = NULL;
	gboolean _tmp0_;
	ValaSymbol* glib_ns = NULL;
	ValaCodeContext* _tmp1_;
	ValaCodeContext* _tmp2_;
	ValaNamespace* _tmp3_;
	ValaNamespace* _tmp4_;
	ValaScope* _tmp5_;
	ValaScope* _tmp6_;
	ValaSymbol* _tmp7_;
	ValaSymbol* _tmp8_;
	ValaArrayList* params = NULL;
	GEqualFunc _tmp9_;
	ValaArrayList* _tmp10_;
	ValaParameter* ellipsis = NULL;
	ValaDelegateType* callback_type = NULL;
	ValaSymbol* _tmp32_;
	ValaScope* _tmp33_;
	ValaScope* _tmp34_;
	ValaSymbol* _tmp35_;
	ValaDelegate* _tmp36_;
	ValaDelegateType* _tmp37_;
	ValaDelegateType* _tmp38_;
	ValaDelegateType* _tmp39_;
	ValaDelegateType* _tmp40_;
	ValaDelegateType* _tmp41_;
	ValaParameter* callback_param = NULL;
	ValaDelegateType* _tmp42_;
	ValaParameter* _tmp43_;
	ValaParameter* _tmp44_;
	ValaSourceReference* _tmp45_;
	ValaSourceReference* _tmp46_;
	ValaNullLiteral* _tmp47_;
	ValaNullLiteral* _tmp48_;
	ValaParameter* _tmp49_;
	ValaExpression* _tmp50_;
	ValaExpression* _tmp51_;
	ValaDelegateType* _tmp52_;
	ValaDataType* _tmp53_;
	ValaDataType* _tmp54_;
	ValaParameter* _tmp55_;
	ValaParameter* _tmp56_;
	ValaArrayList* _tmp57_;
	ValaParameter* _tmp58_;
	ValaParameter* _tmp59_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_coroutine;
	_vala_assert (_tmp0_, "this.coroutine");
	_tmp1_ = vala_code_context_get ();
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_code_context_get_root (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_symbol_get_scope ((ValaSymbol*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_scope_lookup (_tmp6_, "GLib");
	_tmp8_ = _tmp7_;
	_vala_code_context_unref0 (_tmp2_);
	glib_ns = _tmp8_;
	_tmp9_ = g_direct_equal;
	_tmp10_ = vala_array_list_new (VALA_TYPE_PARAMETER, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp9_);
	params = _tmp10_;
	ellipsis = NULL;
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp11_;
		ValaList* _tmp12_;
		gint _param_size = 0;
		ValaList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		gint _param_index = 0;
		_tmp11_ = self->priv->parameters;
		_tmp12_ = _vala_iterable_ref0 (_tmp11_);
		_param_list = _tmp12_;
		_tmp13_ = _param_list;
		_tmp14_ = vala_collection_get_size ((ValaCollection*) _tmp13_);
		_tmp15_ = _tmp14_;
		_param_size = _tmp15_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			ValaParameter* param = NULL;
			ValaList* _tmp19_;
			gint _tmp20_;
			gpointer _tmp21_;
			ValaParameter* _tmp22_;
			gboolean _tmp23_;
			gboolean _tmp24_;
			_tmp16_ = _param_index;
			_param_index = _tmp16_ + 1;
			_tmp17_ = _param_index;
			_tmp18_ = _param_size;
			if (!(_tmp17_ < _tmp18_)) {
				break;
			}
			_tmp19_ = _param_list;
			_tmp20_ = _param_index;
			_tmp21_ = vala_list_get (_tmp19_, _tmp20_);
			param = (ValaParameter*) _tmp21_;
			_tmp22_ = param;
			_tmp23_ = vala_parameter_get_ellipsis (_tmp22_);
			_tmp24_ = _tmp23_;
			if (_tmp24_) {
				ValaParameter* _tmp25_;
				ValaParameter* _tmp26_;
				_tmp25_ = param;
				_tmp26_ = _vala_code_node_ref0 (_tmp25_);
				_vala_code_node_unref0 (ellipsis);
				ellipsis = _tmp26_;
			} else {
				ValaParameter* _tmp27_;
				ValaParameterDirection _tmp28_;
				ValaParameterDirection _tmp29_;
				_tmp27_ = param;
				_tmp28_ = vala_parameter_get_direction (_tmp27_);
				_tmp29_ = _tmp28_;
				if (_tmp29_ == VALA_PARAMETER_DIRECTION_IN) {
					ValaArrayList* _tmp30_;
					ValaParameter* _tmp31_;
					_tmp30_ = params;
					_tmp31_ = param;
					vala_collection_add ((ValaCollection*) _tmp30_, _tmp31_);
				}
			}
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	_tmp32_ = glib_ns;
	_tmp33_ = vala_symbol_get_scope (_tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = vala_scope_lookup (_tmp34_, "AsyncReadyCallback");
	_tmp36_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, VALA_TYPE_DELEGATE, ValaDelegate);
	_tmp37_ = vala_delegate_type_new (_tmp36_);
	_tmp38_ = _tmp37_;
	_vala_code_node_unref0 (_tmp36_);
	callback_type = _tmp38_;
	_tmp39_ = callback_type;
	vala_data_type_set_nullable ((ValaDataType*) _tmp39_, TRUE);
	_tmp40_ = callback_type;
	vala_data_type_set_value_owned ((ValaDataType*) _tmp40_, TRUE);
	_tmp41_ = callback_type;
	vala_delegate_type_set_is_called_once (_tmp41_, TRUE);
	_tmp42_ = callback_type;
	_tmp43_ = vala_parameter_new ("_callback_", (ValaDataType*) _tmp42_, NULL);
	callback_param = _tmp43_;
	_tmp44_ = callback_param;
	_tmp45_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
	_tmp46_ = _tmp45_;
	_tmp47_ = vala_null_literal_new (_tmp46_);
	_tmp48_ = _tmp47_;
	vala_variable_set_initializer ((ValaVariable*) _tmp44_, (ValaExpression*) _tmp48_);
	_vala_code_node_unref0 (_tmp48_);
	_tmp49_ = callback_param;
	_tmp50_ = vala_variable_get_initializer ((ValaVariable*) _tmp49_);
	_tmp51_ = _tmp50_;
	_tmp52_ = callback_type;
	_tmp53_ = vala_data_type_copy ((ValaDataType*) _tmp52_);
	_tmp54_ = _tmp53_;
	vala_expression_set_target_type (_tmp51_, _tmp54_);
	_vala_code_node_unref0 (_tmp54_);
	_tmp55_ = callback_param;
	vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp55_, "CCode", "pos", (gdouble) -1, NULL);
	_tmp56_ = callback_param;
	vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp56_, "CCode", "delegate_target_pos", -0.9, NULL);
	_tmp57_ = params;
	_tmp58_ = callback_param;
	vala_collection_add ((ValaCollection*) _tmp57_, _tmp58_);
	_tmp59_ = ellipsis;
	if (_tmp59_ != NULL) {
		ValaArrayList* _tmp60_;
		ValaParameter* _tmp61_;
		_tmp60_ = params;
		_tmp61_ = ellipsis;
		vala_collection_add ((ValaCollection*) _tmp60_, _tmp61_);
	}
	result = (ValaList*) params;
	_vala_code_node_unref0 (callback_param);
	_vala_code_node_unref0 (callback_type);
	_vala_code_node_unref0 (ellipsis);
	_vala_code_node_unref0 (glib_ns);
	return result;
}


ValaList* vala_method_get_async_end_parameters (ValaMethod* self) {
	ValaList* result = NULL;
	gboolean _tmp0_;
	ValaArrayList* params = NULL;
	GEqualFunc _tmp1_;
	ValaArrayList* _tmp2_;
	ValaSymbol* glib_ns = NULL;
	ValaCodeContext* _tmp3_;
	ValaCodeContext* _tmp4_;
	ValaNamespace* _tmp5_;
	ValaNamespace* _tmp6_;
	ValaScope* _tmp7_;
	ValaScope* _tmp8_;
	ValaSymbol* _tmp9_;
	ValaSymbol* _tmp10_;
	ValaObjectType* result_type = NULL;
	ValaSymbol* _tmp11_;
	ValaScope* _tmp12_;
	ValaScope* _tmp13_;
	ValaSymbol* _tmp14_;
	ValaObjectTypeSymbol* _tmp15_;
	ValaObjectType* _tmp16_;
	ValaObjectType* _tmp17_;
	ValaParameter* result_param = NULL;
	ValaObjectType* _tmp18_;
	ValaParameter* _tmp19_;
	ValaParameter* _tmp20_;
	ValaArrayList* _tmp21_;
	ValaParameter* _tmp22_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_coroutine;
	_vala_assert (_tmp0_, "this.coroutine");
	_tmp1_ = g_direct_equal;
	_tmp2_ = vala_array_list_new (VALA_TYPE_PARAMETER, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp1_);
	params = _tmp2_;
	_tmp3_ = vala_code_context_get ();
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_code_context_get_root (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_symbol_get_scope ((ValaSymbol*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_scope_lookup (_tmp8_, "GLib");
	_tmp10_ = _tmp9_;
	_vala_code_context_unref0 (_tmp4_);
	glib_ns = _tmp10_;
	_tmp11_ = glib_ns;
	_tmp12_ = vala_symbol_get_scope (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_scope_lookup (_tmp13_, "AsyncResult");
	_tmp15_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol);
	_tmp16_ = vala_object_type_new (_tmp15_);
	_tmp17_ = _tmp16_;
	_vala_code_node_unref0 (_tmp15_);
	result_type = _tmp17_;
	_tmp18_ = result_type;
	_tmp19_ = vala_parameter_new ("_res_", (ValaDataType*) _tmp18_, NULL);
	result_param = _tmp19_;
	_tmp20_ = result_param;
	vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp20_, "CCode", "pos", 0.1, NULL);
	_tmp21_ = params;
	_tmp22_ = result_param;
	vala_collection_add ((ValaCollection*) _tmp21_, _tmp22_);
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp23_;
		ValaList* _tmp24_;
		gint _param_size = 0;
		ValaList* _tmp25_;
		gint _tmp26_;
		gint _tmp27_;
		gint _param_index = 0;
		_tmp23_ = self->priv->parameters;
		_tmp24_ = _vala_iterable_ref0 (_tmp23_);
		_param_list = _tmp24_;
		_tmp25_ = _param_list;
		_tmp26_ = vala_collection_get_size ((ValaCollection*) _tmp25_);
		_tmp27_ = _tmp26_;
		_param_size = _tmp27_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp28_;
			gint _tmp29_;
			gint _tmp30_;
			ValaParameter* param = NULL;
			ValaList* _tmp31_;
			gint _tmp32_;
			gpointer _tmp33_;
			ValaParameter* _tmp34_;
			ValaParameterDirection _tmp35_;
			ValaParameterDirection _tmp36_;
			_tmp28_ = _param_index;
			_param_index = _tmp28_ + 1;
			_tmp29_ = _param_index;
			_tmp30_ = _param_size;
			if (!(_tmp29_ < _tmp30_)) {
				break;
			}
			_tmp31_ = _param_list;
			_tmp32_ = _param_index;
			_tmp33_ = vala_list_get (_tmp31_, _tmp32_);
			param = (ValaParameter*) _tmp33_;
			_tmp34_ = param;
			_tmp35_ = vala_parameter_get_direction (_tmp34_);
			_tmp36_ = _tmp35_;
			if (_tmp36_ == VALA_PARAMETER_DIRECTION_OUT) {
				ValaArrayList* _tmp37_;
				ValaParameter* _tmp38_;
				_tmp37_ = params;
				_tmp38_ = param;
				vala_collection_add ((ValaCollection*) _tmp37_, _tmp38_);
			}
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	result = (ValaList*) params;
	_vala_code_node_unref0 (result_param);
	_vala_code_node_unref0 (result_type);
	_vala_code_node_unref0 (glib_ns);
	return result;
}


void vala_method_add_captured_variable (ValaMethod* self, ValaLocalVariable* local) {
	gboolean _tmp0_;
	ValaList* _tmp1_;
	ValaList* _tmp4_;
	ValaLocalVariable* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (local != NULL);
	_tmp0_ = self->priv->_closure;
	_vala_assert (_tmp0_, "this.closure");
	_tmp1_ = self->priv->captured_variables;
	if (_tmp1_ == NULL) {
		GEqualFunc _tmp2_;
		ValaArrayList* _tmp3_;
		_tmp2_ = g_direct_equal;
		_tmp3_ = vala_array_list_new (VALA_TYPE_LOCAL_VARIABLE, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp2_);
		_vala_iterable_unref0 (self->priv->captured_variables);
		self->priv->captured_variables = (ValaList*) _tmp3_;
	}
	_tmp4_ = self->priv->captured_variables;
	_tmp5_ = local;
	vala_collection_add ((ValaCollection*) _tmp4_, _tmp5_);
}


void vala_method_get_captured_variables (ValaMethod* self, ValaCollection* variables) {
	ValaList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (variables != NULL);
	_tmp0_ = self->priv->captured_variables;
	if (_tmp0_ != NULL) {
		{
			ValaList* _local_list = NULL;
			ValaList* _tmp1_;
			ValaList* _tmp2_;
			gint _local_size = 0;
			ValaList* _tmp3_;
			gint _tmp4_;
			gint _tmp5_;
			gint _local_index = 0;
			_tmp1_ = self->priv->captured_variables;
			_tmp2_ = _vala_iterable_ref0 (_tmp1_);
			_local_list = _tmp2_;
			_tmp3_ = _local_list;
			_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
			_tmp5_ = _tmp4_;
			_local_size = _tmp5_;
			_local_index = -1;
			while (TRUE) {
				gint _tmp6_;
				gint _tmp7_;
				gint _tmp8_;
				ValaLocalVariable* local = NULL;
				ValaList* _tmp9_;
				gint _tmp10_;
				gpointer _tmp11_;
				ValaCollection* _tmp12_;
				ValaLocalVariable* _tmp13_;
				_tmp6_ = _local_index;
				_local_index = _tmp6_ + 1;
				_tmp7_ = _local_index;
				_tmp8_ = _local_size;
				if (!(_tmp7_ < _tmp8_)) {
					break;
				}
				_tmp9_ = _local_list;
				_tmp10_ = _local_index;
				_tmp11_ = vala_list_get (_tmp9_, _tmp10_);
				local = (ValaLocalVariable*) _tmp11_;
				_tmp12_ = variables;
				_tmp13_ = local;
				vala_collection_add (_tmp12_, _tmp13_);
				_vala_code_node_unref0 (local);
			}
			_vala_iterable_unref0 (_local_list);
		}
	}
}


static void vala_method_real_get_defined_variables (ValaCodeNode* base, ValaCollection* collection) {
	ValaMethod * self;
	gboolean _tmp0_;
	self = (ValaMethod*) base;
	g_return_if_fail (collection != NULL);
	_tmp0_ = self->priv->_closure;
	if (_tmp0_) {
		ValaCollection* _tmp1_;
		_tmp1_ = collection;
		vala_method_get_captured_variables (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_COLLECTION, ValaCollection));
	}
}


gint vala_method_get_format_arg_index (ValaMethod* self) {
	gint result = 0;
	g_return_val_if_fail (self != NULL, 0);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_;
				ValaList* _tmp3_;
				gint _tmp4_;
				gint _tmp5_;
				ValaList* _tmp6_;
				gint _tmp7_;
				gpointer _tmp8_;
				ValaParameter* _tmp9_;
				gboolean _tmp10_;
				gboolean _tmp11_;
				gboolean _tmp12_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = i;
				_tmp3_ = self->priv->parameters;
				_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
				_tmp5_ = _tmp4_;
				if (!(_tmp2_ < _tmp5_)) {
					break;
				}
				_tmp6_ = self->priv->parameters;
				_tmp7_ = i;
				_tmp8_ = vala_list_get (_tmp6_, _tmp7_);
				_tmp9_ = (ValaParameter*) _tmp8_;
				_tmp10_ = vala_parameter_get_format_arg (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = _tmp11_;
				_vala_code_node_unref0 (_tmp9_);
				if (_tmp12_) {
					result = i;
					return result;
				}
			}
		}
	}
	result = -1;
	return result;
}


gboolean vala_method_has_error_type_parameter (ValaMethod* self) {
	gboolean result = FALSE;
	ValaList* _tmp0_;
	ValaList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	ValaMethod* _tmp7_;
	ValaMethod* _tmp8_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	ValaMethod* _tmp16_;
	ValaMethod* _tmp17_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_code_node_get_error_types ((ValaCodeNode*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_collection_get_size ((ValaCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ > 0;
	_vala_iterable_unref0 (_tmp1_);
	if (_tmp4_) {
		result = TRUE;
		return result;
	}
	_tmp7_ = vala_method_get_base_method (self);
	_tmp8_ = _tmp7_;
	if (_tmp8_ != NULL) {
		ValaMethod* _tmp9_;
		ValaMethod* _tmp10_;
		_tmp9_ = vala_method_get_base_method (self);
		_tmp10_ = _tmp9_;
		_tmp6_ = _tmp10_ != self;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		ValaMethod* _tmp11_;
		ValaMethod* _tmp12_;
		gboolean _tmp13_;
		_tmp11_ = vala_method_get_base_method (self);
		_tmp12_ = _tmp11_;
		_tmp13_ = vala_method_has_error_type_parameter (_tmp12_);
		_tmp5_ = _tmp13_;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		result = TRUE;
		return result;
	}
	_tmp16_ = vala_method_get_base_interface_method (self);
	_tmp17_ = _tmp16_;
	if (_tmp17_ != NULL) {
		ValaMethod* _tmp18_;
		ValaMethod* _tmp19_;
		_tmp18_ = vala_method_get_base_interface_method (self);
		_tmp19_ = _tmp18_;
		_tmp15_ = _tmp19_ != self;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		ValaMethod* _tmp20_;
		ValaMethod* _tmp21_;
		gboolean _tmp22_;
		_tmp20_ = vala_method_get_base_interface_method (self);
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_method_has_error_type_parameter (_tmp21_);
		_tmp14_ = _tmp22_;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


static ValaDataType* vala_method_real_get_return_type (ValaCallable* base) {
	ValaDataType* result;
	ValaMethod* self;
	ValaDataType* _tmp0_;
	self = (ValaMethod*) base;
	_tmp0_ = self->priv->_return_type;
	result = _tmp0_;
	return result;
}


static void vala_method_real_set_return_type (ValaCallable* base, ValaDataType* value) {
	ValaMethod* self;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	self = (ValaMethod*) base;
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_return_type);
	self->priv->_return_type = _tmp1_;
	_tmp2_ = self->priv->_return_type;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
}


static gboolean vala_method_real_get_has_result (ValaSubroutine* base) {
	gboolean result;
	ValaMethod* self;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	self = (ValaMethod*) base;
	_tmp0_ = vala_callable_get_return_type ((ValaCallable*) self);
	_tmp1_ = _tmp0_;
	result = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_VOID_TYPE);
	return result;
}


ValaMemberBinding vala_method_get_binding (ValaMethod* self) {
	ValaMemberBinding result;
	ValaMemberBinding _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_binding;
	result = _tmp0_;
	return result;
}


void vala_method_set_binding (ValaMethod* self, ValaMemberBinding value) {
	ValaMemberBinding _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_binding = _tmp0_;
}


gboolean vala_method_get_is_abstract (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_abstract;
	result = _tmp0_;
	return result;
}


void vala_method_set_is_abstract (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_is_abstract = _tmp0_;
}


gboolean vala_method_get_is_virtual (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_virtual;
	result = _tmp0_;
	return result;
}


void vala_method_set_is_virtual (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_is_virtual = _tmp0_;
}


gboolean vala_method_get_overrides (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_overrides;
	result = _tmp0_;
	return result;
}


void vala_method_set_overrides (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_overrides = _tmp0_;
}


gboolean vala_method_get_is_inline (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_inline;
	result = _tmp0_;
	return result;
}


void vala_method_set_is_inline (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_is_inline = _tmp0_;
}


gboolean vala_method_get_returns_floating_reference (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_code_node_get_attribute_bool ((ValaCodeNode*) self, "CCode", "returns_floating_reference", FALSE);
	result = _tmp0_;
	return result;
}


void vala_method_set_returns_floating_reference (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	vala_code_node_set_attribute_bool ((ValaCodeNode*) self, "CCode", "returns_floating_reference", _tmp0_, NULL);
}


gboolean vala_method_get_returns_modified_pointer (ValaMethod* self) {
	gboolean result;
	ValaAttribute* _tmp0_;
	ValaAttribute* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "ReturnsModifiedPointer");
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_ != NULL;
	_vala_code_node_unref0 (_tmp1_);
	result = _tmp2_;
	return result;
}


void vala_method_set_returns_modified_pointer (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	vala_code_node_set_attribute ((ValaCodeNode*) self, "ReturnsModifiedPointer", _tmp0_, NULL);
}


ValaMethod* vala_method_get_base_method (ValaMethod* self) {
	ValaMethod* result;
	ValaMethod* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	vala_method_find_base_methods (self);
	_tmp0_ = self->priv->_base_method;
	result = _tmp0_;
	return result;
}


ValaMethod* vala_method_get_base_interface_method (ValaMethod* self) {
	ValaMethod* result;
	ValaMethod* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	vala_method_find_base_methods (self);
	_tmp0_ = self->priv->_base_interface_method;
	result = _tmp0_;
	return result;
}


ValaDataType* vala_method_get_base_interface_type (ValaMethod* self) {
	ValaDataType* result;
	ValaDataType* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_base_interface_type;
	result = _tmp0_;
	return result;
}


void vala_method_set_base_interface_type (ValaMethod* self, ValaDataType* value) {
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_base_interface_type);
	self->priv->_base_interface_type = _tmp1_;
	_tmp2_ = self->priv->_base_interface_type;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
}


gboolean vala_method_get_entry_point (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_entry_point;
	result = _tmp0_;
	return result;
}


static void vala_method_set_entry_point (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_entry_point = _tmp0_;
}


ValaParameter* vala_method_get_this_parameter (ValaMethod* self) {
	ValaParameter* result;
	ValaParameter* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_this_parameter;
	result = _tmp0_;
	return result;
}


void vala_method_set_this_parameter (ValaMethod* self, ValaParameter* value) {
	ValaParameter* _tmp0_;
	ValaParameter* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_this_parameter);
	self->priv->_this_parameter = _tmp1_;
}


gboolean vala_method_get_printf_format (ValaMethod* self) {
	gboolean result;
	ValaAttribute* _tmp0_;
	ValaAttribute* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "PrintfFormat");
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_ != NULL;
	_vala_code_node_unref0 (_tmp1_);
	result = _tmp2_;
	return result;
}


void vala_method_set_printf_format (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	vala_code_node_set_attribute ((ValaCodeNode*) self, "PrintfFormat", _tmp0_, NULL);
}


gboolean vala_method_get_scanf_format (ValaMethod* self) {
	gboolean result;
	ValaAttribute* _tmp0_;
	ValaAttribute* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_code_node_get_attribute ((ValaCodeNode*) self, "ScanfFormat");
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_ != NULL;
	_vala_code_node_unref0 (_tmp1_);
	result = _tmp2_;
	return result;
}


void vala_method_set_scanf_format (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	vala_code_node_set_attribute ((ValaCodeNode*) self, "ScanfFormat", _tmp0_, NULL);
}


gboolean vala_method_get_has_construct_function (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_code_node_get_attribute_bool ((ValaCodeNode*) self, "CCode", "has_construct_function", TRUE);
	result = _tmp0_;
	return result;
}


void vala_method_set_has_construct_function (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	vala_code_node_set_attribute_bool ((ValaCodeNode*) self, "CCode", "has_construct_function", _tmp0_, NULL);
}


ValaSignal* vala_method_get_signal_reference (ValaMethod* self) {
	ValaSignal* result;
	ValaSignal* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_signal_reference;
	result = _tmp0_;
	return result;
}


void vala_method_set_signal_reference (ValaMethod* self, ValaSignal* value) {
	ValaSignal* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_signal_reference = _tmp0_;
}


gboolean vala_method_get_closure (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_closure;
	result = _tmp0_;
	return result;
}


void vala_method_set_closure (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_closure = _tmp0_;
}


gboolean vala_method_get_coroutine (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_coroutine;
	result = _tmp0_;
	return result;
}


void vala_method_set_coroutine (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_coroutine = _tmp0_;
}


gboolean vala_method_get_is_async_callback (ValaMethod* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_async_callback;
	result = _tmp0_;
	return result;
}


void vala_method_set_is_async_callback (ValaMethod* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_is_async_callback = _tmp0_;
}


static void vala_method_class_init (ValaMethodClass * klass) {
	vala_method_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeNodeClass *) klass)->finalize = vala_method_finalize;
	g_type_class_add_private (klass, sizeof (ValaMethodPrivate));
	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode *, ValaCodeVisitor*)) vala_method_real_accept;
	((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode *, ValaCodeVisitor*)) vala_method_real_accept_children;
	((ValaCodeNodeClass *) klass)->replace_type = (void (*) (ValaCodeNode *, ValaDataType*, ValaDataType*)) vala_method_real_replace_type;
	((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode *, ValaCodeContext*)) vala_method_real_check;
	((ValaCodeNodeClass *) klass)->get_defined_variables = (void (*) (ValaCodeNode *, ValaCollection*)) vala_method_real_get_defined_variables;
	VALA_SUBROUTINE_CLASS (klass)->get_has_result = vala_method_real_get_has_result;
}


static void vala_method_vala_callable_interface_init (ValaCallableIface * iface) {
	vala_method_vala_callable_parent_iface = g_type_interface_peek_parent (iface);
	iface->add_parameter = (void (*) (ValaCallable *, ValaParameter*)) vala_method_real_add_parameter;
	iface->get_parameters = (ValaList* (*) (ValaCallable *)) vala_method_real_get_parameters;
	iface->get_return_type = vala_method_real_get_return_type;
	iface->set_return_type = vala_method_real_set_return_type;
}


static void vala_method_instance_init (ValaMethod * self) {
	GEqualFunc _tmp0_;
	ValaArrayList* _tmp1_;
	self->priv = VALA_METHOD_GET_PRIVATE (self);
	self->priv->_binding = VALA_MEMBER_BINDING_INSTANCE;
	_tmp0_ = g_direct_equal;
	_tmp1_ = vala_array_list_new (VALA_TYPE_PARAMETER, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp0_);
	self->priv->parameters = (ValaList*) _tmp1_;
}


static void vala_method_finalize (ValaCodeNode * obj) {
	ValaMethod * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_METHOD, ValaMethod);
	_vala_iterable_unref0 (self->priv->type_parameters);
	_vala_code_node_unref0 (self->priv->_this_parameter);
	_vala_iterable_unref0 (self->priv->parameters);
	_vala_iterable_unref0 (self->priv->preconditions);
	_vala_iterable_unref0 (self->priv->postconditions);
	_vala_code_node_unref0 (self->priv->_return_type);
	_vala_code_node_unref0 (self->priv->_base_interface_type);
	_vala_code_node_unref0 (self->priv->callback_method);
	_vala_code_node_unref0 (self->priv->end_method);
	_vala_iterable_unref0 (self->priv->captured_variables);
	VALA_CODE_NODE_CLASS (vala_method_parent_class)->finalize (obj);
}


/**
 * Represents a type or namespace method.
 */
GType vala_method_get_type (void) {
	static volatile gsize vala_method_type_id__volatile = 0;
	if (g_once_init_enter (&vala_method_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaMethodClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_method_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaMethod), 0, (GInstanceInitFunc) vala_method_instance_init, NULL };
		static const GInterfaceInfo vala_callable_info = { (GInterfaceInitFunc) vala_method_vala_callable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType vala_method_type_id;
		vala_method_type_id = g_type_register_static (VALA_TYPE_SUBROUTINE, "ValaMethod", &g_define_type_info, 0);
		g_type_add_interface_static (vala_method_type_id, VALA_TYPE_CALLABLE, &vala_callable_info);
		g_once_init_leave (&vala_method_type_id__volatile, vala_method_type_id);
	}
	return vala_method_type_id__volatile;
}



