/* 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_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))
#define _vala_ccode_base_module_emit_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_base_module_emit_context_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

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

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

struct _ValaCCodeStructModuleClass {
	ValaCCodeBaseModuleClass parent_class;
};

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

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

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

struct _ValaCCodeControlFlowModuleClass {
	ValaCCodeMethodModuleClass parent_class;
};

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

struct _ValaCCodeMemberAccessModuleClass {
	ValaCCodeControlFlowModuleClass parent_class;
};

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

struct _ValaCCodeAssignmentModuleClass {
	ValaCCodeMemberAccessModuleClass parent_class;
};

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

struct _ValaCCodeMethodCallModuleClass {
	ValaCCodeAssignmentModuleClass parent_class;
};

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

struct _ValaCCodeArrayModuleClass {
	ValaCCodeMethodCallModuleClass parent_class;
};

struct _ValaCCodeArrayModulePrivate {
	gint next_array_dup_id;
	gint next_array_add_id;
};

struct _ValaGLibValue {
	ValaTargetValue parent_instance;
	ValaGLibValuePrivate * priv;
	ValaCCodeExpression* cvalue;
	gboolean lvalue;
	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;
};

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);
void vala_ccode_base_module_set_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr, ValaCCodeExpression* cvalue);
gchar* vala_ccode_base_module_get_ccode_name (ValaCodeNode* node);
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_ccode_array_length_name (ValaCodeNode* node);
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);
ValaCCodeExpression* vala_ccode_base_module_get_ccodenode (ValaCCodeBaseModule* self, ValaExpression* node);
G_GNUC_INTERNAL GType vala_glib_value_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
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);
ValaTargetValue* vala_ccode_base_module_store_temp_value (ValaCCodeBaseModule* self, ValaTargetValue* initializer, ValaCodeNode* node_reference, gboolean* value_owned);
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);
ValaTargetValue* vala_ccode_base_module_create_temp_value (ValaCCodeBaseModule* self, ValaDataType* type, gboolean init, ValaCodeNode* node_reference, gboolean* value_owned);
static gchar* vala_ccode_array_module_generate_array_copy_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type);
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);
G_GNUC_INTERNAL ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);
G_GNUC_INTERNAL ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);
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);
gdouble vala_ccode_base_module_get_ccode_pos (ValaParameter* param);
gboolean vala_ccode_base_module_get_ccode_array_length (ValaCodeNode* node);
gchar* vala_ccode_base_module_get_ccode_array_length_type (ValaCodeNode* node);
gchar* vala_ccode_base_module_get_parameter_array_length_cname (ValaCCodeBaseModule* self, ValaParameter* param, gint dim);
gdouble vala_ccode_base_module_get_ccode_array_length_pos (ValaCodeNode* node);
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* _e_list = NULL;
		ValaInitializerList* _tmp0_;
		ValaList* _tmp1_;
		gint _e_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _e_index = 0;
		_tmp0_ = initializer_list;
		_tmp1_ = vala_initializer_list_get_initializers (_tmp0_);
		_e_list = _tmp1_;
		_tmp2_ = _e_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_e_size = _tmp4_;
		_e_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaExpression* e = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			gint _tmp11_;
			_tmp5_ = _e_index;
			_e_index = _tmp5_ + 1;
			_tmp6_ = _e_index;
			_tmp7_ = _e_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _e_list;
			_tmp9_ = _e_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			e = (ValaExpression*) _tmp10_;
			_tmp11_ = rank;
			if (_tmp11_ > 1) {
				ValaCCodeExpression* _tmp12_;
				ValaExpression* _tmp13_;
				gint _tmp14_;
				_tmp12_ = name_cnode;
				_tmp13_ = e;
				_tmp14_ = rank;
				vala_ccode_array_module_append_initializer_list (self, _tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, VALA_TYPE_INITIALIZER_LIST, ValaInitializerList), _tmp14_ - 1, i);
			} else {
				ValaCCodeFunction* _tmp15_;
				ValaCCodeFunction* _tmp16_;
				ValaCCodeExpression* _tmp17_;
				gint _tmp18_;
				gchar* _tmp19_;
				gchar* _tmp20_;
				ValaCCodeConstant* _tmp21_;
				ValaCCodeConstant* _tmp22_;
				ValaCCodeElementAccess* _tmp23_;
				ValaCCodeElementAccess* _tmp24_;
				ValaExpression* _tmp25_;
				ValaCCodeExpression* _tmp26_;
				ValaCCodeExpression* _tmp27_;
				gint _tmp28_;
				_tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp16_ = _tmp15_;
				_tmp17_ = name_cnode;
				_tmp18_ = *i;
				_tmp19_ = g_strdup_printf ("%i", _tmp18_);
				_tmp20_ = _tmp19_;
				_tmp21_ = vala_ccode_constant_new (_tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = vala_ccode_element_access_new (_tmp17_, (ValaCCodeExpression*) _tmp22_);
				_tmp24_ = _tmp23_;
				_tmp25_ = e;
				_tmp26_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp25_);
				_tmp27_ = _tmp26_;
				vala_ccode_function_add_assignment (_tmp16_, (ValaCCodeExpression*) _tmp24_, _tmp27_);
				_vala_ccode_node_unref0 (_tmp27_);
				_vala_ccode_node_unref0 (_tmp24_);
				_vala_ccode_node_unref0 (_tmp22_);
				_g_free0 (_tmp20_);
				_tmp28_ = *i;
				*i = _tmp28_ + 1;
			}
			_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;
	ValaArrayType* array_type = NULL;
	ValaArrayCreationExpression* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaArrayType* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ValaArrayType* _tmp5_;
	ValaCCodeFunctionCall* gnew = NULL;
	ValaCCodeIdentifier* _tmp26_;
	ValaCCodeIdentifier* _tmp27_;
	ValaCCodeFunctionCall* _tmp28_;
	ValaCCodeFunctionCall* _tmp29_;
	ValaCCodeFunctionCall* _tmp30_;
	ValaArrayCreationExpression* _tmp31_;
	ValaDataType* _tmp32_;
	ValaDataType* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	ValaCCodeIdentifier* _tmp36_;
	ValaCCodeIdentifier* _tmp37_;
	gboolean first = FALSE;
	ValaCCodeExpression* cexpr = NULL;
	gboolean _tmp59_ = FALSE;
	ValaArrayCreationExpression* _tmp60_;
	ValaDataType* _tmp61_;
	ValaDataType* _tmp62_;
	ValaTypeSymbol* _tmp63_;
	ValaTypeSymbol* _tmp64_;
	ValaCCodeFunctionCall* _tmp75_;
	ValaCCodeExpression* _tmp76_;
	ValaLocalVariable* temp_var = NULL;
	ValaArrayCreationExpression* _tmp77_;
	ValaDataType* _tmp78_;
	ValaDataType* _tmp79_;
	ValaArrayCreationExpression* _tmp80_;
	ValaLocalVariable* _tmp81_;
	ValaCCodeExpression* name_cnode = NULL;
	ValaLocalVariable* _tmp82_;
	const gchar* _tmp83_;
	const gchar* _tmp84_;
	ValaCCodeExpression* _tmp85_;
	gint i = 0;
	ValaLocalVariable* _tmp86_;
	ValaCCodeFunction* _tmp87_;
	ValaCCodeFunction* _tmp88_;
	ValaCCodeExpression* _tmp89_;
	ValaCCodeFunctionCall* _tmp90_;
	ValaArrayCreationExpression* _tmp91_;
	ValaInitializerList* _tmp92_;
	ValaInitializerList* _tmp93_;
	ValaArrayCreationExpression* _tmp101_;
	ValaCCodeExpression* _tmp102_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_expression_get_target_type ((ValaExpression*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp2_) : NULL);
	array_type = _tmp3_;
	_tmp5_ = array_type;
	if (_tmp5_ != NULL) {
		ValaArrayType* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = array_type;
		_tmp7_ = vala_array_type_get_fixed_length (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = _tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaLocalVariable* temp_var = NULL;
		ValaArrayType* _tmp9_;
		ValaArrayCreationExpression* _tmp10_;
		ValaLocalVariable* _tmp11_;
		ValaCCodeExpression* name_cnode = NULL;
		ValaLocalVariable* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		ValaCCodeExpression* _tmp15_;
		gint i = 0;
		ValaLocalVariable* _tmp16_;
		ValaCCodeExpression* _tmp17_;
		ValaArrayCreationExpression* _tmp18_;
		ValaInitializerList* _tmp19_;
		ValaInitializerList* _tmp20_;
		ValaArrayCreationExpression* _tmp21_;
		gint _tmp22_;
		gint _tmp23_;
		ValaArrayCreationExpression* _tmp24_;
		ValaCCodeExpression* _tmp25_;
		_tmp9_ = array_type;
		_tmp10_ = expr;
		_tmp11_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp9_, TRUE, (ValaCodeNode*) _tmp10_, FALSE);
		temp_var = _tmp11_;
		_tmp12_ = temp_var;
		_tmp13_ = vala_symbol_get_name ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp14_);
		name_cnode = _tmp15_;
		i = 0;
		_tmp16_ = temp_var;
		vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp16_);
		_tmp17_ = name_cnode;
		_tmp18_ = expr;
		_tmp19_ = vala_array_creation_expression_get_initializer_list (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = expr;
		_tmp22_ = vala_array_creation_expression_get_rank (_tmp21_);
		_tmp23_ = _tmp22_;
		vala_ccode_array_module_append_initializer_list (self, _tmp17_, _tmp20_, _tmp23_, &i);
		_tmp24_ = expr;
		_tmp25_ = name_cnode;
		vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp24_, _tmp25_);
		_vala_ccode_node_unref0 (name_cnode);
		_vala_code_node_unref0 (temp_var);
		_vala_code_node_unref0 (array_type);
		return;
	}
	_tmp26_ = vala_ccode_identifier_new ("g_new0");
	_tmp27_ = _tmp26_;
	_tmp28_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp27_);
	_tmp29_ = _tmp28_;
	_vala_ccode_node_unref0 (_tmp27_);
	gnew = _tmp29_;
	_tmp30_ = gnew;
	_tmp31_ = expr;
	_tmp32_ = vala_array_creation_expression_get_element_type (_tmp31_);
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = vala_ccode_identifier_new (_tmp35_);
	_tmp37_ = _tmp36_;
	vala_ccode_function_call_add_argument (_tmp30_, (ValaCCodeExpression*) _tmp37_);
	_vala_ccode_node_unref0 (_tmp37_);
	_g_free0 (_tmp35_);
	first = TRUE;
	cexpr = NULL;
	{
		ValaList* _size_list = NULL;
		ValaArrayCreationExpression* _tmp38_;
		ValaList* _tmp39_;
		gint _size_size = 0;
		ValaList* _tmp40_;
		gint _tmp41_;
		gint _tmp42_;
		gint _size_index = 0;
		_tmp38_ = expr;
		_tmp39_ = vala_array_creation_expression_get_sizes (_tmp38_);
		_size_list = _tmp39_;
		_tmp40_ = _size_list;
		_tmp41_ = vala_collection_get_size ((ValaCollection*) _tmp40_);
		_tmp42_ = _tmp41_;
		_size_size = _tmp42_;
		_size_index = -1;
		while (TRUE) {
			gint _tmp43_;
			gint _tmp44_;
			gint _tmp45_;
			ValaExpression* size = NULL;
			ValaList* _tmp46_;
			gint _tmp47_;
			gpointer _tmp48_;
			ValaCCodeExpression* csize = NULL;
			ValaExpression* _tmp49_;
			ValaCCodeExpression* _tmp50_;
			ValaArrayCreationExpression* _tmp51_;
			ValaCCodeExpression* _tmp52_;
			gboolean _tmp53_;
			_tmp43_ = _size_index;
			_size_index = _tmp43_ + 1;
			_tmp44_ = _size_index;
			_tmp45_ = _size_size;
			if (!(_tmp44_ < _tmp45_)) {
				break;
			}
			_tmp46_ = _size_list;
			_tmp47_ = _size_index;
			_tmp48_ = vala_list_get (_tmp46_, _tmp47_);
			size = (ValaExpression*) _tmp48_;
			_tmp49_ = size;
			_tmp50_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp49_);
			csize = _tmp50_;
			_tmp51_ = expr;
			_tmp52_ = csize;
			vala_ccode_base_module_append_array_length ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp51_, _tmp52_);
			_tmp53_ = first;
			if (_tmp53_) {
				ValaCCodeExpression* _tmp54_;
				ValaCCodeExpression* _tmp55_;
				_tmp54_ = csize;
				_tmp55_ = _vala_ccode_node_ref0 (_tmp54_);
				_vala_ccode_node_unref0 (cexpr);
				cexpr = _tmp55_;
				first = FALSE;
			} else {
				ValaCCodeExpression* _tmp56_;
				ValaCCodeExpression* _tmp57_;
				ValaCCodeBinaryExpression* _tmp58_;
				_tmp56_ = cexpr;
				_tmp57_ = csize;
				_tmp58_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp56_, _tmp57_);
				_vala_ccode_node_unref0 (cexpr);
				cexpr = (ValaCCodeExpression*) _tmp58_;
			}
			_vala_ccode_node_unref0 (csize);
			_vala_code_node_unref0 (size);
		}
		_vala_iterable_unref0 (_size_list);
	}
	_tmp60_ = expr;
	_tmp61_ = vala_array_creation_expression_get_element_type (_tmp60_);
	_tmp62_ = _tmp61_;
	_tmp63_ = vala_data_type_get_data_type (_tmp62_);
	_tmp64_ = _tmp63_;
	if (_tmp64_ != NULL) {
		ValaArrayCreationExpression* _tmp65_;
		ValaDataType* _tmp66_;
		ValaDataType* _tmp67_;
		ValaTypeSymbol* _tmp68_;
		ValaTypeSymbol* _tmp69_;
		gboolean _tmp70_;
		_tmp65_ = expr;
		_tmp66_ = vala_array_creation_expression_get_element_type (_tmp65_);
		_tmp67_ = _tmp66_;
		_tmp68_ = vala_data_type_get_data_type (_tmp67_);
		_tmp69_ = _tmp68_;
		_tmp70_ = vala_typesymbol_is_reference_type (_tmp69_);
		_tmp59_ = _tmp70_;
	} else {
		_tmp59_ = FALSE;
	}
	if (_tmp59_) {
		ValaCCodeExpression* _tmp71_;
		ValaCCodeConstant* _tmp72_;
		ValaCCodeConstant* _tmp73_;
		ValaCCodeBinaryExpression* _tmp74_;
		_tmp71_ = cexpr;
		_tmp72_ = vala_ccode_constant_new ("1");
		_tmp73_ = _tmp72_;
		_tmp74_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp71_, (ValaCCodeExpression*) _tmp73_);
		_vala_ccode_node_unref0 (cexpr);
		cexpr = (ValaCCodeExpression*) _tmp74_;
		_vala_ccode_node_unref0 (_tmp73_);
	}
	_tmp75_ = gnew;
	_tmp76_ = cexpr;
	vala_ccode_function_call_add_argument (_tmp75_, _tmp76_);
	_tmp77_ = expr;
	_tmp78_ = vala_expression_get_value_type ((ValaExpression*) _tmp77_);
	_tmp79_ = _tmp78_;
	_tmp80_ = expr;
	_tmp81_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, _tmp79_, TRUE, (ValaCodeNode*) _tmp80_, FALSE);
	temp_var = _tmp81_;
	_tmp82_ = temp_var;
	_tmp83_ = vala_symbol_get_name ((ValaSymbol*) _tmp82_);
	_tmp84_ = _tmp83_;
	_tmp85_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp84_);
	name_cnode = _tmp85_;
	i = 0;
	_tmp86_ = temp_var;
	vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp86_);
	_tmp87_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp88_ = _tmp87_;
	_tmp89_ = name_cnode;
	_tmp90_ = gnew;
	vala_ccode_function_add_assignment (_tmp88_, _tmp89_, (ValaCCodeExpression*) _tmp90_);
	_tmp91_ = expr;
	_tmp92_ = vala_array_creation_expression_get_initializer_list (_tmp91_);
	_tmp93_ = _tmp92_;
	if (_tmp93_ != NULL) {
		ValaCCodeExpression* _tmp94_;
		ValaArrayCreationExpression* _tmp95_;
		ValaInitializerList* _tmp96_;
		ValaInitializerList* _tmp97_;
		ValaArrayCreationExpression* _tmp98_;
		gint _tmp99_;
		gint _tmp100_;
		_tmp94_ = name_cnode;
		_tmp95_ = expr;
		_tmp96_ = vala_array_creation_expression_get_initializer_list (_tmp95_);
		_tmp97_ = _tmp96_;
		_tmp98_ = expr;
		_tmp99_ = vala_array_creation_expression_get_rank (_tmp98_);
		_tmp100_ = _tmp99_;
		vala_ccode_array_module_append_initializer_list (self, _tmp94_, _tmp97_, _tmp100_, &i);
	}
	_tmp101_ = expr;
	_tmp102_ = name_cnode;
	vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp101_, _tmp102_);
	_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;
	const gchar* _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (array_cname != NULL, NULL);
	_tmp0_ = array_cname;
	_tmp1_ = dim;
	_tmp2_ = g_strdup_printf ("%s_length%d", _tmp0_, _tmp1_);
	result = _tmp2_;
	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;
	ValaParameter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (param != NULL, NULL);
	_tmp0_ = param;
	_tmp1_ = vala_ccode_base_module_get_ccode_array_length_name ((ValaCodeNode*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ != NULL;
	_g_free0 (_tmp2_);
	if (_tmp3_) {
		ValaParameter* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = param;
		_tmp5_ = vala_ccode_base_module_get_ccode_array_length_name ((ValaCodeNode*) _tmp4_);
		result = _tmp5_;
		return result;
	} else {
		ValaParameter* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gint _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp6_ = param;
		_tmp7_ = vala_symbol_get_name ((ValaSymbol*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = dim;
		_tmp12_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp10_, _tmp11_);
		_tmp13_ = _tmp12_;
		_g_free0 (_tmp10_);
		result = _tmp13_;
		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;
	ValaExpression* _tmp0_;
	ValaTargetValue* _tmp1_;
	ValaTargetValue* _tmp2_;
	gint _tmp3_;
	ValaCCodeExpression* _tmp4_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (array_expr != NULL, NULL);
	_tmp0_ = array_expr;
	_tmp1_ = vala_expression_get_target_value (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = dim;
	_tmp4_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp2_, _tmp3_);
	result = _tmp4_;
	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;
	ValaArrayType* array_type = NULL;
	ValaTargetValue* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaArrayType* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ValaArrayType* _tmp5_;
	gint _tmp13_;
	ValaList* size = NULL;
	ValaTargetValue* _tmp33_;
	ValaList* _tmp34_;
	ValaList* _tmp35_;
	gboolean _tmp36_ = FALSE;
	ValaList* _tmp37_;
	ValaList* _tmp42_;
	gint _tmp43_;
	gpointer _tmp44_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (value != NULL, NULL);
	_tmp0_ = value;
	_tmp1_ = vala_target_value_get_value_type (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp2_) : NULL);
	array_type = _tmp3_;
	_tmp5_ = array_type;
	if (_tmp5_ != NULL) {
		ValaArrayType* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = array_type;
		_tmp7_ = vala_array_type_get_fixed_length (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = _tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaArrayType* _tmp9_;
		ValaExpression* _tmp10_;
		ValaExpression* _tmp11_;
		ValaCCodeExpression* _tmp12_;
		_tmp9_ = array_type;
		_tmp10_ = vala_array_type_get_length (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp11_);
		result = _tmp12_;
		_vala_code_node_unref0 (array_type);
		return result;
	}
	_tmp13_ = dim;
	if (_tmp13_ == -1) {
		gboolean _tmp14_ = FALSE;
		ValaArrayType* _tmp15_;
		_tmp15_ = array_type;
		if (_tmp15_ != NULL) {
			ValaArrayType* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			_tmp16_ = array_type;
			_tmp17_ = vala_array_type_get_rank (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp14_ = _tmp18_ > 1;
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			ValaCCodeExpression* cexpr = NULL;
			ValaTargetValue* _tmp19_;
			ValaCCodeExpression* _tmp20_;
			_tmp19_ = value;
			_tmp20_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp19_, 1);
			cexpr = _tmp20_;
			{
				gboolean _tmp21_ = FALSE;
				dim = 2;
				_tmp21_ = TRUE;
				while (TRUE) {
					gint _tmp23_;
					ValaArrayType* _tmp24_;
					gint _tmp25_;
					gint _tmp26_;
					ValaCCodeExpression* _tmp27_;
					ValaTargetValue* _tmp28_;
					gint _tmp29_;
					ValaCCodeExpression* _tmp30_;
					ValaCCodeExpression* _tmp31_;
					ValaCCodeBinaryExpression* _tmp32_;
					if (!_tmp21_) {
						gint _tmp22_;
						_tmp22_ = dim;
						dim = _tmp22_ + 1;
					}
					_tmp21_ = FALSE;
					_tmp23_ = dim;
					_tmp24_ = array_type;
					_tmp25_ = vala_array_type_get_rank (_tmp24_);
					_tmp26_ = _tmp25_;
					if (!(_tmp23_ <= _tmp26_)) {
						break;
					}
					_tmp27_ = cexpr;
					_tmp28_ = value;
					_tmp29_ = dim;
					_tmp30_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp28_, _tmp29_);
					_tmp31_ = _tmp30_;
					_tmp32_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp27_, _tmp31_);
					_vala_ccode_node_unref0 (cexpr);
					cexpr = (ValaCCodeExpression*) _tmp32_;
					_vala_ccode_node_unref0 (_tmp31_);
				}
			}
			result = cexpr;
			_vala_code_node_unref0 (array_type);
			return result;
		} else {
			dim = 1;
		}
	}
	_tmp33_ = value;
	_tmp34_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, VALA_TYPE_GLIB_VALUE, ValaGLibValue)->array_length_cvalues;
	_tmp35_ = _vala_iterable_ref0 (_tmp34_);
	size = _tmp35_;
	_tmp37_ = size;
	if (_tmp37_ != NULL) {
		ValaList* _tmp38_;
		gint _tmp39_;
		gint _tmp40_;
		gint _tmp41_;
		_tmp38_ = size;
		_tmp39_ = vala_collection_get_size ((ValaCollection*) _tmp38_);
		_tmp40_ = _tmp39_;
		_tmp41_ = dim;
		_tmp36_ = _tmp40_ >= _tmp41_;
	} else {
		_tmp36_ = FALSE;
	}
	_vala_assert (_tmp36_, "size != null && size.size >= dim");
	_tmp42_ = size;
	_tmp43_ = dim;
	_tmp44_ = vala_list_get (_tmp42_, _tmp43_ - 1);
	result = (ValaCCodeExpression*) _tmp44_;
	_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;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (array_cname != NULL, NULL);
	_tmp0_ = array_cname;
	_tmp1_ = g_strdup_printf ("_%s_size_", _tmp0_);
	result = _tmp1_;
	return result;
}


static void vala_ccode_array_module_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr) {
	ValaCCodeArrayModule * self;
	ValaList* indices = NULL;
	ValaElementAccess* _tmp0_;
	ValaList* _tmp1_;
	gint rank = 0;
	ValaList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	ValaCCodeExpression* ccontainer = NULL;
	ValaElementAccess* _tmp5_;
	ValaExpression* _tmp6_;
	ValaExpression* _tmp7_;
	ValaCCodeExpression* _tmp8_;
	ValaCCodeExpression* cindex = NULL;
	ValaList* _tmp9_;
	gpointer _tmp10_;
	ValaExpression* _tmp11_;
	ValaCCodeExpression* _tmp12_;
	ValaCCodeExpression* _tmp13_;
	ValaElementAccess* _tmp14_;
	ValaExpression* _tmp15_;
	ValaExpression* _tmp16_;
	ValaSymbol* _tmp17_;
	ValaSymbol* _tmp18_;
	ValaElementAccess* _tmp70_;
	ValaTargetValue* _tmp71_;
	ValaTargetValue* _tmp72_;
	ValaElementAccess* _tmp73_;
	ValaDataType* _tmp74_;
	ValaDataType* _tmp75_;
	ValaDataType* _tmp76_;
	ValaDataType* _tmp77_;
	ValaElementAccess* _tmp78_;
	gboolean _tmp79_;
	gboolean _tmp80_;
	ValaElementAccess* _tmp88_;
	ValaTargetValue* _tmp89_;
	ValaTargetValue* _tmp90_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_element_access_get_indices (_tmp0_);
	indices = _tmp1_;
	_tmp2_ = indices;
	_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	rank = _tmp4_;
	_tmp5_ = expr;
	_tmp6_ = vala_element_access_get_container (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp7_);
	ccontainer = _tmp8_;
	_tmp9_ = indices;
	_tmp10_ = vala_list_get (_tmp9_, 0);
	_tmp11_ = (ValaExpression*) _tmp10_;
	_tmp12_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp11_);
	_tmp13_ = _tmp12_;
	_vala_code_node_unref0 (_tmp11_);
	cindex = _tmp13_;
	_tmp14_ = expr;
	_tmp15_ = vala_element_access_get_container (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = vala_expression_get_symbol_reference (_tmp16_);
	_tmp18_ = _tmp17_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, VALA_TYPE_ARRAY_LENGTH_FIELD)) {
		ValaIntegerLiteral* lit = NULL;
		ValaList* _tmp19_;
		gpointer _tmp20_;
		ValaExpression* _tmp21_;
		ValaIntegerLiteral* _tmp22_;
		ValaMemberAccess* memberaccess = NULL;
		ValaElementAccess* _tmp23_;
		ValaExpression* _tmp24_;
		ValaExpression* _tmp25_;
		ValaMemberAccess* _tmp26_;
		gboolean _tmp27_ = FALSE;
		ValaIntegerLiteral* _tmp28_;
		_tmp19_ = indices;
		_tmp20_ = vala_list_get (_tmp19_, 0);
		_tmp21_ = (ValaExpression*) _tmp20_;
		_tmp22_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALA_TYPE_INTEGER_LITERAL) ? ((ValaIntegerLiteral*) _tmp21_) : NULL;
		if (_tmp22_ == NULL) {
			_vala_code_node_unref0 (_tmp21_);
		}
		lit = _tmp22_;
		_tmp23_ = expr;
		_tmp24_ = vala_element_access_get_container (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, VALA_TYPE_MEMBER_ACCESS) ? ((ValaMemberAccess*) _tmp25_) : NULL);
		memberaccess = _tmp26_;
		_tmp28_ = lit;
		if (_tmp28_ != NULL) {
			ValaMemberAccess* _tmp29_;
			_tmp29_ = memberaccess;
			_tmp27_ = _tmp29_ != NULL;
		} else {
			_tmp27_ = FALSE;
		}
		if (_tmp27_) {
			gint dim = 0;
			ValaIntegerLiteral* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			gint _tmp33_;
			ValaElementAccess* _tmp34_;
			ValaMemberAccess* _tmp35_;
			ValaExpression* _tmp36_;
			ValaExpression* _tmp37_;
			gint _tmp38_;
			ValaCCodeExpression* _tmp39_;
			ValaCCodeExpression* _tmp40_;
			_tmp30_ = lit;
			_tmp31_ = vala_integer_literal_get_value (_tmp30_);
			_tmp32_ = _tmp31_;
			_tmp33_ = atoi (_tmp32_);
			dim = _tmp33_;
			_tmp34_ = expr;
			_tmp35_ = memberaccess;
			_tmp36_ = vala_member_access_get_inner (_tmp35_);
			_tmp37_ = _tmp36_;
			_tmp38_ = dim;
			_tmp39_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp37_, _tmp38_ + 1);
			_tmp40_ = _tmp39_;
			vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp34_, _tmp40_);
			_vala_ccode_node_unref0 (_tmp40_);
		} else {
			ValaElementAccess* _tmp41_;
			ValaSourceReference* _tmp42_;
			ValaSourceReference* _tmp43_;
			_tmp41_ = expr;
			_tmp42_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp41_);
			_tmp43_ = _tmp42_;
			vala_report_error (_tmp43_, "only integer literals supported as index");
		}
		_vala_code_node_unref0 (memberaccess);
		_vala_code_node_unref0 (lit);
	} else {
		ValaElementAccess* _tmp65_;
		ValaCCodeExpression* _tmp66_;
		ValaCCodeExpression* _tmp67_;
		ValaCCodeElementAccess* _tmp68_;
		ValaCCodeElementAccess* _tmp69_;
		{
			gint i = 0;
			i = 1;
			{
				gboolean _tmp44_ = FALSE;
				_tmp44_ = TRUE;
				while (TRUE) {
					gint _tmp46_;
					gint _tmp47_;
					ValaCCodeBinaryExpression* cmul = NULL;
					ValaCCodeExpression* _tmp48_;
					ValaElementAccess* _tmp49_;
					ValaExpression* _tmp50_;
					ValaExpression* _tmp51_;
					gint _tmp52_;
					ValaCCodeExpression* _tmp53_;
					ValaCCodeExpression* _tmp54_;
					ValaCCodeBinaryExpression* _tmp55_;
					ValaCCodeBinaryExpression* _tmp56_;
					ValaCCodeBinaryExpression* _tmp57_;
					ValaList* _tmp58_;
					gint _tmp59_;
					gpointer _tmp60_;
					ValaExpression* _tmp61_;
					ValaCCodeExpression* _tmp62_;
					ValaCCodeExpression* _tmp63_;
					ValaCCodeBinaryExpression* _tmp64_;
					if (!_tmp44_) {
						gint _tmp45_;
						_tmp45_ = i;
						i = _tmp45_ + 1;
					}
					_tmp44_ = FALSE;
					_tmp46_ = i;
					_tmp47_ = rank;
					if (!(_tmp46_ < _tmp47_)) {
						break;
					}
					_tmp48_ = cindex;
					_tmp49_ = expr;
					_tmp50_ = vala_element_access_get_container (_tmp49_);
					_tmp51_ = _tmp50_;
					_tmp52_ = i;
					_tmp53_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp51_, _tmp52_ + 1);
					_tmp54_ = _tmp53_;
					_tmp55_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp48_, _tmp54_);
					_tmp56_ = _tmp55_;
					_vala_ccode_node_unref0 (_tmp54_);
					cmul = _tmp56_;
					_tmp57_ = cmul;
					_tmp58_ = indices;
					_tmp59_ = i;
					_tmp60_ = vala_list_get (_tmp58_, _tmp59_);
					_tmp61_ = (ValaExpression*) _tmp60_;
					_tmp62_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp61_);
					_tmp63_ = _tmp62_;
					_tmp64_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp57_, _tmp63_);
					_vala_ccode_node_unref0 (cindex);
					cindex = (ValaCCodeExpression*) _tmp64_;
					_vala_ccode_node_unref0 (_tmp63_);
					_vala_code_node_unref0 (_tmp61_);
					_vala_ccode_node_unref0 (cmul);
				}
			}
		}
		_tmp65_ = expr;
		_tmp66_ = ccontainer;
		_tmp67_ = cindex;
		_tmp68_ = vala_ccode_element_access_new (_tmp66_, _tmp67_);
		_tmp69_ = _tmp68_;
		vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp65_, (ValaCCodeExpression*) _tmp69_);
		_vala_ccode_node_unref0 (_tmp69_);
	}
	_tmp70_ = expr;
	_tmp71_ = vala_expression_get_target_value ((ValaExpression*) _tmp70_);
	_tmp72_ = _tmp71_;
	_tmp73_ = expr;
	_tmp74_ = vala_expression_get_value_type ((ValaExpression*) _tmp73_);
	_tmp75_ = _tmp74_;
	_tmp76_ = vala_data_type_copy (_tmp75_);
	_tmp77_ = _tmp76_;
	vala_target_value_set_value_type (_tmp72_, _tmp77_);
	_vala_code_node_unref0 (_tmp77_);
	_tmp78_ = expr;
	_tmp79_ = vala_expression_get_lvalue ((ValaExpression*) _tmp78_);
	_tmp80_ = _tmp79_;
	if (!_tmp80_) {
		ValaElementAccess* _tmp81_;
		ValaElementAccess* _tmp82_;
		ValaTargetValue* _tmp83_;
		ValaTargetValue* _tmp84_;
		ValaElementAccess* _tmp85_;
		ValaTargetValue* _tmp86_;
		ValaTargetValue* _tmp87_;
		_tmp81_ = expr;
		_tmp82_ = expr;
		_tmp83_ = vala_expression_get_target_value ((ValaExpression*) _tmp82_);
		_tmp84_ = _tmp83_;
		_tmp85_ = expr;
		_tmp86_ = vala_ccode_base_module_store_temp_value ((ValaCCodeBaseModule*) self, _tmp84_, (ValaCodeNode*) _tmp85_, NULL);
		_tmp87_ = _tmp86_;
		vala_expression_set_target_value ((ValaExpression*) _tmp81_, _tmp87_);
		_vala_target_value_unref0 (_tmp87_);
	}
	_tmp88_ = expr;
	_tmp89_ = vala_expression_get_target_value ((ValaExpression*) _tmp88_);
	_tmp90_ = _tmp89_;
	G_TYPE_CHECK_INSTANCE_CAST (_tmp90_, VALA_TYPE_GLIB_VALUE, ValaGLibValue)->lvalue = TRUE;
	_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;
	ValaCCodeExpression* ccontainer = NULL;
	ValaSliceExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaCCodeExpression* _tmp3_;
	ValaCCodeExpression* cstart = NULL;
	ValaSliceExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaExpression* _tmp6_;
	ValaCCodeExpression* _tmp7_;
	ValaCCodeExpression* cstop = NULL;
	ValaSliceExpression* _tmp8_;
	ValaExpression* _tmp9_;
	ValaExpression* _tmp10_;
	ValaCCodeExpression* _tmp11_;
	ValaCCodeBinaryExpression* cstartpointer = NULL;
	ValaCCodeBinaryExpression* _tmp12_;
	ValaCCodeBinaryExpression* splicelen = NULL;
	ValaCCodeBinaryExpression* _tmp13_;
	ValaSliceExpression* _tmp14_;
	ValaSliceExpression* _tmp15_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_slice_expression_get_container (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp2_);
	ccontainer = _tmp3_;
	_tmp4_ = expr;
	_tmp5_ = vala_slice_expression_get_start (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp6_);
	cstart = _tmp7_;
	_tmp8_ = expr;
	_tmp9_ = vala_slice_expression_get_stop (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp10_);
	cstop = _tmp11_;
	_tmp12_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, ccontainer, cstart);
	cstartpointer = _tmp12_;
	_tmp13_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, cstop, cstart);
	splicelen = _tmp13_;
	_tmp14_ = expr;
	vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp14_, (ValaCCodeExpression*) cstartpointer);
	_tmp15_ = expr;
	vala_ccode_base_module_append_array_length ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp15_, (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) {
	ValaCCodeAssignment* cforinit = NULL;
	ValaCCodeIdentifier* _tmp0_;
	ValaCCodeIdentifier* _tmp1_;
	ValaCCodeConstant* _tmp2_;
	ValaCCodeConstant* _tmp3_;
	ValaCCodeAssignment* _tmp4_;
	ValaCCodeAssignment* _tmp5_;
	ValaCCodeBinaryExpression* cforcond = NULL;
	ValaCCodeIdentifier* _tmp6_;
	ValaCCodeIdentifier* _tmp7_;
	ValaCCodeIdentifier* _tmp8_;
	ValaCCodeIdentifier* _tmp9_;
	ValaCCodeBinaryExpression* _tmp10_;
	ValaCCodeBinaryExpression* _tmp11_;
	ValaCCodeAssignment* cforiter = NULL;
	ValaCCodeIdentifier* _tmp12_;
	ValaCCodeIdentifier* _tmp13_;
	ValaCCodeIdentifier* _tmp14_;
	ValaCCodeIdentifier* _tmp15_;
	ValaCCodeConstant* _tmp16_;
	ValaCCodeConstant* _tmp17_;
	ValaCCodeBinaryExpression* _tmp18_;
	ValaCCodeBinaryExpression* _tmp19_;
	ValaCCodeAssignment* _tmp20_;
	ValaCCodeAssignment* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaCCodeFunction* _tmp23_;
	ValaCCodeIdentifier* cptrarray = NULL;
	ValaCCodeIdentifier* _tmp24_;
	ValaCCodeElementAccess* cea = NULL;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeIdentifier* _tmp26_;
	ValaCCodeElementAccess* _tmp27_;
	ValaCCodeElementAccess* _tmp28_;
	ValaCCodeFunctionCall* cfreecall = NULL;
	ValaStruct* _tmp29_;
	ValaStructValueType* _tmp30_;
	ValaStructValueType* _tmp31_;
	ValaCCodeExpression* _tmp32_;
	ValaCCodeExpression* _tmp33_;
	ValaCCodeFunctionCall* _tmp34_;
	ValaCCodeFunctionCall* _tmp35_;
	ValaCCodeUnaryExpression* _tmp36_;
	ValaCCodeUnaryExpression* _tmp37_;
	ValaCCodeFunction* _tmp38_;
	ValaCCodeFunction* _tmp39_;
	ValaCCodeFunction* _tmp40_;
	ValaCCodeFunction* _tmp41_;
	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);
	_tmp23_ = _tmp22_;
	vala_ccode_function_open_for (_tmp23_, (ValaCCodeExpression*) cforinit, (ValaCCodeExpression*) cforcond, (ValaCCodeExpression*) cforiter);
	_tmp24_ = vala_ccode_identifier_new ("array");
	cptrarray = _tmp24_;
	_tmp25_ = vala_ccode_identifier_new ("i");
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_ccode_element_access_new ((ValaCCodeExpression*) cptrarray, (ValaCCodeExpression*) _tmp26_);
	_tmp28_ = _tmp27_;
	_vala_ccode_node_unref0 (_tmp26_);
	cea = _tmp28_;
	_tmp29_ = st;
	_tmp30_ = vala_struct_value_type_new (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp31_, FALSE);
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_ccode_function_call_new (_tmp33_);
	_tmp35_ = _tmp34_;
	_vala_ccode_node_unref0 (_tmp33_);
	_vala_code_node_unref0 (_tmp31_);
	cfreecall = _tmp35_;
	_tmp36_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) cea);
	_tmp37_ = _tmp36_;
	vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) _tmp37_);
	_vala_ccode_node_unref0 (_tmp37_);
	_tmp38_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp39_ = _tmp38_;
	vala_ccode_function_add_expression (_tmp39_, (ValaCCodeExpression*) cfreecall);
	_tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp41_ = _tmp40_;
	vala_ccode_function_close (_tmp41_);
	_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* cname = NULL;
	ValaStruct* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	ValaCCodeFile* _tmp5_;
	const gchar* _tmp6_;
	gboolean _tmp7_;
	ValaCCodeFunction* fun = NULL;
	const gchar* _tmp8_;
	ValaCCodeFunction* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaStruct* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeParameter* _tmp18_;
	ValaCCodeFunction* _tmp19_;
	ValaCCodeParameter* _tmp20_;
	ValaCCodeParameter* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaCCodeBinaryExpression* ccondarr = NULL;
	ValaCCodeIdentifier* _tmp23_;
	ValaCCodeIdentifier* _tmp24_;
	ValaCCodeConstant* _tmp25_;
	ValaCCodeConstant* _tmp26_;
	ValaCCodeBinaryExpression* _tmp27_;
	ValaCCodeBinaryExpression* _tmp28_;
	ValaCCodeFunction* _tmp29_;
	ValaCCodeFunction* _tmp30_;
	ValaCCodeBinaryExpression* _tmp31_;
	ValaCCodeFunction* _tmp32_;
	ValaCCodeFunction* _tmp33_;
	ValaCCodeVariableDeclarator* _tmp34_;
	ValaCCodeVariableDeclarator* _tmp35_;
	ValaStruct* _tmp36_;
	ValaCCodeFunction* _tmp37_;
	ValaCCodeFunction* _tmp38_;
	ValaCCodeFunctionCall* carrfree = NULL;
	ValaCCodeIdentifier* _tmp39_;
	ValaCCodeIdentifier* _tmp40_;
	ValaCCodeFunctionCall* _tmp41_;
	ValaCCodeFunctionCall* _tmp42_;
	ValaCCodeFunctionCall* _tmp43_;
	ValaCCodeIdentifier* _tmp44_;
	ValaCCodeIdentifier* _tmp45_;
	ValaCCodeFunction* _tmp46_;
	ValaCCodeFunction* _tmp47_;
	ValaCCodeFunctionCall* _tmp48_;
	ValaCCodeFile* _tmp49_;
	ValaCCodeFunction* _tmp50_;
	ValaCCodeFile* _tmp51_;
	ValaCCodeFunction* _tmp52_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (st != NULL, NULL);
	_tmp0_ = st;
	_tmp1_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf ("_vala_%s_array_free", _tmp2_);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	cname = _tmp4_;
	_tmp5_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp6_ = cname;
	_tmp7_ = vala_ccode_file_add_declaration (_tmp5_, _tmp6_);
	if (_tmp7_) {
		result = cname;
		return result;
	}
	_tmp8_ = cname;
	_tmp9_ = vala_ccode_function_new (_tmp8_, "void");
	fun = _tmp9_;
	_tmp10_ = fun;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp10_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp11_ = fun;
	_tmp12_ = st;
	_tmp13_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_strdup_printf ("%s *", _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = vala_ccode_parameter_new ("array", _tmp16_);
	_tmp18_ = _tmp17_;
	vala_ccode_function_add_parameter (_tmp11_, _tmp18_);
	_vala_ccode_node_unref0 (_tmp18_);
	_g_free0 (_tmp16_);
	_g_free0 (_tmp14_);
	_tmp19_ = fun;
	_tmp20_ = vala_ccode_parameter_new ("array_length", "gint");
	_tmp21_ = _tmp20_;
	vala_ccode_function_add_parameter (_tmp19_, _tmp21_);
	_vala_ccode_node_unref0 (_tmp21_);
	_tmp22_ = fun;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp22_);
	_tmp23_ = vala_ccode_identifier_new ("array");
	_tmp24_ = _tmp23_;
	_tmp25_ = vala_ccode_constant_new ("NULL");
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp24_, (ValaCCodeExpression*) _tmp26_);
	_tmp28_ = _tmp27_;
	_vala_ccode_node_unref0 (_tmp26_);
	_vala_ccode_node_unref0 (_tmp24_);
	ccondarr = _tmp28_;
	_tmp29_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp30_ = _tmp29_;
	_tmp31_ = ccondarr;
	vala_ccode_function_open_if (_tmp30_, (ValaCCodeExpression*) _tmp31_);
	_tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
	_tmp35_ = _tmp34_;
	vala_ccode_function_add_declaration (_tmp33_, "int", (ValaCCodeDeclarator*) _tmp35_, 0);
	_vala_ccode_node_unref0 (_tmp35_);
	_tmp36_ = st;
	vala_ccode_array_module_append_struct_array_free_loop (self, _tmp36_);
	_tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp38_ = _tmp37_;
	vala_ccode_function_close (_tmp38_);
	_tmp39_ = vala_ccode_identifier_new ("g_free");
	_tmp40_ = _tmp39_;
	_tmp41_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp40_);
	_tmp42_ = _tmp41_;
	_vala_ccode_node_unref0 (_tmp40_);
	carrfree = _tmp42_;
	_tmp43_ = carrfree;
	_tmp44_ = vala_ccode_identifier_new ("array");
	_tmp45_ = _tmp44_;
	vala_ccode_function_call_add_argument (_tmp43_, (ValaCCodeExpression*) _tmp45_);
	_vala_ccode_node_unref0 (_tmp45_);
	_tmp46_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp47_ = _tmp46_;
	_tmp48_ = carrfree;
	vala_ccode_function_add_expression (_tmp47_, (ValaCCodeExpression*) _tmp48_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp49_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp50_ = fun;
	vala_ccode_file_add_function_declaration (_tmp49_, _tmp50_);
	_tmp51_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp52_ = fun;
	vala_ccode_file_add_function (_tmp51_, _tmp52_);
	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) {
	ValaCCodeAssignment* cforinit = NULL;
	ValaCCodeIdentifier* _tmp0_;
	ValaCCodeIdentifier* _tmp1_;
	ValaCCodeConstant* _tmp2_;
	ValaCCodeConstant* _tmp3_;
	ValaCCodeAssignment* _tmp4_;
	ValaCCodeAssignment* _tmp5_;
	ValaCCodeBinaryExpression* cforcond = NULL;
	ValaCCodeIdentifier* _tmp6_;
	ValaCCodeIdentifier* _tmp7_;
	ValaCCodeIdentifier* _tmp8_;
	ValaCCodeIdentifier* _tmp9_;
	ValaCCodeBinaryExpression* _tmp10_;
	ValaCCodeBinaryExpression* _tmp11_;
	ValaCCodeAssignment* cforiter = NULL;
	ValaCCodeIdentifier* _tmp12_;
	ValaCCodeIdentifier* _tmp13_;
	ValaCCodeIdentifier* _tmp14_;
	ValaCCodeIdentifier* _tmp15_;
	ValaCCodeConstant* _tmp16_;
	ValaCCodeConstant* _tmp17_;
	ValaCCodeBinaryExpression* _tmp18_;
	ValaCCodeBinaryExpression* _tmp19_;
	ValaCCodeAssignment* _tmp20_;
	ValaCCodeAssignment* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaCCodeFunction* _tmp23_;
	ValaCCodeCastExpression* cptrarray = NULL;
	ValaCCodeIdentifier* _tmp24_;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeCastExpression* _tmp26_;
	ValaCCodeCastExpression* _tmp27_;
	ValaCCodeElementAccess* cea = NULL;
	ValaCCodeIdentifier* _tmp28_;
	ValaCCodeIdentifier* _tmp29_;
	ValaCCodeElementAccess* _tmp30_;
	ValaCCodeElementAccess* _tmp31_;
	ValaCCodeBinaryExpression* cfreecond = NULL;
	ValaCCodeConstant* _tmp32_;
	ValaCCodeConstant* _tmp33_;
	ValaCCodeBinaryExpression* _tmp34_;
	ValaCCodeBinaryExpression* _tmp35_;
	ValaCCodeFunction* _tmp36_;
	ValaCCodeFunction* _tmp37_;
	ValaCCodeFunctionCall* cfreecall = NULL;
	ValaCCodeIdentifier* _tmp38_;
	ValaCCodeIdentifier* _tmp39_;
	ValaCCodeFunctionCall* _tmp40_;
	ValaCCodeFunctionCall* _tmp41_;
	ValaCCodeFunction* _tmp42_;
	ValaCCodeFunction* _tmp43_;
	ValaCCodeFunction* _tmp44_;
	ValaCCodeFunction* _tmp45_;
	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);
	_tmp23_ = _tmp22_;
	vala_ccode_function_open_for (_tmp23_, (ValaCCodeExpression*) cforinit, (ValaCCodeExpression*) cforcond, (ValaCCodeExpression*) cforiter);
	_tmp24_ = vala_ccode_identifier_new ("array");
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp25_, "gpointer*");
	_tmp27_ = _tmp26_;
	_vala_ccode_node_unref0 (_tmp25_);
	cptrarray = _tmp27_;
	_tmp28_ = vala_ccode_identifier_new ("i");
	_tmp29_ = _tmp28_;
	_tmp30_ = vala_ccode_element_access_new ((ValaCCodeExpression*) cptrarray, (ValaCCodeExpression*) _tmp29_);
	_tmp31_ = _tmp30_;
	_vala_ccode_node_unref0 (_tmp29_);
	cea = _tmp31_;
	_tmp32_ = vala_ccode_constant_new ("NULL");
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) cea, (ValaCCodeExpression*) _tmp33_);
	_tmp35_ = _tmp34_;
	_vala_ccode_node_unref0 (_tmp33_);
	cfreecond = _tmp35_;
	_tmp36_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp37_ = _tmp36_;
	vala_ccode_function_open_if (_tmp37_, (ValaCCodeExpression*) cfreecond);
	_tmp38_ = vala_ccode_identifier_new ("destroy_func");
	_tmp39_ = _tmp38_;
	_tmp40_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp39_);
	_tmp41_ = _tmp40_;
	_vala_ccode_node_unref0 (_tmp39_);
	cfreecall = _tmp41_;
	vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) cea);
	_tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp43_ = _tmp42_;
	vala_ccode_function_add_expression (_tmp43_, (ValaCCodeExpression*) cfreecall);
	_tmp44_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp45_ = _tmp44_;
	vala_ccode_function_close (_tmp45_);
	_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* fun = NULL;
	ValaCCodeFunction* _tmp0_;
	ValaCCodeFunction* _tmp1_;
	ValaCCodeFunction* _tmp2_;
	ValaCCodeParameter* _tmp3_;
	ValaCCodeParameter* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaCCodeParameter* _tmp6_;
	ValaCCodeParameter* _tmp7_;
	ValaCCodeFunction* _tmp8_;
	ValaCCodeParameter* _tmp9_;
	ValaCCodeParameter* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaCCodeBinaryExpression* ccondarr = NULL;
	ValaCCodeIdentifier* _tmp12_;
	ValaCCodeIdentifier* _tmp13_;
	ValaCCodeConstant* _tmp14_;
	ValaCCodeConstant* _tmp15_;
	ValaCCodeBinaryExpression* _tmp16_;
	ValaCCodeBinaryExpression* _tmp17_;
	ValaCCodeBinaryExpression* ccondfunc = NULL;
	ValaCCodeIdentifier* _tmp18_;
	ValaCCodeIdentifier* _tmp19_;
	ValaCCodeConstant* _tmp20_;
	ValaCCodeConstant* _tmp21_;
	ValaCCodeBinaryExpression* _tmp22_;
	ValaCCodeBinaryExpression* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	ValaCCodeFunction* _tmp25_;
	ValaCCodeBinaryExpression* _tmp26_;
	ValaCCodeBinaryExpression* _tmp27_;
	ValaCCodeFunction* _tmp28_;
	ValaCCodeFunction* _tmp29_;
	ValaCCodeVariableDeclarator* _tmp30_;
	ValaCCodeVariableDeclarator* _tmp31_;
	ValaCCodeFunction* _tmp32_;
	ValaCCodeFunction* _tmp33_;
	ValaCCodeFile* _tmp34_;
	ValaCCodeFunction* _tmp35_;
	ValaCCodeFile* _tmp36_;
	ValaCCodeFunction* _tmp37_;
	ValaCCodeFunction* _tmp38_;
	ValaCCodeFunction* _tmp39_;
	ValaCCodeFunction* _tmp40_;
	ValaCCodeParameter* _tmp41_;
	ValaCCodeParameter* _tmp42_;
	ValaCCodeFunction* _tmp43_;
	ValaCCodeParameter* _tmp44_;
	ValaCCodeParameter* _tmp45_;
	ValaCCodeFunction* _tmp46_;
	ValaCCodeParameter* _tmp47_;
	ValaCCodeParameter* _tmp48_;
	ValaCCodeFunction* _tmp49_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaCCodeIdentifier* _tmp50_;
	ValaCCodeIdentifier* _tmp51_;
	ValaCCodeFunctionCall* _tmp52_;
	ValaCCodeFunctionCall* _tmp53_;
	ValaCCodeIdentifier* _tmp54_;
	ValaCCodeIdentifier* _tmp55_;
	ValaCCodeIdentifier* _tmp56_;
	ValaCCodeIdentifier* _tmp57_;
	ValaCCodeIdentifier* _tmp58_;
	ValaCCodeIdentifier* _tmp59_;
	ValaCCodeFunction* _tmp60_;
	ValaCCodeFunction* _tmp61_;
	ValaCCodeFunctionCall* carrfree = NULL;
	ValaCCodeIdentifier* _tmp62_;
	ValaCCodeIdentifier* _tmp63_;
	ValaCCodeFunctionCall* _tmp64_;
	ValaCCodeFunctionCall* _tmp65_;
	ValaCCodeIdentifier* _tmp66_;
	ValaCCodeIdentifier* _tmp67_;
	ValaCCodeFunction* _tmp68_;
	ValaCCodeFunction* _tmp69_;
	ValaCCodeFile* _tmp70_;
	ValaCCodeFunction* _tmp71_;
	ValaCCodeFile* _tmp72_;
	ValaCCodeFunction* _tmp73_;
	self = (ValaCCodeArrayModule*) base;
	_tmp0_ = vala_ccode_function_new ("_vala_array_destroy", "void");
	fun = _tmp0_;
	_tmp1_ = fun;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp1_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp2_ = fun;
	_tmp3_ = vala_ccode_parameter_new ("array", "gpointer");
	_tmp4_ = _tmp3_;
	vala_ccode_function_add_parameter (_tmp2_, _tmp4_);
	_vala_ccode_node_unref0 (_tmp4_);
	_tmp5_ = fun;
	_tmp6_ = vala_ccode_parameter_new ("array_length", "gint");
	_tmp7_ = _tmp6_;
	vala_ccode_function_add_parameter (_tmp5_, _tmp7_);
	_vala_ccode_node_unref0 (_tmp7_);
	_tmp8_ = fun;
	_tmp9_ = vala_ccode_parameter_new ("destroy_func", "GDestroyNotify");
	_tmp10_ = _tmp9_;
	vala_ccode_function_add_parameter (_tmp8_, _tmp10_);
	_vala_ccode_node_unref0 (_tmp10_);
	_tmp11_ = fun;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp11_);
	_tmp12_ = vala_ccode_identifier_new ("array");
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_ccode_constant_new ("NULL");
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp13_, (ValaCCodeExpression*) _tmp15_);
	_tmp17_ = _tmp16_;
	_vala_ccode_node_unref0 (_tmp15_);
	_vala_ccode_node_unref0 (_tmp13_);
	ccondarr = _tmp17_;
	_tmp18_ = vala_ccode_identifier_new ("destroy_func");
	_tmp19_ = _tmp18_;
	_tmp20_ = vala_ccode_constant_new ("NULL");
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp19_, (ValaCCodeExpression*) _tmp21_);
	_tmp23_ = _tmp22_;
	_vala_ccode_node_unref0 (_tmp21_);
	_vala_ccode_node_unref0 (_tmp19_);
	ccondfunc = _tmp23_;
	_tmp24_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) ccondarr, (ValaCCodeExpression*) ccondfunc);
	_tmp27_ = _tmp26_;
	vala_ccode_function_open_if (_tmp25_, (ValaCCodeExpression*) _tmp27_);
	_vala_ccode_node_unref0 (_tmp27_);
	_tmp28_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp29_ = _tmp28_;
	_tmp30_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
	_tmp31_ = _tmp30_;
	vala_ccode_function_add_declaration (_tmp29_, "int", (ValaCCodeDeclarator*) _tmp31_, 0);
	_vala_ccode_node_unref0 (_tmp31_);
	vala_ccode_array_module_append_vala_array_free_loop (self);
	_tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp33_ = _tmp32_;
	vala_ccode_function_close (_tmp33_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp34_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp35_ = fun;
	vala_ccode_file_add_function_declaration (_tmp34_, _tmp35_);
	_tmp36_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp37_ = fun;
	vala_ccode_file_add_function (_tmp36_, _tmp37_);
	_tmp38_ = vala_ccode_function_new ("_vala_array_free", "void");
	_vala_ccode_node_unref0 (fun);
	fun = _tmp38_;
	_tmp39_ = fun;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp39_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp40_ = fun;
	_tmp41_ = vala_ccode_parameter_new ("array", "gpointer");
	_tmp42_ = _tmp41_;
	vala_ccode_function_add_parameter (_tmp40_, _tmp42_);
	_vala_ccode_node_unref0 (_tmp42_);
	_tmp43_ = fun;
	_tmp44_ = vala_ccode_parameter_new ("array_length", "gint");
	_tmp45_ = _tmp44_;
	vala_ccode_function_add_parameter (_tmp43_, _tmp45_);
	_vala_ccode_node_unref0 (_tmp45_);
	_tmp46_ = fun;
	_tmp47_ = vala_ccode_parameter_new ("destroy_func", "GDestroyNotify");
	_tmp48_ = _tmp47_;
	vala_ccode_function_add_parameter (_tmp46_, _tmp48_);
	_vala_ccode_node_unref0 (_tmp48_);
	_tmp49_ = fun;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp49_);
	_tmp50_ = vala_ccode_identifier_new ("_vala_array_destroy");
	_tmp51_ = _tmp50_;
	_tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp51_);
	_tmp53_ = _tmp52_;
	_vala_ccode_node_unref0 (_tmp51_);
	ccall = _tmp53_;
	_tmp54_ = vala_ccode_identifier_new ("array");
	_tmp55_ = _tmp54_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp55_);
	_vala_ccode_node_unref0 (_tmp55_);
	_tmp56_ = vala_ccode_identifier_new ("array_length");
	_tmp57_ = _tmp56_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp57_);
	_vala_ccode_node_unref0 (_tmp57_);
	_tmp58_ = vala_ccode_identifier_new ("destroy_func");
	_tmp59_ = _tmp58_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp59_);
	_vala_ccode_node_unref0 (_tmp59_);
	_tmp60_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp61_ = _tmp60_;
	vala_ccode_function_add_expression (_tmp61_, (ValaCCodeExpression*) ccall);
	_tmp62_ = vala_ccode_identifier_new ("g_free");
	_tmp63_ = _tmp62_;
	_tmp64_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp63_);
	_tmp65_ = _tmp64_;
	_vala_ccode_node_unref0 (_tmp63_);
	carrfree = _tmp65_;
	_tmp66_ = vala_ccode_identifier_new ("array");
	_tmp67_ = _tmp66_;
	vala_ccode_function_call_add_argument (carrfree, (ValaCCodeExpression*) _tmp67_);
	_vala_ccode_node_unref0 (_tmp67_);
	_tmp68_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp69_ = _tmp68_;
	vala_ccode_function_add_expression (_tmp69_, (ValaCCodeExpression*) carrfree);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp70_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp71_ = fun;
	vala_ccode_file_add_function_declaration (_tmp70_, _tmp71_);
	_tmp72_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp73_ = fun;
	vala_ccode_file_add_function (_tmp72_, _tmp73_);
	_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;
	ValaCCodeFile* _tmp0_;
	ValaCCodeFunction* fun = NULL;
	ValaCCodeFunction* _tmp1_;
	ValaCCodeParameter* _tmp2_;
	ValaCCodeParameter* _tmp3_;
	ValaCCodeParameter* _tmp4_;
	ValaCCodeParameter* _tmp5_;
	ValaCCodeParameter* _tmp6_;
	ValaCCodeParameter* _tmp7_;
	ValaCCodeParameter* _tmp8_;
	ValaCCodeParameter* _tmp9_;
	ValaCCodeParameter* _tmp10_;
	ValaCCodeParameter* _tmp11_;
	ValaCCodeCastExpression* array = NULL;
	ValaCCodeIdentifier* _tmp12_;
	ValaCCodeIdentifier* _tmp13_;
	ValaCCodeCastExpression* _tmp14_;
	ValaCCodeCastExpression* _tmp15_;
	ValaCCodeIdentifier* element_size = NULL;
	ValaCCodeIdentifier* _tmp16_;
	ValaCCodeIdentifier* length = NULL;
	ValaCCodeIdentifier* _tmp17_;
	ValaCCodeIdentifier* src = NULL;
	ValaCCodeIdentifier* _tmp18_;
	ValaCCodeBinaryExpression* src_end = NULL;
	ValaCCodeBinaryExpression* _tmp19_;
	ValaCCodeIdentifier* dest = NULL;
	ValaCCodeIdentifier* _tmp20_;
	ValaCCodeBinaryExpression* dest_end = NULL;
	ValaCCodeBinaryExpression* _tmp21_;
	ValaCCodeBinaryExpression* src_address = NULL;
	ValaCCodeBinaryExpression* _tmp22_;
	ValaCCodeBinaryExpression* _tmp23_;
	ValaCCodeBinaryExpression* _tmp24_;
	ValaCCodeBinaryExpression* _tmp25_;
	ValaCCodeBinaryExpression* dest_address = NULL;
	ValaCCodeBinaryExpression* _tmp26_;
	ValaCCodeBinaryExpression* _tmp27_;
	ValaCCodeBinaryExpression* _tmp28_;
	ValaCCodeBinaryExpression* _tmp29_;
	ValaCCodeBinaryExpression* dest_end_address = NULL;
	ValaCCodeBinaryExpression* _tmp30_;
	ValaCCodeBinaryExpression* _tmp31_;
	ValaCCodeBinaryExpression* _tmp32_;
	ValaCCodeBinaryExpression* _tmp33_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaCCodeIdentifier* _tmp34_;
	ValaCCodeIdentifier* _tmp35_;
	ValaCCodeFunctionCall* _tmp36_;
	ValaCCodeFunctionCall* _tmp37_;
	ValaCCodeBinaryExpression* _tmp38_;
	ValaCCodeBinaryExpression* _tmp39_;
	ValaCCodeFunction* _tmp40_;
	ValaCCodeFunction* _tmp41_;
	ValaCCodeFunction* _tmp42_;
	ValaCCodeFunction* _tmp43_;
	ValaCCodeBinaryExpression* _tmp44_;
	ValaCCodeBinaryExpression* _tmp45_;
	ValaCCodeBinaryExpression* _tmp46_;
	ValaCCodeBinaryExpression* _tmp47_;
	ValaCCodeBinaryExpression* _tmp48_;
	ValaCCodeBinaryExpression* _tmp49_;
	ValaCCodeFunctionCall* czero1 = NULL;
	ValaCCodeIdentifier* _tmp50_;
	ValaCCodeIdentifier* _tmp51_;
	ValaCCodeFunctionCall* _tmp52_;
	ValaCCodeFunctionCall* _tmp53_;
	ValaCCodeConstant* _tmp54_;
	ValaCCodeConstant* _tmp55_;
	ValaCCodeBinaryExpression* _tmp56_;
	ValaCCodeBinaryExpression* _tmp57_;
	ValaCCodeBinaryExpression* _tmp58_;
	ValaCCodeBinaryExpression* _tmp59_;
	ValaCCodeFunction* _tmp60_;
	ValaCCodeFunction* _tmp61_;
	ValaCCodeFunction* _tmp62_;
	ValaCCodeFunction* _tmp63_;
	ValaCCodeBinaryExpression* _tmp64_;
	ValaCCodeBinaryExpression* _tmp65_;
	ValaCCodeBinaryExpression* _tmp66_;
	ValaCCodeBinaryExpression* _tmp67_;
	ValaCCodeBinaryExpression* _tmp68_;
	ValaCCodeBinaryExpression* _tmp69_;
	ValaCCodeFunctionCall* czero2 = NULL;
	ValaCCodeIdentifier* _tmp70_;
	ValaCCodeIdentifier* _tmp71_;
	ValaCCodeFunctionCall* _tmp72_;
	ValaCCodeFunctionCall* _tmp73_;
	ValaCCodeConstant* _tmp74_;
	ValaCCodeConstant* _tmp75_;
	ValaCCodeBinaryExpression* _tmp76_;
	ValaCCodeBinaryExpression* _tmp77_;
	ValaCCodeBinaryExpression* _tmp78_;
	ValaCCodeBinaryExpression* _tmp79_;
	ValaCCodeFunction* _tmp80_;
	ValaCCodeFunction* _tmp81_;
	ValaCCodeFunction* _tmp82_;
	ValaCCodeFunction* _tmp83_;
	ValaCCodeBinaryExpression* _tmp84_;
	ValaCCodeBinaryExpression* _tmp85_;
	ValaCCodeFunctionCall* czero3 = NULL;
	ValaCCodeIdentifier* _tmp86_;
	ValaCCodeIdentifier* _tmp87_;
	ValaCCodeFunctionCall* _tmp88_;
	ValaCCodeFunctionCall* _tmp89_;
	ValaCCodeConstant* _tmp90_;
	ValaCCodeConstant* _tmp91_;
	ValaCCodeBinaryExpression* _tmp92_;
	ValaCCodeBinaryExpression* _tmp93_;
	ValaCCodeFunction* _tmp94_;
	ValaCCodeFunction* _tmp95_;
	ValaCCodeFunction* _tmp96_;
	ValaCCodeFunction* _tmp97_;
	ValaCCodeFile* _tmp98_;
	ValaCCodeFile* _tmp99_;
	self = (ValaCCodeArrayModule*) base;
	_tmp0_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_include (_tmp0_, "string.h", FALSE);
	_tmp1_ = vala_ccode_function_new ("_vala_array_move", "void");
	fun = _tmp1_;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) fun, VALA_CCODE_MODIFIERS_STATIC);
	_tmp2_ = vala_ccode_parameter_new ("array", "gpointer");
	_tmp3_ = _tmp2_;
	vala_ccode_function_add_parameter (fun, _tmp3_);
	_vala_ccode_node_unref0 (_tmp3_);
	_tmp4_ = vala_ccode_parameter_new ("element_size", "gsize");
	_tmp5_ = _tmp4_;
	vala_ccode_function_add_parameter (fun, _tmp5_);
	_vala_ccode_node_unref0 (_tmp5_);
	_tmp6_ = vala_ccode_parameter_new ("src", "gint");
	_tmp7_ = _tmp6_;
	vala_ccode_function_add_parameter (fun, _tmp7_);
	_vala_ccode_node_unref0 (_tmp7_);
	_tmp8_ = vala_ccode_parameter_new ("dest", "gint");
	_tmp9_ = _tmp8_;
	vala_ccode_function_add_parameter (fun, _tmp9_);
	_vala_ccode_node_unref0 (_tmp9_);
	_tmp10_ = vala_ccode_parameter_new ("length", "gint");
	_tmp11_ = _tmp10_;
	vala_ccode_function_add_parameter (fun, _tmp11_);
	_vala_ccode_node_unref0 (_tmp11_);
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
	_tmp12_ = vala_ccode_identifier_new ("array");
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp13_, "char*");
	_tmp15_ = _tmp14_;
	_vala_ccode_node_unref0 (_tmp13_);
	array = _tmp15_;
	_tmp16_ = vala_ccode_identifier_new ("element_size");
	element_size = _tmp16_;
	_tmp17_ = vala_ccode_identifier_new ("length");
	length = _tmp17_;
	_tmp18_ = vala_ccode_identifier_new ("src");
	src = _tmp18_;
	_tmp19_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) src, (ValaCCodeExpression*) length);
	src_end = _tmp19_;
	_tmp20_ = vala_ccode_identifier_new ("dest");
	dest = _tmp20_;
	_tmp21_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) length);
	dest_end = _tmp21_;
	_tmp22_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) src, (ValaCCodeExpression*) element_size);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp23_);
	_tmp25_ = _tmp24_;
	_vala_ccode_node_unref0 (_tmp23_);
	src_address = _tmp25_;
	_tmp26_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) element_size);
	_tmp27_ = _tmp26_;
	_tmp28_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp27_);
	_tmp29_ = _tmp28_;
	_vala_ccode_node_unref0 (_tmp27_);
	dest_address = _tmp29_;
	_tmp30_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) dest_end, (ValaCCodeExpression*) element_size);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp31_);
	_tmp33_ = _tmp32_;
	_vala_ccode_node_unref0 (_tmp31_);
	dest_end_address = _tmp33_;
	_tmp34_ = vala_ccode_identifier_new ("g_memmove");
	_tmp35_ = _tmp34_;
	_tmp36_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp35_);
	_tmp37_ = _tmp36_;
	_vala_ccode_node_unref0 (_tmp35_);
	ccall = _tmp37_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) dest_address);
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) src_address);
	_tmp38_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) length, (ValaCCodeExpression*) element_size);
	_tmp39_ = _tmp38_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp39_);
	_vala_ccode_node_unref0 (_tmp39_);
	_tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp41_ = _tmp40_;
	vala_ccode_function_add_expression (_tmp41_, (ValaCCodeExpression*) ccall);
	_tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp43_ = _tmp42_;
	_tmp44_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp45_ = _tmp44_;
	_tmp46_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_GREATER_THAN, (ValaCCodeExpression*) src_end, (ValaCCodeExpression*) dest);
	_tmp47_ = _tmp46_;
	_tmp48_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) _tmp45_, (ValaCCodeExpression*) _tmp47_);
	_tmp49_ = _tmp48_;
	vala_ccode_function_open_if (_tmp43_, (ValaCCodeExpression*) _tmp49_);
	_vala_ccode_node_unref0 (_tmp49_);
	_vala_ccode_node_unref0 (_tmp47_);
	_vala_ccode_node_unref0 (_tmp45_);
	_tmp50_ = vala_ccode_identifier_new ("memset");
	_tmp51_ = _tmp50_;
	_tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp51_);
	_tmp53_ = _tmp52_;
	_vala_ccode_node_unref0 (_tmp51_);
	czero1 = _tmp53_;
	vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) src_address);
	_tmp54_ = vala_ccode_constant_new ("0");
	_tmp55_ = _tmp54_;
	vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp55_);
	_vala_ccode_node_unref0 (_tmp55_);
	_tmp56_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) src);
	_tmp57_ = _tmp56_;
	_tmp58_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp57_, (ValaCCodeExpression*) element_size);
	_tmp59_ = _tmp58_;
	vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp59_);
	_vala_ccode_node_unref0 (_tmp59_);
	_vala_ccode_node_unref0 (_tmp57_);
	_tmp60_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp61_ = _tmp60_;
	vala_ccode_function_add_expression (_tmp61_, (ValaCCodeExpression*) czero1);
	_tmp62_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp63_ = _tmp62_;
	_tmp64_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_GREATER_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp65_ = _tmp64_;
	_tmp66_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest_end);
	_tmp67_ = _tmp66_;
	_tmp68_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) _tmp65_, (ValaCCodeExpression*) _tmp67_);
	_tmp69_ = _tmp68_;
	vala_ccode_function_else_if (_tmp63_, (ValaCCodeExpression*) _tmp69_);
	_vala_ccode_node_unref0 (_tmp69_);
	_vala_ccode_node_unref0 (_tmp67_);
	_vala_ccode_node_unref0 (_tmp65_);
	_tmp70_ = vala_ccode_identifier_new ("memset");
	_tmp71_ = _tmp70_;
	_tmp72_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp71_);
	_tmp73_ = _tmp72_;
	_vala_ccode_node_unref0 (_tmp71_);
	czero2 = _tmp73_;
	vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) dest_end_address);
	_tmp74_ = vala_ccode_constant_new ("0");
	_tmp75_ = _tmp74_;
	vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp75_);
	_vala_ccode_node_unref0 (_tmp75_);
	_tmp76_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp77_ = _tmp76_;
	_tmp78_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp77_, (ValaCCodeExpression*) element_size);
	_tmp79_ = _tmp78_;
	vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp79_);
	_vala_ccode_node_unref0 (_tmp79_);
	_vala_ccode_node_unref0 (_tmp77_);
	_tmp80_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp81_ = _tmp80_;
	vala_ccode_function_add_expression (_tmp81_, (ValaCCodeExpression*) czero2);
	_tmp82_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp83_ = _tmp82_;
	_tmp84_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp85_ = _tmp84_;
	vala_ccode_function_else_if (_tmp83_, (ValaCCodeExpression*) _tmp85_);
	_vala_ccode_node_unref0 (_tmp85_);
	_tmp86_ = vala_ccode_identifier_new ("memset");
	_tmp87_ = _tmp86_;
	_tmp88_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp87_);
	_tmp89_ = _tmp88_;
	_vala_ccode_node_unref0 (_tmp87_);
	czero3 = _tmp89_;
	vala_ccode_function_call_add_argument (czero3, (ValaCCodeExpression*) src_address);
	_tmp90_ = vala_ccode_constant_new ("0");
	_tmp91_ = _tmp90_;
	vala_ccode_function_call_add_argument (czero3, (ValaCCodeExpression*) _tmp91_);
	_vala_ccode_node_unref0 (_tmp91_);
	_tmp92_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) length, (ValaCCodeExpression*) element_size);
	_tmp93_ = _tmp92_;
	vala_ccode_function_call_add_argument (czero3, (ValaCCodeExpression*) _tmp93_);
	_vala_ccode_node_unref0 (_tmp93_);
	_tmp94_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp95_ = _tmp94_;
	vala_ccode_function_add_expression (_tmp95_, (ValaCCodeExpression*) czero3);
	_tmp96_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp97_ = _tmp96_;
	vala_ccode_function_close (_tmp97_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp98_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function_declaration (_tmp98_, fun);
	_tmp99_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function (_tmp99_, fun);
	_vala_ccode_node_unref0 (czero3);
	_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_end);
	_vala_ccode_node_unref0 (dest);
	_vala_ccode_node_unref0 (src_end);
	_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* fun = NULL;
	ValaCCodeFunction* _tmp0_;
	ValaCCodeParameter* _tmp1_;
	ValaCCodeParameter* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	ValaCCodeFunction* _tmp4_;
	ValaCCodeConstant* _tmp5_;
	ValaCCodeConstant* _tmp6_;
	ValaCCodeVariableDeclarator* _tmp7_;
	ValaCCodeVariableDeclarator* _tmp8_;
	ValaCCodeIdentifier* array_check = NULL;
	ValaCCodeIdentifier* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaCCodeElementAccess* array_element_check = NULL;
	ValaCCodeIdentifier* _tmp12_;
	ValaCCodeIdentifier* _tmp13_;
	ValaCCodeCastExpression* _tmp14_;
	ValaCCodeCastExpression* _tmp15_;
	ValaCCodeConstant* _tmp16_;
	ValaCCodeConstant* _tmp17_;
	ValaCCodeElementAccess* _tmp18_;
	ValaCCodeElementAccess* _tmp19_;
	ValaCCodeFunction* _tmp20_;
	ValaCCodeFunction* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaCCodeFunction* _tmp23_;
	ValaCCodeIdentifier* _tmp24_;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeUnaryExpression* _tmp26_;
	ValaCCodeUnaryExpression* _tmp27_;
	ValaCCodeFunction* _tmp28_;
	ValaCCodeFunction* _tmp29_;
	ValaCCodeFunction* _tmp30_;
	ValaCCodeFunction* _tmp31_;
	ValaCCodeFunction* _tmp32_;
	ValaCCodeFunction* _tmp33_;
	ValaCCodeIdentifier* _tmp34_;
	ValaCCodeIdentifier* _tmp35_;
	ValaCCodeFile* _tmp36_;
	ValaCCodeFile* _tmp37_;
	self = (ValaCCodeArrayModule*) base;
	_tmp0_ = vala_ccode_function_new ("_vala_array_length", "gint");
	fun = _tmp0_;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) 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_ = _tmp3_;
	_tmp5_ = vala_ccode_constant_new ("0");
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_ccode_variable_declarator_new ("length", (ValaCCodeExpression*) _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	vala_ccode_function_add_declaration (_tmp4_, "int", (ValaCCodeDeclarator*) _tmp8_, 0);
	_vala_ccode_node_unref0 (_tmp8_);
	_vala_ccode_node_unref0 (_tmp6_);
	_tmp9_ = vala_ccode_identifier_new ("array");
	array_check = _tmp9_;
	_tmp10_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp11_ = _tmp10_;
	vala_ccode_function_open_if (_tmp11_, (ValaCCodeExpression*) array_check);
	_tmp12_ = vala_ccode_identifier_new ("array");
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp13_, "gpointer*");
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_ccode_constant_new ("length");
	_tmp17_ = _tmp16_;
	_tmp18_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp15_, (ValaCCodeExpression*) _tmp17_);
	_tmp19_ = _tmp18_;
	_vala_ccode_node_unref0 (_tmp17_);
	_vala_ccode_node_unref0 (_tmp15_);
	_vala_ccode_node_unref0 (_tmp13_);
	array_element_check = _tmp19_;
	_tmp20_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp21_ = _tmp20_;
	vala_ccode_function_open_while (_tmp21_, (ValaCCodeExpression*) array_element_check);
	_tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_ccode_identifier_new ("length");
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp25_);
	_tmp27_ = _tmp26_;
	vala_ccode_function_add_expression (_tmp23_, (ValaCCodeExpression*) _tmp27_);
	_vala_ccode_node_unref0 (_tmp27_);
	_vala_ccode_node_unref0 (_tmp25_);
	_tmp28_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp29_ = _tmp28_;
	vala_ccode_function_close (_tmp29_);
	_tmp30_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp31_ = _tmp30_;
	vala_ccode_function_close (_tmp31_);
	_tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_ccode_identifier_new ("length");
	_tmp35_ = _tmp34_;
	vala_ccode_function_add_return (_tmp33_, (ValaCCodeExpression*) _tmp35_);
	_vala_ccode_node_unref0 (_tmp35_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp36_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function_declaration (_tmp36_, fun);
	_tmp37_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function (_tmp37_, 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* type = NULL;
	ValaTargetValue* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	ValaCCodeExpression* cexpr = NULL;
	ValaTargetValue* _tmp4_;
	ValaCCodeExpression* _tmp5_;
	ValaDataType* _tmp6_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (value != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = value;
	_tmp1_ = vala_target_value_get_value_type (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (_tmp2_);
	type = _tmp3_;
	_tmp4_ = value;
	_tmp5_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp4_);
	cexpr = _tmp5_;
	_tmp6_ = type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, VALA_TYPE_ARRAY_TYPE)) {
		ValaArrayType* array_type = NULL;
		ValaDataType* _tmp7_;
		ValaArrayType* _tmp8_;
		ValaArrayType* _tmp9_;
		gboolean _tmp10_;
		gboolean _tmp11_;
		ValaTargetValue* temp_value = NULL;
		ValaDataType* _tmp15_;
		ValaCodeNode* _tmp16_;
		ValaTargetValue* _tmp17_;
		ValaCCodeFunctionCall* copy_call = NULL;
		ValaArrayType* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		ValaCCodeIdentifier* _tmp21_;
		ValaCCodeIdentifier* _tmp22_;
		ValaCCodeFunctionCall* _tmp23_;
		ValaCCodeFunctionCall* _tmp24_;
		ValaCCodeFunctionCall* _tmp25_;
		ValaCCodeExpression* _tmp26_;
		ValaCCodeFunctionCall* _tmp27_;
		ValaTargetValue* _tmp28_;
		ValaCCodeExpression* _tmp29_;
		ValaCCodeExpression* _tmp30_;
		ValaCCodeFunction* _tmp31_;
		ValaCCodeFunction* _tmp32_;
		ValaCCodeFunctionCall* _tmp33_;
		_tmp7_ = type;
		_tmp8_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		array_type = _tmp8_;
		_tmp9_ = array_type;
		_tmp10_ = vala_array_type_get_fixed_length (_tmp9_);
		_tmp11_ = _tmp10_;
		if (!_tmp11_) {
			ValaTargetValue* _tmp12_;
			ValaCodeNode* _tmp13_;
			ValaTargetValue* _tmp14_;
			_tmp12_ = value;
			_tmp13_ = node;
			_tmp14_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->copy_value ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule), _tmp12_, _tmp13_);
			result = _tmp14_;
			_vala_code_node_unref0 (array_type);
			_vala_ccode_node_unref0 (cexpr);
			_vala_code_node_unref0 (type);
			return result;
		}
		_tmp15_ = type;
		_tmp16_ = node;
		_tmp17_ = vala_ccode_base_module_create_temp_value ((ValaCCodeBaseModule*) self, _tmp15_, FALSE, _tmp16_, NULL);
		temp_value = _tmp17_;
		_tmp18_ = array_type;
		_tmp19_ = vala_ccode_array_module_generate_array_copy_wrapper (self, _tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = vala_ccode_identifier_new (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp22_);
		_tmp24_ = _tmp23_;
		_vala_ccode_node_unref0 (_tmp22_);
		_g_free0 (_tmp20_);
		copy_call = _tmp24_;
		_tmp25_ = copy_call;
		_tmp26_ = cexpr;
		vala_ccode_function_call_add_argument (_tmp25_, _tmp26_);
		_tmp27_ = copy_call;
		_tmp28_ = temp_value;
		_tmp29_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp28_);
		_tmp30_ = _tmp29_;
		vala_ccode_function_call_add_argument (_tmp27_, _tmp30_);
		_vala_ccode_node_unref0 (_tmp30_);
		_tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp32_ = _tmp31_;
		_tmp33_ = copy_call;
		vala_ccode_function_add_expression (_tmp32_, (ValaCCodeExpression*) _tmp33_);
		result = temp_value;
		_vala_ccode_node_unref0 (copy_call);
		_vala_code_node_unref0 (array_type);
		_vala_ccode_node_unref0 (cexpr);
		_vala_code_node_unref0 (type);
		return result;
	} else {
		ValaTargetValue* _tmp34_;
		ValaCodeNode* _tmp35_;
		ValaTargetValue* _tmp36_;
		_tmp34_ = value;
		_tmp35_ = node;
		_tmp36_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->copy_value ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule), _tmp34_, _tmp35_);
		result = _tmp36_;
		_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;
	ValaDataType* _tmp0_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (type != NULL, NULL);
	_tmp0_ = type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALA_TYPE_ARRAY_TYPE)) {
		ValaArrayType* array_type = NULL;
		ValaDataType* _tmp1_;
		ValaArrayType* _tmp2_;
		ValaArrayType* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		ValaArrayType* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		ValaCCodeIdentifier* _tmp9_;
		ValaCCodeExpression* _tmp10_;
		_tmp1_ = type;
		_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		array_type = _tmp2_;
		_tmp3_ = array_type;
		_tmp4_ = vala_array_type_get_fixed_length (_tmp3_);
		_tmp5_ = _tmp4_;
		_vala_assert (!_tmp5_, "!array_type.fixed_length");
		_tmp6_ = array_type;
		_tmp7_ = vala_ccode_array_module_generate_array_dup_wrapper (self, _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = vala_ccode_identifier_new (_tmp8_);
		_tmp10_ = (ValaCCodeExpression*) _tmp9_;
		_g_free0 (_tmp8_);
		result = _tmp10_;
		_vala_code_node_unref0 (array_type);
		return result;
	} else {
		ValaDataType* _tmp11_;
		ValaSourceReference* _tmp12_;
		gboolean _tmp13_;
		ValaCCodeExpression* _tmp14_;
		_tmp11_ = type;
		_tmp12_ = source_reference;
		_tmp13_ = is_chainup;
		_tmp14_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->get_dup_func_expression ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule), _tmp11_, _tmp12_, _tmp13_);
		result = _tmp14_;
		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* type = NULL;
	ValaTargetValue* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	ValaDataType* _tmp4_;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (value != NULL, NULL);
	_tmp0_ = value;
	_tmp1_ = vala_target_value_get_value_type (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (_tmp2_);
	type = _tmp3_;
	_tmp4_ = type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, VALA_TYPE_ARRAY_TYPE)) {
		ValaArrayType* array_type = NULL;
		ValaDataType* _tmp5_;
		ValaArrayType* _tmp6_;
		ValaArrayType* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		ValaCCodeFunctionCall* ccall = NULL;
		ValaDataType* _tmp13_;
		ValaCCodeExpression* _tmp14_;
		ValaCCodeExpression* _tmp15_;
		ValaCCodeFunctionCall* _tmp16_;
		ValaCCodeFunctionCall* _tmp17_;
		ValaCCodeIdentifier* _tmp18_;
		ValaCCodeIdentifier* _tmp19_;
		ValaCCodeFunctionCall* _tmp20_;
		ValaCCodeFunctionCall* _tmp21_;
		ValaTargetValue* _tmp22_;
		ValaCCodeExpression* _tmp23_;
		ValaCCodeExpression* _tmp24_;
		ValaCCodeFunctionCall* _tmp25_;
		ValaArrayType* _tmp26_;
		ValaExpression* _tmp27_;
		ValaExpression* _tmp28_;
		ValaCCodeExpression* _tmp29_;
		ValaCCodeExpression* _tmp30_;
		ValaCCodeFunctionCall* _tmp31_;
		ValaArrayType* _tmp32_;
		ValaDataType* _tmp33_;
		ValaDataType* _tmp34_;
		ValaCCodeExpression* _tmp35_;
		ValaCCodeExpression* _tmp36_;
		ValaCCodeCastExpression* _tmp37_;
		ValaCCodeCastExpression* _tmp38_;
		_tmp5_ = type;
		_tmp6_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		array_type = _tmp6_;
		_tmp7_ = array_type;
		_tmp8_ = vala_array_type_get_fixed_length (_tmp7_);
		_tmp9_ = _tmp8_;
		if (!_tmp9_) {
			ValaTargetValue* _tmp10_;
			gboolean _tmp11_;
			ValaCCodeExpression* _tmp12_;
			_tmp10_ = value;
			_tmp11_ = is_macro_definition;
			_tmp12_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->destroy_value ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule), _tmp10_, _tmp11_);
			result = _tmp12_;
			_vala_code_node_unref0 (array_type);
			_vala_code_node_unref0 (type);
			return result;
		}
		((ValaCCodeBaseModule*) self)->requires_array_free = TRUE;
		_tmp13_ = type;
		_tmp14_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, _tmp13_, FALSE);
		_tmp15_ = _tmp14_;
		_tmp16_ = vala_ccode_function_call_new (_tmp15_);
		_tmp17_ = _tmp16_;
		_vala_ccode_node_unref0 (_tmp15_);
		ccall = _tmp17_;
		_tmp18_ = vala_ccode_identifier_new ("_vala_array_destroy");
		_tmp19_ = _tmp18_;
		_tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp19_);
		_vala_ccode_node_unref0 (ccall);
		ccall = _tmp20_;
		_vala_ccode_node_unref0 (_tmp19_);
		_tmp21_ = ccall;
		_tmp22_ = value;
		_tmp23_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp22_);
		_tmp24_ = _tmp23_;
		vala_ccode_function_call_add_argument (_tmp21_, _tmp24_);
		_vala_ccode_node_unref0 (_tmp24_);
		_tmp25_ = ccall;
		_tmp26_ = array_type;
		_tmp27_ = vala_array_type_get_length (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp28_);
		_tmp30_ = _tmp29_;
		vala_ccode_function_call_add_argument (_tmp25_, _tmp30_);
		_vala_ccode_node_unref0 (_tmp30_);
		_tmp31_ = ccall;
		_tmp32_ = array_type;
		_tmp33_ = vala_array_type_get_element_type (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp35_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, _tmp34_, FALSE);
		_tmp36_ = _tmp35_;
		_tmp37_ = vala_ccode_cast_expression_new (_tmp36_, "GDestroyNotify");
		_tmp38_ = _tmp37_;
		vala_ccode_function_call_add_argument (_tmp31_, (ValaCCodeExpression*) _tmp38_);
		_vala_ccode_node_unref0 (_tmp38_);
		_vala_ccode_node_unref0 (_tmp36_);
		result = (ValaCCodeExpression*) ccall;
		_vala_code_node_unref0 (array_type);
		_vala_code_node_unref0 (type);
		return result;
	} else {
		ValaTargetValue* _tmp39_;
		gboolean _tmp40_;
		ValaCCodeExpression* _tmp41_;
		_tmp39_ = value;
		_tmp40_ = is_macro_definition;
		_tmp41_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->destroy_value ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule), _tmp39_, _tmp40_);
		result = _tmp41_;
		_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* dup_func = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	ValaCCodeFunction* function = NULL;
	const gchar* _tmp5_;
	ValaArrayType* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	ValaCCodeFunction* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	ValaCCodeFunction* _tmp12_;
	ValaArrayType* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	ValaCCodeParameter* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeFunction* _tmp18_;
	ValaCCodeParameter* _tmp19_;
	ValaCCodeParameter* _tmp20_;
	ValaArrayType* _tmp21_;
	ValaDataType* _tmp22_;
	ValaDataType* _tmp23_;
	ValaCCodeBaseModuleEmitContext* _tmp39_;
	ValaCCodeBaseModuleEmitContext* _tmp40_;
	ValaCCodeFunction* _tmp41_;
	ValaArrayType* _tmp42_;
	ValaDataType* _tmp43_;
	ValaDataType* _tmp44_;
	gboolean _tmp45_;
	ValaCCodeFile* _tmp169_;
	ValaCCodeFunction* _tmp170_;
	ValaCCodeFile* _tmp171_;
	ValaCCodeFunction* _tmp172_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (array_type != NULL, NULL);
	_tmp0_ = self->priv->next_array_dup_id;
	self->priv->next_array_dup_id = _tmp0_ + 1;
	_tmp1_ = self->priv->next_array_dup_id;
	_tmp2_ = g_strdup_printf ("_vala_array_dup%d", _tmp1_);
	dup_func = _tmp2_;
	_tmp3_ = dup_func;
	_tmp4_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp3_);
	if (!_tmp4_) {
		result = dup_func;
		return result;
	}
	_tmp5_ = dup_func;
	_tmp6_ = array_type;
	_tmp7_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_ccode_function_new (_tmp5_, _tmp8_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	function = _tmp10_;
	_tmp11_ = function;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp11_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp12_ = function;
	_tmp13_ = array_type;
	_tmp14_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_ccode_parameter_new ("self", _tmp15_);
	_tmp17_ = _tmp16_;
	vala_ccode_function_add_parameter (_tmp12_, _tmp17_);
	_vala_ccode_node_unref0 (_tmp17_);
	_g_free0 (_tmp15_);
	_tmp18_ = function;
	_tmp19_ = vala_ccode_parameter_new ("length", "int");
	_tmp20_ = _tmp19_;
	vala_ccode_function_add_parameter (_tmp18_, _tmp20_);
	_vala_ccode_node_unref0 (_tmp20_);
	_tmp21_ = array_type;
	_tmp22_ = vala_array_type_get_element_type (_tmp21_);
	_tmp23_ = _tmp22_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, VALA_TYPE_GENERIC_TYPE)) {
		gchar* func_name = NULL;
		ValaArrayType* _tmp24_;
		ValaDataType* _tmp25_;
		ValaDataType* _tmp26_;
		ValaTypeParameter* _tmp27_;
		ValaTypeParameter* _tmp28_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		gchar* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		gchar* _tmp34_;
		ValaCCodeFunction* _tmp35_;
		const gchar* _tmp36_;
		ValaCCodeParameter* _tmp37_;
		ValaCCodeParameter* _tmp38_;
		_tmp24_ = array_type;
		_tmp25_ = vala_array_type_get_element_type (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = vala_data_type_get_type_parameter (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = vala_symbol_get_name ((ValaSymbol*) _tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = g_utf8_strdown (_tmp30_, (gssize) -1);
		_tmp32_ = _tmp31_;
		_tmp33_ = g_strdup_printf ("%s_dup_func", _tmp32_);
		_tmp34_ = _tmp33_;
		_g_free0 (_tmp32_);
		func_name = _tmp34_;
		_tmp35_ = function;
		_tmp36_ = func_name;
		_tmp37_ = vala_ccode_parameter_new (_tmp36_, "GBoxedCopyFunc");
		_tmp38_ = _tmp37_;
		vala_ccode_function_add_parameter (_tmp35_, _tmp38_);
		_vala_ccode_node_unref0 (_tmp38_);
		_g_free0 (func_name);
	}
	_tmp39_ = vala_ccode_base_module_emit_context_new (NULL);
	_tmp40_ = _tmp39_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp40_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp40_);
	_tmp41_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp41_);
	_tmp42_ = array_type;
	_tmp43_ = vala_array_type_get_element_type (_tmp42_);
	_tmp44_ = _tmp43_;
	_tmp45_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp44_);
	if (_tmp45_) {
		ValaCCodeVariableDeclarator* cvardecl = NULL;
		ValaCCodeVariableDeclarator* _tmp46_;
		ValaCCodeFunctionCall* gnew = NULL;
		ValaCCodeIdentifier* _tmp47_;
		ValaCCodeIdentifier* _tmp48_;
		ValaCCodeFunctionCall* _tmp49_;
		ValaCCodeFunctionCall* _tmp50_;
		ValaCCodeFunctionCall* _tmp51_;
		ValaArrayType* _tmp52_;
		ValaDataType* _tmp53_;
		ValaDataType* _tmp54_;
		gchar* _tmp55_;
		gchar* _tmp56_;
		ValaCCodeIdentifier* _tmp57_;
		ValaCCodeIdentifier* _tmp58_;
		ValaCCodeExpression* length_expr = NULL;
		ValaCCodeIdentifier* _tmp59_;
		gboolean _tmp60_ = FALSE;
		ValaArrayType* _tmp61_;
		ValaDataType* _tmp62_;
		ValaDataType* _tmp63_;
		ValaTypeSymbol* _tmp64_;
		ValaTypeSymbol* _tmp65_;
		ValaCCodeFunctionCall* _tmp76_;
		ValaCCodeExpression* _tmp77_;
		ValaCCodeFunction* _tmp78_;
		ValaCCodeFunction* _tmp79_;
		ValaArrayType* _tmp80_;
		gchar* _tmp81_;
		gchar* _tmp82_;
		ValaCCodeVariableDeclarator* _tmp83_;
		ValaCCodeFunction* _tmp84_;
		ValaCCodeFunction* _tmp85_;
		ValaCCodeIdentifier* _tmp86_;
		ValaCCodeIdentifier* _tmp87_;
		ValaCCodeFunctionCall* _tmp88_;
		ValaCCodeFunction* _tmp89_;
		ValaCCodeFunction* _tmp90_;
		ValaCCodeVariableDeclarator* _tmp91_;
		ValaCCodeVariableDeclarator* _tmp92_;
		ValaCCodeFunction* _tmp93_;
		ValaCCodeFunction* _tmp94_;
		ValaCCodeIdentifier* _tmp95_;
		ValaCCodeIdentifier* _tmp96_;
		ValaCCodeConstant* _tmp97_;
		ValaCCodeConstant* _tmp98_;
		ValaCCodeAssignment* _tmp99_;
		ValaCCodeAssignment* _tmp100_;
		ValaCCodeIdentifier* _tmp101_;
		ValaCCodeIdentifier* _tmp102_;
		ValaCCodeIdentifier* _tmp103_;
		ValaCCodeIdentifier* _tmp104_;
		ValaCCodeBinaryExpression* _tmp105_;
		ValaCCodeBinaryExpression* _tmp106_;
		ValaCCodeIdentifier* _tmp107_;
		ValaCCodeIdentifier* _tmp108_;
		ValaCCodeUnaryExpression* _tmp109_;
		ValaCCodeUnaryExpression* _tmp110_;
		ValaCCodeFunction* _tmp111_;
		ValaCCodeFunction* _tmp112_;
		ValaCCodeIdentifier* _tmp113_;
		ValaCCodeIdentifier* _tmp114_;
		ValaCCodeIdentifier* _tmp115_;
		ValaCCodeIdentifier* _tmp116_;
		ValaCCodeElementAccess* _tmp117_;
		ValaCCodeElementAccess* _tmp118_;
		ValaArrayType* _tmp119_;
		ValaDataType* _tmp120_;
		ValaDataType* _tmp121_;
		ValaCCodeIdentifier* _tmp122_;
		ValaCCodeIdentifier* _tmp123_;
		ValaCCodeIdentifier* _tmp124_;
		ValaCCodeIdentifier* _tmp125_;
		ValaCCodeElementAccess* _tmp126_;
		ValaCCodeElementAccess* _tmp127_;
		ValaGLibValue* _tmp128_;
		ValaGLibValue* _tmp129_;
		ValaArrayType* _tmp130_;
		ValaTargetValue* _tmp131_;
		ValaTargetValue* _tmp132_;
		ValaCCodeExpression* _tmp133_;
		ValaCCodeExpression* _tmp134_;
		ValaCCodeFunction* _tmp135_;
		ValaCCodeFunction* _tmp136_;
		ValaCCodeFunction* _tmp137_;
		ValaCCodeFunction* _tmp138_;
		ValaCCodeIdentifier* _tmp139_;
		ValaCCodeIdentifier* _tmp140_;
		_tmp46_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
		cvardecl = _tmp46_;
		_tmp47_ = vala_ccode_identifier_new ("g_new0");
		_tmp48_ = _tmp47_;
		_tmp49_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp48_);
		_tmp50_ = _tmp49_;
		_vala_ccode_node_unref0 (_tmp48_);
		gnew = _tmp50_;
		_tmp51_ = gnew;
		_tmp52_ = array_type;
		_tmp53_ = vala_array_type_get_element_type (_tmp52_);
		_tmp54_ = _tmp53_;
		_tmp55_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp54_);
		_tmp56_ = _tmp55_;
		_tmp57_ = vala_ccode_identifier_new (_tmp56_);
		_tmp58_ = _tmp57_;
		vala_ccode_function_call_add_argument (_tmp51_, (ValaCCodeExpression*) _tmp58_);
		_vala_ccode_node_unref0 (_tmp58_);
		_g_free0 (_tmp56_);
		_tmp59_ = vala_ccode_identifier_new ("length");
		length_expr = (ValaCCodeExpression*) _tmp59_;
		_tmp61_ = array_type;
		_tmp62_ = vala_array_type_get_element_type (_tmp61_);
		_tmp63_ = _tmp62_;
		_tmp64_ = vala_data_type_get_data_type (_tmp63_);
		_tmp65_ = _tmp64_;
		if (_tmp65_ != NULL) {
			ValaArrayType* _tmp66_;
			ValaDataType* _tmp67_;
			ValaDataType* _tmp68_;
			ValaTypeSymbol* _tmp69_;
			ValaTypeSymbol* _tmp70_;
			gboolean _tmp71_;
			_tmp66_ = array_type;
			_tmp67_ = vala_array_type_get_element_type (_tmp66_);
			_tmp68_ = _tmp67_;
			_tmp69_ = vala_data_type_get_data_type (_tmp68_);
			_tmp70_ = _tmp69_;
			_tmp71_ = vala_typesymbol_is_reference_type (_tmp70_);
			_tmp60_ = _tmp71_;
		} else {
			_tmp60_ = FALSE;
		}
		if (_tmp60_) {
			ValaCCodeExpression* _tmp72_;
			ValaCCodeConstant* _tmp73_;
			ValaCCodeConstant* _tmp74_;
			ValaCCodeBinaryExpression* _tmp75_;
			_tmp72_ = length_expr;
			_tmp73_ = vala_ccode_constant_new ("1");
			_tmp74_ = _tmp73_;
			_tmp75_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp72_, (ValaCCodeExpression*) _tmp74_);
			_vala_ccode_node_unref0 (length_expr);
			length_expr = (ValaCCodeExpression*) _tmp75_;
			_vala_ccode_node_unref0 (_tmp74_);
		}
		_tmp76_ = gnew;
		_tmp77_ = length_expr;
		vala_ccode_function_call_add_argument (_tmp76_, _tmp77_);
		_tmp78_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp79_ = _tmp78_;
		_tmp80_ = array_type;
		_tmp81_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp80_);
		_tmp82_ = _tmp81_;
		_tmp83_ = cvardecl;
		vala_ccode_function_add_declaration (_tmp79_, _tmp82_, (ValaCCodeDeclarator*) _tmp83_, 0);
		_g_free0 (_tmp82_);
		_tmp84_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp85_ = _tmp84_;
		_tmp86_ = vala_ccode_identifier_new ("result");
		_tmp87_ = _tmp86_;
		_tmp88_ = gnew;
		vala_ccode_function_add_assignment (_tmp85_, (ValaCCodeExpression*) _tmp87_, (ValaCCodeExpression*) _tmp88_);
		_vala_ccode_node_unref0 (_tmp87_);
		_tmp89_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp90_ = _tmp89_;
		_tmp91_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
		_tmp92_ = _tmp91_;
		vala_ccode_function_add_declaration (_tmp90_, "int", (ValaCCodeDeclarator*) _tmp92_, 0);
		_vala_ccode_node_unref0 (_tmp92_);
		_tmp93_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp94_ = _tmp93_;
		_tmp95_ = vala_ccode_identifier_new ("i");
		_tmp96_ = _tmp95_;
		_tmp97_ = vala_ccode_constant_new ("0");
		_tmp98_ = _tmp97_;
		_tmp99_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp96_, (ValaCCodeExpression*) _tmp98_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp100_ = _tmp99_;
		_tmp101_ = vala_ccode_identifier_new ("i");
		_tmp102_ = _tmp101_;
		_tmp103_ = vala_ccode_identifier_new ("length");
		_tmp104_ = _tmp103_;
		_tmp105_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp102_, (ValaCCodeExpression*) _tmp104_);
		_tmp106_ = _tmp105_;
		_tmp107_ = vala_ccode_identifier_new ("i");
		_tmp108_ = _tmp107_;
		_tmp109_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp108_);
		_tmp110_ = _tmp109_;
		vala_ccode_function_open_for (_tmp94_, (ValaCCodeExpression*) _tmp100_, (ValaCCodeExpression*) _tmp106_, (ValaCCodeExpression*) _tmp110_);
		_vala_ccode_node_unref0 (_tmp110_);
		_vala_ccode_node_unref0 (_tmp108_);
		_vala_ccode_node_unref0 (_tmp106_);
		_vala_ccode_node_unref0 (_tmp104_);
		_vala_ccode_node_unref0 (_tmp102_);
		_vala_ccode_node_unref0 (_tmp100_);
		_vala_ccode_node_unref0 (_tmp98_);
		_vala_ccode_node_unref0 (_tmp96_);
		_tmp111_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp112_ = _tmp111_;
		_tmp113_ = vala_ccode_identifier_new ("result");
		_tmp114_ = _tmp113_;
		_tmp115_ = vala_ccode_identifier_new ("i");
		_tmp116_ = _tmp115_;
		_tmp117_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp114_, (ValaCCodeExpression*) _tmp116_);
		_tmp118_ = _tmp117_;
		_tmp119_ = array_type;
		_tmp120_ = vala_array_type_get_element_type (_tmp119_);
		_tmp121_ = _tmp120_;
		_tmp122_ = vala_ccode_identifier_new ("self");
		_tmp123_ = _tmp122_;
		_tmp124_ = vala_ccode_identifier_new ("i");
		_tmp125_ = _tmp124_;
		_tmp126_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp123_, (ValaCCodeExpression*) _tmp125_);
		_tmp127_ = _tmp126_;
		_tmp128_ = vala_glib_value_new (_tmp121_, (ValaCCodeExpression*) _tmp127_, TRUE);
		_tmp129_ = _tmp128_;
		_tmp130_ = array_type;
		_tmp131_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp129_, (ValaCodeNode*) _tmp130_);
		_tmp132_ = _tmp131_;
		_tmp133_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp132_);
		_tmp134_ = _tmp133_;
		vala_ccode_function_add_assignment (_tmp112_, (ValaCCodeExpression*) _tmp118_, _tmp134_);
		_vala_ccode_node_unref0 (_tmp134_);
		_vala_target_value_unref0 (_tmp132_);
		_vala_target_value_unref0 (_tmp129_);
		_vala_ccode_node_unref0 (_tmp127_);
		_vala_ccode_node_unref0 (_tmp125_);
		_vala_ccode_node_unref0 (_tmp123_);
		_vala_ccode_node_unref0 (_tmp118_);
		_vala_ccode_node_unref0 (_tmp116_);
		_vala_ccode_node_unref0 (_tmp114_);
		_tmp135_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp136_ = _tmp135_;
		vala_ccode_function_close (_tmp136_);
		_tmp137_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp138_ = _tmp137_;
		_tmp139_ = vala_ccode_identifier_new ("result");
		_tmp140_ = _tmp139_;
		vala_ccode_function_add_return (_tmp138_, (ValaCCodeExpression*) _tmp140_);
		_vala_ccode_node_unref0 (_tmp140_);
		_vala_ccode_node_unref0 (length_expr);
		_vala_ccode_node_unref0 (gnew);
		_vala_ccode_node_unref0 (cvardecl);
	} else {
		ValaCCodeFunctionCall* dup_call = NULL;
		ValaCCodeIdentifier* _tmp141_;
		ValaCCodeIdentifier* _tmp142_;
		ValaCCodeFunctionCall* _tmp143_;
		ValaCCodeFunctionCall* _tmp144_;
		ValaCCodeFunctionCall* _tmp145_;
		ValaCCodeIdentifier* _tmp146_;
		ValaCCodeIdentifier* _tmp147_;
		ValaCCodeFunctionCall* sizeof_call = NULL;
		ValaCCodeIdentifier* _tmp148_;
		ValaCCodeIdentifier* _tmp149_;
		ValaCCodeFunctionCall* _tmp150_;
		ValaCCodeFunctionCall* _tmp151_;
		ValaCCodeFunctionCall* _tmp152_;
		ValaArrayType* _tmp153_;
		ValaDataType* _tmp154_;
		ValaDataType* _tmp155_;
		gchar* _tmp156_;
		gchar* _tmp157_;
		ValaCCodeIdentifier* _tmp158_;
		ValaCCodeIdentifier* _tmp159_;
		ValaCCodeFunctionCall* _tmp160_;
		ValaCCodeIdentifier* _tmp161_;
		ValaCCodeIdentifier* _tmp162_;
		ValaCCodeFunctionCall* _tmp163_;
		ValaCCodeBinaryExpression* _tmp164_;
		ValaCCodeBinaryExpression* _tmp165_;
		ValaCCodeFunction* _tmp166_;
		ValaCCodeFunction* _tmp167_;
		ValaCCodeFunctionCall* _tmp168_;
		_tmp141_ = vala_ccode_identifier_new ("g_memdup");
		_tmp142_ = _tmp141_;
		_tmp143_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp142_);
		_tmp144_ = _tmp143_;
		_vala_ccode_node_unref0 (_tmp142_);
		dup_call = _tmp144_;
		_tmp145_ = dup_call;
		_tmp146_ = vala_ccode_identifier_new ("self");
		_tmp147_ = _tmp146_;
		vala_ccode_function_call_add_argument (_tmp145_, (ValaCCodeExpression*) _tmp147_);
		_vala_ccode_node_unref0 (_tmp147_);
		_tmp148_ = vala_ccode_identifier_new ("sizeof");
		_tmp149_ = _tmp148_;
		_tmp150_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp149_);
		_tmp151_ = _tmp150_;
		_vala_ccode_node_unref0 (_tmp149_);
		sizeof_call = _tmp151_;
		_tmp152_ = sizeof_call;
		_tmp153_ = array_type;
		_tmp154_ = vala_array_type_get_element_type (_tmp153_);
		_tmp155_ = _tmp154_;
		_tmp156_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp155_);
		_tmp157_ = _tmp156_;
		_tmp158_ = vala_ccode_identifier_new (_tmp157_);
		_tmp159_ = _tmp158_;
		vala_ccode_function_call_add_argument (_tmp152_, (ValaCCodeExpression*) _tmp159_);
		_vala_ccode_node_unref0 (_tmp159_);
		_g_free0 (_tmp157_);
		_tmp160_ = dup_call;
		_tmp161_ = vala_ccode_identifier_new ("length");
		_tmp162_ = _tmp161_;
		_tmp163_ = sizeof_call;
		_tmp164_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp162_, (ValaCCodeExpression*) _tmp163_);
		_tmp165_ = _tmp164_;
		vala_ccode_function_call_add_argument (_tmp160_, (ValaCCodeExpression*) _tmp165_);
		_vala_ccode_node_unref0 (_tmp165_);
		_vala_ccode_node_unref0 (_tmp162_);
		_tmp166_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp167_ = _tmp166_;
		_tmp168_ = dup_call;
		vala_ccode_function_add_return (_tmp167_, (ValaCCodeExpression*) _tmp168_);
		_vala_ccode_node_unref0 (sizeof_call);
		_vala_ccode_node_unref0 (dup_call);
	}
	_tmp169_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp170_ = function;
	vala_ccode_file_add_function_declaration (_tmp169_, _tmp170_);
	_tmp171_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp172_ = function;
	vala_ccode_file_add_function (_tmp171_, _tmp172_);
	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* dup_func = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	ValaCCodeFunction* function = NULL;
	const gchar* _tmp5_;
	ValaCCodeFunction* _tmp6_;
	ValaCCodeFunction* _tmp7_;
	ValaCCodeFunction* _tmp8_;
	ValaArrayType* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	ValaCCodeParameter* _tmp14_;
	ValaCCodeParameter* _tmp15_;
	ValaCCodeFunction* _tmp16_;
	ValaArrayType* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValaCCodeParameter* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeBaseModuleEmitContext* _tmp24_;
	ValaCCodeBaseModuleEmitContext* _tmp25_;
	ValaCCodeFunction* _tmp26_;
	ValaArrayType* _tmp27_;
	ValaDataType* _tmp28_;
	ValaDataType* _tmp29_;
	gboolean _tmp30_;
	ValaCCodeFile* _tmp115_;
	ValaCCodeFunction* _tmp116_;
	ValaCCodeFile* _tmp117_;
	ValaCCodeFunction* _tmp118_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (array_type != NULL, NULL);
	_tmp0_ = self->priv->next_array_dup_id;
	self->priv->next_array_dup_id = _tmp0_ + 1;
	_tmp1_ = self->priv->next_array_dup_id;
	_tmp2_ = g_strdup_printf ("_vala_array_copy%d", _tmp1_);
	dup_func = _tmp2_;
	_tmp3_ = dup_func;
	_tmp4_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp3_);
	if (!_tmp4_) {
		result = dup_func;
		return result;
	}
	_tmp5_ = dup_func;
	_tmp6_ = vala_ccode_function_new (_tmp5_, "void");
	function = _tmp6_;
	_tmp7_ = function;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp7_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp8_ = function;
	_tmp9_ = array_type;
	_tmp10_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strdup_printf ("%s *", _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_ccode_parameter_new ("self", _tmp13_);
	_tmp15_ = _tmp14_;
	vala_ccode_function_add_parameter (_tmp8_, _tmp15_);
	_vala_ccode_node_unref0 (_tmp15_);
	_g_free0 (_tmp13_);
	_g_free0 (_tmp11_);
	_tmp16_ = function;
	_tmp17_ = array_type;
	_tmp18_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strdup_printf ("%s *", _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_parameter_new ("dest", _tmp21_);
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_parameter (_tmp16_, _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp19_);
	_tmp24_ = vala_ccode_base_module_emit_context_new (NULL);
	_tmp25_ = _tmp24_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp25_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp25_);
	_tmp26_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp26_);
	_tmp27_ = array_type;
	_tmp28_ = vala_array_type_get_element_type (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp29_);
	if (_tmp30_) {
		ValaCCodeFunction* _tmp31_;
		ValaCCodeFunction* _tmp32_;
		ValaCCodeVariableDeclarator* _tmp33_;
		ValaCCodeVariableDeclarator* _tmp34_;
		ValaCCodeFunction* _tmp35_;
		ValaCCodeFunction* _tmp36_;
		ValaCCodeIdentifier* _tmp37_;
		ValaCCodeIdentifier* _tmp38_;
		ValaCCodeConstant* _tmp39_;
		ValaCCodeConstant* _tmp40_;
		ValaCCodeAssignment* _tmp41_;
		ValaCCodeAssignment* _tmp42_;
		ValaCCodeIdentifier* _tmp43_;
		ValaCCodeIdentifier* _tmp44_;
		ValaArrayType* _tmp45_;
		ValaExpression* _tmp46_;
		ValaExpression* _tmp47_;
		ValaCCodeExpression* _tmp48_;
		ValaCCodeExpression* _tmp49_;
		ValaCCodeBinaryExpression* _tmp50_;
		ValaCCodeBinaryExpression* _tmp51_;
		ValaCCodeIdentifier* _tmp52_;
		ValaCCodeIdentifier* _tmp53_;
		ValaCCodeUnaryExpression* _tmp54_;
		ValaCCodeUnaryExpression* _tmp55_;
		ValaCCodeFunction* _tmp56_;
		ValaCCodeFunction* _tmp57_;
		ValaCCodeIdentifier* _tmp58_;
		ValaCCodeIdentifier* _tmp59_;
		ValaCCodeIdentifier* _tmp60_;
		ValaCCodeIdentifier* _tmp61_;
		ValaCCodeElementAccess* _tmp62_;
		ValaCCodeElementAccess* _tmp63_;
		ValaArrayType* _tmp64_;
		ValaDataType* _tmp65_;
		ValaDataType* _tmp66_;
		ValaCCodeIdentifier* _tmp67_;
		ValaCCodeIdentifier* _tmp68_;
		ValaCCodeIdentifier* _tmp69_;
		ValaCCodeIdentifier* _tmp70_;
		ValaCCodeElementAccess* _tmp71_;
		ValaCCodeElementAccess* _tmp72_;
		ValaGLibValue* _tmp73_;
		ValaGLibValue* _tmp74_;
		ValaArrayType* _tmp75_;
		ValaTargetValue* _tmp76_;
		ValaTargetValue* _tmp77_;
		ValaCCodeExpression* _tmp78_;
		ValaCCodeExpression* _tmp79_;
		_tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp32_ = _tmp31_;
		_tmp33_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
		_tmp34_ = _tmp33_;
		vala_ccode_function_add_declaration (_tmp32_, "int", (ValaCCodeDeclarator*) _tmp34_, 0);
		_vala_ccode_node_unref0 (_tmp34_);
		_tmp35_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp36_ = _tmp35_;
		_tmp37_ = vala_ccode_identifier_new ("i");
		_tmp38_ = _tmp37_;
		_tmp39_ = vala_ccode_constant_new ("0");
		_tmp40_ = _tmp39_;
		_tmp41_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp38_, (ValaCCodeExpression*) _tmp40_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp42_ = _tmp41_;
		_tmp43_ = vala_ccode_identifier_new ("i");
		_tmp44_ = _tmp43_;
		_tmp45_ = array_type;
		_tmp46_ = vala_array_type_get_length (_tmp45_);
		_tmp47_ = _tmp46_;
		_tmp48_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp47_);
		_tmp49_ = _tmp48_;
		_tmp50_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp44_, _tmp49_);
		_tmp51_ = _tmp50_;
		_tmp52_ = vala_ccode_identifier_new ("i");
		_tmp53_ = _tmp52_;
		_tmp54_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp53_);
		_tmp55_ = _tmp54_;
		vala_ccode_function_open_for (_tmp36_, (ValaCCodeExpression*) _tmp42_, (ValaCCodeExpression*) _tmp51_, (ValaCCodeExpression*) _tmp55_);
		_vala_ccode_node_unref0 (_tmp55_);
		_vala_ccode_node_unref0 (_tmp53_);
		_vala_ccode_node_unref0 (_tmp51_);
		_vala_ccode_node_unref0 (_tmp49_);
		_vala_ccode_node_unref0 (_tmp44_);
		_vala_ccode_node_unref0 (_tmp42_);
		_vala_ccode_node_unref0 (_tmp40_);
		_vala_ccode_node_unref0 (_tmp38_);
		_tmp56_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp57_ = _tmp56_;
		_tmp58_ = vala_ccode_identifier_new ("dest");
		_tmp59_ = _tmp58_;
		_tmp60_ = vala_ccode_identifier_new ("i");
		_tmp61_ = _tmp60_;
		_tmp62_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp59_, (ValaCCodeExpression*) _tmp61_);
		_tmp63_ = _tmp62_;
		_tmp64_ = array_type;
		_tmp65_ = vala_array_type_get_element_type (_tmp64_);
		_tmp66_ = _tmp65_;
		_tmp67_ = vala_ccode_identifier_new ("self");
		_tmp68_ = _tmp67_;
		_tmp69_ = vala_ccode_identifier_new ("i");
		_tmp70_ = _tmp69_;
		_tmp71_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp68_, (ValaCCodeExpression*) _tmp70_);
		_tmp72_ = _tmp71_;
		_tmp73_ = vala_glib_value_new (_tmp66_, (ValaCCodeExpression*) _tmp72_, TRUE);
		_tmp74_ = _tmp73_;
		_tmp75_ = array_type;
		_tmp76_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp74_, (ValaCodeNode*) _tmp75_);
		_tmp77_ = _tmp76_;
		_tmp78_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp77_);
		_tmp79_ = _tmp78_;
		vala_ccode_function_add_assignment (_tmp57_, (ValaCCodeExpression*) _tmp63_, _tmp79_);
		_vala_ccode_node_unref0 (_tmp79_);
		_vala_target_value_unref0 (_tmp77_);
		_vala_target_value_unref0 (_tmp74_);
		_vala_ccode_node_unref0 (_tmp72_);
		_vala_ccode_node_unref0 (_tmp70_);
		_vala_ccode_node_unref0 (_tmp68_);
		_vala_ccode_node_unref0 (_tmp63_);
		_vala_ccode_node_unref0 (_tmp61_);
		_vala_ccode_node_unref0 (_tmp59_);
	} else {
		ValaCCodeFile* _tmp80_;
		ValaCCodeFunctionCall* dup_call = NULL;
		ValaCCodeIdentifier* _tmp81_;
		ValaCCodeIdentifier* _tmp82_;
		ValaCCodeFunctionCall* _tmp83_;
		ValaCCodeFunctionCall* _tmp84_;
		ValaCCodeFunctionCall* _tmp85_;
		ValaCCodeIdentifier* _tmp86_;
		ValaCCodeIdentifier* _tmp87_;
		ValaCCodeFunctionCall* _tmp88_;
		ValaCCodeIdentifier* _tmp89_;
		ValaCCodeIdentifier* _tmp90_;
		ValaCCodeFunctionCall* sizeof_call = NULL;
		ValaCCodeIdentifier* _tmp91_;
		ValaCCodeIdentifier* _tmp92_;
		ValaCCodeFunctionCall* _tmp93_;
		ValaCCodeFunctionCall* _tmp94_;
		ValaCCodeFunctionCall* _tmp95_;
		ValaArrayType* _tmp96_;
		ValaDataType* _tmp97_;
		ValaDataType* _tmp98_;
		gchar* _tmp99_;
		gchar* _tmp100_;
		ValaCCodeIdentifier* _tmp101_;
		ValaCCodeIdentifier* _tmp102_;
		ValaCCodeFunctionCall* _tmp103_;
		ValaArrayType* _tmp104_;
		ValaExpression* _tmp105_;
		ValaExpression* _tmp106_;
		ValaCCodeExpression* _tmp107_;
		ValaCCodeExpression* _tmp108_;
		ValaCCodeFunctionCall* _tmp109_;
		ValaCCodeBinaryExpression* _tmp110_;
		ValaCCodeBinaryExpression* _tmp111_;
		ValaCCodeFunction* _tmp112_;
		ValaCCodeFunction* _tmp113_;
		ValaCCodeFunctionCall* _tmp114_;
		_tmp80_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp80_, "string.h", FALSE);
		_tmp81_ = vala_ccode_identifier_new ("memcpy");
		_tmp82_ = _tmp81_;
		_tmp83_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp82_);
		_tmp84_ = _tmp83_;
		_vala_ccode_node_unref0 (_tmp82_);
		dup_call = _tmp84_;
		_tmp85_ = dup_call;
		_tmp86_ = vala_ccode_identifier_new ("dest");
		_tmp87_ = _tmp86_;
		vala_ccode_function_call_add_argument (_tmp85_, (ValaCCodeExpression*) _tmp87_);
		_vala_ccode_node_unref0 (_tmp87_);
		_tmp88_ = dup_call;
		_tmp89_ = vala_ccode_identifier_new ("self");
		_tmp90_ = _tmp89_;
		vala_ccode_function_call_add_argument (_tmp88_, (ValaCCodeExpression*) _tmp90_);
		_vala_ccode_node_unref0 (_tmp90_);
		_tmp91_ = vala_ccode_identifier_new ("sizeof");
		_tmp92_ = _tmp91_;
		_tmp93_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp92_);
		_tmp94_ = _tmp93_;
		_vala_ccode_node_unref0 (_tmp92_);
		sizeof_call = _tmp94_;
		_tmp95_ = sizeof_call;
		_tmp96_ = array_type;
		_tmp97_ = vala_array_type_get_element_type (_tmp96_);
		_tmp98_ = _tmp97_;
		_tmp99_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp98_);
		_tmp100_ = _tmp99_;
		_tmp101_ = vala_ccode_identifier_new (_tmp100_);
		_tmp102_ = _tmp101_;
		vala_ccode_function_call_add_argument (_tmp95_, (ValaCCodeExpression*) _tmp102_);
		_vala_ccode_node_unref0 (_tmp102_);
		_g_free0 (_tmp100_);
		_tmp103_ = dup_call;
		_tmp104_ = array_type;
		_tmp105_ = vala_array_type_get_length (_tmp104_);
		_tmp106_ = _tmp105_;
		_tmp107_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp106_);
		_tmp108_ = _tmp107_;
		_tmp109_ = sizeof_call;
		_tmp110_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp108_, (ValaCCodeExpression*) _tmp109_);
		_tmp111_ = _tmp110_;
		vala_ccode_function_call_add_argument (_tmp103_, (ValaCCodeExpression*) _tmp111_);
		_vala_ccode_node_unref0 (_tmp111_);
		_vala_ccode_node_unref0 (_tmp108_);
		_tmp112_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp113_ = _tmp112_;
		_tmp114_ = dup_call;
		vala_ccode_function_add_expression (_tmp113_, (ValaCCodeExpression*) _tmp114_);
		_vala_ccode_node_unref0 (sizeof_call);
		_vala_ccode_node_unref0 (dup_call);
	}
	_tmp115_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp116_ = function;
	vala_ccode_file_add_function_declaration (_tmp115_, _tmp116_);
	_tmp117_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp118_ = function;
	vala_ccode_file_add_function (_tmp117_, _tmp118_);
	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* add_func = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	ValaCCodeFunction* function = NULL;
	const gchar* _tmp5_;
	ValaCCodeFunction* _tmp6_;
	ValaCCodeFunction* _tmp7_;
	ValaCCodeFunction* _tmp8_;
	ValaArrayType* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	ValaCCodeParameter* _tmp14_;
	ValaCCodeParameter* _tmp15_;
	ValaCCodeFunction* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeParameter* _tmp18_;
	ValaCCodeFunction* _tmp19_;
	ValaCCodeParameter* _tmp20_;
	ValaCCodeParameter* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	gchar* typename = NULL;
	ValaArrayType* _tmp23_;
	ValaDataType* _tmp24_;
	ValaDataType* _tmp25_;
	gchar* _tmp26_;
	ValaCCodeExpression* value = NULL;
	ValaCCodeIdentifier* _tmp27_;
	ValaArrayType* _tmp28_;
	ValaDataType* _tmp29_;
	ValaDataType* _tmp30_;
	gboolean _tmp31_;
	ValaCCodeFunction* _tmp54_;
	const gchar* _tmp55_;
	ValaCCodeParameter* _tmp56_;
	ValaCCodeParameter* _tmp57_;
	ValaCCodeUnaryExpression* array = NULL;
	ValaCCodeIdentifier* _tmp58_;
	ValaCCodeIdentifier* _tmp59_;
	ValaCCodeUnaryExpression* _tmp60_;
	ValaCCodeUnaryExpression* _tmp61_;
	ValaCCodeUnaryExpression* length = NULL;
	ValaCCodeIdentifier* _tmp62_;
	ValaCCodeIdentifier* _tmp63_;
	ValaCCodeUnaryExpression* _tmp64_;
	ValaCCodeUnaryExpression* _tmp65_;
	ValaCCodeUnaryExpression* size = NULL;
	ValaCCodeIdentifier* _tmp66_;
	ValaCCodeIdentifier* _tmp67_;
	ValaCCodeUnaryExpression* _tmp68_;
	ValaCCodeUnaryExpression* _tmp69_;
	ValaCCodeFunctionCall* renew_call = NULL;
	ValaCCodeIdentifier* _tmp70_;
	ValaCCodeIdentifier* _tmp71_;
	ValaCCodeFunctionCall* _tmp72_;
	ValaCCodeFunctionCall* _tmp73_;
	ValaCCodeFunctionCall* _tmp74_;
	ValaArrayType* _tmp75_;
	ValaDataType* _tmp76_;
	ValaDataType* _tmp77_;
	gchar* _tmp78_;
	gchar* _tmp79_;
	ValaCCodeIdentifier* _tmp80_;
	ValaCCodeIdentifier* _tmp81_;
	ValaCCodeFunctionCall* _tmp82_;
	ValaCCodeUnaryExpression* _tmp83_;
	ValaArrayType* _tmp84_;
	ValaDataType* _tmp85_;
	ValaDataType* _tmp86_;
	gboolean _tmp87_;
	ValaCCodeBinaryExpression* csizecheck = NULL;
	ValaCCodeUnaryExpression* _tmp96_;
	ValaCCodeUnaryExpression* _tmp97_;
	ValaCCodeBinaryExpression* _tmp98_;
	ValaCCodeFunction* _tmp99_;
	ValaCCodeFunction* _tmp100_;
	ValaCCodeBinaryExpression* _tmp101_;
	ValaCCodeFunction* _tmp102_;
	ValaCCodeFunction* _tmp103_;
	ValaCCodeUnaryExpression* _tmp104_;
	ValaCCodeUnaryExpression* _tmp105_;
	ValaCCodeConstant* _tmp106_;
	ValaCCodeConstant* _tmp107_;
	ValaCCodeUnaryExpression* _tmp108_;
	ValaCCodeBinaryExpression* _tmp109_;
	ValaCCodeBinaryExpression* _tmp110_;
	ValaCCodeConstant* _tmp111_;
	ValaCCodeConstant* _tmp112_;
	ValaCCodeConditionalExpression* _tmp113_;
	ValaCCodeConditionalExpression* _tmp114_;
	ValaCCodeFunction* _tmp115_;
	ValaCCodeFunction* _tmp116_;
	ValaCCodeUnaryExpression* _tmp117_;
	ValaCCodeFunctionCall* _tmp118_;
	ValaCCodeFunction* _tmp119_;
	ValaCCodeFunction* _tmp120_;
	ValaCCodeFunction* _tmp121_;
	ValaCCodeFunction* _tmp122_;
	ValaCCodeUnaryExpression* _tmp123_;
	ValaCCodeUnaryExpression* _tmp124_;
	ValaCCodeUnaryExpression* _tmp125_;
	ValaCCodeUnaryExpression* _tmp126_;
	ValaCCodeElementAccess* _tmp127_;
	ValaCCodeElementAccess* _tmp128_;
	ValaCCodeExpression* _tmp129_;
	ValaArrayType* _tmp130_;
	ValaDataType* _tmp131_;
	ValaDataType* _tmp132_;
	gboolean _tmp133_;
	ValaCCodeFile* _tmp142_;
	ValaCCodeFunction* _tmp143_;
	ValaCCodeFile* _tmp144_;
	ValaCCodeFunction* _tmp145_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (array_type != NULL, NULL);
	_tmp0_ = self->priv->next_array_add_id;
	self->priv->next_array_add_id = _tmp0_ + 1;
	_tmp1_ = self->priv->next_array_add_id;
	_tmp2_ = g_strdup_printf ("_vala_array_add%d", _tmp1_);
	add_func = _tmp2_;
	_tmp3_ = add_func;
	_tmp4_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp3_);
	if (!_tmp4_) {
		result = add_func;
		return result;
	}
	_tmp5_ = add_func;
	_tmp6_ = vala_ccode_function_new (_tmp5_, "void");
	function = _tmp6_;
	_tmp7_ = function;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp7_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp8_ = function;
	_tmp9_ = array_type;
	_tmp10_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strdup_printf ("%s *", _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_ccode_parameter_new ("array", _tmp13_);
	_tmp15_ = _tmp14_;
	vala_ccode_function_add_parameter (_tmp8_, _tmp15_);
	_vala_ccode_node_unref0 (_tmp15_);
	_g_free0 (_tmp13_);
	_g_free0 (_tmp11_);
	_tmp16_ = function;
	_tmp17_ = vala_ccode_parameter_new ("length", "int*");
	_tmp18_ = _tmp17_;
	vala_ccode_function_add_parameter (_tmp16_, _tmp18_);
	_vala_ccode_node_unref0 (_tmp18_);
	_tmp19_ = function;
	_tmp20_ = vala_ccode_parameter_new ("size", "int*");
	_tmp21_ = _tmp20_;
	vala_ccode_function_add_parameter (_tmp19_, _tmp21_);
	_vala_ccode_node_unref0 (_tmp21_);
	_tmp22_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp22_);
	_tmp23_ = array_type;
	_tmp24_ = vala_array_type_get_element_type (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp25_);
	typename = _tmp26_;
	_tmp27_ = vala_ccode_identifier_new ("value");
	value = (ValaCCodeExpression*) _tmp27_;
	_tmp28_ = array_type;
	_tmp29_ = vala_array_type_get_element_type (_tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = vala_data_type_is_real_struct_type (_tmp30_);
	if (_tmp31_) {
		gboolean _tmp32_ = FALSE;
		ValaArrayType* _tmp33_;
		ValaDataType* _tmp34_;
		ValaDataType* _tmp35_;
		gboolean _tmp36_;
		gboolean _tmp37_;
		ValaArrayType* _tmp45_;
		ValaDataType* _tmp46_;
		ValaDataType* _tmp47_;
		gboolean _tmp48_;
		gboolean _tmp49_;
		_tmp33_ = array_type;
		_tmp34_ = vala_array_type_get_element_type (_tmp33_);
		_tmp35_ = _tmp34_;
		_tmp36_ = vala_data_type_get_nullable (_tmp35_);
		_tmp37_ = _tmp36_;
		if (!_tmp37_) {
			_tmp32_ = TRUE;
		} else {
			ValaArrayType* _tmp38_;
			ValaDataType* _tmp39_;
			ValaDataType* _tmp40_;
			gboolean _tmp41_;
			gboolean _tmp42_;
			_tmp38_ = array_type;
			_tmp39_ = vala_array_type_get_element_type (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp41_ = vala_data_type_get_value_owned (_tmp40_);
			_tmp42_ = _tmp41_;
			_tmp32_ = !_tmp42_;
		}
		if (_tmp32_) {
			const gchar* _tmp43_;
			gchar* _tmp44_;
			_tmp43_ = typename;
			_tmp44_ = g_strconcat ("const ", _tmp43_, NULL);
			_g_free0 (typename);
			typename = _tmp44_;
		}
		_tmp45_ = array_type;
		_tmp46_ = vala_array_type_get_element_type (_tmp45_);
		_tmp47_ = _tmp46_;
		_tmp48_ = vala_data_type_get_nullable (_tmp47_);
		_tmp49_ = _tmp48_;
		if (!_tmp49_) {
			const gchar* _tmp50_;
			gchar* _tmp51_;
			ValaCCodeExpression* _tmp52_;
			ValaCCodeUnaryExpression* _tmp53_;
			_tmp50_ = typename;
			_tmp51_ = g_strconcat (_tmp50_, "*", NULL);
			_g_free0 (typename);
			typename = _tmp51_;
			_tmp52_ = value;
			_tmp53_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp52_);
			_vala_ccode_node_unref0 (value);
			value = (ValaCCodeExpression*) _tmp53_;
		}
	}
	_tmp54_ = function;
	_tmp55_ = typename;
	_tmp56_ = vala_ccode_parameter_new ("value", _tmp55_);
	_tmp57_ = _tmp56_;
	vala_ccode_function_add_parameter (_tmp54_, _tmp57_);
	_vala_ccode_node_unref0 (_tmp57_);
	_tmp58_ = vala_ccode_identifier_new ("array");
	_tmp59_ = _tmp58_;
	_tmp60_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp59_);
	_tmp61_ = _tmp60_;
	_vala_ccode_node_unref0 (_tmp59_);
	array = _tmp61_;
	_tmp62_ = vala_ccode_identifier_new ("length");
	_tmp63_ = _tmp62_;
	_tmp64_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp63_);
	_tmp65_ = _tmp64_;
	_vala_ccode_node_unref0 (_tmp63_);
	length = _tmp65_;
	_tmp66_ = vala_ccode_identifier_new ("size");
	_tmp67_ = _tmp66_;
	_tmp68_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp67_);
	_tmp69_ = _tmp68_;
	_vala_ccode_node_unref0 (_tmp67_);
	size = _tmp69_;
	_tmp70_ = vala_ccode_identifier_new ("g_renew");
	_tmp71_ = _tmp70_;
	_tmp72_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp71_);
	_tmp73_ = _tmp72_;
	_vala_ccode_node_unref0 (_tmp71_);
	renew_call = _tmp73_;
	_tmp74_ = renew_call;
	_tmp75_ = array_type;
	_tmp76_ = vala_array_type_get_element_type (_tmp75_);
	_tmp77_ = _tmp76_;
	_tmp78_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp77_);
	_tmp79_ = _tmp78_;
	_tmp80_ = vala_ccode_identifier_new (_tmp79_);
	_tmp81_ = _tmp80_;
	vala_ccode_function_call_add_argument (_tmp74_, (ValaCCodeExpression*) _tmp81_);
	_vala_ccode_node_unref0 (_tmp81_);
	_g_free0 (_tmp79_);
	_tmp82_ = renew_call;
	_tmp83_ = array;
	vala_ccode_function_call_add_argument (_tmp82_, (ValaCCodeExpression*) _tmp83_);
	_tmp84_ = array_type;
	_tmp85_ = vala_array_type_get_element_type (_tmp84_);
	_tmp86_ = _tmp85_;
	_tmp87_ = vala_data_type_is_reference_type_or_type_parameter (_tmp86_);
	if (_tmp87_) {
		ValaCCodeFunctionCall* _tmp88_;
		ValaCCodeUnaryExpression* _tmp89_;
		ValaCCodeConstant* _tmp90_;
		ValaCCodeConstant* _tmp91_;
		ValaCCodeBinaryExpression* _tmp92_;
		ValaCCodeBinaryExpression* _tmp93_;
		_tmp88_ = renew_call;
		_tmp89_ = size;
		_tmp90_ = vala_ccode_constant_new ("1");
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp89_, (ValaCCodeExpression*) _tmp91_);
		_tmp93_ = _tmp92_;
		vala_ccode_function_call_add_argument (_tmp88_, (ValaCCodeExpression*) _tmp93_);
		_vala_ccode_node_unref0 (_tmp93_);
		_vala_ccode_node_unref0 (_tmp91_);
	} else {
		ValaCCodeFunctionCall* _tmp94_;
		ValaCCodeUnaryExpression* _tmp95_;
		_tmp94_ = renew_call;
		_tmp95_ = size;
		vala_ccode_function_call_add_argument (_tmp94_, (ValaCCodeExpression*) _tmp95_);
	}
	_tmp96_ = length;
	_tmp97_ = size;
	_tmp98_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp96_, (ValaCCodeExpression*) _tmp97_);
	csizecheck = _tmp98_;
	_tmp99_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp100_ = _tmp99_;
	_tmp101_ = csizecheck;
	vala_ccode_function_open_if (_tmp100_, (ValaCCodeExpression*) _tmp101_);
	_tmp102_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp103_ = _tmp102_;
	_tmp104_ = size;
	_tmp105_ = size;
	_tmp106_ = vala_ccode_constant_new ("2");
	_tmp107_ = _tmp106_;
	_tmp108_ = size;
	_tmp109_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp107_, (ValaCCodeExpression*) _tmp108_);
	_tmp110_ = _tmp109_;
	_tmp111_ = vala_ccode_constant_new ("4");
	_tmp112_ = _tmp111_;
	_tmp113_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) _tmp105_, (ValaCCodeExpression*) _tmp110_, (ValaCCodeExpression*) _tmp112_);
	_tmp114_ = _tmp113_;
	vala_ccode_function_add_assignment (_tmp103_, (ValaCCodeExpression*) _tmp104_, (ValaCCodeExpression*) _tmp114_);
	_vala_ccode_node_unref0 (_tmp114_);
	_vala_ccode_node_unref0 (_tmp112_);
	_vala_ccode_node_unref0 (_tmp110_);
	_vala_ccode_node_unref0 (_tmp107_);
	_tmp115_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp116_ = _tmp115_;
	_tmp117_ = array;
	_tmp118_ = renew_call;
	vala_ccode_function_add_assignment (_tmp116_, (ValaCCodeExpression*) _tmp117_, (ValaCCodeExpression*) _tmp118_);
	_tmp119_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp120_ = _tmp119_;
	vala_ccode_function_close (_tmp120_);
	_tmp121_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp122_ = _tmp121_;
	_tmp123_ = array;
	_tmp124_ = length;
	_tmp125_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp124_);
	_tmp126_ = _tmp125_;
	_tmp127_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp123_, (ValaCCodeExpression*) _tmp126_);
	_tmp128_ = _tmp127_;
	_tmp129_ = value;
	vala_ccode_function_add_assignment (_tmp122_, (ValaCCodeExpression*) _tmp128_, _tmp129_);
	_vala_ccode_node_unref0 (_tmp128_);
	_vala_ccode_node_unref0 (_tmp126_);
	_tmp130_ = array_type;
	_tmp131_ = vala_array_type_get_element_type (_tmp130_);
	_tmp132_ = _tmp131_;
	_tmp133_ = vala_data_type_is_reference_type_or_type_parameter (_tmp132_);
	if (_tmp133_) {
		ValaCCodeFunction* _tmp134_;
		ValaCCodeFunction* _tmp135_;
		ValaCCodeUnaryExpression* _tmp136_;
		ValaCCodeUnaryExpression* _tmp137_;
		ValaCCodeElementAccess* _tmp138_;
		ValaCCodeElementAccess* _tmp139_;
		ValaCCodeConstant* _tmp140_;
		ValaCCodeConstant* _tmp141_;
		_tmp134_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp135_ = _tmp134_;
		_tmp136_ = array;
		_tmp137_ = length;
		_tmp138_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp136_, (ValaCCodeExpression*) _tmp137_);
		_tmp139_ = _tmp138_;
		_tmp140_ = vala_ccode_constant_new ("NULL");
		_tmp141_ = _tmp140_;
		vala_ccode_function_add_assignment (_tmp135_, (ValaCCodeExpression*) _tmp139_, (ValaCCodeExpression*) _tmp141_);
		_vala_ccode_node_unref0 (_tmp141_);
		_vala_ccode_node_unref0 (_tmp139_);
	}
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp142_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp143_ = function;
	vala_ccode_file_add_function_declaration (_tmp142_, _tmp143_);
	_tmp144_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp145_ = function;
	vala_ccode_file_add_function (_tmp144_, _tmp145_);
	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;
	ValaBinaryExpression* binary = NULL;
	ValaAssignment* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaBinaryExpression* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ValaBinaryExpression* _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (assignment != NULL, FALSE);
	_tmp0_ = assignment;
	_tmp1_ = vala_assignment_get_right (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_BINARY_EXPRESSION) ? ((ValaBinaryExpression*) _tmp2_) : NULL);
	binary = _tmp3_;
	_tmp5_ = binary;
	if (_tmp5_ != NULL) {
		ValaBinaryExpression* _tmp6_;
		ValaExpression* _tmp7_;
		ValaExpression* _tmp8_;
		ValaDataType* _tmp9_;
		ValaDataType* _tmp10_;
		_tmp6_ = binary;
		_tmp7_ = vala_binary_expression_get_left (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = vala_expression_get_value_type (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, VALA_TYPE_ARRAY_TYPE);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaBinaryExpression* _tmp11_;
		ValaBinaryOperator _tmp12_;
		ValaBinaryOperator _tmp13_;
		_tmp11_ = binary;
		_tmp12_ = vala_binary_expression_get_operator (_tmp11_);
		_tmp13_ = _tmp12_;
		if (_tmp13_ == VALA_BINARY_OPERATOR_PLUS) {
			ValaAssignment* _tmp14_;
			ValaExpression* _tmp15_;
			ValaExpression* _tmp16_;
			ValaSymbol* _tmp17_;
			ValaSymbol* _tmp18_;
			ValaBinaryExpression* _tmp19_;
			ValaExpression* _tmp20_;
			ValaExpression* _tmp21_;
			ValaSymbol* _tmp22_;
			ValaSymbol* _tmp23_;
			_tmp14_ = assignment;
			_tmp15_ = vala_assignment_get_left (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = vala_expression_get_symbol_reference (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = binary;
			_tmp20_ = vala_binary_expression_get_left (_tmp19_);
			_tmp21_ = _tmp20_;
			_tmp22_ = vala_expression_get_symbol_reference (_tmp21_);
			_tmp23_ = _tmp22_;
			if (_tmp18_ == _tmp23_) {
				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;
	ValaAssignment* _tmp0_;
	gboolean _tmp1_;
	ValaBinaryExpression* binary = NULL;
	ValaAssignment* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaBinaryExpression* _tmp6_;
	ValaExpression* array = NULL;
	ValaAssignment* _tmp7_;
	ValaExpression* _tmp8_;
	ValaExpression* _tmp9_;
	ValaExpression* _tmp10_;
	ValaArrayType* array_type = NULL;
	ValaExpression* _tmp11_;
	ValaDataType* _tmp12_;
	ValaDataType* _tmp13_;
	ValaArrayType* _tmp14_;
	ValaExpression* element = NULL;
	ValaBinaryExpression* _tmp15_;
	ValaExpression* _tmp16_;
	ValaExpression* _tmp17_;
	ValaExpression* _tmp18_;
	ValaSymbol* array_var = NULL;
	ValaExpression* _tmp19_;
	ValaSymbol* _tmp20_;
	ValaSymbol* _tmp21_;
	ValaSymbol* _tmp22_;
	gboolean _tmp23_ = FALSE;
	gboolean _tmp24_ = FALSE;
	gboolean _tmp25_ = FALSE;
	ValaArrayType* _tmp26_;
	gint _tmp27_;
	gint _tmp28_;
	ValaParameter* value_param = NULL;
	ValaExpression* _tmp38_;
	ValaDataType* _tmp39_;
	ValaDataType* _tmp40_;
	ValaParameter* _tmp41_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaArrayType* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	ValaCCodeIdentifier* _tmp45_;
	ValaCCodeIdentifier* _tmp46_;
	ValaCCodeFunctionCall* _tmp47_;
	ValaCCodeFunctionCall* _tmp48_;
	ValaCCodeFunctionCall* _tmp49_;
	ValaExpression* _tmp50_;
	ValaCCodeExpression* _tmp51_;
	ValaCCodeExpression* _tmp52_;
	ValaCCodeUnaryExpression* _tmp53_;
	ValaCCodeUnaryExpression* _tmp54_;
	ValaCCodeFunctionCall* _tmp55_;
	ValaExpression* _tmp56_;
	ValaCCodeExpression* _tmp57_;
	ValaCCodeExpression* _tmp58_;
	ValaCCodeUnaryExpression* _tmp59_;
	ValaCCodeUnaryExpression* _tmp60_;
	ValaCCodeFunctionCall* _tmp61_;
	ValaExpression* _tmp62_;
	ValaTargetValue* _tmp63_;
	ValaTargetValue* _tmp64_;
	ValaCCodeExpression* _tmp65_;
	ValaCCodeExpression* _tmp66_;
	ValaCCodeUnaryExpression* _tmp67_;
	ValaCCodeUnaryExpression* _tmp68_;
	ValaCCodeFunctionCall* _tmp69_;
	ValaParameter* _tmp70_;
	ValaExpression* _tmp71_;
	ValaExpression* _tmp72_;
	ValaCCodeExpression* _tmp73_;
	ValaCCodeExpression* _tmp74_;
	ValaCCodeExpression* _tmp75_;
	ValaCCodeExpression* _tmp76_;
	ValaCCodeFunction* _tmp77_;
	ValaCCodeFunction* _tmp78_;
	ValaCCodeFunctionCall* _tmp79_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (assignment != NULL);
	_tmp0_ = assignment;
	_tmp1_ = vala_ccode_array_module_is_array_add (self, _tmp0_);
	if (!_tmp1_) {
		ValaAssignment* _tmp2_;
		_tmp2_ = assignment;
		VALA_CODE_VISITOR_CLASS (vala_ccode_array_module_parent_class)->visit_assignment ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule), _tmp2_);
		return;
	}
	_tmp3_ = assignment;
	_tmp4_ = vala_assignment_get_right (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, VALA_TYPE_BINARY_EXPRESSION, ValaBinaryExpression));
	binary = _tmp6_;
	_tmp7_ = assignment;
	_tmp8_ = vala_assignment_get_left (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _vala_code_node_ref0 (_tmp9_);
	array = _tmp10_;
	_tmp11_ = array;
	_tmp12_ = vala_expression_get_value_type (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
	array_type = _tmp14_;
	_tmp15_ = binary;
	_tmp16_ = vala_binary_expression_get_right (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = _vala_code_node_ref0 (_tmp17_);
	element = _tmp18_;
	_tmp19_ = array;
	_tmp20_ = vala_expression_get_symbol_reference (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = _vala_code_node_ref0 (_tmp21_);
	array_var = _tmp22_;
	_tmp26_ = array_type;
	_tmp27_ = vala_array_type_get_rank (_tmp26_);
	_tmp28_ = _tmp27_;
	if (_tmp28_ == 1) {
		ValaSymbol* _tmp29_;
		_tmp29_ = array_var;
		_tmp25_ = _tmp29_ != NULL;
	} else {
		_tmp25_ = FALSE;
	}
	if (_tmp25_) {
		ValaSymbol* _tmp30_;
		gboolean _tmp31_;
		_tmp30_ = array_var;
		_tmp31_ = vala_symbol_is_internal_symbol (_tmp30_);
		_tmp24_ = _tmp31_;
	} else {
		_tmp24_ = FALSE;
	}
	if (_tmp24_) {
		gboolean _tmp32_ = FALSE;
		ValaSymbol* _tmp33_;
		_tmp33_ = array_var;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, VALA_TYPE_LOCAL_VARIABLE)) {
			_tmp32_ = TRUE;
		} else {
			ValaSymbol* _tmp34_;
			_tmp34_ = array_var;
			_tmp32_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, VALA_TYPE_FIELD);
		}
		_tmp23_ = _tmp32_;
	} else {
		_tmp23_ = FALSE;
	}
	if (_tmp23_) {
	} else {
		ValaAssignment* _tmp35_;
		ValaSourceReference* _tmp36_;
		ValaSourceReference* _tmp37_;
		_tmp35_ = assignment;
		_tmp36_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp35_);
		_tmp37_ = _tmp36_;
		vala_report_error (_tmp37_, "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;
	}
	_tmp38_ = element;
	_tmp39_ = vala_expression_get_target_type (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = vala_parameter_new ("value", _tmp40_, NULL);
	value_param = _tmp41_;
	_tmp42_ = array_type;
	_tmp43_ = vala_ccode_array_module_generate_array_add_wrapper (self, _tmp42_);
	_tmp44_ = _tmp43_;
	_tmp45_ = vala_ccode_identifier_new (_tmp44_);
	_tmp46_ = _tmp45_;
	_tmp47_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp46_);
	_tmp48_ = _tmp47_;
	_vala_ccode_node_unref0 (_tmp46_);
	_g_free0 (_tmp44_);
	ccall = _tmp48_;
	_tmp49_ = ccall;
	_tmp50_ = array;
	_tmp51_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp52_);
	_tmp54_ = _tmp53_;
	vala_ccode_function_call_add_argument (_tmp49_, (ValaCCodeExpression*) _tmp54_);
	_vala_ccode_node_unref0 (_tmp54_);
	_vala_ccode_node_unref0 (_tmp52_);
	_tmp55_ = ccall;
	_tmp56_ = array;
	_tmp57_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp56_, -1);
	_tmp58_ = _tmp57_;
	_tmp59_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp58_);
	_tmp60_ = _tmp59_;
	vala_ccode_function_call_add_argument (_tmp55_, (ValaCCodeExpression*) _tmp60_);
	_vala_ccode_node_unref0 (_tmp60_);
	_vala_ccode_node_unref0 (_tmp58_);
	_tmp61_ = ccall;
	_tmp62_ = array;
	_tmp63_ = vala_expression_get_target_value (_tmp62_);
	_tmp64_ = _tmp63_;
	_tmp65_ = vala_ccode_base_module_get_array_size_cvalue ((ValaCCodeBaseModule*) self, _tmp64_);
	_tmp66_ = _tmp65_;
	_tmp67_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp66_);
	_tmp68_ = _tmp67_;
	vala_ccode_function_call_add_argument (_tmp61_, (ValaCCodeExpression*) _tmp68_);
	_vala_ccode_node_unref0 (_tmp68_);
	_vala_ccode_node_unref0 (_tmp66_);
	_tmp69_ = ccall;
	_tmp70_ = value_param;
	_tmp71_ = element;
	_tmp72_ = element;
	_tmp73_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp72_);
	_tmp74_ = _tmp73_;
	_tmp75_ = vala_ccode_base_module_handle_struct_argument ((ValaCCodeBaseModule*) self, _tmp70_, _tmp71_, _tmp74_);
	_tmp76_ = _tmp75_;
	vala_ccode_function_call_add_argument (_tmp69_, _tmp76_);
	_vala_ccode_node_unref0 (_tmp76_);
	_vala_ccode_node_unref0 (_tmp74_);
	_tmp77_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp78_ = _tmp77_;
	_tmp79_ = ccall;
	vala_ccode_function_add_expression (_tmp78_, (ValaCCodeExpression*) _tmp79_);
	_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;
	ValaParameter* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	gchar* ctypename = NULL;
	ValaParameter* _tmp8_;
	ValaDataType* _tmp9_;
	ValaDataType* _tmp10_;
	gchar* _tmp11_;
	ValaParameter* _tmp12_;
	ValaParameterDirection _tmp13_;
	ValaParameterDirection _tmp14_;
	ValaCCodeParameter* main_cparam = NULL;
	ValaParameter* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	const gchar* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeParameter* _tmp24_;
	ValaArrayType* array_type = NULL;
	ValaParameter* _tmp25_;
	ValaDataType* _tmp26_;
	ValaDataType* _tmp27_;
	ValaArrayType* _tmp28_;
	ValaArrayType* _tmp29_;
	ValaDataType* _tmp30_;
	ValaDataType* _tmp31_;
	ValaCCodeFile* _tmp32_;
	ValaMap* _tmp33_;
	ValaParameter* _tmp34_;
	gdouble _tmp35_;
	gint _tmp36_;
	ValaCCodeParameter* _tmp37_;
	ValaMap* _tmp38_;
	ValaParameter* _tmp48_;
	gboolean _tmp49_;
	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_ = param;
	_tmp1_ = vala_variable_get_variable_type ((ValaVariable*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_ARRAY_TYPE)) {
		ValaParameter* _tmp3_;
		ValaCCodeFile* _tmp4_;
		ValaMap* _tmp5_;
		ValaMap* _tmp6_;
		ValaCCodeParameter* _tmp7_;
		_tmp3_ = param;
		_tmp4_ = decl_space;
		_tmp5_ = cparam_map;
		_tmp6_ = carg_map;
		_tmp7_ = VALA_CCODE_METHOD_MODULE_CLASS (vala_ccode_array_module_parent_class)->generate_parameter ((ValaCCodeMethodModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule), _tmp3_, _tmp4_, _tmp5_, _tmp6_);
		result = _tmp7_;
		return result;
	}
	_tmp8_ = param;
	_tmp9_ = vala_variable_get_variable_type ((ValaVariable*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp10_);
	ctypename = _tmp11_;
	_tmp12_ = param;
	_tmp13_ = vala_parameter_get_direction (_tmp12_);
	_tmp14_ = _tmp13_;
	if (_tmp14_ != VALA_PARAMETER_DIRECTION_IN) {
		const gchar* _tmp15_;
		gchar* _tmp16_;
		_tmp15_ = ctypename;
		_tmp16_ = g_strconcat (_tmp15_, "*", NULL);
		_g_free0 (ctypename);
		ctypename = _tmp16_;
	}
	_tmp17_ = param;
	_tmp18_ = vala_symbol_get_name ((ValaSymbol*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = ctypename;
	_tmp23_ = vala_ccode_parameter_new (_tmp21_, _tmp22_);
	_tmp24_ = _tmp23_;
	_g_free0 (_tmp21_);
	main_cparam = _tmp24_;
	_tmp25_ = param;
	_tmp26_ = vala_variable_get_variable_type ((ValaVariable*) _tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
	array_type = _tmp28_;
	_tmp29_ = array_type;
	_tmp30_ = vala_array_type_get_element_type (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = decl_space;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp31_, _tmp32_);
	_tmp33_ = cparam_map;
	_tmp34_ = param;
	_tmp35_ = vala_ccode_base_module_get_ccode_pos (_tmp34_);
	_tmp36_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp35_, FALSE);
	_tmp37_ = main_cparam;
	vala_map_set (_tmp33_, (gpointer) ((gintptr) _tmp36_), _tmp37_);
	_tmp38_ = carg_map;
	if (_tmp38_ != NULL) {
		ValaMap* _tmp39_;
		ValaParameter* _tmp40_;
		gdouble _tmp41_;
		gint _tmp42_;
		ValaParameter* _tmp43_;
		const gchar* _tmp44_;
		const gchar* _tmp45_;
		ValaCCodeExpression* _tmp46_;
		ValaCCodeExpression* _tmp47_;
		_tmp39_ = carg_map;
		_tmp40_ = param;
		_tmp41_ = vala_ccode_base_module_get_ccode_pos (_tmp40_);
		_tmp42_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp41_, FALSE);
		_tmp43_ = param;
		_tmp44_ = vala_symbol_get_name ((ValaSymbol*) _tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp45_);
		_tmp47_ = _tmp46_;
		vala_map_set (_tmp39_, (gpointer) ((gintptr) _tmp42_), _tmp47_);
		_vala_ccode_node_unref0 (_tmp47_);
	}
	_tmp48_ = param;
	_tmp49_ = vala_ccode_base_module_get_ccode_array_length ((ValaCodeNode*) _tmp48_);
	if (_tmp49_) {
		gchar* length_ctype = NULL;
		gchar* _tmp50_;
		ValaParameter* _tmp51_;
		gchar* _tmp52_;
		gchar* _tmp53_;
		gboolean _tmp54_;
		ValaParameter* _tmp57_;
		ValaParameterDirection _tmp58_;
		ValaParameterDirection _tmp59_;
		_tmp50_ = g_strdup ("int");
		length_ctype = _tmp50_;
		_tmp51_ = param;
		_tmp52_ = vala_ccode_base_module_get_ccode_array_length_type ((ValaCodeNode*) _tmp51_);
		_tmp53_ = _tmp52_;
		_tmp54_ = _tmp53_ != NULL;
		_g_free0 (_tmp53_);
		if (_tmp54_) {
			ValaParameter* _tmp55_;
			gchar* _tmp56_;
			_tmp55_ = param;
			_tmp56_ = vala_ccode_base_module_get_ccode_array_length_type ((ValaCodeNode*) _tmp55_);
			_g_free0 (length_ctype);
			length_ctype = _tmp56_;
		}
		_tmp57_ = param;
		_tmp58_ = vala_parameter_get_direction (_tmp57_);
		_tmp59_ = _tmp58_;
		if (_tmp59_ != VALA_PARAMETER_DIRECTION_IN) {
			const gchar* _tmp60_;
			gchar* _tmp61_;
			_tmp60_ = length_ctype;
			_tmp61_ = g_strdup_printf ("%s*", _tmp60_);
			_g_free0 (length_ctype);
			length_ctype = _tmp61_;
		}
		{
			gint dim = 0;
			dim = 1;
			{
				gboolean _tmp62_ = FALSE;
				_tmp62_ = TRUE;
				while (TRUE) {
					gint _tmp64_;
					ValaArrayType* _tmp65_;
					gint _tmp66_;
					gint _tmp67_;
					ValaCCodeParameter* cparam = NULL;
					ValaParameter* _tmp68_;
					gint _tmp69_;
					gchar* _tmp70_;
					gchar* _tmp71_;
					const gchar* _tmp72_;
					ValaCCodeParameter* _tmp73_;
					ValaCCodeParameter* _tmp74_;
					ValaMap* _tmp75_;
					ValaParameter* _tmp76_;
					gdouble _tmp77_;
					gint _tmp78_;
					gint _tmp79_;
					ValaCCodeParameter* _tmp80_;
					ValaMap* _tmp81_;
					if (!_tmp62_) {
						gint _tmp63_;
						_tmp63_ = dim;
						dim = _tmp63_ + 1;
					}
					_tmp62_ = FALSE;
					_tmp64_ = dim;
					_tmp65_ = array_type;
					_tmp66_ = vala_array_type_get_rank (_tmp65_);
					_tmp67_ = _tmp66_;
					if (!(_tmp64_ <= _tmp67_)) {
						break;
					}
					_tmp68_ = param;
					_tmp69_ = dim;
					_tmp70_ = vala_ccode_base_module_get_parameter_array_length_cname ((ValaCCodeBaseModule*) self, _tmp68_, _tmp69_);
					_tmp71_ = _tmp70_;
					_tmp72_ = length_ctype;
					_tmp73_ = vala_ccode_parameter_new (_tmp71_, _tmp72_);
					_tmp74_ = _tmp73_;
					_g_free0 (_tmp71_);
					cparam = _tmp74_;
					_tmp75_ = cparam_map;
					_tmp76_ = param;
					_tmp77_ = vala_ccode_base_module_get_ccode_array_length_pos ((ValaCodeNode*) _tmp76_);
					_tmp78_ = dim;
					_tmp79_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp77_ + (0.01 * _tmp78_), FALSE);
					_tmp80_ = cparam;
					vala_map_set (_tmp75_, (gpointer) ((gintptr) _tmp79_), _tmp80_);
					_tmp81_ = carg_map;
					if (_tmp81_ != NULL) {
						ValaMap* _tmp82_;
						ValaParameter* _tmp83_;
						gdouble _tmp84_;
						gint _tmp85_;
						gint _tmp86_;
						ValaCCodeParameter* _tmp87_;
						const gchar* _tmp88_;
						const gchar* _tmp89_;
						ValaCCodeExpression* _tmp90_;
						ValaCCodeExpression* _tmp91_;
						_tmp82_ = carg_map;
						_tmp83_ = param;
						_tmp84_ = vala_ccode_base_module_get_ccode_array_length_pos ((ValaCodeNode*) _tmp83_);
						_tmp85_ = dim;
						_tmp86_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp84_ + (0.01 * _tmp85_), FALSE);
						_tmp87_ = cparam;
						_tmp88_ = vala_ccode_parameter_get_name (_tmp87_);
						_tmp89_ = _tmp88_;
						_tmp90_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp89_);
						_tmp91_ = _tmp90_;
						vala_map_set (_tmp82_, (gpointer) ((gintptr) _tmp86_), _tmp91_);
						_vala_ccode_node_unref0 (_tmp91_);
					}
					_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);
	((ValaCodeVisitorClass *) klass)->finalize = vala_ccode_array_module_finalize;
	g_type_class_add_private (klass, sizeof (ValaCCodeArrayModulePrivate));
	((ValaCodeVisitorClass *) klass)->visit_array_creation_expression = (void (*) (ValaCodeVisitor *, ValaArrayCreationExpression*)) vala_ccode_array_module_real_visit_array_creation_expression;
	((ValaCCodeBaseModuleClass *) klass)->get_array_length_cname = (gchar* (*) (ValaCCodeBaseModule *, const gchar*, gint)) vala_ccode_array_module_real_get_array_length_cname;
	((ValaCCodeBaseModuleClass *) klass)->get_parameter_array_length_cname = (gchar* (*) (ValaCCodeBaseModule *, ValaParameter*, gint)) vala_ccode_array_module_real_get_parameter_array_length_cname;
	((ValaCCodeBaseModuleClass *) klass)->get_array_length_cexpression = (ValaCCodeExpression* (*) (ValaCCodeBaseModule *, ValaExpression*, gint)) vala_ccode_array_module_real_get_array_length_cexpression;
	((ValaCCodeBaseModuleClass *) klass)->get_array_length_cvalue = (ValaCCodeExpression* (*) (ValaCCodeBaseModule *, ValaTargetValue*, gint)) vala_ccode_array_module_real_get_array_length_cvalue;
	((ValaCCodeBaseModuleClass *) klass)->get_array_size_cname = (gchar* (*) (ValaCCodeBaseModule *, const gchar*)) vala_ccode_array_module_real_get_array_size_cname;
	((ValaCodeVisitorClass *) klass)->visit_element_access = (void (*) (ValaCodeVisitor *, ValaElementAccess*)) vala_ccode_array_module_real_visit_element_access;
	((ValaCodeVisitorClass *) klass)->visit_slice_expression = (void (*) (ValaCodeVisitor *, ValaSliceExpression*)) vala_ccode_array_module_real_visit_slice_expression;
	((ValaCCodeBaseModuleClass *) klass)->append_struct_array_free = (gchar* (*) (ValaCCodeBaseModule *, ValaStruct*)) vala_ccode_array_module_real_append_struct_array_free;
	((ValaCCodeBaseModuleClass *) klass)->append_vala_array_free = (void (*) (ValaCCodeBaseModule *)) vala_ccode_array_module_real_append_vala_array_free;
	((ValaCCodeBaseModuleClass *) klass)->append_vala_array_move = (void (*) (ValaCCodeBaseModule *)) vala_ccode_array_module_real_append_vala_array_move;
	((ValaCCodeBaseModuleClass *) klass)->append_vala_array_length = (void (*) (ValaCCodeBaseModule *)) vala_ccode_array_module_real_append_vala_array_length;
	((ValaCCodeBaseModuleClass *) klass)->copy_value = (ValaTargetValue* (*) (ValaCCodeBaseModule *, ValaTargetValue*, ValaCodeNode*)) vala_ccode_array_module_real_copy_value;
	((ValaCCodeBaseModuleClass *) klass)->get_dup_func_expression = (ValaCCodeExpression* (*) (ValaCCodeBaseModule *, ValaDataType*, ValaSourceReference*, gboolean)) vala_ccode_array_module_real_get_dup_func_expression;
	((ValaCCodeBaseModuleClass *) klass)->destroy_value = (ValaCCodeExpression* (*) (ValaCCodeBaseModule *, ValaTargetValue*, gboolean)) vala_ccode_array_module_real_destroy_value;
	((ValaCodeVisitorClass *) klass)->visit_assignment = (void (*) (ValaCodeVisitor *, ValaAssignment*)) vala_ccode_array_module_real_visit_assignment;
	((ValaCCodeMethodModuleClass *) klass)->generate_parameter = (ValaCCodeParameter* (*) (ValaCCodeMethodModule *, ValaParameter*, ValaCCodeFile*, ValaMap*, ValaMap*)) 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 = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModule);
	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;
}



