Logo Search packages:      
Sourcecode: vala-0.14 version File versions  Download package

valaccodecontrolflowmodule.c

/* 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_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;
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))

struct _ValaCCodeBaseModule {
      ValaCodeGenerator parent_instance;
      ValaCCodeBaseModulePrivate * priv;
      ValaSymbol* root_symbol;
      ValaCCodeBaseModuleEmitContext* emit_context;
      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;
      ValaSet* user_marshal_set;
      ValaSet* predefined_marshal_set;
      gint next_regex_id;
      gboolean in_constructor;
      gboolean in_static_or_class_context;
      gint next_coroutine_state;
      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* 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;
      ValaTypeSymbol* type_module_type;
      ValaTypeSymbol* dbus_proxy_type;
      gboolean in_plugin;
      gchar* module_init_param_name;
      gboolean gvaluecollector_h_needed;
      gboolean requires_array_free;
      gboolean requires_array_move;
      gboolean requires_array_length;
      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_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);
      gboolean (*is_gobject_property) (ValaCCodeBaseModule* self, ValaProperty* prop);
      gchar* (*get_custom_creturn_type) (ValaCCodeBaseModule* self, ValaMethod* m);
      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);
      ValaCCodeFunctionCall* (*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);
ValaLocalVariable* vala_ccode_base_module_get_temp_variable (ValaCCodeBaseModule* self, ValaDataType* type, gboolean value_owned, ValaCodeNode* node_reference, gboolean init);
void vala_ccode_base_module_emit_temp_var (ValaCCodeBaseModule* self, ValaLocalVariable* local, gboolean always_init);
ValaCCodeExpression* vala_ccode_base_module_get_variable_cexpression (ValaCCodeBaseModule* self, const gchar* name);
gboolean vala_ccode_base_module_is_constant_ccode_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr);
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);
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
static void vala_ccode_control_flow_module_real_visit_foreach_statement (ValaCodeVisitor* base, ValaForeachStatement* stmt);
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);
gchar* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const gchar* name);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue_ (ValaCCodeBaseModule* self, ValaTargetValue* value);
ValaTargetValue* vala_ccode_base_module_transform_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaDataType* target_type, ValaCodeNode* node);
ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue);
ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue);
GType vala_glib_value_get_type (void) G_GNUC_CONST;
ValaCCodeExpression* vala_ccode_base_module_convert_from_generic_pointer (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr, ValaDataType* actual_type);
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_ = NULL;
      ValaExpression* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_;
      ValaBlock* _tmp4_ = NULL;
      ValaBlock* _tmp5_ = NULL;
      ValaCCodeFunction* _tmp8_ = NULL;
      self = (ValaCCodeControlFlowModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp1_ = vala_if_statement_get_condition (stmt);
      _tmp2_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp1_);
      _tmp3_ = _tmp2_;
      vala_ccode_function_open_if (_tmp0_, _tmp3_);
      _vala_ccode_node_unref0 (_tmp3_);
      _tmp4_ = vala_if_statement_get_true_statement (stmt);
      vala_code_node_emit ((ValaCodeNode*) _tmp4_, (ValaCodeGenerator*) self);
      _tmp5_ = vala_if_statement_get_false_statement (stmt);
      if (_tmp5_ != NULL) {
            ValaCCodeFunction* _tmp6_ = NULL;
            ValaBlock* _tmp7_ = NULL;
            _tmp6_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_else (_tmp6_);
            _tmp7_ = vala_if_statement_get_false_statement (stmt);
            vala_code_node_emit ((ValaCodeNode*) _tmp7_, (ValaCodeGenerator*) self);
      }
      _tmp8_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp8_);
}


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) {
      ValaExpression* _tmp0_ = NULL;
      ValaDataType* _tmp1_ = NULL;
      ValaExpression* _tmp2_ = NULL;
      ValaDataType* _tmp3_ = NULL;
      gboolean _tmp4_;
      ValaLocalVariable* _tmp5_ = NULL;
      ValaLocalVariable* temp_var;
      const gchar* _tmp6_ = NULL;
      ValaCCodeExpression* _tmp7_ = NULL;
      ValaCCodeExpression* ctemp;
      ValaExpression* _tmp8_ = NULL;
      ValaCCodeExpression* _tmp9_ = NULL;
      ValaCCodeExpression* _tmp10_;
      ValaCCodeAssignment* _tmp11_ = NULL;
      ValaCCodeAssignment* _tmp12_;
      ValaCCodeAssignment* cinit;
      ValaCCodeConstant* _tmp13_ = NULL;
      ValaCCodeConstant* czero;
      ValaCCodeIdentifier* _tmp14_ = NULL;
      ValaCCodeIdentifier* _tmp15_;
      ValaCCodeFunctionCall* _tmp16_ = NULL;
      ValaCCodeFunctionCall* _tmp17_;
      ValaCCodeFunctionCall* free_call;
      ValaCCodeConstant* _tmp18_ = NULL;
      ValaCCodeConstant* _tmp19_;
      ValaCCodeBinaryExpression* _tmp20_ = NULL;
      ValaCCodeBinaryExpression* _tmp21_;
      ValaCCodeBinaryExpression* cisnull;
      ValaCCodeIdentifier* _tmp22_ = NULL;
      ValaCCodeIdentifier* _tmp23_;
      ValaCCodeFunctionCall* _tmp24_ = NULL;
      ValaCCodeFunctionCall* _tmp25_;
      ValaCCodeFunctionCall* cquark;
      ValaCCodeConstant* _tmp26_ = NULL;
      ValaCCodeConstant* _tmp27_;
      ValaCCodeConditionalExpression* _tmp28_ = NULL;
      ValaCCodeConditionalExpression* _tmp29_;
      ValaCCodeConditionalExpression* ccond;
      ValaLocalVariable* _tmp30_ = NULL;
      gint label_count;
      ValaCCodeFunction* _tmp50_ = NULL;
      const gchar* _tmp51_ = NULL;
      ValaCCodeExpression* _tmp52_ = NULL;
      ValaCCodeAssignment* _tmp53_ = NULL;
      ValaCCodeFunction* _tmp54_ = NULL;
      ValaExpression* _tmp55_ = NULL;
      ValaDataType* _tmp56_ = NULL;
      gboolean _tmp57_;
      ValaSwitchSection* default_section;
      gint n;
      ValaCCodeFunction* _tmp105_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_switch_statement_get_expression (stmt);
      _tmp1_ = vala_expression_get_value_type (_tmp0_);
      _tmp2_ = vala_switch_statement_get_expression (stmt);
      _tmp3_ = vala_expression_get_value_type (_tmp2_);
      _tmp4_ = vala_data_type_get_value_owned (_tmp3_);
      _tmp5_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, _tmp1_, _tmp4_, (ValaCodeNode*) stmt, FALSE);
      temp_var = _tmp5_;
      vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, temp_var, FALSE);
      _tmp6_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
      _tmp7_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp6_);
      ctemp = _tmp7_;
      _tmp8_ = vala_switch_statement_get_expression (stmt);
      _tmp9_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp8_);
      _tmp10_ = _tmp9_;
      _tmp11_ = vala_ccode_assignment_new (ctemp, _tmp10_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp12_ = _tmp11_;
      _vala_ccode_node_unref0 (_tmp10_);
      cinit = _tmp12_;
      _tmp13_ = vala_ccode_constant_new ("0");
      czero = _tmp13_;
      _tmp14_ = vala_ccode_identifier_new ("g_free");
      _tmp15_ = _tmp14_;
      _tmp16_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp15_);
      _tmp17_ = _tmp16_;
      _vala_ccode_node_unref0 (_tmp15_);
      free_call = _tmp17_;
      vala_ccode_function_call_add_argument (free_call, ctemp);
      _tmp18_ = vala_ccode_constant_new ("NULL");
      _tmp19_ = _tmp18_;
      _tmp20_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp19_, ctemp);
      _tmp21_ = _tmp20_;
      _vala_ccode_node_unref0 (_tmp19_);
      cisnull = _tmp21_;
      _tmp22_ = vala_ccode_identifier_new ("g_quark_from_string");
      _tmp23_ = _tmp22_;
      _tmp24_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp23_);
      _tmp25_ = _tmp24_;
      _vala_ccode_node_unref0 (_tmp23_);
      cquark = _tmp25_;
      vala_ccode_function_call_add_argument (cquark, ctemp);
      _tmp26_ = vala_ccode_constant_new ("0");
      _tmp27_ = _tmp26_;
      _tmp28_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) _tmp27_, (ValaCCodeExpression*) cquark);
      _tmp29_ = _tmp28_;
      _vala_ccode_node_unref0 (_tmp27_);
      ccond = _tmp29_;
      _tmp30_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, ((ValaCCodeBaseModule*) self)->gquark_type, TRUE, NULL, TRUE);
      _vala_code_node_unref0 (temp_var);
      temp_var = _tmp30_;
      vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, temp_var, FALSE);
      label_count = 0;
      {
            ValaList* _tmp31_ = NULL;
            ValaList* _section_list;
            gint _tmp32_;
            gint _section_size;
            gint _section_index;
            _tmp31_ = vala_switch_statement_get_sections (stmt);
            _section_list = _tmp31_;
            _tmp32_ = vala_collection_get_size ((ValaCollection*) _section_list);
            _section_size = _tmp32_;
            _section_index = -1;
            while (TRUE) {
                  gpointer _tmp33_ = NULL;
                  ValaSwitchSection* section;
                  gboolean _tmp34_;
                  _section_index = _section_index + 1;
                  if (!(_section_index < _section_size)) {
                        break;
                  }
                  _tmp33_ = vala_list_get (_section_list, _section_index);
                  section = (ValaSwitchSection*) _tmp33_;
                  _tmp34_ = vala_switch_section_has_default_label (section);
                  if (_tmp34_) {
                        _vala_code_node_unref0 (section);
                        continue;
                  }
                  {
                        ValaList* _tmp35_ = NULL;
                        ValaList* _label_list;
                        gint _tmp36_;
                        gint _label_size;
                        gint _label_index;
                        _tmp35_ = vala_switch_section_get_labels (section);
                        _label_list = _tmp35_;
                        _tmp36_ = vala_collection_get_size ((ValaCollection*) _label_list);
                        _label_size = _tmp36_;
                        _label_index = -1;
                        while (TRUE) {
                              gpointer _tmp37_ = NULL;
                              ValaSwitchLabel* label;
                              ValaExpression* _tmp38_ = NULL;
                              ValaExpression* _tmp39_ = NULL;
                              ValaCCodeExpression* _tmp40_ = NULL;
                              ValaCCodeExpression* cexpr;
                              gboolean _tmp41_;
                              _label_index = _label_index + 1;
                              if (!(_label_index < _label_size)) {
                                    break;
                              }
                              _tmp37_ = vala_list_get (_label_list, _label_index);
                              label = (ValaSwitchLabel*) _tmp37_;
                              _tmp38_ = vala_switch_label_get_expression (label);
                              vala_code_node_emit ((ValaCodeNode*) _tmp38_, (ValaCodeGenerator*) self);
                              _tmp39_ = vala_switch_label_get_expression (label);
                              _tmp40_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp39_);
                              cexpr = _tmp40_;
                              _tmp41_ = vala_ccode_base_module_is_constant_ccode_expression ((ValaCCodeBaseModule*) self, cexpr);
                              if (_tmp41_) {
                                    const gchar* _tmp42_ = NULL;
                                    gint _tmp43_;
                                    gchar* _tmp44_ = NULL;
                                    gchar* cname;
                                    ValaCCodeFunction* _tmp45_ = NULL;
                                    gchar* _tmp46_ = NULL;
                                    gchar* _tmp47_;
                                    ValaCCodeVariableDeclarator* _tmp48_ = NULL;
                                    ValaCCodeVariableDeclarator* _tmp49_;
                                    _tmp42_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
                                    _tmp43_ = label_count;
                                    label_count = _tmp43_ + 1;
                                    _tmp44_ = g_strdup_printf ("%s_label%d", _tmp42_, _tmp43_);
                                    cname = _tmp44_;
                                    _tmp45_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp46_ = vala_data_type_get_cname (((ValaCCodeBaseModule*) self)->gquark_type);
                                    _tmp47_ = _tmp46_;
                                    _tmp48_ = vala_ccode_variable_declarator_new (cname, (ValaCCodeExpression*) czero, NULL);
                                    _tmp49_ = _tmp48_;
                                    vala_ccode_function_add_declaration (_tmp45_, _tmp47_, (ValaCCodeDeclarator*) _tmp49_, VALA_CCODE_MODIFIERS_STATIC);
                                    _vala_ccode_node_unref0 (_tmp49_);
                                    _g_free0 (_tmp47_);
                                    _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);
      }
      _tmp50_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp50_, (ValaCCodeExpression*) cinit);
      _tmp51_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
      _tmp52_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp51_);
      _vala_ccode_node_unref0 (ctemp);
      ctemp = _tmp52_;
      _tmp53_ = vala_ccode_assignment_new (ctemp, (ValaCCodeExpression*) ccond, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _vala_ccode_node_unref0 (cinit);
      cinit = _tmp53_;
      _tmp54_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp54_, (ValaCCodeExpression*) cinit);
      _tmp55_ = vala_switch_statement_get_expression (stmt);
      _tmp56_ = vala_expression_get_value_type (_tmp55_);
      _tmp57_ = vala_data_type_get_value_owned (_tmp56_);
      if (_tmp57_) {
            ValaCCodeFunction* _tmp58_ = NULL;
            _tmp58_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_expression (_tmp58_, (ValaCCodeExpression*) free_call);
      }
      default_section = NULL;
      label_count = 0;
      n = 0;
      {
            ValaList* _tmp59_ = NULL;
            ValaList* _section_list;
            gint _tmp60_;
            gint _section_size;
            gint _section_index;
            _tmp59_ = vala_switch_statement_get_sections (stmt);
            _section_list = _tmp59_;
            _tmp60_ = vala_collection_get_size ((ValaCollection*) _section_list);
            _section_size = _tmp60_;
            _section_index = -1;
            while (TRUE) {
                  gpointer _tmp61_ = NULL;
                  ValaSwitchSection* section;
                  gboolean _tmp62_;
                  ValaCCodeBinaryExpression* cor;
                  ValaCCodeFunction* _tmp94_ = NULL;
                  ValaCCodeConstant* _tmp95_ = NULL;
                  ValaCCodeConstant* _tmp96_;
                  ValaCCodeFunction* _tmp97_ = NULL;
                  ValaCCodeFunction* _tmp98_ = NULL;
                  _section_index = _section_index + 1;
                  if (!(_section_index < _section_size)) {
                        break;
                  }
                  _tmp61_ = vala_list_get (_section_list, _section_index);
                  section = (ValaSwitchSection*) _tmp61_;
                  _tmp62_ = vala_switch_section_has_default_label (section);
                  if (_tmp62_) {
                        ValaSwitchSection* _tmp63_;
                        _tmp63_ = _vala_code_node_ref0 (section);
                        _vala_code_node_unref0 (default_section);
                        default_section = _tmp63_;
                        _vala_code_node_unref0 (section);
                        continue;
                  }
                  cor = NULL;
                  {
                        ValaList* _tmp64_ = NULL;
                        ValaList* _label_list;
                        gint _tmp65_;
                        gint _label_size;
                        gint _label_index;
                        _tmp64_ = vala_switch_section_get_labels (section);
                        _label_list = _tmp64_;
                        _tmp65_ = vala_collection_get_size ((ValaCollection*) _label_list);
                        _label_size = _tmp65_;
                        _label_index = -1;
                        while (TRUE) {
                              gpointer _tmp66_ = NULL;
                              ValaSwitchLabel* label;
                              ValaExpression* _tmp67_ = NULL;
                              ValaExpression* _tmp68_ = NULL;
                              ValaCCodeExpression* _tmp69_ = NULL;
                              ValaCCodeExpression* cexpr;
                              gboolean _tmp70_;
                              ValaCCodeBinaryExpression* _tmp89_ = NULL;
                              ValaCCodeBinaryExpression* ccmp;
                              _label_index = _label_index + 1;
                              if (!(_label_index < _label_size)) {
                                    break;
                              }
                              _tmp66_ = vala_list_get (_label_list, _label_index);
                              label = (ValaSwitchLabel*) _tmp66_;
                              _tmp67_ = vala_switch_label_get_expression (label);
                              vala_code_node_emit ((ValaCodeNode*) _tmp67_, (ValaCodeGenerator*) self);
                              _tmp68_ = vala_switch_label_get_expression (label);
                              _tmp69_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp68_);
                              cexpr = _tmp69_;
                              _tmp70_ = vala_ccode_base_module_is_constant_ccode_expression ((ValaCCodeBaseModule*) self, cexpr);
                              if (_tmp70_) {
                                    const gchar* _tmp71_ = NULL;
                                    gint _tmp72_;
                                    gchar* _tmp73_ = NULL;
                                    gchar* _tmp74_;
                                    ValaCCodeIdentifier* _tmp75_ = NULL;
                                    ValaCCodeIdentifier* _tmp76_;
                                    ValaCCodeIdentifier* cname;
                                    ValaCCodeBinaryExpression* _tmp77_ = NULL;
                                    ValaCCodeBinaryExpression* ccondition;
                                    ValaCCodeIdentifier* _tmp78_ = NULL;
                                    ValaCCodeIdentifier* _tmp79_;
                                    ValaCCodeFunctionCall* _tmp80_ = NULL;
                                    ValaCCodeFunctionCall* _tmp81_;
                                    ValaCCodeFunctionCall* ccall;
                                    ValaCCodeAssignment* _tmp82_ = NULL;
                                    ValaCCodeConditionalExpression* _tmp83_ = NULL;
                                    _tmp71_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
                                    _tmp72_ = label_count;
                                    label_count = _tmp72_ + 1;
                                    _tmp73_ = g_strdup_printf ("%s_label%d", _tmp71_, _tmp72_);
                                    _tmp74_ = _tmp73_;
                                    _tmp75_ = vala_ccode_identifier_new (_tmp74_);
                                    _tmp76_ = _tmp75_;
                                    _g_free0 (_tmp74_);
                                    cname = _tmp76_;
                                    _tmp77_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) czero, (ValaCCodeExpression*) cname);
                                    ccondition = _tmp77_;
                                    _tmp78_ = vala_ccode_identifier_new ("g_quark_from_static_string");
                                    _tmp79_ = _tmp78_;
                                    _tmp80_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp79_);
                                    _tmp81_ = _tmp80_;
                                    _vala_ccode_node_unref0 (_tmp79_);
                                    ccall = _tmp81_;
                                    _tmp82_ = vala_ccode_assignment_new ((ValaCCodeExpression*) cname, (ValaCCodeExpression*) ccall, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                                    _vala_ccode_node_unref0 (cinit);
                                    cinit = _tmp82_;
                                    vala_ccode_function_call_add_argument (ccall, cexpr);
                                    _tmp83_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) ccondition, (ValaCCodeExpression*) cname, (ValaCCodeExpression*) cinit);
                                    _vala_ccode_node_unref0 (cexpr);
                                    cexpr = (ValaCCodeExpression*) _tmp83_;
                                    _vala_ccode_node_unref0 (ccall);
                                    _vala_ccode_node_unref0 (ccondition);
                                    _vala_ccode_node_unref0 (cname);
                              } else {
                                    ValaCCodeIdentifier* _tmp84_ = NULL;
                                    ValaCCodeIdentifier* _tmp85_;
                                    ValaCCodeFunctionCall* _tmp86_ = NULL;
                                    ValaCCodeFunctionCall* _tmp87_;
                                    ValaCCodeFunctionCall* ccall;
                                    ValaCCodeExpression* _tmp88_;
                                    _tmp84_ = vala_ccode_identifier_new ("g_quark_from_string");
                                    _tmp85_ = _tmp84_;
                                    _tmp86_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp85_);
                                    _tmp87_ = _tmp86_;
                                    _vala_ccode_node_unref0 (_tmp85_);
                                    ccall = _tmp87_;
                                    vala_ccode_function_call_add_argument (ccall, cexpr);
                                    _tmp88_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) ccall);
                                    _vala_ccode_node_unref0 (cexpr);
                                    cexpr = _tmp88_;
                                    _vala_ccode_node_unref0 (ccall);
                              }
                              _tmp89_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, ctemp, cexpr);
                              ccmp = _tmp89_;
                              if (cor == NULL) {
                                    ValaCCodeBinaryExpression* _tmp90_;
                                    _tmp90_ = _vala_ccode_node_ref0 (ccmp);
                                    _vala_ccode_node_unref0 (cor);
                                    cor = _tmp90_;
                              } else {
                                    ValaCCodeBinaryExpression* _tmp91_ = NULL;
                                    _tmp91_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) cor, (ValaCCodeExpression*) ccmp);
                                    _vala_ccode_node_unref0 (cor);
                                    cor = _tmp91_;
                              }
                              _vala_ccode_node_unref0 (ccmp);
                              _vala_ccode_node_unref0 (cexpr);
                              _vala_code_node_unref0 (label);
                        }
                        _vala_iterable_unref0 (_label_list);
                  }
                  if (n > 0) {
                        ValaCCodeFunction* _tmp92_ = NULL;
                        _tmp92_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        vala_ccode_function_else_if (_tmp92_, (ValaCCodeExpression*) cor);
                  } else {
                        ValaCCodeFunction* _tmp93_ = NULL;
                        _tmp93_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        vala_ccode_function_open_if (_tmp93_, (ValaCCodeExpression*) cor);
                  }
                  _tmp94_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp95_ = vala_ccode_constant_new ("0");
                  _tmp96_ = _tmp95_;
                  vala_ccode_function_open_switch (_tmp94_, (ValaCCodeExpression*) _tmp96_);
                  _vala_ccode_node_unref0 (_tmp96_);
                  _tmp97_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  vala_ccode_function_add_default (_tmp97_);
                  vala_code_node_emit ((ValaCodeNode*) section, (ValaCodeGenerator*) self);
                  _tmp98_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  vala_ccode_function_close (_tmp98_);
                  n++;
                  _vala_ccode_node_unref0 (cor);
                  _vala_code_node_unref0 (section);
            }
            _vala_iterable_unref0 (_section_list);
      }
      if (default_section != NULL) {
            ValaCCodeFunction* _tmp100_ = NULL;
            ValaCCodeConstant* _tmp101_ = NULL;
            ValaCCodeConstant* _tmp102_;
            ValaCCodeFunction* _tmp103_ = NULL;
            if (n > 0) {
                  ValaCCodeFunction* _tmp99_ = NULL;
                  _tmp99_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  vala_ccode_function_add_else (_tmp99_);
            }
            _tmp100_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp101_ = vala_ccode_constant_new ("0");
            _tmp102_ = _tmp101_;
            vala_ccode_function_open_switch (_tmp100_, (ValaCCodeExpression*) _tmp102_);
            _vala_ccode_node_unref0 (_tmp102_);
            _tmp103_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_default (_tmp103_);
            vala_code_node_emit ((ValaCodeNode*) default_section, (ValaCodeGenerator*) self);
            if (n > 0) {
                  ValaCCodeFunction* _tmp104_ = NULL;
                  _tmp104_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  vala_ccode_function_close (_tmp104_);
            }
      }
      _tmp105_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp105_);
      _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_code_node_unref0 (temp_var);
}


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


static void vala_ccode_control_flow_module_real_visit_switch_label (ValaCodeVisitor* base, ValaSwitchLabel* label) {
      ValaCCodeControlFlowModule * self;
      ValaSwitchSection* _tmp0_ = NULL;
      ValaCodeNode* _tmp1_ = NULL;
      ValaExpression* _tmp2_ = NULL;
      ValaDataType* _tmp3_ = NULL;
      gboolean _tmp4_;
      ValaExpression* _tmp5_ = NULL;
      self = (ValaCCodeControlFlowModule*) base;
      g_return_if_fail (label != NULL);
      _tmp0_ = vala_switch_label_get_section (label);
      _tmp1_ = vala_code_node_get_parent_node ((ValaCodeNode*) _tmp0_);
      _tmp2_ = vala_switch_statement_get_expression (VALA_SWITCH_STATEMENT (_tmp1_));
      _tmp3_ = vala_expression_get_value_type (_tmp2_);
      _tmp4_ = vala_data_type_compatible (_tmp3_, ((ValaCCodeBaseModule*) self)->string_type);
      if (_tmp4_) {
            return;
      }
      _tmp5_ = vala_switch_label_get_expression (label);
      if (_tmp5_ != NULL) {
            ValaExpression* _tmp6_ = NULL;
            ValaExpression* _tmp7_ = NULL;
            ValaCCodeFunction* _tmp8_ = NULL;
            ValaExpression* _tmp9_ = NULL;
            ValaCCodeExpression* _tmp10_ = NULL;
            ValaCCodeExpression* _tmp11_;
            _tmp6_ = vala_switch_label_get_expression (label);
            vala_code_node_emit ((ValaCodeNode*) _tmp6_, (ValaCodeGenerator*) self);
            _tmp7_ = vala_switch_label_get_expression (label);
            vala_code_visitor_visit_end_full_expression ((ValaCodeVisitor*) self, _tmp7_);
            _tmp8_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp9_ = vala_switch_label_get_expression (label);
            _tmp10_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp9_);
            _tmp11_ = _tmp10_;
            vala_ccode_function_add_case (_tmp8_, _tmp11_);
            _vala_ccode_node_unref0 (_tmp11_);
      }
}


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


static void vala_ccode_control_flow_module_real_visit_foreach_statement (ValaCodeVisitor* base, ValaForeachStatement* stmt) {
      ValaCCodeControlFlowModule * self;
      ValaCCodeFunction* _tmp0_ = NULL;
      ValaLocalVariable* _tmp1_ = NULL;
      ValaLocalVariable* _tmp2_;
      ValaLocalVariable* collection_backup;
      ValaDataType* _tmp3_ = NULL;
      ValaDataType* _tmp4_;
      ValaDataType* collection_type;
      ValaDataType* _tmp5_;
      ValaArrayType* _tmp6_;
      ValaArrayType* array_type;
      ValaCCodeFunction* _tmp7_ = NULL;
      const gchar* _tmp8_ = NULL;
      ValaCCodeExpression* _tmp9_ = NULL;
      ValaCCodeExpression* _tmp10_;
      ValaExpression* _tmp11_ = NULL;
      ValaCCodeExpression* _tmp12_ = NULL;
      ValaCCodeExpression* _tmp13_;
      gboolean _tmp14_ = FALSE;
      gboolean _tmp15_;
      ValaExpression* _tmp19_ = NULL;
      ValaDataType* _tmp20_ = NULL;
      ValaCCodeFunction* _tmp245_ = NULL;
      self = (ValaCCodeControlFlowModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_block (_tmp0_);
      _tmp1_ = vala_foreach_statement_get_collection_variable (stmt);
      _tmp2_ = _vala_code_node_ref0 (_tmp1_);
      collection_backup = _tmp2_;
      _tmp3_ = vala_variable_get_variable_type ((ValaVariable*) collection_backup);
      _tmp4_ = _vala_code_node_ref0 (_tmp3_);
      collection_type = _tmp4_;
      _tmp5_ = collection_type;
      _tmp6_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp5_) ? ((ValaArrayType*) _tmp5_) : NULL);
      array_type = _tmp6_;
      if (array_type != NULL) {
            vala_array_type_set_inline_allocated (array_type, FALSE);
            vala_array_type_set_fixed_length (array_type, FALSE);
      }
      vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, collection_backup);
      _tmp7_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp8_ = vala_symbol_get_name ((ValaSymbol*) collection_backup);
      _tmp9_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp8_);
      _tmp10_ = _tmp9_;
      _tmp11_ = vala_foreach_statement_get_collection (stmt);
      _tmp12_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp11_);
      _tmp13_ = _tmp12_;
      vala_ccode_function_add_assignment (_tmp7_, _tmp10_, _tmp13_);
      _vala_ccode_node_unref0 (_tmp13_);
      _vala_ccode_node_unref0 (_tmp10_);
      _tmp15_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) stmt);
      if (_tmp15_) {
            ValaExpression* _tmp16_ = NULL;
            gboolean _tmp17_;
            _tmp16_ = vala_foreach_statement_get_collection (stmt);
            _tmp17_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) _tmp16_);
            _tmp14_ = _tmp17_;
      } else {
            _tmp14_ = FALSE;
      }
      if (_tmp14_) {
            ValaExpression* _tmp18_ = NULL;
            _tmp18_ = vala_foreach_statement_get_collection (stmt);
            vala_ccode_base_module_add_simple_check ((ValaCCodeBaseModule*) self, (ValaCodeNode*) _tmp18_, FALSE);
      }
      _tmp19_ = vala_foreach_statement_get_collection (stmt);
      _tmp20_ = vala_expression_get_value_type (_tmp19_);
      if (VALA_IS_ARRAY_TYPE (_tmp20_)) {
            ValaExpression* _tmp21_ = NULL;
            ValaDataType* _tmp22_ = NULL;
            ValaArrayType* _tmp23_;
            ValaExpression* _tmp24_ = NULL;
            ValaCCodeExpression* _tmp25_ = NULL;
            ValaCCodeExpression* array_len;
            ValaCCodeFunction* _tmp26_ = NULL;
            const gchar* _tmp27_ = NULL;
            gchar* _tmp28_ = NULL;
            gchar* _tmp29_;
            ValaCCodeExpression* _tmp30_ = NULL;
            ValaCCodeExpression* _tmp31_;
            ValaDataType* _tmp32_ = NULL;
            ValaDataType* _tmp33_;
            const gchar* _tmp34_ = NULL;
            gchar* _tmp35_;
            gchar* _tmp36_;
            ValaLocalVariable* _tmp37_ = NULL;
            ValaLocalVariable* _tmp38_;
            ValaLocalVariable* iterator_variable;
            const gchar* _tmp39_ = NULL;
            gchar* _tmp40_ = NULL;
            gchar* it_name;
            ValaCCodeExpression* _tmp41_ = NULL;
            ValaCCodeExpression* _tmp42_;
            ValaCCodeBinaryExpression* _tmp43_ = NULL;
            ValaCCodeBinaryExpression* _tmp44_;
            ValaCCodeBinaryExpression* ccond;
            ValaCCodeFunction* _tmp45_ = NULL;
            ValaCCodeExpression* _tmp46_ = NULL;
            ValaCCodeExpression* _tmp47_;
            ValaCCodeConstant* _tmp48_ = NULL;
            ValaCCodeConstant* _tmp49_;
            ValaCCodeAssignment* _tmp50_ = NULL;
            ValaCCodeAssignment* _tmp51_;
            ValaCCodeExpression* _tmp52_ = NULL;
            ValaCCodeExpression* _tmp53_;
            ValaCCodeExpression* _tmp54_ = NULL;
            ValaCCodeExpression* _tmp55_;
            ValaCCodeConstant* _tmp56_ = NULL;
            ValaCCodeConstant* _tmp57_;
            ValaCCodeBinaryExpression* _tmp58_ = NULL;
            ValaCCodeBinaryExpression* _tmp59_;
            ValaCCodeAssignment* _tmp60_ = NULL;
            ValaCCodeAssignment* _tmp61_;
            const gchar* _tmp62_ = NULL;
            ValaCCodeExpression* _tmp63_ = NULL;
            ValaCCodeExpression* _tmp64_;
            ValaCCodeExpression* _tmp65_ = NULL;
            ValaCCodeExpression* _tmp66_;
            ValaCCodeElementAccess* _tmp67_ = NULL;
            ValaCCodeExpression* _tmp68_;
            ValaCCodeExpression* element_expr;
            ValaDataType* _tmp69_ = NULL;
            ValaDataType* _tmp70_ = NULL;
            ValaDataType* element_type;
            ValaGLibValue* _tmp71_ = NULL;
            ValaGLibValue* _tmp72_;
            ValaDataType* _tmp73_ = NULL;
            ValaTargetValue* _tmp74_ = NULL;
            ValaTargetValue* _tmp75_;
            ValaCCodeExpression* _tmp76_ = NULL;
            ValaLocalVariable* _tmp77_ = NULL;
            ValaCCodeFunction* _tmp78_ = NULL;
            const gchar* _tmp79_ = NULL;
            ValaCCodeExpression* _tmp80_ = NULL;
            ValaCCodeExpression* _tmp81_;
            ValaDataType* _tmp82_ = NULL;
            ValaBlock* _tmp95_ = NULL;
            ValaCCodeFunction* _tmp96_ = NULL;
            _tmp21_ = vala_foreach_statement_get_collection (stmt);
            _tmp22_ = vala_expression_get_value_type (_tmp21_);
            _tmp23_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp22_));
            _vala_code_node_unref0 (array_type);
            array_type = _tmp23_;
            _tmp24_ = vala_foreach_statement_get_collection (stmt);
            _tmp25_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp24_, -1);
            array_len = _tmp25_;
            _tmp26_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp27_ = vala_symbol_get_name ((ValaSymbol*) collection_backup);
            _tmp28_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp27_, 1);
            _tmp29_ = _tmp28_;
            _tmp30_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp29_);
            _tmp31_ = _tmp30_;
            vala_ccode_function_add_assignment (_tmp26_, _tmp31_, array_len);
            _vala_ccode_node_unref0 (_tmp31_);
            _g_free0 (_tmp29_);
            _tmp32_ = vala_data_type_copy (((ValaCCodeBaseModule*) self)->int_type);
            _tmp33_ = _tmp32_;
            _tmp34_ = vala_foreach_statement_get_variable_name (stmt);
            _tmp35_ = g_strconcat (_tmp34_, "_it", NULL);
            _tmp36_ = _tmp35_;
            _tmp37_ = vala_local_variable_new (_tmp33_, _tmp36_, NULL, NULL);
            _tmp38_ = _tmp37_;
            _g_free0 (_tmp36_);
            _vala_code_node_unref0 (_tmp33_);
            iterator_variable = _tmp38_;
            vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, iterator_variable, FALSE);
            _tmp39_ = vala_symbol_get_name ((ValaSymbol*) iterator_variable);
            _tmp40_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp39_);
            it_name = _tmp40_;
            _tmp41_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
            _tmp42_ = _tmp41_;
            _tmp43_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp42_, array_len);
            _tmp44_ = _tmp43_;
            _vala_ccode_node_unref0 (_tmp42_);
            ccond = _tmp44_;
            _tmp45_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp46_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
            _tmp47_ = _tmp46_;
            _tmp48_ = vala_ccode_constant_new ("0");
            _tmp49_ = _tmp48_;
            _tmp50_ = vala_ccode_assignment_new (_tmp47_, (ValaCCodeExpression*) _tmp49_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
            _tmp51_ = _tmp50_;
            _tmp52_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
            _tmp53_ = _tmp52_;
            _tmp54_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
            _tmp55_ = _tmp54_;
            _tmp56_ = vala_ccode_constant_new ("1");
            _tmp57_ = _tmp56_;
            _tmp58_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp55_, (ValaCCodeExpression*) _tmp57_);
            _tmp59_ = _tmp58_;
            _tmp60_ = vala_ccode_assignment_new (_tmp53_, (ValaCCodeExpression*) _tmp59_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
            _tmp61_ = _tmp60_;
            vala_ccode_function_open_for (_tmp45_, (ValaCCodeExpression*) _tmp51_, (ValaCCodeExpression*) ccond, (ValaCCodeExpression*) _tmp61_);
            _vala_ccode_node_unref0 (_tmp61_);
            _vala_ccode_node_unref0 (_tmp59_);
            _vala_ccode_node_unref0 (_tmp57_);
            _vala_ccode_node_unref0 (_tmp55_);
            _vala_ccode_node_unref0 (_tmp53_);
            _vala_ccode_node_unref0 (_tmp51_);
            _vala_ccode_node_unref0 (_tmp49_);
            _vala_ccode_node_unref0 (_tmp47_);
            _tmp62_ = vala_symbol_get_name ((ValaSymbol*) collection_backup);
            _tmp63_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp62_);
            _tmp64_ = _tmp63_;
            _tmp65_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
            _tmp66_ = _tmp65_;
            _tmp67_ = vala_ccode_element_access_new (_tmp64_, _tmp66_);
            _tmp68_ = (ValaCCodeExpression*) _tmp67_;
            _vala_ccode_node_unref0 (_tmp66_);
            _vala_ccode_node_unref0 (_tmp64_);
            element_expr = _tmp68_;
            _tmp69_ = vala_array_type_get_element_type (array_type);
            _tmp70_ = vala_data_type_copy (_tmp69_);
            element_type = _tmp70_;
            vala_data_type_set_value_owned (element_type, FALSE);
            _tmp71_ = vala_glib_value_new (element_type, element_expr);
            _tmp72_ = _tmp71_;
            _tmp73_ = vala_foreach_statement_get_type_reference (stmt);
            _tmp74_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp72_, _tmp73_, (ValaCodeNode*) stmt);
            _tmp75_ = _tmp74_;
            _tmp76_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp75_);
            _vala_ccode_node_unref0 (element_expr);
            element_expr = _tmp76_;
            _vala_target_value_unref0 (_tmp75_);
            _vala_target_value_unref0 (_tmp72_);
            _tmp77_ = vala_foreach_statement_get_element_variable (stmt);
            vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp77_);
            _tmp78_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp79_ = vala_foreach_statement_get_variable_name (stmt);
            _tmp80_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp79_);
            _tmp81_ = _tmp80_;
            vala_ccode_function_add_assignment (_tmp78_, _tmp81_, element_expr);
            _vala_ccode_node_unref0 (_tmp81_);
            _tmp82_ = vala_foreach_statement_get_type_reference (stmt);
            if (VALA_IS_ARRAY_TYPE (_tmp82_)) {
                  ValaDataType* _tmp83_ = NULL;
                  ValaArrayType* _tmp84_;
                  ValaArrayType* inner_array_type;
                  _tmp83_ = vala_foreach_statement_get_type_reference (stmt);
                  _tmp84_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp83_));
                  inner_array_type = _tmp84_;
                  {
                        gint dim;
                        dim = 1;
                        {
                              gboolean _tmp85_;
                              _tmp85_ = TRUE;
                              while (TRUE) {
                                    gint _tmp86_;
                                    ValaCCodeFunction* _tmp87_ = NULL;
                                    const gchar* _tmp88_ = NULL;
                                    gchar* _tmp89_ = NULL;
                                    gchar* _tmp90_;
                                    ValaCCodeExpression* _tmp91_ = NULL;
                                    ValaCCodeExpression* _tmp92_;
                                    ValaCCodeConstant* _tmp93_ = NULL;
                                    ValaCCodeConstant* _tmp94_;
                                    if (!_tmp85_) {
                                          dim++;
                                    }
                                    _tmp85_ = FALSE;
                                    _tmp86_ = vala_array_type_get_rank (inner_array_type);
                                    if (!(dim <= _tmp86_)) {
                                          break;
                                    }
                                    _tmp87_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                                    _tmp88_ = vala_foreach_statement_get_variable_name (stmt);
                                    _tmp89_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp88_, dim);
                                    _tmp90_ = _tmp89_;
                                    _tmp91_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp90_);
                                    _tmp92_ = _tmp91_;
                                    _tmp93_ = vala_ccode_constant_new ("-1");
                                    _tmp94_ = _tmp93_;
                                    vala_ccode_function_add_assignment (_tmp87_, _tmp92_, (ValaCCodeExpression*) _tmp94_);
                                    _vala_ccode_node_unref0 (_tmp94_);
                                    _vala_ccode_node_unref0 (_tmp92_);
                                    _g_free0 (_tmp90_);
                              }
                        }
                  }
                  _vala_code_node_unref0 (inner_array_type);
            }
            _tmp95_ = vala_foreach_statement_get_body (stmt);
            vala_code_node_emit ((ValaCodeNode*) _tmp95_, (ValaCodeGenerator*) self);
            _tmp96_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_close (_tmp96_);
            _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 _tmp97_ = FALSE;
            ValaExpression* _tmp98_ = NULL;
            ValaDataType* _tmp99_ = NULL;
            ValaObjectType* _tmp100_ = NULL;
            ValaObjectType* _tmp101_;
            gboolean _tmp102_;
            gboolean _tmp103_;
            _tmp98_ = vala_foreach_statement_get_collection (stmt);
            _tmp99_ = vala_expression_get_value_type (_tmp98_);
            _tmp100_ = vala_object_type_new ((ValaObjectTypeSymbol*) ((ValaCCodeBaseModule*) self)->glist_type);
            _tmp101_ = _tmp100_;
            _tmp102_ = vala_data_type_compatible (_tmp99_, (ValaDataType*) _tmp101_);
            _tmp103_ = _tmp102_;
            _vala_code_node_unref0 (_tmp101_);
            if (_tmp103_) {
                  _tmp97_ = TRUE;
            } else {
                  ValaExpression* _tmp104_ = NULL;
                  ValaDataType* _tmp105_ = NULL;
                  ValaObjectType* _tmp106_ = NULL;
                  ValaObjectType* _tmp107_;
                  gboolean _tmp108_;
                  _tmp104_ = vala_foreach_statement_get_collection (stmt);
                  _tmp105_ = vala_expression_get_value_type (_tmp104_);
                  _tmp106_ = vala_object_type_new ((ValaObjectTypeSymbol*) ((ValaCCodeBaseModule*) self)->gslist_type);
                  _tmp107_ = _tmp106_;
                  _tmp108_ = vala_data_type_compatible (_tmp105_, (ValaDataType*) _tmp107_);
                  _tmp97_ = _tmp108_;
                  _vala_code_node_unref0 (_tmp107_);
            }
            if (_tmp97_) {
                  ValaDataType* _tmp109_ = NULL;
                  ValaDataType* _tmp110_;
                  const gchar* _tmp111_ = NULL;
                  gchar* _tmp112_;
                  gchar* _tmp113_;
                  ValaLocalVariable* _tmp114_ = NULL;
                  ValaLocalVariable* _tmp115_;
                  ValaLocalVariable* iterator_variable;
                  const gchar* _tmp116_ = NULL;
                  gchar* _tmp117_ = NULL;
                  gchar* it_name;
                  ValaCCodeExpression* _tmp118_ = NULL;
                  ValaCCodeExpression* _tmp119_;
                  ValaCCodeConstant* _tmp120_ = NULL;
                  ValaCCodeConstant* _tmp121_;
                  ValaCCodeBinaryExpression* _tmp122_ = NULL;
                  ValaCCodeBinaryExpression* _tmp123_;
                  ValaCCodeBinaryExpression* ccond;
                  ValaCCodeFunction* _tmp124_ = NULL;
                  ValaCCodeExpression* _tmp125_ = NULL;
                  ValaCCodeExpression* _tmp126_;
                  const gchar* _tmp127_ = NULL;
                  ValaCCodeExpression* _tmp128_ = NULL;
                  ValaCCodeExpression* _tmp129_;
                  ValaCCodeAssignment* _tmp130_ = NULL;
                  ValaCCodeAssignment* _tmp131_;
                  ValaCCodeExpression* _tmp132_ = NULL;
                  ValaCCodeExpression* _tmp133_;
                  ValaCCodeExpression* _tmp134_ = NULL;
                  ValaCCodeExpression* _tmp135_;
                  ValaCCodeMemberAccess* _tmp136_ = NULL;
                  ValaCCodeMemberAccess* _tmp137_;
                  ValaCCodeAssignment* _tmp138_ = NULL;
                  ValaCCodeAssignment* _tmp139_;
                  ValaCCodeExpression* _tmp140_ = NULL;
                  ValaCCodeExpression* _tmp141_;
                  ValaCCodeMemberAccess* _tmp142_ = NULL;
                  ValaCCodeExpression* _tmp143_;
                  ValaCCodeExpression* element_expr;
                  ValaList* _tmp144_ = NULL;
                  ValaList* _tmp145_;
                  gint _tmp146_;
                  gboolean _tmp147_;
                  ValaList* _tmp149_ = NULL;
                  ValaList* _tmp150_;
                  gpointer _tmp151_ = NULL;
                  ValaDataType* _tmp152_;
                  ValaDataType* _tmp153_ = NULL;
                  ValaDataType* _tmp154_;
                  ValaDataType* element_data_type;
                  ValaCCodeExpression* _tmp155_ = NULL;
                  ValaGLibValue* _tmp156_ = NULL;
                  ValaGLibValue* _tmp157_;
                  ValaDataType* _tmp158_ = NULL;
                  ValaTargetValue* _tmp159_ = NULL;
                  ValaTargetValue* _tmp160_;
                  ValaCCodeExpression* _tmp161_ = NULL;
                  ValaLocalVariable* _tmp162_ = NULL;
                  ValaCCodeFunction* _tmp163_ = NULL;
                  const gchar* _tmp164_ = NULL;
                  ValaCCodeExpression* _tmp165_ = NULL;
                  ValaCCodeExpression* _tmp166_;
                  ValaBlock* _tmp167_ = NULL;
                  ValaCCodeFunction* _tmp168_ = NULL;
                  _tmp109_ = vala_data_type_copy (collection_type);
                  _tmp110_ = _tmp109_;
                  _tmp111_ = vala_foreach_statement_get_variable_name (stmt);
                  _tmp112_ = g_strconcat (_tmp111_, "_it", NULL);
                  _tmp113_ = _tmp112_;
                  _tmp114_ = vala_local_variable_new (_tmp110_, _tmp113_, NULL, NULL);
                  _tmp115_ = _tmp114_;
                  _g_free0 (_tmp113_);
                  _vala_code_node_unref0 (_tmp110_);
                  iterator_variable = _tmp115_;
                  vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, iterator_variable, FALSE);
                  _tmp116_ = vala_symbol_get_name ((ValaSymbol*) iterator_variable);
                  _tmp117_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp116_);
                  it_name = _tmp117_;
                  _tmp118_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
                  _tmp119_ = _tmp118_;
                  _tmp120_ = vala_ccode_constant_new ("NULL");
                  _tmp121_ = _tmp120_;
                  _tmp122_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, _tmp119_, (ValaCCodeExpression*) _tmp121_);
                  _tmp123_ = _tmp122_;
                  _vala_ccode_node_unref0 (_tmp121_);
                  _vala_ccode_node_unref0 (_tmp119_);
                  ccond = _tmp123_;
                  _tmp124_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp125_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
                  _tmp126_ = _tmp125_;
                  _tmp127_ = vala_symbol_get_name ((ValaSymbol*) collection_backup);
                  _tmp128_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp127_);
                  _tmp129_ = _tmp128_;
                  _tmp130_ = vala_ccode_assignment_new (_tmp126_, _tmp129_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                  _tmp131_ = _tmp130_;
                  _tmp132_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
                  _tmp133_ = _tmp132_;
                  _tmp134_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
                  _tmp135_ = _tmp134_;
                  _tmp136_ = vala_ccode_member_access_new_pointer (_tmp135_, "next");
                  _tmp137_ = _tmp136_;
                  _tmp138_ = vala_ccode_assignment_new (_tmp133_, (ValaCCodeExpression*) _tmp137_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                  _tmp139_ = _tmp138_;
                  vala_ccode_function_open_for (_tmp124_, (ValaCCodeExpression*) _tmp131_, (ValaCCodeExpression*) ccond, (ValaCCodeExpression*) _tmp139_);
                  _vala_ccode_node_unref0 (_tmp139_);
                  _vala_ccode_node_unref0 (_tmp137_);
                  _vala_ccode_node_unref0 (_tmp135_);
                  _vala_ccode_node_unref0 (_tmp133_);
                  _vala_ccode_node_unref0 (_tmp131_);
                  _vala_ccode_node_unref0 (_tmp129_);
                  _vala_ccode_node_unref0 (_tmp126_);
                  _tmp140_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, it_name);
                  _tmp141_ = _tmp140_;
                  _tmp142_ = vala_ccode_member_access_new_pointer (_tmp141_, "data");
                  _tmp143_ = (ValaCCodeExpression*) _tmp142_;
                  _vala_ccode_node_unref0 (_tmp141_);
                  element_expr = _tmp143_;
                  _tmp144_ = vala_data_type_get_type_arguments (collection_type);
                  _tmp145_ = _tmp144_;
                  _tmp146_ = vala_collection_get_size ((ValaCollection*) _tmp145_);
                  _tmp147_ = _tmp146_ != 1;
                  _vala_iterable_unref0 (_tmp145_);
                  if (_tmp147_) {
                        ValaSourceReference* _tmp148_ = NULL;
                        _tmp148_ = vala_code_node_get_source_reference ((ValaCodeNode*) stmt);
                        vala_report_error (_tmp148_, "internal error: missing generic type argument");
                        vala_code_node_set_error ((ValaCodeNode*) stmt, TRUE);
                        _vala_ccode_node_unref0 (element_expr);
                        _vala_ccode_node_unref0 (ccond);
                        _g_free0 (it_name);
                        _vala_code_node_unref0 (iterator_variable);
                        _vala_code_node_unref0 (array_type);
                        _vala_code_node_unref0 (collection_type);
                        _vala_code_node_unref0 (collection_backup);
                        return;
                  }
                  _tmp149_ = vala_data_type_get_type_arguments (collection_type);
                  _tmp150_ = _tmp149_;
                  _tmp151_ = vala_list_get (_tmp150_, 0);
                  _tmp152_ = (ValaDataType*) _tmp151_;
                  _tmp153_ = vala_data_type_copy (_tmp152_);
                  _tmp154_ = _tmp153_;
                  _vala_code_node_unref0 (_tmp152_);
                  _vala_iterable_unref0 (_tmp150_);
                  element_data_type = _tmp154_;
                  vala_data_type_set_value_owned (element_data_type, FALSE);
                  _tmp155_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, element_expr, element_data_type);
                  _vala_ccode_node_unref0 (element_expr);
                  element_expr = _tmp155_;
                  _tmp156_ = vala_glib_value_new (element_data_type, element_expr);
                  _tmp157_ = _tmp156_;
                  _tmp158_ = vala_foreach_statement_get_type_reference (stmt);
                  _tmp159_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp157_, _tmp158_, (ValaCodeNode*) stmt);
                  _tmp160_ = _tmp159_;
                  _tmp161_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp160_);
                  _vala_ccode_node_unref0 (element_expr);
                  element_expr = _tmp161_;
                  _vala_target_value_unref0 (_tmp160_);
                  _vala_target_value_unref0 (_tmp157_);
                  _tmp162_ = vala_foreach_statement_get_element_variable (stmt);
                  vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp162_);
                  _tmp163_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  _tmp164_ = vala_foreach_statement_get_variable_name (stmt);
                  _tmp165_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp164_);
                  _tmp166_ = _tmp165_;
                  vala_ccode_function_add_assignment (_tmp163_, _tmp166_, element_expr);
                  _vala_ccode_node_unref0 (_tmp166_);
                  _tmp167_ = vala_foreach_statement_get_body (stmt);
                  vala_code_node_emit ((ValaCodeNode*) _tmp167_, (ValaCodeGenerator*) self);
                  _tmp168_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                  vala_ccode_function_close (_tmp168_);
                  _vala_code_node_unref0 (element_data_type);
                  _vala_ccode_node_unref0 (element_expr);
                  _vala_ccode_node_unref0 (ccond);
                  _g_free0 (it_name);
                  _vala_code_node_unref0 (iterator_variable);
            } else {
                  ValaExpression* _tmp169_ = NULL;
                  ValaDataType* _tmp170_ = NULL;
                  ValaObjectType* _tmp171_ = NULL;
                  ValaObjectType* _tmp172_;
                  gboolean _tmp173_;
                  gboolean _tmp174_;
                  _tmp169_ = vala_foreach_statement_get_collection (stmt);
                  _tmp170_ = vala_expression_get_value_type (_tmp169_);
                  _tmp171_ = vala_object_type_new ((ValaObjectTypeSymbol*) ((ValaCCodeBaseModule*) self)->gvaluearray_type);
                  _tmp172_ = _tmp171_;
                  _tmp173_ = vala_data_type_compatible (_tmp170_, (ValaDataType*) _tmp172_);
                  _tmp174_ = _tmp173_;
                  _vala_code_node_unref0 (_tmp172_);
                  if (_tmp174_) {
                        ValaDataType* _tmp175_ = NULL;
                        ValaDataType* _tmp176_;
                        const gchar* _tmp177_ = NULL;
                        gchar* _tmp178_ = NULL;
                        gchar* _tmp179_;
                        ValaLocalVariable* _tmp180_ = NULL;
                        ValaLocalVariable* _tmp181_;
                        ValaLocalVariable* iterator_variable;
                        const gchar* _tmp182_ = NULL;
                        gchar* _tmp183_ = NULL;
                        gchar* arr_index;
                        ValaCCodeExpression* _tmp184_ = NULL;
                        ValaCCodeExpression* _tmp185_;
                        const gchar* _tmp186_ = NULL;
                        ValaCCodeExpression* _tmp187_ = NULL;
                        ValaCCodeExpression* _tmp188_;
                        ValaCCodeMemberAccess* _tmp189_ = NULL;
                        ValaCCodeMemberAccess* _tmp190_;
                        ValaCCodeBinaryExpression* _tmp191_ = NULL;
                        ValaCCodeBinaryExpression* _tmp192_;
                        ValaCCodeBinaryExpression* ccond;
                        ValaCCodeFunction* _tmp193_ = NULL;
                        ValaCCodeExpression* _tmp194_ = NULL;
                        ValaCCodeExpression* _tmp195_;
                        ValaCCodeConstant* _tmp196_ = NULL;
                        ValaCCodeConstant* _tmp197_;
                        ValaCCodeAssignment* _tmp198_ = NULL;
                        ValaCCodeAssignment* _tmp199_;
                        ValaCCodeExpression* _tmp200_ = NULL;
                        ValaCCodeExpression* _tmp201_;
                        ValaCCodeExpression* _tmp202_ = NULL;
                        ValaCCodeExpression* _tmp203_;
                        ValaCCodeConstant* _tmp204_ = NULL;
                        ValaCCodeConstant* _tmp205_;
                        ValaCCodeBinaryExpression* _tmp206_ = NULL;
                        ValaCCodeBinaryExpression* _tmp207_;
                        ValaCCodeAssignment* _tmp208_ = NULL;
                        ValaCCodeAssignment* _tmp209_;
                        ValaCCodeIdentifier* _tmp210_ = NULL;
                        ValaCCodeIdentifier* _tmp211_;
                        ValaCCodeFunctionCall* _tmp212_ = NULL;
                        ValaCCodeFunctionCall* _tmp213_;
                        ValaCCodeFunctionCall* get_item;
                        const gchar* _tmp214_ = NULL;
                        ValaCCodeExpression* _tmp215_ = NULL;
                        ValaCCodeExpression* _tmp216_;
                        ValaCCodeExpression* _tmp217_ = NULL;
                        ValaCCodeExpression* _tmp218_;
                        ValaCCodeUnaryExpression* _tmp219_ = NULL;
                        ValaCCodeExpression* element_expr;
                        ValaDataType* _tmp220_ = NULL;
                        gboolean _tmp221_;
                        ValaLocalVariable* _tmp230_ = NULL;
                        ValaCCodeFunction* _tmp231_ = NULL;
                        const gchar* _tmp232_ = NULL;
                        ValaCCodeExpression* _tmp233_ = NULL;
                        ValaCCodeExpression* _tmp234_;
                        ValaBlock* _tmp235_ = NULL;
                        ValaCCodeFunction* _tmp236_ = NULL;
                        _tmp175_ = vala_data_type_copy (((ValaCCodeBaseModule*) self)->uint_type);
                        _tmp176_ = _tmp175_;
                        _tmp177_ = vala_foreach_statement_get_variable_name (stmt);
                        _tmp178_ = g_strdup_printf ("%s_index", _tmp177_);
                        _tmp179_ = _tmp178_;
                        _tmp180_ = vala_local_variable_new (_tmp176_, _tmp179_, NULL, NULL);
                        _tmp181_ = _tmp180_;
                        _g_free0 (_tmp179_);
                        _vala_code_node_unref0 (_tmp176_);
                        iterator_variable = _tmp181_;
                        vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, iterator_variable, FALSE);
                        _tmp182_ = vala_symbol_get_name ((ValaSymbol*) iterator_variable);
                        _tmp183_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp182_);
                        arr_index = _tmp183_;
                        _tmp184_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, arr_index);
                        _tmp185_ = _tmp184_;
                        _tmp186_ = vala_symbol_get_name ((ValaSymbol*) collection_backup);
                        _tmp187_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp186_);
                        _tmp188_ = _tmp187_;
                        _tmp189_ = vala_ccode_member_access_new_pointer (_tmp188_, "n_values");
                        _tmp190_ = _tmp189_;
                        _tmp191_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, _tmp185_, (ValaCCodeExpression*) _tmp190_);
                        _tmp192_ = _tmp191_;
                        _vala_ccode_node_unref0 (_tmp190_);
                        _vala_ccode_node_unref0 (_tmp188_);
                        _vala_ccode_node_unref0 (_tmp185_);
                        ccond = _tmp192_;
                        _tmp193_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp194_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, arr_index);
                        _tmp195_ = _tmp194_;
                        _tmp196_ = vala_ccode_constant_new ("0");
                        _tmp197_ = _tmp196_;
                        _tmp198_ = vala_ccode_assignment_new (_tmp195_, (ValaCCodeExpression*) _tmp197_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                        _tmp199_ = _tmp198_;
                        _tmp200_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, arr_index);
                        _tmp201_ = _tmp200_;
                        _tmp202_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, arr_index);
                        _tmp203_ = _tmp202_;
                        _tmp204_ = vala_ccode_constant_new ("1");
                        _tmp205_ = _tmp204_;
                        _tmp206_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp203_, (ValaCCodeExpression*) _tmp205_);
                        _tmp207_ = _tmp206_;
                        _tmp208_ = vala_ccode_assignment_new (_tmp201_, (ValaCCodeExpression*) _tmp207_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                        _tmp209_ = _tmp208_;
                        vala_ccode_function_open_for (_tmp193_, (ValaCCodeExpression*) _tmp199_, (ValaCCodeExpression*) ccond, (ValaCCodeExpression*) _tmp209_);
                        _vala_ccode_node_unref0 (_tmp209_);
                        _vala_ccode_node_unref0 (_tmp207_);
                        _vala_ccode_node_unref0 (_tmp205_);
                        _vala_ccode_node_unref0 (_tmp203_);
                        _vala_ccode_node_unref0 (_tmp201_);
                        _vala_ccode_node_unref0 (_tmp199_);
                        _vala_ccode_node_unref0 (_tmp197_);
                        _vala_ccode_node_unref0 (_tmp195_);
                        _tmp210_ = vala_ccode_identifier_new ("g_value_array_get_nth");
                        _tmp211_ = _tmp210_;
                        _tmp212_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp211_);
                        _tmp213_ = _tmp212_;
                        _vala_ccode_node_unref0 (_tmp211_);
                        get_item = _tmp213_;
                        _tmp214_ = vala_symbol_get_name ((ValaSymbol*) collection_backup);
                        _tmp215_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp214_);
                        _tmp216_ = _tmp215_;
                        vala_ccode_function_call_add_argument (get_item, _tmp216_);
                        _vala_ccode_node_unref0 (_tmp216_);
                        _tmp217_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, arr_index);
                        _tmp218_ = _tmp217_;
                        vala_ccode_function_call_add_argument (get_item, _tmp218_);
                        _vala_ccode_node_unref0 (_tmp218_);
                        _tmp219_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) get_item);
                        element_expr = (ValaCCodeExpression*) _tmp219_;
                        _tmp220_ = vala_foreach_statement_get_type_reference (stmt);
                        _tmp221_ = vala_data_type_get_value_owned (_tmp220_);
                        if (_tmp221_) {
                              ValaDataType* _tmp222_ = NULL;
                              ValaGLibValue* _tmp223_ = NULL;
                              ValaGLibValue* _tmp224_;
                              ValaStructValueType* _tmp225_ = NULL;
                              ValaStructValueType* _tmp226_;
                              ValaTargetValue* _tmp227_ = NULL;
                              ValaTargetValue* _tmp228_;
                              ValaCCodeExpression* _tmp229_ = NULL;
                              _tmp222_ = vala_foreach_statement_get_type_reference (stmt);
                              _tmp223_ = vala_glib_value_new (_tmp222_, element_expr);
                              _tmp224_ = _tmp223_;
                              _tmp225_ = vala_struct_value_type_new (((ValaCCodeBaseModule*) self)->gvalue_type);
                              _tmp226_ = _tmp225_;
                              _tmp227_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp224_, (ValaCodeNode*) _tmp226_);
                              _tmp228_ = _tmp227_;
                              _tmp229_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp228_);
                              _vala_ccode_node_unref0 (element_expr);
                              element_expr = _tmp229_;
                              _vala_target_value_unref0 (_tmp228_);
                              _vala_code_node_unref0 (_tmp226_);
                              _vala_target_value_unref0 (_tmp224_);
                        }
                        _tmp230_ = vala_foreach_statement_get_element_variable (stmt);
                        vala_code_visitor_visit_local_variable ((ValaCodeVisitor*) self, _tmp230_);
                        _tmp231_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp232_ = vala_foreach_statement_get_variable_name (stmt);
                        _tmp233_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp232_);
                        _tmp234_ = _tmp233_;
                        vala_ccode_function_add_assignment (_tmp231_, _tmp234_, element_expr);
                        _vala_ccode_node_unref0 (_tmp234_);
                        _tmp235_ = vala_foreach_statement_get_body (stmt);
                        vala_code_node_emit ((ValaCodeNode*) _tmp235_, (ValaCodeGenerator*) self);
                        _tmp236_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        vala_ccode_function_close (_tmp236_);
                        _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* _tmp237_ = NULL;
            ValaList* _local_list;
            gint _tmp238_;
            gint _local_size;
            gint _local_index;
            _tmp237_ = vala_block_get_local_variables ((ValaBlock*) stmt);
            _local_list = _tmp237_;
            _tmp238_ = vala_collection_get_size ((ValaCollection*) _local_list);
            _local_size = _tmp238_;
            _local_index = -1;
            while (TRUE) {
                  gpointer _tmp239_ = NULL;
                  ValaLocalVariable* local;
                  ValaDataType* _tmp240_ = NULL;
                  gboolean _tmp241_;
                  _local_index = _local_index + 1;
                  if (!(_local_index < _local_size)) {
                        break;
                  }
                  _tmp239_ = vala_list_get (_local_list, _local_index);
                  local = (ValaLocalVariable*) _tmp239_;
                  _tmp240_ = vala_variable_get_variable_type ((ValaVariable*) local);
                  _tmp241_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp240_);
                  if (_tmp241_) {
                        ValaCCodeFunction* _tmp242_ = NULL;
                        ValaCCodeExpression* _tmp243_ = NULL;
                        ValaCCodeExpression* _tmp244_;
                        _tmp242_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp243_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, local);
                        _tmp244_ = _tmp243_;
                        vala_ccode_function_add_expression (_tmp242_, _tmp244_);
                        _vala_ccode_node_unref0 (_tmp244_);
                  }
                  _vala_code_node_unref0 (local);
            }
            _vala_iterable_unref0 (_local_list);
      }
      _tmp245_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp245_);
      _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_ = NULL;
      ValaCCodeFunction* _tmp1_ = NULL;
      self = (ValaCCodeControlFlowModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_ccode_base_module_get_current_symbol ((ValaCCodeBaseModule*) self);
      vala_ccode_base_module_append_local_free ((ValaCCodeBaseModule*) self, _tmp0_, TRUE, NULL);
      _tmp1_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_break (_tmp1_);
}


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


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);
      VALA_CODE_VISITOR_CLASS (klass)->visit_if_statement = vala_ccode_control_flow_module_real_visit_if_statement;
      VALA_CODE_VISITOR_CLASS (klass)->visit_switch_statement = vala_ccode_control_flow_module_real_visit_switch_statement;
      VALA_CODE_VISITOR_CLASS (klass)->visit_switch_label = vala_ccode_control_flow_module_real_visit_switch_label;
      VALA_CODE_VISITOR_CLASS (klass)->visit_loop = vala_ccode_control_flow_module_real_visit_loop;
      VALA_CODE_VISITOR_CLASS (klass)->visit_foreach_statement = vala_ccode_control_flow_module_real_visit_foreach_statement;
      VALA_CODE_VISITOR_CLASS (klass)->visit_break_statement = vala_ccode_control_flow_module_real_visit_break_statement;
      VALA_CODE_VISITOR_CLASS (klass)->visit_continue_statement = 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;
}




Generated by  Doxygen 1.6.0   Back to index