/* 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>

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

#define _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* _tmp730_;
	ValaCCodeFunction* _tmp731_;
	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_;
					ValaCCodeExpression* _tmp455_;
					ValaLocalVariable* _tmp456_;
					ValaLocalVariable* _tmp457_;
					ValaDataType* _tmp458_;
					ValaDataType* _tmp459_;
					ValaCCodeExpression* _tmp460_;
					ValaDataType* _tmp461_;
					ValaDataType* _tmp462_;
					gboolean _tmp463_;
					gboolean _tmp464_;
					ValaLocalVariable* _tmp476_;
					ValaLocalVariable* _tmp477_;
					ValaCCodeFunction* _tmp478_;
					ValaCCodeFunction* _tmp479_;
					ValaLocalVariable* _tmp480_;
					ValaLocalVariable* _tmp481_;
					gchar* _tmp482_;
					gchar* _tmp483_;
					ValaCCodeExpression* _tmp484_;
					ValaCCodeExpression* _tmp485_;
					ValaCCodeExpression* _tmp486_;
					ValaBlock* _tmp487_;
					ValaBlock* _tmp488_;
					ValaCCodeFunction* _tmp489_;
					ValaCCodeFunction* _tmp490_;
					_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_ = element_expr;
					_tmp456_ = vala_foreach_statement_get_element_variable (stmt);
					_tmp457_ = _tmp456_;
					_tmp458_ = vala_variable_get_variable_type ((ValaVariable*) _tmp457_);
					_tmp459_ = _tmp458_;
					_tmp460_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, _tmp455_, _tmp459_);
					_vala_ccode_node_unref0 (element_expr);
					element_expr = _tmp460_;
					_tmp461_ = vala_foreach_statement_get_type_reference (stmt);
					_tmp462_ = _tmp461_;
					_tmp463_ = vala_data_type_get_value_owned (_tmp462_);
					_tmp464_ = _tmp463_;
					if (_tmp464_) {
						ValaDataType* _tmp465_;
						ValaDataType* _tmp466_;
						ValaCCodeExpression* _tmp467_;
						ValaGLibValue* _tmp468_;
						ValaGLibValue* _tmp469_;
						ValaLocalVariable* _tmp470_;
						ValaLocalVariable* _tmp471_;
						ValaTargetValue* _tmp472_;
						ValaTargetValue* _tmp473_;
						ValaCCodeExpression* _tmp474_;
						ValaCCodeExpression* _tmp475_;
						_tmp465_ = vala_foreach_statement_get_type_reference (stmt);
						_tmp466_ = _tmp465_;
						_tmp467_ = element_expr;
						_tmp468_ = vala_glib_value_new (_tmp466_, _tmp467_, FALSE);
						_tmp469_ = _tmp468_;
						_tmp470_ = vala_foreach_statement_get_element_variable (stmt);
						_tmp471_ = _tmp470_;
						_tmp472_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp469_, (ValaCodeNode*) _tmp471_);
						_tmp473_ = _tmp472_;
						_tmp474_ = vala_get_cvalue_ (_tmp473_);
						_tmp475_ = _vala_ccode_node_ref0 (_tmp474_);
						_vala_ccode_node_unref0 (element_expr);
						element_expr = _tmp475_;
						_vala_target_value_unref0 (_tmp473_);
						_vala_target_value_unref0 (_tmp469_);
					}
					_tmp476_ = vala_foreach_statement_get_element_variable (stmt);
					_tmp477_ = _tmp476_;
					vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp477_);
					_tmp478_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp479_ = _tmp478_;
					_tmp480_ = vala_foreach_statement_get_element_variable (stmt);
					_tmp481_ = _tmp480_;
					_tmp482_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp481_);
					_tmp483_ = _tmp482_;
					_tmp484_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp483_);
					_tmp485_ = _tmp484_;
					_tmp486_ = element_expr;
					vala_ccode_function_add_assignment (_tmp479_, _tmp485_, _tmp486_);
					_vala_ccode_node_unref0 (_tmp485_);
					_g_free0 (_tmp483_);
					_tmp487_ = vala_foreach_statement_get_body (stmt);
					_tmp488_ = _tmp487_;
					vala_code_node_emit ((ValaCodeNode*) _tmp488_, (ValaCodeGenerator*) self);
					_tmp489_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp490_ = _tmp489_;
					vala_ccode_function_close (_tmp490_);
					_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* _tmp491_;
					ValaExpression* _tmp492_;
					ValaDataType* _tmp493_;
					ValaDataType* _tmp494_;
					ValaClass* _tmp495_;
					ValaObjectType* _tmp496_;
					ValaObjectType* _tmp497_;
					gboolean _tmp498_;
					_tmp491_ = vala_foreach_statement_get_collection (stmt);
					_tmp492_ = _tmp491_;
					_tmp493_ = vala_expression_get_value_type (_tmp492_);
					_tmp494_ = _tmp493_;
					_tmp495_ = ((ValaCCodeBaseModule*) self)->gvaluearray_type;
					_tmp496_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp495_, NULL);
					_tmp497_ = _tmp496_;
					_tmp498_ = vala_data_type_compatible (_tmp494_, (ValaDataType*) _tmp497_);
					_vala_code_node_unref0 (_tmp497_);
					if (_tmp498_) {
						ValaLocalVariable* iterator_variable = NULL;
						ValaDataType* _tmp499_;
						ValaDataType* _tmp500_;
						ValaDataType* _tmp501_;
						const gchar* _tmp502_;
						const gchar* _tmp503_;
						gchar* _tmp504_;
						gchar* _tmp505_;
						ValaLocalVariable* _tmp506_;
						ValaLocalVariable* _tmp507_;
						ValaLocalVariable* _tmp508_;
						gchar* arr_index = NULL;
						ValaLocalVariable* _tmp509_;
						gchar* _tmp510_;
						gchar* _tmp511_;
						gchar* _tmp512_;
						gchar* _tmp513_;
						ValaCCodeBinaryExpression* ccond = NULL;
						const gchar* _tmp514_;
						ValaCCodeExpression* _tmp515_;
						ValaCCodeExpression* _tmp516_;
						ValaLocalVariable* _tmp517_;
						gchar* _tmp518_;
						gchar* _tmp519_;
						ValaCCodeExpression* _tmp520_;
						ValaCCodeExpression* _tmp521_;
						ValaCCodeMemberAccess* _tmp522_;
						ValaCCodeMemberAccess* _tmp523_;
						ValaCCodeBinaryExpression* _tmp524_;
						ValaCCodeBinaryExpression* _tmp525_;
						ValaCCodeFunction* _tmp526_;
						ValaCCodeFunction* _tmp527_;
						const gchar* _tmp528_;
						ValaCCodeExpression* _tmp529_;
						ValaCCodeExpression* _tmp530_;
						ValaCCodeConstant* _tmp531_;
						ValaCCodeConstant* _tmp532_;
						ValaCCodeAssignment* _tmp533_;
						ValaCCodeAssignment* _tmp534_;
						ValaCCodeBinaryExpression* _tmp535_;
						const gchar* _tmp536_;
						ValaCCodeExpression* _tmp537_;
						ValaCCodeExpression* _tmp538_;
						const gchar* _tmp539_;
						ValaCCodeExpression* _tmp540_;
						ValaCCodeExpression* _tmp541_;
						ValaCCodeConstant* _tmp542_;
						ValaCCodeConstant* _tmp543_;
						ValaCCodeBinaryExpression* _tmp544_;
						ValaCCodeBinaryExpression* _tmp545_;
						ValaCCodeAssignment* _tmp546_;
						ValaCCodeAssignment* _tmp547_;
						ValaCCodeFunctionCall* get_item = NULL;
						ValaCCodeIdentifier* _tmp548_;
						ValaCCodeIdentifier* _tmp549_;
						ValaCCodeFunctionCall* _tmp550_;
						ValaCCodeFunctionCall* _tmp551_;
						ValaCCodeFunctionCall* _tmp552_;
						ValaLocalVariable* _tmp553_;
						gchar* _tmp554_;
						gchar* _tmp555_;
						ValaCCodeExpression* _tmp556_;
						ValaCCodeExpression* _tmp557_;
						ValaCCodeFunctionCall* _tmp558_;
						const gchar* _tmp559_;
						ValaCCodeExpression* _tmp560_;
						ValaCCodeExpression* _tmp561_;
						ValaCCodeExpression* element_expr = NULL;
						ValaCCodeFunctionCall* _tmp562_;
						ValaCCodeUnaryExpression* _tmp563_;
						ValaDataType* _tmp564_;
						ValaDataType* _tmp565_;
						gboolean _tmp566_;
						gboolean _tmp567_;
						ValaLocalVariable* _tmp580_;
						ValaLocalVariable* _tmp581_;
						ValaCCodeFunction* _tmp582_;
						ValaCCodeFunction* _tmp583_;
						ValaLocalVariable* _tmp584_;
						ValaLocalVariable* _tmp585_;
						gchar* _tmp586_;
						gchar* _tmp587_;
						ValaCCodeExpression* _tmp588_;
						ValaCCodeExpression* _tmp589_;
						ValaCCodeExpression* _tmp590_;
						ValaBlock* _tmp591_;
						ValaBlock* _tmp592_;
						ValaCCodeFunction* _tmp593_;
						ValaCCodeFunction* _tmp594_;
						_tmp499_ = ((ValaCCodeBaseModule*) self)->uint_type;
						_tmp500_ = vala_data_type_copy (_tmp499_);
						_tmp501_ = _tmp500_;
						_tmp502_ = vala_foreach_statement_get_variable_name (stmt);
						_tmp503_ = _tmp502_;
						_tmp504_ = g_strdup_printf ("%s_index", _tmp503_);
						_tmp505_ = _tmp504_;
						_tmp506_ = vala_local_variable_new (_tmp501_, _tmp505_, NULL, NULL);
						_tmp507_ = _tmp506_;
						_g_free0 (_tmp505_);
						_vala_code_node_unref0 (_tmp501_);
						iterator_variable = _tmp507_;
						_tmp508_ = iterator_variable;
						vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp508_);
						_tmp509_ = iterator_variable;
						_tmp510_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp509_);
						_tmp511_ = _tmp510_;
						_tmp512_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp511_);
						_tmp513_ = _tmp512_;
						_g_free0 (_tmp511_);
						arr_index = _tmp513_;
						_tmp514_ = arr_index;
						_tmp515_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp514_);
						_tmp516_ = _tmp515_;
						_tmp517_ = collection_backup;
						_tmp518_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp517_);
						_tmp519_ = _tmp518_;
						_tmp520_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp519_);
						_tmp521_ = _tmp520_;
						_tmp522_ = vala_ccode_member_access_new_pointer (_tmp521_, "n_values");
						_tmp523_ = _tmp522_;
						_tmp524_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp516_, (ValaCCodeExpression*) _tmp523_);
						_tmp525_ = _tmp524_;
						_vala_ccode_node_unref0 (_tmp523_);
						_vala_ccode_node_unref0 (_tmp521_);
						_g_free0 (_tmp519_);
						_vala_ccode_node_unref0 (_tmp516_);
						ccond = _tmp525_;
						_tmp526_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp527_ = _tmp526_;
						_tmp528_ = arr_index;
						_tmp529_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp528_);
						_tmp530_ = _tmp529_;
						_tmp531_ = vala_ccode_constant_new ("0");
						_tmp532_ = _tmp531_;
						_tmp533_ = vala_ccode_assignment_new (_tmp530_, (ValaCCodeExpression*) _tmp532_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
						_tmp534_ = _tmp533_;
						_tmp535_ = ccond;
						_tmp536_ = arr_index;
						_tmp537_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp536_);
						_tmp538_ = _tmp537_;
						_tmp539_ = arr_index;
						_tmp540_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp539_);
						_tmp541_ = _tmp540_;
						_tmp542_ = vala_ccode_constant_new ("1");
						_tmp543_ = _tmp542_;
						_tmp544_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp541_, (ValaCCodeExpression*) _tmp543_);
						_tmp545_ = _tmp544_;
						_tmp546_ = vala_ccode_assignment_new (_tmp538_, (ValaCCodeExpression*) _tmp545_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
						_tmp547_ = _tmp546_;
						vala_ccode_function_open_for (_tmp527_, (ValaCCodeExpression*) _tmp534_, (ValaCCodeExpression*) _tmp535_, (ValaCCodeExpression*) _tmp547_);
						_vala_ccode_node_unref0 (_tmp547_);
						_vala_ccode_node_unref0 (_tmp545_);
						_vala_ccode_node_unref0 (_tmp543_);
						_vala_ccode_node_unref0 (_tmp541_);
						_vala_ccode_node_unref0 (_tmp538_);
						_vala_ccode_node_unref0 (_tmp534_);
						_vala_ccode_node_unref0 (_tmp532_);
						_vala_ccode_node_unref0 (_tmp530_);
						_tmp548_ = vala_ccode_identifier_new ("g_value_array_get_nth");
						_tmp549_ = _tmp548_;
						_tmp550_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp549_);
						_tmp551_ = _tmp550_;
						_vala_ccode_node_unref0 (_tmp549_);
						get_item = _tmp551_;
						_tmp552_ = get_item;
						_tmp553_ = collection_backup;
						_tmp554_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp553_);
						_tmp555_ = _tmp554_;
						_tmp556_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp555_);
						_tmp557_ = _tmp556_;
						vala_ccode_function_call_add_argument (_tmp552_, _tmp557_);
						_vala_ccode_node_unref0 (_tmp557_);
						_g_free0 (_tmp555_);
						_tmp558_ = get_item;
						_tmp559_ = arr_index;
						_tmp560_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp559_);
						_tmp561_ = _tmp560_;
						vala_ccode_function_call_add_argument (_tmp558_, _tmp561_);
						_vala_ccode_node_unref0 (_tmp561_);
						_tmp562_ = get_item;
						_tmp563_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp562_);
						element_expr = (ValaCCodeExpression*) _tmp563_;
						_tmp564_ = vala_foreach_statement_get_type_reference (stmt);
						_tmp565_ = _tmp564_;
						_tmp566_ = vala_data_type_get_value_owned (_tmp565_);
						_tmp567_ = _tmp566_;
						if (_tmp567_) {
							ValaDataType* _tmp568_;
							ValaDataType* _tmp569_;
							ValaCCodeExpression* _tmp570_;
							ValaGLibValue* _tmp571_;
							ValaGLibValue* _tmp572_;
							ValaStruct* _tmp573_;
							ValaStructValueType* _tmp574_;
							ValaStructValueType* _tmp575_;
							ValaTargetValue* _tmp576_;
							ValaTargetValue* _tmp577_;
							ValaCCodeExpression* _tmp578_;
							ValaCCodeExpression* _tmp579_;
							_tmp568_ = vala_foreach_statement_get_type_reference (stmt);
							_tmp569_ = _tmp568_;
							_tmp570_ = element_expr;
							_tmp571_ = vala_glib_value_new (_tmp569_, _tmp570_, FALSE);
							_tmp572_ = _tmp571_;
							_tmp573_ = ((ValaCCodeBaseModule*) self)->gvalue_type;
							_tmp574_ = vala_struct_value_type_new (_tmp573_, NULL);
							_tmp575_ = _tmp574_;
							_tmp576_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp572_, (ValaCodeNode*) _tmp575_);
							_tmp577_ = _tmp576_;
							_tmp578_ = vala_get_cvalue_ (_tmp577_);
							_tmp579_ = _vala_ccode_node_ref0 (_tmp578_);
							_vala_ccode_node_unref0 (element_expr);
							element_expr = _tmp579_;
							_vala_target_value_unref0 (_tmp577_);
							_vala_code_node_unref0 (_tmp575_);
							_vala_target_value_unref0 (_tmp572_);
						}
						_tmp580_ = vala_foreach_statement_get_element_variable (stmt);
						_tmp581_ = _tmp580_;
						vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp581_);
						_tmp582_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp583_ = _tmp582_;
						_tmp584_ = vala_foreach_statement_get_element_variable (stmt);
						_tmp585_ = _tmp584_;
						_tmp586_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp585_);
						_tmp587_ = _tmp586_;
						_tmp588_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp587_);
						_tmp589_ = _tmp588_;
						_tmp590_ = element_expr;
						vala_ccode_function_add_assignment (_tmp583_, _tmp589_, _tmp590_);
						_vala_ccode_node_unref0 (_tmp589_);
						_g_free0 (_tmp587_);
						_tmp591_ = vala_foreach_statement_get_body (stmt);
						_tmp592_ = _tmp591_;
						vala_code_node_emit ((ValaCodeNode*) _tmp592_, (ValaCodeGenerator*) self);
						_tmp593_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp594_ = _tmp593_;
						vala_ccode_function_close (_tmp594_);
						_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* _tmp595_;
						ValaExpression* _tmp596_;
						ValaDataType* _tmp597_;
						ValaDataType* _tmp598_;
						ValaClass* _tmp599_;
						ValaObjectType* _tmp600_;
						ValaObjectType* _tmp601_;
						gboolean _tmp602_;
						_tmp595_ = vala_foreach_statement_get_collection (stmt);
						_tmp596_ = _tmp595_;
						_tmp597_ = vala_expression_get_value_type (_tmp596_);
						_tmp598_ = _tmp597_;
						_tmp599_ = ((ValaCCodeBaseModule*) self)->gsequence_type;
						_tmp600_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp599_, NULL);
						_tmp601_ = _tmp600_;
						_tmp602_ = vala_data_type_compatible (_tmp598_, (ValaDataType*) _tmp601_);
						_vala_code_node_unref0 (_tmp601_);
						if (_tmp602_) {
							ValaLocalVariable* iterator_variable = NULL;
							ValaClass* _tmp603_;
							ValaObjectType* _tmp604_;
							ValaObjectType* _tmp605_;
							const gchar* _tmp606_;
							const gchar* _tmp607_;
							gchar* _tmp608_;
							gchar* _tmp609_;
							ValaLocalVariable* _tmp610_;
							ValaLocalVariable* _tmp611_;
							ValaLocalVariable* _tmp612_;
							gchar* sequence_iter = NULL;
							ValaLocalVariable* _tmp613_;
							gchar* _tmp614_;
							gchar* _tmp615_;
							gchar* _tmp616_;
							gchar* _tmp617_;
							ValaCCodeFunctionCall* ccond_is_end = NULL;
							ValaCCodeIdentifier* _tmp618_;
							ValaCCodeIdentifier* _tmp619_;
							ValaCCodeFunctionCall* _tmp620_;
							ValaCCodeFunctionCall* _tmp621_;
							ValaCCodeFunctionCall* _tmp622_;
							const gchar* _tmp623_;
							ValaCCodeExpression* _tmp624_;
							ValaCCodeExpression* _tmp625_;
							ValaCCodeUnaryExpression* ccond = NULL;
							ValaCCodeFunctionCall* _tmp626_;
							ValaCCodeUnaryExpression* _tmp627_;
							ValaCCodeFunctionCall* cbegin = NULL;
							ValaCCodeIdentifier* _tmp628_;
							ValaCCodeIdentifier* _tmp629_;
							ValaCCodeFunctionCall* _tmp630_;
							ValaCCodeFunctionCall* _tmp631_;
							ValaCCodeFunctionCall* _tmp632_;
							ValaLocalVariable* _tmp633_;
							gchar* _tmp634_;
							gchar* _tmp635_;
							ValaCCodeExpression* _tmp636_;
							ValaCCodeExpression* _tmp637_;
							ValaCCodeFunctionCall* cnext = NULL;
							ValaCCodeIdentifier* _tmp638_;
							ValaCCodeIdentifier* _tmp639_;
							ValaCCodeFunctionCall* _tmp640_;
							ValaCCodeFunctionCall* _tmp641_;
							ValaCCodeFunctionCall* _tmp642_;
							const gchar* _tmp643_;
							ValaCCodeExpression* _tmp644_;
							ValaCCodeExpression* _tmp645_;
							ValaCCodeFunction* _tmp646_;
							ValaCCodeFunction* _tmp647_;
							const gchar* _tmp648_;
							ValaCCodeExpression* _tmp649_;
							ValaCCodeExpression* _tmp650_;
							ValaCCodeFunctionCall* _tmp651_;
							ValaCCodeAssignment* _tmp652_;
							ValaCCodeAssignment* _tmp653_;
							ValaCCodeUnaryExpression* _tmp654_;
							const gchar* _tmp655_;
							ValaCCodeExpression* _tmp656_;
							ValaCCodeExpression* _tmp657_;
							ValaCCodeFunctionCall* _tmp658_;
							ValaCCodeAssignment* _tmp659_;
							ValaCCodeAssignment* _tmp660_;
							ValaCCodeFunctionCall* get_item = NULL;
							ValaCCodeIdentifier* _tmp661_;
							ValaCCodeIdentifier* _tmp662_;
							ValaCCodeFunctionCall* _tmp663_;
							ValaCCodeFunctionCall* _tmp664_;
							ValaCCodeFunctionCall* _tmp665_;
							const gchar* _tmp666_;
							ValaCCodeExpression* _tmp667_;
							ValaCCodeExpression* _tmp668_;
							ValaCCodeExpression* element_expr = NULL;
							ValaCCodeFunctionCall* _tmp669_;
							ValaCCodeExpression* _tmp670_;
							ValaDataType* _tmp671_;
							ValaList* _tmp672_;
							gint _tmp673_;
							gint _tmp674_;
							ValaDataType* element_type = NULL;
							ValaDataType* _tmp677_;
							ValaList* _tmp678_;
							gpointer _tmp679_;
							ValaDataType* _tmp680_;
							ValaDataType* _tmp681_;
							ValaDataType* _tmp682_;
							ValaDataType* _tmp683_;
							ValaCCodeExpression* _tmp684_;
							ValaDataType* _tmp685_;
							ValaCCodeExpression* _tmp686_;
							ValaDataType* _tmp687_;
							ValaCCodeExpression* _tmp688_;
							ValaGLibValue* _tmp689_;
							ValaGLibValue* _tmp690_;
							ValaDataType* _tmp691_;
							ValaDataType* _tmp692_;
							ValaTargetValue* _tmp693_;
							ValaTargetValue* _tmp694_;
							ValaCCodeExpression* _tmp695_;
							ValaCCodeExpression* _tmp696_;
							ValaLocalVariable* _tmp697_;
							ValaLocalVariable* _tmp698_;
							ValaCCodeFunction* _tmp699_;
							ValaCCodeFunction* _tmp700_;
							ValaLocalVariable* _tmp701_;
							ValaLocalVariable* _tmp702_;
							gchar* _tmp703_;
							gchar* _tmp704_;
							ValaCCodeExpression* _tmp705_;
							ValaCCodeExpression* _tmp706_;
							ValaCCodeExpression* _tmp707_;
							ValaBlock* _tmp708_;
							ValaBlock* _tmp709_;
							ValaCCodeFunction* _tmp710_;
							ValaCCodeFunction* _tmp711_;
							_tmp603_ = ((ValaCCodeBaseModule*) self)->gsequence_iter_type;
							_tmp604_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp603_, NULL);
							_tmp605_ = _tmp604_;
							_tmp606_ = vala_foreach_statement_get_variable_name (stmt);
							_tmp607_ = _tmp606_;
							_tmp608_ = g_strdup_printf ("%s_iter", _tmp607_);
							_tmp609_ = _tmp608_;
							_tmp610_ = vala_local_variable_new ((ValaDataType*) _tmp605_, _tmp609_, NULL, NULL);
							_tmp611_ = _tmp610_;
							_g_free0 (_tmp609_);
							_vala_code_node_unref0 (_tmp605_);
							iterator_variable = _tmp611_;
							_tmp612_ = iterator_variable;
							vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp612_);
							_tmp613_ = iterator_variable;
							_tmp614_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp613_);
							_tmp615_ = _tmp614_;
							_tmp616_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp615_);
							_tmp617_ = _tmp616_;
							_g_free0 (_tmp615_);
							sequence_iter = _tmp617_;
							_tmp618_ = vala_ccode_identifier_new ("g_sequence_iter_is_end");
							_tmp619_ = _tmp618_;
							_tmp620_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp619_);
							_tmp621_ = _tmp620_;
							_vala_ccode_node_unref0 (_tmp619_);
							ccond_is_end = _tmp621_;
							_tmp622_ = ccond_is_end;
							_tmp623_ = sequence_iter;
							_tmp624_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp623_);
							_tmp625_ = _tmp624_;
							vala_ccode_function_call_add_argument (_tmp622_, _tmp625_);
							_vala_ccode_node_unref0 (_tmp625_);
							_tmp626_ = ccond_is_end;
							_tmp627_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_LOGICAL_NEGATION, (ValaCCodeExpression*) _tmp626_);
							ccond = _tmp627_;
							_tmp628_ = vala_ccode_identifier_new ("g_sequence_get_begin_iter");
							_tmp629_ = _tmp628_;
							_tmp630_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp629_);
							_tmp631_ = _tmp630_;
							_vala_ccode_node_unref0 (_tmp629_);
							cbegin = _tmp631_;
							_tmp632_ = cbegin;
							_tmp633_ = collection_backup;
							_tmp634_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp633_);
							_tmp635_ = _tmp634_;
							_tmp636_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp635_);
							_tmp637_ = _tmp636_;
							vala_ccode_function_call_add_argument (_tmp632_, _tmp637_);
							_vala_ccode_node_unref0 (_tmp637_);
							_g_free0 (_tmp635_);
							_tmp638_ = vala_ccode_identifier_new ("g_sequence_iter_next");
							_tmp639_ = _tmp638_;
							_tmp640_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp639_);
							_tmp641_ = _tmp640_;
							_vala_ccode_node_unref0 (_tmp639_);
							cnext = _tmp641_;
							_tmp642_ = cnext;
							_tmp643_ = sequence_iter;
							_tmp644_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp643_);
							_tmp645_ = _tmp644_;
							vala_ccode_function_call_add_argument (_tmp642_, _tmp645_);
							_vala_ccode_node_unref0 (_tmp645_);
							_tmp646_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
							_tmp647_ = _tmp646_;
							_tmp648_ = sequence_iter;
							_tmp649_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp648_);
							_tmp650_ = _tmp649_;
							_tmp651_ = cbegin;
							_tmp652_ = vala_ccode_assignment_new (_tmp650_, (ValaCCodeExpression*) _tmp651_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
							_tmp653_ = _tmp652_;
							_tmp654_ = ccond;
							_tmp655_ = sequence_iter;
							_tmp656_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp655_);
							_tmp657_ = _tmp656_;
							_tmp658_ = cnext;
							_tmp659_ = vala_ccode_assignment_new (_tmp657_, (ValaCCodeExpression*) _tmp658_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
							_tmp660_ = _tmp659_;
							vala_ccode_function_open_for (_tmp647_, (ValaCCodeExpression*) _tmp653_, (ValaCCodeExpression*) _tmp654_, (ValaCCodeExpression*) _tmp660_);
							_vala_ccode_node_unref0 (_tmp660_);
							_vala_ccode_node_unref0 (_tmp657_);
							_vala_ccode_node_unref0 (_tmp653_);
							_vala_ccode_node_unref0 (_tmp650_);
							_tmp661_ = vala_ccode_identifier_new ("g_sequence_get");
							_tmp662_ = _tmp661_;
							_tmp663_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp662_);
							_tmp664_ = _tmp663_;
							_vala_ccode_node_unref0 (_tmp662_);
							get_item = _tmp664_;
							_tmp665_ = get_item;
							_tmp666_ = sequence_iter;
							_tmp667_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp666_);
							_tmp668_ = _tmp667_;
							vala_ccode_function_call_add_argument (_tmp665_, _tmp668_);
							_vala_ccode_node_unref0 (_tmp668_);
							_tmp669_ = get_item;
							_tmp670_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp669_);
							element_expr = _tmp670_;
							_tmp671_ = collection_type;
							_tmp672_ = vala_data_type_get_type_arguments (_tmp671_);
							_tmp673_ = vala_collection_get_size ((ValaCollection*) _tmp672_);
							_tmp674_ = _tmp673_;
							if (_tmp674_ != 1) {
								ValaSourceReference* _tmp675_;
								ValaSourceReference* _tmp676_;
								_tmp675_ = vala_code_node_get_source_reference ((ValaCodeNode*) stmt);
								_tmp676_ = _tmp675_;
								vala_report_error (_tmp676_, "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;
							}
							_tmp677_ = collection_type;
							_tmp678_ = vala_data_type_get_type_arguments (_tmp677_);
							_tmp679_ = vala_list_get (_tmp678_, 0);
							_tmp680_ = (ValaDataType*) _tmp679_;
							_tmp681_ = vala_data_type_copy (_tmp680_);
							_tmp682_ = _tmp681_;
							_vala_code_node_unref0 (_tmp680_);
							element_type = _tmp682_;
							_tmp683_ = element_type;
							vala_data_type_set_value_owned (_tmp683_, FALSE);
							_tmp684_ = element_expr;
							_tmp685_ = element_type;
							_tmp686_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, _tmp684_, _tmp685_);
							_vala_ccode_node_unref0 (element_expr);
							element_expr = _tmp686_;
							_tmp687_ = element_type;
							_tmp688_ = element_expr;
							_tmp689_ = vala_glib_value_new (_tmp687_, _tmp688_, FALSE);
							_tmp690_ = _tmp689_;
							_tmp691_ = vala_foreach_statement_get_type_reference (stmt);
							_tmp692_ = _tmp691_;
							_tmp693_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp690_, _tmp692_, (ValaCodeNode*) stmt);
							_tmp694_ = _tmp693_;
							_tmp695_ = vala_get_cvalue_ (_tmp694_);
							_tmp696_ = _vala_ccode_node_ref0 (_tmp695_);
							_vala_ccode_node_unref0 (element_expr);
							element_expr = _tmp696_;
							_vala_target_value_unref0 (_tmp694_);
							_vala_target_value_unref0 (_tmp690_);
							_tmp697_ = vala_foreach_statement_get_element_variable (stmt);
							_tmp698_ = _tmp697_;
							vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp698_);
							_tmp699_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
							_tmp700_ = _tmp699_;
							_tmp701_ = vala_foreach_statement_get_element_variable (stmt);
							_tmp702_ = _tmp701_;
							_tmp703_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp702_);
							_tmp704_ = _tmp703_;
							_tmp705_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp704_);
							_tmp706_ = _tmp705_;
							_tmp707_ = element_expr;
							vala_ccode_function_add_assignment (_tmp700_, _tmp706_, _tmp707_);
							_vala_ccode_node_unref0 (_tmp706_);
							_g_free0 (_tmp704_);
							_tmp708_ = vala_foreach_statement_get_body (stmt);
							_tmp709_ = _tmp708_;
							vala_code_node_emit ((ValaCodeNode*) _tmp709_, (ValaCodeGenerator*) self);
							_tmp710_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
							_tmp711_ = _tmp710_;
							vala_ccode_function_close (_tmp711_);
							_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* _tmp712_;
							ValaSourceReference* _tmp713_;
							_tmp712_ = vala_code_node_get_source_reference ((ValaCodeNode*) stmt);
							_tmp713_ = _tmp712_;
							vala_report_error (_tmp713_, "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* _tmp714_;
		gint _local_size = 0;
		ValaList* _tmp715_;
		gint _tmp716_;
		gint _tmp717_;
		gint _local_index = 0;
		_tmp714_ = vala_block_get_local_variables ((ValaBlock*) stmt);
		_local_list = _tmp714_;
		_tmp715_ = _local_list;
		_tmp716_ = vala_collection_get_size ((ValaCollection*) _tmp715_);
		_tmp717_ = _tmp716_;
		_local_size = _tmp717_;
		_local_index = -1;
		while (TRUE) {
			gint _tmp718_;
			gint _tmp719_;
			ValaLocalVariable* local = NULL;
			ValaList* _tmp720_;
			gpointer _tmp721_;
			ValaLocalVariable* _tmp722_;
			ValaDataType* _tmp723_;
			ValaDataType* _tmp724_;
			_local_index = _local_index + 1;
			_tmp718_ = _local_index;
			_tmp719_ = _local_size;
			if (!(_tmp718_ < _tmp719_)) {
				break;
			}
			_tmp720_ = _local_list;
			_tmp721_ = vala_list_get (_tmp720_, _local_index);
			local = (ValaLocalVariable*) _tmp721_;
			_tmp722_ = local;
			_tmp723_ = vala_variable_get_variable_type ((ValaVariable*) _tmp722_);
			_tmp724_ = _tmp723_;
			if (vala_ccode_base_module_requires_destroy (_tmp724_)) {
				ValaCCodeFunction* _tmp725_;
				ValaCCodeFunction* _tmp726_;
				ValaLocalVariable* _tmp727_;
				ValaCCodeExpression* _tmp728_;
				ValaCCodeExpression* _tmp729_;
				_tmp725_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp726_ = _tmp725_;
				_tmp727_ = local;
				_tmp728_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, _tmp727_);
				_tmp729_ = _tmp728_;
				vala_ccode_function_add_expression (_tmp726_, _tmp729_);
				_vala_ccode_node_unref0 (_tmp729_);
			}
			_vala_code_node_unref0 (local);
		}
	}
	_tmp730_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp731_ = _tmp730_;
	vala_ccode_function_close (_tmp731_);
	_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;
}

