/* 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 <glib.h>
#include <glib-object.h>
#include <vala.h>
#include <valaccode.h>
#include <valagee.h>
#include <stdlib.h>
#include <string.h>


#define VALA_TYPE_CCODE_BASE_MODULE (vala_ccode_base_module_get_type ())
#define VALA_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModule))
#define VALA_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))
#define VALA_IS_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_IS_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_CCODE_BASE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))

typedef struct _ValaCCodeBaseModule ValaCCodeBaseModule;
typedef struct _ValaCCodeBaseModuleClass ValaCCodeBaseModuleClass;
typedef struct _ValaCCodeBaseModulePrivate ValaCCodeBaseModulePrivate;

#define VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT (vala_ccode_base_module_emit_context_get_type ())
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContext))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))

typedef struct _ValaCCodeBaseModuleEmitContext ValaCCodeBaseModuleEmitContext;
typedef struct _ValaCCodeBaseModuleEmitContextClass ValaCCodeBaseModuleEmitContextClass;

#define VALA_TYPE_CCODE_STRUCT_MODULE (vala_ccode_struct_module_get_type ())
#define VALA_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModule))
#define VALA_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))
#define VALA_IS_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_IS_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_CCODE_STRUCT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))

typedef struct _ValaCCodeStructModule ValaCCodeStructModule;
typedef struct _ValaCCodeStructModuleClass ValaCCodeStructModuleClass;
typedef struct _ValaCCodeStructModulePrivate ValaCCodeStructModulePrivate;

#define VALA_TYPE_CCODE_METHOD_MODULE (vala_ccode_method_module_get_type ())
#define VALA_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModule))
#define VALA_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass))
#define VALA_IS_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_METHOD_MODULE))
#define VALA_IS_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_METHOD_MODULE))
#define VALA_CCODE_METHOD_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass))

typedef struct _ValaCCodeMethodModule ValaCCodeMethodModule;
typedef struct _ValaCCodeMethodModuleClass ValaCCodeMethodModuleClass;
typedef struct _ValaCCodeMethodModulePrivate ValaCCodeMethodModulePrivate;

#define VALA_TYPE_CCODE_CONTROL_FLOW_MODULE (vala_ccode_control_flow_module_get_type ())
#define VALA_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModule))
#define VALA_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_CCODE_CONTROL_FLOW_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))

typedef struct _ValaCCodeControlFlowModule ValaCCodeControlFlowModule;
typedef struct _ValaCCodeControlFlowModuleClass ValaCCodeControlFlowModuleClass;
typedef struct _ValaCCodeControlFlowModulePrivate ValaCCodeControlFlowModulePrivate;
#define _vala_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))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))

#define VALA_TYPE_GLIB_VALUE (vala_glib_value_get_type ())
#define VALA_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValue))
#define VALA_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))
#define VALA_IS_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GLIB_VALUE))
#define VALA_IS_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GLIB_VALUE))
#define VALA_GLIB_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))

typedef struct _ValaGLibValue ValaGLibValue;
typedef struct _ValaGLibValueClass ValaGLibValueClass;

struct _ValaCCodeBaseModule {
	ValaCodeGenerator parent_instance;
	ValaCCodeBaseModulePrivate * priv;
	ValaSymbol* root_symbol;
	ValaCCodeBaseModuleEmitContext* emit_context;
	ValaCCodeLineDirective* current_line;
	ValaCCodeFile* header_file;
	ValaCCodeFile* internal_header_file;
	ValaCCodeFile* cfile;
	ValaCCodeBaseModuleEmitContext* class_init_context;
	ValaCCodeBaseModuleEmitContext* base_init_context;
	ValaCCodeBaseModuleEmitContext* class_finalize_context;
	ValaCCodeBaseModuleEmitContext* base_finalize_context;
	ValaCCodeBaseModuleEmitContext* instance_init_context;
	ValaCCodeBaseModuleEmitContext* instance_finalize_context;
	ValaCCodeStruct* param_spec_struct;
	ValaCCodeStruct* closure_struct;
	ValaCCodeEnum* prop_enum;
	ValaCCodeEnum* signal_enum;
	ValaSet* user_marshal_set;
	ValaSet* predefined_marshal_set;
	gint next_regex_id;
	gint next_coroutine_state G_GNUC_DEPRECATED;
	ValaDataType* void_type;
	ValaDataType* bool_type;
	ValaDataType* char_type;
	ValaDataType* uchar_type;
	ValaDataType* unichar_type;
	ValaDataType* short_type;
	ValaDataType* ushort_type;
	ValaDataType* int_type;
	ValaDataType* uint_type;
	ValaDataType* long_type;
	ValaDataType* ulong_type;
	ValaDataType* int8_type;
	ValaDataType* uint8_type;
	ValaDataType* int16_type;
	ValaDataType* uint16_type;
	ValaDataType* int32_type;
	ValaDataType* uint32_type;
	ValaDataType* int64_type;
	ValaDataType* uint64_type;
	ValaDataType* string_type;
	ValaDataType* regex_type;
	ValaDataType* float_type;
	ValaDataType* double_type;
	ValaTypeSymbol* gtype_type;
	ValaTypeSymbol* gobject_type;
	ValaErrorType* gerror_type;
	ValaClass* glist_type;
	ValaClass* gslist_type;
	ValaClass* gnode_type;
	ValaClass* gqueue_type;
	ValaClass* gvaluearray_type;
	ValaTypeSymbol* gstringbuilder_type;
	ValaTypeSymbol* garray_type;
	ValaTypeSymbol* gbytearray_type;
	ValaTypeSymbol* gptrarray_type;
	ValaTypeSymbol* gthreadpool_type;
	ValaDataType* gdestroynotify_type;
	ValaDataType* gquark_type;
	ValaStruct* gvalue_type;
	ValaClass* gvariant_type;
	ValaStruct* mutex_type;
	ValaStruct* gmutex_type;
	ValaStruct* grecmutex_type;
	ValaStruct* grwlock_type;
	ValaStruct* gcond_type;
	ValaClass* gsource_type;
	ValaTypeSymbol* type_module_type;
	ValaTypeSymbol* dbus_proxy_type;
	ValaClass* gtk_widget_type;
	gboolean in_plugin;
	gchar* module_init_param_name;
	gboolean gvaluecollector_h_needed;
	gboolean requires_assert;
	gboolean requires_array_free;
	gboolean requires_array_move;
	gboolean requires_array_length;
	gboolean requires_clear_mutex;
	ValaSet* wrappers;
};

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

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

struct _ValaCCodeStructModuleClass {
	ValaCCodeBaseModuleClass parent_class;
};

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

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

struct _ValaCCodeControlFlowModule {
	ValaCCodeMethodModule parent_instance;
	ValaCCodeControlFlowModulePrivate * priv;
};

struct _ValaCCodeControlFlowModuleClass {
	ValaCCodeMethodModuleClass parent_class;
};


static gpointer vala_ccode_control_flow_module_parent_class = NULL;

GType vala_ccode_base_module_get_type (void) G_GNUC_CONST;
gpointer vala_ccode_base_module_emit_context_ref (gpointer instance);
void vala_ccode_base_module_emit_context_unref (gpointer instance);
GParamSpec* vala_ccode_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_ccode_base_module_value_set_emit_context (GValue* value, gpointer v_object);
void vala_ccode_base_module_value_take_emit_context (GValue* value, gpointer v_object);
gpointer vala_ccode_base_module_value_get_emit_context (const GValue* value);
GType vala_ccode_base_module_emit_context_get_type (void) G_GNUC_CONST;
GType vala_ccode_struct_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_control_flow_module_get_type (void) G_GNUC_CONST;
enum  {
	VALA_CCODE_CONTROL_FLOW_MODULE_DUMMY_PROPERTY
};
static void vala_ccode_control_flow_module_real_visit_if_statement (ValaCodeVisitor* base, ValaIfStatement* stmt);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr);
static void vala_ccode_control_flow_module_visit_string_switch_statement (ValaCCodeControlFlowModule* self, ValaSwitchStatement* stmt);
ValaTargetValue* vala_ccode_base_module_create_temp_value (ValaCCodeBaseModule* self, ValaDataType* type, gboolean init, ValaCodeNode* node_reference, gboolean* value_owned);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue_ (ValaCCodeBaseModule* self, ValaTargetValue* value);
gint vala_ccode_base_module_get_next_temp_var_id (ValaCCodeBaseModule* self);
void vala_ccode_base_module_set_next_temp_var_id (ValaCCodeBaseModule* self, gint value);
gboolean vala_ccode_base_module_is_constant_ccode_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr);
gchar* vala_ccode_base_module_get_ccode_name (ValaCodeNode* node);
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 (ValaCodeVisitor* base, ValaLoop* stmt);
static void vala_ccode_control_flow_module_real_visit_foreach_statement (ValaCodeVisitor* base, ValaForeachStatement* stmt);
ValaCCodeExpression* vala_ccode_base_module_get_variable_cexpression (ValaCCodeBaseModule* self, const gchar* name);
gchar* vala_ccode_base_module_get_local_cname (ValaCCodeBaseModule* self, ValaLocalVariable* local);
void vala_ccode_base_module_add_simple_check (ValaCCodeBaseModule* self, ValaCodeNode* node, gboolean always_fails);
ValaCCodeExpression* vala_ccode_base_module_get_array_length_cexpression (ValaCCodeBaseModule* self, ValaExpression* array_expr, gint dim);
gchar* vala_ccode_base_module_get_array_length_cname (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim);
ValaTargetValue* vala_ccode_base_module_transform_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaDataType* target_type, ValaCodeNode* node);
G_GNUC_INTERNAL ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);
G_GNUC_INTERNAL ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);
G_GNUC_INTERNAL GType vala_glib_value_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
ValaCCodeExpression* vala_ccode_base_module_convert_from_generic_pointer (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr, ValaDataType* actual_type);
gchar* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const gchar* name);
ValaTargetValue* vala_ccode_base_module_copy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node);
gboolean vala_ccode_base_module_requires_destroy (ValaCCodeBaseModule* self, ValaDataType* type);
ValaCCodeExpression* vala_ccode_base_module_destroy_local (ValaCCodeBaseModule* self, ValaLocalVariable* local);
static void vala_ccode_control_flow_module_real_visit_break_statement (ValaCodeVisitor* base, ValaBreakStatement* stmt);
void vala_ccode_base_module_append_local_free (ValaCCodeBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at);
ValaSymbol* vala_ccode_base_module_get_current_symbol (ValaCCodeBaseModule* self);
static void vala_ccode_control_flow_module_real_visit_continue_statement (ValaCodeVisitor* base, ValaContinueStatement* stmt);
ValaCCodeControlFlowModule* vala_ccode_control_flow_module_construct (GType object_type);
ValaCCodeMethodModule* vala_ccode_method_module_construct (GType object_type);


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


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


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


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


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


static void vala_ccode_control_flow_module_real_visit_loop (ValaCodeVisitor* base, ValaLoop* stmt) {
	ValaCCodeControlFlowModule * self;
	ValaCCodeFunction* _tmp0_;
	ValaCCodeFunction* _tmp1_;
	ValaCCodeConstant* _tmp2_;
	ValaCCodeConstant* _tmp3_;
	ValaLoop* _tmp4_;
	ValaBlock* _tmp5_;
	ValaBlock* _tmp6_;
	ValaCCodeFunction* _tmp7_;
	ValaCCodeFunction* _tmp8_;
	self = (ValaCCodeControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_ccode_constant_new ("TRUE");
	_tmp3_ = _tmp2_;
	vala_ccode_function_open_while (_tmp1_, (ValaCCodeExpression*) _tmp3_);
	_vala_ccode_node_unref0 (_tmp3_);
	_tmp4_ = stmt;
	_tmp5_ = vala_loop_get_body (_tmp4_);
	_tmp6_ = _tmp5_;
	vala_code_node_emit ((ValaCodeNode*) _tmp6_, (ValaCodeGenerator*) self);
	_tmp7_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp8_ = _tmp7_;
	vala_ccode_function_close (_tmp8_);
}


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;
	ValaForeachStatement* _tmp2_;
	ValaLocalVariable* _tmp3_;
	ValaLocalVariable* _tmp4_;
	ValaLocalVariable* _tmp5_;
	ValaDataType* collection_type = NULL;
	ValaLocalVariable* _tmp6_;
	ValaDataType* _tmp7_;
	ValaDataType* _tmp8_;
	ValaDataType* _tmp9_;
	ValaArrayType* array_type = NULL;
	ValaDataType* _tmp10_;
	ValaArrayType* _tmp11_;
	ValaArrayType* _tmp12_;
	ValaLocalVariable* _tmp15_;
	ValaCCodeFunction* _tmp16_;
	ValaCCodeFunction* _tmp17_;
	ValaLocalVariable* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	ValaCCodeExpression* _tmp21_;
	ValaCCodeExpression* _tmp22_;
	ValaForeachStatement* _tmp23_;
	ValaExpression* _tmp24_;
	ValaExpression* _tmp25_;
	ValaCCodeExpression* _tmp26_;
	ValaCCodeExpression* _tmp27_;
	gboolean _tmp28_ = FALSE;
	ValaForeachStatement* _tmp29_;
	gboolean _tmp30_;
	gboolean _tmp31_;
	ValaForeachStatement* _tmp40_;
	ValaExpression* _tmp41_;
	ValaExpression* _tmp42_;
	ValaDataType* _tmp43_;
	ValaDataType* _tmp44_;
	ValaCCodeFunction* _tmp426_;
	ValaCCodeFunction* _tmp427_;
	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_ = stmt;
	_tmp3_ = vala_foreach_statement_get_collection_variable (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _vala_code_node_ref0 (_tmp4_);
	collection_backup = _tmp5_;
	_tmp6_ = collection_backup;
	_tmp7_ = vala_variable_get_variable_type ((ValaVariable*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = _vala_code_node_ref0 (_tmp8_);
	collection_type = _tmp9_;
	_tmp10_ = collection_type;
	_tmp11_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp10_) : NULL);
	array_type = _tmp11_;
	_tmp12_ = array_type;
	if (_tmp12_ != NULL) {
		ValaArrayType* _tmp13_;
		ValaArrayType* _tmp14_;
		_tmp13_ = array_type;
		vala_array_type_set_inline_allocated (_tmp13_, FALSE);
		_tmp14_ = array_type;
		vala_array_type_set_fixed_length (_tmp14_, FALSE);
	}
	_tmp15_ = collection_backup;
	vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp15_);
	_tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp17_ = _tmp16_;
	_tmp18_ = collection_backup;
	_tmp19_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = stmt;
	_tmp24_ = vala_foreach_statement_get_collection (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp25_);
	_tmp27_ = _tmp26_;
	vala_ccode_function_add_assignment (_tmp17_, _tmp22_, _tmp27_);
	_vala_ccode_node_unref0 (_tmp27_);
	_vala_ccode_node_unref0 (_tmp22_);
	_g_free0 (_tmp20_);
	_tmp29_ = stmt;
	_tmp30_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) _tmp29_);
	_tmp31_ = _tmp30_;
	if (_tmp31_) {
		ValaForeachStatement* _tmp32_;
		ValaExpression* _tmp33_;
		ValaExpression* _tmp34_;
		gboolean _tmp35_;
		gboolean _tmp36_;
		_tmp32_ = stmt;
		_tmp33_ = vala_foreach_statement_get_collection (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp35_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) _tmp34_);
		_tmp36_ = _tmp35_;
		_tmp28_ = _tmp36_;
	} else {
		_tmp28_ = FALSE;
	}
	if (_tmp28_) {
		ValaForeachStatement* _tmp37_;
		ValaExpression* _tmp38_;
		ValaExpression* _tmp39_;
		_tmp37_ = stmt;
		_tmp38_ = vala_foreach_statement_get_collection (_tmp37_);
		_tmp39_ = _tmp38_;
		vala_ccode_base_module_add_simple_check ((ValaCCodeBaseModule*) self, (ValaCodeNode*) _tmp39_, FALSE);
	}
	_tmp40_ = stmt;
	_tmp41_ = vala_foreach_statement_get_collection (_tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = vala_expression_get_value_type (_tmp42_);
	_tmp44_ = _tmp43_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp44_, VALA_TYPE_ARRAY_TYPE)) {
		ValaForeachStatement* _tmp45_;
		ValaExpression* _tmp46_;
		ValaExpression* _tmp47_;
		ValaDataType* _tmp48_;
		ValaDataType* _tmp49_;
		ValaArrayType* _tmp50_;
		ValaCCodeExpression* array_len = NULL;
		ValaForeachStatement* _tmp51_;
		ValaExpression* _tmp52_;
		ValaExpression* _tmp53_;
		ValaCCodeExpression* _tmp54_;
		ValaCCodeFunction* _tmp55_;
		ValaCCodeFunction* _tmp56_;
		ValaLocalVariable* _tmp57_;
		gchar* _tmp58_;
		gchar* _tmp59_;
		gchar* _tmp60_;
		gchar* _tmp61_;
		ValaCCodeExpression* _tmp62_;
		ValaCCodeExpression* _tmp63_;
		ValaCCodeExpression* _tmp64_;
		ValaLocalVariable* iterator_variable = NULL;
		ValaDataType* _tmp65_;
		ValaDataType* _tmp66_;
		ValaDataType* _tmp67_;
		ValaForeachStatement* _tmp68_;
		const gchar* _tmp69_;
		const gchar* _tmp70_;
		gchar* _tmp71_;
		gchar* _tmp72_;
		ValaLocalVariable* _tmp73_;
		ValaLocalVariable* _tmp74_;
		ValaLocalVariable* _tmp75_;
		gchar* it_name = NULL;
		ValaLocalVariable* _tmp76_;
		gchar* _tmp77_;
		ValaCCodeBinaryExpression* ccond = NULL;
		const gchar* _tmp78_;
		ValaCCodeExpression* _tmp79_;
		ValaCCodeExpression* _tmp80_;
		ValaCCodeExpression* _tmp81_;
		ValaCCodeBinaryExpression* _tmp82_;
		ValaCCodeBinaryExpression* _tmp83_;
		ValaCCodeFunction* _tmp84_;
		ValaCCodeFunction* _tmp85_;
		const gchar* _tmp86_;
		ValaCCodeExpression* _tmp87_;
		ValaCCodeExpression* _tmp88_;
		ValaCCodeConstant* _tmp89_;
		ValaCCodeConstant* _tmp90_;
		ValaCCodeAssignment* _tmp91_;
		ValaCCodeAssignment* _tmp92_;
		ValaCCodeBinaryExpression* _tmp93_;
		const gchar* _tmp94_;
		ValaCCodeExpression* _tmp95_;
		ValaCCodeExpression* _tmp96_;
		const gchar* _tmp97_;
		ValaCCodeExpression* _tmp98_;
		ValaCCodeExpression* _tmp99_;
		ValaCCodeConstant* _tmp100_;
		ValaCCodeConstant* _tmp101_;
		ValaCCodeBinaryExpression* _tmp102_;
		ValaCCodeBinaryExpression* _tmp103_;
		ValaCCodeAssignment* _tmp104_;
		ValaCCodeAssignment* _tmp105_;
		ValaCCodeExpression* element_expr = NULL;
		ValaLocalVariable* _tmp106_;
		gchar* _tmp107_;
		gchar* _tmp108_;
		ValaCCodeExpression* _tmp109_;
		ValaCCodeExpression* _tmp110_;
		const gchar* _tmp111_;
		ValaCCodeExpression* _tmp112_;
		ValaCCodeExpression* _tmp113_;
		ValaCCodeElementAccess* _tmp114_;
		ValaCCodeExpression* _tmp115_;
		ValaDataType* element_type = NULL;
		ValaArrayType* _tmp116_;
		ValaDataType* _tmp117_;
		ValaDataType* _tmp118_;
		ValaDataType* _tmp119_;
		ValaDataType* _tmp120_;
		ValaDataType* _tmp121_;
		ValaCCodeExpression* _tmp122_;
		ValaGLibValue* _tmp123_;
		ValaGLibValue* _tmp124_;
		ValaForeachStatement* _tmp125_;
		ValaDataType* _tmp126_;
		ValaDataType* _tmp127_;
		ValaForeachStatement* _tmp128_;
		ValaTargetValue* _tmp129_;
		ValaTargetValue* _tmp130_;
		ValaCCodeExpression* _tmp131_;
		ValaForeachStatement* _tmp132_;
		ValaLocalVariable* _tmp133_;
		ValaLocalVariable* _tmp134_;
		ValaCCodeFunction* _tmp135_;
		ValaCCodeFunction* _tmp136_;
		ValaForeachStatement* _tmp137_;
		ValaLocalVariable* _tmp138_;
		ValaLocalVariable* _tmp139_;
		gchar* _tmp140_;
		gchar* _tmp141_;
		ValaCCodeExpression* _tmp142_;
		ValaCCodeExpression* _tmp143_;
		ValaCCodeExpression* _tmp144_;
		ValaForeachStatement* _tmp145_;
		ValaDataType* _tmp146_;
		ValaDataType* _tmp147_;
		ValaForeachStatement* _tmp172_;
		ValaBlock* _tmp173_;
		ValaBlock* _tmp174_;
		ValaCCodeFunction* _tmp175_;
		ValaCCodeFunction* _tmp176_;
		_tmp45_ = stmt;
		_tmp46_ = vala_foreach_statement_get_collection (_tmp45_);
		_tmp47_ = _tmp46_;
		_tmp48_ = vala_expression_get_value_type (_tmp47_);
		_tmp49_ = _tmp48_;
		_tmp50_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		_vala_code_node_unref0 (array_type);
		array_type = _tmp50_;
		_tmp51_ = stmt;
		_tmp52_ = vala_foreach_statement_get_collection (_tmp51_);
		_tmp53_ = _tmp52_;
		_tmp54_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp53_, -1);
		array_len = _tmp54_;
		_tmp55_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp56_ = _tmp55_;
		_tmp57_ = collection_backup;
		_tmp58_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp57_);
		_tmp59_ = _tmp58_;
		_tmp60_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp59_, 1);
		_tmp61_ = _tmp60_;
		_tmp62_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp61_);
		_tmp63_ = _tmp62_;
		_tmp64_ = array_len;
		vala_ccode_function_add_assignment (_tmp56_, _tmp63_, _tmp64_);
		_vala_ccode_node_unref0 (_tmp63_);
		_g_free0 (_tmp61_);
		_g_free0 (_tmp59_);
		_tmp65_ = ((ValaCCodeBaseModule*) self)->int_type;
		_tmp66_ = vala_data_type_copy (_tmp65_);
		_tmp67_ = _tmp66_;
		_tmp68_ = stmt;
		_tmp69_ = vala_foreach_statement_get_variable_name (_tmp68_);
		_tmp70_ = _tmp69_;
		_tmp71_ = g_strconcat (_tmp70_, "_it", NULL);
		_tmp72_ = _tmp71_;
		_tmp73_ = vala_local_variable_new (_tmp67_, _tmp72_, NULL, NULL);
		_tmp74_ = _tmp73_;
		_g_free0 (_tmp72_);
		_vala_code_node_unref0 (_tmp67_);
		iterator_variable = _tmp74_;
		_tmp75_ = iterator_variable;
		vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp75_);
		_tmp76_ = iterator_variable;
		_tmp77_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp76_);
		it_name = _tmp77_;
		_tmp78_ = it_name;
		_tmp79_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp78_);
		_tmp80_ = _tmp79_;
		_tmp81_ = array_len;
		_tmp82_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp80_, _tmp81_);
		_tmp83_ = _tmp82_;
		_vala_ccode_node_unref0 (_tmp80_);
		ccond = _tmp83_;
		_tmp84_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp85_ = _tmp84_;
		_tmp86_ = it_name;
		_tmp87_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp86_);
		_tmp88_ = _tmp87_;
		_tmp89_ = vala_ccode_constant_new ("0");
		_tmp90_ = _tmp89_;
		_tmp91_ = vala_ccode_assignment_new (_tmp88_, (ValaCCodeExpression*) _tmp90_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp92_ = _tmp91_;
		_tmp93_ = ccond;
		_tmp94_ = it_name;
		_tmp95_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp94_);
		_tmp96_ = _tmp95_;
		_tmp97_ = it_name;
		_tmp98_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp97_);
		_tmp99_ = _tmp98_;
		_tmp100_ = vala_ccode_constant_new ("1");
		_tmp101_ = _tmp100_;
		_tmp102_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp99_, (ValaCCodeExpression*) _tmp101_);
		_tmp103_ = _tmp102_;
		_tmp104_ = vala_ccode_assignment_new (_tmp96_, (ValaCCodeExpression*) _tmp103_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp105_ = _tmp104_;
		vala_ccode_function_open_for (_tmp85_, (ValaCCodeExpression*) _tmp92_, (ValaCCodeExpression*) _tmp93_, (ValaCCodeExpression*) _tmp105_);
		_vala_ccode_node_unref0 (_tmp105_);
		_vala_ccode_node_unref0 (_tmp103_);
		_vala_ccode_node_unref0 (_tmp101_);
		_vala_ccode_node_unref0 (_tmp99_);
		_vala_ccode_node_unref0 (_tmp96_);
		_vala_ccode_node_unref0 (_tmp92_);
		_vala_ccode_node_unref0 (_tmp90_);
		_vala_ccode_node_unref0 (_tmp88_);
		_tmp106_ = collection_backup;
		_tmp107_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp106_);
		_tmp108_ = _tmp107_;
		_tmp109_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp108_);
		_tmp110_ = _tmp109_;
		_tmp111_ = it_name;
		_tmp112_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp111_);
		_tmp113_ = _tmp112_;
		_tmp114_ = vala_ccode_element_access_new (_tmp110_, _tmp113_);
		_tmp115_ = (ValaCCodeExpression*) _tmp114_;
		_vala_ccode_node_unref0 (_tmp113_);
		_vala_ccode_node_unref0 (_tmp110_);
		_g_free0 (_tmp108_);
		element_expr = _tmp115_;
		_tmp116_ = array_type;
		_tmp117_ = vala_array_type_get_element_type (_tmp116_);
		_tmp118_ = _tmp117_;
		_tmp119_ = vala_data_type_copy (_tmp118_);
		element_type = _tmp119_;
		_tmp120_ = element_type;
		vala_data_type_set_value_owned (_tmp120_, FALSE);
		_tmp121_ = element_type;
		_tmp122_ = element_expr;
		_tmp123_ = vala_glib_value_new (_tmp121_, _tmp122_, TRUE);
		_tmp124_ = _tmp123_;
		_tmp125_ = stmt;
		_tmp126_ = vala_foreach_statement_get_type_reference (_tmp125_);
		_tmp127_ = _tmp126_;
		_tmp128_ = stmt;
		_tmp129_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp124_, _tmp127_, (ValaCodeNode*) _tmp128_);
		_tmp130_ = _tmp129_;
		_tmp131_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp130_);
		_vala_ccode_node_unref0 (element_expr);
		element_expr = _tmp131_;
		_vala_target_value_unref0 (_tmp130_);
		_vala_target_value_unref0 (_tmp124_);
		_tmp132_ = stmt;
		_tmp133_ = vala_foreach_statement_get_element_variable (_tmp132_);
		_tmp134_ = _tmp133_;
		vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp134_);
		_tmp135_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp136_ = _tmp135_;
		_tmp137_ = stmt;
		_tmp138_ = vala_foreach_statement_get_element_variable (_tmp137_);
		_tmp139_ = _tmp138_;
		_tmp140_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp139_);
		_tmp141_ = _tmp140_;
		_tmp142_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp141_);
		_tmp143_ = _tmp142_;
		_tmp144_ = element_expr;
		vala_ccode_function_add_assignment (_tmp136_, _tmp143_, _tmp144_);
		_vala_ccode_node_unref0 (_tmp143_);
		_g_free0 (_tmp141_);
		_tmp145_ = stmt;
		_tmp146_ = vala_foreach_statement_get_type_reference (_tmp145_);
		_tmp147_ = _tmp146_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp147_, VALA_TYPE_ARRAY_TYPE)) {
			ValaArrayType* inner_array_type = NULL;
			ValaForeachStatement* _tmp148_;
			ValaDataType* _tmp149_;
			ValaDataType* _tmp150_;
			ValaArrayType* _tmp151_;
			_tmp148_ = stmt;
			_tmp149_ = vala_foreach_statement_get_type_reference (_tmp148_);
			_tmp150_ = _tmp149_;
			_tmp151_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp150_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
			inner_array_type = _tmp151_;
			{
				gint dim = 0;
				dim = 1;
				{
					gboolean _tmp152_ = FALSE;
					_tmp152_ = TRUE;
					while (TRUE) {
						gint _tmp154_;
						ValaArrayType* _tmp155_;
						gint _tmp156_;
						gint _tmp157_;
						ValaCCodeFunction* _tmp158_;
						ValaCCodeFunction* _tmp159_;
						ValaForeachStatement* _tmp160_;
						ValaLocalVariable* _tmp161_;
						ValaLocalVariable* _tmp162_;
						gchar* _tmp163_;
						gchar* _tmp164_;
						gint _tmp165_;
						gchar* _tmp166_;
						gchar* _tmp167_;
						ValaCCodeExpression* _tmp168_;
						ValaCCodeExpression* _tmp169_;
						ValaCCodeConstant* _tmp170_;
						ValaCCodeConstant* _tmp171_;
						if (!_tmp152_) {
							gint _tmp153_;
							_tmp153_ = dim;
							dim = _tmp153_ + 1;
						}
						_tmp152_ = FALSE;
						_tmp154_ = dim;
						_tmp155_ = inner_array_type;
						_tmp156_ = vala_array_type_get_rank (_tmp155_);
						_tmp157_ = _tmp156_;
						if (!(_tmp154_ <= _tmp157_)) {
							break;
						}
						_tmp158_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp159_ = _tmp158_;
						_tmp160_ = stmt;
						_tmp161_ = vala_foreach_statement_get_element_variable (_tmp160_);
						_tmp162_ = _tmp161_;
						_tmp163_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp162_);
						_tmp164_ = _tmp163_;
						_tmp165_ = dim;
						_tmp166_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp164_, _tmp165_);
						_tmp167_ = _tmp166_;
						_tmp168_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp167_);
						_tmp169_ = _tmp168_;
						_tmp170_ = vala_ccode_constant_new ("-1");
						_tmp171_ = _tmp170_;
						vala_ccode_function_add_assignment (_tmp159_, _tmp169_, (ValaCCodeExpression*) _tmp171_);
						_vala_ccode_node_unref0 (_tmp171_);
						_vala_ccode_node_unref0 (_tmp169_);
						_g_free0 (_tmp167_);
						_g_free0 (_tmp164_);
					}
				}
			}
			_vala_code_node_unref0 (inner_array_type);
		}
		_tmp172_ = stmt;
		_tmp173_ = vala_foreach_statement_get_body (_tmp172_);
		_tmp174_ = _tmp173_;
		vala_code_node_emit ((ValaCodeNode*) _tmp174_, (ValaCodeGenerator*) self);
		_tmp175_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp176_ = _tmp175_;
		vala_ccode_function_close (_tmp176_);
		_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 {
		gboolean _tmp177_ = FALSE;
		ValaForeachStatement* _tmp178_;
		ValaExpression* _tmp179_;
		ValaExpression* _tmp180_;
		ValaDataType* _tmp181_;
		ValaDataType* _tmp182_;
		ValaClass* _tmp183_;
		ValaObjectType* _tmp184_;
		ValaObjectType* _tmp185_;
		gboolean _tmp186_;
		gboolean _tmp187_;
		_tmp178_ = stmt;
		_tmp179_ = vala_foreach_statement_get_collection (_tmp178_);
		_tmp180_ = _tmp179_;
		_tmp181_ = vala_expression_get_value_type (_tmp180_);
		_tmp182_ = _tmp181_;
		_tmp183_ = ((ValaCCodeBaseModule*) self)->glist_type;
		_tmp184_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp183_);
		_tmp185_ = _tmp184_;
		_tmp186_ = vala_data_type_compatible (_tmp182_, (ValaDataType*) _tmp185_);
		_tmp187_ = _tmp186_;
		_vala_code_node_unref0 (_tmp185_);
		if (_tmp187_) {
			_tmp177_ = TRUE;
		} else {
			ValaForeachStatement* _tmp188_;
			ValaExpression* _tmp189_;
			ValaExpression* _tmp190_;
			ValaDataType* _tmp191_;
			ValaDataType* _tmp192_;
			ValaClass* _tmp193_;
			ValaObjectType* _tmp194_;
			ValaObjectType* _tmp195_;
			gboolean _tmp196_;
			_tmp188_ = stmt;
			_tmp189_ = vala_foreach_statement_get_collection (_tmp188_);
			_tmp190_ = _tmp189_;
			_tmp191_ = vala_expression_get_value_type (_tmp190_);
			_tmp192_ = _tmp191_;
			_tmp193_ = ((ValaCCodeBaseModule*) self)->gslist_type;
			_tmp194_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp193_);
			_tmp195_ = _tmp194_;
			_tmp196_ = vala_data_type_compatible (_tmp192_, (ValaDataType*) _tmp195_);
			_tmp177_ = _tmp196_;
			_vala_code_node_unref0 (_tmp195_);
		}
		if (_tmp177_) {
			ValaLocalVariable* iterator_variable = NULL;
			ValaDataType* _tmp197_;
			ValaDataType* _tmp198_;
			ValaDataType* _tmp199_;
			ValaForeachStatement* _tmp200_;
			const gchar* _tmp201_;
			const gchar* _tmp202_;
			gchar* _tmp203_;
			gchar* _tmp204_;
			ValaLocalVariable* _tmp205_;
			ValaLocalVariable* _tmp206_;
			ValaLocalVariable* _tmp207_;
			gchar* it_name = NULL;
			ValaLocalVariable* _tmp208_;
			gchar* _tmp209_;
			ValaCCodeBinaryExpression* ccond = NULL;
			const gchar* _tmp210_;
			ValaCCodeExpression* _tmp211_;
			ValaCCodeExpression* _tmp212_;
			ValaCCodeConstant* _tmp213_;
			ValaCCodeConstant* _tmp214_;
			ValaCCodeBinaryExpression* _tmp215_;
			ValaCCodeBinaryExpression* _tmp216_;
			ValaCCodeFunction* _tmp217_;
			ValaCCodeFunction* _tmp218_;
			const gchar* _tmp219_;
			ValaCCodeExpression* _tmp220_;
			ValaCCodeExpression* _tmp221_;
			ValaLocalVariable* _tmp222_;
			gchar* _tmp223_;
			gchar* _tmp224_;
			ValaCCodeExpression* _tmp225_;
			ValaCCodeExpression* _tmp226_;
			ValaCCodeAssignment* _tmp227_;
			ValaCCodeAssignment* _tmp228_;
			ValaCCodeBinaryExpression* _tmp229_;
			const gchar* _tmp230_;
			ValaCCodeExpression* _tmp231_;
			ValaCCodeExpression* _tmp232_;
			const gchar* _tmp233_;
			ValaCCodeExpression* _tmp234_;
			ValaCCodeExpression* _tmp235_;
			ValaCCodeMemberAccess* _tmp236_;
			ValaCCodeMemberAccess* _tmp237_;
			ValaCCodeAssignment* _tmp238_;
			ValaCCodeAssignment* _tmp239_;
			ValaCCodeExpression* element_expr = NULL;
			const gchar* _tmp240_;
			ValaCCodeExpression* _tmp241_;
			ValaCCodeExpression* _tmp242_;
			ValaCCodeMemberAccess* _tmp243_;
			ValaCCodeExpression* _tmp244_;
			ValaDataType* _tmp245_;
			ValaList* _tmp246_;
			ValaList* _tmp247_;
			gint _tmp248_;
			gint _tmp249_;
			gboolean _tmp250_;
			ValaDataType* element_data_type = NULL;
			ValaDataType* _tmp255_;
			ValaList* _tmp256_;
			ValaList* _tmp257_;
			gpointer _tmp258_;
			ValaDataType* _tmp259_;
			ValaDataType* _tmp260_;
			ValaDataType* _tmp261_;
			ValaDataType* _tmp262_;
			ValaCCodeExpression* _tmp263_;
			ValaDataType* _tmp264_;
			ValaCCodeExpression* _tmp265_;
			ValaDataType* _tmp266_;
			ValaCCodeExpression* _tmp267_;
			ValaGLibValue* _tmp268_;
			ValaGLibValue* _tmp269_;
			ValaForeachStatement* _tmp270_;
			ValaDataType* _tmp271_;
			ValaDataType* _tmp272_;
			ValaForeachStatement* _tmp273_;
			ValaTargetValue* _tmp274_;
			ValaTargetValue* _tmp275_;
			ValaCCodeExpression* _tmp276_;
			ValaForeachStatement* _tmp277_;
			ValaLocalVariable* _tmp278_;
			ValaLocalVariable* _tmp279_;
			ValaCCodeFunction* _tmp280_;
			ValaCCodeFunction* _tmp281_;
			ValaForeachStatement* _tmp282_;
			ValaLocalVariable* _tmp283_;
			ValaLocalVariable* _tmp284_;
			gchar* _tmp285_;
			gchar* _tmp286_;
			ValaCCodeExpression* _tmp287_;
			ValaCCodeExpression* _tmp288_;
			ValaCCodeExpression* _tmp289_;
			ValaForeachStatement* _tmp290_;
			ValaBlock* _tmp291_;
			ValaBlock* _tmp292_;
			ValaCCodeFunction* _tmp293_;
			ValaCCodeFunction* _tmp294_;
			_tmp197_ = collection_type;
			_tmp198_ = vala_data_type_copy (_tmp197_);
			_tmp199_ = _tmp198_;
			_tmp200_ = stmt;
			_tmp201_ = vala_foreach_statement_get_variable_name (_tmp200_);
			_tmp202_ = _tmp201_;
			_tmp203_ = g_strconcat (_tmp202_, "_it", NULL);
			_tmp204_ = _tmp203_;
			_tmp205_ = vala_local_variable_new (_tmp199_, _tmp204_, NULL, NULL);
			_tmp206_ = _tmp205_;
			_g_free0 (_tmp204_);
			_vala_code_node_unref0 (_tmp199_);
			iterator_variable = _tmp206_;
			_tmp207_ = iterator_variable;
			vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp207_);
			_tmp208_ = iterator_variable;
			_tmp209_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp208_);
			it_name = _tmp209_;
			_tmp210_ = it_name;
			_tmp211_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp210_);
			_tmp212_ = _tmp211_;
			_tmp213_ = vala_ccode_constant_new ("NULL");
			_tmp214_ = _tmp213_;
			_tmp215_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, _tmp212_, (ValaCCodeExpression*) _tmp214_);
			_tmp216_ = _tmp215_;
			_vala_ccode_node_unref0 (_tmp214_);
			_vala_ccode_node_unref0 (_tmp212_);
			ccond = _tmp216_;
			_tmp217_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp218_ = _tmp217_;
			_tmp219_ = it_name;
			_tmp220_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp219_);
			_tmp221_ = _tmp220_;
			_tmp222_ = collection_backup;
			_tmp223_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp222_);
			_tmp224_ = _tmp223_;
			_tmp225_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp224_);
			_tmp226_ = _tmp225_;
			_tmp227_ = vala_ccode_assignment_new (_tmp221_, _tmp226_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
			_tmp228_ = _tmp227_;
			_tmp229_ = ccond;
			_tmp230_ = it_name;
			_tmp231_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp230_);
			_tmp232_ = _tmp231_;
			_tmp233_ = it_name;
			_tmp234_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp233_);
			_tmp235_ = _tmp234_;
			_tmp236_ = vala_ccode_member_access_new_pointer (_tmp235_, "next");
			_tmp237_ = _tmp236_;
			_tmp238_ = vala_ccode_assignment_new (_tmp232_, (ValaCCodeExpression*) _tmp237_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
			_tmp239_ = _tmp238_;
			vala_ccode_function_open_for (_tmp218_, (ValaCCodeExpression*) _tmp228_, (ValaCCodeExpression*) _tmp229_, (ValaCCodeExpression*) _tmp239_);
			_vala_ccode_node_unref0 (_tmp239_);
			_vala_ccode_node_unref0 (_tmp237_);
			_vala_ccode_node_unref0 (_tmp235_);
			_vala_ccode_node_unref0 (_tmp232_);
			_vala_ccode_node_unref0 (_tmp228_);
			_vala_ccode_node_unref0 (_tmp226_);
			_g_free0 (_tmp224_);
			_vala_ccode_node_unref0 (_tmp221_);
			_tmp240_ = it_name;
			_tmp241_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp240_);
			_tmp242_ = _tmp241_;
			_tmp243_ = vala_ccode_member_access_new_pointer (_tmp242_, "data");
			_tmp244_ = (ValaCCodeExpression*) _tmp243_;
			_vala_ccode_node_unref0 (_tmp242_);
			element_expr = _tmp244_;
			_tmp245_ = collection_type;
			_tmp246_ = vala_data_type_get_type_arguments (_tmp245_);
			_tmp247_ = _tmp246_;
			_tmp248_ = vala_collection_get_size ((ValaCollection*) _tmp247_);
			_tmp249_ = _tmp248_;
			_tmp250_ = _tmp249_ != 1;
			_vala_iterable_unref0 (_tmp247_);
			if (_tmp250_) {
				ValaForeachStatement* _tmp251_;
				ValaSourceReference* _tmp252_;
				ValaSourceReference* _tmp253_;
				ValaForeachStatement* _tmp254_;
				_tmp251_ = stmt;
				_tmp252_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp251_);
				_tmp253_ = _tmp252_;
				vala_report_error (_tmp253_, "internal error: missing generic type argument");
				_tmp254_ = stmt;
				vala_code_node_set_error ((ValaCodeNode*) _tmp254_, 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;
			}
			_tmp255_ = collection_type;
			_tmp256_ = vala_data_type_get_type_arguments (_tmp255_);
			_tmp257_ = _tmp256_;
			_tmp258_ = vala_list_get (_tmp257_, 0);
			_tmp259_ = (ValaDataType*) _tmp258_;
			_tmp260_ = vala_data_type_copy (_tmp259_);
			_tmp261_ = _tmp260_;
			_vala_code_node_unref0 (_tmp259_);
			_vala_iterable_unref0 (_tmp257_);
			element_data_type = _tmp261_;
			_tmp262_ = element_data_type;
			vala_data_type_set_value_owned (_tmp262_, FALSE);
			_tmp263_ = element_expr;
			_tmp264_ = element_data_type;
			_tmp265_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, _tmp263_, _tmp264_);
			_vala_ccode_node_unref0 (element_expr);
			element_expr = _tmp265_;
			_tmp266_ = element_data_type;
			_tmp267_ = element_expr;
			_tmp268_ = vala_glib_value_new (_tmp266_, _tmp267_, FALSE);
			_tmp269_ = _tmp268_;
			_tmp270_ = stmt;
			_tmp271_ = vala_foreach_statement_get_type_reference (_tmp270_);
			_tmp272_ = _tmp271_;
			_tmp273_ = stmt;
			_tmp274_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp269_, _tmp272_, (ValaCodeNode*) _tmp273_);
			_tmp275_ = _tmp274_;
			_tmp276_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp275_);
			_vala_ccode_node_unref0 (element_expr);
			element_expr = _tmp276_;
			_vala_target_value_unref0 (_tmp275_);
			_vala_target_value_unref0 (_tmp269_);
			_tmp277_ = stmt;
			_tmp278_ = vala_foreach_statement_get_element_variable (_tmp277_);
			_tmp279_ = _tmp278_;
			vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp279_);
			_tmp280_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp281_ = _tmp280_;
			_tmp282_ = stmt;
			_tmp283_ = vala_foreach_statement_get_element_variable (_tmp282_);
			_tmp284_ = _tmp283_;
			_tmp285_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp284_);
			_tmp286_ = _tmp285_;
			_tmp287_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp286_);
			_tmp288_ = _tmp287_;
			_tmp289_ = element_expr;
			vala_ccode_function_add_assignment (_tmp281_, _tmp288_, _tmp289_);
			_vala_ccode_node_unref0 (_tmp288_);
			_g_free0 (_tmp286_);
			_tmp290_ = stmt;
			_tmp291_ = vala_foreach_statement_get_body (_tmp290_);
			_tmp292_ = _tmp291_;
			vala_code_node_emit ((ValaCodeNode*) _tmp292_, (ValaCodeGenerator*) self);
			_tmp293_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp294_ = _tmp293_;
			vala_ccode_function_close (_tmp294_);
			_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 {
			ValaForeachStatement* _tmp295_;
			ValaExpression* _tmp296_;
			ValaExpression* _tmp297_;
			ValaDataType* _tmp298_;
			ValaDataType* _tmp299_;
			ValaClass* _tmp300_;
			ValaObjectType* _tmp301_;
			ValaObjectType* _tmp302_;
			gboolean _tmp303_;
			gboolean _tmp304_;
			_tmp295_ = stmt;
			_tmp296_ = vala_foreach_statement_get_collection (_tmp295_);
			_tmp297_ = _tmp296_;
			_tmp298_ = vala_expression_get_value_type (_tmp297_);
			_tmp299_ = _tmp298_;
			_tmp300_ = ((ValaCCodeBaseModule*) self)->gvaluearray_type;
			_tmp301_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp300_);
			_tmp302_ = _tmp301_;
			_tmp303_ = vala_data_type_compatible (_tmp299_, (ValaDataType*) _tmp302_);
			_tmp304_ = _tmp303_;
			_vala_code_node_unref0 (_tmp302_);
			if (_tmp304_) {
				ValaLocalVariable* iterator_variable = NULL;
				ValaDataType* _tmp305_;
				ValaDataType* _tmp306_;
				ValaDataType* _tmp307_;
				ValaForeachStatement* _tmp308_;
				const gchar* _tmp309_;
				const gchar* _tmp310_;
				gchar* _tmp311_;
				gchar* _tmp312_;
				ValaLocalVariable* _tmp313_;
				ValaLocalVariable* _tmp314_;
				ValaLocalVariable* _tmp315_;
				gchar* arr_index = NULL;
				ValaLocalVariable* _tmp316_;
				gchar* _tmp317_;
				gchar* _tmp318_;
				gchar* _tmp319_;
				gchar* _tmp320_;
				ValaCCodeBinaryExpression* ccond = NULL;
				const gchar* _tmp321_;
				ValaCCodeExpression* _tmp322_;
				ValaCCodeExpression* _tmp323_;
				ValaLocalVariable* _tmp324_;
				gchar* _tmp325_;
				gchar* _tmp326_;
				ValaCCodeExpression* _tmp327_;
				ValaCCodeExpression* _tmp328_;
				ValaCCodeMemberAccess* _tmp329_;
				ValaCCodeMemberAccess* _tmp330_;
				ValaCCodeBinaryExpression* _tmp331_;
				ValaCCodeBinaryExpression* _tmp332_;
				ValaCCodeFunction* _tmp333_;
				ValaCCodeFunction* _tmp334_;
				const gchar* _tmp335_;
				ValaCCodeExpression* _tmp336_;
				ValaCCodeExpression* _tmp337_;
				ValaCCodeConstant* _tmp338_;
				ValaCCodeConstant* _tmp339_;
				ValaCCodeAssignment* _tmp340_;
				ValaCCodeAssignment* _tmp341_;
				ValaCCodeBinaryExpression* _tmp342_;
				const gchar* _tmp343_;
				ValaCCodeExpression* _tmp344_;
				ValaCCodeExpression* _tmp345_;
				const gchar* _tmp346_;
				ValaCCodeExpression* _tmp347_;
				ValaCCodeExpression* _tmp348_;
				ValaCCodeConstant* _tmp349_;
				ValaCCodeConstant* _tmp350_;
				ValaCCodeBinaryExpression* _tmp351_;
				ValaCCodeBinaryExpression* _tmp352_;
				ValaCCodeAssignment* _tmp353_;
				ValaCCodeAssignment* _tmp354_;
				ValaCCodeFunctionCall* get_item = NULL;
				ValaCCodeIdentifier* _tmp355_;
				ValaCCodeIdentifier* _tmp356_;
				ValaCCodeFunctionCall* _tmp357_;
				ValaCCodeFunctionCall* _tmp358_;
				ValaCCodeFunctionCall* _tmp359_;
				ValaLocalVariable* _tmp360_;
				gchar* _tmp361_;
				gchar* _tmp362_;
				ValaCCodeExpression* _tmp363_;
				ValaCCodeExpression* _tmp364_;
				ValaCCodeFunctionCall* _tmp365_;
				const gchar* _tmp366_;
				ValaCCodeExpression* _tmp367_;
				ValaCCodeExpression* _tmp368_;
				ValaCCodeExpression* element_expr = NULL;
				ValaCCodeFunctionCall* _tmp369_;
				ValaCCodeUnaryExpression* _tmp370_;
				ValaForeachStatement* _tmp371_;
				ValaDataType* _tmp372_;
				ValaDataType* _tmp373_;
				gboolean _tmp374_;
				gboolean _tmp375_;
				ValaForeachStatement* _tmp388_;
				ValaLocalVariable* _tmp389_;
				ValaLocalVariable* _tmp390_;
				ValaCCodeFunction* _tmp391_;
				ValaCCodeFunction* _tmp392_;
				ValaForeachStatement* _tmp393_;
				ValaLocalVariable* _tmp394_;
				ValaLocalVariable* _tmp395_;
				gchar* _tmp396_;
				gchar* _tmp397_;
				ValaCCodeExpression* _tmp398_;
				ValaCCodeExpression* _tmp399_;
				ValaCCodeExpression* _tmp400_;
				ValaForeachStatement* _tmp401_;
				ValaBlock* _tmp402_;
				ValaBlock* _tmp403_;
				ValaCCodeFunction* _tmp404_;
				ValaCCodeFunction* _tmp405_;
				_tmp305_ = ((ValaCCodeBaseModule*) self)->uint_type;
				_tmp306_ = vala_data_type_copy (_tmp305_);
				_tmp307_ = _tmp306_;
				_tmp308_ = stmt;
				_tmp309_ = vala_foreach_statement_get_variable_name (_tmp308_);
				_tmp310_ = _tmp309_;
				_tmp311_ = g_strdup_printf ("%s_index", _tmp310_);
				_tmp312_ = _tmp311_;
				_tmp313_ = vala_local_variable_new (_tmp307_, _tmp312_, NULL, NULL);
				_tmp314_ = _tmp313_;
				_g_free0 (_tmp312_);
				_vala_code_node_unref0 (_tmp307_);
				iterator_variable = _tmp314_;
				_tmp315_ = iterator_variable;
				vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp315_);
				_tmp316_ = iterator_variable;
				_tmp317_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp316_);
				_tmp318_ = _tmp317_;
				_tmp319_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp318_);
				_tmp320_ = _tmp319_;
				_g_free0 (_tmp318_);
				arr_index = _tmp320_;
				_tmp321_ = arr_index;
				_tmp322_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp321_);
				_tmp323_ = _tmp322_;
				_tmp324_ = collection_backup;
				_tmp325_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp324_);
				_tmp326_ = _tmp325_;
				_tmp327_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp326_);
				_tmp328_ = _tmp327_;
				_tmp329_ = vala_ccode_member_access_new_pointer (_tmp328_, "n_values");
				_tmp330_ = _tmp329_;
				_tmp331_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp323_, (ValaCCodeExpression*) _tmp330_);
				_tmp332_ = _tmp331_;
				_vala_ccode_node_unref0 (_tmp330_);
				_vala_ccode_node_unref0 (_tmp328_);
				_g_free0 (_tmp326_);
				_vala_ccode_node_unref0 (_tmp323_);
				ccond = _tmp332_;
				_tmp333_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp334_ = _tmp333_;
				_tmp335_ = arr_index;
				_tmp336_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp335_);
				_tmp337_ = _tmp336_;
				_tmp338_ = vala_ccode_constant_new ("0");
				_tmp339_ = _tmp338_;
				_tmp340_ = vala_ccode_assignment_new (_tmp337_, (ValaCCodeExpression*) _tmp339_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
				_tmp341_ = _tmp340_;
				_tmp342_ = ccond;
				_tmp343_ = arr_index;
				_tmp344_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp343_);
				_tmp345_ = _tmp344_;
				_tmp346_ = arr_index;
				_tmp347_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp346_);
				_tmp348_ = _tmp347_;
				_tmp349_ = vala_ccode_constant_new ("1");
				_tmp350_ = _tmp349_;
				_tmp351_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp348_, (ValaCCodeExpression*) _tmp350_);
				_tmp352_ = _tmp351_;
				_tmp353_ = vala_ccode_assignment_new (_tmp345_, (ValaCCodeExpression*) _tmp352_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
				_tmp354_ = _tmp353_;
				vala_ccode_function_open_for (_tmp334_, (ValaCCodeExpression*) _tmp341_, (ValaCCodeExpression*) _tmp342_, (ValaCCodeExpression*) _tmp354_);
				_vala_ccode_node_unref0 (_tmp354_);
				_vala_ccode_node_unref0 (_tmp352_);
				_vala_ccode_node_unref0 (_tmp350_);
				_vala_ccode_node_unref0 (_tmp348_);
				_vala_ccode_node_unref0 (_tmp345_);
				_vala_ccode_node_unref0 (_tmp341_);
				_vala_ccode_node_unref0 (_tmp339_);
				_vala_ccode_node_unref0 (_tmp337_);
				_tmp355_ = vala_ccode_identifier_new ("g_value_array_get_nth");
				_tmp356_ = _tmp355_;
				_tmp357_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp356_);
				_tmp358_ = _tmp357_;
				_vala_ccode_node_unref0 (_tmp356_);
				get_item = _tmp358_;
				_tmp359_ = get_item;
				_tmp360_ = collection_backup;
				_tmp361_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp360_);
				_tmp362_ = _tmp361_;
				_tmp363_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp362_);
				_tmp364_ = _tmp363_;
				vala_ccode_function_call_add_argument (_tmp359_, _tmp364_);
				_vala_ccode_node_unref0 (_tmp364_);
				_g_free0 (_tmp362_);
				_tmp365_ = get_item;
				_tmp366_ = arr_index;
				_tmp367_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp366_);
				_tmp368_ = _tmp367_;
				vala_ccode_function_call_add_argument (_tmp365_, _tmp368_);
				_vala_ccode_node_unref0 (_tmp368_);
				_tmp369_ = get_item;
				_tmp370_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp369_);
				element_expr = (ValaCCodeExpression*) _tmp370_;
				_tmp371_ = stmt;
				_tmp372_ = vala_foreach_statement_get_type_reference (_tmp371_);
				_tmp373_ = _tmp372_;
				_tmp374_ = vala_data_type_get_value_owned (_tmp373_);
				_tmp375_ = _tmp374_;
				if (_tmp375_) {
					ValaForeachStatement* _tmp376_;
					ValaDataType* _tmp377_;
					ValaDataType* _tmp378_;
					ValaCCodeExpression* _tmp379_;
					ValaGLibValue* _tmp380_;
					ValaGLibValue* _tmp381_;
					ValaStruct* _tmp382_;
					ValaStructValueType* _tmp383_;
					ValaStructValueType* _tmp384_;
					ValaTargetValue* _tmp385_;
					ValaTargetValue* _tmp386_;
					ValaCCodeExpression* _tmp387_;
					_tmp376_ = stmt;
					_tmp377_ = vala_foreach_statement_get_type_reference (_tmp376_);
					_tmp378_ = _tmp377_;
					_tmp379_ = element_expr;
					_tmp380_ = vala_glib_value_new (_tmp378_, _tmp379_, FALSE);
					_tmp381_ = _tmp380_;
					_tmp382_ = ((ValaCCodeBaseModule*) self)->gvalue_type;
					_tmp383_ = vala_struct_value_type_new (_tmp382_);
					_tmp384_ = _tmp383_;
					_tmp385_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp381_, (ValaCodeNode*) _tmp384_);
					_tmp386_ = _tmp385_;
					_tmp387_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp386_);
					_vala_ccode_node_unref0 (element_expr);
					element_expr = _tmp387_;
					_vala_target_value_unref0 (_tmp386_);
					_vala_code_node_unref0 (_tmp384_);
					_vala_target_value_unref0 (_tmp381_);
				}
				_tmp388_ = stmt;
				_tmp389_ = vala_foreach_statement_get_element_variable (_tmp388_);
				_tmp390_ = _tmp389_;
				vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp390_);
				_tmp391_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp392_ = _tmp391_;
				_tmp393_ = stmt;
				_tmp394_ = vala_foreach_statement_get_element_variable (_tmp393_);
				_tmp395_ = _tmp394_;
				_tmp396_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp395_);
				_tmp397_ = _tmp396_;
				_tmp398_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp397_);
				_tmp399_ = _tmp398_;
				_tmp400_ = element_expr;
				vala_ccode_function_add_assignment (_tmp392_, _tmp399_, _tmp400_);
				_vala_ccode_node_unref0 (_tmp399_);
				_g_free0 (_tmp397_);
				_tmp401_ = stmt;
				_tmp402_ = vala_foreach_statement_get_body (_tmp401_);
				_tmp403_ = _tmp402_;
				vala_code_node_emit ((ValaCodeNode*) _tmp403_, (ValaCodeGenerator*) self);
				_tmp404_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp405_ = _tmp404_;
				vala_ccode_function_close (_tmp405_);
				_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);
			}
		}
	}
	{
		ValaList* _local_list = NULL;
		ValaForeachStatement* _tmp406_;
		ValaList* _tmp407_;
		gint _local_size = 0;
		ValaList* _tmp408_;
		gint _tmp409_;
		gint _tmp410_;
		gint _local_index = 0;
		_tmp406_ = stmt;
		_tmp407_ = vala_block_get_local_variables ((ValaBlock*) _tmp406_);
		_local_list = _tmp407_;
		_tmp408_ = _local_list;
		_tmp409_ = vala_collection_get_size ((ValaCollection*) _tmp408_);
		_tmp410_ = _tmp409_;
		_local_size = _tmp410_;
		_local_index = -1;
		while (TRUE) {
			gint _tmp411_;
			gint _tmp412_;
			gint _tmp413_;
			ValaLocalVariable* local = NULL;
			ValaList* _tmp414_;
			gint _tmp415_;
			gpointer _tmp416_;
			ValaLocalVariable* _tmp417_;
			ValaDataType* _tmp418_;
			ValaDataType* _tmp419_;
			gboolean _tmp420_;
			_tmp411_ = _local_index;
			_local_index = _tmp411_ + 1;
			_tmp412_ = _local_index;
			_tmp413_ = _local_size;
			if (!(_tmp412_ < _tmp413_)) {
				break;
			}
			_tmp414_ = _local_list;
			_tmp415_ = _local_index;
			_tmp416_ = vala_list_get (_tmp414_, _tmp415_);
			local = (ValaLocalVariable*) _tmp416_;
			_tmp417_ = local;
			_tmp418_ = vala_variable_get_variable_type ((ValaVariable*) _tmp417_);
			_tmp419_ = _tmp418_;
			_tmp420_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp419_);
			if (_tmp420_) {
				ValaCCodeFunction* _tmp421_;
				ValaCCodeFunction* _tmp422_;
				ValaLocalVariable* _tmp423_;
				ValaCCodeExpression* _tmp424_;
				ValaCCodeExpression* _tmp425_;
				_tmp421_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp422_ = _tmp421_;
				_tmp423_ = local;
				_tmp424_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, _tmp423_);
				_tmp425_ = _tmp424_;
				vala_ccode_function_add_expression (_tmp422_, _tmp425_);
				_vala_ccode_node_unref0 (_tmp425_);
			}
			_vala_code_node_unref0 (local);
		}
		_vala_iterable_unref0 (_local_list);
	}
	_tmp426_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp427_ = _tmp426_;
	vala_ccode_function_close (_tmp427_);
	_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_, TRUE, 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_, TRUE, 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) {
	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 = (void (*) (ValaCodeVisitor *, ValaLoop*)) vala_ccode_control_flow_module_real_visit_loop;
	((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) {
}


GType vala_ccode_control_flow_module_get_type (void) {
	static volatile gsize vala_ccode_control_flow_module_type_id__volatile = 0;
	if (g_once_init_enter (&vala_ccode_control_flow_module_type_id__volatile)) {
		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);
		g_once_init_leave (&vala_ccode_control_flow_module_type_id__volatile, vala_ccode_control_flow_module_type_id);
	}
	return vala_ccode_control_flow_module_type_id__volatile;
}



