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

valaccodearraymodule.c

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

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

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

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

#include <glib.h>
#include <glib-object.h>
#include <vala.h>
#include <valaccode.h>
#include <valagee.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.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_TYPE_CCODE_MEMBER_ACCESS_MODULE (vala_ccode_member_access_module_get_type ())
#define VALA_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModule))
#define VALA_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass))
#define VALA_IS_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE))
#define VALA_IS_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE))
#define VALA_CCODE_MEMBER_ACCESS_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass))

typedef struct _ValaCCodeMemberAccessModule ValaCCodeMemberAccessModule;
typedef struct _ValaCCodeMemberAccessModuleClass ValaCCodeMemberAccessModuleClass;
typedef struct _ValaCCodeMemberAccessModulePrivate ValaCCodeMemberAccessModulePrivate;

#define VALA_TYPE_CCODE_ASSIGNMENT_MODULE (vala_ccode_assignment_module_get_type ())
#define VALA_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModule))
#define VALA_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass))
#define VALA_IS_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE))
#define VALA_IS_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE))
#define VALA_CCODE_ASSIGNMENT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass))

typedef struct _ValaCCodeAssignmentModule ValaCCodeAssignmentModule;
typedef struct _ValaCCodeAssignmentModuleClass ValaCCodeAssignmentModuleClass;
typedef struct _ValaCCodeAssignmentModulePrivate ValaCCodeAssignmentModulePrivate;

#define VALA_TYPE_CCODE_METHOD_CALL_MODULE (vala_ccode_method_call_module_get_type ())
#define VALA_CCODE_METHOD_CALL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule))
#define VALA_CCODE_METHOD_CALL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModuleClass))
#define VALA_IS_CCODE_METHOD_CALL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE))
#define VALA_IS_CCODE_METHOD_CALL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_METHOD_CALL_MODULE))
#define VALA_CCODE_METHOD_CALL_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModuleClass))

typedef struct _ValaCCodeMethodCallModule ValaCCodeMethodCallModule;
typedef struct _ValaCCodeMethodCallModuleClass ValaCCodeMethodCallModuleClass;
typedef struct _ValaCCodeMethodCallModulePrivate ValaCCodeMethodCallModulePrivate;

#define VALA_TYPE_CCODE_ARRAY_MODULE (vala_ccode_array_module_get_type ())
#define VALA_CCODE_ARRAY_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModule))
#define VALA_CCODE_ARRAY_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModuleClass))
#define VALA_IS_CCODE_ARRAY_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_ARRAY_MODULE))
#define VALA_IS_CCODE_ARRAY_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_ARRAY_MODULE))
#define VALA_CCODE_ARRAY_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModuleClass))

typedef struct _ValaCCodeArrayModule ValaCCodeArrayModule;
typedef struct _ValaCCodeArrayModuleClass ValaCCodeArrayModuleClass;
typedef struct _ValaCCodeArrayModulePrivate ValaCCodeArrayModulePrivate;
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (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;
typedef struct _ValaGLibValuePrivate ValaGLibValuePrivate;
#define _vala_ccode_base_module_emit_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_base_module_emit_context_unref (var), NULL)))
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))

00154 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;
};

00228 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);
};

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

00287 struct _ValaCCodeStructModuleClass {
      ValaCCodeBaseModuleClass parent_class;
};

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

00296 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);
};

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

00307 struct _ValaCCodeControlFlowModuleClass {
      ValaCCodeMethodModuleClass parent_class;
};

00311 struct _ValaCCodeMemberAccessModule {
      ValaCCodeControlFlowModule parent_instance;
      ValaCCodeMemberAccessModulePrivate * priv;
};

00316 struct _ValaCCodeMemberAccessModuleClass {
      ValaCCodeControlFlowModuleClass parent_class;
};

00320 struct _ValaCCodeAssignmentModule {
      ValaCCodeMemberAccessModule parent_instance;
      ValaCCodeAssignmentModulePrivate * priv;
};

00325 struct _ValaCCodeAssignmentModuleClass {
      ValaCCodeMemberAccessModuleClass parent_class;
};

00329 struct _ValaCCodeMethodCallModule {
      ValaCCodeAssignmentModule parent_instance;
      ValaCCodeMethodCallModulePrivate * priv;
};

00334 struct _ValaCCodeMethodCallModuleClass {
      ValaCCodeAssignmentModuleClass parent_class;
};

00338 struct _ValaCCodeArrayModule {
      ValaCCodeMethodCallModule parent_instance;
      ValaCCodeArrayModulePrivate * priv;
};

00343 struct _ValaCCodeArrayModuleClass {
      ValaCCodeMethodCallModuleClass parent_class;
};

00347 struct _ValaCCodeArrayModulePrivate {
      gint next_array_dup_id;
      gint next_array_add_id;
};

00352 struct _ValaGLibValue {
      ValaTargetValue parent_instance;
      ValaGLibValuePrivate * priv;
      ValaCCodeExpression* cvalue;
      gboolean non_null;
      gchar* ctype;
      ValaList* array_length_cvalues;
      ValaCCodeExpression* array_size_cvalue;
      gboolean array_null_terminated;
      ValaCCodeExpression* array_length_cexpr;
      ValaCCodeExpression* delegate_target_cvalue;
      ValaCCodeExpression* delegate_target_destroy_notify_cvalue;
};

00366 struct _ValaGLibValueClass {
      ValaTargetValueClass parent_class;
};


static gpointer vala_ccode_array_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;
GType vala_ccode_member_access_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_assignment_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_call_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_array_module_get_type (void) G_GNUC_CONST;
#define VALA_CCODE_ARRAY_MODULE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModulePrivate))
enum  {
      VALA_CCODE_ARRAY_MODULE_DUMMY_PROPERTY
};
static void vala_ccode_array_module_append_initializer_list (ValaCCodeArrayModule* self, ValaCCodeExpression* name_cnode, ValaInitializerList* initializer_list, gint rank, gint* i);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr);
static void vala_ccode_array_module_real_visit_array_creation_expression (ValaCodeVisitor* base, ValaArrayCreationExpression* expr);
ValaLocalVariable* vala_ccode_base_module_get_temp_variable (ValaCCodeBaseModule* self, ValaDataType* type, gboolean value_owned, ValaCodeNode* node_reference, gboolean init);
ValaCCodeExpression* vala_ccode_base_module_get_variable_cexpression (ValaCCodeBaseModule* self, const gchar* name);
void vala_ccode_base_module_emit_temp_var (ValaCCodeBaseModule* self, ValaLocalVariable* local, gboolean always_init);
void vala_ccode_base_module_set_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr, ValaCCodeExpression* cvalue);
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
gboolean vala_ccode_base_module_is_pure_ccode_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cexpr);
void vala_ccode_base_module_append_array_length (ValaCCodeBaseModule* self, ValaExpression* expr, ValaCCodeExpression* size);
static gchar* vala_ccode_array_module_real_get_array_length_cname (ValaCCodeBaseModule* base, const gchar* array_cname, gint dim);
static gchar* vala_ccode_array_module_real_get_parameter_array_length_cname (ValaCCodeBaseModule* base, ValaParameter* param, 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);
static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cexpression (ValaCCodeBaseModule* base, ValaExpression* array_expr, gint dim);
ValaCCodeExpression* vala_ccode_base_module_get_array_length_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value, gint dim);
static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cvalue (ValaCCodeBaseModule* base, ValaTargetValue* value, gint dim);
GType vala_glib_value_get_type (void) G_GNUC_CONST;
static gchar* vala_ccode_array_module_real_get_array_size_cname (ValaCCodeBaseModule* base, const gchar* array_cname);
static void vala_ccode_array_module_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr);
ValaCCodeExpression* vala_ccode_base_module_get_array_length_cexpression (ValaCCodeBaseModule* self, ValaExpression* array_expr, gint dim);
static void vala_ccode_array_module_real_visit_slice_expression (ValaCodeVisitor* base, ValaSliceExpression* expr);
static void vala_ccode_array_module_append_struct_array_free_loop (ValaCCodeArrayModule* self, ValaStruct* st);
ValaCCodeExpression* vala_ccode_base_module_get_destroy_func_expression (ValaCCodeBaseModule* self, ValaDataType* type, gboolean is_chainup);
static gchar* vala_ccode_array_module_real_append_struct_array_free (ValaCCodeBaseModule* base, ValaStruct* st);
void vala_ccode_base_module_push_function (ValaCCodeBaseModule* self, ValaCCodeFunction* func);
void vala_ccode_base_module_pop_function (ValaCCodeBaseModule* self);
static void vala_ccode_array_module_append_vala_array_free_loop (ValaCCodeArrayModule* self);
static void vala_ccode_array_module_real_append_vala_array_free (ValaCCodeBaseModule* base);
static void vala_ccode_array_module_real_append_vala_array_move (ValaCCodeBaseModule* base);
static void vala_ccode_array_module_real_append_vala_array_length (ValaCCodeBaseModule* base);
static ValaTargetValue* vala_ccode_array_module_real_copy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, ValaCodeNode* node);
ValaCCodeExpression* vala_ccode_base_module_get_cvalue_ (ValaCCodeBaseModule* self, ValaTargetValue* value);
ValaTargetValue* vala_ccode_base_module_copy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node);
static gchar* vala_ccode_array_module_generate_array_copy_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type);
ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue);
ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue);
static ValaCCodeExpression* vala_ccode_array_module_real_get_dup_func_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
static gchar* vala_ccode_array_module_generate_array_dup_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type);
ValaCCodeExpression* vala_ccode_base_module_get_dup_func_expression (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
static ValaCCodeExpression* vala_ccode_array_module_real_destroy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, gboolean is_macro_definition);
ValaCCodeExpression* vala_ccode_base_module_destroy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition);
gboolean vala_ccode_base_module_add_wrapper (ValaCCodeBaseModule* self, const gchar* wrapper_name);
void vala_ccode_base_module_push_context (ValaCCodeBaseModule* self, ValaCCodeBaseModuleEmitContext* emit_context);
ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_new (ValaSymbol* symbol);
ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_construct (GType object_type, ValaSymbol* symbol);
gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type);
void vala_ccode_base_module_pop_context (ValaCCodeBaseModule* self);
static gchar* vala_ccode_array_module_generate_array_add_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type);
static gboolean vala_ccode_array_module_is_array_add (ValaCCodeArrayModule* self, ValaAssignment* assignment);
static void vala_ccode_array_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment);
ValaCCodeExpression* vala_ccode_base_module_get_array_size_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value);
ValaCCodeExpression* vala_ccode_base_module_handle_struct_argument (ValaCCodeBaseModule* self, ValaParameter* param, ValaExpression* arg, ValaCCodeExpression* cexpr);
static ValaCCodeParameter* vala_ccode_array_module_real_generate_parameter (ValaCCodeMethodModule* base, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
ValaCCodeParameter* vala_ccode_method_module_generate_parameter (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
void vala_ccode_base_module_generate_type_declaration (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeFile* decl_space);
gint vala_ccode_base_module_get_param_pos (ValaCCodeBaseModule* self, gdouble param_pos, gboolean ellipsis);
gchar* vala_ccode_base_module_get_parameter_array_length_cname (ValaCCodeBaseModule* self, ValaParameter* param, gint dim);
ValaCCodeArrayModule* vala_ccode_array_module_new (void);
ValaCCodeArrayModule* vala_ccode_array_module_construct (GType object_type);
ValaCCodeMethodCallModule* vala_ccode_method_call_module_new (void);
ValaCCodeMethodCallModule* vala_ccode_method_call_module_construct (GType object_type);
static void vala_ccode_array_module_finalize (ValaCodeVisitor* obj);


static void vala_ccode_array_module_append_initializer_list (ValaCCodeArrayModule* self, ValaCCodeExpression* name_cnode, ValaInitializerList* initializer_list, gint rank, gint* i) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (name_cnode != NULL);
      g_return_if_fail (initializer_list != NULL);
      {
            ValaList* _tmp0_ = NULL;
            ValaList* _e_list;
            gint _tmp1_;
            gint _e_size;
            gint _e_index;
            _tmp0_ = vala_initializer_list_get_initializers (initializer_list);
            _e_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _e_list);
            _e_size = _tmp1_;
            _e_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaExpression* e;
                  _e_index = _e_index + 1;
                  if (!(_e_index < _e_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get (_e_list, _e_index);
                  e = (ValaExpression*) _tmp2_;
                  if (rank > 1) {
                        vala_ccode_array_module_append_initializer_list (self, name_cnode, VALA_INITIALIZER_LIST (e), rank - 1, i);
                  } else {
                        ValaCCodeFunction* _tmp3_ = NULL;
                        gchar* _tmp4_ = NULL;
                        gchar* _tmp5_;
                        ValaCCodeConstant* _tmp6_ = NULL;
                        ValaCCodeConstant* _tmp7_;
                        ValaCCodeElementAccess* _tmp8_ = NULL;
                        ValaCCodeElementAccess* _tmp9_;
                        ValaCCodeExpression* _tmp10_ = NULL;
                        ValaCCodeExpression* _tmp11_;
                        _tmp3_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
                        _tmp4_ = g_strdup_printf ("%i", *i);
                        _tmp5_ = _tmp4_;
                        _tmp6_ = vala_ccode_constant_new (_tmp5_);
                        _tmp7_ = _tmp6_;
                        _tmp8_ = vala_ccode_element_access_new (name_cnode, (ValaCCodeExpression*) _tmp7_);
                        _tmp9_ = _tmp8_;
                        _tmp10_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, e);
                        _tmp11_ = _tmp10_;
                        vala_ccode_function_add_assignment (_tmp3_, (ValaCCodeExpression*) _tmp9_, _tmp11_);
                        _vala_ccode_node_unref0 (_tmp11_);
                        _vala_ccode_node_unref0 (_tmp9_);
                        _vala_ccode_node_unref0 (_tmp7_);
                        _g_free0 (_tmp5_);
                        (*i)++;
                  }
                  _vala_code_node_unref0 (e);
            }
            _vala_iterable_unref0 (_e_list);
      }
}


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_array_module_real_visit_array_creation_expression (ValaCodeVisitor* base, ValaArrayCreationExpression* expr) {
      ValaCCodeArrayModule * self;
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp1_;
      ValaArrayType* _tmp2_;
      ValaArrayType* array_type;
      gboolean _tmp3_ = FALSE;
      ValaCCodeFunctionCall* gnew = NULL;
      ValaCodeContext* _tmp10_ = NULL;
      ValaProfile _tmp11_;
      gboolean first;
      ValaCCodeExpression* cexpr;
      gboolean _tmp34_ = FALSE;
      ValaDataType* _tmp35_ = NULL;
      ValaTypeSymbol* _tmp36_ = NULL;
      ValaCodeContext* _tmp43_ = NULL;
      ValaProfile _tmp44_;
      ValaDataType* _tmp54_ = NULL;
      ValaLocalVariable* _tmp55_ = NULL;
      ValaLocalVariable* temp_var;
      const gchar* _tmp56_ = NULL;
      ValaCCodeExpression* _tmp57_ = NULL;
      ValaCCodeExpression* name_cnode;
      gint i;
      ValaCCodeFunction* _tmp58_ = NULL;
      ValaInitializerList* _tmp59_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_expression_get_target_type ((ValaExpression*) expr);
      _tmp1_ = _tmp0_;
      _tmp2_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp1_) ? ((ValaArrayType*) _tmp1_) : NULL);
      array_type = _tmp2_;
      if (array_type != NULL) {
            gboolean _tmp4_;
            _tmp4_ = vala_array_type_get_fixed_length (array_type);
            _tmp3_ = _tmp4_;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            ValaLocalVariable* _tmp5_ = NULL;
            ValaLocalVariable* temp_var;
            const gchar* _tmp6_ = NULL;
            ValaCCodeExpression* _tmp7_ = NULL;
            ValaCCodeExpression* name_cnode;
            gint i;
            ValaInitializerList* _tmp8_ = NULL;
            gint _tmp9_;
            _tmp5_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, (ValaDataType*) array_type, TRUE, (ValaCodeNode*) expr, TRUE);
            temp_var = _tmp5_;
            _tmp6_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
            _tmp7_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp6_);
            name_cnode = _tmp7_;
            i = 0;
            vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, temp_var, FALSE);
            _tmp8_ = vala_array_creation_expression_get_initializer_list (expr);
            _tmp9_ = vala_array_creation_expression_get_rank (expr);
            vala_ccode_array_module_append_initializer_list (self, name_cnode, _tmp8_, _tmp9_, &i);
            vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, name_cnode);
            _vala_ccode_node_unref0 (name_cnode);
            _vala_code_node_unref0 (temp_var);
            _vala_code_node_unref0 (array_type);
            return;
      }
      _tmp10_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
      _tmp11_ = vala_code_context_get_profile (_tmp10_);
      if (_tmp11_ == VALA_PROFILE_POSIX) {
            ValaCCodeIdentifier* _tmp12_ = NULL;
            ValaCCodeIdentifier* _tmp13_;
            ValaCCodeFunctionCall* _tmp14_ = NULL;
            vala_ccode_file_add_include (((ValaCCodeBaseModule*) self)->cfile, "stdlib.h", FALSE);
            _tmp12_ = vala_ccode_identifier_new ("calloc");
            _tmp13_ = _tmp12_;
            _tmp14_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp13_);
            _vala_ccode_node_unref0 (gnew);
            gnew = _tmp14_;
            _vala_ccode_node_unref0 (_tmp13_);
      } else {
            ValaCCodeIdentifier* _tmp15_ = NULL;
            ValaCCodeIdentifier* _tmp16_;
            ValaCCodeFunctionCall* _tmp17_ = NULL;
            ValaDataType* _tmp18_ = NULL;
            gchar* _tmp19_ = NULL;
            gchar* _tmp20_;
            ValaCCodeIdentifier* _tmp21_ = NULL;
            ValaCCodeIdentifier* _tmp22_;
            _tmp15_ = vala_ccode_identifier_new ("g_new0");
            _tmp16_ = _tmp15_;
            _tmp17_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp16_);
            _vala_ccode_node_unref0 (gnew);
            gnew = _tmp17_;
            _vala_ccode_node_unref0 (_tmp16_);
            _tmp18_ = vala_array_creation_expression_get_element_type (expr);
            _tmp19_ = vala_data_type_get_cname (_tmp18_);
            _tmp20_ = _tmp19_;
            _tmp21_ = vala_ccode_identifier_new (_tmp20_);
            _tmp22_ = _tmp21_;
            vala_ccode_function_call_add_argument (gnew, (ValaCCodeExpression*) _tmp22_);
            _vala_ccode_node_unref0 (_tmp22_);
            _g_free0 (_tmp20_);
      }
      first = TRUE;
      cexpr = NULL;
      {
            ValaList* _tmp23_ = NULL;
            ValaList* _size_list;
            gint _tmp24_;
            gint _size_size;
            gint _size_index;
            _tmp23_ = vala_array_creation_expression_get_sizes (expr);
            _size_list = _tmp23_;
            _tmp24_ = vala_collection_get_size ((ValaCollection*) _size_list);
            _size_size = _tmp24_;
            _size_index = -1;
            while (TRUE) {
                  gpointer _tmp25_ = NULL;
                  ValaExpression* size;
                  ValaCCodeExpression* _tmp26_ = NULL;
                  ValaCCodeExpression* csize;
                  gboolean _tmp27_;
                  _size_index = _size_index + 1;
                  if (!(_size_index < _size_size)) {
                        break;
                  }
                  _tmp25_ = vala_list_get (_size_list, _size_index);
                  size = (ValaExpression*) _tmp25_;
                  _tmp26_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, size);
                  csize = _tmp26_;
                  _tmp27_ = vala_ccode_base_module_is_pure_ccode_expression ((ValaCCodeBaseModule*) self, csize);
                  if (!_tmp27_) {
                        ValaLocalVariable* _tmp28_ = NULL;
                        ValaLocalVariable* temp_var;
                        const gchar* _tmp29_ = NULL;
                        ValaCCodeExpression* _tmp30_ = NULL;
                        ValaCCodeExpression* name_cnode;
                        ValaCCodeAssignment* _tmp31_ = NULL;
                        _tmp28_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, ((ValaCCodeBaseModule*) self)->int_type, FALSE, (ValaCodeNode*) expr, TRUE);
                        temp_var = _tmp28_;
                        _tmp29_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
                        _tmp30_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp29_);
                        name_cnode = _tmp30_;
                        vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, size, name_cnode);
                        vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, temp_var, FALSE);
                        _tmp31_ = vala_ccode_assignment_new (name_cnode, csize, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                        _vala_ccode_node_unref0 (csize);
                        csize = (ValaCCodeExpression*) _tmp31_;
                        vala_ccode_base_module_append_array_length ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, name_cnode);
                        _vala_ccode_node_unref0 (name_cnode);
                        _vala_code_node_unref0 (temp_var);
                  } else {
                        vala_ccode_base_module_append_array_length ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, csize);
                  }
                  if (first) {
                        ValaCCodeExpression* _tmp32_;
                        _tmp32_ = _vala_ccode_node_ref0 (csize);
                        _vala_ccode_node_unref0 (cexpr);
                        cexpr = _tmp32_;
                        first = FALSE;
                  } else {
                        ValaCCodeBinaryExpression* _tmp33_ = NULL;
                        _tmp33_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, cexpr, csize);
                        _vala_ccode_node_unref0 (cexpr);
                        cexpr = (ValaCCodeExpression*) _tmp33_;
                  }
                  _vala_ccode_node_unref0 (csize);
                  _vala_code_node_unref0 (size);
            }
            _vala_iterable_unref0 (_size_list);
      }
      _tmp35_ = vala_array_creation_expression_get_element_type (expr);
      _tmp36_ = vala_data_type_get_data_type (_tmp35_);
      if (_tmp36_ != NULL) {
            ValaDataType* _tmp37_ = NULL;
            ValaTypeSymbol* _tmp38_ = NULL;
            gboolean _tmp39_;
            _tmp37_ = vala_array_creation_expression_get_element_type (expr);
            _tmp38_ = vala_data_type_get_data_type (_tmp37_);
            _tmp39_ = vala_typesymbol_is_reference_type (_tmp38_);
            _tmp34_ = _tmp39_;
      } else {
            _tmp34_ = FALSE;
      }
      if (_tmp34_) {
            ValaCCodeConstant* _tmp40_ = NULL;
            ValaCCodeConstant* _tmp41_;
            ValaCCodeBinaryExpression* _tmp42_ = NULL;
            _tmp40_ = vala_ccode_constant_new ("1");
            _tmp41_ = _tmp40_;
            _tmp42_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, cexpr, (ValaCCodeExpression*) _tmp41_);
            _vala_ccode_node_unref0 (cexpr);
            cexpr = (ValaCCodeExpression*) _tmp42_;
            _vala_ccode_node_unref0 (_tmp41_);
      }
      vala_ccode_function_call_add_argument (gnew, cexpr);
      _tmp43_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
      _tmp44_ = vala_code_context_get_profile (_tmp43_);
      if (_tmp44_ == VALA_PROFILE_POSIX) {
            ValaCCodeIdentifier* _tmp45_ = NULL;
            ValaCCodeIdentifier* _tmp46_;
            ValaCCodeFunctionCall* _tmp47_ = NULL;
            ValaCCodeFunctionCall* _tmp48_;
            ValaCCodeFunctionCall* csizeof;
            ValaDataType* _tmp49_ = NULL;
            gchar* _tmp50_ = NULL;
            gchar* _tmp51_;
            ValaCCodeIdentifier* _tmp52_ = NULL;
            ValaCCodeIdentifier* _tmp53_;
            _tmp45_ = vala_ccode_identifier_new ("sizeof");
            _tmp46_ = _tmp45_;
            _tmp47_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp46_);
            _tmp48_ = _tmp47_;
            _vala_ccode_node_unref0 (_tmp46_);
            csizeof = _tmp48_;
            _tmp49_ = vala_array_creation_expression_get_element_type (expr);
            _tmp50_ = vala_data_type_get_cname (_tmp49_);
            _tmp51_ = _tmp50_;
            _tmp52_ = vala_ccode_identifier_new (_tmp51_);
            _tmp53_ = _tmp52_;
            vala_ccode_function_call_add_argument (csizeof, (ValaCCodeExpression*) _tmp53_);
            _vala_ccode_node_unref0 (_tmp53_);
            _g_free0 (_tmp51_);
            vala_ccode_function_call_add_argument (gnew, (ValaCCodeExpression*) csizeof);
            _vala_ccode_node_unref0 (csizeof);
      }
      _tmp54_ = vala_expression_get_value_type ((ValaExpression*) expr);
      _tmp55_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, _tmp54_, TRUE, (ValaCodeNode*) expr, TRUE);
      temp_var = _tmp55_;
      _tmp56_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
      _tmp57_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp56_);
      name_cnode = _tmp57_;
      i = 0;
      vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, temp_var, FALSE);
      _tmp58_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_assignment (_tmp58_, name_cnode, (ValaCCodeExpression*) gnew);
      _tmp59_ = vala_array_creation_expression_get_initializer_list (expr);
      if (_tmp59_ != NULL) {
            ValaInitializerList* _tmp60_ = NULL;
            gint _tmp61_;
            _tmp60_ = vala_array_creation_expression_get_initializer_list (expr);
            _tmp61_ = vala_array_creation_expression_get_rank (expr);
            vala_ccode_array_module_append_initializer_list (self, name_cnode, _tmp60_, _tmp61_, &i);
      }
      vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, name_cnode);
      _vala_ccode_node_unref0 (name_cnode);
      _vala_code_node_unref0 (temp_var);
      _vala_ccode_node_unref0 (cexpr);
      _vala_ccode_node_unref0 (gnew);
      _vala_code_node_unref0 (array_type);
}


static gchar* vala_ccode_array_module_real_get_array_length_cname (ValaCCodeBaseModule* base, const gchar* array_cname, gint dim) {
      ValaCCodeArrayModule * self;
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (array_cname != NULL, NULL);
      _tmp0_ = g_strdup_printf ("%s_length%d", array_cname, dim);
      result = _tmp0_;
      return result;
}


static gchar* vala_ccode_array_module_real_get_parameter_array_length_cname (ValaCCodeBaseModule* base, ValaParameter* param, gint dim) {
      ValaCCodeArrayModule * self;
      gchar* result = NULL;
      gboolean _tmp0_;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (param != NULL, NULL);
      _tmp0_ = vala_variable_get_has_array_length_cname ((ValaVariable*) param);
      if (_tmp0_) {
            gchar* _tmp1_ = NULL;
            _tmp1_ = vala_variable_get_array_length_cname ((ValaVariable*) param);
            result = _tmp1_;
            return result;
      } else {
            const gchar* _tmp2_ = NULL;
            gchar* _tmp3_ = NULL;
            gchar* _tmp4_;
            gchar* _tmp5_ = NULL;
            gchar* _tmp6_;
            _tmp2_ = vala_symbol_get_name ((ValaSymbol*) param);
            _tmp3_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp2_);
            _tmp4_ = _tmp3_;
            _tmp5_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp4_, dim);
            _tmp6_ = _tmp5_;
            _g_free0 (_tmp4_);
            result = _tmp6_;
            return result;
      }
}


static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cexpression (ValaCCodeBaseModule* base, ValaExpression* array_expr, gint dim) {
      ValaCCodeArrayModule * self;
      ValaCCodeExpression* result = NULL;
      ValaTargetValue* _tmp0_ = NULL;
      ValaCCodeExpression* _tmp1_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (array_expr != NULL, NULL);
      _tmp0_ = vala_expression_get_target_value (array_expr);
      _tmp1_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp0_, dim);
      result = _tmp1_;
      return result;
}


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


static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cvalue (ValaCCodeBaseModule* base, ValaTargetValue* value, gint dim) {
      ValaCCodeArrayModule * self;
      ValaCCodeExpression* result = NULL;
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp1_;
      ValaArrayType* _tmp2_;
      ValaArrayType* array_type;
      gboolean _tmp3_ = FALSE;
      ValaList* _tmp18_;
      ValaList* size;
      gboolean _tmp19_ = FALSE;
      gpointer _tmp21_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (value != NULL, NULL);
      _tmp0_ = vala_target_value_get_value_type (value);
      _tmp1_ = _tmp0_;
      _tmp2_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp1_) ? ((ValaArrayType*) _tmp1_) : NULL);
      array_type = _tmp2_;
      if (array_type != NULL) {
            gboolean _tmp4_;
            _tmp4_ = vala_array_type_get_fixed_length (array_type);
            _tmp3_ = _tmp4_;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            gint _tmp5_;
            gchar* _tmp6_ = NULL;
            gchar* _tmp7_;
            ValaCCodeConstant* _tmp8_ = NULL;
            ValaCCodeExpression* _tmp9_;
            _tmp5_ = vala_array_type_get_length (array_type);
            _tmp6_ = g_strdup_printf ("%i", _tmp5_);
            _tmp7_ = _tmp6_;
            _tmp8_ = vala_ccode_constant_new (_tmp7_);
            _tmp9_ = (ValaCCodeExpression*) _tmp8_;
            _g_free0 (_tmp7_);
            result = _tmp9_;
            _vala_code_node_unref0 (array_type);
            return result;
      }
      if (dim == (-1)) {
            gboolean _tmp10_ = FALSE;
            if (array_type != NULL) {
                  gint _tmp11_;
                  _tmp11_ = vala_array_type_get_rank (array_type);
                  _tmp10_ = _tmp11_ > 1;
            } else {
                  _tmp10_ = FALSE;
            }
            if (_tmp10_) {
                  ValaCCodeExpression* _tmp12_ = NULL;
                  ValaCCodeExpression* cexpr;
                  _tmp12_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, value, 1);
                  cexpr = _tmp12_;
                  {
                        gboolean _tmp13_;
                        dim = 2;
                        _tmp13_ = TRUE;
                        while (TRUE) {
                              gint _tmp14_;
                              ValaCCodeExpression* _tmp15_ = NULL;
                              ValaCCodeExpression* _tmp16_;
                              ValaCCodeBinaryExpression* _tmp17_ = NULL;
                              if (!_tmp13_) {
                                    dim++;
                              }
                              _tmp13_ = FALSE;
                              _tmp14_ = vala_array_type_get_rank (array_type);
                              if (!(dim <= _tmp14_)) {
                                    break;
                              }
                              _tmp15_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, value, dim);
                              _tmp16_ = _tmp15_;
                              _tmp17_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, cexpr, _tmp16_);
                              _vala_ccode_node_unref0 (cexpr);
                              cexpr = (ValaCCodeExpression*) _tmp17_;
                              _vala_ccode_node_unref0 (_tmp16_);
                        }
                  }
                  result = cexpr;
                  _vala_code_node_unref0 (array_type);
                  return result;
            } else {
                  dim = 1;
            }
      }
      _tmp18_ = _vala_iterable_ref0 (VALA_GLIB_VALUE (value)->array_length_cvalues);
      size = _tmp18_;
      if (size != NULL) {
            gint _tmp20_;
            _tmp20_ = vala_collection_get_size ((ValaCollection*) size);
            _tmp19_ = _tmp20_ >= dim;
      } else {
            _tmp19_ = FALSE;
      }
      g_assert (_tmp19_);
      _tmp21_ = vala_list_get (size, dim - 1);
      result = (ValaCCodeExpression*) _tmp21_;
      _vala_iterable_unref0 (size);
      _vala_code_node_unref0 (array_type);
      return result;
}


static gchar* vala_ccode_array_module_real_get_array_size_cname (ValaCCodeBaseModule* base, const gchar* array_cname) {
      ValaCCodeArrayModule * self;
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (array_cname != NULL, NULL);
      _tmp0_ = g_strdup_printf ("_%s_size_", array_cname);
      result = _tmp0_;
      return result;
}


static void vala_ccode_array_module_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr) {
      ValaCCodeArrayModule * self;
      ValaList* _tmp0_ = NULL;
      ValaList* indices;
      gint _tmp1_;
      gint rank;
      ValaExpression* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_ = NULL;
      ValaCCodeExpression* ccontainer;
      gpointer _tmp4_ = NULL;
      ValaExpression* _tmp5_;
      ValaCCodeExpression* _tmp6_ = NULL;
      ValaCCodeExpression* _tmp7_;
      ValaCCodeExpression* cindex;
      ValaExpression* _tmp8_ = NULL;
      ValaSymbol* _tmp9_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_element_access_get_indices (expr);
      indices = _tmp0_;
      _tmp1_ = vala_collection_get_size ((ValaCollection*) indices);
      rank = _tmp1_;
      _tmp2_ = vala_element_access_get_container (expr);
      _tmp3_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp2_);
      ccontainer = _tmp3_;
      _tmp4_ = vala_list_get (indices, 0);
      _tmp5_ = (ValaExpression*) _tmp4_;
      _tmp6_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp5_);
      _tmp7_ = _tmp6_;
      _vala_code_node_unref0 (_tmp5_);
      cindex = _tmp7_;
      _tmp8_ = vala_element_access_get_container (expr);
      _tmp9_ = vala_expression_get_symbol_reference (_tmp8_);
      if (VALA_IS_ARRAY_LENGTH_FIELD (_tmp9_)) {
            gpointer _tmp10_ = NULL;
            ValaExpression* _tmp11_;
            ValaIntegerLiteral* lit;
            ValaExpression* _tmp12_ = NULL;
            ValaExpression* _tmp13_;
            ValaMemberAccess* _tmp14_;
            ValaMemberAccess* memberaccess;
            gboolean _tmp15_ = FALSE;
            _tmp10_ = vala_list_get (indices, 0);
            _tmp11_ = (ValaExpression*) _tmp10_;
            lit = VALA_IS_INTEGER_LITERAL (_tmp11_) ? ((ValaIntegerLiteral*) _tmp11_) : NULL;
            _tmp12_ = vala_element_access_get_container (expr);
            _tmp13_ = _tmp12_;
            _tmp14_ = _vala_code_node_ref0 (VALA_IS_MEMBER_ACCESS (_tmp13_) ? ((ValaMemberAccess*) _tmp13_) : NULL);
            memberaccess = _tmp14_;
            if (lit != NULL) {
                  _tmp15_ = memberaccess != NULL;
            } else {
                  _tmp15_ = FALSE;
            }
            if (_tmp15_) {
                  const gchar* _tmp16_ = NULL;
                  gint _tmp17_;
                  gint dim;
                  ValaExpression* _tmp18_ = NULL;
                  ValaCCodeExpression* _tmp19_ = NULL;
                  ValaCCodeExpression* _tmp20_;
                  _tmp16_ = vala_integer_literal_get_value (lit);
                  _tmp17_ = atoi (_tmp16_);
                  dim = _tmp17_;
                  _tmp18_ = vala_member_access_get_inner (memberaccess);
                  _tmp19_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp18_, dim + 1);
                  _tmp20_ = _tmp19_;
                  vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, _tmp20_);
                  _vala_ccode_node_unref0 (_tmp20_);
            } else {
                  ValaSourceReference* _tmp21_ = NULL;
                  _tmp21_ = vala_code_node_get_source_reference ((ValaCodeNode*) expr);
                  vala_report_error (_tmp21_, "only integer literals supported as index");
            }
            _vala_code_node_unref0 (memberaccess);
            _vala_code_node_unref0 (lit);
      } else {
            ValaCCodeElementAccess* _tmp33_ = NULL;
            ValaCCodeElementAccess* _tmp34_;
            {
                  gint i;
                  i = 1;
                  {
                        gboolean _tmp22_;
                        _tmp22_ = TRUE;
                        while (TRUE) {
                              ValaExpression* _tmp23_ = NULL;
                              ValaCCodeExpression* _tmp24_ = NULL;
                              ValaCCodeExpression* _tmp25_;
                              ValaCCodeBinaryExpression* _tmp26_ = NULL;
                              ValaCCodeBinaryExpression* _tmp27_;
                              ValaCCodeBinaryExpression* cmul;
                              gpointer _tmp28_ = NULL;
                              ValaExpression* _tmp29_;
                              ValaCCodeExpression* _tmp30_ = NULL;
                              ValaCCodeExpression* _tmp31_;
                              ValaCCodeBinaryExpression* _tmp32_ = NULL;
                              if (!_tmp22_) {
                                    i++;
                              }
                              _tmp22_ = FALSE;
                              if (!(i < rank)) {
                                    break;
                              }
                              _tmp23_ = vala_element_access_get_container (expr);
                              _tmp24_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp23_, i + 1);
                              _tmp25_ = _tmp24_;
                              _tmp26_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, cindex, _tmp25_);
                              _tmp27_ = _tmp26_;
                              _vala_ccode_node_unref0 (_tmp25_);
                              cmul = _tmp27_;
                              _tmp28_ = vala_list_get (indices, i);
                              _tmp29_ = (ValaExpression*) _tmp28_;
                              _tmp30_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp29_);
                              _tmp31_ = _tmp30_;
                              _tmp32_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) cmul, _tmp31_);
                              _vala_ccode_node_unref0 (cindex);
                              cindex = (ValaCCodeExpression*) _tmp32_;
                              _vala_ccode_node_unref0 (_tmp31_);
                              _vala_code_node_unref0 (_tmp29_);
                              _vala_ccode_node_unref0 (cmul);
                        }
                  }
            }
            _tmp33_ = vala_ccode_element_access_new (ccontainer, cindex);
            _tmp34_ = _tmp33_;
            vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp34_);
            _vala_ccode_node_unref0 (_tmp34_);
      }
      _vala_ccode_node_unref0 (cindex);
      _vala_ccode_node_unref0 (ccontainer);
      _vala_iterable_unref0 (indices);
}


static void vala_ccode_array_module_real_visit_slice_expression (ValaCodeVisitor* base, ValaSliceExpression* expr) {
      ValaCCodeArrayModule * self;
      ValaExpression* _tmp0_ = NULL;
      ValaCCodeExpression* _tmp1_ = NULL;
      ValaCCodeExpression* ccontainer;
      ValaExpression* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_ = NULL;
      ValaCCodeExpression* cstart;
      ValaExpression* _tmp4_ = NULL;
      ValaCCodeExpression* _tmp5_ = NULL;
      ValaCCodeExpression* cstop;
      ValaCCodeBinaryExpression* _tmp6_ = NULL;
      ValaCCodeBinaryExpression* cstartpointer;
      ValaCCodeBinaryExpression* _tmp7_ = NULL;
      ValaCCodeBinaryExpression* splicelen;
      self = (ValaCCodeArrayModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_slice_expression_get_container (expr);
      _tmp1_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp0_);
      ccontainer = _tmp1_;
      _tmp2_ = vala_slice_expression_get_start (expr);
      _tmp3_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp2_);
      cstart = _tmp3_;
      _tmp4_ = vala_slice_expression_get_stop (expr);
      _tmp5_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp4_);
      cstop = _tmp5_;
      _tmp6_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, ccontainer, cstart);
      cstartpointer = _tmp6_;
      _tmp7_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, cstop, cstart);
      splicelen = _tmp7_;
      vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, (ValaCCodeExpression*) cstartpointer);
      vala_ccode_base_module_append_array_length ((ValaCCodeBaseModule*) self, (ValaExpression*) expr, (ValaCCodeExpression*) splicelen);
      _vala_ccode_node_unref0 (splicelen);
      _vala_ccode_node_unref0 (cstartpointer);
      _vala_ccode_node_unref0 (cstop);
      _vala_ccode_node_unref0 (cstart);
      _vala_ccode_node_unref0 (ccontainer);
}


static void vala_ccode_array_module_append_struct_array_free_loop (ValaCCodeArrayModule* self, ValaStruct* st) {
      ValaCCodeIdentifier* _tmp0_ = NULL;
      ValaCCodeIdentifier* _tmp1_;
      ValaCCodeConstant* _tmp2_ = NULL;
      ValaCCodeConstant* _tmp3_;
      ValaCCodeAssignment* _tmp4_ = NULL;
      ValaCCodeAssignment* _tmp5_;
      ValaCCodeAssignment* cforinit;
      ValaCCodeIdentifier* _tmp6_ = NULL;
      ValaCCodeIdentifier* _tmp7_;
      ValaCCodeIdentifier* _tmp8_ = NULL;
      ValaCCodeIdentifier* _tmp9_;
      ValaCCodeBinaryExpression* _tmp10_ = NULL;
      ValaCCodeBinaryExpression* _tmp11_;
      ValaCCodeBinaryExpression* cforcond;
      ValaCCodeIdentifier* _tmp12_ = NULL;
      ValaCCodeIdentifier* _tmp13_;
      ValaCCodeIdentifier* _tmp14_ = NULL;
      ValaCCodeIdentifier* _tmp15_;
      ValaCCodeConstant* _tmp16_ = NULL;
      ValaCCodeConstant* _tmp17_;
      ValaCCodeBinaryExpression* _tmp18_ = NULL;
      ValaCCodeBinaryExpression* _tmp19_;
      ValaCCodeAssignment* _tmp20_ = NULL;
      ValaCCodeAssignment* _tmp21_;
      ValaCCodeAssignment* cforiter;
      ValaCCodeFunction* _tmp22_ = NULL;
      ValaCCodeIdentifier* _tmp23_ = NULL;
      ValaCCodeIdentifier* cptrarray;
      ValaCCodeIdentifier* _tmp24_ = NULL;
      ValaCCodeIdentifier* _tmp25_;
      ValaCCodeElementAccess* _tmp26_ = NULL;
      ValaCCodeElementAccess* _tmp27_;
      ValaCCodeElementAccess* cea;
      ValaStructValueType* _tmp28_ = NULL;
      ValaStructValueType* _tmp29_;
      ValaCCodeExpression* _tmp30_ = NULL;
      ValaCCodeExpression* _tmp31_;
      ValaCCodeFunctionCall* _tmp32_ = NULL;
      ValaCCodeFunctionCall* _tmp33_;
      ValaCCodeFunctionCall* cfreecall;
      ValaCCodeUnaryExpression* _tmp34_ = NULL;
      ValaCCodeUnaryExpression* _tmp35_;
      ValaCCodeFunction* _tmp36_ = NULL;
      ValaCCodeFunction* _tmp37_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (st != NULL);
      _tmp0_ = vala_ccode_identifier_new ("i");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_ccode_constant_new ("0");
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp1_, (ValaCCodeExpression*) _tmp3_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp5_ = _tmp4_;
      _vala_ccode_node_unref0 (_tmp3_);
      _vala_ccode_node_unref0 (_tmp1_);
      cforinit = _tmp5_;
      _tmp6_ = vala_ccode_identifier_new ("i");
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_ccode_identifier_new ("array_length");
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp7_, (ValaCCodeExpression*) _tmp9_);
      _tmp11_ = _tmp10_;
      _vala_ccode_node_unref0 (_tmp9_);
      _vala_ccode_node_unref0 (_tmp7_);
      cforcond = _tmp11_;
      _tmp12_ = vala_ccode_identifier_new ("i");
      _tmp13_ = _tmp12_;
      _tmp14_ = vala_ccode_identifier_new ("i");
      _tmp15_ = _tmp14_;
      _tmp16_ = vala_ccode_constant_new ("1");
      _tmp17_ = _tmp16_;
      _tmp18_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp15_, (ValaCCodeExpression*) _tmp17_);
      _tmp19_ = _tmp18_;
      _tmp20_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp13_, (ValaCCodeExpression*) _tmp19_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp21_ = _tmp20_;
      _vala_ccode_node_unref0 (_tmp19_);
      _vala_ccode_node_unref0 (_tmp17_);
      _vala_ccode_node_unref0 (_tmp15_);
      _vala_ccode_node_unref0 (_tmp13_);
      cforiter = _tmp21_;
      _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_for (_tmp22_, (ValaCCodeExpression*) cforinit, (ValaCCodeExpression*) cforcond, (ValaCCodeExpression*) cforiter);
      _tmp23_ = vala_ccode_identifier_new ("array");
      cptrarray = _tmp23_;
      _tmp24_ = vala_ccode_identifier_new ("i");
      _tmp25_ = _tmp24_;
      _tmp26_ = vala_ccode_element_access_new ((ValaCCodeExpression*) cptrarray, (ValaCCodeExpression*) _tmp25_);
      _tmp27_ = _tmp26_;
      _vala_ccode_node_unref0 (_tmp25_);
      cea = _tmp27_;
      _tmp28_ = vala_struct_value_type_new (st);
      _tmp29_ = _tmp28_;
      _tmp30_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp29_, FALSE);
      _tmp31_ = _tmp30_;
      _tmp32_ = vala_ccode_function_call_new (_tmp31_);
      _tmp33_ = _tmp32_;
      _vala_ccode_node_unref0 (_tmp31_);
      _vala_code_node_unref0 (_tmp29_);
      cfreecall = _tmp33_;
      _tmp34_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) cea);
      _tmp35_ = _tmp34_;
      vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) _tmp35_);
      _vala_ccode_node_unref0 (_tmp35_);
      _tmp36_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp36_, (ValaCCodeExpression*) cfreecall);
      _tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp37_);
      _vala_ccode_node_unref0 (cfreecall);
      _vala_ccode_node_unref0 (cea);
      _vala_ccode_node_unref0 (cptrarray);
      _vala_ccode_node_unref0 (cforiter);
      _vala_ccode_node_unref0 (cforcond);
      _vala_ccode_node_unref0 (cforinit);
}


static gchar* vala_ccode_array_module_real_append_struct_array_free (ValaCCodeBaseModule* base, ValaStruct* st) {
      ValaCCodeArrayModule * self;
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* cname;
      gboolean _tmp4_;
      ValaCCodeFunction* _tmp5_ = NULL;
      ValaCCodeFunction* fun;
      gchar* _tmp6_ = NULL;
      gchar* _tmp7_;
      gchar* _tmp8_ = NULL;
      gchar* _tmp9_;
      ValaCCodeParameter* _tmp10_ = NULL;
      ValaCCodeParameter* _tmp11_;
      ValaCCodeParameter* _tmp12_ = NULL;
      ValaCCodeParameter* _tmp13_;
      ValaCCodeIdentifier* _tmp14_ = NULL;
      ValaCCodeIdentifier* _tmp15_;
      ValaCCodeConstant* _tmp16_ = NULL;
      ValaCCodeConstant* _tmp17_;
      ValaCCodeBinaryExpression* _tmp18_ = NULL;
      ValaCCodeBinaryExpression* _tmp19_;
      ValaCCodeBinaryExpression* ccondarr;
      ValaCCodeFunction* _tmp20_ = NULL;
      ValaCCodeFunction* _tmp21_ = NULL;
      ValaCCodeVariableDeclarator* _tmp22_ = NULL;
      ValaCCodeVariableDeclarator* _tmp23_;
      ValaCCodeFunction* _tmp24_ = NULL;
      ValaCCodeIdentifier* _tmp25_ = NULL;
      ValaCCodeIdentifier* _tmp26_;
      ValaCCodeFunctionCall* _tmp27_ = NULL;
      ValaCCodeFunctionCall* _tmp28_;
      ValaCCodeFunctionCall* carrfree;
      ValaCCodeIdentifier* _tmp29_ = NULL;
      ValaCCodeIdentifier* _tmp30_;
      ValaCCodeFunction* _tmp31_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (st != NULL, NULL);
      _tmp0_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE);
      _tmp1_ = _tmp0_;
      _tmp2_ = g_strdup_printf ("_vala_%s_array_free", _tmp1_);
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      cname = _tmp3_;
      _tmp4_ = vala_ccode_file_add_declaration (((ValaCCodeBaseModule*) self)->cfile, cname);
      if (_tmp4_) {
            result = cname;
            return result;
      }
      _tmp5_ = vala_ccode_function_new (cname, "void");
      fun = _tmp5_;
      vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC);
      _tmp6_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE);
      _tmp7_ = _tmp6_;
      _tmp8_ = g_strdup_printf ("%s*", _tmp7_);
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_parameter_new ("array", _tmp9_);
      _tmp11_ = _tmp10_;
      vala_ccode_function_add_parameter (fun, _tmp11_);
      _vala_ccode_node_unref0 (_tmp11_);
      _g_free0 (_tmp9_);
      _g_free0 (_tmp7_);
      _tmp12_ = vala_ccode_parameter_new ("array_length", "gint");
      _tmp13_ = _tmp12_;
      vala_ccode_function_add_parameter (fun, _tmp13_);
      _vala_ccode_node_unref0 (_tmp13_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
      _tmp14_ = vala_ccode_identifier_new ("array");
      _tmp15_ = _tmp14_;
      _tmp16_ = vala_ccode_constant_new ("NULL");
      _tmp17_ = _tmp16_;
      _tmp18_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp15_, (ValaCCodeExpression*) _tmp17_);
      _tmp19_ = _tmp18_;
      _vala_ccode_node_unref0 (_tmp17_);
      _vala_ccode_node_unref0 (_tmp15_);
      ccondarr = _tmp19_;
      _tmp20_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_if (_tmp20_, (ValaCCodeExpression*) ccondarr);
      _tmp21_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp22_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
      _tmp23_ = _tmp22_;
      vala_ccode_function_add_declaration (_tmp21_, "int", (ValaCCodeDeclarator*) _tmp23_, 0);
      _vala_ccode_node_unref0 (_tmp23_);
      vala_ccode_array_module_append_struct_array_free_loop (self, st);
      _tmp24_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp24_);
      _tmp25_ = vala_ccode_identifier_new ("g_free");
      _tmp26_ = _tmp25_;
      _tmp27_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp26_);
      _tmp28_ = _tmp27_;
      _vala_ccode_node_unref0 (_tmp26_);
      carrfree = _tmp28_;
      _tmp29_ = vala_ccode_identifier_new ("array");
      _tmp30_ = _tmp29_;
      vala_ccode_function_call_add_argument (carrfree, (ValaCCodeExpression*) _tmp30_);
      _vala_ccode_node_unref0 (_tmp30_);
      _tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp31_, (ValaCCodeExpression*) carrfree);
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, fun);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, fun);
      result = cname;
      _vala_ccode_node_unref0 (carrfree);
      _vala_ccode_node_unref0 (ccondarr);
      _vala_ccode_node_unref0 (fun);
      return result;
}


static void vala_ccode_array_module_append_vala_array_free_loop (ValaCCodeArrayModule* self) {
      ValaCCodeIdentifier* _tmp0_ = NULL;
      ValaCCodeIdentifier* _tmp1_;
      ValaCCodeConstant* _tmp2_ = NULL;
      ValaCCodeConstant* _tmp3_;
      ValaCCodeAssignment* _tmp4_ = NULL;
      ValaCCodeAssignment* _tmp5_;
      ValaCCodeAssignment* cforinit;
      ValaCCodeIdentifier* _tmp6_ = NULL;
      ValaCCodeIdentifier* _tmp7_;
      ValaCCodeIdentifier* _tmp8_ = NULL;
      ValaCCodeIdentifier* _tmp9_;
      ValaCCodeBinaryExpression* _tmp10_ = NULL;
      ValaCCodeBinaryExpression* _tmp11_;
      ValaCCodeBinaryExpression* cforcond;
      ValaCCodeIdentifier* _tmp12_ = NULL;
      ValaCCodeIdentifier* _tmp13_;
      ValaCCodeIdentifier* _tmp14_ = NULL;
      ValaCCodeIdentifier* _tmp15_;
      ValaCCodeConstant* _tmp16_ = NULL;
      ValaCCodeConstant* _tmp17_;
      ValaCCodeBinaryExpression* _tmp18_ = NULL;
      ValaCCodeBinaryExpression* _tmp19_;
      ValaCCodeAssignment* _tmp20_ = NULL;
      ValaCCodeAssignment* _tmp21_;
      ValaCCodeAssignment* cforiter;
      ValaCCodeFunction* _tmp22_ = NULL;
      ValaCCodeIdentifier* _tmp23_ = NULL;
      ValaCCodeIdentifier* _tmp24_;
      ValaCCodeCastExpression* _tmp25_ = NULL;
      ValaCCodeCastExpression* _tmp26_;
      ValaCCodeCastExpression* cptrarray;
      ValaCCodeIdentifier* _tmp27_ = NULL;
      ValaCCodeIdentifier* _tmp28_;
      ValaCCodeElementAccess* _tmp29_ = NULL;
      ValaCCodeElementAccess* _tmp30_;
      ValaCCodeElementAccess* cea;
      ValaCCodeConstant* _tmp31_ = NULL;
      ValaCCodeConstant* _tmp32_;
      ValaCCodeBinaryExpression* _tmp33_ = NULL;
      ValaCCodeBinaryExpression* _tmp34_;
      ValaCCodeBinaryExpression* cfreecond;
      ValaCCodeFunction* _tmp35_ = NULL;
      ValaCCodeIdentifier* _tmp36_ = NULL;
      ValaCCodeIdentifier* _tmp37_;
      ValaCCodeFunctionCall* _tmp38_ = NULL;
      ValaCCodeFunctionCall* _tmp39_;
      ValaCCodeFunctionCall* cfreecall;
      ValaCCodeFunction* _tmp40_ = NULL;
      ValaCCodeFunction* _tmp41_ = NULL;
      g_return_if_fail (self != NULL);
      _tmp0_ = vala_ccode_identifier_new ("i");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_ccode_constant_new ("0");
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp1_, (ValaCCodeExpression*) _tmp3_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp5_ = _tmp4_;
      _vala_ccode_node_unref0 (_tmp3_);
      _vala_ccode_node_unref0 (_tmp1_);
      cforinit = _tmp5_;
      _tmp6_ = vala_ccode_identifier_new ("i");
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_ccode_identifier_new ("array_length");
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp7_, (ValaCCodeExpression*) _tmp9_);
      _tmp11_ = _tmp10_;
      _vala_ccode_node_unref0 (_tmp9_);
      _vala_ccode_node_unref0 (_tmp7_);
      cforcond = _tmp11_;
      _tmp12_ = vala_ccode_identifier_new ("i");
      _tmp13_ = _tmp12_;
      _tmp14_ = vala_ccode_identifier_new ("i");
      _tmp15_ = _tmp14_;
      _tmp16_ = vala_ccode_constant_new ("1");
      _tmp17_ = _tmp16_;
      _tmp18_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp15_, (ValaCCodeExpression*) _tmp17_);
      _tmp19_ = _tmp18_;
      _tmp20_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp13_, (ValaCCodeExpression*) _tmp19_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp21_ = _tmp20_;
      _vala_ccode_node_unref0 (_tmp19_);
      _vala_ccode_node_unref0 (_tmp17_);
      _vala_ccode_node_unref0 (_tmp15_);
      _vala_ccode_node_unref0 (_tmp13_);
      cforiter = _tmp21_;
      _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_for (_tmp22_, (ValaCCodeExpression*) cforinit, (ValaCCodeExpression*) cforcond, (ValaCCodeExpression*) cforiter);
      _tmp23_ = vala_ccode_identifier_new ("array");
      _tmp24_ = _tmp23_;
      _tmp25_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp24_, "gpointer*");
      _tmp26_ = _tmp25_;
      _vala_ccode_node_unref0 (_tmp24_);
      cptrarray = _tmp26_;
      _tmp27_ = vala_ccode_identifier_new ("i");
      _tmp28_ = _tmp27_;
      _tmp29_ = vala_ccode_element_access_new ((ValaCCodeExpression*) cptrarray, (ValaCCodeExpression*) _tmp28_);
      _tmp30_ = _tmp29_;
      _vala_ccode_node_unref0 (_tmp28_);
      cea = _tmp30_;
      _tmp31_ = vala_ccode_constant_new ("NULL");
      _tmp32_ = _tmp31_;
      _tmp33_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) cea, (ValaCCodeExpression*) _tmp32_);
      _tmp34_ = _tmp33_;
      _vala_ccode_node_unref0 (_tmp32_);
      cfreecond = _tmp34_;
      _tmp35_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_if (_tmp35_, (ValaCCodeExpression*) cfreecond);
      _tmp36_ = vala_ccode_identifier_new ("destroy_func");
      _tmp37_ = _tmp36_;
      _tmp38_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp37_);
      _tmp39_ = _tmp38_;
      _vala_ccode_node_unref0 (_tmp37_);
      cfreecall = _tmp39_;
      vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) cea);
      _tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp40_, (ValaCCodeExpression*) cfreecall);
      _tmp41_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp41_);
      _vala_ccode_node_unref0 (cfreecall);
      _vala_ccode_node_unref0 (cfreecond);
      _vala_ccode_node_unref0 (cea);
      _vala_ccode_node_unref0 (cptrarray);
      _vala_ccode_node_unref0 (cforiter);
      _vala_ccode_node_unref0 (cforcond);
      _vala_ccode_node_unref0 (cforinit);
}


static void vala_ccode_array_module_real_append_vala_array_free (ValaCCodeBaseModule* base) {
      ValaCCodeArrayModule * self;
      ValaCCodeFunction* _tmp0_ = NULL;
      ValaCCodeFunction* fun;
      ValaCCodeParameter* _tmp1_ = NULL;
      ValaCCodeParameter* _tmp2_;
      ValaCCodeParameter* _tmp3_ = NULL;
      ValaCCodeParameter* _tmp4_;
      ValaCCodeParameter* _tmp5_ = NULL;
      ValaCCodeParameter* _tmp6_;
      ValaCCodeIdentifier* _tmp7_ = NULL;
      ValaCCodeIdentifier* _tmp8_;
      ValaCCodeConstant* _tmp9_ = NULL;
      ValaCCodeConstant* _tmp10_;
      ValaCCodeBinaryExpression* _tmp11_ = NULL;
      ValaCCodeBinaryExpression* _tmp12_;
      ValaCCodeBinaryExpression* ccondarr;
      ValaCCodeIdentifier* _tmp13_ = NULL;
      ValaCCodeIdentifier* _tmp14_;
      ValaCCodeConstant* _tmp15_ = NULL;
      ValaCCodeConstant* _tmp16_;
      ValaCCodeBinaryExpression* _tmp17_ = NULL;
      ValaCCodeBinaryExpression* _tmp18_;
      ValaCCodeBinaryExpression* ccondfunc;
      ValaCCodeFunction* _tmp19_ = NULL;
      ValaCCodeBinaryExpression* _tmp20_ = NULL;
      ValaCCodeBinaryExpression* _tmp21_;
      ValaCCodeFunction* _tmp22_ = NULL;
      ValaCCodeVariableDeclarator* _tmp23_ = NULL;
      ValaCCodeVariableDeclarator* _tmp24_;
      ValaCCodeFunction* _tmp25_ = NULL;
      ValaCCodeFunction* _tmp26_ = NULL;
      ValaCCodeParameter* _tmp27_ = NULL;
      ValaCCodeParameter* _tmp28_;
      ValaCCodeParameter* _tmp29_ = NULL;
      ValaCCodeParameter* _tmp30_;
      ValaCCodeParameter* _tmp31_ = NULL;
      ValaCCodeParameter* _tmp32_;
      ValaCCodeIdentifier* _tmp33_ = NULL;
      ValaCCodeIdentifier* _tmp34_;
      ValaCCodeFunctionCall* _tmp35_ = NULL;
      ValaCCodeFunctionCall* _tmp36_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeIdentifier* _tmp37_ = NULL;
      ValaCCodeIdentifier* _tmp38_;
      ValaCCodeIdentifier* _tmp39_ = NULL;
      ValaCCodeIdentifier* _tmp40_;
      ValaCCodeIdentifier* _tmp41_ = NULL;
      ValaCCodeIdentifier* _tmp42_;
      ValaCCodeFunction* _tmp43_ = NULL;
      ValaCCodeIdentifier* _tmp44_ = NULL;
      ValaCCodeIdentifier* _tmp45_;
      ValaCCodeFunctionCall* _tmp46_ = NULL;
      ValaCCodeFunctionCall* _tmp47_;
      ValaCCodeFunctionCall* carrfree;
      ValaCCodeIdentifier* _tmp48_ = NULL;
      ValaCCodeIdentifier* _tmp49_;
      ValaCCodeFunction* _tmp50_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      _tmp0_ = vala_ccode_function_new ("_vala_array_destroy", "void");
      fun = _tmp0_;
      vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC);
      _tmp1_ = vala_ccode_parameter_new ("array", "gpointer");
      _tmp2_ = _tmp1_;
      vala_ccode_function_add_parameter (fun, _tmp2_);
      _vala_ccode_node_unref0 (_tmp2_);
      _tmp3_ = vala_ccode_parameter_new ("array_length", "gint");
      _tmp4_ = _tmp3_;
      vala_ccode_function_add_parameter (fun, _tmp4_);
      _vala_ccode_node_unref0 (_tmp4_);
      _tmp5_ = vala_ccode_parameter_new ("destroy_func", "GDestroyNotify");
      _tmp6_ = _tmp5_;
      vala_ccode_function_add_parameter (fun, _tmp6_);
      _vala_ccode_node_unref0 (_tmp6_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
      _tmp7_ = vala_ccode_identifier_new ("array");
      _tmp8_ = _tmp7_;
      _tmp9_ = vala_ccode_constant_new ("NULL");
      _tmp10_ = _tmp9_;
      _tmp11_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp8_, (ValaCCodeExpression*) _tmp10_);
      _tmp12_ = _tmp11_;
      _vala_ccode_node_unref0 (_tmp10_);
      _vala_ccode_node_unref0 (_tmp8_);
      ccondarr = _tmp12_;
      _tmp13_ = vala_ccode_identifier_new ("destroy_func");
      _tmp14_ = _tmp13_;
      _tmp15_ = vala_ccode_constant_new ("NULL");
      _tmp16_ = _tmp15_;
      _tmp17_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp14_, (ValaCCodeExpression*) _tmp16_);
      _tmp18_ = _tmp17_;
      _vala_ccode_node_unref0 (_tmp16_);
      _vala_ccode_node_unref0 (_tmp14_);
      ccondfunc = _tmp18_;
      _tmp19_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp20_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) ccondarr, (ValaCCodeExpression*) ccondfunc);
      _tmp21_ = _tmp20_;
      vala_ccode_function_open_if (_tmp19_, (ValaCCodeExpression*) _tmp21_);
      _vala_ccode_node_unref0 (_tmp21_);
      _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp23_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
      _tmp24_ = _tmp23_;
      vala_ccode_function_add_declaration (_tmp22_, "int", (ValaCCodeDeclarator*) _tmp24_, 0);
      _vala_ccode_node_unref0 (_tmp24_);
      vala_ccode_array_module_append_vala_array_free_loop (self);
      _tmp25_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp25_);
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, fun);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, fun);
      _tmp26_ = vala_ccode_function_new ("_vala_array_free", "void");
      _vala_ccode_node_unref0 (fun);
      fun = _tmp26_;
      vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC);
      _tmp27_ = vala_ccode_parameter_new ("array", "gpointer");
      _tmp28_ = _tmp27_;
      vala_ccode_function_add_parameter (fun, _tmp28_);
      _vala_ccode_node_unref0 (_tmp28_);
      _tmp29_ = vala_ccode_parameter_new ("array_length", "gint");
      _tmp30_ = _tmp29_;
      vala_ccode_function_add_parameter (fun, _tmp30_);
      _vala_ccode_node_unref0 (_tmp30_);
      _tmp31_ = vala_ccode_parameter_new ("destroy_func", "GDestroyNotify");
      _tmp32_ = _tmp31_;
      vala_ccode_function_add_parameter (fun, _tmp32_);
      _vala_ccode_node_unref0 (_tmp32_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
      _tmp33_ = vala_ccode_identifier_new ("_vala_array_destroy");
      _tmp34_ = _tmp33_;
      _tmp35_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp34_);
      _tmp36_ = _tmp35_;
      _vala_ccode_node_unref0 (_tmp34_);
      ccall = _tmp36_;
      _tmp37_ = vala_ccode_identifier_new ("array");
      _tmp38_ = _tmp37_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp38_);
      _vala_ccode_node_unref0 (_tmp38_);
      _tmp39_ = vala_ccode_identifier_new ("array_length");
      _tmp40_ = _tmp39_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp40_);
      _vala_ccode_node_unref0 (_tmp40_);
      _tmp41_ = vala_ccode_identifier_new ("destroy_func");
      _tmp42_ = _tmp41_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp42_);
      _vala_ccode_node_unref0 (_tmp42_);
      _tmp43_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp43_, (ValaCCodeExpression*) ccall);
      _tmp44_ = vala_ccode_identifier_new ("g_free");
      _tmp45_ = _tmp44_;
      _tmp46_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp45_);
      _tmp47_ = _tmp46_;
      _vala_ccode_node_unref0 (_tmp45_);
      carrfree = _tmp47_;
      _tmp48_ = vala_ccode_identifier_new ("array");
      _tmp49_ = _tmp48_;
      vala_ccode_function_call_add_argument (carrfree, (ValaCCodeExpression*) _tmp49_);
      _vala_ccode_node_unref0 (_tmp49_);
      _tmp50_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp50_, (ValaCCodeExpression*) carrfree);
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, fun);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, fun);
      _vala_ccode_node_unref0 (carrfree);
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (ccondfunc);
      _vala_ccode_node_unref0 (ccondarr);
      _vala_ccode_node_unref0 (fun);
}


static void vala_ccode_array_module_real_append_vala_array_move (ValaCCodeBaseModule* base) {
      ValaCCodeArrayModule * self;
      ValaCCodeFunction* _tmp0_ = NULL;
      ValaCCodeFunction* fun;
      ValaCCodeParameter* _tmp1_ = NULL;
      ValaCCodeParameter* _tmp2_;
      ValaCCodeParameter* _tmp3_ = NULL;
      ValaCCodeParameter* _tmp4_;
      ValaCCodeParameter* _tmp5_ = NULL;
      ValaCCodeParameter* _tmp6_;
      ValaCCodeParameter* _tmp7_ = NULL;
      ValaCCodeParameter* _tmp8_;
      ValaCCodeParameter* _tmp9_ = NULL;
      ValaCCodeParameter* _tmp10_;
      ValaCCodeIdentifier* _tmp11_ = NULL;
      ValaCCodeIdentifier* _tmp12_;
      ValaCCodeCastExpression* _tmp13_ = NULL;
      ValaCCodeCastExpression* _tmp14_;
      ValaCCodeCastExpression* array;
      ValaCCodeIdentifier* _tmp15_ = NULL;
      ValaCCodeIdentifier* element_size;
      ValaCCodeIdentifier* _tmp16_ = NULL;
      ValaCCodeIdentifier* length;
      ValaCCodeIdentifier* _tmp17_ = NULL;
      ValaCCodeIdentifier* src;
      ValaCCodeIdentifier* _tmp18_ = NULL;
      ValaCCodeIdentifier* dest;
      ValaCCodeBinaryExpression* _tmp19_ = NULL;
      ValaCCodeBinaryExpression* _tmp20_;
      ValaCCodeBinaryExpression* _tmp21_ = NULL;
      ValaCCodeBinaryExpression* _tmp22_;
      ValaCCodeBinaryExpression* src_address;
      ValaCCodeBinaryExpression* _tmp23_ = NULL;
      ValaCCodeBinaryExpression* _tmp24_;
      ValaCCodeBinaryExpression* _tmp25_ = NULL;
      ValaCCodeBinaryExpression* _tmp26_;
      ValaCCodeBinaryExpression* dest_address;
      ValaCCodeBinaryExpression* _tmp27_ = NULL;
      ValaCCodeBinaryExpression* _tmp28_;
      ValaCCodeBinaryExpression* _tmp29_ = NULL;
      ValaCCodeBinaryExpression* _tmp30_;
      ValaCCodeBinaryExpression* _tmp31_ = NULL;
      ValaCCodeBinaryExpression* _tmp32_;
      ValaCCodeBinaryExpression* dest_end_address;
      ValaCCodeIdentifier* _tmp33_ = NULL;
      ValaCCodeIdentifier* _tmp34_;
      ValaCCodeFunctionCall* _tmp35_ = NULL;
      ValaCCodeFunctionCall* _tmp36_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeBinaryExpression* _tmp37_ = NULL;
      ValaCCodeBinaryExpression* _tmp38_;
      ValaCCodeFunction* _tmp39_ = NULL;
      ValaCCodeFunction* _tmp40_ = NULL;
      ValaCCodeBinaryExpression* _tmp41_ = NULL;
      ValaCCodeBinaryExpression* _tmp42_;
      ValaCCodeIdentifier* _tmp43_ = NULL;
      ValaCCodeIdentifier* _tmp44_;
      ValaCCodeFunctionCall* _tmp45_ = NULL;
      ValaCCodeFunctionCall* _tmp46_;
      ValaCCodeFunctionCall* czero1;
      ValaCCodeConstant* _tmp47_ = NULL;
      ValaCCodeConstant* _tmp48_;
      ValaCCodeBinaryExpression* _tmp49_ = NULL;
      ValaCCodeBinaryExpression* _tmp50_;
      ValaCCodeBinaryExpression* _tmp51_ = NULL;
      ValaCCodeBinaryExpression* _tmp52_;
      ValaCCodeFunction* _tmp53_ = NULL;
      ValaCCodeFunction* _tmp54_ = NULL;
      ValaCCodeIdentifier* _tmp55_ = NULL;
      ValaCCodeIdentifier* _tmp56_;
      ValaCCodeFunctionCall* _tmp57_ = NULL;
      ValaCCodeFunctionCall* _tmp58_;
      ValaCCodeFunctionCall* czero2;
      ValaCCodeConstant* _tmp59_ = NULL;
      ValaCCodeConstant* _tmp60_;
      ValaCCodeBinaryExpression* _tmp61_ = NULL;
      ValaCCodeBinaryExpression* _tmp62_;
      ValaCCodeBinaryExpression* _tmp63_ = NULL;
      ValaCCodeBinaryExpression* _tmp64_;
      ValaCCodeFunction* _tmp65_ = NULL;
      ValaCCodeFunction* _tmp66_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      vala_ccode_file_add_include (((ValaCCodeBaseModule*) self)->cfile, "string.h", FALSE);
      _tmp0_ = vala_ccode_function_new ("_vala_array_move", "void");
      fun = _tmp0_;
      vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC);
      _tmp1_ = vala_ccode_parameter_new ("array", "gpointer");
      _tmp2_ = _tmp1_;
      vala_ccode_function_add_parameter (fun, _tmp2_);
      _vala_ccode_node_unref0 (_tmp2_);
      _tmp3_ = vala_ccode_parameter_new ("element_size", "gsize");
      _tmp4_ = _tmp3_;
      vala_ccode_function_add_parameter (fun, _tmp4_);
      _vala_ccode_node_unref0 (_tmp4_);
      _tmp5_ = vala_ccode_parameter_new ("src", "gint");
      _tmp6_ = _tmp5_;
      vala_ccode_function_add_parameter (fun, _tmp6_);
      _vala_ccode_node_unref0 (_tmp6_);
      _tmp7_ = vala_ccode_parameter_new ("dest", "gint");
      _tmp8_ = _tmp7_;
      vala_ccode_function_add_parameter (fun, _tmp8_);
      _vala_ccode_node_unref0 (_tmp8_);
      _tmp9_ = vala_ccode_parameter_new ("length", "gint");
      _tmp10_ = _tmp9_;
      vala_ccode_function_add_parameter (fun, _tmp10_);
      _vala_ccode_node_unref0 (_tmp10_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
      _tmp11_ = vala_ccode_identifier_new ("array");
      _tmp12_ = _tmp11_;
      _tmp13_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp12_, "char*");
      _tmp14_ = _tmp13_;
      _vala_ccode_node_unref0 (_tmp12_);
      array = _tmp14_;
      _tmp15_ = vala_ccode_identifier_new ("element_size");
      element_size = _tmp15_;
      _tmp16_ = vala_ccode_identifier_new ("length");
      length = _tmp16_;
      _tmp17_ = vala_ccode_identifier_new ("src");
      src = _tmp17_;
      _tmp18_ = vala_ccode_identifier_new ("dest");
      dest = _tmp18_;
      _tmp19_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) src, (ValaCCodeExpression*) element_size);
      _tmp20_ = _tmp19_;
      _tmp21_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp20_);
      _tmp22_ = _tmp21_;
      _vala_ccode_node_unref0 (_tmp20_);
      src_address = _tmp22_;
      _tmp23_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) element_size);
      _tmp24_ = _tmp23_;
      _tmp25_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp24_);
      _tmp26_ = _tmp25_;
      _vala_ccode_node_unref0 (_tmp24_);
      dest_address = _tmp26_;
      _tmp27_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) length);
      _tmp28_ = _tmp27_;
      _tmp29_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp28_, (ValaCCodeExpression*) element_size);
      _tmp30_ = _tmp29_;
      _tmp31_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp30_);
      _tmp32_ = _tmp31_;
      _vala_ccode_node_unref0 (_tmp30_);
      _vala_ccode_node_unref0 (_tmp28_);
      dest_end_address = _tmp32_;
      _tmp33_ = vala_ccode_identifier_new ("g_memmove");
      _tmp34_ = _tmp33_;
      _tmp35_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp34_);
      _tmp36_ = _tmp35_;
      _vala_ccode_node_unref0 (_tmp34_);
      ccall = _tmp36_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) dest_address);
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) src_address);
      _tmp37_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) length, (ValaCCodeExpression*) element_size);
      _tmp38_ = _tmp37_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp38_);
      _vala_ccode_node_unref0 (_tmp38_);
      _tmp39_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp39_, (ValaCCodeExpression*) ccall);
      _tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp41_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
      _tmp42_ = _tmp41_;
      vala_ccode_function_open_if (_tmp40_, (ValaCCodeExpression*) _tmp42_);
      _vala_ccode_node_unref0 (_tmp42_);
      _tmp43_ = vala_ccode_identifier_new ("memset");
      _tmp44_ = _tmp43_;
      _tmp45_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp44_);
      _tmp46_ = _tmp45_;
      _vala_ccode_node_unref0 (_tmp44_);
      czero1 = _tmp46_;
      vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) src_address);
      _tmp47_ = vala_ccode_constant_new ("0");
      _tmp48_ = _tmp47_;
      vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp48_);
      _vala_ccode_node_unref0 (_tmp48_);
      _tmp49_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) src);
      _tmp50_ = _tmp49_;
      _tmp51_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp50_, (ValaCCodeExpression*) element_size);
      _tmp52_ = _tmp51_;
      vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp52_);
      _vala_ccode_node_unref0 (_tmp52_);
      _vala_ccode_node_unref0 (_tmp50_);
      _tmp53_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp53_, (ValaCCodeExpression*) czero1);
      _tmp54_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_else (_tmp54_);
      _tmp55_ = vala_ccode_identifier_new ("memset");
      _tmp56_ = _tmp55_;
      _tmp57_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp56_);
      _tmp58_ = _tmp57_;
      _vala_ccode_node_unref0 (_tmp56_);
      czero2 = _tmp58_;
      vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) dest_end_address);
      _tmp59_ = vala_ccode_constant_new ("0");
      _tmp60_ = _tmp59_;
      vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp60_);
      _vala_ccode_node_unref0 (_tmp60_);
      _tmp61_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
      _tmp62_ = _tmp61_;
      _tmp63_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp62_, (ValaCCodeExpression*) element_size);
      _tmp64_ = _tmp63_;
      vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp64_);
      _vala_ccode_node_unref0 (_tmp64_);
      _vala_ccode_node_unref0 (_tmp62_);
      _tmp65_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp65_, (ValaCCodeExpression*) czero2);
      _tmp66_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp66_);
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, fun);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, fun);
      _vala_ccode_node_unref0 (czero2);
      _vala_ccode_node_unref0 (czero1);
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (dest_end_address);
      _vala_ccode_node_unref0 (dest_address);
      _vala_ccode_node_unref0 (src_address);
      _vala_ccode_node_unref0 (dest);
      _vala_ccode_node_unref0 (src);
      _vala_ccode_node_unref0 (length);
      _vala_ccode_node_unref0 (element_size);
      _vala_ccode_node_unref0 (array);
      _vala_ccode_node_unref0 (fun);
}


static void vala_ccode_array_module_real_append_vala_array_length (ValaCCodeBaseModule* base) {
      ValaCCodeArrayModule * self;
      ValaCCodeFunction* _tmp0_ = NULL;
      ValaCCodeFunction* fun;
      ValaCCodeParameter* _tmp1_ = NULL;
      ValaCCodeParameter* _tmp2_;
      ValaCCodeFunction* _tmp3_ = NULL;
      ValaCCodeConstant* _tmp4_ = NULL;
      ValaCCodeConstant* _tmp5_;
      ValaCCodeVariableDeclarator* _tmp6_ = NULL;
      ValaCCodeVariableDeclarator* _tmp7_;
      ValaCCodeIdentifier* _tmp8_ = NULL;
      ValaCCodeIdentifier* array_check;
      ValaCCodeFunction* _tmp9_ = NULL;
      ValaCCodeIdentifier* _tmp10_ = NULL;
      ValaCCodeIdentifier* _tmp11_;
      ValaCCodeCastExpression* _tmp12_ = NULL;
      ValaCCodeCastExpression* _tmp13_;
      ValaCCodeConstant* _tmp14_ = NULL;
      ValaCCodeConstant* _tmp15_;
      ValaCCodeElementAccess* _tmp16_ = NULL;
      ValaCCodeElementAccess* _tmp17_;
      ValaCCodeElementAccess* array_element_check;
      ValaCCodeFunction* _tmp18_ = NULL;
      ValaCCodeFunction* _tmp19_ = NULL;
      ValaCCodeIdentifier* _tmp20_ = NULL;
      ValaCCodeIdentifier* _tmp21_;
      ValaCCodeUnaryExpression* _tmp22_ = NULL;
      ValaCCodeUnaryExpression* _tmp23_;
      ValaCCodeFunction* _tmp24_ = NULL;
      ValaCCodeFunction* _tmp25_ = NULL;
      ValaCCodeFunction* _tmp26_ = NULL;
      ValaCCodeIdentifier* _tmp27_ = NULL;
      ValaCCodeIdentifier* _tmp28_;
      self = (ValaCCodeArrayModule*) base;
      _tmp0_ = vala_ccode_function_new ("_vala_array_length", "gint");
      fun = _tmp0_;
      vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC);
      _tmp1_ = vala_ccode_parameter_new ("array", "gpointer");
      _tmp2_ = _tmp1_;
      vala_ccode_function_add_parameter (fun, _tmp2_);
      _vala_ccode_node_unref0 (_tmp2_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
      _tmp3_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp4_ = vala_ccode_constant_new ("0");
      _tmp5_ = _tmp4_;
      _tmp6_ = vala_ccode_variable_declarator_new ("length", (ValaCCodeExpression*) _tmp5_, NULL);
      _tmp7_ = _tmp6_;
      vala_ccode_function_add_declaration (_tmp3_, "int", (ValaCCodeDeclarator*) _tmp7_, 0);
      _vala_ccode_node_unref0 (_tmp7_);
      _vala_ccode_node_unref0 (_tmp5_);
      _tmp8_ = vala_ccode_identifier_new ("array");
      array_check = _tmp8_;
      _tmp9_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_if (_tmp9_, (ValaCCodeExpression*) array_check);
      _tmp10_ = vala_ccode_identifier_new ("array");
      _tmp11_ = _tmp10_;
      _tmp12_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp11_, "gpointer*");
      _tmp13_ = _tmp12_;
      _tmp14_ = vala_ccode_constant_new ("length");
      _tmp15_ = _tmp14_;
      _tmp16_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp13_, (ValaCCodeExpression*) _tmp15_);
      _tmp17_ = _tmp16_;
      _vala_ccode_node_unref0 (_tmp15_);
      _vala_ccode_node_unref0 (_tmp13_);
      _vala_ccode_node_unref0 (_tmp11_);
      array_element_check = _tmp17_;
      _tmp18_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_while (_tmp18_, (ValaCCodeExpression*) array_element_check);
      _tmp19_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp20_ = vala_ccode_identifier_new ("length");
      _tmp21_ = _tmp20_;
      _tmp22_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp21_);
      _tmp23_ = _tmp22_;
      vala_ccode_function_add_expression (_tmp19_, (ValaCCodeExpression*) _tmp23_);
      _vala_ccode_node_unref0 (_tmp23_);
      _vala_ccode_node_unref0 (_tmp21_);
      _tmp24_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp24_);
      _tmp25_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp25_);
      _tmp26_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp27_ = vala_ccode_identifier_new ("length");
      _tmp28_ = _tmp27_;
      vala_ccode_function_add_return (_tmp26_, (ValaCCodeExpression*) _tmp28_);
      _vala_ccode_node_unref0 (_tmp28_);
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, fun);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, fun);
      _vala_ccode_node_unref0 (array_element_check);
      _vala_ccode_node_unref0 (array_check);
      _vala_ccode_node_unref0 (fun);
}


static ValaTargetValue* vala_ccode_array_module_real_copy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, ValaCodeNode* node) {
      ValaCCodeArrayModule * self;
      ValaTargetValue* result = NULL;
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp1_;
      ValaDataType* type;
      ValaCCodeExpression* _tmp2_ = NULL;
      ValaCCodeExpression* cexpr;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (value != NULL, NULL);
      g_return_val_if_fail (node != NULL, NULL);
      _tmp0_ = vala_target_value_get_value_type (value);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      type = _tmp1_;
      _tmp2_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, value);
      cexpr = _tmp2_;
      if (VALA_IS_ARRAY_TYPE (type)) {
            ValaArrayType* _tmp3_;
            ValaArrayType* array_type;
            gboolean _tmp4_;
            ValaLocalVariable* _tmp6_ = NULL;
            ValaLocalVariable* decl;
            const gchar* _tmp7_ = NULL;
            ValaCCodeExpression* _tmp8_ = NULL;
            ValaCCodeExpression* ctemp;
            gchar* _tmp9_ = NULL;
            gchar* _tmp10_;
            ValaCCodeIdentifier* _tmp11_ = NULL;
            ValaCCodeIdentifier* _tmp12_;
            ValaCCodeFunctionCall* _tmp13_ = NULL;
            ValaCCodeFunctionCall* _tmp14_;
            ValaCCodeFunctionCall* copy_call;
            ValaCCodeFunction* _tmp15_ = NULL;
            ValaGLibValue* _tmp16_ = NULL;
            _tmp3_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (type));
            array_type = _tmp3_;
            _tmp4_ = vala_array_type_get_fixed_length (array_type);
            if (!_tmp4_) {
                  ValaTargetValue* _tmp5_ = NULL;
                  _tmp5_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->copy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), value, node);
                  result = _tmp5_;
                  _vala_code_node_unref0 (array_type);
                  _vala_ccode_node_unref0 (cexpr);
                  _vala_code_node_unref0 (type);
                  return result;
            }
            _tmp6_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, type, FALSE, node, FALSE);
            decl = _tmp6_;
            vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, decl, FALSE);
            _tmp7_ = vala_symbol_get_name ((ValaSymbol*) decl);
            _tmp8_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp7_);
            ctemp = _tmp8_;
            _tmp9_ = vala_ccode_array_module_generate_array_copy_wrapper (self, array_type);
            _tmp10_ = _tmp9_;
            _tmp11_ = vala_ccode_identifier_new (_tmp10_);
            _tmp12_ = _tmp11_;
            _tmp13_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp12_);
            _tmp14_ = _tmp13_;
            _vala_ccode_node_unref0 (_tmp12_);
            _g_free0 (_tmp10_);
            copy_call = _tmp14_;
            vala_ccode_function_call_add_argument (copy_call, cexpr);
            vala_ccode_function_call_add_argument (copy_call, ctemp);
            _tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_expression (_tmp15_, (ValaCCodeExpression*) copy_call);
            _tmp16_ = vala_glib_value_new (type, ctemp);
            result = (ValaTargetValue*) _tmp16_;
            _vala_ccode_node_unref0 (copy_call);
            _vala_ccode_node_unref0 (ctemp);
            _vala_code_node_unref0 (decl);
            _vala_code_node_unref0 (array_type);
            _vala_ccode_node_unref0 (cexpr);
            _vala_code_node_unref0 (type);
            return result;
      } else {
            ValaTargetValue* _tmp17_ = NULL;
            _tmp17_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->copy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), value, node);
            result = _tmp17_;
            _vala_ccode_node_unref0 (cexpr);
            _vala_code_node_unref0 (type);
            return result;
      }
      _vala_ccode_node_unref0 (cexpr);
      _vala_code_node_unref0 (type);
}


static ValaCCodeExpression* vala_ccode_array_module_real_get_dup_func_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup) {
      ValaCCodeArrayModule * self;
      ValaCCodeExpression* result = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (type != NULL, NULL);
      if (VALA_IS_ARRAY_TYPE (type)) {
            ValaArrayType* _tmp0_;
            ValaArrayType* array_type;
            gboolean _tmp1_;
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            ValaCCodeIdentifier* _tmp4_ = NULL;
            ValaCCodeExpression* _tmp5_;
            _tmp0_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (type));
            array_type = _tmp0_;
            _tmp1_ = vala_array_type_get_fixed_length (array_type);
            g_assert (!_tmp1_);
            _tmp2_ = vala_ccode_array_module_generate_array_dup_wrapper (self, array_type);
            _tmp3_ = _tmp2_;
            _tmp4_ = vala_ccode_identifier_new (_tmp3_);
            _tmp5_ = (ValaCCodeExpression*) _tmp4_;
            _g_free0 (_tmp3_);
            result = _tmp5_;
            _vala_code_node_unref0 (array_type);
            return result;
      } else {
            ValaCCodeExpression* _tmp6_ = NULL;
            _tmp6_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->get_dup_func_expression ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), type, source_reference, is_chainup);
            result = _tmp6_;
            return result;
      }
}


static ValaCCodeExpression* vala_ccode_array_module_real_destroy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, gboolean is_macro_definition) {
      ValaCCodeArrayModule * self;
      ValaCCodeExpression* result = NULL;
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp1_;
      ValaDataType* type;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (value != NULL, NULL);
      _tmp0_ = vala_target_value_get_value_type (value);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      type = _tmp1_;
      if (VALA_IS_ARRAY_TYPE (type)) {
            ValaArrayType* _tmp2_;
            ValaArrayType* array_type;
            gboolean _tmp3_;
            ValaCCodeExpression* _tmp5_ = NULL;
            ValaCCodeExpression* _tmp6_;
            ValaCCodeFunctionCall* _tmp7_ = NULL;
            ValaCCodeFunctionCall* _tmp8_;
            ValaCCodeFunctionCall* ccall;
            ValaCCodeIdentifier* _tmp9_ = NULL;
            ValaCCodeIdentifier* _tmp10_;
            ValaCCodeFunctionCall* _tmp11_ = NULL;
            ValaCCodeExpression* _tmp12_ = NULL;
            ValaCCodeExpression* _tmp13_;
            gint _tmp14_;
            gchar* _tmp15_ = NULL;
            gchar* _tmp16_;
            ValaCCodeConstant* _tmp17_ = NULL;
            ValaCCodeConstant* _tmp18_;
            ValaDataType* _tmp19_ = NULL;
            ValaCCodeExpression* _tmp20_ = NULL;
            ValaCCodeExpression* _tmp21_;
            ValaCCodeCastExpression* _tmp22_ = NULL;
            ValaCCodeCastExpression* _tmp23_;
            _tmp2_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (type));
            array_type = _tmp2_;
            _tmp3_ = vala_array_type_get_fixed_length (array_type);
            if (!_tmp3_) {
                  ValaCCodeExpression* _tmp4_ = NULL;
                  _tmp4_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->destroy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), value, is_macro_definition);
                  result = _tmp4_;
                  _vala_code_node_unref0 (array_type);
                  _vala_code_node_unref0 (type);
                  return result;
            }
            ((ValaCCodeBaseModule*) self)->requires_array_free = TRUE;
            _tmp5_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, type, FALSE);
            _tmp6_ = _tmp5_;
            _tmp7_ = vala_ccode_function_call_new (_tmp6_);
            _tmp8_ = _tmp7_;
            _vala_ccode_node_unref0 (_tmp6_);
            ccall = _tmp8_;
            _tmp9_ = vala_ccode_identifier_new ("_vala_array_destroy");
            _tmp10_ = _tmp9_;
            _tmp11_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp10_);
            _vala_ccode_node_unref0 (ccall);
            ccall = _tmp11_;
            _vala_ccode_node_unref0 (_tmp10_);
            _tmp12_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, value);
            _tmp13_ = _tmp12_;
            vala_ccode_function_call_add_argument (ccall, _tmp13_);
            _vala_ccode_node_unref0 (_tmp13_);
            _tmp14_ = vala_array_type_get_length (array_type);
            _tmp15_ = g_strdup_printf ("%d", _tmp14_);
            _tmp16_ = _tmp15_;
            _tmp17_ = vala_ccode_constant_new (_tmp16_);
            _tmp18_ = _tmp17_;
            vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp18_);
            _vala_ccode_node_unref0 (_tmp18_);
            _g_free0 (_tmp16_);
            _tmp19_ = vala_array_type_get_element_type (array_type);
            _tmp20_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, _tmp19_, FALSE);
            _tmp21_ = _tmp20_;
            _tmp22_ = vala_ccode_cast_expression_new (_tmp21_, "GDestroyNotify");
            _tmp23_ = _tmp22_;
            vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp23_);
            _vala_ccode_node_unref0 (_tmp23_);
            _vala_ccode_node_unref0 (_tmp21_);
            result = (ValaCCodeExpression*) ccall;
            _vala_code_node_unref0 (array_type);
            _vala_code_node_unref0 (type);
            return result;
      } else {
            ValaCCodeExpression* _tmp24_ = NULL;
            _tmp24_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->destroy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), value, is_macro_definition);
            result = _tmp24_;
            _vala_code_node_unref0 (type);
            return result;
      }
      _vala_code_node_unref0 (type);
}


static gchar* vala_ccode_array_module_generate_array_dup_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* dup_func;
      gboolean _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      ValaCCodeFunction* _tmp4_ = NULL;
      ValaCCodeFunction* _tmp5_;
      ValaCCodeFunction* function;
      gchar* _tmp6_ = NULL;
      gchar* _tmp7_;
      ValaCCodeParameter* _tmp8_ = NULL;
      ValaCCodeParameter* _tmp9_;
      ValaCCodeParameter* _tmp10_ = NULL;
      ValaCCodeParameter* _tmp11_;
      ValaDataType* _tmp12_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp22_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp23_;
      ValaDataType* _tmp24_ = NULL;
      gboolean _tmp25_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (array_type != NULL, NULL);
      self->priv->next_array_dup_id = self->priv->next_array_dup_id + 1;
      _tmp0_ = g_strdup_printf ("_vala_array_dup%d", self->priv->next_array_dup_id);
      dup_func = _tmp0_;
      _tmp1_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, dup_func);
      if (!_tmp1_) {
            result = dup_func;
            return result;
      }
      _tmp2_ = vala_data_type_get_cname ((ValaDataType*) array_type);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_ccode_function_new (dup_func, _tmp3_);
      _tmp5_ = _tmp4_;
      _g_free0 (_tmp3_);
      function = _tmp5_;
      vala_ccode_function_set_modifiers (function, VALA_CCODE_MODIFIERS_STATIC);
      _tmp6_ = vala_data_type_get_cname ((ValaDataType*) array_type);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_ccode_parameter_new ("self", _tmp7_);
      _tmp9_ = _tmp8_;
      vala_ccode_function_add_parameter (function, _tmp9_);
      _vala_ccode_node_unref0 (_tmp9_);
      _g_free0 (_tmp7_);
      _tmp10_ = vala_ccode_parameter_new ("length", "int");
      _tmp11_ = _tmp10_;
      vala_ccode_function_add_parameter (function, _tmp11_);
      _vala_ccode_node_unref0 (_tmp11_);
      _tmp12_ = vala_array_type_get_element_type (array_type);
      if (VALA_IS_GENERIC_TYPE (_tmp12_)) {
            ValaDataType* _tmp13_ = NULL;
            ValaTypeParameter* _tmp14_ = NULL;
            const gchar* _tmp15_ = NULL;
            gchar* _tmp16_ = NULL;
            gchar* _tmp17_;
            gchar* _tmp18_ = NULL;
            gchar* _tmp19_;
            gchar* func_name;
            ValaCCodeParameter* _tmp20_ = NULL;
            ValaCCodeParameter* _tmp21_;
            _tmp13_ = vala_array_type_get_element_type (array_type);
            _tmp14_ = vala_data_type_get_type_parameter (_tmp13_);
            _tmp15_ = vala_symbol_get_name ((ValaSymbol*) _tmp14_);
            _tmp16_ = g_utf8_strdown (_tmp15_, (gssize) (-1));
            _tmp17_ = _tmp16_;
            _tmp18_ = g_strdup_printf ("%s_dup_func", _tmp17_);
            _tmp19_ = _tmp18_;
            _g_free0 (_tmp17_);
            func_name = _tmp19_;
            _tmp20_ = vala_ccode_parameter_new (func_name, "GBoxedCopyFunc");
            _tmp21_ = _tmp20_;
            vala_ccode_function_add_parameter (function, _tmp21_);
            _vala_ccode_node_unref0 (_tmp21_);
            _g_free0 (func_name);
      }
      _tmp22_ = vala_ccode_base_module_emit_context_new (NULL);
      _tmp23_ = _tmp22_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp23_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp23_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, function);
      _tmp24_ = vala_array_type_get_element_type (array_type);
      _tmp25_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp24_);
      if (_tmp25_) {
            ValaCCodeVariableDeclarator* _tmp26_ = NULL;
            ValaCCodeVariableDeclarator* cvardecl;
            ValaCCodeIdentifier* _tmp27_ = NULL;
            ValaCCodeIdentifier* _tmp28_;
            ValaCCodeFunctionCall* _tmp29_ = NULL;
            ValaCCodeFunctionCall* _tmp30_;
            ValaCCodeFunctionCall* gnew;
            ValaDataType* _tmp31_ = NULL;
            gchar* _tmp32_ = NULL;
            gchar* _tmp33_;
            ValaCCodeIdentifier* _tmp34_ = NULL;
            ValaCCodeIdentifier* _tmp35_;
            ValaCCodeIdentifier* _tmp36_ = NULL;
            ValaCCodeExpression* length_expr;
            gboolean _tmp37_ = FALSE;
            ValaDataType* _tmp38_ = NULL;
            ValaTypeSymbol* _tmp39_ = NULL;
            ValaCCodeFunction* _tmp46_ = NULL;
            gchar* _tmp47_ = NULL;
            gchar* _tmp48_;
            ValaCCodeFunction* _tmp49_ = NULL;
            ValaCCodeIdentifier* _tmp50_ = NULL;
            ValaCCodeIdentifier* _tmp51_;
            ValaCCodeFunction* _tmp52_ = NULL;
            ValaCCodeVariableDeclarator* _tmp53_ = NULL;
            ValaCCodeVariableDeclarator* _tmp54_;
            ValaCCodeFunction* _tmp55_ = NULL;
            ValaCCodeIdentifier* _tmp56_ = NULL;
            ValaCCodeIdentifier* _tmp57_;
            ValaCCodeConstant* _tmp58_ = NULL;
            ValaCCodeConstant* _tmp59_;
            ValaCCodeAssignment* _tmp60_ = NULL;
            ValaCCodeAssignment* _tmp61_;
            ValaCCodeIdentifier* _tmp62_ = NULL;
            ValaCCodeIdentifier* _tmp63_;
            ValaCCodeIdentifier* _tmp64_ = NULL;
            ValaCCodeIdentifier* _tmp65_;
            ValaCCodeBinaryExpression* _tmp66_ = NULL;
            ValaCCodeBinaryExpression* _tmp67_;
            ValaCCodeIdentifier* _tmp68_ = NULL;
            ValaCCodeIdentifier* _tmp69_;
            ValaCCodeUnaryExpression* _tmp70_ = NULL;
            ValaCCodeUnaryExpression* _tmp71_;
            ValaCCodeFunction* _tmp72_ = NULL;
            ValaCCodeIdentifier* _tmp73_ = NULL;
            ValaCCodeIdentifier* _tmp74_;
            ValaCCodeIdentifier* _tmp75_ = NULL;
            ValaCCodeIdentifier* _tmp76_;
            ValaCCodeElementAccess* _tmp77_ = NULL;
            ValaCCodeElementAccess* _tmp78_;
            ValaDataType* _tmp79_ = NULL;
            ValaCCodeIdentifier* _tmp80_ = NULL;
            ValaCCodeIdentifier* _tmp81_;
            ValaCCodeIdentifier* _tmp82_ = NULL;
            ValaCCodeIdentifier* _tmp83_;
            ValaCCodeElementAccess* _tmp84_ = NULL;
            ValaCCodeElementAccess* _tmp85_;
            ValaGLibValue* _tmp86_ = NULL;
            ValaGLibValue* _tmp87_;
            ValaTargetValue* _tmp88_ = NULL;
            ValaTargetValue* _tmp89_;
            ValaCCodeExpression* _tmp90_ = NULL;
            ValaCCodeExpression* _tmp91_;
            ValaCCodeFunction* _tmp92_ = NULL;
            ValaCCodeFunction* _tmp93_ = NULL;
            ValaCCodeIdentifier* _tmp94_ = NULL;
            ValaCCodeIdentifier* _tmp95_;
            _tmp26_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
            cvardecl = _tmp26_;
            _tmp27_ = vala_ccode_identifier_new ("g_new0");
            _tmp28_ = _tmp27_;
            _tmp29_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp28_);
            _tmp30_ = _tmp29_;
            _vala_ccode_node_unref0 (_tmp28_);
            gnew = _tmp30_;
            _tmp31_ = vala_array_type_get_element_type (array_type);
            _tmp32_ = vala_data_type_get_cname (_tmp31_);
            _tmp33_ = _tmp32_;
            _tmp34_ = vala_ccode_identifier_new (_tmp33_);
            _tmp35_ = _tmp34_;
            vala_ccode_function_call_add_argument (gnew, (ValaCCodeExpression*) _tmp35_);
            _vala_ccode_node_unref0 (_tmp35_);
            _g_free0 (_tmp33_);
            _tmp36_ = vala_ccode_identifier_new ("length");
            length_expr = (ValaCCodeExpression*) _tmp36_;
            _tmp38_ = vala_array_type_get_element_type (array_type);
            _tmp39_ = vala_data_type_get_data_type (_tmp38_);
            if (_tmp39_ != NULL) {
                  ValaDataType* _tmp40_ = NULL;
                  ValaTypeSymbol* _tmp41_ = NULL;
                  gboolean _tmp42_;
                  _tmp40_ = vala_array_type_get_element_type (array_type);
                  _tmp41_ = vala_data_type_get_data_type (_tmp40_);
                  _tmp42_ = vala_typesymbol_is_reference_type (_tmp41_);
                  _tmp37_ = _tmp42_;
            } else {
                  _tmp37_ = FALSE;
            }
            if (_tmp37_) {
                  ValaCCodeConstant* _tmp43_ = NULL;
                  ValaCCodeConstant* _tmp44_;
                  ValaCCodeBinaryExpression* _tmp45_ = NULL;
                  _tmp43_ = vala_ccode_constant_new ("1");
                  _tmp44_ = _tmp43_;
                  _tmp45_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, length_expr, (ValaCCodeExpression*) _tmp44_);
                  _vala_ccode_node_unref0 (length_expr);
                  length_expr = (ValaCCodeExpression*) _tmp45_;
                  _vala_ccode_node_unref0 (_tmp44_);
            }
            vala_ccode_function_call_add_argument (gnew, length_expr);
            _tmp46_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp47_ = vala_data_type_get_cname ((ValaDataType*) array_type);
            _tmp48_ = _tmp47_;
            vala_ccode_function_add_declaration (_tmp46_, _tmp48_, (ValaCCodeDeclarator*) cvardecl, 0);
            _g_free0 (_tmp48_);
            _tmp49_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp50_ = vala_ccode_identifier_new ("result");
            _tmp51_ = _tmp50_;
            vala_ccode_function_add_assignment (_tmp49_, (ValaCCodeExpression*) _tmp51_, (ValaCCodeExpression*) gnew);
            _vala_ccode_node_unref0 (_tmp51_);
            _tmp52_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp53_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
            _tmp54_ = _tmp53_;
            vala_ccode_function_add_declaration (_tmp52_, "int", (ValaCCodeDeclarator*) _tmp54_, 0);
            _vala_ccode_node_unref0 (_tmp54_);
            _tmp55_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp56_ = vala_ccode_identifier_new ("i");
            _tmp57_ = _tmp56_;
            _tmp58_ = vala_ccode_constant_new ("0");
            _tmp59_ = _tmp58_;
            _tmp60_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp57_, (ValaCCodeExpression*) _tmp59_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
            _tmp61_ = _tmp60_;
            _tmp62_ = vala_ccode_identifier_new ("i");
            _tmp63_ = _tmp62_;
            _tmp64_ = vala_ccode_identifier_new ("length");
            _tmp65_ = _tmp64_;
            _tmp66_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp63_, (ValaCCodeExpression*) _tmp65_);
            _tmp67_ = _tmp66_;
            _tmp68_ = vala_ccode_identifier_new ("i");
            _tmp69_ = _tmp68_;
            _tmp70_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp69_);
            _tmp71_ = _tmp70_;
            vala_ccode_function_open_for (_tmp55_, (ValaCCodeExpression*) _tmp61_, (ValaCCodeExpression*) _tmp67_, (ValaCCodeExpression*) _tmp71_);
            _vala_ccode_node_unref0 (_tmp71_);
            _vala_ccode_node_unref0 (_tmp69_);
            _vala_ccode_node_unref0 (_tmp67_);
            _vala_ccode_node_unref0 (_tmp65_);
            _vala_ccode_node_unref0 (_tmp63_);
            _vala_ccode_node_unref0 (_tmp61_);
            _vala_ccode_node_unref0 (_tmp59_);
            _vala_ccode_node_unref0 (_tmp57_);
            _tmp72_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp73_ = vala_ccode_identifier_new ("result");
            _tmp74_ = _tmp73_;
            _tmp75_ = vala_ccode_identifier_new ("i");
            _tmp76_ = _tmp75_;
            _tmp77_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp74_, (ValaCCodeExpression*) _tmp76_);
            _tmp78_ = _tmp77_;
            _tmp79_ = vala_array_type_get_element_type (array_type);
            _tmp80_ = vala_ccode_identifier_new ("self");
            _tmp81_ = _tmp80_;
            _tmp82_ = vala_ccode_identifier_new ("i");
            _tmp83_ = _tmp82_;
            _tmp84_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp81_, (ValaCCodeExpression*) _tmp83_);
            _tmp85_ = _tmp84_;
            _tmp86_ = vala_glib_value_new (_tmp79_, (ValaCCodeExpression*) _tmp85_);
            _tmp87_ = _tmp86_;
            _tmp88_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp87_, (ValaCodeNode*) array_type);
            _tmp89_ = _tmp88_;
            _tmp90_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp89_);
            _tmp91_ = _tmp90_;
            vala_ccode_function_add_assignment (_tmp72_, (ValaCCodeExpression*) _tmp78_, _tmp91_);
            _vala_ccode_node_unref0 (_tmp91_);
            _vala_target_value_unref0 (_tmp89_);
            _vala_target_value_unref0 (_tmp87_);
            _vala_ccode_node_unref0 (_tmp85_);
            _vala_ccode_node_unref0 (_tmp83_);
            _vala_ccode_node_unref0 (_tmp81_);
            _vala_ccode_node_unref0 (_tmp78_);
            _vala_ccode_node_unref0 (_tmp76_);
            _vala_ccode_node_unref0 (_tmp74_);
            _tmp92_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_close (_tmp92_);
            _tmp93_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp94_ = vala_ccode_identifier_new ("result");
            _tmp95_ = _tmp94_;
            vala_ccode_function_add_return (_tmp93_, (ValaCCodeExpression*) _tmp95_);
            _vala_ccode_node_unref0 (_tmp95_);
            _vala_ccode_node_unref0 (length_expr);
            _vala_ccode_node_unref0 (gnew);
            _vala_ccode_node_unref0 (cvardecl);
      } else {
            ValaCCodeIdentifier* _tmp96_ = NULL;
            ValaCCodeIdentifier* _tmp97_;
            ValaCCodeFunctionCall* _tmp98_ = NULL;
            ValaCCodeFunctionCall* _tmp99_;
            ValaCCodeFunctionCall* dup_call;
            ValaCCodeIdentifier* _tmp100_ = NULL;
            ValaCCodeIdentifier* _tmp101_;
            ValaCCodeIdentifier* _tmp102_ = NULL;
            ValaCCodeIdentifier* _tmp103_;
            ValaCCodeFunctionCall* _tmp104_ = NULL;
            ValaCCodeFunctionCall* _tmp105_;
            ValaCCodeFunctionCall* sizeof_call;
            ValaDataType* _tmp106_ = NULL;
            gchar* _tmp107_ = NULL;
            gchar* _tmp108_;
            ValaCCodeIdentifier* _tmp109_ = NULL;
            ValaCCodeIdentifier* _tmp110_;
            ValaCCodeIdentifier* _tmp111_ = NULL;
            ValaCCodeIdentifier* _tmp112_;
            ValaCCodeBinaryExpression* _tmp113_ = NULL;
            ValaCCodeBinaryExpression* _tmp114_;
            ValaCCodeFunction* _tmp115_ = NULL;
            _tmp96_ = vala_ccode_identifier_new ("g_memdup");
            _tmp97_ = _tmp96_;
            _tmp98_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp97_);
            _tmp99_ = _tmp98_;
            _vala_ccode_node_unref0 (_tmp97_);
            dup_call = _tmp99_;
            _tmp100_ = vala_ccode_identifier_new ("self");
            _tmp101_ = _tmp100_;
            vala_ccode_function_call_add_argument (dup_call, (ValaCCodeExpression*) _tmp101_);
            _vala_ccode_node_unref0 (_tmp101_);
            _tmp102_ = vala_ccode_identifier_new ("sizeof");
            _tmp103_ = _tmp102_;
            _tmp104_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp103_);
            _tmp105_ = _tmp104_;
            _vala_ccode_node_unref0 (_tmp103_);
            sizeof_call = _tmp105_;
            _tmp106_ = vala_array_type_get_element_type (array_type);
            _tmp107_ = vala_data_type_get_cname (_tmp106_);
            _tmp108_ = _tmp107_;
            _tmp109_ = vala_ccode_identifier_new (_tmp108_);
            _tmp110_ = _tmp109_;
            vala_ccode_function_call_add_argument (sizeof_call, (ValaCCodeExpression*) _tmp110_);
            _vala_ccode_node_unref0 (_tmp110_);
            _g_free0 (_tmp108_);
            _tmp111_ = vala_ccode_identifier_new ("length");
            _tmp112_ = _tmp111_;
            _tmp113_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp112_, (ValaCCodeExpression*) sizeof_call);
            _tmp114_ = _tmp113_;
            vala_ccode_function_call_add_argument (dup_call, (ValaCCodeExpression*) _tmp114_);
            _vala_ccode_node_unref0 (_tmp114_);
            _vala_ccode_node_unref0 (_tmp112_);
            _tmp115_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_return (_tmp115_, (ValaCCodeExpression*) dup_call);
            _vala_ccode_node_unref0 (sizeof_call);
            _vala_ccode_node_unref0 (dup_call);
      }
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, function);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, function);
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      result = dup_func;
      _vala_ccode_node_unref0 (function);
      return result;
}


static gchar* vala_ccode_array_module_generate_array_copy_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* dup_func;
      gboolean _tmp1_;
      ValaCCodeFunction* _tmp2_ = NULL;
      ValaCCodeFunction* function;
      gchar* _tmp3_ = NULL;
      gchar* _tmp4_;
      gchar* _tmp5_;
      gchar* _tmp6_;
      ValaCCodeParameter* _tmp7_ = NULL;
      ValaCCodeParameter* _tmp8_;
      gchar* _tmp9_ = NULL;
      gchar* _tmp10_;
      gchar* _tmp11_;
      gchar* _tmp12_;
      ValaCCodeParameter* _tmp13_ = NULL;
      ValaCCodeParameter* _tmp14_;
      ValaCCodeBaseModuleEmitContext* _tmp15_ = NULL;
      ValaCCodeBaseModuleEmitContext* _tmp16_;
      ValaDataType* _tmp17_ = NULL;
      gboolean _tmp18_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (array_type != NULL, NULL);
      self->priv->next_array_dup_id = self->priv->next_array_dup_id + 1;
      _tmp0_ = g_strdup_printf ("_vala_array_copy%d", self->priv->next_array_dup_id);
      dup_func = _tmp0_;
      _tmp1_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, dup_func);
      if (!_tmp1_) {
            result = dup_func;
            return result;
      }
      _tmp2_ = vala_ccode_function_new (dup_func, "void");
      function = _tmp2_;
      vala_ccode_function_set_modifiers (function, VALA_CCODE_MODIFIERS_STATIC);
      _tmp3_ = vala_data_type_get_cname ((ValaDataType*) array_type);
      _tmp4_ = _tmp3_;
      _tmp5_ = g_strconcat (_tmp4_, "*", NULL);
      _tmp6_ = _tmp5_;
      _tmp7_ = vala_ccode_parameter_new ("self", _tmp6_);
      _tmp8_ = _tmp7_;
      vala_ccode_function_add_parameter (function, _tmp8_);
      _vala_ccode_node_unref0 (_tmp8_);
      _g_free0 (_tmp6_);
      _g_free0 (_tmp4_);
      _tmp9_ = vala_data_type_get_cname ((ValaDataType*) array_type);
      _tmp10_ = _tmp9_;
      _tmp11_ = g_strconcat (_tmp10_, "*", NULL);
      _tmp12_ = _tmp11_;
      _tmp13_ = vala_ccode_parameter_new ("dest", _tmp12_);
      _tmp14_ = _tmp13_;
      vala_ccode_function_add_parameter (function, _tmp14_);
      _vala_ccode_node_unref0 (_tmp14_);
      _g_free0 (_tmp12_);
      _g_free0 (_tmp10_);
      _tmp15_ = vala_ccode_base_module_emit_context_new (NULL);
      _tmp16_ = _tmp15_;
      vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp16_);
      _vala_ccode_base_module_emit_context_unref0 (_tmp16_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, function);
      _tmp17_ = vala_array_type_get_element_type (array_type);
      _tmp18_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp17_);
      if (_tmp18_) {
            ValaCCodeFunction* _tmp19_ = NULL;
            ValaCCodeVariableDeclarator* _tmp20_ = NULL;
            ValaCCodeVariableDeclarator* _tmp21_;
            ValaCCodeFunction* _tmp22_ = NULL;
            ValaCCodeIdentifier* _tmp23_ = NULL;
            ValaCCodeIdentifier* _tmp24_;
            ValaCCodeConstant* _tmp25_ = NULL;
            ValaCCodeConstant* _tmp26_;
            ValaCCodeAssignment* _tmp27_ = NULL;
            ValaCCodeAssignment* _tmp28_;
            ValaCCodeIdentifier* _tmp29_ = NULL;
            ValaCCodeIdentifier* _tmp30_;
            gint _tmp31_;
            gchar* _tmp32_ = NULL;
            gchar* _tmp33_;
            ValaCCodeConstant* _tmp34_ = NULL;
            ValaCCodeConstant* _tmp35_;
            ValaCCodeBinaryExpression* _tmp36_ = NULL;
            ValaCCodeBinaryExpression* _tmp37_;
            ValaCCodeIdentifier* _tmp38_ = NULL;
            ValaCCodeIdentifier* _tmp39_;
            ValaCCodeUnaryExpression* _tmp40_ = NULL;
            ValaCCodeUnaryExpression* _tmp41_;
            ValaCCodeFunction* _tmp42_ = NULL;
            ValaCCodeIdentifier* _tmp43_ = NULL;
            ValaCCodeIdentifier* _tmp44_;
            ValaCCodeIdentifier* _tmp45_ = NULL;
            ValaCCodeIdentifier* _tmp46_;
            ValaCCodeElementAccess* _tmp47_ = NULL;
            ValaCCodeElementAccess* _tmp48_;
            ValaDataType* _tmp49_ = NULL;
            ValaCCodeIdentifier* _tmp50_ = NULL;
            ValaCCodeIdentifier* _tmp51_;
            ValaCCodeIdentifier* _tmp52_ = NULL;
            ValaCCodeIdentifier* _tmp53_;
            ValaCCodeElementAccess* _tmp54_ = NULL;
            ValaCCodeElementAccess* _tmp55_;
            ValaGLibValue* _tmp56_ = NULL;
            ValaGLibValue* _tmp57_;
            ValaTargetValue* _tmp58_ = NULL;
            ValaTargetValue* _tmp59_;
            ValaCCodeExpression* _tmp60_ = NULL;
            ValaCCodeExpression* _tmp61_;
            _tmp19_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp20_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
            _tmp21_ = _tmp20_;
            vala_ccode_function_add_declaration (_tmp19_, "int", (ValaCCodeDeclarator*) _tmp21_, 0);
            _vala_ccode_node_unref0 (_tmp21_);
            _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp23_ = vala_ccode_identifier_new ("i");
            _tmp24_ = _tmp23_;
            _tmp25_ = vala_ccode_constant_new ("0");
            _tmp26_ = _tmp25_;
            _tmp27_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp24_, (ValaCCodeExpression*) _tmp26_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
            _tmp28_ = _tmp27_;
            _tmp29_ = vala_ccode_identifier_new ("i");
            _tmp30_ = _tmp29_;
            _tmp31_ = vala_array_type_get_length (array_type);
            _tmp32_ = g_strdup_printf ("%d", _tmp31_);
            _tmp33_ = _tmp32_;
            _tmp34_ = vala_ccode_constant_new (_tmp33_);
            _tmp35_ = _tmp34_;
            _tmp36_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp30_, (ValaCCodeExpression*) _tmp35_);
            _tmp37_ = _tmp36_;
            _tmp38_ = vala_ccode_identifier_new ("i");
            _tmp39_ = _tmp38_;
            _tmp40_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp39_);
            _tmp41_ = _tmp40_;
            vala_ccode_function_open_for (_tmp22_, (ValaCCodeExpression*) _tmp28_, (ValaCCodeExpression*) _tmp37_, (ValaCCodeExpression*) _tmp41_);
            _vala_ccode_node_unref0 (_tmp41_);
            _vala_ccode_node_unref0 (_tmp39_);
            _vala_ccode_node_unref0 (_tmp37_);
            _vala_ccode_node_unref0 (_tmp35_);
            _g_free0 (_tmp33_);
            _vala_ccode_node_unref0 (_tmp30_);
            _vala_ccode_node_unref0 (_tmp28_);
            _vala_ccode_node_unref0 (_tmp26_);
            _vala_ccode_node_unref0 (_tmp24_);
            _tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp43_ = vala_ccode_identifier_new ("dest");
            _tmp44_ = _tmp43_;
            _tmp45_ = vala_ccode_identifier_new ("i");
            _tmp46_ = _tmp45_;
            _tmp47_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp44_, (ValaCCodeExpression*) _tmp46_);
            _tmp48_ = _tmp47_;
            _tmp49_ = vala_array_type_get_element_type (array_type);
            _tmp50_ = vala_ccode_identifier_new ("self");
            _tmp51_ = _tmp50_;
            _tmp52_ = vala_ccode_identifier_new ("i");
            _tmp53_ = _tmp52_;
            _tmp54_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp51_, (ValaCCodeExpression*) _tmp53_);
            _tmp55_ = _tmp54_;
            _tmp56_ = vala_glib_value_new (_tmp49_, (ValaCCodeExpression*) _tmp55_);
            _tmp57_ = _tmp56_;
            _tmp58_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp57_, (ValaCodeNode*) array_type);
            _tmp59_ = _tmp58_;
            _tmp60_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp59_);
            _tmp61_ = _tmp60_;
            vala_ccode_function_add_assignment (_tmp42_, (ValaCCodeExpression*) _tmp48_, _tmp61_);
            _vala_ccode_node_unref0 (_tmp61_);
            _vala_target_value_unref0 (_tmp59_);
            _vala_target_value_unref0 (_tmp57_);
            _vala_ccode_node_unref0 (_tmp55_);
            _vala_ccode_node_unref0 (_tmp53_);
            _vala_ccode_node_unref0 (_tmp51_);
            _vala_ccode_node_unref0 (_tmp48_);
            _vala_ccode_node_unref0 (_tmp46_);
            _vala_ccode_node_unref0 (_tmp44_);
      } else {
            ValaCCodeIdentifier* _tmp62_ = NULL;
            ValaCCodeIdentifier* _tmp63_;
            ValaCCodeFunctionCall* _tmp64_ = NULL;
            ValaCCodeFunctionCall* _tmp65_;
            ValaCCodeFunctionCall* dup_call;
            ValaCCodeIdentifier* _tmp66_ = NULL;
            ValaCCodeIdentifier* _tmp67_;
            ValaCCodeIdentifier* _tmp68_ = NULL;
            ValaCCodeIdentifier* _tmp69_;
            ValaCCodeIdentifier* _tmp70_ = NULL;
            ValaCCodeIdentifier* _tmp71_;
            ValaCCodeFunctionCall* _tmp72_ = NULL;
            ValaCCodeFunctionCall* _tmp73_;
            ValaCCodeFunctionCall* sizeof_call;
            ValaDataType* _tmp74_ = NULL;
            gchar* _tmp75_ = NULL;
            gchar* _tmp76_;
            ValaCCodeIdentifier* _tmp77_ = NULL;
            ValaCCodeIdentifier* _tmp78_;
            gint _tmp79_;
            gchar* _tmp80_ = NULL;
            gchar* _tmp81_;
            ValaCCodeConstant* _tmp82_ = NULL;
            ValaCCodeConstant* _tmp83_;
            ValaCCodeBinaryExpression* _tmp84_ = NULL;
            ValaCCodeBinaryExpression* _tmp85_;
            ValaCCodeFunction* _tmp86_ = NULL;
            vala_ccode_file_add_include (((ValaCCodeBaseModule*) self)->cfile, "string.h", FALSE);
            _tmp62_ = vala_ccode_identifier_new ("memcpy");
            _tmp63_ = _tmp62_;
            _tmp64_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp63_);
            _tmp65_ = _tmp64_;
            _vala_ccode_node_unref0 (_tmp63_);
            dup_call = _tmp65_;
            _tmp66_ = vala_ccode_identifier_new ("dest");
            _tmp67_ = _tmp66_;
            vala_ccode_function_call_add_argument (dup_call, (ValaCCodeExpression*) _tmp67_);
            _vala_ccode_node_unref0 (_tmp67_);
            _tmp68_ = vala_ccode_identifier_new ("self");
            _tmp69_ = _tmp68_;
            vala_ccode_function_call_add_argument (dup_call, (ValaCCodeExpression*) _tmp69_);
            _vala_ccode_node_unref0 (_tmp69_);
            _tmp70_ = vala_ccode_identifier_new ("sizeof");
            _tmp71_ = _tmp70_;
            _tmp72_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp71_);
            _tmp73_ = _tmp72_;
            _vala_ccode_node_unref0 (_tmp71_);
            sizeof_call = _tmp73_;
            _tmp74_ = vala_array_type_get_element_type (array_type);
            _tmp75_ = vala_data_type_get_cname (_tmp74_);
            _tmp76_ = _tmp75_;
            _tmp77_ = vala_ccode_identifier_new (_tmp76_);
            _tmp78_ = _tmp77_;
            vala_ccode_function_call_add_argument (sizeof_call, (ValaCCodeExpression*) _tmp78_);
            _vala_ccode_node_unref0 (_tmp78_);
            _g_free0 (_tmp76_);
            _tmp79_ = vala_array_type_get_length (array_type);
            _tmp80_ = g_strdup_printf ("%d", _tmp79_);
            _tmp81_ = _tmp80_;
            _tmp82_ = vala_ccode_constant_new (_tmp81_);
            _tmp83_ = _tmp82_;
            _tmp84_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp83_, (ValaCCodeExpression*) sizeof_call);
            _tmp85_ = _tmp84_;
            vala_ccode_function_call_add_argument (dup_call, (ValaCCodeExpression*) _tmp85_);
            _vala_ccode_node_unref0 (_tmp85_);
            _vala_ccode_node_unref0 (_tmp83_);
            _g_free0 (_tmp81_);
            _tmp86_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            vala_ccode_function_add_expression (_tmp86_, (ValaCCodeExpression*) dup_call);
            _vala_ccode_node_unref0 (sizeof_call);
            _vala_ccode_node_unref0 (dup_call);
      }
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, function);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, function);
      vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
      result = dup_func;
      _vala_ccode_node_unref0 (function);
      return result;
}


static gchar* vala_ccode_array_module_generate_array_add_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* add_func;
      gboolean _tmp1_;
      ValaCCodeFunction* _tmp2_ = NULL;
      ValaCCodeFunction* function;
      gchar* _tmp3_ = NULL;
      gchar* _tmp4_;
      gchar* _tmp5_;
      gchar* _tmp6_;
      ValaCCodeParameter* _tmp7_ = NULL;
      ValaCCodeParameter* _tmp8_;
      ValaCCodeParameter* _tmp9_ = NULL;
      ValaCCodeParameter* _tmp10_;
      ValaCCodeParameter* _tmp11_ = NULL;
      ValaCCodeParameter* _tmp12_;
      ValaDataType* _tmp13_ = NULL;
      gchar* _tmp14_ = NULL;
      gchar* typename;
      ValaCCodeIdentifier* _tmp15_ = NULL;
      ValaCCodeExpression* value;
      ValaDataType* _tmp16_ = NULL;
      gboolean _tmp17_;
      ValaCCodeParameter* _tmp28_ = NULL;
      ValaCCodeParameter* _tmp29_;
      ValaCCodeIdentifier* _tmp30_ = NULL;
      ValaCCodeIdentifier* _tmp31_;
      ValaCCodeUnaryExpression* _tmp32_ = NULL;
      ValaCCodeUnaryExpression* _tmp33_;
      ValaCCodeUnaryExpression* array;
      ValaCCodeIdentifier* _tmp34_ = NULL;
      ValaCCodeIdentifier* _tmp35_;
      ValaCCodeUnaryExpression* _tmp36_ = NULL;
      ValaCCodeUnaryExpression* _tmp37_;
      ValaCCodeUnaryExpression* length;
      ValaCCodeIdentifier* _tmp38_ = NULL;
      ValaCCodeIdentifier* _tmp39_;
      ValaCCodeUnaryExpression* _tmp40_ = NULL;
      ValaCCodeUnaryExpression* _tmp41_;
      ValaCCodeUnaryExpression* size;
      ValaCCodeIdentifier* _tmp42_ = NULL;
      ValaCCodeIdentifier* _tmp43_;
      ValaCCodeFunctionCall* _tmp44_ = NULL;
      ValaCCodeFunctionCall* _tmp45_;
      ValaCCodeFunctionCall* renew_call;
      ValaDataType* _tmp46_ = NULL;
      gchar* _tmp47_ = NULL;
      gchar* _tmp48_;
      ValaCCodeIdentifier* _tmp49_ = NULL;
      ValaCCodeIdentifier* _tmp50_;
      ValaDataType* _tmp51_ = NULL;
      gboolean _tmp52_;
      ValaCCodeBinaryExpression* _tmp57_ = NULL;
      ValaCCodeBinaryExpression* csizecheck;
      ValaCCodeFunction* _tmp58_ = NULL;
      ValaCCodeFunction* _tmp59_ = NULL;
      ValaCCodeConstant* _tmp60_ = NULL;
      ValaCCodeConstant* _tmp61_;
      ValaCCodeBinaryExpression* _tmp62_ = NULL;
      ValaCCodeBinaryExpression* _tmp63_;
      ValaCCodeConstant* _tmp64_ = NULL;
      ValaCCodeConstant* _tmp65_;
      ValaCCodeConditionalExpression* _tmp66_ = NULL;
      ValaCCodeConditionalExpression* _tmp67_;
      ValaCCodeFunction* _tmp68_ = NULL;
      ValaCCodeFunction* _tmp69_ = NULL;
      ValaCCodeFunction* _tmp70_ = NULL;
      ValaCCodeUnaryExpression* _tmp71_ = NULL;
      ValaCCodeUnaryExpression* _tmp72_;
      ValaCCodeElementAccess* _tmp73_ = NULL;
      ValaCCodeElementAccess* _tmp74_;
      ValaDataType* _tmp75_ = NULL;
      gboolean _tmp76_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (array_type != NULL, NULL);
      self->priv->next_array_add_id = self->priv->next_array_add_id + 1;
      _tmp0_ = g_strdup_printf ("_vala_array_add%d", self->priv->next_array_add_id);
      add_func = _tmp0_;
      _tmp1_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, add_func);
      if (!_tmp1_) {
            result = add_func;
            return result;
      }
      _tmp2_ = vala_ccode_function_new (add_func, "void");
      function = _tmp2_;
      vala_ccode_function_set_modifiers (function, VALA_CCODE_MODIFIERS_STATIC);
      _tmp3_ = vala_data_type_get_cname ((ValaDataType*) array_type);
      _tmp4_ = _tmp3_;
      _tmp5_ = g_strconcat (_tmp4_, "*", NULL);
      _tmp6_ = _tmp5_;
      _tmp7_ = vala_ccode_parameter_new ("array", _tmp6_);
      _tmp8_ = _tmp7_;
      vala_ccode_function_add_parameter (function, _tmp8_);
      _vala_ccode_node_unref0 (_tmp8_);
      _g_free0 (_tmp6_);
      _g_free0 (_tmp4_);
      _tmp9_ = vala_ccode_parameter_new ("length", "int*");
      _tmp10_ = _tmp9_;
      vala_ccode_function_add_parameter (function, _tmp10_);
      _vala_ccode_node_unref0 (_tmp10_);
      _tmp11_ = vala_ccode_parameter_new ("size", "int*");
      _tmp12_ = _tmp11_;
      vala_ccode_function_add_parameter (function, _tmp12_);
      _vala_ccode_node_unref0 (_tmp12_);
      vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, function);
      _tmp13_ = vala_array_type_get_element_type (array_type);
      _tmp14_ = vala_data_type_get_cname (_tmp13_);
      typename = _tmp14_;
      _tmp15_ = vala_ccode_identifier_new ("value");
      value = (ValaCCodeExpression*) _tmp15_;
      _tmp16_ = vala_array_type_get_element_type (array_type);
      _tmp17_ = vala_data_type_is_real_struct_type (_tmp16_);
      if (_tmp17_) {
            gboolean _tmp18_ = FALSE;
            ValaDataType* _tmp19_ = NULL;
            gboolean _tmp20_;
            ValaDataType* _tmp24_ = NULL;
            gboolean _tmp25_;
            _tmp19_ = vala_array_type_get_element_type (array_type);
            _tmp20_ = vala_data_type_get_nullable (_tmp19_);
            if (!_tmp20_) {
                  _tmp18_ = TRUE;
            } else {
                  ValaDataType* _tmp21_ = NULL;
                  gboolean _tmp22_;
                  _tmp21_ = vala_array_type_get_element_type (array_type);
                  _tmp22_ = vala_data_type_get_value_owned (_tmp21_);
                  _tmp18_ = !_tmp22_;
            }
            if (_tmp18_) {
                  gchar* _tmp23_;
                  _tmp23_ = g_strconcat ("const ", typename, NULL);
                  _g_free0 (typename);
                  typename = _tmp23_;
            }
            _tmp24_ = vala_array_type_get_element_type (array_type);
            _tmp25_ = vala_data_type_get_nullable (_tmp24_);
            if (!_tmp25_) {
                  gchar* _tmp26_;
                  ValaCCodeUnaryExpression* _tmp27_ = NULL;
                  _tmp26_ = g_strconcat (typename, "*", NULL);
                  _g_free0 (typename);
                  typename = _tmp26_;
                  _tmp27_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, value);
                  _vala_ccode_node_unref0 (value);
                  value = (ValaCCodeExpression*) _tmp27_;
            }
      }
      _tmp28_ = vala_ccode_parameter_new ("value", typename);
      _tmp29_ = _tmp28_;
      vala_ccode_function_add_parameter (function, _tmp29_);
      _vala_ccode_node_unref0 (_tmp29_);
      _tmp30_ = vala_ccode_identifier_new ("array");
      _tmp31_ = _tmp30_;
      _tmp32_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp31_);
      _tmp33_ = _tmp32_;
      _vala_ccode_node_unref0 (_tmp31_);
      array = _tmp33_;
      _tmp34_ = vala_ccode_identifier_new ("length");
      _tmp35_ = _tmp34_;
      _tmp36_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp35_);
      _tmp37_ = _tmp36_;
      _vala_ccode_node_unref0 (_tmp35_);
      length = _tmp37_;
      _tmp38_ = vala_ccode_identifier_new ("size");
      _tmp39_ = _tmp38_;
      _tmp40_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp39_);
      _tmp41_ = _tmp40_;
      _vala_ccode_node_unref0 (_tmp39_);
      size = _tmp41_;
      _tmp42_ = vala_ccode_identifier_new ("g_renew");
      _tmp43_ = _tmp42_;
      _tmp44_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp43_);
      _tmp45_ = _tmp44_;
      _vala_ccode_node_unref0 (_tmp43_);
      renew_call = _tmp45_;
      _tmp46_ = vala_array_type_get_element_type (array_type);
      _tmp47_ = vala_data_type_get_cname (_tmp46_);
      _tmp48_ = _tmp47_;
      _tmp49_ = vala_ccode_identifier_new (_tmp48_);
      _tmp50_ = _tmp49_;
      vala_ccode_function_call_add_argument (renew_call, (ValaCCodeExpression*) _tmp50_);
      _vala_ccode_node_unref0 (_tmp50_);
      _g_free0 (_tmp48_);
      vala_ccode_function_call_add_argument (renew_call, (ValaCCodeExpression*) array);
      _tmp51_ = vala_array_type_get_element_type (array_type);
      _tmp52_ = vala_data_type_is_reference_type_or_type_parameter (_tmp51_);
      if (_tmp52_) {
            ValaCCodeConstant* _tmp53_ = NULL;
            ValaCCodeConstant* _tmp54_;
            ValaCCodeBinaryExpression* _tmp55_ = NULL;
            ValaCCodeBinaryExpression* _tmp56_;
            _tmp53_ = vala_ccode_constant_new ("1");
            _tmp54_ = _tmp53_;
            _tmp55_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) size, (ValaCCodeExpression*) _tmp54_);
            _tmp56_ = _tmp55_;
            vala_ccode_function_call_add_argument (renew_call, (ValaCCodeExpression*) _tmp56_);
            _vala_ccode_node_unref0 (_tmp56_);
            _vala_ccode_node_unref0 (_tmp54_);
      } else {
            vala_ccode_function_call_add_argument (renew_call, (ValaCCodeExpression*) size);
      }
      _tmp57_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) length, (ValaCCodeExpression*) size);
      csizecheck = _tmp57_;
      _tmp58_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_open_if (_tmp58_, (ValaCCodeExpression*) csizecheck);
      _tmp59_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp60_ = vala_ccode_constant_new ("2");
      _tmp61_ = _tmp60_;
      _tmp62_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp61_, (ValaCCodeExpression*) size);
      _tmp63_ = _tmp62_;
      _tmp64_ = vala_ccode_constant_new ("4");
      _tmp65_ = _tmp64_;
      _tmp66_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) size, (ValaCCodeExpression*) _tmp63_, (ValaCCodeExpression*) _tmp65_);
      _tmp67_ = _tmp66_;
      vala_ccode_function_add_assignment (_tmp59_, (ValaCCodeExpression*) size, (ValaCCodeExpression*) _tmp67_);
      _vala_ccode_node_unref0 (_tmp67_);
      _vala_ccode_node_unref0 (_tmp65_);
      _vala_ccode_node_unref0 (_tmp63_);
      _vala_ccode_node_unref0 (_tmp61_);
      _tmp68_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_assignment (_tmp68_, (ValaCCodeExpression*) array, (ValaCCodeExpression*) renew_call);
      _tmp69_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_close (_tmp69_);
      _tmp70_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      _tmp71_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) length);
      _tmp72_ = _tmp71_;
      _tmp73_ = vala_ccode_element_access_new ((ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp72_);
      _tmp74_ = _tmp73_;
      vala_ccode_function_add_assignment (_tmp70_, (ValaCCodeExpression*) _tmp74_, value);
      _vala_ccode_node_unref0 (_tmp74_);
      _vala_ccode_node_unref0 (_tmp72_);
      _tmp75_ = vala_array_type_get_element_type (array_type);
      _tmp76_ = vala_data_type_is_reference_type_or_type_parameter (_tmp75_);
      if (_tmp76_) {
            ValaCCodeFunction* _tmp77_ = NULL;
            ValaCCodeElementAccess* _tmp78_ = NULL;
            ValaCCodeElementAccess* _tmp79_;
            ValaCCodeConstant* _tmp80_ = NULL;
            ValaCCodeConstant* _tmp81_;
            _tmp77_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
            _tmp78_ = vala_ccode_element_access_new ((ValaCCodeExpression*) array, (ValaCCodeExpression*) length);
            _tmp79_ = _tmp78_;
            _tmp80_ = vala_ccode_constant_new ("NULL");
            _tmp81_ = _tmp80_;
            vala_ccode_function_add_assignment (_tmp77_, (ValaCCodeExpression*) _tmp79_, (ValaCCodeExpression*) _tmp81_);
            _vala_ccode_node_unref0 (_tmp81_);
            _vala_ccode_node_unref0 (_tmp79_);
      }
      vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
      vala_ccode_file_add_function_declaration (((ValaCCodeBaseModule*) self)->cfile, function);
      vala_ccode_file_add_function (((ValaCCodeBaseModule*) self)->cfile, function);
      result = add_func;
      _vala_ccode_node_unref0 (csizecheck);
      _vala_ccode_node_unref0 (renew_call);
      _vala_ccode_node_unref0 (size);
      _vala_ccode_node_unref0 (length);
      _vala_ccode_node_unref0 (array);
      _vala_ccode_node_unref0 (value);
      _g_free0 (typename);
      _vala_ccode_node_unref0 (function);
      return result;
}


static gboolean vala_ccode_array_module_is_array_add (ValaCCodeArrayModule* self, ValaAssignment* assignment) {
      gboolean result = FALSE;
      ValaExpression* _tmp0_ = NULL;
      ValaExpression* _tmp1_;
      ValaBinaryExpression* _tmp2_;
      ValaBinaryExpression* binary;
      gboolean _tmp3_ = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (assignment != NULL, FALSE);
      _tmp0_ = vala_assignment_get_right (assignment);
      _tmp1_ = _tmp0_;
      _tmp2_ = _vala_code_node_ref0 (VALA_IS_BINARY_EXPRESSION (_tmp1_) ? ((ValaBinaryExpression*) _tmp1_) : NULL);
      binary = _tmp2_;
      if (binary != NULL) {
            ValaExpression* _tmp4_ = NULL;
            ValaDataType* _tmp5_ = NULL;
            _tmp4_ = vala_binary_expression_get_left (binary);
            _tmp5_ = vala_expression_get_value_type (_tmp4_);
            _tmp3_ = VALA_IS_ARRAY_TYPE (_tmp5_);
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            ValaBinaryOperator _tmp6_;
            _tmp6_ = vala_binary_expression_get_operator (binary);
            if (_tmp6_ == VALA_BINARY_OPERATOR_PLUS) {
                  ValaExpression* _tmp7_ = NULL;
                  ValaSymbol* _tmp8_ = NULL;
                  ValaExpression* _tmp9_ = NULL;
                  ValaSymbol* _tmp10_ = NULL;
                  _tmp7_ = vala_assignment_get_left (assignment);
                  _tmp8_ = vala_expression_get_symbol_reference (_tmp7_);
                  _tmp9_ = vala_binary_expression_get_left (binary);
                  _tmp10_ = vala_expression_get_symbol_reference (_tmp9_);
                  if (_tmp8_ == _tmp10_) {
                        result = TRUE;
                        _vala_code_node_unref0 (binary);
                        return result;
                  }
            }
      }
      result = FALSE;
      _vala_code_node_unref0 (binary);
      return result;
}


static void vala_ccode_array_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment) {
      ValaCCodeArrayModule * self;
      gboolean _tmp0_;
      ValaExpression* _tmp1_ = NULL;
      ValaBinaryExpression* _tmp2_;
      ValaBinaryExpression* binary;
      ValaExpression* _tmp3_ = NULL;
      ValaExpression* _tmp4_;
      ValaExpression* array;
      ValaDataType* _tmp5_ = NULL;
      ValaArrayType* _tmp6_;
      ValaArrayType* array_type;
      ValaExpression* _tmp7_ = NULL;
      ValaExpression* _tmp8_;
      ValaExpression* element;
      ValaExpression* _tmp9_ = NULL;
      ValaSymbol* _tmp10_ = NULL;
      ValaSymbol* _tmp11_;
      ValaSymbol* array_var;
      gboolean _tmp12_ = FALSE;
      gboolean _tmp13_ = FALSE;
      gboolean _tmp14_ = FALSE;
      gint _tmp15_;
      ValaDataType* _tmp19_ = NULL;
      ValaParameter* _tmp20_ = NULL;
      ValaParameter* value_param;
      gchar* _tmp21_ = NULL;
      gchar* _tmp22_;
      ValaCCodeIdentifier* _tmp23_ = NULL;
      ValaCCodeIdentifier* _tmp24_;
      ValaCCodeFunctionCall* _tmp25_ = NULL;
      ValaCCodeFunctionCall* _tmp26_;
      ValaCCodeFunctionCall* ccall;
      ValaCCodeExpression* _tmp27_ = NULL;
      ValaCCodeExpression* _tmp28_;
      ValaCCodeUnaryExpression* _tmp29_ = NULL;
      ValaCCodeUnaryExpression* _tmp30_;
      ValaCCodeExpression* _tmp31_ = NULL;
      ValaCCodeExpression* _tmp32_;
      ValaCCodeUnaryExpression* _tmp33_ = NULL;
      ValaCCodeUnaryExpression* _tmp34_;
      ValaTargetValue* _tmp35_ = NULL;
      ValaCCodeExpression* _tmp36_ = NULL;
      ValaCCodeExpression* _tmp37_;
      ValaCCodeUnaryExpression* _tmp38_ = NULL;
      ValaCCodeUnaryExpression* _tmp39_;
      ValaCCodeExpression* _tmp40_ = NULL;
      ValaCCodeExpression* _tmp41_;
      ValaCCodeExpression* _tmp42_ = NULL;
      ValaCCodeExpression* _tmp43_;
      ValaCCodeFunction* _tmp44_ = NULL;
      self = (ValaCCodeArrayModule*) base;
      g_return_if_fail (assignment != NULL);
      _tmp0_ = vala_ccode_array_module_is_array_add (self, assignment);
      if (!_tmp0_) {
            VALA_CODE_VISITOR_CLASS (vala_ccode_array_module_parent_class)->visit_assignment ((ValaCodeVisitor*) VALA_CCODE_METHOD_CALL_MODULE (self), assignment);
            return;
      }
      _tmp1_ = vala_assignment_get_right (assignment);
      _tmp2_ = _vala_code_node_ref0 (VALA_BINARY_EXPRESSION (_tmp1_));
      binary = _tmp2_;
      _tmp3_ = vala_binary_expression_get_left (binary);
      _tmp4_ = _vala_code_node_ref0 (_tmp3_);
      array = _tmp4_;
      _tmp5_ = vala_expression_get_value_type (array);
      _tmp6_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp5_));
      array_type = _tmp6_;
      _tmp7_ = vala_binary_expression_get_right (binary);
      _tmp8_ = _vala_code_node_ref0 (_tmp7_);
      element = _tmp8_;
      _tmp9_ = vala_assignment_get_left (assignment);
      _tmp10_ = vala_expression_get_symbol_reference (_tmp9_);
      _tmp11_ = _vala_code_node_ref0 (_tmp10_);
      array_var = _tmp11_;
      _tmp15_ = vala_array_type_get_rank (array_type);
      if (_tmp15_ == 1) {
            _tmp14_ = array_var != NULL;
      } else {
            _tmp14_ = FALSE;
      }
      if (_tmp14_) {
            gboolean _tmp16_;
            _tmp16_ = vala_symbol_is_internal_symbol (array_var);
            _tmp13_ = _tmp16_;
      } else {
            _tmp13_ = FALSE;
      }
      if (_tmp13_) {
            gboolean _tmp17_ = FALSE;
            if (VALA_IS_LOCAL_VARIABLE (array_var)) {
                  _tmp17_ = TRUE;
            } else {
                  _tmp17_ = VALA_IS_FIELD (array_var);
            }
            _tmp12_ = _tmp17_;
      } else {
            _tmp12_ = FALSE;
      }
      if (_tmp12_) {
      } else {
            ValaSourceReference* _tmp18_ = NULL;
            _tmp18_ = vala_code_node_get_source_reference ((ValaCodeNode*) assignment);
            vala_report_error (_tmp18_, "Array concatenation not supported for public array variables and param" \
"eters");
            _vala_code_node_unref0 (array_var);
            _vala_code_node_unref0 (element);
            _vala_code_node_unref0 (array_type);
            _vala_code_node_unref0 (array);
            _vala_code_node_unref0 (binary);
            return;
      }
      _tmp19_ = vala_expression_get_target_type (element);
      _tmp20_ = vala_parameter_new ("value", _tmp19_, NULL);
      value_param = _tmp20_;
      _tmp21_ = vala_ccode_array_module_generate_array_add_wrapper (self, array_type);
      _tmp22_ = _tmp21_;
      _tmp23_ = vala_ccode_identifier_new (_tmp22_);
      _tmp24_ = _tmp23_;
      _tmp25_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp24_);
      _tmp26_ = _tmp25_;
      _vala_ccode_node_unref0 (_tmp24_);
      _g_free0 (_tmp22_);
      ccall = _tmp26_;
      _tmp27_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, array);
      _tmp28_ = _tmp27_;
      _tmp29_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp28_);
      _tmp30_ = _tmp29_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp30_);
      _vala_ccode_node_unref0 (_tmp30_);
      _vala_ccode_node_unref0 (_tmp28_);
      _tmp31_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, array, -1);
      _tmp32_ = _tmp31_;
      _tmp33_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp32_);
      _tmp34_ = _tmp33_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp34_);
      _vala_ccode_node_unref0 (_tmp34_);
      _vala_ccode_node_unref0 (_tmp32_);
      _tmp35_ = vala_expression_get_target_value (array);
      _tmp36_ = vala_ccode_base_module_get_array_size_cvalue ((ValaCCodeBaseModule*) self, _tmp35_);
      _tmp37_ = _tmp36_;
      _tmp38_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp37_);
      _tmp39_ = _tmp38_;
      vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp39_);
      _vala_ccode_node_unref0 (_tmp39_);
      _vala_ccode_node_unref0 (_tmp37_);
      _tmp40_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, element);
      _tmp41_ = _tmp40_;
      _tmp42_ = vala_ccode_base_module_handle_struct_argument ((ValaCCodeBaseModule*) self, value_param, element, _tmp41_);
      _tmp43_ = _tmp42_;
      vala_ccode_function_call_add_argument (ccall, _tmp43_);
      _vala_ccode_node_unref0 (_tmp43_);
      _vala_ccode_node_unref0 (_tmp41_);
      _tmp44_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
      vala_ccode_function_add_expression (_tmp44_, (ValaCCodeExpression*) ccall);
      _vala_ccode_node_unref0 (ccall);
      _vala_code_node_unref0 (value_param);
      _vala_code_node_unref0 (array_var);
      _vala_code_node_unref0 (element);
      _vala_code_node_unref0 (array_type);
      _vala_code_node_unref0 (array);
      _vala_code_node_unref0 (binary);
}


static ValaCCodeParameter* vala_ccode_array_module_real_generate_parameter (ValaCCodeMethodModule* base, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map) {
      ValaCCodeArrayModule * self;
      ValaCCodeParameter* result = NULL;
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp2_ = NULL;
      gchar* _tmp3_ = NULL;
      gchar* ctypename;
      ValaParameterDirection _tmp4_;
      const gchar* _tmp6_ = NULL;
      gchar* _tmp7_ = NULL;
      gchar* _tmp8_;
      ValaCCodeParameter* _tmp9_ = NULL;
      ValaCCodeParameter* _tmp10_;
      ValaCCodeParameter* main_cparam;
      ValaDataType* _tmp11_ = NULL;
      ValaArrayType* _tmp12_;
      ValaArrayType* array_type;
      ValaDataType* _tmp13_ = NULL;
      gdouble _tmp14_;
      gint _tmp15_;
      gboolean _tmp21_;
      self = (ValaCCodeArrayModule*) base;
      g_return_val_if_fail (param != NULL, NULL);
      g_return_val_if_fail (decl_space != NULL, NULL);
      g_return_val_if_fail (cparam_map != NULL, NULL);
      _tmp0_ = vala_variable_get_variable_type ((ValaVariable*) param);
      if (!VALA_IS_ARRAY_TYPE (_tmp0_)) {
            ValaCCodeParameter* _tmp1_ = NULL;
            _tmp1_ = VALA_CCODE_METHOD_MODULE_CLASS (vala_ccode_array_module_parent_class)->generate_parameter ((ValaCCodeMethodModule*) VALA_CCODE_METHOD_CALL_MODULE (self), param, decl_space, cparam_map, carg_map);
            result = _tmp1_;
            return result;
      }
      _tmp2_ = vala_variable_get_variable_type ((ValaVariable*) param);
      _tmp3_ = vala_data_type_get_cname (_tmp2_);
      ctypename = _tmp3_;
      _tmp4_ = vala_parameter_get_direction (param);
      if (_tmp4_ != VALA_PARAMETER_DIRECTION_IN) {
            gchar* _tmp5_;
            _tmp5_ = g_strconcat (ctypename, "*", NULL);
            _g_free0 (ctypename);
            ctypename = _tmp5_;
      }
      _tmp6_ = vala_symbol_get_name ((ValaSymbol*) param);
      _tmp7_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp6_);
      _tmp8_ = _tmp7_;
      _tmp9_ = vala_ccode_parameter_new (_tmp8_, ctypename);
      _tmp10_ = _tmp9_;
      _g_free0 (_tmp8_);
      main_cparam = _tmp10_;
      _tmp11_ = vala_variable_get_variable_type ((ValaVariable*) param);
      _tmp12_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp11_));
      array_type = _tmp12_;
      _tmp13_ = vala_array_type_get_element_type (array_type);
      vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp13_, decl_space);
      _tmp14_ = vala_parameter_get_cparameter_position (param);
      _tmp15_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp14_, FALSE);
      vala_map_set (cparam_map, GINT_TO_POINTER (_tmp15_), main_cparam);
      if (carg_map != NULL) {
            gdouble _tmp16_;
            gint _tmp17_;
            const gchar* _tmp18_ = NULL;
            ValaCCodeExpression* _tmp19_ = NULL;
            ValaCCodeExpression* _tmp20_;
            _tmp16_ = vala_parameter_get_cparameter_position (param);
            _tmp17_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp16_, FALSE);
            _tmp18_ = vala_symbol_get_name ((ValaSymbol*) param);
            _tmp19_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp18_);
            _tmp20_ = _tmp19_;
            vala_map_set (carg_map, GINT_TO_POINTER (_tmp17_), _tmp20_);
            _vala_ccode_node_unref0 (_tmp20_);
      }
      _tmp21_ = vala_variable_get_no_array_length ((ValaVariable*) param);
      if (!_tmp21_) {
            gchar* _tmp22_;
            gchar* length_ctype;
            const gchar* _tmp23_ = NULL;
            ValaParameterDirection _tmp26_;
            _tmp22_ = g_strdup ("int");
            length_ctype = _tmp22_;
            _tmp23_ = vala_variable_get_array_length_type ((ValaVariable*) param);
            if (_tmp23_ != NULL) {
                  const gchar* _tmp24_ = NULL;
                  gchar* _tmp25_;
                  _tmp24_ = vala_variable_get_array_length_type ((ValaVariable*) param);
                  _tmp25_ = g_strdup (_tmp24_);
                  _g_free0 (length_ctype);
                  length_ctype = _tmp25_;
            }
            _tmp26_ = vala_parameter_get_direction (param);
            if (_tmp26_ != VALA_PARAMETER_DIRECTION_IN) {
                  gchar* _tmp27_ = NULL;
                  _tmp27_ = g_strdup_printf ("%s*", length_ctype);
                  _g_free0 (length_ctype);
                  length_ctype = _tmp27_;
            }
            {
                  gint dim;
                  dim = 1;
                  {
                        gboolean _tmp28_;
                        _tmp28_ = TRUE;
                        while (TRUE) {
                              gint _tmp29_;
                              gchar* _tmp30_ = NULL;
                              gchar* _tmp31_;
                              ValaCCodeParameter* _tmp32_ = NULL;
                              ValaCCodeParameter* _tmp33_;
                              ValaCCodeParameter* cparam;
                              gdouble _tmp34_;
                              gint _tmp35_;
                              if (!_tmp28_) {
                                    dim++;
                              }
                              _tmp28_ = FALSE;
                              _tmp29_ = vala_array_type_get_rank (array_type);
                              if (!(dim <= _tmp29_)) {
                                    break;
                              }
                              _tmp30_ = vala_ccode_base_module_get_parameter_array_length_cname ((ValaCCodeBaseModule*) self, param, dim);
                              _tmp31_ = _tmp30_;
                              _tmp32_ = vala_ccode_parameter_new (_tmp31_, length_ctype);
                              _tmp33_ = _tmp32_;
                              _g_free0 (_tmp31_);
                              cparam = _tmp33_;
                              _tmp34_ = vala_parameter_get_carray_length_parameter_position (param);
                              _tmp35_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp34_ + (0.01 * dim), FALSE);
                              vala_map_set (cparam_map, GINT_TO_POINTER (_tmp35_), cparam);
                              if (carg_map != NULL) {
                                    gdouble _tmp36_;
                                    gint _tmp37_;
                                    const gchar* _tmp38_ = NULL;
                                    ValaCCodeExpression* _tmp39_ = NULL;
                                    ValaCCodeExpression* _tmp40_;
                                    _tmp36_ = vala_parameter_get_carray_length_parameter_position (param);
                                    _tmp37_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp36_ + (0.01 * dim), FALSE);
                                    _tmp38_ = vala_ccode_parameter_get_name (cparam);
                                    _tmp39_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp38_);
                                    _tmp40_ = _tmp39_;
                                    vala_map_set (carg_map, GINT_TO_POINTER (_tmp37_), _tmp40_);
                                    _vala_ccode_node_unref0 (_tmp40_);
                              }
                              _vala_ccode_node_unref0 (cparam);
                        }
                  }
            }
            _g_free0 (length_ctype);
      }
      result = main_cparam;
      _vala_code_node_unref0 (array_type);
      _g_free0 (ctypename);
      return result;
}


ValaCCodeArrayModule* vala_ccode_array_module_construct (GType object_type) {
      ValaCCodeArrayModule* self = NULL;
      self = (ValaCCodeArrayModule*) vala_ccode_method_call_module_construct (object_type);
      return self;
}


ValaCCodeArrayModule* vala_ccode_array_module_new (void) {
      return vala_ccode_array_module_construct (VALA_TYPE_CCODE_ARRAY_MODULE);
}


static void vala_ccode_array_module_class_init (ValaCCodeArrayModuleClass * klass) {
      vala_ccode_array_module_parent_class = g_type_class_peek_parent (klass);
      VALA_CODE_VISITOR_CLASS (klass)->finalize = vala_ccode_array_module_finalize;
      g_type_class_add_private (klass, sizeof (ValaCCodeArrayModulePrivate));
      VALA_CODE_VISITOR_CLASS (klass)->visit_array_creation_expression = vala_ccode_array_module_real_visit_array_creation_expression;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_length_cname = vala_ccode_array_module_real_get_array_length_cname;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->get_parameter_array_length_cname = vala_ccode_array_module_real_get_parameter_array_length_cname;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_length_cexpression = vala_ccode_array_module_real_get_array_length_cexpression;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_length_cvalue = vala_ccode_array_module_real_get_array_length_cvalue;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_size_cname = vala_ccode_array_module_real_get_array_size_cname;
      VALA_CODE_VISITOR_CLASS (klass)->visit_element_access = vala_ccode_array_module_real_visit_element_access;
      VALA_CODE_VISITOR_CLASS (klass)->visit_slice_expression = vala_ccode_array_module_real_visit_slice_expression;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->append_struct_array_free = vala_ccode_array_module_real_append_struct_array_free;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_free = vala_ccode_array_module_real_append_vala_array_free;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_move = vala_ccode_array_module_real_append_vala_array_move;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_length = vala_ccode_array_module_real_append_vala_array_length;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->copy_value = vala_ccode_array_module_real_copy_value;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->get_dup_func_expression = vala_ccode_array_module_real_get_dup_func_expression;
      VALA_CCODE_BASE_MODULE_CLASS (klass)->destroy_value = vala_ccode_array_module_real_destroy_value;
      VALA_CODE_VISITOR_CLASS (klass)->visit_assignment = vala_ccode_array_module_real_visit_assignment;
      VALA_CCODE_METHOD_MODULE_CLASS (klass)->generate_parameter = vala_ccode_array_module_real_generate_parameter;
}


static void vala_ccode_array_module_instance_init (ValaCCodeArrayModule * self) {
      self->priv = VALA_CCODE_ARRAY_MODULE_GET_PRIVATE (self);
      self->priv->next_array_dup_id = 0;
      self->priv->next_array_add_id = 0;
}


static void vala_ccode_array_module_finalize (ValaCodeVisitor* obj) {
      ValaCCodeArrayModule * self;
      self = VALA_CCODE_ARRAY_MODULE (obj);
      VALA_CODE_VISITOR_CLASS (vala_ccode_array_module_parent_class)->finalize (obj);
}


GType vala_ccode_array_module_get_type (void) {
      static volatile gsize vala_ccode_array_module_type_id__volatile = 0;
      if (g_once_init_enter (&vala_ccode_array_module_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeArrayModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_array_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeArrayModule), 0, (GInstanceInitFunc) vala_ccode_array_module_instance_init, NULL };
            GType vala_ccode_array_module_type_id;
            vala_ccode_array_module_type_id = g_type_register_static (VALA_TYPE_CCODE_METHOD_CALL_MODULE, "ValaCCodeArrayModule", &g_define_type_info, 0);
            g_once_init_leave (&vala_ccode_array_module_type_id__volatile, vala_ccode_array_module_type_id);
      }
      return vala_ccode_array_module_type_id__volatile;
}




Generated by  Doxygen 1.6.0   Back to index