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

/* valaccodecontrolflowmodule.vala
 *
 * Copyright (C) 2006-2011  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 "valacodegen.h"
#include <vala.h>
#include <glib.h>
#include <valaccode.h>
#include <valagee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>

#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_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))

static gpointer vala_ccode_control_flow_module_parent_class = NULL;

static void vala_ccode_control_flow_module_real_visit_if_statement (ValaCodeVisitor* base,
                                                             ValaIfStatement* stmt);
static void vala_ccode_control_flow_module_visit_string_switch_statement (ValaCCodeControlFlowModule* self,
                                                                   ValaSwitchStatement* stmt);
static void vala_ccode_control_flow_module_real_visit_switch_statement (ValaCodeVisitor* base,
                                                                 ValaSwitchStatement* stmt);
static void vala_ccode_control_flow_module_real_visit_switch_label (ValaCodeVisitor* base,
                                                             ValaSwitchLabel* label);
static void vala_ccode_control_flow_module_real_visit_loop_statement (ValaCodeVisitor* base,
                                                               ValaLoopStatement* stmt);
static void vala_ccode_control_flow_module_real_visit_foreach_statement (ValaCodeVisitor* base,
                                                                  ValaForeachStatement* stmt);
static void vala_ccode_control_flow_module_real_visit_break_statement (ValaCodeVisitor* base,
                                                                ValaBreakStatement* stmt);
static void vala_ccode_control_flow_module_real_visit_continue_statement (ValaCodeVisitor* base,
                                                                   ValaContinueStatement* stmt);
static GType vala_ccode_control_flow_module_get_type_once (void);

static void
vala_ccode_control_flow_module_real_visit_if_statement (ValaCodeVisitor* base,
                                                        ValaIfStatement* stmt)
{
	ValaCCodeControlFlowModule * self;
	ValaCCodeFunction* _tmp0_;
	ValaCCodeFunction* _tmp1_;
	ValaExpression* _tmp2_;
	ValaExpression* _tmp3_;
	ValaCCodeExpression* _tmp4_;
	ValaBlock* _tmp5_;
	ValaBlock* _tmp6_;
	ValaBlock* _tmp7_;
	ValaBlock* _tmp8_;
	ValaCCodeFunction* _tmp13_;
	ValaCCodeFunction* _tmp14_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_if_statement_get_condition (stmt);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_get_cvalue (_tmp3_);
	vala_ccode_function_open_if (_tmp1_, _tmp4_);
	_tmp5_ = vala_if_statement_get_true_statement (stmt);
	_tmp6_ = _tmp5_;
	vala_code_node_emit ((ValaCodeNode*) _tmp6_, (ValaCodeGenerator*) self);
	_tmp7_ = vala_if_statement_get_false_statement (stmt);
	_tmp8_ = _tmp7_;
	if (_tmp8_ != NULL) {
		ValaCCodeFunction* _tmp9_;
		ValaCCodeFunction* _tmp10_;
		ValaBlock* _tmp11_;
		ValaBlock* _tmp12_;
		_tmp9_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp10_ = _tmp9_;
		vala_ccode_function_add_else (_tmp10_);
		_tmp11_ = vala_if_statement_get_false_statement (stmt);
		_tmp12_ = _tmp11_;
		vala_code_node_emit ((ValaCodeNode*) _tmp12_, (ValaCodeGenerator*) self);
	}
	_tmp13_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp14_ = _tmp13_;
	vala_ccode_function_close (_tmp14_);
}

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

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

static void
vala_ccode_control_flow_module_visit_string_switch_statement (ValaCCodeControlFlowModule* self,
                                                              ValaSwitchStatement* stmt)
{
	ValaTargetValue* temp_value = NULL;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	ValaTargetValue* _tmp4_;
	ValaCCodeExpression* ctemp = NULL;
	ValaTargetValue* _tmp5_;
	ValaCCodeExpression* _tmp6_;
	ValaCCodeExpression* _tmp7_;
	ValaCCodeAssignment* cinit = NULL;
	ValaCCodeExpression* _tmp8_;
	ValaExpression* _tmp9_;
	ValaExpression* _tmp10_;
	ValaCCodeExpression* _tmp11_;
	ValaCCodeAssignment* _tmp12_;
	ValaCCodeConstant* czero = NULL;
	ValaCCodeConstant* _tmp13_;
	ValaCCodeFunctionCall* free_call = NULL;
	ValaCCodeIdentifier* _tmp14_;
	ValaCCodeIdentifier* _tmp15_;
	ValaCCodeFunctionCall* _tmp16_;
	ValaCCodeFunctionCall* _tmp17_;
	ValaCCodeFunctionCall* _tmp18_;
	ValaCCodeExpression* _tmp19_;
	ValaCCodeBinaryExpression* cisnull = NULL;
	ValaCCodeConstant* _tmp20_;
	ValaCCodeConstant* _tmp21_;
	ValaCCodeExpression* _tmp22_;
	ValaCCodeBinaryExpression* _tmp23_;
	ValaCCodeBinaryExpression* _tmp24_;
	ValaCCodeFunctionCall* cquark = NULL;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeIdentifier* _tmp26_;
	ValaCCodeFunctionCall* _tmp27_;
	ValaCCodeFunctionCall* _tmp28_;
	ValaCCodeFunctionCall* _tmp29_;
	ValaCCodeExpression* _tmp30_;
	ValaCCodeConditionalExpression* ccond = NULL;
	ValaCCodeBinaryExpression* _tmp31_;
	ValaCCodeConstant* _tmp32_;
	ValaCCodeConstant* _tmp33_;
	ValaCCodeFunctionCall* _tmp34_;
	ValaCCodeConditionalExpression* _tmp35_;
	ValaCCodeConditionalExpression* _tmp36_;
	gint label_temp_id = 0;
	gint _tmp37_;
	gint _tmp38_;
	ValaDataType* _tmp39_;
	ValaTargetValue* _tmp40_;
	gint label_count = 0;
	ValaCCodeFunction* _tmp80_;
	ValaCCodeFunction* _tmp81_;
	ValaCCodeAssignment* _tmp82_;
	ValaTargetValue* _tmp83_;
	ValaCCodeExpression* _tmp84_;
	ValaCCodeExpression* _tmp85_;
	ValaCCodeExpression* _tmp86_;
	ValaCCodeConditionalExpression* _tmp87_;
	ValaCCodeAssignment* _tmp88_;
	ValaCCodeFunction* _tmp89_;
	ValaCCodeFunction* _tmp90_;
	ValaCCodeAssignment* _tmp91_;
	ValaExpression* _tmp92_;
	ValaExpression* _tmp93_;
	ValaDataType* _tmp94_;
	ValaDataType* _tmp95_;
	gboolean _tmp96_;
	gboolean _tmp97_;
	ValaSwitchSection* default_section = NULL;
	gint n = 0;
	ValaSwitchSection* _tmp185_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_switch_statement_get_expression (stmt);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_expression_get_value_type (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_ccode_base_module_create_temp_value ((ValaCCodeBaseModule*) self, _tmp3_, FALSE, (ValaCodeNode*) stmt, NULL);
	temp_value = _tmp4_;
	_tmp5_ = temp_value;
	_tmp6_ = vala_get_cvalue_ (_tmp5_);
	_tmp7_ = _vala_ccode_node_ref0 (_tmp6_);
	ctemp = _tmp7_;
	_tmp8_ = ctemp;
	_tmp9_ = vala_switch_statement_get_expression (stmt);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_get_cvalue (_tmp10_);
	_tmp12_ = vala_ccode_assignment_new (_tmp8_, _tmp11_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
	cinit = _tmp12_;
	_tmp13_ = vala_ccode_constant_new ("0");
	czero = _tmp13_;
	_tmp14_ = vala_ccode_identifier_new ("g_free");
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp15_);
	_tmp17_ = _tmp16_;
	_vala_ccode_node_unref0 (_tmp15_);
	free_call = _tmp17_;
	_tmp18_ = free_call;
	_tmp19_ = ctemp;
	vala_ccode_function_call_add_argument (_tmp18_, _tmp19_);
	_tmp20_ = vala_ccode_constant_new ("NULL");
	_tmp21_ = _tmp20_;
	_tmp22_ = ctemp;
	_tmp23_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp21_, _tmp22_);
	_tmp24_ = _tmp23_;
	_vala_ccode_node_unref0 (_tmp21_);
	cisnull = _tmp24_;
	_tmp25_ = vala_ccode_identifier_new ("g_quark_from_string");
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp26_);
	_tmp28_ = _tmp27_;
	_vala_ccode_node_unref0 (_tmp26_);
	cquark = _tmp28_;
	_tmp29_ = cquark;
	_tmp30_ = ctemp;
	vala_ccode_function_call_add_argument (_tmp29_, _tmp30_);
	_tmp31_ = cisnull;
	_tmp32_ = vala_ccode_constant_new ("0");
	_tmp33_ = _tmp32_;
	_tmp34_ = cquark;
	_tmp35_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) _tmp31_, (ValaCCodeExpression*) _tmp33_, (ValaCCodeExpression*) _tmp34_);
	_tmp36_ = _tmp35_;
	_vala_ccode_node_unref0 (_tmp33_);
	ccond = _tmp36_;
	_tmp37_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self);
	_tmp38_ = _tmp37_;
	vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp38_ + 1);
	label_temp_id = _tmp38_;
	_tmp39_ = ((ValaCCodeBaseModule*) self)->gquark_type;
	_tmp40_ = vala_ccode_base_module_create_temp_value ((ValaCCodeBaseModule*) self, _tmp39_, TRUE, (ValaCodeNode*) stmt, NULL);
	_vala_target_value_unref0 (temp_value);
	temp_value = _tmp40_;
	label_count = 0;
	{
		ValaList* _section_list = NULL;
		ValaList* _tmp41_;
		gint _section_size = 0;
		ValaList* _tmp42_;
		gint _tmp43_;
		gint _tmp44_;
		gint _section_index = 0;
		_tmp41_ = vala_switch_statement_get_sections (stmt);
		_section_list = _tmp41_;
		_tmp42_ = _section_list;
		_tmp43_ = vala_collection_get_size ((ValaCollection*) _tmp42_);
		_tmp44_ = _tmp43_;
		_section_size = _tmp44_;
		_section_index = -1;
		while (TRUE) {
			gint _tmp45_;
			gint _tmp46_;
			ValaSwitchSection* section = NULL;
			ValaList* _tmp47_;
			gpointer _tmp48_;
			ValaSwitchSection* _tmp49_;
			_section_index = _section_index + 1;
			_tmp45_ = _section_index;
			_tmp46_ = _section_size;
			if (!(_tmp45_ < _tmp46_)) {
				break;
			}
			_tmp47_ = _section_list;
			_tmp48_ = vala_list_get (_tmp47_, _section_index);
			section = (ValaSwitchSection*) _tmp48_;
			_tmp49_ = section;
			if (vala_switch_section_has_default_label (_tmp49_)) {
				_vala_code_node_unref0 (section);
				continue;
			}
			{
				ValaList* _label_list = NULL;
				ValaSwitchSection* _tmp50_;
				ValaList* _tmp51_;
				gint _label_size = 0;
				ValaList* _tmp52_;
				gint _tmp53_;
				gint _tmp54_;
				gint _label_index = 0;
				_tmp50_ = section;
				_tmp51_ = vala_switch_section_get_labels (_tmp50_);
				_label_list = _tmp51_;
				_tmp52_ = _label_list;
				_tmp53_ = vala_collection_get_size ((ValaCollection*) _tmp52_);
				_tmp54_ = _tmp53_;
				_label_size = _tmp54_;
				_label_index = -1;
				while (TRUE) {
					gint _tmp55_;
					gint _tmp56_;
					ValaSwitchLabel* label = NULL;
					ValaList* _tmp57_;
					gpointer _tmp58_;
					ValaSwitchLabel* _tmp59_;
					ValaExpression* _tmp60_;
					ValaExpression* _tmp61_;
					ValaCCodeExpression* cexpr = NULL;
					ValaSwitchLabel* _tmp62_;
					ValaExpression* _tmp63_;
					ValaExpression* _tmp64_;
					ValaCCodeExpression* _tmp65_;
					ValaCCodeExpression* _tmp66_;
					ValaCCodeExpression* _tmp67_;
					_label_index = _label_index + 1;
					_tmp55_ = _label_index;
					_tmp56_ = _label_size;
					if (!(_tmp55_ < _tmp56_)) {
						break;
					}
					_tmp57_ = _label_list;
					_tmp58_ = vala_list_get (_tmp57_, _label_index);
					label = (ValaSwitchLabel*) _tmp58_;
					_tmp59_ = label;
					_tmp60_ = vala_switch_label_get_expression (_tmp59_);
					_tmp61_ = _tmp60_;
					vala_code_node_emit ((ValaCodeNode*) _tmp61_, (ValaCodeGenerator*) self);
					_tmp62_ = label;
					_tmp63_ = vala_switch_label_get_expression (_tmp62_);
					_tmp64_ = _tmp63_;
					_tmp65_ = vala_get_cvalue (_tmp64_);
					_tmp66_ = _vala_ccode_node_ref0 (_tmp65_);
					cexpr = _tmp66_;
					_tmp67_ = cexpr;
					if (vala_ccode_base_module_is_constant_ccode_expression (_tmp67_)) {
						gchar* cname = NULL;
						gint _tmp68_;
						gint _tmp69_;
						gchar* _tmp70_;
						ValaCCodeFunction* _tmp71_;
						ValaCCodeFunction* _tmp72_;
						ValaDataType* _tmp73_;
						gchar* _tmp74_;
						gchar* _tmp75_;
						const gchar* _tmp76_;
						ValaCCodeConstant* _tmp77_;
						ValaCCodeVariableDeclarator* _tmp78_;
						ValaCCodeVariableDeclarator* _tmp79_;
						_tmp68_ = label_temp_id;
						_tmp69_ = label_count;
						label_count = _tmp69_ + 1;
						_tmp70_ = g_strdup_printf ("_tmp%d_label%d", _tmp68_, _tmp69_);
						cname = _tmp70_;
						_tmp71_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp72_ = _tmp71_;
						_tmp73_ = ((ValaCCodeBaseModule*) self)->gquark_type;
						_tmp74_ = vala_get_ccode_name ((ValaCodeNode*) _tmp73_);
						_tmp75_ = _tmp74_;
						_tmp76_ = cname;
						_tmp77_ = czero;
						_tmp78_ = vala_ccode_variable_declarator_new (_tmp76_, (ValaCCodeExpression*) _tmp77_, NULL);
						_tmp79_ = _tmp78_;
						vala_ccode_function_add_declaration (_tmp72_, _tmp75_, (ValaCCodeDeclarator*) _tmp79_, VALA_CCODE_MODIFIERS_STATIC);
						_vala_ccode_node_unref0 (_tmp79_);
						_g_free0 (_tmp75_);
						_g_free0 (cname);
					}
					_vala_ccode_node_unref0 (cexpr);
					_vala_code_node_unref0 (label);
				}
			}
			_vala_code_node_unref0 (section);
		}
	}
	_tmp80_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp81_ = _tmp80_;
	_tmp82_ = cinit;
	vala_ccode_function_add_expression (_tmp81_, (ValaCCodeExpression*) _tmp82_);
	_tmp83_ = temp_value;
	_tmp84_ = vala_get_cvalue_ (_tmp83_);
	_tmp85_ = _vala_ccode_node_ref0 (_tmp84_);
	_vala_ccode_node_unref0 (ctemp);
	ctemp = _tmp85_;
	_tmp86_ = ctemp;
	_tmp87_ = ccond;
	_tmp88_ = vala_ccode_assignment_new (_tmp86_, (ValaCCodeExpression*) _tmp87_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
	_vala_ccode_node_unref0 (cinit);
	cinit = _tmp88_;
	_tmp89_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp90_ = _tmp89_;
	_tmp91_ = cinit;
	vala_ccode_function_add_expression (_tmp90_, (ValaCCodeExpression*) _tmp91_);
	_tmp92_ = vala_switch_statement_get_expression (stmt);
	_tmp93_ = _tmp92_;
	_tmp94_ = vala_expression_get_value_type (_tmp93_);
	_tmp95_ = _tmp94_;
	_tmp96_ = vala_data_type_get_value_owned (_tmp95_);
	_tmp97_ = _tmp96_;
	if (_tmp97_) {
		ValaCCodeFunction* _tmp98_;
		ValaCCodeFunction* _tmp99_;
		ValaCCodeFunctionCall* _tmp100_;
		_tmp98_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp99_ = _tmp98_;
		_tmp100_ = free_call;
		vala_ccode_function_add_expression (_tmp99_, (ValaCCodeExpression*) _tmp100_);
	}
	default_section = NULL;
	label_count = 0;
	n = 0;
	{
		ValaList* _section_list = NULL;
		ValaList* _tmp101_;
		gint _section_size = 0;
		ValaList* _tmp102_;
		gint _tmp103_;
		gint _tmp104_;
		gint _section_index = 0;
		_tmp101_ = vala_switch_statement_get_sections (stmt);
		_section_list = _tmp101_;
		_tmp102_ = _section_list;
		_tmp103_ = vala_collection_get_size ((ValaCollection*) _tmp102_);
		_tmp104_ = _tmp103_;
		_section_size = _tmp104_;
		_section_index = -1;
		while (TRUE) {
			gint _tmp105_;
			gint _tmp106_;
			ValaSwitchSection* section = NULL;
			ValaList* _tmp107_;
			gpointer _tmp108_;
			ValaSwitchSection* _tmp109_;
			ValaCCodeBinaryExpression* cor = NULL;
			ValaCCodeFunction* _tmp175_;
			ValaCCodeFunction* _tmp176_;
			ValaCCodeConstant* _tmp177_;
			ValaCCodeConstant* _tmp178_;
			ValaCCodeFunction* _tmp179_;
			ValaCCodeFunction* _tmp180_;
			ValaSwitchSection* _tmp181_;
			ValaCCodeFunction* _tmp182_;
			ValaCCodeFunction* _tmp183_;
			gint _tmp184_;
			_section_index = _section_index + 1;
			_tmp105_ = _section_index;
			_tmp106_ = _section_size;
			if (!(_tmp105_ < _tmp106_)) {
				break;
			}
			_tmp107_ = _section_list;
			_tmp108_ = vala_list_get (_tmp107_, _section_index);
			section = (ValaSwitchSection*) _tmp108_;
			_tmp109_ = section;
			if (vala_switch_section_has_default_label (_tmp109_)) {
				ValaSwitchSection* _tmp110_;
				ValaSwitchSection* _tmp111_;
				_tmp110_ = section;
				_tmp111_ = _vala_code_node_ref0 (_tmp110_);
				_vala_code_node_unref0 (default_section);
				default_section = _tmp111_;
				_vala_code_node_unref0 (section);
				continue;
			}
			cor = NULL;
			{
				ValaList* _label_list = NULL;
				ValaSwitchSection* _tmp112_;
				ValaList* _tmp113_;
				gint _label_size = 0;
				ValaList* _tmp114_;
				gint _tmp115_;
				gint _tmp116_;
				gint _label_index = 0;
				_tmp112_ = section;
				_tmp113_ = vala_switch_section_get_labels (_tmp112_);
				_label_list = _tmp113_;
				_tmp114_ = _label_list;
				_tmp115_ = vala_collection_get_size ((ValaCollection*) _tmp114_);
				_tmp116_ = _tmp115_;
				_label_size = _tmp116_;
				_label_index = -1;
				while (TRUE) {
					gint _tmp117_;
					gint _tmp118_;
					ValaSwitchLabel* label = NULL;
					ValaList* _tmp119_;
					gpointer _tmp120_;
					ValaSwitchLabel* _tmp121_;
					ValaExpression* _tmp122_;
					ValaExpression* _tmp123_;
					ValaCCodeExpression* cexpr = NULL;
					ValaSwitchLabel* _tmp124_;
					ValaExpression* _tmp125_;
					ValaExpression* _tmp126_;
					ValaCCodeExpression* _tmp127_;
					ValaCCodeExpression* _tmp128_;
					ValaCCodeExpression* _tmp129_;
					ValaCCodeBinaryExpression* ccmp = NULL;
					ValaCCodeExpression* _tmp160_;
					ValaCCodeExpression* _tmp161_;
					ValaCCodeBinaryExpression* _tmp162_;
					ValaCCodeBinaryExpression* _tmp163_;
					_label_index = _label_index + 1;
					_tmp117_ = _label_index;
					_tmp118_ = _label_size;
					if (!(_tmp117_ < _tmp118_)) {
						break;
					}
					_tmp119_ = _label_list;
					_tmp120_ = vala_list_get (_tmp119_, _label_index);
					label = (ValaSwitchLabel*) _tmp120_;
					_tmp121_ = label;
					_tmp122_ = vala_switch_label_get_expression (_tmp121_);
					_tmp123_ = _tmp122_;
					vala_code_node_emit ((ValaCodeNode*) _tmp123_, (ValaCodeGenerator*) self);
					_tmp124_ = label;
					_tmp125_ = vala_switch_label_get_expression (_tmp124_);
					_tmp126_ = _tmp125_;
					_tmp127_ = vala_get_cvalue (_tmp126_);
					_tmp128_ = _vala_ccode_node_ref0 (_tmp127_);
					cexpr = _tmp128_;
					_tmp129_ = cexpr;
					if (vala_ccode_base_module_is_constant_ccode_expression (_tmp129_)) {
						ValaCCodeIdentifier* cname = NULL;
						gint _tmp130_;
						gint _tmp131_;
						gchar* _tmp132_;
						gchar* _tmp133_;
						ValaCCodeIdentifier* _tmp134_;
						ValaCCodeIdentifier* _tmp135_;
						ValaCCodeBinaryExpression* ccondition = NULL;
						ValaCCodeConstant* _tmp136_;
						ValaCCodeIdentifier* _tmp137_;
						ValaCCodeBinaryExpression* _tmp138_;
						ValaCCodeFunctionCall* ccall = NULL;
						ValaCCodeIdentifier* _tmp139_;
						ValaCCodeIdentifier* _tmp140_;
						ValaCCodeFunctionCall* _tmp141_;
						ValaCCodeFunctionCall* _tmp142_;
						ValaCCodeIdentifier* _tmp143_;
						ValaCCodeFunctionCall* _tmp144_;
						ValaCCodeAssignment* _tmp145_;
						ValaCCodeFunctionCall* _tmp146_;
						ValaCCodeExpression* _tmp147_;
						ValaCCodeBinaryExpression* _tmp148_;
						ValaCCodeIdentifier* _tmp149_;
						ValaCCodeAssignment* _tmp150_;
						ValaCCodeConditionalExpression* _tmp151_;
						_tmp130_ = label_temp_id;
						_tmp131_ = label_count;
						label_count = _tmp131_ + 1;
						_tmp132_ = g_strdup_printf ("_tmp%d_label%d", _tmp130_, _tmp131_);
						_tmp133_ = _tmp132_;
						_tmp134_ = vala_ccode_identifier_new (_tmp133_);
						_tmp135_ = _tmp134_;
						_g_free0 (_tmp133_);
						cname = _tmp135_;
						_tmp136_ = czero;
						_tmp137_ = cname;
						_tmp138_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp136_, (ValaCCodeExpression*) _tmp137_);
						ccondition = _tmp138_;
						_tmp139_ = vala_ccode_identifier_new ("g_quark_from_static_string");
						_tmp140_ = _tmp139_;
						_tmp141_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp140_);
						_tmp142_ = _tmp141_;
						_vala_ccode_node_unref0 (_tmp140_);
						ccall = _tmp142_;
						_tmp143_ = cname;
						_tmp144_ = ccall;
						_tmp145_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp143_, (ValaCCodeExpression*) _tmp144_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
						_vala_ccode_node_unref0 (cinit);
						cinit = _tmp145_;
						_tmp146_ = ccall;
						_tmp147_ = cexpr;
						vala_ccode_function_call_add_argument (_tmp146_, _tmp147_);
						_tmp148_ = ccondition;
						_tmp149_ = cname;
						_tmp150_ = cinit;
						_tmp151_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) _tmp148_, (ValaCCodeExpression*) _tmp149_, (ValaCCodeExpression*) _tmp150_);
						_vala_ccode_node_unref0 (cexpr);
						cexpr = (ValaCCodeExpression*) _tmp151_;
						_vala_ccode_node_unref0 (ccall);
						_vala_ccode_node_unref0 (ccondition);
						_vala_ccode_node_unref0 (cname);
					} else {
						ValaCCodeFunctionCall* ccall = NULL;
						ValaCCodeIdentifier* _tmp152_;
						ValaCCodeIdentifier* _tmp153_;
						ValaCCodeFunctionCall* _tmp154_;
						ValaCCodeFunctionCall* _tmp155_;
						ValaCCodeFunctionCall* _tmp156_;
						ValaCCodeExpression* _tmp157_;
						ValaCCodeFunctionCall* _tmp158_;
						ValaCCodeExpression* _tmp159_;
						_tmp152_ = vala_ccode_identifier_new ("g_quark_from_string");
						_tmp153_ = _tmp152_;
						_tmp154_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp153_);
						_tmp155_ = _tmp154_;
						_vala_ccode_node_unref0 (_tmp153_);
						ccall = _tmp155_;
						_tmp156_ = ccall;
						_tmp157_ = cexpr;
						vala_ccode_function_call_add_argument (_tmp156_, _tmp157_);
						_tmp158_ = ccall;
						_tmp159_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp158_);
						_vala_ccode_node_unref0 (cexpr);
						cexpr = _tmp159_;
						_vala_ccode_node_unref0 (ccall);
					}
					_tmp160_ = ctemp;
					_tmp161_ = cexpr;
					_tmp162_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, _tmp160_, _tmp161_);
					ccmp = _tmp162_;
					_tmp163_ = cor;
					if (_tmp163_ == NULL) {
						ValaCCodeBinaryExpression* _tmp164_;
						ValaCCodeBinaryExpression* _tmp165_;
						_tmp164_ = ccmp;
						_tmp165_ = _vala_ccode_node_ref0 (_tmp164_);
						_vala_ccode_node_unref0 (cor);
						cor = _tmp165_;
					} else {
						ValaCCodeBinaryExpression* _tmp166_;
						ValaCCodeBinaryExpression* _tmp167_;
						ValaCCodeBinaryExpression* _tmp168_;
						_tmp166_ = cor;
						_tmp167_ = ccmp;
						_tmp168_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) _tmp166_, (ValaCCodeExpression*) _tmp167_);
						_vala_ccode_node_unref0 (cor);
						cor = _tmp168_;
					}
					_vala_ccode_node_unref0 (ccmp);
					_vala_ccode_node_unref0 (cexpr);
					_vala_code_node_unref0 (label);
				}
			}
			if (n > 0) {
				ValaCCodeFunction* _tmp169_;
				ValaCCodeFunction* _tmp170_;
				ValaCCodeBinaryExpression* _tmp171_;
				_tmp169_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp170_ = _tmp169_;
				_tmp171_ = cor;
				vala_ccode_function_else_if (_tmp170_, (ValaCCodeExpression*) _tmp171_);
			} else {
				ValaCCodeFunction* _tmp172_;
				ValaCCodeFunction* _tmp173_;
				ValaCCodeBinaryExpression* _tmp174_;
				_tmp172_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp173_ = _tmp172_;
				_tmp174_ = cor;
				vala_ccode_function_open_if (_tmp173_, (ValaCCodeExpression*) _tmp174_);
			}
			_tmp175_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp176_ = _tmp175_;
			_tmp177_ = vala_ccode_constant_new ("0");
			_tmp178_ = _tmp177_;
			vala_ccode_function_open_switch (_tmp176_, (ValaCCodeExpression*) _tmp178_);
			_vala_ccode_node_unref0 (_tmp178_);
			_tmp179_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp180_ = _tmp179_;
			vala_ccode_function_add_default (_tmp180_);
			_tmp181_ = section;
			vala_code_node_emit ((ValaCodeNode*) _tmp181_, (ValaCodeGenerator*) self);
			_tmp182_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp183_ = _tmp182_;
			vala_ccode_function_close (_tmp183_);
			_tmp184_ = n;
			n = _tmp184_ + 1;
			_vala_ccode_node_unref0 (cor);
			_vala_code_node_unref0 (section);
		}
	}
	_tmp185_ = default_section;
	if (_tmp185_ != NULL) {
		ValaCCodeFunction* _tmp188_;
		ValaCCodeFunction* _tmp189_;
		ValaCCodeConstant* _tmp190_;
		ValaCCodeConstant* _tmp191_;
		ValaCCodeFunction* _tmp192_;
		ValaCCodeFunction* _tmp193_;
		ValaSwitchSection* _tmp194_;
		ValaCCodeFunction* _tmp195_;
		ValaCCodeFunction* _tmp196_;
		if (n > 0) {
			ValaCCodeFunction* _tmp186_;
			ValaCCodeFunction* _tmp187_;
			_tmp186_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp187_ = _tmp186_;
			vala_ccode_function_add_else (_tmp187_);
		}
		_tmp188_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp189_ = _tmp188_;
		_tmp190_ = vala_ccode_constant_new ("0");
		_tmp191_ = _tmp190_;
		vala_ccode_function_open_switch (_tmp189_, (ValaCCodeExpression*) _tmp191_);
		_vala_ccode_node_unref0 (_tmp191_);
		_tmp192_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp193_ = _tmp192_;
		vala_ccode_function_add_default (_tmp193_);
		_tmp194_ = default_section;
		vala_code_node_emit ((ValaCodeNode*) _tmp194_, (ValaCodeGenerator*) self);
		_tmp195_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp196_ = _tmp195_;
		vala_ccode_function_close (_tmp196_);
	}
	if (n > 0) {
		ValaCCodeFunction* _tmp197_;
		ValaCCodeFunction* _tmp198_;
		_tmp197_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp198_ = _tmp197_;
		vala_ccode_function_close (_tmp198_);
	}
	_vala_code_node_unref0 (default_section);
	_vala_ccode_node_unref0 (ccond);
	_vala_ccode_node_unref0 (cquark);
	_vala_ccode_node_unref0 (cisnull);
	_vala_ccode_node_unref0 (free_call);
	_vala_ccode_node_unref0 (czero);
	_vala_ccode_node_unref0 (cinit);
	_vala_ccode_node_unref0 (ctemp);
	_vala_target_value_unref0 (temp_value);
}

static void
vala_ccode_control_flow_module_real_visit_switch_statement (ValaCodeVisitor* base,
                                                            ValaSwitchStatement* stmt)
{
	ValaCCodeControlFlowModule * self;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	ValaDataType* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaCCodeFunction* _tmp6_;
	ValaExpression* _tmp7_;
	ValaExpression* _tmp8_;
	ValaCCodeExpression* _tmp9_;
	gboolean has_default = FALSE;
	ValaCCodeFunction* _tmp26_;
	ValaCCodeFunction* _tmp27_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_switch_statement_get_expression (stmt);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_expression_get_value_type (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = ((ValaCCodeBaseModule*) self)->string_type;
	if (vala_data_type_compatible (_tmp3_, _tmp4_)) {
		vala_ccode_control_flow_module_visit_string_switch_statement (self, stmt);
		return;
	}
	_tmp5_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_switch_statement_get_expression (stmt);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_get_cvalue (_tmp8_);
	vala_ccode_function_open_switch (_tmp6_, _tmp9_);
	has_default = FALSE;
	{
		ValaList* _section_list = NULL;
		ValaList* _tmp10_;
		gint _section_size = 0;
		ValaList* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		gint _section_index = 0;
		_tmp10_ = vala_switch_statement_get_sections (stmt);
		_section_list = _tmp10_;
		_tmp11_ = _section_list;
		_tmp12_ = vala_collection_get_size ((ValaCollection*) _tmp11_);
		_tmp13_ = _tmp12_;
		_section_size = _tmp13_;
		_section_index = -1;
		while (TRUE) {
			gint _tmp14_;
			gint _tmp15_;
			ValaSwitchSection* section = NULL;
			ValaList* _tmp16_;
			gpointer _tmp17_;
			ValaSwitchSection* _tmp18_;
			ValaSwitchSection* _tmp21_;
			_section_index = _section_index + 1;
			_tmp14_ = _section_index;
			_tmp15_ = _section_size;
			if (!(_tmp14_ < _tmp15_)) {
				break;
			}
			_tmp16_ = _section_list;
			_tmp17_ = vala_list_get (_tmp16_, _section_index);
			section = (ValaSwitchSection*) _tmp17_;
			_tmp18_ = section;
			if (vala_switch_section_has_default_label (_tmp18_)) {
				ValaCCodeFunction* _tmp19_;
				ValaCCodeFunction* _tmp20_;
				_tmp19_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp20_ = _tmp19_;
				vala_ccode_function_add_default (_tmp20_);
				has_default = TRUE;
			}
			_tmp21_ = section;
			vala_code_node_emit ((ValaCodeNode*) _tmp21_, (ValaCodeGenerator*) self);
			_vala_code_node_unref0 (section);
		}
	}
	if (!has_default) {
		ValaCCodeFunction* _tmp22_;
		ValaCCodeFunction* _tmp23_;
		ValaCCodeFunction* _tmp24_;
		ValaCCodeFunction* _tmp25_;
		_tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp23_ = _tmp22_;
		vala_ccode_function_add_default (_tmp23_);
		_tmp24_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp25_ = _tmp24_;
		vala_ccode_function_add_break (_tmp25_);
	}
	_tmp26_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp27_ = _tmp26_;
	vala_ccode_function_close (_tmp27_);
}

static void
vala_ccode_control_flow_module_real_visit_switch_label (ValaCodeVisitor* base,
                                                        ValaSwitchLabel* label)
{
	ValaCCodeControlFlowModule * self;
	ValaSwitchSection* _tmp0_;
	ValaSwitchSection* _tmp1_;
	ValaCodeNode* _tmp2_;
	ValaCodeNode* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaDataType* _tmp6_;
	ValaDataType* _tmp7_;
	ValaDataType* _tmp8_;
	ValaExpression* _tmp9_;
	ValaExpression* _tmp10_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (label != NULL);
	_tmp0_ = vala_switch_label_get_section (label);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_code_node_get_parent_node ((ValaCodeNode*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_switch_statement_get_expression (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALA_TYPE_SWITCH_STATEMENT, ValaSwitchStatement));
	_tmp5_ = _tmp4_;
	_tmp6_ = vala_expression_get_value_type (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = ((ValaCCodeBaseModule*) self)->string_type;
	if (vala_data_type_compatible (_tmp7_, _tmp8_)) {
		return;
	}
	_tmp9_ = vala_switch_label_get_expression (label);
	_tmp10_ = _tmp9_;
	if (_tmp10_ != NULL) {
		ValaExpression* _tmp11_;
		ValaExpression* _tmp12_;
		ValaExpression* _tmp13_;
		ValaExpression* _tmp14_;
		ValaCCodeFunction* _tmp15_;
		ValaCCodeFunction* _tmp16_;
		ValaExpression* _tmp17_;
		ValaExpression* _tmp18_;
		ValaCCodeExpression* _tmp19_;
		_tmp11_ = vala_switch_label_get_expression (label);
		_tmp12_ = _tmp11_;
		vala_code_node_emit ((ValaCodeNode*) _tmp12_, (ValaCodeGenerator*) self);
		_tmp13_ = vala_switch_label_get_expression (label);
		_tmp14_ = _tmp13_;
		vala_code_visitor_visit_end_full_expression ((ValaCodeVisitor*) self, _tmp14_);
		_tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp16_ = _tmp15_;
		_tmp17_ = vala_switch_label_get_expression (label);
		_tmp18_ = _tmp17_;
		_tmp19_ = vala_get_cvalue (_tmp18_);
		vala_ccode_function_add_case (_tmp16_, _tmp19_);
	}
}

static void
vala_ccode_control_flow_module_real_visit_loop_statement (ValaCodeVisitor* base,
                                                          ValaLoopStatement* stmt)
{
	ValaCCodeControlFlowModule * self;
	ValaCodeContext* _tmp0_;
	ValaCodeContext* _tmp1_;
	ValaProfile _tmp2_;
	ValaProfile _tmp3_;
	ValaBlock* _tmp13_;
	ValaBlock* _tmp14_;
	ValaCCodeFunction* _tmp15_;
	ValaCCodeFunction* _tmp16_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_code_context_get_profile (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == VALA_PROFILE_GOBJECT) {
		ValaCCodeFunction* _tmp4_;
		ValaCCodeFunction* _tmp5_;
		ValaCCodeConstant* _tmp6_;
		ValaCCodeConstant* _tmp7_;
		_tmp4_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp5_ = _tmp4_;
		_tmp6_ = vala_ccode_constant_new ("TRUE");
		_tmp7_ = _tmp6_;
		vala_ccode_function_open_while (_tmp5_, (ValaCCodeExpression*) _tmp7_);
		_vala_ccode_node_unref0 (_tmp7_);
	} else {
		ValaCCodeFile* _tmp8_;
		ValaCCodeFunction* _tmp9_;
		ValaCCodeFunction* _tmp10_;
		ValaCCodeConstant* _tmp11_;
		ValaCCodeConstant* _tmp12_;
		_tmp8_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp8_, "stdbool.h", FALSE);
		_tmp9_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp10_ = _tmp9_;
		_tmp11_ = vala_ccode_constant_new ("true");
		_tmp12_ = _tmp11_;
		vala_ccode_function_open_while (_tmp10_, (ValaCCodeExpression*) _tmp12_);
		_vala_ccode_node_unref0 (_tmp12_);
	}
	_tmp13_ = vala_loop_get_body ((ValaLoop*) stmt);
	_tmp14_ = _tmp13_;
	vala_code_node_emit ((ValaCodeNode*) _tmp14_, (ValaCodeGenerator*) self);
	_tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp16_ = _tmp15_;
	vala_ccode_function_close (_tmp16_);
}

static void
vala_ccode_control_flow_module_real_visit_foreach_statement (ValaCodeVisitor* base,
                                                             ValaForeachStatement* stmt)
{
	ValaCCodeControlFlowModule * self;
	ValaCCodeFunction* _tmp0_;
	ValaCCodeFunction* _tmp1_;
	ValaLocalVariable* collection_backup = NULL;
	ValaLocalVariable* _tmp2_;
	ValaLocalVariable* _tmp3_;
	ValaLocalVariable* _tmp4_;
	ValaDataType* collection_type = NULL;
	ValaLocalVariable* _tmp5_;
	ValaDataType* _tmp6_;
	ValaDataType* _tmp7_;
	ValaDataType* _tmp8_;
	ValaArrayType* array_type = NULL;
	ValaDataType* _tmp9_;
	ValaArrayType* _tmp10_;
	ValaArrayType* _tmp11_;
	ValaLocalVariable* _tmp14_;
	ValaCCodeFunction* _tmp15_;
	ValaCCodeFunction* _tmp16_;
	ValaLocalVariable* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	ValaCCodeExpression* _tmp20_;
	ValaCCodeExpression* _tmp21_;
	ValaExpression* _tmp22_;
	ValaExpression* _tmp23_;
	ValaCCodeExpression* _tmp24_;
	gboolean _tmp25_ = FALSE;
	gboolean _tmp26_;
	gboolean _tmp27_;
	ValaExpression* _tmp34_;
	ValaExpression* _tmp35_;
	ValaDataType* _tmp36_;
	ValaDataType* _tmp37_;
	ValaCCodeFunction* _tmp724_;
	ValaCCodeFunction* _tmp725_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp1_ = _tmp0_;
	vala_ccode_function_open_block (_tmp1_);
	_tmp2_ = vala_foreach_statement_get_collection_variable (stmt);
	_tmp3_ = _tmp2_;
	_tmp4_ = _vala_code_node_ref0 (_tmp3_);
	collection_backup = _tmp4_;
	_tmp5_ = collection_backup;
	_tmp6_ = vala_variable_get_variable_type ((ValaVariable*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _vala_code_node_ref0 (_tmp7_);
	collection_type = _tmp8_;
	_tmp9_ = collection_type;
	_tmp10_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp9_) : NULL);
	array_type = _tmp10_;
	_tmp11_ = array_type;
	if (_tmp11_ != NULL) {
		ValaArrayType* _tmp12_;
		ValaArrayType* _tmp13_;
		_tmp12_ = array_type;
		vala_array_type_set_inline_allocated (_tmp12_, FALSE);
		_tmp13_ = array_type;
		vala_array_type_set_fixed_length (_tmp13_, FALSE);
	}
	_tmp14_ = collection_backup;
	vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp14_);
	_tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp16_ = _tmp15_;
	_tmp17_ = collection_backup;
	_tmp18_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_foreach_statement_get_collection (stmt);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_get_cvalue (_tmp23_);
	vala_ccode_function_add_assignment (_tmp16_, _tmp21_, _tmp24_);
	_vala_ccode_node_unref0 (_tmp21_);
	_g_free0 (_tmp19_);
	_tmp26_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) stmt);
	_tmp27_ = _tmp26_;
	if (_tmp27_) {
		ValaExpression* _tmp28_;
		ValaExpression* _tmp29_;
		gboolean _tmp30_;
		gboolean _tmp31_;
		_tmp28_ = vala_foreach_statement_get_collection (stmt);
		_tmp29_ = _tmp28_;
		_tmp30_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) _tmp29_);
		_tmp31_ = _tmp30_;
		_tmp25_ = _tmp31_;
	} else {
		_tmp25_ = FALSE;
	}
	if (_tmp25_) {
		ValaExpression* _tmp32_;
		ValaExpression* _tmp33_;
		_tmp32_ = vala_foreach_statement_get_collection (stmt);
		_tmp33_ = _tmp32_;
		vala_ccode_base_module_add_simple_check ((ValaCCodeBaseModule*) self, (ValaCodeNode*) _tmp33_, FALSE);
	}
	_tmp34_ = vala_foreach_statement_get_collection (stmt);
	_tmp35_ = _tmp34_;
	_tmp36_ = vala_expression_get_value_type (_tmp35_);
	_tmp37_ = _tmp36_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp37_, VALA_TYPE_ARRAY_TYPE)) {
		ValaExpression* _tmp38_;
		ValaExpression* _tmp39_;
		ValaDataType* _tmp40_;
		ValaDataType* _tmp41_;
		ValaArrayType* _tmp42_;
		ValaCCodeExpression* array_len = NULL;
		ValaLocalVariable* _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		gchar* _tmp46_;
		gchar* _tmp47_;
		ValaCCodeExpression* _tmp48_;
		ValaCCodeExpression* _tmp49_;
		ValaCCodeFunction* _tmp50_;
		ValaCCodeFunction* _tmp51_;
		ValaCCodeExpression* _tmp52_;
		ValaExpression* _tmp53_;
		ValaExpression* _tmp54_;
		ValaCCodeExpression* _tmp55_;
		ValaCCodeExpression* _tmp56_;
		ValaLocalVariable* iterator_variable = NULL;
		ValaArrayType* _tmp57_;
		ValaDataType* _tmp58_;
		ValaDataType* _tmp59_;
		ValaDataType* _tmp60_;
		ValaDataType* _tmp61_;
		const gchar* _tmp62_;
		const gchar* _tmp63_;
		gchar* _tmp64_;
		gchar* _tmp65_;
		ValaLocalVariable* _tmp66_;
		ValaLocalVariable* _tmp67_;
		ValaLocalVariable* _tmp68_;
		gchar* it_name = NULL;
		ValaLocalVariable* _tmp69_;
		gchar* _tmp70_;
		ValaCCodeBinaryExpression* ccond = NULL;
		const gchar* _tmp71_;
		ValaCCodeExpression* _tmp72_;
		ValaCCodeExpression* _tmp73_;
		ValaCCodeExpression* _tmp74_;
		ValaCCodeBinaryExpression* _tmp75_;
		ValaCCodeBinaryExpression* _tmp76_;
		ValaCCodeFunction* _tmp77_;
		ValaCCodeFunction* _tmp78_;
		const gchar* _tmp79_;
		ValaCCodeExpression* _tmp80_;
		ValaCCodeExpression* _tmp81_;
		ValaCCodeConstant* _tmp82_;
		ValaCCodeConstant* _tmp83_;
		ValaCCodeAssignment* _tmp84_;
		ValaCCodeAssignment* _tmp85_;
		ValaCCodeBinaryExpression* _tmp86_;
		const gchar* _tmp87_;
		ValaCCodeExpression* _tmp88_;
		ValaCCodeExpression* _tmp89_;
		const gchar* _tmp90_;
		ValaCCodeExpression* _tmp91_;
		ValaCCodeExpression* _tmp92_;
		ValaCCodeConstant* _tmp93_;
		ValaCCodeConstant* _tmp94_;
		ValaCCodeBinaryExpression* _tmp95_;
		ValaCCodeBinaryExpression* _tmp96_;
		ValaCCodeAssignment* _tmp97_;
		ValaCCodeAssignment* _tmp98_;
		ValaCCodeExpression* element_expr = NULL;
		ValaLocalVariable* _tmp99_;
		gchar* _tmp100_;
		gchar* _tmp101_;
		ValaCCodeExpression* _tmp102_;
		ValaCCodeExpression* _tmp103_;
		const gchar* _tmp104_;
		ValaCCodeExpression* _tmp105_;
		ValaCCodeExpression* _tmp106_;
		ValaCCodeElementAccess* _tmp107_;
		ValaCCodeExpression* _tmp108_;
		ValaDataType* element_type = NULL;
		ValaArrayType* _tmp109_;
		ValaDataType* _tmp110_;
		ValaDataType* _tmp111_;
		ValaDataType* _tmp112_;
		ValaDataType* _tmp113_;
		ValaDataType* _tmp114_;
		ValaCCodeExpression* _tmp115_;
		ValaGLibValue* _tmp116_;
		ValaGLibValue* _tmp117_;
		ValaDataType* _tmp118_;
		ValaDataType* _tmp119_;
		ValaTargetValue* _tmp120_;
		ValaTargetValue* _tmp121_;
		ValaCCodeExpression* _tmp122_;
		ValaCCodeExpression* _tmp123_;
		ValaLocalVariable* _tmp124_;
		ValaLocalVariable* _tmp125_;
		ValaCCodeFunction* _tmp126_;
		ValaCCodeFunction* _tmp127_;
		ValaLocalVariable* _tmp128_;
		ValaLocalVariable* _tmp129_;
		gchar* _tmp130_;
		gchar* _tmp131_;
		ValaCCodeExpression* _tmp132_;
		ValaCCodeExpression* _tmp133_;
		ValaCCodeExpression* _tmp134_;
		ValaDataType* _tmp135_;
		ValaDataType* _tmp136_;
		ValaBlock* _tmp157_;
		ValaBlock* _tmp158_;
		ValaCCodeFunction* _tmp159_;
		ValaCCodeFunction* _tmp160_;
		_tmp38_ = vala_foreach_statement_get_collection (stmt);
		_tmp39_ = _tmp38_;
		_tmp40_ = vala_expression_get_value_type (_tmp39_);
		_tmp41_ = _tmp40_;
		_tmp42_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		_vala_code_node_unref0 (array_type);
		array_type = _tmp42_;
		_tmp43_ = collection_backup;
		_tmp44_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp45_, 1);
		_tmp47_ = _tmp46_;
		_tmp48_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp47_);
		_tmp49_ = _tmp48_;
		_g_free0 (_tmp47_);
		_g_free0 (_tmp45_);
		array_len = _tmp49_;
		_tmp50_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp51_ = _tmp50_;
		_tmp52_ = array_len;
		_tmp53_ = vala_foreach_statement_get_collection (stmt);
		_tmp54_ = _tmp53_;
		_tmp55_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp54_, -1);
		_tmp56_ = _tmp55_;
		vala_ccode_function_add_assignment (_tmp51_, _tmp52_, _tmp56_);
		_vala_ccode_node_unref0 (_tmp56_);
		_tmp57_ = array_type;
		_tmp58_ = vala_array_type_get_length_type (_tmp57_);
		_tmp59_ = _tmp58_;
		_tmp60_ = vala_data_type_copy (_tmp59_);
		_tmp61_ = _tmp60_;
		_tmp62_ = vala_foreach_statement_get_variable_name (stmt);
		_tmp63_ = _tmp62_;
		_tmp64_ = g_strconcat (_tmp63_, "_it", NULL);
		_tmp65_ = _tmp64_;
		_tmp66_ = vala_local_variable_new (_tmp61_, _tmp65_, NULL, NULL);
		_tmp67_ = _tmp66_;
		_g_free0 (_tmp65_);
		_vala_code_node_unref0 (_tmp61_);
		iterator_variable = _tmp67_;
		_tmp68_ = iterator_variable;
		vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp68_);
		_tmp69_ = iterator_variable;
		_tmp70_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp69_);
		it_name = _tmp70_;
		_tmp71_ = it_name;
		_tmp72_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp71_);
		_tmp73_ = _tmp72_;
		_tmp74_ = array_len;
		_tmp75_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp73_, _tmp74_);
		_tmp76_ = _tmp75_;
		_vala_ccode_node_unref0 (_tmp73_);
		ccond = _tmp76_;
		_tmp77_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp78_ = _tmp77_;
		_tmp79_ = it_name;
		_tmp80_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp79_);
		_tmp81_ = _tmp80_;
		_tmp82_ = vala_ccode_constant_new ("0");
		_tmp83_ = _tmp82_;
		_tmp84_ = vala_ccode_assignment_new (_tmp81_, (ValaCCodeExpression*) _tmp83_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp85_ = _tmp84_;
		_tmp86_ = ccond;
		_tmp87_ = it_name;
		_tmp88_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp87_);
		_tmp89_ = _tmp88_;
		_tmp90_ = it_name;
		_tmp91_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp90_);
		_tmp92_ = _tmp91_;
		_tmp93_ = vala_ccode_constant_new ("1");
		_tmp94_ = _tmp93_;
		_tmp95_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp92_, (ValaCCodeExpression*) _tmp94_);
		_tmp96_ = _tmp95_;
		_tmp97_ = vala_ccode_assignment_new (_tmp89_, (ValaCCodeExpression*) _tmp96_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp98_ = _tmp97_;
		vala_ccode_function_open_for (_tmp78_, (ValaCCodeExpression*) _tmp85_, (ValaCCodeExpression*) _tmp86_, (ValaCCodeExpression*) _tmp98_);
		_vala_ccode_node_unref0 (_tmp98_);
		_vala_ccode_node_unref0 (_tmp96_);
		_vala_ccode_node_unref0 (_tmp94_);
		_vala_ccode_node_unref0 (_tmp92_);
		_vala_ccode_node_unref0 (_tmp89_);
		_vala_ccode_node_unref0 (_tmp85_);
		_vala_ccode_node_unref0 (_tmp83_);
		_vala_ccode_node_unref0 (_tmp81_);
		_tmp99_ = collection_backup;
		_tmp100_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp99_);
		_tmp101_ = _tmp100_;
		_tmp102_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp101_);
		_tmp103_ = _tmp102_;
		_tmp104_ = it_name;
		_tmp105_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp104_);
		_tmp106_ = _tmp105_;
		_tmp107_ = vala_ccode_element_access_new (_tmp103_, _tmp106_);
		_tmp108_ = (ValaCCodeExpression*) _tmp107_;
		_vala_ccode_node_unref0 (_tmp106_);
		_vala_ccode_node_unref0 (_tmp103_);
		_g_free0 (_tmp101_);
		element_expr = _tmp108_;
		_tmp109_ = array_type;
		_tmp110_ = vala_array_type_get_element_type (_tmp109_);
		_tmp111_ = _tmp110_;
		_tmp112_ = vala_data_type_copy (_tmp111_);
		element_type = _tmp112_;
		_tmp113_ = element_type;
		vala_data_type_set_value_owned (_tmp113_, FALSE);
		_tmp114_ = element_type;
		_tmp115_ = element_expr;
		_tmp116_ = vala_glib_value_new (_tmp114_, _tmp115_, TRUE);
		_tmp117_ = _tmp116_;
		_tmp118_ = vala_foreach_statement_get_type_reference (stmt);
		_tmp119_ = _tmp118_;
		_tmp120_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp117_, _tmp119_, (ValaCodeNode*) stmt);
		_tmp121_ = _tmp120_;
		_tmp122_ = vala_get_cvalue_ (_tmp121_);
		_tmp123_ = _vala_ccode_node_ref0 (_tmp122_);
		_vala_ccode_node_unref0 (element_expr);
		element_expr = _tmp123_;
		_vala_target_value_unref0 (_tmp121_);
		_vala_target_value_unref0 (_tmp117_);
		_tmp124_ = vala_foreach_statement_get_element_variable (stmt);
		_tmp125_ = _tmp124_;
		vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp125_);
		_tmp126_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp127_ = _tmp126_;
		_tmp128_ = vala_foreach_statement_get_element_variable (stmt);
		_tmp129_ = _tmp128_;
		_tmp130_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp129_);
		_tmp131_ = _tmp130_;
		_tmp132_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp131_);
		_tmp133_ = _tmp132_;
		_tmp134_ = element_expr;
		vala_ccode_function_add_assignment (_tmp127_, _tmp133_, _tmp134_);
		_vala_ccode_node_unref0 (_tmp133_);
		_g_free0 (_tmp131_);
		_tmp135_ = vala_foreach_statement_get_type_reference (stmt);
		_tmp136_ = _tmp135_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp136_, VALA_TYPE_ARRAY_TYPE)) {
			ValaArrayType* inner_array_type = NULL;
			ValaDataType* _tmp137_;
			ValaDataType* _tmp138_;
			ValaArrayType* _tmp139_;
			_tmp137_ = vala_foreach_statement_get_type_reference (stmt);
			_tmp138_ = _tmp137_;
			_tmp139_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp138_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
			inner_array_type = _tmp139_;
			{
				gint dim = 0;
				dim = 1;
				{
					gboolean _tmp140_ = FALSE;
					_tmp140_ = TRUE;
					while (TRUE) {
						ValaArrayType* _tmp142_;
						gint _tmp143_;
						gint _tmp144_;
						ValaCCodeFunction* _tmp145_;
						ValaCCodeFunction* _tmp146_;
						ValaLocalVariable* _tmp147_;
						ValaLocalVariable* _tmp148_;
						gchar* _tmp149_;
						gchar* _tmp150_;
						gchar* _tmp151_;
						gchar* _tmp152_;
						ValaCCodeExpression* _tmp153_;
						ValaCCodeExpression* _tmp154_;
						ValaCCodeConstant* _tmp155_;
						ValaCCodeConstant* _tmp156_;
						if (!_tmp140_) {
							gint _tmp141_;
							_tmp141_ = dim;
							dim = _tmp141_ + 1;
						}
						_tmp140_ = FALSE;
						_tmp142_ = inner_array_type;
						_tmp143_ = vala_array_type_get_rank (_tmp142_);
						_tmp144_ = _tmp143_;
						if (!(dim <= _tmp144_)) {
							break;
						}
						_tmp145_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp146_ = _tmp145_;
						_tmp147_ = vala_foreach_statement_get_element_variable (stmt);
						_tmp148_ = _tmp147_;
						_tmp149_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp148_);
						_tmp150_ = _tmp149_;
						_tmp151_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp150_, dim);
						_tmp152_ = _tmp151_;
						_tmp153_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp152_);
						_tmp154_ = _tmp153_;
						_tmp155_ = vala_ccode_constant_new ("-1");
						_tmp156_ = _tmp155_;
						vala_ccode_function_add_assignment (_tmp146_, _tmp154_, (ValaCCodeExpression*) _tmp156_);
						_vala_ccode_node_unref0 (_tmp156_);
						_vala_ccode_node_unref0 (_tmp154_);
						_g_free0 (_tmp152_);
						_g_free0 (_tmp150_);
					}
				}
			}
			_vala_code_node_unref0 (inner_array_type);
		}
		_tmp157_ = vala_foreach_statement_get_body (stmt);
		_tmp158_ = _tmp157_;
		vala_code_node_emit ((ValaCodeNode*) _tmp158_, (ValaCodeGenerator*) self);
		_tmp159_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp160_ = _tmp159_;
		vala_ccode_function_close (_tmp160_);
		_vala_code_node_unref0 (element_type);
		_vala_ccode_node_unref0 (element_expr);
		_vala_ccode_node_unref0 (ccond);
		_g_free0 (it_name);
		_vala_code_node_unref0 (iterator_variable);
		_vala_ccode_node_unref0 (array_len);
	} else {
		ValaExpression* _tmp161_;
		ValaExpression* _tmp162_;
		ValaDataType* _tmp163_;
		ValaDataType* _tmp164_;
		ValaClass* _tmp165_;
		ValaObjectType* _tmp166_;
		ValaObjectType* _tmp167_;
		gboolean _tmp168_;
		_tmp161_ = vala_foreach_statement_get_collection (stmt);
		_tmp162_ = _tmp161_;
		_tmp163_ = vala_expression_get_value_type (_tmp162_);
		_tmp164_ = _tmp163_;
		_tmp165_ = ((ValaCCodeBaseModule*) self)->garray_type;
		_tmp166_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp165_, NULL);
		_tmp167_ = _tmp166_;
		_tmp168_ = vala_data_type_compatible (_tmp164_, (ValaDataType*) _tmp167_);
		_vala_code_node_unref0 (_tmp167_);
		if (_tmp168_) {
			ValaLocalVariable* iterator_variable = NULL;
			ValaDataType* _tmp169_;
			ValaDataType* _tmp170_;
			ValaDataType* _tmp171_;
			const gchar* _tmp172_;
			const gchar* _tmp173_;
			gchar* _tmp174_;
			gchar* _tmp175_;
			ValaLocalVariable* _tmp176_;
			ValaLocalVariable* _tmp177_;
			ValaLocalVariable* _tmp178_;
			gchar* arr_index = NULL;
			ValaLocalVariable* _tmp179_;
			gchar* _tmp180_;
			gchar* _tmp181_;
			gchar* _tmp182_;
			gchar* _tmp183_;
			ValaCCodeBinaryExpression* ccond = NULL;
			const gchar* _tmp184_;
			ValaCCodeExpression* _tmp185_;
			ValaCCodeExpression* _tmp186_;
			ValaLocalVariable* _tmp187_;
			gchar* _tmp188_;
			gchar* _tmp189_;
			ValaCCodeExpression* _tmp190_;
			ValaCCodeExpression* _tmp191_;
			ValaCCodeMemberAccess* _tmp192_;
			ValaCCodeMemberAccess* _tmp193_;
			ValaCCodeBinaryExpression* _tmp194_;
			ValaCCodeBinaryExpression* _tmp195_;
			ValaCCodeFunction* _tmp196_;
			ValaCCodeFunction* _tmp197_;
			const gchar* _tmp198_;
			ValaCCodeExpression* _tmp199_;
			ValaCCodeExpression* _tmp200_;
			ValaCCodeConstant* _tmp201_;
			ValaCCodeConstant* _tmp202_;
			ValaCCodeAssignment* _tmp203_;
			ValaCCodeAssignment* _tmp204_;
			ValaCCodeBinaryExpression* _tmp205_;
			const gchar* _tmp206_;
			ValaCCodeExpression* _tmp207_;
			ValaCCodeExpression* _tmp208_;
			const gchar* _tmp209_;
			ValaCCodeExpression* _tmp210_;
			ValaCCodeExpression* _tmp211_;
			ValaCCodeConstant* _tmp212_;
			ValaCCodeConstant* _tmp213_;
			ValaCCodeBinaryExpression* _tmp214_;
			ValaCCodeBinaryExpression* _tmp215_;
			ValaCCodeAssignment* _tmp216_;
			ValaCCodeAssignment* _tmp217_;
			ValaCCodeFunctionCall* get_item = NULL;
			ValaCCodeIdentifier* _tmp218_;
			ValaCCodeIdentifier* _tmp219_;
			ValaCCodeFunctionCall* _tmp220_;
			ValaCCodeFunctionCall* _tmp221_;
			ValaCCodeFunctionCall* _tmp222_;
			ValaLocalVariable* _tmp223_;
			gchar* _tmp224_;
			gchar* _tmp225_;
			ValaCCodeExpression* _tmp226_;
			ValaCCodeExpression* _tmp227_;
			ValaCCodeFunctionCall* _tmp228_;
			ValaDataType* _tmp229_;
			ValaDataType* _tmp230_;
			gchar* _tmp231_;
			gchar* _tmp232_;
			ValaCCodeIdentifier* _tmp233_;
			ValaCCodeIdentifier* _tmp234_;
			ValaCCodeFunctionCall* _tmp235_;
			const gchar* _tmp236_;
			ValaCCodeExpression* _tmp237_;
			ValaCCodeExpression* _tmp238_;
			ValaDataType* _tmp239_;
			ValaList* _tmp240_;
			gint _tmp241_;
			gint _tmp242_;
			ValaDataType* element_type = NULL;
			ValaDataType* _tmp245_;
			ValaList* _tmp246_;
			gpointer _tmp247_;
			ValaDataType* _tmp248_;
			ValaDataType* _tmp249_;
			ValaDataType* _tmp250_;
			ValaDataType* _tmp251_;
			ValaCCodeExpression* element_expr = NULL;
			ValaDataType* _tmp252_;
			ValaCCodeFunctionCall* _tmp253_;
			ValaGLibValue* _tmp254_;
			ValaGLibValue* _tmp255_;
			ValaDataType* _tmp256_;
			ValaDataType* _tmp257_;
			ValaTargetValue* _tmp258_;
			ValaTargetValue* _tmp259_;
			ValaCCodeExpression* _tmp260_;
			ValaCCodeExpression* _tmp261_;
			ValaCCodeExpression* _tmp262_;
			ValaLocalVariable* _tmp263_;
			ValaLocalVariable* _tmp264_;
			ValaCCodeFunction* _tmp265_;
			ValaCCodeFunction* _tmp266_;
			ValaLocalVariable* _tmp267_;
			ValaLocalVariable* _tmp268_;
			gchar* _tmp269_;
			gchar* _tmp270_;
			ValaCCodeExpression* _tmp271_;
			ValaCCodeExpression* _tmp272_;
			ValaCCodeExpression* _tmp273_;
			ValaBlock* _tmp274_;
			ValaBlock* _tmp275_;
			ValaCCodeFunction* _tmp276_;
			ValaCCodeFunction* _tmp277_;
			_tmp169_ = ((ValaCCodeBaseModule*) self)->uint_type;
			_tmp170_ = vala_data_type_copy (_tmp169_);
			_tmp171_ = _tmp170_;
			_tmp172_ = vala_foreach_statement_get_variable_name (stmt);
			_tmp173_ = _tmp172_;
			_tmp174_ = g_strdup_printf ("%s_index", _tmp173_);
			_tmp175_ = _tmp174_;
			_tmp176_ = vala_local_variable_new (_tmp171_, _tmp175_, NULL, NULL);
			_tmp177_ = _tmp176_;
			_g_free0 (_tmp175_);
			_vala_code_node_unref0 (_tmp171_);
			iterator_variable = _tmp177_;
			_tmp178_ = iterator_variable;
			vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp178_);
			_tmp179_ = iterator_variable;
			_tmp180_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp179_);
			_tmp181_ = _tmp180_;
			_tmp182_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp181_);
			_tmp183_ = _tmp182_;
			_g_free0 (_tmp181_);
			arr_index = _tmp183_;
			_tmp184_ = arr_index;
			_tmp185_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp184_);
			_tmp186_ = _tmp185_;
			_tmp187_ = collection_backup;
			_tmp188_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp187_);
			_tmp189_ = _tmp188_;
			_tmp190_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp189_);
			_tmp191_ = _tmp190_;
			_tmp192_ = vala_ccode_member_access_new_pointer (_tmp191_, "len");
			_tmp193_ = _tmp192_;
			_tmp194_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp186_, (ValaCCodeExpression*) _tmp193_);
			_tmp195_ = _tmp194_;
			_vala_ccode_node_unref0 (_tmp193_);
			_vala_ccode_node_unref0 (_tmp191_);
			_g_free0 (_tmp189_);
			_vala_ccode_node_unref0 (_tmp186_);
			ccond = _tmp195_;
			_tmp196_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp197_ = _tmp196_;
			_tmp198_ = arr_index;
			_tmp199_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp198_);
			_tmp200_ = _tmp199_;
			_tmp201_ = vala_ccode_constant_new ("0");
			_tmp202_ = _tmp201_;
			_tmp203_ = vala_ccode_assignment_new (_tmp200_, (ValaCCodeExpression*) _tmp202_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
			_tmp204_ = _tmp203_;
			_tmp205_ = ccond;
			_tmp206_ = arr_index;
			_tmp207_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp206_);
			_tmp208_ = _tmp207_;
			_tmp209_ = arr_index;
			_tmp210_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp209_);
			_tmp211_ = _tmp210_;
			_tmp212_ = vala_ccode_constant_new ("1");
			_tmp213_ = _tmp212_;
			_tmp214_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp211_, (ValaCCodeExpression*) _tmp213_);
			_tmp215_ = _tmp214_;
			_tmp216_ = vala_ccode_assignment_new (_tmp208_, (ValaCCodeExpression*) _tmp215_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
			_tmp217_ = _tmp216_;
			vala_ccode_function_open_for (_tmp197_, (ValaCCodeExpression*) _tmp204_, (ValaCCodeExpression*) _tmp205_, (ValaCCodeExpression*) _tmp217_);
			_vala_ccode_node_unref0 (_tmp217_);
			_vala_ccode_node_unref0 (_tmp215_);
			_vala_ccode_node_unref0 (_tmp213_);
			_vala_ccode_node_unref0 (_tmp211_);
			_vala_ccode_node_unref0 (_tmp208_);
			_vala_ccode_node_unref0 (_tmp204_);
			_vala_ccode_node_unref0 (_tmp202_);
			_vala_ccode_node_unref0 (_tmp200_);
			_tmp218_ = vala_ccode_identifier_new ("g_array_index");
			_tmp219_ = _tmp218_;
			_tmp220_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp219_);
			_tmp221_ = _tmp220_;
			_vala_ccode_node_unref0 (_tmp219_);
			get_item = _tmp221_;
			_tmp222_ = get_item;
			_tmp223_ = collection_backup;
			_tmp224_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp223_);
			_tmp225_ = _tmp224_;
			_tmp226_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp225_);
			_tmp227_ = _tmp226_;
			vala_ccode_function_call_add_argument (_tmp222_, _tmp227_);
			_vala_ccode_node_unref0 (_tmp227_);
			_g_free0 (_tmp225_);
			_tmp228_ = get_item;
			_tmp229_ = vala_foreach_statement_get_type_reference (stmt);
			_tmp230_ = _tmp229_;
			_tmp231_ = vala_get_ccode_name ((ValaCodeNode*) _tmp230_);
			_tmp232_ = _tmp231_;
			_tmp233_ = vala_ccode_identifier_new (_tmp232_);
			_tmp234_ = _tmp233_;
			vala_ccode_function_call_add_argument (_tmp228_, (ValaCCodeExpression*) _tmp234_);
			_vala_ccode_node_unref0 (_tmp234_);
			_g_free0 (_tmp232_);
			_tmp235_ = get_item;
			_tmp236_ = arr_index;
			_tmp237_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp236_);
			_tmp238_ = _tmp237_;
			vala_ccode_function_call_add_argument (_tmp235_, _tmp238_);
			_vala_ccode_node_unref0 (_tmp238_);
			_tmp239_ = collection_type;
			_tmp240_ = vala_data_type_get_type_arguments (_tmp239_);
			_tmp241_ = vala_collection_get_size ((ValaCollection*) _tmp240_);
			_tmp242_ = _tmp241_;
			if (_tmp242_ != 1) {
				ValaSourceReference* _tmp243_;
				ValaSourceReference* _tmp244_;
				_tmp243_ = vala_code_node_get_source_reference ((ValaCodeNode*) stmt);
				_tmp244_ = _tmp243_;
				vala_report_error (_tmp244_, "internal error: missing generic type argument");
				vala_code_node_set_error ((ValaCodeNode*) stmt, TRUE);
				_vala_ccode_node_unref0 (get_item);
				_vala_ccode_node_unref0 (ccond);
				_g_free0 (arr_index);
				_vala_code_node_unref0 (iterator_variable);
				_vala_code_node_unref0 (array_type);
				_vala_code_node_unref0 (collection_type);
				_vala_code_node_unref0 (collection_backup);
				return;
			}
			_tmp245_ = collection_type;
			_tmp246_ = vala_data_type_get_type_arguments (_tmp245_);
			_tmp247_ = vala_list_get (_tmp246_, 0);
			_tmp248_ = (ValaDataType*) _tmp247_;
			_tmp249_ = vala_data_type_copy (_tmp248_);
			_tmp250_ = _tmp249_;
			_vala_code_node_unref0 (_tmp248_);
			element_type = _tmp250_;
			_tmp251_ = element_type;
			vala_data_type_set_value_owned (_tmp251_, FALSE);
			_tmp252_ = element_type;
			_tmp253_ = get_item;
			_tmp254_ = vala_glib_value_new (_tmp252_, (ValaCCodeExpression*) _tmp253_, TRUE);
			_tmp255_ = _tmp254_;
			_tmp256_ = vala_foreach_statement_get_type_reference (stmt);
			_tmp257_ = _tmp256_;
			_tmp258_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp255_, _tmp257_, (ValaCodeNode*) stmt);
			_tmp259_ = _tmp258_;
			_tmp260_ = vala_get_cvalue_ (_tmp259_);
			_tmp261_ = _vala_ccode_node_ref0 (_tmp260_);
			_tmp262_ = _tmp261_;
			_vala_target_value_unref0 (_tmp259_);
			_vala_target_value_unref0 (_tmp255_);
			element_expr = _tmp262_;
			_tmp263_ = vala_foreach_statement_get_element_variable (stmt);
			_tmp264_ = _tmp263_;
			vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp264_);
			_tmp265_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp266_ = _tmp265_;
			_tmp267_ = vala_foreach_statement_get_element_variable (stmt);
			_tmp268_ = _tmp267_;
			_tmp269_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp268_);
			_tmp270_ = _tmp269_;
			_tmp271_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp270_);
			_tmp272_ = _tmp271_;
			_tmp273_ = element_expr;
			vala_ccode_function_add_assignment (_tmp266_, _tmp272_, _tmp273_);
			_vala_ccode_node_unref0 (_tmp272_);
			_g_free0 (_tmp270_);
			_tmp274_ = vala_foreach_statement_get_body (stmt);
			_tmp275_ = _tmp274_;
			vala_code_node_emit ((ValaCodeNode*) _tmp275_, (ValaCodeGenerator*) self);
			_tmp276_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp277_ = _tmp276_;
			vala_ccode_function_close (_tmp277_);
			_vala_ccode_node_unref0 (element_expr);
			_vala_code_node_unref0 (element_type);
			_vala_ccode_node_unref0 (get_item);
			_vala_ccode_node_unref0 (ccond);
			_g_free0 (arr_index);
			_vala_code_node_unref0 (iterator_variable);
		} else {
			gboolean _tmp278_ = FALSE;
			ValaExpression* _tmp279_;
			ValaExpression* _tmp280_;
			ValaDataType* _tmp281_;
			ValaDataType* _tmp282_;
			ValaClass* _tmp283_;
			ValaObjectType* _tmp284_;
			ValaObjectType* _tmp285_;
			gboolean _tmp286_;
			_tmp279_ = vala_foreach_statement_get_collection (stmt);
			_tmp280_ = _tmp279_;
			_tmp281_ = vala_expression_get_value_type (_tmp280_);
			_tmp282_ = _tmp281_;
			_tmp283_ = ((ValaCCodeBaseModule*) self)->glist_type;
			_tmp284_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp283_, NULL);
			_tmp285_ = _tmp284_;
			_tmp286_ = vala_data_type_compatible (_tmp282_, (ValaDataType*) _tmp285_);
			_vala_code_node_unref0 (_tmp285_);
			if (_tmp286_) {
				_tmp278_ = TRUE;
			} else {
				ValaExpression* _tmp287_;
				ValaExpression* _tmp288_;
				ValaDataType* _tmp289_;
				ValaDataType* _tmp290_;
				ValaClass* _tmp291_;
				ValaObjectType* _tmp292_;
				ValaObjectType* _tmp293_;
				_tmp287_ = vala_foreach_statement_get_collection (stmt);
				_tmp288_ = _tmp287_;
				_tmp289_ = vala_expression_get_value_type (_tmp288_);
				_tmp290_ = _tmp289_;
				_tmp291_ = ((ValaCCodeBaseModule*) self)->gslist_type;
				_tmp292_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp291_, NULL);
				_tmp293_ = _tmp292_;
				_tmp278_ = vala_data_type_compatible (_tmp290_, (ValaDataType*) _tmp293_);
				_vala_code_node_unref0 (_tmp293_);
			}
			if (_tmp278_) {
				ValaLocalVariable* iterator_variable = NULL;
				ValaDataType* _tmp294_;
				ValaDataType* _tmp295_;
				ValaDataType* _tmp296_;
				const gchar* _tmp297_;
				const gchar* _tmp298_;
				gchar* _tmp299_;
				gchar* _tmp300_;
				ValaLocalVariable* _tmp301_;
				ValaLocalVariable* _tmp302_;
				ValaLocalVariable* _tmp303_;
				gchar* it_name = NULL;
				ValaLocalVariable* _tmp304_;
				gchar* _tmp305_;
				ValaCCodeBinaryExpression* ccond = NULL;
				const gchar* _tmp306_;
				ValaCCodeExpression* _tmp307_;
				ValaCCodeExpression* _tmp308_;
				ValaCCodeConstant* _tmp309_;
				ValaCCodeConstant* _tmp310_;
				ValaCCodeBinaryExpression* _tmp311_;
				ValaCCodeBinaryExpression* _tmp312_;
				ValaCCodeFunction* _tmp313_;
				ValaCCodeFunction* _tmp314_;
				const gchar* _tmp315_;
				ValaCCodeExpression* _tmp316_;
				ValaCCodeExpression* _tmp317_;
				ValaLocalVariable* _tmp318_;
				gchar* _tmp319_;
				gchar* _tmp320_;
				ValaCCodeExpression* _tmp321_;
				ValaCCodeExpression* _tmp322_;
				ValaCCodeAssignment* _tmp323_;
				ValaCCodeAssignment* _tmp324_;
				ValaCCodeBinaryExpression* _tmp325_;
				const gchar* _tmp326_;
				ValaCCodeExpression* _tmp327_;
				ValaCCodeExpression* _tmp328_;
				const gchar* _tmp329_;
				ValaCCodeExpression* _tmp330_;
				ValaCCodeExpression* _tmp331_;
				ValaCCodeMemberAccess* _tmp332_;
				ValaCCodeMemberAccess* _tmp333_;
				ValaCCodeAssignment* _tmp334_;
				ValaCCodeAssignment* _tmp335_;
				ValaCCodeExpression* element_expr = NULL;
				const gchar* _tmp336_;
				ValaCCodeExpression* _tmp337_;
				ValaCCodeExpression* _tmp338_;
				ValaCCodeMemberAccess* _tmp339_;
				ValaCCodeExpression* _tmp340_;
				ValaDataType* _tmp341_;
				ValaList* _tmp342_;
				gint _tmp343_;
				gint _tmp344_;
				ValaDataType* element_data_type = NULL;
				ValaDataType* _tmp347_;
				ValaList* _tmp348_;
				gpointer _tmp349_;
				ValaDataType* _tmp350_;
				ValaDataType* _tmp351_;
				ValaDataType* _tmp352_;
				ValaDataType* _tmp353_;
				ValaCCodeExpression* _tmp354_;
				ValaDataType* _tmp355_;
				ValaCCodeExpression* _tmp356_;
				ValaDataType* _tmp357_;
				ValaCCodeExpression* _tmp358_;
				ValaGLibValue* _tmp359_;
				ValaGLibValue* _tmp360_;
				ValaDataType* _tmp361_;
				ValaDataType* _tmp362_;
				ValaTargetValue* _tmp363_;
				ValaTargetValue* _tmp364_;
				ValaCCodeExpression* _tmp365_;
				ValaCCodeExpression* _tmp366_;
				ValaLocalVariable* _tmp367_;
				ValaLocalVariable* _tmp368_;
				ValaCCodeFunction* _tmp369_;
				ValaCCodeFunction* _tmp370_;
				ValaLocalVariable* _tmp371_;
				ValaLocalVariable* _tmp372_;
				gchar* _tmp373_;
				gchar* _tmp374_;
				ValaCCodeExpression* _tmp375_;
				ValaCCodeExpression* _tmp376_;
				ValaCCodeExpression* _tmp377_;
				ValaBlock* _tmp378_;
				ValaBlock* _tmp379_;
				ValaCCodeFunction* _tmp380_;
				ValaCCodeFunction* _tmp381_;
				_tmp294_ = collection_type;
				_tmp295_ = vala_data_type_copy (_tmp294_);
				_tmp296_ = _tmp295_;
				_tmp297_ = vala_foreach_statement_get_variable_name (stmt);
				_tmp298_ = _tmp297_;
				_tmp299_ = g_strconcat (_tmp298_, "_it", NULL);
				_tmp300_ = _tmp299_;
				_tmp301_ = vala_local_variable_new (_tmp296_, _tmp300_, NULL, NULL);
				_tmp302_ = _tmp301_;
				_g_free0 (_tmp300_);
				_vala_code_node_unref0 (_tmp296_);
				iterator_variable = _tmp302_;
				_tmp303_ = iterator_variable;
				vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp303_);
				_tmp304_ = iterator_variable;
				_tmp305_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp304_);
				it_name = _tmp305_;
				_tmp306_ = it_name;
				_tmp307_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp306_);
				_tmp308_ = _tmp307_;
				_tmp309_ = vala_ccode_constant_new ("NULL");
				_tmp310_ = _tmp309_;
				_tmp311_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, _tmp308_, (ValaCCodeExpression*) _tmp310_);
				_tmp312_ = _tmp311_;
				_vala_ccode_node_unref0 (_tmp310_);
				_vala_ccode_node_unref0 (_tmp308_);
				ccond = _tmp312_;
				_tmp313_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp314_ = _tmp313_;
				_tmp315_ = it_name;
				_tmp316_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp315_);
				_tmp317_ = _tmp316_;
				_tmp318_ = collection_backup;
				_tmp319_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp318_);
				_tmp320_ = _tmp319_;
				_tmp321_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp320_);
				_tmp322_ = _tmp321_;
				_tmp323_ = vala_ccode_assignment_new (_tmp317_, _tmp322_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
				_tmp324_ = _tmp323_;
				_tmp325_ = ccond;
				_tmp326_ = it_name;
				_tmp327_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp326_);
				_tmp328_ = _tmp327_;
				_tmp329_ = it_name;
				_tmp330_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp329_);
				_tmp331_ = _tmp330_;
				_tmp332_ = vala_ccode_member_access_new_pointer (_tmp331_, "next");
				_tmp333_ = _tmp332_;
				_tmp334_ = vala_ccode_assignment_new (_tmp328_, (ValaCCodeExpression*) _tmp333_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
				_tmp335_ = _tmp334_;
				vala_ccode_function_open_for (_tmp314_, (ValaCCodeExpression*) _tmp324_, (ValaCCodeExpression*) _tmp325_, (ValaCCodeExpression*) _tmp335_);
				_vala_ccode_node_unref0 (_tmp335_);
				_vala_ccode_node_unref0 (_tmp333_);
				_vala_ccode_node_unref0 (_tmp331_);
				_vala_ccode_node_unref0 (_tmp328_);
				_vala_ccode_node_unref0 (_tmp324_);
				_vala_ccode_node_unref0 (_tmp322_);
				_g_free0 (_tmp320_);
				_vala_ccode_node_unref0 (_tmp317_);
				_tmp336_ = it_name;
				_tmp337_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp336_);
				_tmp338_ = _tmp337_;
				_tmp339_ = vala_ccode_member_access_new_pointer (_tmp338_, "data");
				_tmp340_ = (ValaCCodeExpression*) _tmp339_;
				_vala_ccode_node_unref0 (_tmp338_);
				element_expr = _tmp340_;
				_tmp341_ = collection_type;
				_tmp342_ = vala_data_type_get_type_arguments (_tmp341_);
				_tmp343_ = vala_collection_get_size ((ValaCollection*) _tmp342_);
				_tmp344_ = _tmp343_;
				if (_tmp344_ != 1) {
					ValaSourceReference* _tmp345_;
					ValaSourceReference* _tmp346_;
					_tmp345_ = vala_code_node_get_source_reference ((ValaCodeNode*) stmt);
					_tmp346_ = _tmp345_;
					vala_report_error (_tmp346_, "internal error: missing generic type argument");
					vala_code_node_set_error ((ValaCodeNode*) stmt, TRUE);
					_vala_ccode_node_unref0 (element_expr);
					_vala_ccode_node_unref0 (ccond);
					_g_free0 (it_name);
					_vala_code_node_unref0 (iterator_variable);
					_vala_code_node_unref0 (array_type);
					_vala_code_node_unref0 (collection_type);
					_vala_code_node_unref0 (collection_backup);
					return;
				}
				_tmp347_ = collection_type;
				_tmp348_ = vala_data_type_get_type_arguments (_tmp347_);
				_tmp349_ = vala_list_get (_tmp348_, 0);
				_tmp350_ = (ValaDataType*) _tmp349_;
				_tmp351_ = vala_data_type_copy (_tmp350_);
				_tmp352_ = _tmp351_;
				_vala_code_node_unref0 (_tmp350_);
				element_data_type = _tmp352_;
				_tmp353_ = element_data_type;
				vala_data_type_set_value_owned (_tmp353_, FALSE);
				_tmp354_ = element_expr;
				_tmp355_ = element_data_type;
				_tmp356_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, _tmp354_, _tmp355_);
				_vala_ccode_node_unref0 (element_expr);
				element_expr = _tmp356_;
				_tmp357_ = element_data_type;
				_tmp358_ = element_expr;
				_tmp359_ = vala_glib_value_new (_tmp357_, _tmp358_, FALSE);
				_tmp360_ = _tmp359_;
				_tmp361_ = vala_foreach_statement_get_type_reference (stmt);
				_tmp362_ = _tmp361_;
				_tmp363_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp360_, _tmp362_, (ValaCodeNode*) stmt);
				_tmp364_ = _tmp363_;
				_tmp365_ = vala_get_cvalue_ (_tmp364_);
				_tmp366_ = _vala_ccode_node_ref0 (_tmp365_);
				_vala_ccode_node_unref0 (element_expr);
				element_expr = _tmp366_;
				_vala_target_value_unref0 (_tmp364_);
				_vala_target_value_unref0 (_tmp360_);
				_tmp367_ = vala_foreach_statement_get_element_variable (stmt);
				_tmp368_ = _tmp367_;
				vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp368_);
				_tmp369_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp370_ = _tmp369_;
				_tmp371_ = vala_foreach_statement_get_element_variable (stmt);
				_tmp372_ = _tmp371_;
				_tmp373_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp372_);
				_tmp374_ = _tmp373_;
				_tmp375_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp374_);
				_tmp376_ = _tmp375_;
				_tmp377_ = element_expr;
				vala_ccode_function_add_assignment (_tmp370_, _tmp376_, _tmp377_);
				_vala_ccode_node_unref0 (_tmp376_);
				_g_free0 (_tmp374_);
				_tmp378_ = vala_foreach_statement_get_body (stmt);
				_tmp379_ = _tmp378_;
				vala_code_node_emit ((ValaCodeNode*) _tmp379_, (ValaCodeGenerator*) self);
				_tmp380_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp381_ = _tmp380_;
				vala_ccode_function_close (_tmp381_);
				_vala_code_node_unref0 (element_data_type);
				_vala_ccode_node_unref0 (element_expr);
				_vala_ccode_node_unref0 (ccond);
				_g_free0 (it_name);
				_vala_code_node_unref0 (iterator_variable);
			} else {
				ValaExpression* _tmp382_;
				ValaExpression* _tmp383_;
				ValaDataType* _tmp384_;
				ValaDataType* _tmp385_;
				ValaTypeSymbol* _tmp386_;
				ValaObjectType* _tmp387_;
				ValaObjectType* _tmp388_;
				gboolean _tmp389_;
				_tmp382_ = vala_foreach_statement_get_collection (stmt);
				_tmp383_ = _tmp382_;
				_tmp384_ = vala_expression_get_value_type (_tmp383_);
				_tmp385_ = _tmp384_;
				_tmp386_ = ((ValaCCodeBaseModule*) self)->genericarray_type;
				_tmp387_ = vala_object_type_new ((ValaObjectTypeSymbol*) G_TYPE_CHECK_INSTANCE_CAST (_tmp386_, VALA_TYPE_CLASS, ValaClass), NULL);
				_tmp388_ = _tmp387_;
				_tmp389_ = vala_data_type_compatible (_tmp385_, (ValaDataType*) _tmp388_);
				_vala_code_node_unref0 (_tmp388_);
				if (_tmp389_) {
					ValaLocalVariable* iterator_variable = NULL;
					ValaDataType* _tmp390_;
					ValaDataType* _tmp391_;
					ValaDataType* _tmp392_;
					const gchar* _tmp393_;
					const gchar* _tmp394_;
					gchar* _tmp395_;
					gchar* _tmp396_;
					ValaLocalVariable* _tmp397_;
					ValaLocalVariable* _tmp398_;
					ValaLocalVariable* _tmp399_;
					gchar* arr_index = NULL;
					ValaLocalVariable* _tmp400_;
					gchar* _tmp401_;
					gchar* _tmp402_;
					gchar* _tmp403_;
					gchar* _tmp404_;
					ValaCCodeBinaryExpression* ccond = NULL;
					const gchar* _tmp405_;
					ValaCCodeExpression* _tmp406_;
					ValaCCodeExpression* _tmp407_;
					ValaLocalVariable* _tmp408_;
					gchar* _tmp409_;
					gchar* _tmp410_;
					ValaCCodeExpression* _tmp411_;
					ValaCCodeExpression* _tmp412_;
					ValaCCodeMemberAccess* _tmp413_;
					ValaCCodeMemberAccess* _tmp414_;
					ValaCCodeBinaryExpression* _tmp415_;
					ValaCCodeBinaryExpression* _tmp416_;
					ValaCCodeFunction* _tmp417_;
					ValaCCodeFunction* _tmp418_;
					const gchar* _tmp419_;
					ValaCCodeExpression* _tmp420_;
					ValaCCodeExpression* _tmp421_;
					ValaCCodeConstant* _tmp422_;
					ValaCCodeConstant* _tmp423_;
					ValaCCodeAssignment* _tmp424_;
					ValaCCodeAssignment* _tmp425_;
					ValaCCodeBinaryExpression* _tmp426_;
					const gchar* _tmp427_;
					ValaCCodeExpression* _tmp428_;
					ValaCCodeExpression* _tmp429_;
					const gchar* _tmp430_;
					ValaCCodeExpression* _tmp431_;
					ValaCCodeExpression* _tmp432_;
					ValaCCodeConstant* _tmp433_;
					ValaCCodeConstant* _tmp434_;
					ValaCCodeBinaryExpression* _tmp435_;
					ValaCCodeBinaryExpression* _tmp436_;
					ValaCCodeAssignment* _tmp437_;
					ValaCCodeAssignment* _tmp438_;
					ValaCCodeFunctionCall* get_item = NULL;
					ValaCCodeIdentifier* _tmp439_;
					ValaCCodeIdentifier* _tmp440_;
					ValaCCodeFunctionCall* _tmp441_;
					ValaCCodeFunctionCall* _tmp442_;
					ValaCCodeFunctionCall* _tmp443_;
					ValaLocalVariable* _tmp444_;
					gchar* _tmp445_;
					gchar* _tmp446_;
					ValaCCodeExpression* _tmp447_;
					ValaCCodeExpression* _tmp448_;
					ValaCCodeFunctionCall* _tmp449_;
					const gchar* _tmp450_;
					ValaCCodeExpression* _tmp451_;
					ValaCCodeExpression* _tmp452_;
					ValaCCodeExpression* element_expr = NULL;
					ValaCCodeFunctionCall* _tmp453_;
					ValaCCodeExpression* _tmp454_;
					ValaDataType* _tmp455_;
					ValaDataType* _tmp456_;
					gboolean _tmp457_;
					gboolean _tmp458_;
					ValaLocalVariable* _tmp470_;
					ValaLocalVariable* _tmp471_;
					ValaCCodeFunction* _tmp472_;
					ValaCCodeFunction* _tmp473_;
					ValaLocalVariable* _tmp474_;
					ValaLocalVariable* _tmp475_;
					gchar* _tmp476_;
					gchar* _tmp477_;
					ValaCCodeExpression* _tmp478_;
					ValaCCodeExpression* _tmp479_;
					ValaCCodeExpression* _tmp480_;
					ValaBlock* _tmp481_;
					ValaBlock* _tmp482_;
					ValaCCodeFunction* _tmp483_;
					ValaCCodeFunction* _tmp484_;
					_tmp390_ = ((ValaCCodeBaseModule*) self)->uint_type;
					_tmp391_ = vala_data_type_copy (_tmp390_);
					_tmp392_ = _tmp391_;
					_tmp393_ = vala_foreach_statement_get_variable_name (stmt);
					_tmp394_ = _tmp393_;
					_tmp395_ = g_strdup_printf ("%s_index", _tmp394_);
					_tmp396_ = _tmp395_;
					_tmp397_ = vala_local_variable_new (_tmp392_, _tmp396_, NULL, NULL);
					_tmp398_ = _tmp397_;
					_g_free0 (_tmp396_);
					_vala_code_node_unref0 (_tmp392_);
					iterator_variable = _tmp398_;
					_tmp399_ = iterator_variable;
					vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp399_);
					_tmp400_ = iterator_variable;
					_tmp401_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp400_);
					_tmp402_ = _tmp401_;
					_tmp403_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp402_);
					_tmp404_ = _tmp403_;
					_g_free0 (_tmp402_);
					arr_index = _tmp404_;
					_tmp405_ = arr_index;
					_tmp406_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp405_);
					_tmp407_ = _tmp406_;
					_tmp408_ = collection_backup;
					_tmp409_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp408_);
					_tmp410_ = _tmp409_;
					_tmp411_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp410_);
					_tmp412_ = _tmp411_;
					_tmp413_ = vala_ccode_member_access_new_pointer (_tmp412_, "len");
					_tmp414_ = _tmp413_;
					_tmp415_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp407_, (ValaCCodeExpression*) _tmp414_);
					_tmp416_ = _tmp415_;
					_vala_ccode_node_unref0 (_tmp414_);
					_vala_ccode_node_unref0 (_tmp412_);
					_g_free0 (_tmp410_);
					_vala_ccode_node_unref0 (_tmp407_);
					ccond = _tmp416_;
					_tmp417_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp418_ = _tmp417_;
					_tmp419_ = arr_index;
					_tmp420_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp419_);
					_tmp421_ = _tmp420_;
					_tmp422_ = vala_ccode_constant_new ("0");
					_tmp423_ = _tmp422_;
					_tmp424_ = vala_ccode_assignment_new (_tmp421_, (ValaCCodeExpression*) _tmp423_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
					_tmp425_ = _tmp424_;
					_tmp426_ = ccond;
					_tmp427_ = arr_index;
					_tmp428_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp427_);
					_tmp429_ = _tmp428_;
					_tmp430_ = arr_index;
					_tmp431_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp430_);
					_tmp432_ = _tmp431_;
					_tmp433_ = vala_ccode_constant_new ("1");
					_tmp434_ = _tmp433_;
					_tmp435_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp432_, (ValaCCodeExpression*) _tmp434_);
					_tmp436_ = _tmp435_;
					_tmp437_ = vala_ccode_assignment_new (_tmp429_, (ValaCCodeExpression*) _tmp436_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
					_tmp438_ = _tmp437_;
					vala_ccode_function_open_for (_tmp418_, (ValaCCodeExpression*) _tmp425_, (ValaCCodeExpression*) _tmp426_, (ValaCCodeExpression*) _tmp438_);
					_vala_ccode_node_unref0 (_tmp438_);
					_vala_ccode_node_unref0 (_tmp436_);
					_vala_ccode_node_unref0 (_tmp434_);
					_vala_ccode_node_unref0 (_tmp432_);
					_vala_ccode_node_unref0 (_tmp429_);
					_vala_ccode_node_unref0 (_tmp425_);
					_vala_ccode_node_unref0 (_tmp423_);
					_vala_ccode_node_unref0 (_tmp421_);
					_tmp439_ = vala_ccode_identifier_new ("g_ptr_array_index");
					_tmp440_ = _tmp439_;
					_tmp441_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp440_);
					_tmp442_ = _tmp441_;
					_vala_ccode_node_unref0 (_tmp440_);
					get_item = _tmp442_;
					_tmp443_ = get_item;
					_tmp444_ = collection_backup;
					_tmp445_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp444_);
					_tmp446_ = _tmp445_;
					_tmp447_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp446_);
					_tmp448_ = _tmp447_;
					vala_ccode_function_call_add_argument (_tmp443_, _tmp448_);
					_vala_ccode_node_unref0 (_tmp448_);
					_g_free0 (_tmp446_);
					_tmp449_ = get_item;
					_tmp450_ = arr_index;
					_tmp451_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp450_);
					_tmp452_ = _tmp451_;
					vala_ccode_function_call_add_argument (_tmp449_, _tmp452_);
					_vala_ccode_node_unref0 (_tmp452_);
					_tmp453_ = get_item;
					_tmp454_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp453_);
					element_expr = _tmp454_;
					_tmp455_ = vala_foreach_statement_get_type_reference (stmt);
					_tmp456_ = _tmp455_;
					_tmp457_ = vala_data_type_get_value_owned (_tmp456_);
					_tmp458_ = _tmp457_;
					if (_tmp458_) {
						ValaDataType* _tmp459_;
						ValaDataType* _tmp460_;
						ValaCCodeExpression* _tmp461_;
						ValaGLibValue* _tmp462_;
						ValaGLibValue* _tmp463_;
						ValaLocalVariable* _tmp464_;
						ValaLocalVariable* _tmp465_;
						ValaTargetValue* _tmp466_;
						ValaTargetValue* _tmp467_;
						ValaCCodeExpression* _tmp468_;
						ValaCCodeExpression* _tmp469_;
						_tmp459_ = vala_foreach_statement_get_type_reference (stmt);
						_tmp460_ = _tmp459_;
						_tmp461_ = element_expr;
						_tmp462_ = vala_glib_value_new (_tmp460_, _tmp461_, FALSE);
						_tmp463_ = _tmp462_;
						_tmp464_ = vala_foreach_statement_get_element_variable (stmt);
						_tmp465_ = _tmp464_;
						_tmp466_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp463_, (ValaCodeNode*) _tmp465_);
						_tmp467_ = _tmp466_;
						_tmp468_ = vala_get_cvalue_ (_tmp467_);
						_tmp469_ = _vala_ccode_node_ref0 (_tmp468_);
						_vala_ccode_node_unref0 (element_expr);
						element_expr = _tmp469_;
						_vala_target_value_unref0 (_tmp467_);
						_vala_target_value_unref0 (_tmp463_);
					}
					_tmp470_ = vala_foreach_statement_get_element_variable (stmt);
					_tmp471_ = _tmp470_;
					vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp471_);
					_tmp472_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp473_ = _tmp472_;
					_tmp474_ = vala_foreach_statement_get_element_variable (stmt);
					_tmp475_ = _tmp474_;
					_tmp476_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp475_);
					_tmp477_ = _tmp476_;
					_tmp478_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp477_);
					_tmp479_ = _tmp478_;
					_tmp480_ = element_expr;
					vala_ccode_function_add_assignment (_tmp473_, _tmp479_, _tmp480_);
					_vala_ccode_node_unref0 (_tmp479_);
					_g_free0 (_tmp477_);
					_tmp481_ = vala_foreach_statement_get_body (stmt);
					_tmp482_ = _tmp481_;
					vala_code_node_emit ((ValaCodeNode*) _tmp482_, (ValaCodeGenerator*) self);
					_tmp483_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp484_ = _tmp483_;
					vala_ccode_function_close (_tmp484_);
					_vala_ccode_node_unref0 (element_expr);
					_vala_ccode_node_unref0 (get_item);
					_vala_ccode_node_unref0 (ccond);
					_g_free0 (arr_index);
					_vala_code_node_unref0 (iterator_variable);
				} else {
					ValaExpression* _tmp485_;
					ValaExpression* _tmp486_;
					ValaDataType* _tmp487_;
					ValaDataType* _tmp488_;
					ValaClass* _tmp489_;
					ValaObjectType* _tmp490_;
					ValaObjectType* _tmp491_;
					gboolean _tmp492_;
					_tmp485_ = vala_foreach_statement_get_collection (stmt);
					_tmp486_ = _tmp485_;
					_tmp487_ = vala_expression_get_value_type (_tmp486_);
					_tmp488_ = _tmp487_;
					_tmp489_ = ((ValaCCodeBaseModule*) self)->gvaluearray_type;
					_tmp490_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp489_, NULL);
					_tmp491_ = _tmp490_;
					_tmp492_ = vala_data_type_compatible (_tmp488_, (ValaDataType*) _tmp491_);
					_vala_code_node_unref0 (_tmp491_);
					if (_tmp492_) {
						ValaLocalVariable* iterator_variable = NULL;
						ValaDataType* _tmp493_;
						ValaDataType* _tmp494_;
						ValaDataType* _tmp495_;
						const gchar* _tmp496_;
						const gchar* _tmp497_;
						gchar* _tmp498_;
						gchar* _tmp499_;
						ValaLocalVariable* _tmp500_;
						ValaLocalVariable* _tmp501_;
						ValaLocalVariable* _tmp502_;
						gchar* arr_index = NULL;
						ValaLocalVariable* _tmp503_;
						gchar* _tmp504_;
						gchar* _tmp505_;
						gchar* _tmp506_;
						gchar* _tmp507_;
						ValaCCodeBinaryExpression* ccond = NULL;
						const gchar* _tmp508_;
						ValaCCodeExpression* _tmp509_;
						ValaCCodeExpression* _tmp510_;
						ValaLocalVariable* _tmp511_;
						gchar* _tmp512_;
						gchar* _tmp513_;
						ValaCCodeExpression* _tmp514_;
						ValaCCodeExpression* _tmp515_;
						ValaCCodeMemberAccess* _tmp516_;
						ValaCCodeMemberAccess* _tmp517_;
						ValaCCodeBinaryExpression* _tmp518_;
						ValaCCodeBinaryExpression* _tmp519_;
						ValaCCodeFunction* _tmp520_;
						ValaCCodeFunction* _tmp521_;
						const gchar* _tmp522_;
						ValaCCodeExpression* _tmp523_;
						ValaCCodeExpression* _tmp524_;
						ValaCCodeConstant* _tmp525_;
						ValaCCodeConstant* _tmp526_;
						ValaCCodeAssignment* _tmp527_;
						ValaCCodeAssignment* _tmp528_;
						ValaCCodeBinaryExpression* _tmp529_;
						const gchar* _tmp530_;
						ValaCCodeExpression* _tmp531_;
						ValaCCodeExpression* _tmp532_;
						const gchar* _tmp533_;
						ValaCCodeExpression* _tmp534_;
						ValaCCodeExpression* _tmp535_;
						ValaCCodeConstant* _tmp536_;
						ValaCCodeConstant* _tmp537_;
						ValaCCodeBinaryExpression* _tmp538_;
						ValaCCodeBinaryExpression* _tmp539_;
						ValaCCodeAssignment* _tmp540_;
						ValaCCodeAssignment* _tmp541_;
						ValaCCodeFunctionCall* get_item = NULL;
						ValaCCodeIdentifier* _tmp542_;
						ValaCCodeIdentifier* _tmp543_;
						ValaCCodeFunctionCall* _tmp544_;
						ValaCCodeFunctionCall* _tmp545_;
						ValaCCodeFunctionCall* _tmp546_;
						ValaLocalVariable* _tmp547_;
						gchar* _tmp548_;
						gchar* _tmp549_;
						ValaCCodeExpression* _tmp550_;
						ValaCCodeExpression* _tmp551_;
						ValaCCodeFunctionCall* _tmp552_;
						const gchar* _tmp553_;
						ValaCCodeExpression* _tmp554_;
						ValaCCodeExpression* _tmp555_;
						ValaCCodeExpression* element_expr = NULL;
						ValaCCodeFunctionCall* _tmp556_;
						ValaCCodeUnaryExpression* _tmp557_;
						ValaDataType* _tmp558_;
						ValaDataType* _tmp559_;
						gboolean _tmp560_;
						gboolean _tmp561_;
						ValaLocalVariable* _tmp574_;
						ValaLocalVariable* _tmp575_;
						ValaCCodeFunction* _tmp576_;
						ValaCCodeFunction* _tmp577_;
						ValaLocalVariable* _tmp578_;
						ValaLocalVariable* _tmp579_;
						gchar* _tmp580_;
						gchar* _tmp581_;
						ValaCCodeExpression* _tmp582_;
						ValaCCodeExpression* _tmp583_;
						ValaCCodeExpression* _tmp584_;
						ValaBlock* _tmp585_;
						ValaBlock* _tmp586_;
						ValaCCodeFunction* _tmp587_;
						ValaCCodeFunction* _tmp588_;
						_tmp493_ = ((ValaCCodeBaseModule*) self)->uint_type;
						_tmp494_ = vala_data_type_copy (_tmp493_);
						_tmp495_ = _tmp494_;
						_tmp496_ = vala_foreach_statement_get_variable_name (stmt);
						_tmp497_ = _tmp496_;
						_tmp498_ = g_strdup_printf ("%s_index", _tmp497_);
						_tmp499_ = _tmp498_;
						_tmp500_ = vala_local_variable_new (_tmp495_, _tmp499_, NULL, NULL);
						_tmp501_ = _tmp500_;
						_g_free0 (_tmp499_);
						_vala_code_node_unref0 (_tmp495_);
						iterator_variable = _tmp501_;
						_tmp502_ = iterator_variable;
						vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp502_);
						_tmp503_ = iterator_variable;
						_tmp504_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp503_);
						_tmp505_ = _tmp504_;
						_tmp506_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp505_);
						_tmp507_ = _tmp506_;
						_g_free0 (_tmp505_);
						arr_index = _tmp507_;
						_tmp508_ = arr_index;
						_tmp509_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp508_);
						_tmp510_ = _tmp509_;
						_tmp511_ = collection_backup;
						_tmp512_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp511_);
						_tmp513_ = _tmp512_;
						_tmp514_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp513_);
						_tmp515_ = _tmp514_;
						_tmp516_ = vala_ccode_member_access_new_pointer (_tmp515_, "n_values");
						_tmp517_ = _tmp516_;
						_tmp518_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp510_, (ValaCCodeExpression*) _tmp517_);
						_tmp519_ = _tmp518_;
						_vala_ccode_node_unref0 (_tmp517_);
						_vala_ccode_node_unref0 (_tmp515_);
						_g_free0 (_tmp513_);
						_vala_ccode_node_unref0 (_tmp510_);
						ccond = _tmp519_;
						_tmp520_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp521_ = _tmp520_;
						_tmp522_ = arr_index;
						_tmp523_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp522_);
						_tmp524_ = _tmp523_;
						_tmp525_ = vala_ccode_constant_new ("0");
						_tmp526_ = _tmp525_;
						_tmp527_ = vala_ccode_assignment_new (_tmp524_, (ValaCCodeExpression*) _tmp526_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
						_tmp528_ = _tmp527_;
						_tmp529_ = ccond;
						_tmp530_ = arr_index;
						_tmp531_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp530_);
						_tmp532_ = _tmp531_;
						_tmp533_ = arr_index;
						_tmp534_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp533_);
						_tmp535_ = _tmp534_;
						_tmp536_ = vala_ccode_constant_new ("1");
						_tmp537_ = _tmp536_;
						_tmp538_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp535_, (ValaCCodeExpression*) _tmp537_);
						_tmp539_ = _tmp538_;
						_tmp540_ = vala_ccode_assignment_new (_tmp532_, (ValaCCodeExpression*) _tmp539_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
						_tmp541_ = _tmp540_;
						vala_ccode_function_open_for (_tmp521_, (ValaCCodeExpression*) _tmp528_, (ValaCCodeExpression*) _tmp529_, (ValaCCodeExpression*) _tmp541_);
						_vala_ccode_node_unref0 (_tmp541_);
						_vala_ccode_node_unref0 (_tmp539_);
						_vala_ccode_node_unref0 (_tmp537_);
						_vala_ccode_node_unref0 (_tmp535_);
						_vala_ccode_node_unref0 (_tmp532_);
						_vala_ccode_node_unref0 (_tmp528_);
						_vala_ccode_node_unref0 (_tmp526_);
						_vala_ccode_node_unref0 (_tmp524_);
						_tmp542_ = vala_ccode_identifier_new ("g_value_array_get_nth");
						_tmp543_ = _tmp542_;
						_tmp544_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp543_);
						_tmp545_ = _tmp544_;
						_vala_ccode_node_unref0 (_tmp543_);
						get_item = _tmp545_;
						_tmp546_ = get_item;
						_tmp547_ = collection_backup;
						_tmp548_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp547_);
						_tmp549_ = _tmp548_;
						_tmp550_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp549_);
						_tmp551_ = _tmp550_;
						vala_ccode_function_call_add_argument (_tmp546_, _tmp551_);
						_vala_ccode_node_unref0 (_tmp551_);
						_g_free0 (_tmp549_);
						_tmp552_ = get_item;
						_tmp553_ = arr_index;
						_tmp554_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp553_);
						_tmp555_ = _tmp554_;
						vala_ccode_function_call_add_argument (_tmp552_, _tmp555_);
						_vala_ccode_node_unref0 (_tmp555_);
						_tmp556_ = get_item;
						_tmp557_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp556_);
						element_expr = (ValaCCodeExpression*) _tmp557_;
						_tmp558_ = vala_foreach_statement_get_type_reference (stmt);
						_tmp559_ = _tmp558_;
						_tmp560_ = vala_data_type_get_value_owned (_tmp559_);
						_tmp561_ = _tmp560_;
						if (_tmp561_) {
							ValaDataType* _tmp562_;
							ValaDataType* _tmp563_;
							ValaCCodeExpression* _tmp564_;
							ValaGLibValue* _tmp565_;
							ValaGLibValue* _tmp566_;
							ValaStruct* _tmp567_;
							ValaStructValueType* _tmp568_;
							ValaStructValueType* _tmp569_;
							ValaTargetValue* _tmp570_;
							ValaTargetValue* _tmp571_;
							ValaCCodeExpression* _tmp572_;
							ValaCCodeExpression* _tmp573_;
							_tmp562_ = vala_foreach_statement_get_type_reference (stmt);
							_tmp563_ = _tmp562_;
							_tmp564_ = element_expr;
							_tmp565_ = vala_glib_value_new (_tmp563_, _tmp564_, FALSE);
							_tmp566_ = _tmp565_;
							_tmp567_ = ((ValaCCodeBaseModule*) self)->gvalue_type;
							_tmp568_ = vala_struct_value_type_new (_tmp567_, NULL);
							_tmp569_ = _tmp568_;
							_tmp570_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp566_, (ValaCodeNode*) _tmp569_);
							_tmp571_ = _tmp570_;
							_tmp572_ = vala_get_cvalue_ (_tmp571_);
							_tmp573_ = _vala_ccode_node_ref0 (_tmp572_);
							_vala_ccode_node_unref0 (element_expr);
							element_expr = _tmp573_;
							_vala_target_value_unref0 (_tmp571_);
							_vala_code_node_unref0 (_tmp569_);
							_vala_target_value_unref0 (_tmp566_);
						}
						_tmp574_ = vala_foreach_statement_get_element_variable (stmt);
						_tmp575_ = _tmp574_;
						vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp575_);
						_tmp576_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp577_ = _tmp576_;
						_tmp578_ = vala_foreach_statement_get_element_variable (stmt);
						_tmp579_ = _tmp578_;
						_tmp580_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp579_);
						_tmp581_ = _tmp580_;
						_tmp582_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp581_);
						_tmp583_ = _tmp582_;
						_tmp584_ = element_expr;
						vala_ccode_function_add_assignment (_tmp577_, _tmp583_, _tmp584_);
						_vala_ccode_node_unref0 (_tmp583_);
						_g_free0 (_tmp581_);
						_tmp585_ = vala_foreach_statement_get_body (stmt);
						_tmp586_ = _tmp585_;
						vala_code_node_emit ((ValaCodeNode*) _tmp586_, (ValaCodeGenerator*) self);
						_tmp587_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp588_ = _tmp587_;
						vala_ccode_function_close (_tmp588_);
						_vala_ccode_node_unref0 (element_expr);
						_vala_ccode_node_unref0 (get_item);
						_vala_ccode_node_unref0 (ccond);
						_g_free0 (arr_index);
						_vala_code_node_unref0 (iterator_variable);
					} else {
						ValaExpression* _tmp589_;
						ValaExpression* _tmp590_;
						ValaDataType* _tmp591_;
						ValaDataType* _tmp592_;
						ValaClass* _tmp593_;
						ValaObjectType* _tmp594_;
						ValaObjectType* _tmp595_;
						gboolean _tmp596_;
						_tmp589_ = vala_foreach_statement_get_collection (stmt);
						_tmp590_ = _tmp589_;
						_tmp591_ = vala_expression_get_value_type (_tmp590_);
						_tmp592_ = _tmp591_;
						_tmp593_ = ((ValaCCodeBaseModule*) self)->gsequence_type;
						_tmp594_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp593_, NULL);
						_tmp595_ = _tmp594_;
						_tmp596_ = vala_data_type_compatible (_tmp592_, (ValaDataType*) _tmp595_);
						_vala_code_node_unref0 (_tmp595_);
						if (_tmp596_) {
							ValaLocalVariable* iterator_variable = NULL;
							ValaClass* _tmp597_;
							ValaObjectType* _tmp598_;
							ValaObjectType* _tmp599_;
							const gchar* _tmp600_;
							const gchar* _tmp601_;
							gchar* _tmp602_;
							gchar* _tmp603_;
							ValaLocalVariable* _tmp604_;
							ValaLocalVariable* _tmp605_;
							ValaLocalVariable* _tmp606_;
							gchar* sequence_iter = NULL;
							ValaLocalVariable* _tmp607_;
							gchar* _tmp608_;
							gchar* _tmp609_;
							gchar* _tmp610_;
							gchar* _tmp611_;
							ValaCCodeFunctionCall* ccond_is_end = NULL;
							ValaCCodeIdentifier* _tmp612_;
							ValaCCodeIdentifier* _tmp613_;
							ValaCCodeFunctionCall* _tmp614_;
							ValaCCodeFunctionCall* _tmp615_;
							ValaCCodeFunctionCall* _tmp616_;
							const gchar* _tmp617_;
							ValaCCodeExpression* _tmp618_;
							ValaCCodeExpression* _tmp619_;
							ValaCCodeUnaryExpression* ccond = NULL;
							ValaCCodeFunctionCall* _tmp620_;
							ValaCCodeUnaryExpression* _tmp621_;
							ValaCCodeFunctionCall* cbegin = NULL;
							ValaCCodeIdentifier* _tmp622_;
							ValaCCodeIdentifier* _tmp623_;
							ValaCCodeFunctionCall* _tmp624_;
							ValaCCodeFunctionCall* _tmp625_;
							ValaCCodeFunctionCall* _tmp626_;
							ValaLocalVariable* _tmp627_;
							gchar* _tmp628_;
							gchar* _tmp629_;
							ValaCCodeExpression* _tmp630_;
							ValaCCodeExpression* _tmp631_;
							ValaCCodeFunctionCall* cnext = NULL;
							ValaCCodeIdentifier* _tmp632_;
							ValaCCodeIdentifier* _tmp633_;
							ValaCCodeFunctionCall* _tmp634_;
							ValaCCodeFunctionCall* _tmp635_;
							ValaCCodeFunctionCall* _tmp636_;
							const gchar* _tmp637_;
							ValaCCodeExpression* _tmp638_;
							ValaCCodeExpression* _tmp639_;
							ValaCCodeFunction* _tmp640_;
							ValaCCodeFunction* _tmp641_;
							const gchar* _tmp642_;
							ValaCCodeExpression* _tmp643_;
							ValaCCodeExpression* _tmp644_;
							ValaCCodeFunctionCall* _tmp645_;
							ValaCCodeAssignment* _tmp646_;
							ValaCCodeAssignment* _tmp647_;
							ValaCCodeUnaryExpression* _tmp648_;
							const gchar* _tmp649_;
							ValaCCodeExpression* _tmp650_;
							ValaCCodeExpression* _tmp651_;
							ValaCCodeFunctionCall* _tmp652_;
							ValaCCodeAssignment* _tmp653_;
							ValaCCodeAssignment* _tmp654_;
							ValaCCodeFunctionCall* get_item = NULL;
							ValaCCodeIdentifier* _tmp655_;
							ValaCCodeIdentifier* _tmp656_;
							ValaCCodeFunctionCall* _tmp657_;
							ValaCCodeFunctionCall* _tmp658_;
							ValaCCodeFunctionCall* _tmp659_;
							const gchar* _tmp660_;
							ValaCCodeExpression* _tmp661_;
							ValaCCodeExpression* _tmp662_;
							ValaCCodeExpression* element_expr = NULL;
							ValaCCodeFunctionCall* _tmp663_;
							ValaCCodeExpression* _tmp664_;
							ValaDataType* _tmp665_;
							ValaList* _tmp666_;
							gint _tmp667_;
							gint _tmp668_;
							ValaDataType* element_type = NULL;
							ValaDataType* _tmp671_;
							ValaList* _tmp672_;
							gpointer _tmp673_;
							ValaDataType* _tmp674_;
							ValaDataType* _tmp675_;
							ValaDataType* _tmp676_;
							ValaDataType* _tmp677_;
							ValaCCodeExpression* _tmp678_;
							ValaDataType* _tmp679_;
							ValaCCodeExpression* _tmp680_;
							ValaDataType* _tmp681_;
							ValaCCodeExpression* _tmp682_;
							ValaGLibValue* _tmp683_;
							ValaGLibValue* _tmp684_;
							ValaDataType* _tmp685_;
							ValaDataType* _tmp686_;
							ValaTargetValue* _tmp687_;
							ValaTargetValue* _tmp688_;
							ValaCCodeExpression* _tmp689_;
							ValaCCodeExpression* _tmp690_;
							ValaLocalVariable* _tmp691_;
							ValaLocalVariable* _tmp692_;
							ValaCCodeFunction* _tmp693_;
							ValaCCodeFunction* _tmp694_;
							ValaLocalVariable* _tmp695_;
							ValaLocalVariable* _tmp696_;
							gchar* _tmp697_;
							gchar* _tmp698_;
							ValaCCodeExpression* _tmp699_;
							ValaCCodeExpression* _tmp700_;
							ValaCCodeExpression* _tmp701_;
							ValaBlock* _tmp702_;
							ValaBlock* _tmp703_;
							ValaCCodeFunction* _tmp704_;
							ValaCCodeFunction* _tmp705_;
							_tmp597_ = ((ValaCCodeBaseModule*) self)->gsequence_iter_type;
							_tmp598_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp597_, NULL);
							_tmp599_ = _tmp598_;
							_tmp600_ = vala_foreach_statement_get_variable_name (stmt);
							_tmp601_ = _tmp600_;
							_tmp602_ = g_strdup_printf ("%s_iter", _tmp601_);
							_tmp603_ = _tmp602_;
							_tmp604_ = vala_local_variable_new ((ValaDataType*) _tmp599_, _tmp603_, NULL, NULL);
							_tmp605_ = _tmp604_;
							_g_free0 (_tmp603_);
							_vala_code_node_unref0 (_tmp599_);
							iterator_variable = _tmp605_;
							_tmp606_ = iterator_variable;
							vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp606_);
							_tmp607_ = iterator_variable;
							_tmp608_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp607_);
							_tmp609_ = _tmp608_;
							_tmp610_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp609_);
							_tmp611_ = _tmp610_;
							_g_free0 (_tmp609_);
							sequence_iter = _tmp611_;
							_tmp612_ = vala_ccode_identifier_new ("g_sequence_iter_is_end");
							_tmp613_ = _tmp612_;
							_tmp614_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp613_);
							_tmp615_ = _tmp614_;
							_vala_ccode_node_unref0 (_tmp613_);
							ccond_is_end = _tmp615_;
							_tmp616_ = ccond_is_end;
							_tmp617_ = sequence_iter;
							_tmp618_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp617_);
							_tmp619_ = _tmp618_;
							vala_ccode_function_call_add_argument (_tmp616_, _tmp619_);
							_vala_ccode_node_unref0 (_tmp619_);
							_tmp620_ = ccond_is_end;
							_tmp621_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_LOGICAL_NEGATION, (ValaCCodeExpression*) _tmp620_);
							ccond = _tmp621_;
							_tmp622_ = vala_ccode_identifier_new ("g_sequence_get_begin_iter");
							_tmp623_ = _tmp622_;
							_tmp624_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp623_);
							_tmp625_ = _tmp624_;
							_vala_ccode_node_unref0 (_tmp623_);
							cbegin = _tmp625_;
							_tmp626_ = cbegin;
							_tmp627_ = collection_backup;
							_tmp628_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp627_);
							_tmp629_ = _tmp628_;
							_tmp630_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp629_);
							_tmp631_ = _tmp630_;
							vala_ccode_function_call_add_argument (_tmp626_, _tmp631_);
							_vala_ccode_node_unref0 (_tmp631_);
							_g_free0 (_tmp629_);
							_tmp632_ = vala_ccode_identifier_new ("g_sequence_iter_next");
							_tmp633_ = _tmp632_;
							_tmp634_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp633_);
							_tmp635_ = _tmp634_;
							_vala_ccode_node_unref0 (_tmp633_);
							cnext = _tmp635_;
							_tmp636_ = cnext;
							_tmp637_ = sequence_iter;
							_tmp638_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp637_);
							_tmp639_ = _tmp638_;
							vala_ccode_function_call_add_argument (_tmp636_, _tmp639_);
							_vala_ccode_node_unref0 (_tmp639_);
							_tmp640_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
							_tmp641_ = _tmp640_;
							_tmp642_ = sequence_iter;
							_tmp643_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp642_);
							_tmp644_ = _tmp643_;
							_tmp645_ = cbegin;
							_tmp646_ = vala_ccode_assignment_new (_tmp644_, (ValaCCodeExpression*) _tmp645_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
							_tmp647_ = _tmp646_;
							_tmp648_ = ccond;
							_tmp649_ = sequence_iter;
							_tmp650_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp649_);
							_tmp651_ = _tmp650_;
							_tmp652_ = cnext;
							_tmp653_ = vala_ccode_assignment_new (_tmp651_, (ValaCCodeExpression*) _tmp652_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
							_tmp654_ = _tmp653_;
							vala_ccode_function_open_for (_tmp641_, (ValaCCodeExpression*) _tmp647_, (ValaCCodeExpression*) _tmp648_, (ValaCCodeExpression*) _tmp654_);
							_vala_ccode_node_unref0 (_tmp654_);
							_vala_ccode_node_unref0 (_tmp651_);
							_vala_ccode_node_unref0 (_tmp647_);
							_vala_ccode_node_unref0 (_tmp644_);
							_tmp655_ = vala_ccode_identifier_new ("g_sequence_get");
							_tmp656_ = _tmp655_;
							_tmp657_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp656_);
							_tmp658_ = _tmp657_;
							_vala_ccode_node_unref0 (_tmp656_);
							get_item = _tmp658_;
							_tmp659_ = get_item;
							_tmp660_ = sequence_iter;
							_tmp661_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp660_);
							_tmp662_ = _tmp661_;
							vala_ccode_function_call_add_argument (_tmp659_, _tmp662_);
							_vala_ccode_node_unref0 (_tmp662_);
							_tmp663_ = get_item;
							_tmp664_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp663_);
							element_expr = _tmp664_;
							_tmp665_ = collection_type;
							_tmp666_ = vala_data_type_get_type_arguments (_tmp665_);
							_tmp667_ = vala_collection_get_size ((ValaCollection*) _tmp666_);
							_tmp668_ = _tmp667_;
							if (_tmp668_ != 1) {
								ValaSourceReference* _tmp669_;
								ValaSourceReference* _tmp670_;
								_tmp669_ = vala_code_node_get_source_reference ((ValaCodeNode*) stmt);
								_tmp670_ = _tmp669_;
								vala_report_error (_tmp670_, "internal error: missing generic type argument");
								vala_code_node_set_error ((ValaCodeNode*) stmt, TRUE);
								_vala_ccode_node_unref0 (element_expr);
								_vala_ccode_node_unref0 (get_item);
								_vala_ccode_node_unref0 (cnext);
								_vala_ccode_node_unref0 (cbegin);
								_vala_ccode_node_unref0 (ccond);
								_vala_ccode_node_unref0 (ccond_is_end);
								_g_free0 (sequence_iter);
								_vala_code_node_unref0 (iterator_variable);
								_vala_code_node_unref0 (array_type);
								_vala_code_node_unref0 (collection_type);
								_vala_code_node_unref0 (collection_backup);
								return;
							}
							_tmp671_ = collection_type;
							_tmp672_ = vala_data_type_get_type_arguments (_tmp671_);
							_tmp673_ = vala_list_get (_tmp672_, 0);
							_tmp674_ = (ValaDataType*) _tmp673_;
							_tmp675_ = vala_data_type_copy (_tmp674_);
							_tmp676_ = _tmp675_;
							_vala_code_node_unref0 (_tmp674_);
							element_type = _tmp676_;
							_tmp677_ = element_type;
							vala_data_type_set_value_owned (_tmp677_, FALSE);
							_tmp678_ = element_expr;
							_tmp679_ = element_type;
							_tmp680_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, _tmp678_, _tmp679_);
							_vala_ccode_node_unref0 (element_expr);
							element_expr = _tmp680_;
							_tmp681_ = element_type;
							_tmp682_ = element_expr;
							_tmp683_ = vala_glib_value_new (_tmp681_, _tmp682_, FALSE);
							_tmp684_ = _tmp683_;
							_tmp685_ = vala_foreach_statement_get_type_reference (stmt);
							_tmp686_ = _tmp685_;
							_tmp687_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp684_, _tmp686_, (ValaCodeNode*) stmt);
							_tmp688_ = _tmp687_;
							_tmp689_ = vala_get_cvalue_ (_tmp688_);
							_tmp690_ = _vala_ccode_node_ref0 (_tmp689_);
							_vala_ccode_node_unref0 (element_expr);
							element_expr = _tmp690_;
							_vala_target_value_unref0 (_tmp688_);
							_vala_target_value_unref0 (_tmp684_);
							_tmp691_ = vala_foreach_statement_get_element_variable (stmt);
							_tmp692_ = _tmp691_;
							vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp692_);
							_tmp693_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
							_tmp694_ = _tmp693_;
							_tmp695_ = vala_foreach_statement_get_element_variable (stmt);
							_tmp696_ = _tmp695_;
							_tmp697_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp696_);
							_tmp698_ = _tmp697_;
							_tmp699_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp698_);
							_tmp700_ = _tmp699_;
							_tmp701_ = element_expr;
							vala_ccode_function_add_assignment (_tmp694_, _tmp700_, _tmp701_);
							_vala_ccode_node_unref0 (_tmp700_);
							_g_free0 (_tmp698_);
							_tmp702_ = vala_foreach_statement_get_body (stmt);
							_tmp703_ = _tmp702_;
							vala_code_node_emit ((ValaCodeNode*) _tmp703_, (ValaCodeGenerator*) self);
							_tmp704_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
							_tmp705_ = _tmp704_;
							vala_ccode_function_close (_tmp705_);
							_vala_code_node_unref0 (element_type);
							_vala_ccode_node_unref0 (element_expr);
							_vala_ccode_node_unref0 (get_item);
							_vala_ccode_node_unref0 (cnext);
							_vala_ccode_node_unref0 (cbegin);
							_vala_ccode_node_unref0 (ccond);
							_vala_ccode_node_unref0 (ccond_is_end);
							_g_free0 (sequence_iter);
							_vala_code_node_unref0 (iterator_variable);
						} else {
							ValaSourceReference* _tmp706_;
							ValaSourceReference* _tmp707_;
							_tmp706_ = vala_code_node_get_source_reference ((ValaCodeNode*) stmt);
							_tmp707_ = _tmp706_;
							vala_report_error (_tmp707_, "internal error: unsupported collection type");
							vala_code_node_set_error ((ValaCodeNode*) stmt, TRUE);
							_vala_code_node_unref0 (array_type);
							_vala_code_node_unref0 (collection_type);
							_vala_code_node_unref0 (collection_backup);
							return;
						}
					}
				}
			}
		}
	}
	{
		ValaList* _local_list = NULL;
		ValaList* _tmp708_;
		gint _local_size = 0;
		ValaList* _tmp709_;
		gint _tmp710_;
		gint _tmp711_;
		gint _local_index = 0;
		_tmp708_ = vala_block_get_local_variables ((ValaBlock*) stmt);
		_local_list = _tmp708_;
		_tmp709_ = _local_list;
		_tmp710_ = vala_collection_get_size ((ValaCollection*) _tmp709_);
		_tmp711_ = _tmp710_;
		_local_size = _tmp711_;
		_local_index = -1;
		while (TRUE) {
			gint _tmp712_;
			gint _tmp713_;
			ValaLocalVariable* local = NULL;
			ValaList* _tmp714_;
			gpointer _tmp715_;
			ValaLocalVariable* _tmp716_;
			ValaDataType* _tmp717_;
			ValaDataType* _tmp718_;
			_local_index = _local_index + 1;
			_tmp712_ = _local_index;
			_tmp713_ = _local_size;
			if (!(_tmp712_ < _tmp713_)) {
				break;
			}
			_tmp714_ = _local_list;
			_tmp715_ = vala_list_get (_tmp714_, _local_index);
			local = (ValaLocalVariable*) _tmp715_;
			_tmp716_ = local;
			_tmp717_ = vala_variable_get_variable_type ((ValaVariable*) _tmp716_);
			_tmp718_ = _tmp717_;
			if (vala_ccode_base_module_requires_destroy (_tmp718_)) {
				ValaCCodeFunction* _tmp719_;
				ValaCCodeFunction* _tmp720_;
				ValaLocalVariable* _tmp721_;
				ValaCCodeExpression* _tmp722_;
				ValaCCodeExpression* _tmp723_;
				_tmp719_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp720_ = _tmp719_;
				_tmp721_ = local;
				_tmp722_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, _tmp721_);
				_tmp723_ = _tmp722_;
				vala_ccode_function_add_expression (_tmp720_, _tmp723_);
				_vala_ccode_node_unref0 (_tmp723_);
			}
			_vala_code_node_unref0 (local);
		}
	}
	_tmp724_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp725_ = _tmp724_;
	vala_ccode_function_close (_tmp725_);
	_vala_code_node_unref0 (array_type);
	_vala_code_node_unref0 (collection_type);
	_vala_code_node_unref0 (collection_backup);
}

static void
vala_ccode_control_flow_module_real_visit_break_statement (ValaCodeVisitor* base,
                                                           ValaBreakStatement* stmt)
{
	ValaCCodeControlFlowModule * self;
	ValaSymbol* _tmp0_;
	ValaSymbol* _tmp1_;
	ValaCCodeFunction* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_ccode_base_module_get_current_symbol ((ValaCCodeBaseModule*) self);
	_tmp1_ = _tmp0_;
	vala_ccode_base_module_append_local_free ((ValaCCodeBaseModule*) self, _tmp1_, (ValaStatement*) stmt, NULL);
	_tmp2_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp3_ = _tmp2_;
	vala_ccode_function_add_break (_tmp3_);
}

static void
vala_ccode_control_flow_module_real_visit_continue_statement (ValaCodeVisitor* base,
                                                              ValaContinueStatement* stmt)
{
	ValaCCodeControlFlowModule * self;
	ValaSymbol* _tmp0_;
	ValaSymbol* _tmp1_;
	ValaCCodeFunction* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_ccode_base_module_get_current_symbol ((ValaCCodeBaseModule*) self);
	_tmp1_ = _tmp0_;
	vala_ccode_base_module_append_local_free ((ValaCCodeBaseModule*) self, _tmp1_, (ValaStatement*) stmt, NULL);
	_tmp2_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp3_ = _tmp2_;
	vala_ccode_function_add_continue (_tmp3_);
}

ValaCCodeControlFlowModule*
vala_ccode_control_flow_module_construct (GType object_type)
{
	ValaCCodeControlFlowModule* self = NULL;
	self = (ValaCCodeControlFlowModule*) vala_ccode_method_module_construct (object_type);
	return self;
}

static void
vala_ccode_control_flow_module_class_init (ValaCCodeControlFlowModuleClass * klass,
                                           gpointer klass_data)
{
	vala_ccode_control_flow_module_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeVisitorClass *) klass)->visit_if_statement = (void (*) (ValaCodeVisitor*, ValaIfStatement*)) vala_ccode_control_flow_module_real_visit_if_statement;
	((ValaCodeVisitorClass *) klass)->visit_switch_statement = (void (*) (ValaCodeVisitor*, ValaSwitchStatement*)) vala_ccode_control_flow_module_real_visit_switch_statement;
	((ValaCodeVisitorClass *) klass)->visit_switch_label = (void (*) (ValaCodeVisitor*, ValaSwitchLabel*)) vala_ccode_control_flow_module_real_visit_switch_label;
	((ValaCodeVisitorClass *) klass)->visit_loop_statement = (void (*) (ValaCodeVisitor*, ValaLoopStatement*)) vala_ccode_control_flow_module_real_visit_loop_statement;
	((ValaCodeVisitorClass *) klass)->visit_foreach_statement = (void (*) (ValaCodeVisitor*, ValaForeachStatement*)) vala_ccode_control_flow_module_real_visit_foreach_statement;
	((ValaCodeVisitorClass *) klass)->visit_break_statement = (void (*) (ValaCodeVisitor*, ValaBreakStatement*)) vala_ccode_control_flow_module_real_visit_break_statement;
	((ValaCodeVisitorClass *) klass)->visit_continue_statement = (void (*) (ValaCodeVisitor*, ValaContinueStatement*)) vala_ccode_control_flow_module_real_visit_continue_statement;
}

static void
vala_ccode_control_flow_module_instance_init (ValaCCodeControlFlowModule * self,
                                              gpointer klass)
{
}

static GType
vala_ccode_control_flow_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeControlFlowModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_control_flow_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeControlFlowModule), 0, (GInstanceInitFunc) vala_ccode_control_flow_module_instance_init, NULL };
	GType vala_ccode_control_flow_module_type_id;
	vala_ccode_control_flow_module_type_id = g_type_register_static (VALA_TYPE_CCODE_METHOD_MODULE, "ValaCCodeControlFlowModule", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return vala_ccode_control_flow_module_type_id;
}

GType
vala_ccode_control_flow_module_get_type (void)
{
	static volatile gsize vala_ccode_control_flow_module_type_id__once = 0;
	if (g_once_init_enter (&vala_ccode_control_flow_module_type_id__once)) {
		GType vala_ccode_control_flow_module_type_id;
		vala_ccode_control_flow_module_type_id = vala_ccode_control_flow_module_get_type_once ();
		g_once_init_leave (&vala_ccode_control_flow_module_type_id__once, vala_ccode_control_flow_module_type_id);
	}
	return vala_ccode_control_flow_module_type_id__once;
}

