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

#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_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_ccode_declarator_suffix_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_declarator_suffix_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 _ValaCCodeArrayModulePrivate {
	gint next_array_dup_id;
	gint next_array_add_id;
};

static gint ValaCCodeArrayModule_private_offset;
static gpointer vala_ccode_array_module_parent_class = NULL;

static void vala_ccode_array_module_append_initializer_list (ValaCCodeArrayModule* self,
                                                      ValaCCodeExpression* name_cnode,
                                                      ValaInitializerList* initializer_list,
                                                      gint rank,
                                                      gint* i);
static void vala_ccode_array_module_real_visit_array_creation_expression (ValaCodeVisitor* base,
                                                                   ValaArrayCreationExpression* expr);
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_variable_array_length_cname (ValaCCodeBaseModule* base,
                                                                     ValaVariable* variable,
                                                                     gint dim);
static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cexpression (ValaCCodeBaseModule* base,
                                                                                ValaExpression* array_expr,
                                                                                gint dim);
static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cvalue (ValaCCodeBaseModule* base,
                                                                           ValaTargetValue* value,
                                                                           gint dim);
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);
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);
static gchar* vala_ccode_array_module_real_append_struct_array_free (ValaCCodeBaseModule* base,
                                                              ValaStruct* st);
static gchar* vala_ccode_array_module_real_append_struct_array_destroy (ValaCCodeBaseModule* base,
                                                                 ValaStruct* st);
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);
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);
static ValaCCodeExpression* vala_ccode_array_module_real_destroy_value (ValaCCodeBaseModule* base,
                                                                 ValaTargetValue* value,
                                                                 gboolean is_macro_definition);
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);
static ValaCCodeParameter* vala_ccode_array_module_real_generate_parameter (ValaCCodeMethodModule* base,
                                                                     ValaParameter* param,
                                                                     ValaCCodeFile* decl_space,
                                                                     ValaMap* cparam_map,
                                                                     ValaMap* carg_map);
static void vala_ccode_array_module_real_append_params_array (ValaCCodeBaseModule* base,
                                                       ValaMethod* m);
static void vala_ccode_array_module_finalize (ValaCodeVisitor * obj);
static GType vala_ccode_array_module_get_type_once (void);

static inline gpointer
vala_ccode_array_module_get_instance_private (ValaCCodeArrayModule* self)
{
	return G_STRUCT_MEMBER_P (self, ValaCCodeArrayModule_private_offset);
}

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;
		ValaList* _tmp0_;
		gint _e_size = 0;
		ValaList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _e_index = 0;
		_tmp0_ = vala_initializer_list_get_initializers (initializer_list);
		_e_list = _tmp0_;
		_tmp1_ = _e_list;
		_tmp2_ = vala_collection_get_size ((ValaCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_e_size = _tmp3_;
		_e_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			ValaExpression* e = NULL;
			ValaList* _tmp6_;
			gpointer _tmp7_;
			_e_index = _e_index + 1;
			_tmp4_ = _e_index;
			_tmp5_ = _e_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _e_list;
			_tmp7_ = vala_list_get (_tmp6_, _e_index);
			e = (ValaExpression*) _tmp7_;
			if (rank > 1) {
				ValaExpression* _tmp8_;
				_tmp8_ = e;
				vala_ccode_array_module_append_initializer_list (self, name_cnode, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, VALA_TYPE_INITIALIZER_LIST, ValaInitializerList), rank - 1, i);
			} else {
				ValaCCodeFunction* _tmp9_;
				ValaCCodeFunction* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				ValaCCodeConstant* _tmp13_;
				ValaCCodeConstant* _tmp14_;
				ValaCCodeElementAccess* _tmp15_;
				ValaCCodeElementAccess* _tmp16_;
				ValaExpression* _tmp17_;
				ValaCCodeExpression* _tmp18_;
				gint _tmp19_;
				_tmp9_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp10_ = _tmp9_;
				_tmp11_ = g_strdup_printf ("%i", *i);
				_tmp12_ = _tmp11_;
				_tmp13_ = vala_ccode_constant_new (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = vala_ccode_element_access_new (name_cnode, (ValaCCodeExpression*) _tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = e;
				_tmp18_ = vala_get_cvalue (_tmp17_);
				vala_ccode_function_add_assignment (_tmp10_, (ValaCCodeExpression*) _tmp16_, _tmp18_);
				_vala_ccode_node_unref0 (_tmp16_);
				_vala_ccode_node_unref0 (_tmp14_);
				_g_free0 (_tmp12_);
				_tmp19_ = *i;
				*i = _tmp19_ + 1;
			}
			_vala_code_node_unref0 (e);
		}
	}
}

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;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	ValaArrayType* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValaArrayType* _tmp4_;
	ValaCCodeFunctionCall* gnew = NULL;
	ValaCodeContext* _tmp22_;
	ValaCodeContext* _tmp23_;
	ValaProfile _tmp24_;
	ValaProfile _tmp25_;
	gboolean first = FALSE;
	ValaCCodeExpression* cexpr = NULL;
	gboolean _tmp57_ = FALSE;
	ValaDataType* _tmp58_;
	ValaDataType* _tmp59_;
	ValaTypeSymbol* _tmp60_;
	ValaTypeSymbol* _tmp61_;
	ValaCCodeFunctionCall* _tmp70_;
	ValaCCodeExpression* _tmp71_;
	ValaCodeContext* _tmp72_;
	ValaCodeContext* _tmp73_;
	ValaProfile _tmp74_;
	ValaProfile _tmp75_;
	ValaLocalVariable* temp_var = NULL;
	ValaDataType* _tmp89_;
	ValaDataType* _tmp90_;
	ValaLocalVariable* _tmp91_;
	ValaCCodeExpression* name_cnode = NULL;
	ValaLocalVariable* _tmp92_;
	const gchar* _tmp93_;
	const gchar* _tmp94_;
	ValaCCodeExpression* _tmp95_;
	gint i = 0;
	ValaLocalVariable* _tmp96_;
	ValaCCodeFunction* _tmp97_;
	ValaCCodeFunction* _tmp98_;
	ValaCCodeExpression* _tmp99_;
	ValaCCodeFunctionCall* _tmp100_;
	ValaInitializerList* _tmp101_;
	ValaInitializerList* _tmp102_;
	ValaCCodeExpression* _tmp108_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = vala_expression_get_target_type ((ValaExpression*) expr);
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp1_) : NULL);
	array_type = _tmp2_;
	_tmp4_ = array_type;
	if (_tmp4_ != NULL) {
		ValaArrayType* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = array_type;
		_tmp6_ = vala_array_type_get_fixed_length (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp3_ = _tmp7_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaLocalVariable* temp_var = NULL;
		ValaArrayType* _tmp8_;
		ValaLocalVariable* _tmp9_;
		ValaLocalVariable* _tmp10_;
		ValaCCodeExpression* name_cnode = NULL;
		ValaLocalVariable* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		ValaCCodeExpression* _tmp14_;
		gint i = 0;
		ValaLocalVariable* _tmp15_;
		ValaCCodeExpression* _tmp16_;
		ValaInitializerList* _tmp17_;
		ValaInitializerList* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		ValaCCodeExpression* _tmp21_;
		_tmp8_ = array_type;
		_tmp9_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp8_, TRUE, (ValaCodeNode*) expr, FALSE);
		temp_var = _tmp9_;
		_tmp10_ = temp_var;
		vala_local_variable_set_init (_tmp10_, TRUE);
		_tmp11_ = temp_var;
		_tmp12_ = vala_symbol_get_name ((ValaSymbol*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp13_);
		name_cnode = _tmp14_;
		i = 0;
		_tmp15_ = temp_var;
		vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp15_, FALSE);
		_tmp16_ = name_cnode;
		_tmp17_ = vala_array_creation_expression_get_initializer_list (expr);
		_tmp18_ = _tmp17_;
		_tmp19_ = vala_array_creation_expression_get_rank (expr);
		_tmp20_ = _tmp19_;
		vala_ccode_array_module_append_initializer_list (self, _tmp16_, _tmp18_, _tmp20_, &i);
		_tmp21_ = name_cnode;
		vala_set_cvalue ((ValaExpression*) expr, _tmp21_);
		_vala_ccode_node_unref0 (name_cnode);
		_vala_code_node_unref0 (temp_var);
		_vala_code_node_unref0 (array_type);
		return;
	}
	_tmp22_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_code_context_get_profile (_tmp23_);
	_tmp25_ = _tmp24_;
	if (_tmp25_ == VALA_PROFILE_POSIX) {
		ValaCCodeFile* _tmp26_;
		ValaCCodeIdentifier* _tmp27_;
		ValaCCodeIdentifier* _tmp28_;
		ValaCCodeFunctionCall* _tmp29_;
		_tmp26_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp26_, "stdlib.h", FALSE);
		_tmp27_ = vala_ccode_identifier_new ("calloc");
		_tmp28_ = _tmp27_;
		_tmp29_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp28_);
		_vala_ccode_node_unref0 (gnew);
		gnew = _tmp29_;
		_vala_ccode_node_unref0 (_tmp28_);
	} else {
		ValaCCodeIdentifier* _tmp30_;
		ValaCCodeIdentifier* _tmp31_;
		ValaCCodeFunctionCall* _tmp32_;
		ValaCCodeFunctionCall* _tmp33_;
		ValaDataType* _tmp34_;
		ValaDataType* _tmp35_;
		gchar* _tmp36_;
		gchar* _tmp37_;
		ValaCCodeIdentifier* _tmp38_;
		ValaCCodeIdentifier* _tmp39_;
		_tmp30_ = vala_ccode_identifier_new ("g_new0");
		_tmp31_ = _tmp30_;
		_tmp32_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp31_);
		_vala_ccode_node_unref0 (gnew);
		gnew = _tmp32_;
		_vala_ccode_node_unref0 (_tmp31_);
		_tmp33_ = gnew;
		_tmp34_ = vala_array_creation_expression_get_element_type (expr);
		_tmp35_ = _tmp34_;
		_tmp36_ = vala_get_ccode_name ((ValaCodeNode*) _tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = vala_ccode_identifier_new (_tmp37_);
		_tmp39_ = _tmp38_;
		vala_ccode_function_call_add_argument (_tmp33_, (ValaCCodeExpression*) _tmp39_);
		_vala_ccode_node_unref0 (_tmp39_);
		_g_free0 (_tmp37_);
	}
	first = TRUE;
	cexpr = NULL;
	{
		ValaList* _size_list = NULL;
		ValaList* _tmp40_;
		gint _size_size = 0;
		ValaList* _tmp41_;
		gint _tmp42_;
		gint _tmp43_;
		gint _size_index = 0;
		_tmp40_ = vala_array_creation_expression_get_sizes (expr);
		_size_list = _tmp40_;
		_tmp41_ = _size_list;
		_tmp42_ = vala_collection_get_size ((ValaCollection*) _tmp41_);
		_tmp43_ = _tmp42_;
		_size_size = _tmp43_;
		_size_index = -1;
		while (TRUE) {
			gint _tmp44_;
			gint _tmp45_;
			ValaExpression* size = NULL;
			ValaList* _tmp46_;
			gpointer _tmp47_;
			ValaCCodeExpression* csize = NULL;
			ValaExpression* _tmp48_;
			ValaCCodeExpression* _tmp49_;
			ValaCCodeExpression* _tmp50_;
			ValaCCodeExpression* _tmp51_;
			_size_index = _size_index + 1;
			_tmp44_ = _size_index;
			_tmp45_ = _size_size;
			if (!(_tmp44_ < _tmp45_)) {
				break;
			}
			_tmp46_ = _size_list;
			_tmp47_ = vala_list_get (_tmp46_, _size_index);
			size = (ValaExpression*) _tmp47_;
			_tmp48_ = size;
			_tmp49_ = vala_get_cvalue (_tmp48_);
			_tmp50_ = _vala_ccode_node_ref0 (_tmp49_);
			csize = _tmp50_;
			_tmp51_ = csize;
			vala_append_array_length ((ValaExpression*) expr, _tmp51_);
			if (first) {
				ValaCCodeExpression* _tmp52_;
				ValaCCodeExpression* _tmp53_;
				_tmp52_ = csize;
				_tmp53_ = _vala_ccode_node_ref0 (_tmp52_);
				_vala_ccode_node_unref0 (cexpr);
				cexpr = _tmp53_;
				first = FALSE;
			} else {
				ValaCCodeExpression* _tmp54_;
				ValaCCodeExpression* _tmp55_;
				ValaCCodeBinaryExpression* _tmp56_;
				_tmp54_ = cexpr;
				_tmp55_ = csize;
				_tmp56_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp54_, _tmp55_);
				_vala_ccode_node_unref0 (cexpr);
				cexpr = (ValaCCodeExpression*) _tmp56_;
			}
			_vala_ccode_node_unref0 (csize);
			_vala_code_node_unref0 (size);
		}
	}
	_tmp58_ = vala_array_creation_expression_get_element_type (expr);
	_tmp59_ = _tmp58_;
	_tmp60_ = vala_data_type_get_type_symbol (_tmp59_);
	_tmp61_ = _tmp60_;
	if (_tmp61_ != NULL) {
		ValaDataType* _tmp62_;
		ValaDataType* _tmp63_;
		ValaTypeSymbol* _tmp64_;
		ValaTypeSymbol* _tmp65_;
		_tmp62_ = vala_array_creation_expression_get_element_type (expr);
		_tmp63_ = _tmp62_;
		_tmp64_ = vala_data_type_get_type_symbol (_tmp63_);
		_tmp65_ = _tmp64_;
		_tmp57_ = vala_typesymbol_is_reference_type (_tmp65_);
	} else {
		_tmp57_ = FALSE;
	}
	if (_tmp57_) {
		ValaCCodeExpression* _tmp66_;
		ValaCCodeConstant* _tmp67_;
		ValaCCodeConstant* _tmp68_;
		ValaCCodeBinaryExpression* _tmp69_;
		_tmp66_ = cexpr;
		_tmp67_ = vala_ccode_constant_new ("1");
		_tmp68_ = _tmp67_;
		_tmp69_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp66_, (ValaCCodeExpression*) _tmp68_);
		_vala_ccode_node_unref0 (cexpr);
		cexpr = (ValaCCodeExpression*) _tmp69_;
		_vala_ccode_node_unref0 (_tmp68_);
	}
	_tmp70_ = gnew;
	_tmp71_ = cexpr;
	vala_ccode_function_call_add_argument (_tmp70_, _tmp71_);
	_tmp72_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp73_ = _tmp72_;
	_tmp74_ = vala_code_context_get_profile (_tmp73_);
	_tmp75_ = _tmp74_;
	if (_tmp75_ == VALA_PROFILE_POSIX) {
		ValaCCodeFunctionCall* csizeof = NULL;
		ValaCCodeIdentifier* _tmp76_;
		ValaCCodeIdentifier* _tmp77_;
		ValaCCodeFunctionCall* _tmp78_;
		ValaCCodeFunctionCall* _tmp79_;
		ValaCCodeFunctionCall* _tmp80_;
		ValaDataType* _tmp81_;
		ValaDataType* _tmp82_;
		gchar* _tmp83_;
		gchar* _tmp84_;
		ValaCCodeIdentifier* _tmp85_;
		ValaCCodeIdentifier* _tmp86_;
		ValaCCodeFunctionCall* _tmp87_;
		ValaCCodeFunctionCall* _tmp88_;
		_tmp76_ = vala_ccode_identifier_new ("sizeof");
		_tmp77_ = _tmp76_;
		_tmp78_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp77_);
		_tmp79_ = _tmp78_;
		_vala_ccode_node_unref0 (_tmp77_);
		csizeof = _tmp79_;
		_tmp80_ = csizeof;
		_tmp81_ = vala_array_creation_expression_get_element_type (expr);
		_tmp82_ = _tmp81_;
		_tmp83_ = vala_get_ccode_name ((ValaCodeNode*) _tmp82_);
		_tmp84_ = _tmp83_;
		_tmp85_ = vala_ccode_identifier_new (_tmp84_);
		_tmp86_ = _tmp85_;
		vala_ccode_function_call_add_argument (_tmp80_, (ValaCCodeExpression*) _tmp86_);
		_vala_ccode_node_unref0 (_tmp86_);
		_g_free0 (_tmp84_);
		_tmp87_ = gnew;
		_tmp88_ = csizeof;
		vala_ccode_function_call_add_argument (_tmp87_, (ValaCCodeExpression*) _tmp88_);
		_vala_ccode_node_unref0 (csizeof);
	}
	_tmp89_ = vala_expression_get_value_type ((ValaExpression*) expr);
	_tmp90_ = _tmp89_;
	_tmp91_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, _tmp90_, TRUE, (ValaCodeNode*) expr, FALSE);
	temp_var = _tmp91_;
	_tmp92_ = temp_var;
	_tmp93_ = vala_symbol_get_name ((ValaSymbol*) _tmp92_);
	_tmp94_ = _tmp93_;
	_tmp95_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp94_);
	name_cnode = _tmp95_;
	i = 0;
	_tmp96_ = temp_var;
	vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp96_, FALSE);
	_tmp97_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp98_ = _tmp97_;
	_tmp99_ = name_cnode;
	_tmp100_ = gnew;
	vala_ccode_function_add_assignment (_tmp98_, _tmp99_, (ValaCCodeExpression*) _tmp100_);
	_tmp101_ = vala_array_creation_expression_get_initializer_list (expr);
	_tmp102_ = _tmp101_;
	if (_tmp102_ != NULL) {
		ValaCCodeExpression* _tmp103_;
		ValaInitializerList* _tmp104_;
		ValaInitializerList* _tmp105_;
		gint _tmp106_;
		gint _tmp107_;
		_tmp103_ = name_cnode;
		_tmp104_ = vala_array_creation_expression_get_initializer_list (expr);
		_tmp105_ = _tmp104_;
		_tmp106_ = vala_array_creation_expression_get_rank (expr);
		_tmp107_ = _tmp106_;
		vala_ccode_array_module_append_initializer_list (self, _tmp103_, _tmp105_, _tmp107_, &i);
	}
	_tmp108_ = name_cnode;
	vala_set_cvalue ((ValaExpression*) expr, _tmp108_);
	_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* _tmp0_;
	gchar* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (array_cname != NULL, NULL);
	_tmp0_ = g_strdup_printf ("%s_length%d", array_cname, dim);
	result = _tmp0_;
	return result;
}

static gchar*
vala_ccode_array_module_real_get_variable_array_length_cname (ValaCCodeBaseModule* base,
                                                              ValaVariable* variable,
                                                              gint dim)
{
	ValaCCodeArrayModule * self;
	gchar* length_cname = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (variable != NULL, NULL);
	_tmp0_ = vala_get_ccode_array_length_name ((ValaCodeNode*) variable);
	length_cname = _tmp0_;
	_tmp1_ = length_cname;
	if (_tmp1_ == NULL) {
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp2_ = vala_get_ccode_name ((ValaCodeNode*) variable);
		_tmp3_ = _tmp2_;
		_tmp4_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp3_, dim);
		_g_free0 (length_cname);
		length_cname = _tmp4_;
		_g_free0 (_tmp3_);
	}
	_tmp5_ = length_cname;
	_tmp6_ = g_strdup ((const gchar*) _tmp5_);
	result = _tmp6_;
	_g_free0 (length_cname);
	return result;
}

static ValaCCodeExpression*
vala_ccode_array_module_real_get_array_length_cexpression (ValaCCodeBaseModule* base,
                                                           ValaExpression* array_expr,
                                                           gint dim)
{
	ValaCCodeArrayModule * self;
	ValaTargetValue* _tmp0_;
	ValaTargetValue* _tmp1_;
	ValaCCodeExpression* _tmp2_;
	ValaCCodeExpression* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (array_expr != NULL, NULL);
	_tmp0_ = vala_expression_get_target_value (array_expr);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp1_, dim);
	result = _tmp2_;
	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;
	ValaArrayType* array_type = NULL;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	ValaArrayType* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValaArrayType* _tmp4_;
	ValaList* size = NULL;
	ValaList* _tmp27_;
	ValaList* _tmp28_;
	gboolean _tmp29_ = FALSE;
	ValaList* _tmp30_;
	ValaList* _tmp38_;
	gpointer _tmp39_;
	ValaCCodeExpression* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (value != NULL, NULL);
	_tmp0_ = vala_target_value_get_value_type (value);
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp1_) : NULL);
	array_type = _tmp2_;
	_tmp4_ = array_type;
	if (_tmp4_ != NULL) {
		ValaArrayType* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = array_type;
		_tmp6_ = vala_array_type_get_fixed_length (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp3_ = _tmp7_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaArrayType* _tmp8_;
		ValaExpression* _tmp9_;
		ValaExpression* _tmp10_;
		ValaCCodeExpression* _tmp11_;
		_tmp8_ = array_type;
		_tmp9_ = vala_array_type_get_length (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp10_);
		result = _tmp11_;
		_vala_code_node_unref0 (array_type);
		return result;
	}
	if (dim == -1) {
		gboolean _tmp12_ = FALSE;
		ValaArrayType* _tmp13_;
		_tmp13_ = array_type;
		if (_tmp13_ != NULL) {
			ValaArrayType* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			_tmp14_ = array_type;
			_tmp15_ = vala_array_type_get_rank (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp12_ = _tmp16_ > 1;
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			ValaCCodeExpression* cexpr = NULL;
			ValaCCodeExpression* _tmp17_;
			_tmp17_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, value, 1);
			cexpr = _tmp17_;
			{
				gboolean _tmp18_ = FALSE;
				dim = 2;
				_tmp18_ = TRUE;
				while (TRUE) {
					ValaArrayType* _tmp20_;
					gint _tmp21_;
					gint _tmp22_;
					ValaCCodeExpression* _tmp23_;
					ValaCCodeExpression* _tmp24_;
					ValaCCodeExpression* _tmp25_;
					ValaCCodeBinaryExpression* _tmp26_;
					if (!_tmp18_) {
						gint _tmp19_;
						_tmp19_ = dim;
						dim = _tmp19_ + 1;
					}
					_tmp18_ = FALSE;
					_tmp20_ = array_type;
					_tmp21_ = vala_array_type_get_rank (_tmp20_);
					_tmp22_ = _tmp21_;
					if (!(dim <= _tmp22_)) {
						break;
					}
					_tmp23_ = cexpr;
					_tmp24_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, value, dim);
					_tmp25_ = _tmp24_;
					_tmp26_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp23_, _tmp25_);
					_vala_ccode_node_unref0 (cexpr);
					cexpr = (ValaCCodeExpression*) _tmp26_;
					_vala_ccode_node_unref0 (_tmp25_);
				}
			}
			result = cexpr;
			_vala_code_node_unref0 (array_type);
			return result;
		} else {
			dim = 1;
		}
	}
	_tmp27_ = G_TYPE_CHECK_INSTANCE_CAST (value, VALA_TYPE_GLIB_VALUE, ValaGLibValue)->array_length_cvalues;
	_tmp28_ = _vala_iterable_ref0 (_tmp27_);
	size = _tmp28_;
	_tmp30_ = size;
	if (_tmp30_ == NULL) {
		_tmp29_ = TRUE;
	} else {
		ValaList* _tmp31_;
		gint _tmp32_;
		gint _tmp33_;
		_tmp31_ = size;
		_tmp32_ = vala_collection_get_size ((ValaCollection*) _tmp31_);
		_tmp33_ = _tmp32_;
		_tmp29_ = _tmp33_ < dim;
	}
	if (_tmp29_) {
		ValaArrayType* _tmp34_;
		ValaSourceReference* _tmp35_;
		ValaSourceReference* _tmp36_;
		ValaCCodeInvalidExpression* _tmp37_;
		_tmp34_ = array_type;
		_tmp35_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp34_);
		_tmp36_ = _tmp35_;
		vala_report_error (_tmp36_, "internal: invalid array_length for given dimension");
		_tmp37_ = vala_ccode_invalid_expression_new ();
		result = (ValaCCodeExpression*) _tmp37_;
		_vala_iterable_unref0 (size);
		_vala_code_node_unref0 (array_type);
		return result;
	}
	_tmp38_ = size;
	_tmp39_ = vala_list_get (_tmp38_, dim - 1);
	result = (ValaCCodeExpression*) _tmp39_;
	_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* _tmp0_;
	gchar* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (array_cname != NULL, NULL);
	_tmp0_ = g_strdup_printf ("_%s_size_", array_cname);
	result = _tmp0_;
	return result;
}

static void
vala_ccode_array_module_real_visit_element_access (ValaCodeVisitor* base,
                                                   ValaElementAccess* expr)
{
	ValaCCodeArrayModule * self;
	ValaList* indices = NULL;
	ValaList* _tmp0_;
	ValaList* _tmp1_;
	gint rank = 0;
	ValaList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	ValaCCodeExpression* ccontainer = NULL;
	ValaExpression* _tmp5_;
	ValaExpression* _tmp6_;
	ValaCCodeExpression* _tmp7_;
	ValaCCodeExpression* _tmp8_;
	ValaCCodeExpression* cindex = NULL;
	ValaList* _tmp9_;
	gpointer _tmp10_;
	ValaExpression* _tmp11_;
	ValaCCodeExpression* _tmp12_;
	ValaCCodeExpression* _tmp13_;
	ValaCCodeExpression* _tmp14_;
	ValaExpression* _tmp15_;
	ValaExpression* _tmp16_;
	ValaSymbol* _tmp17_;
	ValaSymbol* _tmp18_;
	ValaTargetValue* _tmp82_;
	ValaTargetValue* _tmp83_;
	ValaDataType* _tmp84_;
	ValaDataType* _tmp85_;
	ValaDataType* _tmp86_;
	ValaDataType* _tmp87_;
	gboolean _tmp88_;
	gboolean _tmp89_;
	ValaTargetValue* _tmp94_;
	ValaTargetValue* _tmp95_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = vala_element_access_get_indices (expr);
	_tmp1_ = _vala_iterable_ref0 (_tmp0_);
	indices = _tmp1_;
	_tmp2_ = indices;
	_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	rank = _tmp4_;
	_tmp5_ = vala_element_access_get_container (expr);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_get_cvalue (_tmp6_);
	_tmp8_ = _vala_ccode_node_ref0 (_tmp7_);
	ccontainer = _tmp8_;
	_tmp9_ = indices;
	_tmp10_ = vala_list_get (_tmp9_, 0);
	_tmp11_ = (ValaExpression*) _tmp10_;
	_tmp12_ = vala_get_cvalue (_tmp11_);
	_tmp13_ = _vala_ccode_node_ref0 (_tmp12_);
	_tmp14_ = _tmp13_;
	_vala_code_node_unref0 (_tmp11_);
	cindex = _tmp14_;
	_tmp15_ = vala_element_access_get_container (expr);
	_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;
		ValaExpression* _tmp23_;
		ValaExpression* _tmp24_;
		ValaMemberAccess* _tmp25_;
		gboolean _tmp26_ = FALSE;
		ValaIntegerLiteral* _tmp27_;
		_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_ = vala_element_access_get_container (expr);
		_tmp24_ = _tmp23_;
		_tmp25_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, VALA_TYPE_MEMBER_ACCESS) ? ((ValaMemberAccess*) _tmp24_) : NULL);
		memberaccess = _tmp25_;
		_tmp27_ = lit;
		if (_tmp27_ != NULL) {
			ValaMemberAccess* _tmp28_;
			_tmp28_ = memberaccess;
			_tmp26_ = _tmp28_ != NULL;
		} else {
			_tmp26_ = FALSE;
		}
		if (_tmp26_) {
			gint dim = 0;
			ValaIntegerLiteral* _tmp29_;
			const gchar* _tmp30_;
			const gchar* _tmp31_;
			ValaMemberAccess* _tmp32_;
			ValaExpression* _tmp33_;
			ValaExpression* _tmp34_;
			ValaCCodeExpression* _tmp35_;
			ValaCCodeExpression* _tmp36_;
			_tmp29_ = lit;
			_tmp30_ = vala_integer_literal_get_value (_tmp29_);
			_tmp31_ = _tmp30_;
			dim = atoi (_tmp31_);
			_tmp32_ = memberaccess;
			_tmp33_ = vala_member_access_get_inner (_tmp32_);
			_tmp34_ = _tmp33_;
			_tmp35_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp34_, dim + 1);
			_tmp36_ = _tmp35_;
			vala_set_cvalue ((ValaExpression*) expr, _tmp36_);
			_vala_ccode_node_unref0 (_tmp36_);
		} else {
			ValaSourceReference* _tmp37_;
			ValaSourceReference* _tmp38_;
			_tmp37_ = vala_code_node_get_source_reference ((ValaCodeNode*) expr);
			_tmp38_ = _tmp37_;
			vala_report_error (_tmp38_, "internal error: only integer literals supported as index");
		}
		_vala_code_node_unref0 (memberaccess);
		_vala_code_node_unref0 (lit);
	} else {
		gboolean _tmp39_ = FALSE;
		ValaExpression* _tmp40_;
		ValaExpression* _tmp41_;
		ValaSymbol* _tmp42_;
		ValaSymbol* _tmp43_;
		_tmp40_ = vala_element_access_get_container (expr);
		_tmp41_ = _tmp40_;
		_tmp42_ = vala_expression_get_symbol_reference (_tmp41_);
		_tmp43_ = _tmp42_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp43_, VALA_TYPE_CONSTANT)) {
			_tmp39_ = rank > 1;
		} else {
			_tmp39_ = FALSE;
		}
		if (_tmp39_) {
			ValaArrayList* cindices = NULL;
			GEqualFunc _tmp44_;
			ValaArrayList* _tmp45_;
			ValaArrayList* _tmp46_;
			ValaCCodeExpression* _tmp47_;
			ValaCCodeExpression* _tmp55_;
			ValaArrayList* _tmp56_;
			ValaCCodeElementAccess* _tmp57_;
			ValaCCodeElementAccess* _tmp58_;
			_tmp44_ = g_direct_equal;
			_tmp45_ = vala_array_list_new (VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, (GDestroyNotify) vala_ccode_node_unref, _tmp44_);
			cindices = _tmp45_;
			_tmp46_ = cindices;
			_tmp47_ = cindex;
			vala_collection_add ((ValaCollection*) _tmp46_, _tmp47_);
			{
				gint i = 0;
				i = 1;
				{
					gboolean _tmp48_ = FALSE;
					_tmp48_ = TRUE;
					while (TRUE) {
						ValaArrayList* _tmp50_;
						ValaList* _tmp51_;
						gpointer _tmp52_;
						ValaExpression* _tmp53_;
						ValaCCodeExpression* _tmp54_;
						if (!_tmp48_) {
							gint _tmp49_;
							_tmp49_ = i;
							i = _tmp49_ + 1;
						}
						_tmp48_ = FALSE;
						if (!(i < rank)) {
							break;
						}
						_tmp50_ = cindices;
						_tmp51_ = indices;
						_tmp52_ = vala_list_get (_tmp51_, i);
						_tmp53_ = (ValaExpression*) _tmp52_;
						_tmp54_ = vala_get_cvalue (_tmp53_);
						vala_collection_add ((ValaCollection*) _tmp50_, _tmp54_);
						_vala_code_node_unref0 (_tmp53_);
					}
				}
			}
			_tmp55_ = ccontainer;
			_tmp56_ = cindices;
			_tmp57_ = vala_ccode_element_access_new_with_indices (_tmp55_, (ValaList*) _tmp56_);
			_tmp58_ = _tmp57_;
			vala_set_cvalue ((ValaExpression*) expr, (ValaCCodeExpression*) _tmp58_);
			_vala_ccode_node_unref0 (_tmp58_);
			_vala_iterable_unref0 (cindices);
		} else {
			ValaCCodeExpression* _tmp78_;
			ValaCCodeExpression* _tmp79_;
			ValaCCodeElementAccess* _tmp80_;
			ValaCCodeElementAccess* _tmp81_;
			{
				gint i = 0;
				i = 1;
				{
					gboolean _tmp59_ = FALSE;
					_tmp59_ = TRUE;
					while (TRUE) {
						ValaCCodeBinaryExpression* cmul = NULL;
						ValaCCodeExpression* _tmp61_;
						ValaExpression* _tmp62_;
						ValaExpression* _tmp63_;
						ValaCCodeExpression* _tmp64_;
						ValaCCodeExpression* _tmp65_;
						ValaCCodeBinaryExpression* _tmp66_;
						ValaCCodeBinaryExpression* _tmp67_;
						ValaCCodeBinaryExpression* _tmp68_;
						ValaList* _tmp69_;
						gpointer _tmp70_;
						ValaExpression* _tmp71_;
						ValaCCodeExpression* _tmp72_;
						ValaCCodeBinaryExpression* _tmp73_;
						ValaExpression* _tmp74_;
						ValaExpression* _tmp75_;
						if (!_tmp59_) {
							gint _tmp60_;
							_tmp60_ = i;
							i = _tmp60_ + 1;
						}
						_tmp59_ = FALSE;
						if (!(i < rank)) {
							break;
						}
						_tmp61_ = cindex;
						_tmp62_ = vala_element_access_get_container (expr);
						_tmp63_ = _tmp62_;
						_tmp64_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp63_, i + 1);
						_tmp65_ = _tmp64_;
						_tmp66_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp61_, _tmp65_);
						_tmp67_ = _tmp66_;
						_vala_ccode_node_unref0 (_tmp65_);
						cmul = _tmp67_;
						_tmp68_ = cmul;
						_tmp69_ = indices;
						_tmp70_ = vala_list_get (_tmp69_, i);
						_tmp71_ = (ValaExpression*) _tmp70_;
						_tmp72_ = vala_get_cvalue (_tmp71_);
						_tmp73_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp68_, _tmp72_);
						_vala_ccode_node_unref0 (cindex);
						cindex = (ValaCCodeExpression*) _tmp73_;
						_vala_code_node_unref0 (_tmp71_);
						_tmp74_ = vala_element_access_get_container (expr);
						_tmp75_ = _tmp74_;
						if (vala_expression_is_constant (_tmp75_)) {
							ValaCCodeExpression* _tmp76_;
							ValaCCodeUnaryExpression* _tmp77_;
							_tmp76_ = ccontainer;
							_tmp77_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp76_);
							_vala_ccode_node_unref0 (ccontainer);
							ccontainer = (ValaCCodeExpression*) _tmp77_;
						}
						_vala_ccode_node_unref0 (cmul);
					}
				}
			}
			_tmp78_ = ccontainer;
			_tmp79_ = cindex;
			_tmp80_ = vala_ccode_element_access_new (_tmp78_, _tmp79_);
			_tmp81_ = _tmp80_;
			vala_set_cvalue ((ValaExpression*) expr, (ValaCCodeExpression*) _tmp81_);
			_vala_ccode_node_unref0 (_tmp81_);
		}
	}
	_tmp82_ = vala_expression_get_target_value ((ValaExpression*) expr);
	_tmp83_ = _tmp82_;
	_tmp84_ = vala_expression_get_value_type ((ValaExpression*) expr);
	_tmp85_ = _tmp84_;
	_tmp86_ = vala_data_type_copy (_tmp85_);
	_tmp87_ = _tmp86_;
	vala_target_value_set_value_type (_tmp83_, _tmp87_);
	_vala_code_node_unref0 (_tmp87_);
	_tmp88_ = vala_expression_get_lvalue ((ValaExpression*) expr);
	_tmp89_ = _tmp88_;
	if (!_tmp89_) {
		ValaTargetValue* _tmp90_;
		ValaTargetValue* _tmp91_;
		ValaTargetValue* _tmp92_;
		ValaTargetValue* _tmp93_;
		_tmp90_ = vala_expression_get_target_value ((ValaExpression*) expr);
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_ccode_base_module_store_temp_value ((ValaCCodeBaseModule*) self, _tmp91_, (ValaCodeNode*) expr, NULL);
		_tmp93_ = _tmp92_;
		vala_expression_set_target_value ((ValaExpression*) expr, _tmp93_);
		_vala_target_value_unref0 (_tmp93_);
	}
	_tmp94_ = vala_expression_get_target_value ((ValaExpression*) expr);
	_tmp95_ = _tmp94_;
	G_TYPE_CHECK_INSTANCE_CAST (_tmp95_, 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;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaCCodeExpression* _tmp2_;
	ValaCCodeExpression* _tmp3_;
	ValaCCodeExpression* cstart = NULL;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaCCodeExpression* _tmp6_;
	ValaCCodeExpression* _tmp7_;
	ValaCCodeExpression* cstop = NULL;
	ValaExpression* _tmp8_;
	ValaExpression* _tmp9_;
	ValaCCodeExpression* _tmp10_;
	ValaCCodeExpression* _tmp11_;
	ValaCCodeBinaryExpression* cstartpointer = NULL;
	ValaCCodeBinaryExpression* _tmp12_;
	ValaCCodeBinaryExpression* splicelen = NULL;
	ValaCCodeBinaryExpression* _tmp13_;
	ValaTargetValue* _tmp14_;
	ValaTargetValue* _tmp15_;
	ValaExpression* _tmp16_;
	ValaExpression* _tmp17_;
	ValaTargetValue* _tmp18_;
	ValaTargetValue* _tmp19_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = vala_slice_expression_get_container (expr);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_get_cvalue (_tmp1_);
	_tmp3_ = _vala_ccode_node_ref0 (_tmp2_);
	ccontainer = _tmp3_;
	_tmp4_ = vala_slice_expression_get_start (expr);
	_tmp5_ = _tmp4_;
	_tmp6_ = vala_get_cvalue (_tmp5_);
	_tmp7_ = _vala_ccode_node_ref0 (_tmp6_);
	cstart = _tmp7_;
	_tmp8_ = vala_slice_expression_get_stop (expr);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_get_cvalue (_tmp9_);
	_tmp11_ = _vala_ccode_node_ref0 (_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_;
	vala_set_cvalue ((ValaExpression*) expr, (ValaCCodeExpression*) cstartpointer);
	_tmp14_ = vala_expression_get_target_value ((ValaExpression*) expr);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_slice_expression_get_container (expr);
	_tmp17_ = _tmp16_;
	_tmp18_ = vala_expression_get_target_value (_tmp17_);
	_tmp19_ = _tmp18_;
	G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, VALA_TYPE_GLIB_VALUE, ValaGLibValue)->non_null = vala_get_non_null (_tmp19_);
	vala_set_array_length ((ValaExpression*) expr, (ValaCCodeExpression*) splicelen);
	_vala_ccode_node_unref0 (splicelen);
	_vala_ccode_node_unref0 (cstartpointer);
	_vala_ccode_node_unref0 (cstop);
	_vala_ccode_node_unref0 (cstart);
	_vala_ccode_node_unref0 (ccontainer);
}

static void
vala_ccode_array_module_append_struct_array_free_loop (ValaCCodeArrayModule* self,
                                                       ValaStruct* st)
{
	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;
	ValaStructValueType* _tmp29_;
	ValaStructValueType* _tmp30_;
	ValaCCodeExpression* _tmp31_;
	ValaCCodeExpression* _tmp32_;
	ValaCCodeFunctionCall* _tmp33_;
	ValaCCodeFunctionCall* _tmp34_;
	ValaCCodeUnaryExpression* _tmp35_;
	ValaCCodeUnaryExpression* _tmp36_;
	ValaCCodeFunction* _tmp37_;
	ValaCCodeFunction* _tmp38_;
	ValaCCodeFunction* _tmp39_;
	ValaCCodeFunction* _tmp40_;
	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_ = vala_struct_value_type_new (st, NULL);
	_tmp30_ = _tmp29_;
	_tmp31_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp30_, FALSE);
	_tmp32_ = _tmp31_;
	_tmp33_ = vala_ccode_function_call_new (_tmp32_);
	_tmp34_ = _tmp33_;
	_vala_ccode_node_unref0 (_tmp32_);
	_vala_code_node_unref0 (_tmp30_);
	cfreecall = _tmp34_;
	_tmp35_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) cea);
	_tmp36_ = _tmp35_;
	vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) _tmp36_);
	_vala_ccode_node_unref0 (_tmp36_);
	_tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp38_ = _tmp37_;
	vala_ccode_function_add_expression (_tmp38_, (ValaCCodeExpression*) cfreecall);
	_tmp39_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp40_ = _tmp39_;
	vala_ccode_function_close (_tmp40_);
	_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* cname = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	ValaCCodeFile* _tmp4_;
	const gchar* _tmp5_;
	ValaDataType* _tmp6_;
	ValaCCodeFile* _tmp7_;
	ValaCCodeFunction* fun = NULL;
	const gchar* _tmp8_;
	ValaCCodeFunction* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	ValaCCodeParameter* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeFunction* _tmp18_;
	ValaDataType* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValaCCodeParameter* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	ValaCCodeBinaryExpression* ccondarr = NULL;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeIdentifier* _tmp26_;
	ValaCCodeConstant* _tmp27_;
	ValaCCodeConstant* _tmp28_;
	ValaCCodeBinaryExpression* _tmp29_;
	ValaCCodeBinaryExpression* _tmp30_;
	ValaCCodeFunction* _tmp31_;
	ValaCCodeFunction* _tmp32_;
	ValaCCodeBinaryExpression* _tmp33_;
	ValaCCodeFunction* _tmp34_;
	ValaCCodeFunction* _tmp35_;
	ValaDataType* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	ValaCCodeVariableDeclarator* _tmp39_;
	ValaCCodeVariableDeclarator* _tmp40_;
	ValaCCodeFunction* _tmp41_;
	ValaCCodeFunction* _tmp42_;
	ValaCCodeFunctionCall* carrfree = NULL;
	ValaCodeContext* _tmp43_;
	ValaCodeContext* _tmp44_;
	ValaProfile _tmp45_;
	ValaProfile _tmp46_;
	ValaCCodeFunctionCall* _tmp54_;
	ValaCCodeIdentifier* _tmp55_;
	ValaCCodeIdentifier* _tmp56_;
	ValaCCodeFunction* _tmp57_;
	ValaCCodeFunction* _tmp58_;
	ValaCCodeFunctionCall* _tmp59_;
	ValaCCodeFile* _tmp60_;
	ValaCCodeFunction* _tmp61_;
	ValaCCodeFile* _tmp62_;
	ValaCCodeFunction* _tmp63_;
	gchar* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (st != NULL, NULL);
	_tmp0_ = vala_get_ccode_name ((ValaCodeNode*) st);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf ("_vala_%s_array_free", _tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	cname = _tmp3_;
	_tmp4_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp5_ = cname;
	if (vala_ccode_file_add_declaration (_tmp4_, _tmp5_)) {
		result = cname;
		return result;
	}
	_tmp6_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp7_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp6_, _tmp7_);
	_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_ = vala_get_ccode_name ((ValaCodeNode*) st);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strdup_printf ("%s *", _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_ccode_parameter_new ("array", _tmp15_);
	_tmp17_ = _tmp16_;
	vala_ccode_function_add_parameter (_tmp11_, _tmp17_);
	_vala_ccode_node_unref0 (_tmp17_);
	_g_free0 (_tmp15_);
	_g_free0 (_tmp13_);
	_tmp18_ = fun;
	_tmp19_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp20_ = vala_get_ccode_name ((ValaCodeNode*) _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_parameter_new ("array_length", _tmp21_);
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_parameter (_tmp18_, _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_tmp24_ = fun;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp24_);
	_tmp25_ = vala_ccode_identifier_new ("array");
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_ccode_constant_new ("NULL");
	_tmp28_ = _tmp27_;
	_tmp29_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp26_, (ValaCCodeExpression*) _tmp28_);
	_tmp30_ = _tmp29_;
	_vala_ccode_node_unref0 (_tmp28_);
	_vala_ccode_node_unref0 (_tmp26_);
	ccondarr = _tmp30_;
	_tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp32_ = _tmp31_;
	_tmp33_ = ccondarr;
	vala_ccode_function_open_if (_tmp32_, (ValaCCodeExpression*) _tmp33_);
	_tmp34_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp35_ = _tmp34_;
	_tmp36_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp37_ = vala_get_ccode_name ((ValaCodeNode*) _tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
	_tmp40_ = _tmp39_;
	vala_ccode_function_add_declaration (_tmp35_, _tmp38_, (ValaCCodeDeclarator*) _tmp40_, 0);
	_vala_ccode_node_unref0 (_tmp40_);
	_g_free0 (_tmp38_);
	vala_ccode_array_module_append_struct_array_free_loop (self, st);
	_tmp41_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp42_ = _tmp41_;
	vala_ccode_function_close (_tmp42_);
	_tmp43_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp44_ = _tmp43_;
	_tmp45_ = vala_code_context_get_profile (_tmp44_);
	_tmp46_ = _tmp45_;
	if (_tmp46_ == VALA_PROFILE_POSIX) {
		ValaCCodeFile* _tmp47_;
		ValaCCodeIdentifier* _tmp48_;
		ValaCCodeIdentifier* _tmp49_;
		ValaCCodeFunctionCall* _tmp50_;
		_tmp47_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp47_, "stdlib.h", FALSE);
		_tmp48_ = vala_ccode_identifier_new ("free");
		_tmp49_ = _tmp48_;
		_tmp50_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp49_);
		_vala_ccode_node_unref0 (carrfree);
		carrfree = _tmp50_;
		_vala_ccode_node_unref0 (_tmp49_);
	} else {
		ValaCCodeIdentifier* _tmp51_;
		ValaCCodeIdentifier* _tmp52_;
		ValaCCodeFunctionCall* _tmp53_;
		_tmp51_ = vala_ccode_identifier_new ("g_free");
		_tmp52_ = _tmp51_;
		_tmp53_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp52_);
		_vala_ccode_node_unref0 (carrfree);
		carrfree = _tmp53_;
		_vala_ccode_node_unref0 (_tmp52_);
	}
	_tmp54_ = carrfree;
	_tmp55_ = vala_ccode_identifier_new ("array");
	_tmp56_ = _tmp55_;
	vala_ccode_function_call_add_argument (_tmp54_, (ValaCCodeExpression*) _tmp56_);
	_vala_ccode_node_unref0 (_tmp56_);
	_tmp57_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp58_ = _tmp57_;
	_tmp59_ = carrfree;
	vala_ccode_function_add_expression (_tmp58_, (ValaCCodeExpression*) _tmp59_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp60_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp61_ = fun;
	vala_ccode_file_add_function_declaration (_tmp60_, _tmp61_);
	_tmp62_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp63_ = fun;
	vala_ccode_file_add_function (_tmp62_, _tmp63_);
	result = cname;
	_vala_ccode_node_unref0 (carrfree);
	_vala_ccode_node_unref0 (ccondarr);
	_vala_ccode_node_unref0 (fun);
	return result;
}

static gchar*
vala_ccode_array_module_real_append_struct_array_destroy (ValaCCodeBaseModule* base,
                                                          ValaStruct* st)
{
	ValaCCodeArrayModule * self;
	gchar* cname = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	ValaCCodeFile* _tmp4_;
	const gchar* _tmp5_;
	ValaDataType* _tmp6_;
	ValaCCodeFile* _tmp7_;
	ValaCCodeFunction* fun = NULL;
	const gchar* _tmp8_;
	ValaCCodeFunction* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	ValaCCodeParameter* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeFunction* _tmp18_;
	ValaDataType* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValaCCodeParameter* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	ValaCCodeBinaryExpression* ccondarr = NULL;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeIdentifier* _tmp26_;
	ValaCCodeConstant* _tmp27_;
	ValaCCodeConstant* _tmp28_;
	ValaCCodeBinaryExpression* _tmp29_;
	ValaCCodeBinaryExpression* _tmp30_;
	ValaCCodeFunction* _tmp31_;
	ValaCCodeFunction* _tmp32_;
	ValaCCodeBinaryExpression* _tmp33_;
	ValaCCodeFunction* _tmp34_;
	ValaCCodeFunction* _tmp35_;
	ValaDataType* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	ValaCCodeVariableDeclarator* _tmp39_;
	ValaCCodeVariableDeclarator* _tmp40_;
	ValaCCodeFunction* _tmp41_;
	ValaCCodeFunction* _tmp42_;
	ValaCCodeFile* _tmp43_;
	ValaCCodeFunction* _tmp44_;
	ValaCCodeFile* _tmp45_;
	ValaCCodeFunction* _tmp46_;
	gchar* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (st != NULL, NULL);
	_tmp0_ = vala_get_ccode_name ((ValaCodeNode*) st);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf ("_vala_%s_array_destroy", _tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	cname = _tmp3_;
	_tmp4_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp5_ = cname;
	if (vala_ccode_file_add_declaration (_tmp4_, _tmp5_)) {
		result = cname;
		return result;
	}
	_tmp6_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp7_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp6_, _tmp7_);
	_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_ = vala_get_ccode_name ((ValaCodeNode*) st);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strdup_printf ("%s *", _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_ccode_parameter_new ("array", _tmp15_);
	_tmp17_ = _tmp16_;
	vala_ccode_function_add_parameter (_tmp11_, _tmp17_);
	_vala_ccode_node_unref0 (_tmp17_);
	_g_free0 (_tmp15_);
	_g_free0 (_tmp13_);
	_tmp18_ = fun;
	_tmp19_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp20_ = vala_get_ccode_name ((ValaCodeNode*) _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_parameter_new ("array_length", _tmp21_);
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_parameter (_tmp18_, _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_tmp24_ = fun;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp24_);
	_tmp25_ = vala_ccode_identifier_new ("array");
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_ccode_constant_new ("NULL");
	_tmp28_ = _tmp27_;
	_tmp29_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp26_, (ValaCCodeExpression*) _tmp28_);
	_tmp30_ = _tmp29_;
	_vala_ccode_node_unref0 (_tmp28_);
	_vala_ccode_node_unref0 (_tmp26_);
	ccondarr = _tmp30_;
	_tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp32_ = _tmp31_;
	_tmp33_ = ccondarr;
	vala_ccode_function_open_if (_tmp32_, (ValaCCodeExpression*) _tmp33_);
	_tmp34_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp35_ = _tmp34_;
	_tmp36_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp37_ = vala_get_ccode_name ((ValaCodeNode*) _tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
	_tmp40_ = _tmp39_;
	vala_ccode_function_add_declaration (_tmp35_, _tmp38_, (ValaCCodeDeclarator*) _tmp40_, 0);
	_vala_ccode_node_unref0 (_tmp40_);
	_g_free0 (_tmp38_);
	vala_ccode_array_module_append_struct_array_free_loop (self, st);
	_tmp41_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp42_ = _tmp41_;
	vala_ccode_function_close (_tmp42_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp43_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp44_ = fun;
	vala_ccode_file_add_function_declaration (_tmp43_, _tmp44_);
	_tmp45_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp46_ = fun;
	vala_ccode_file_add_function (_tmp45_, _tmp46_);
	result = cname;
	_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_;
	ValaDataType* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	ValaCCodeCastExpression* _tmp31_;
	ValaCCodeCastExpression* _tmp32_;
	ValaCCodeElementAccess* cea = NULL;
	ValaCCodeIdentifier* _tmp33_;
	ValaCCodeIdentifier* _tmp34_;
	ValaCCodeElementAccess* _tmp35_;
	ValaCCodeElementAccess* _tmp36_;
	ValaCCodeBinaryExpression* cfreecond = NULL;
	ValaCCodeConstant* _tmp37_;
	ValaCCodeConstant* _tmp38_;
	ValaCCodeBinaryExpression* _tmp39_;
	ValaCCodeBinaryExpression* _tmp40_;
	ValaCCodeFunction* _tmp41_;
	ValaCCodeFunction* _tmp42_;
	ValaCCodeFunctionCall* cfreecall = NULL;
	ValaCCodeIdentifier* _tmp43_;
	ValaCCodeIdentifier* _tmp44_;
	ValaCCodeFunctionCall* _tmp45_;
	ValaCCodeFunctionCall* _tmp46_;
	ValaCCodeFunction* _tmp47_;
	ValaCCodeFunction* _tmp48_;
	ValaCCodeFunction* _tmp49_;
	ValaCCodeFunction* _tmp50_;
	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_ = ((ValaCCodeBaseModule*) self)->pointer_type;
	_tmp27_ = vala_get_ccode_name ((ValaCodeNode*) _tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = g_strdup_printf ("%s*", _tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp25_, _tmp30_);
	_tmp32_ = _tmp31_;
	_g_free0 (_tmp30_);
	_g_free0 (_tmp28_);
	_vala_ccode_node_unref0 (_tmp25_);
	cptrarray = _tmp32_;
	_tmp33_ = vala_ccode_identifier_new ("i");
	_tmp34_ = _tmp33_;
	_tmp35_ = vala_ccode_element_access_new ((ValaCCodeExpression*) cptrarray, (ValaCCodeExpression*) _tmp34_);
	_tmp36_ = _tmp35_;
	_vala_ccode_node_unref0 (_tmp34_);
	cea = _tmp36_;
	_tmp37_ = vala_ccode_constant_new ("NULL");
	_tmp38_ = _tmp37_;
	_tmp39_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) cea, (ValaCCodeExpression*) _tmp38_);
	_tmp40_ = _tmp39_;
	_vala_ccode_node_unref0 (_tmp38_);
	cfreecond = _tmp40_;
	_tmp41_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp42_ = _tmp41_;
	vala_ccode_function_open_if (_tmp42_, (ValaCCodeExpression*) cfreecond);
	_tmp43_ = vala_ccode_identifier_new ("destroy_func");
	_tmp44_ = _tmp43_;
	_tmp45_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp44_);
	_tmp46_ = _tmp45_;
	_vala_ccode_node_unref0 (_tmp44_);
	cfreecall = _tmp46_;
	vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) cea);
	_tmp47_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp48_ = _tmp47_;
	vala_ccode_function_add_expression (_tmp48_, (ValaCCodeExpression*) cfreecall);
	_tmp49_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp50_ = _tmp49_;
	vala_ccode_function_close (_tmp50_);
	_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;
	ValaDelegateType* _tmp0_;
	ValaCCodeFile* _tmp1_;
	ValaDataType* _tmp2_;
	ValaCCodeFile* _tmp3_;
	ValaCCodeFunction* fun = NULL;
	ValaCCodeFunction* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaCCodeFunction* _tmp6_;
	ValaDataType* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeParameter* _tmp10_;
	ValaCCodeParameter* _tmp11_;
	ValaCCodeFunction* _tmp12_;
	ValaDataType* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	ValaCCodeParameter* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeFunction* _tmp18_;
	ValaDelegateType* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValaCCodeParameter* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	ValaCCodeBinaryExpression* ccondarr = NULL;
	ValaCCodeIdentifier* _tmp25_;
	ValaCCodeIdentifier* _tmp26_;
	ValaCCodeConstant* _tmp27_;
	ValaCCodeConstant* _tmp28_;
	ValaCCodeBinaryExpression* _tmp29_;
	ValaCCodeBinaryExpression* _tmp30_;
	ValaCCodeBinaryExpression* ccondfunc = NULL;
	ValaCCodeIdentifier* _tmp31_;
	ValaCCodeIdentifier* _tmp32_;
	ValaCCodeConstant* _tmp33_;
	ValaCCodeConstant* _tmp34_;
	ValaCCodeBinaryExpression* _tmp35_;
	ValaCCodeBinaryExpression* _tmp36_;
	ValaCCodeFunction* _tmp37_;
	ValaCCodeFunction* _tmp38_;
	ValaCCodeBinaryExpression* _tmp39_;
	ValaCCodeBinaryExpression* _tmp40_;
	ValaCCodeBinaryExpression* _tmp41_;
	ValaCCodeBinaryExpression* _tmp42_;
	ValaCCodeFunction* _tmp43_;
	ValaCCodeFunction* _tmp44_;
	ValaDataType* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	ValaCCodeVariableDeclarator* _tmp48_;
	ValaCCodeVariableDeclarator* _tmp49_;
	ValaCCodeFunction* _tmp50_;
	ValaCCodeFunction* _tmp51_;
	ValaCCodeFile* _tmp52_;
	ValaCCodeFunction* _tmp53_;
	ValaCCodeFile* _tmp54_;
	ValaCCodeFunction* _tmp55_;
	ValaCCodeFunction* _tmp56_;
	ValaCCodeFunction* _tmp57_;
	ValaCCodeFunction* _tmp58_;
	ValaDataType* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	ValaCCodeParameter* _tmp62_;
	ValaCCodeParameter* _tmp63_;
	ValaCCodeFunction* _tmp64_;
	ValaDataType* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	ValaCCodeParameter* _tmp68_;
	ValaCCodeParameter* _tmp69_;
	ValaCCodeFunction* _tmp70_;
	ValaDelegateType* _tmp71_;
	gchar* _tmp72_;
	gchar* _tmp73_;
	ValaCCodeParameter* _tmp74_;
	ValaCCodeParameter* _tmp75_;
	ValaCCodeFunction* _tmp76_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaCCodeIdentifier* _tmp77_;
	ValaCCodeIdentifier* _tmp78_;
	ValaCCodeFunctionCall* _tmp79_;
	ValaCCodeFunctionCall* _tmp80_;
	ValaCCodeFunctionCall* _tmp81_;
	ValaCCodeIdentifier* _tmp82_;
	ValaCCodeIdentifier* _tmp83_;
	ValaCCodeFunctionCall* _tmp84_;
	ValaCCodeIdentifier* _tmp85_;
	ValaCCodeIdentifier* _tmp86_;
	ValaCCodeFunctionCall* _tmp87_;
	ValaCCodeIdentifier* _tmp88_;
	ValaCCodeIdentifier* _tmp89_;
	ValaCCodeFunction* _tmp90_;
	ValaCCodeFunction* _tmp91_;
	ValaCCodeFunctionCall* _tmp92_;
	ValaCCodeFunctionCall* carrfree = NULL;
	ValaCodeContext* _tmp93_;
	ValaCodeContext* _tmp94_;
	ValaProfile _tmp95_;
	ValaProfile _tmp96_;
	ValaCCodeFunctionCall* _tmp104_;
	ValaCCodeIdentifier* _tmp105_;
	ValaCCodeIdentifier* _tmp106_;
	ValaCCodeFunction* _tmp107_;
	ValaCCodeFunction* _tmp108_;
	ValaCCodeFunctionCall* _tmp109_;
	ValaCCodeFile* _tmp110_;
	ValaCCodeFunction* _tmp111_;
	ValaCCodeFile* _tmp112_;
	ValaCCodeFunction* _tmp113_;
	self = (ValaCCodeArrayModule*) base;
	_tmp0_ = ((ValaCCodeBaseModule*) self)->delegate_target_destroy_type;
	_tmp1_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp0_, _tmp1_);
	_tmp2_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp3_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp2_, _tmp3_);
	_tmp4_ = vala_ccode_function_new ("_vala_array_destroy", "void");
	fun = _tmp4_;
	_tmp5_ = fun;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp5_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp6_ = fun;
	_tmp7_ = ((ValaCCodeBaseModule*) self)->pointer_type;
	_tmp8_ = vala_get_ccode_name ((ValaCodeNode*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_ccode_parameter_new ("array", _tmp9_);
	_tmp11_ = _tmp10_;
	vala_ccode_function_add_parameter (_tmp6_, _tmp11_);
	_vala_ccode_node_unref0 (_tmp11_);
	_g_free0 (_tmp9_);
	_tmp12_ = fun;
	_tmp13_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp14_ = vala_get_ccode_name ((ValaCodeNode*) _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_ccode_parameter_new ("array_length", _tmp15_);
	_tmp17_ = _tmp16_;
	vala_ccode_function_add_parameter (_tmp12_, _tmp17_);
	_vala_ccode_node_unref0 (_tmp17_);
	_g_free0 (_tmp15_);
	_tmp18_ = fun;
	_tmp19_ = ((ValaCCodeBaseModule*) self)->delegate_target_destroy_type;
	_tmp20_ = vala_get_ccode_name ((ValaCodeNode*) _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_parameter_new ("destroy_func", _tmp21_);
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_parameter (_tmp18_, _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_tmp24_ = fun;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp24_);
	_tmp25_ = vala_ccode_identifier_new ("array");
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_ccode_constant_new ("NULL");
	_tmp28_ = _tmp27_;
	_tmp29_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp26_, (ValaCCodeExpression*) _tmp28_);
	_tmp30_ = _tmp29_;
	_vala_ccode_node_unref0 (_tmp28_);
	_vala_ccode_node_unref0 (_tmp26_);
	ccondarr = _tmp30_;
	_tmp31_ = vala_ccode_identifier_new ("destroy_func");
	_tmp32_ = _tmp31_;
	_tmp33_ = vala_ccode_constant_new ("NULL");
	_tmp34_ = _tmp33_;
	_tmp35_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp32_, (ValaCCodeExpression*) _tmp34_);
	_tmp36_ = _tmp35_;
	_vala_ccode_node_unref0 (_tmp34_);
	_vala_ccode_node_unref0 (_tmp32_);
	ccondfunc = _tmp36_;
	_tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp38_ = _tmp37_;
	_tmp39_ = ccondarr;
	_tmp40_ = ccondfunc;
	_tmp41_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) _tmp39_, (ValaCCodeExpression*) _tmp40_);
	_tmp42_ = _tmp41_;
	vala_ccode_function_open_if (_tmp38_, (ValaCCodeExpression*) _tmp42_);
	_vala_ccode_node_unref0 (_tmp42_);
	_tmp43_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp44_ = _tmp43_;
	_tmp45_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp46_ = vala_get_ccode_name ((ValaCodeNode*) _tmp45_);
	_tmp47_ = _tmp46_;
	_tmp48_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
	_tmp49_ = _tmp48_;
	vala_ccode_function_add_declaration (_tmp44_, _tmp47_, (ValaCCodeDeclarator*) _tmp49_, 0);
	_vala_ccode_node_unref0 (_tmp49_);
	_g_free0 (_tmp47_);
	vala_ccode_array_module_append_vala_array_free_loop (self);
	_tmp50_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp51_ = _tmp50_;
	vala_ccode_function_close (_tmp51_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp52_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp53_ = fun;
	vala_ccode_file_add_function_declaration (_tmp52_, _tmp53_);
	_tmp54_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp55_ = fun;
	vala_ccode_file_add_function (_tmp54_, _tmp55_);
	_tmp56_ = vala_ccode_function_new ("_vala_array_free", "void");
	_vala_ccode_node_unref0 (fun);
	fun = _tmp56_;
	_tmp57_ = fun;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp57_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp58_ = fun;
	_tmp59_ = ((ValaCCodeBaseModule*) self)->pointer_type;
	_tmp60_ = vala_get_ccode_name ((ValaCodeNode*) _tmp59_);
	_tmp61_ = _tmp60_;
	_tmp62_ = vala_ccode_parameter_new ("array", _tmp61_);
	_tmp63_ = _tmp62_;
	vala_ccode_function_add_parameter (_tmp58_, _tmp63_);
	_vala_ccode_node_unref0 (_tmp63_);
	_g_free0 (_tmp61_);
	_tmp64_ = fun;
	_tmp65_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp66_ = vala_get_ccode_name ((ValaCodeNode*) _tmp65_);
	_tmp67_ = _tmp66_;
	_tmp68_ = vala_ccode_parameter_new ("array_length", _tmp67_);
	_tmp69_ = _tmp68_;
	vala_ccode_function_add_parameter (_tmp64_, _tmp69_);
	_vala_ccode_node_unref0 (_tmp69_);
	_g_free0 (_tmp67_);
	_tmp70_ = fun;
	_tmp71_ = ((ValaCCodeBaseModule*) self)->delegate_target_destroy_type;
	_tmp72_ = vala_get_ccode_name ((ValaCodeNode*) _tmp71_);
	_tmp73_ = _tmp72_;
	_tmp74_ = vala_ccode_parameter_new ("destroy_func", _tmp73_);
	_tmp75_ = _tmp74_;
	vala_ccode_function_add_parameter (_tmp70_, _tmp75_);
	_vala_ccode_node_unref0 (_tmp75_);
	_g_free0 (_tmp73_);
	_tmp76_ = fun;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp76_);
	_tmp77_ = vala_ccode_identifier_new ("_vala_array_destroy");
	_tmp78_ = _tmp77_;
	_tmp79_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp78_);
	_tmp80_ = _tmp79_;
	_vala_ccode_node_unref0 (_tmp78_);
	ccall = _tmp80_;
	_tmp81_ = ccall;
	_tmp82_ = vala_ccode_identifier_new ("array");
	_tmp83_ = _tmp82_;
	vala_ccode_function_call_add_argument (_tmp81_, (ValaCCodeExpression*) _tmp83_);
	_vala_ccode_node_unref0 (_tmp83_);
	_tmp84_ = ccall;
	_tmp85_ = vala_ccode_identifier_new ("array_length");
	_tmp86_ = _tmp85_;
	vala_ccode_function_call_add_argument (_tmp84_, (ValaCCodeExpression*) _tmp86_);
	_vala_ccode_node_unref0 (_tmp86_);
	_tmp87_ = ccall;
	_tmp88_ = vala_ccode_identifier_new ("destroy_func");
	_tmp89_ = _tmp88_;
	vala_ccode_function_call_add_argument (_tmp87_, (ValaCCodeExpression*) _tmp89_);
	_vala_ccode_node_unref0 (_tmp89_);
	_tmp90_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp91_ = _tmp90_;
	_tmp92_ = ccall;
	vala_ccode_function_add_expression (_tmp91_, (ValaCCodeExpression*) _tmp92_);
	_tmp93_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp94_ = _tmp93_;
	_tmp95_ = vala_code_context_get_profile (_tmp94_);
	_tmp96_ = _tmp95_;
	if (_tmp96_ == VALA_PROFILE_POSIX) {
		ValaCCodeFile* _tmp97_;
		ValaCCodeIdentifier* _tmp98_;
		ValaCCodeIdentifier* _tmp99_;
		ValaCCodeFunctionCall* _tmp100_;
		_tmp97_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp97_, "stdlib.h", FALSE);
		_tmp98_ = vala_ccode_identifier_new ("free");
		_tmp99_ = _tmp98_;
		_tmp100_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp99_);
		_vala_ccode_node_unref0 (carrfree);
		carrfree = _tmp100_;
		_vala_ccode_node_unref0 (_tmp99_);
	} else {
		ValaCCodeIdentifier* _tmp101_;
		ValaCCodeIdentifier* _tmp102_;
		ValaCCodeFunctionCall* _tmp103_;
		_tmp101_ = vala_ccode_identifier_new ("g_free");
		_tmp102_ = _tmp101_;
		_tmp103_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp102_);
		_vala_ccode_node_unref0 (carrfree);
		carrfree = _tmp103_;
		_vala_ccode_node_unref0 (_tmp102_);
	}
	_tmp104_ = carrfree;
	_tmp105_ = vala_ccode_identifier_new ("array");
	_tmp106_ = _tmp105_;
	vala_ccode_function_call_add_argument (_tmp104_, (ValaCCodeExpression*) _tmp106_);
	_vala_ccode_node_unref0 (_tmp106_);
	_tmp107_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp108_ = _tmp107_;
	_tmp109_ = carrfree;
	vala_ccode_function_add_expression (_tmp108_, (ValaCCodeExpression*) _tmp109_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp110_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp111_ = fun;
	vala_ccode_file_add_function_declaration (_tmp110_, _tmp111_);
	_tmp112_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp113_ = fun;
	vala_ccode_file_add_function (_tmp112_, _tmp113_);
	_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_;
	ValaDataType* _tmp1_;
	ValaCCodeFile* _tmp2_;
	ValaCCodeFunction* fun = NULL;
	ValaCCodeFunction* _tmp3_;
	ValaDataType* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	ValaCCodeParameter* _tmp7_;
	ValaCCodeParameter* _tmp8_;
	ValaDataType* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	ValaCCodeParameter* _tmp12_;
	ValaCCodeParameter* _tmp13_;
	ValaDataType* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	ValaCCodeParameter* _tmp17_;
	ValaCCodeParameter* _tmp18_;
	ValaDataType* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValaCCodeParameter* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaDataType* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	ValaCCodeParameter* _tmp27_;
	ValaCCodeParameter* _tmp28_;
	ValaCCodeCastExpression* array = NULL;
	ValaCCodeIdentifier* _tmp29_;
	ValaCCodeIdentifier* _tmp30_;
	ValaCCodeCastExpression* _tmp31_;
	ValaCCodeCastExpression* _tmp32_;
	ValaCCodeIdentifier* element_size = NULL;
	ValaCCodeIdentifier* _tmp33_;
	ValaCCodeIdentifier* length = NULL;
	ValaCCodeIdentifier* _tmp34_;
	ValaCCodeIdentifier* src = NULL;
	ValaCCodeIdentifier* _tmp35_;
	ValaCCodeBinaryExpression* src_end = NULL;
	ValaCCodeBinaryExpression* _tmp36_;
	ValaCCodeIdentifier* dest = NULL;
	ValaCCodeIdentifier* _tmp37_;
	ValaCCodeBinaryExpression* dest_end = NULL;
	ValaCCodeBinaryExpression* _tmp38_;
	ValaCCodeBinaryExpression* src_address = NULL;
	ValaCCodeBinaryExpression* _tmp39_;
	ValaCCodeBinaryExpression* _tmp40_;
	ValaCCodeBinaryExpression* _tmp41_;
	ValaCCodeBinaryExpression* _tmp42_;
	ValaCCodeBinaryExpression* dest_address = NULL;
	ValaCCodeBinaryExpression* _tmp43_;
	ValaCCodeBinaryExpression* _tmp44_;
	ValaCCodeBinaryExpression* _tmp45_;
	ValaCCodeBinaryExpression* _tmp46_;
	ValaCCodeBinaryExpression* dest_end_address = NULL;
	ValaCCodeBinaryExpression* _tmp47_;
	ValaCCodeBinaryExpression* _tmp48_;
	ValaCCodeBinaryExpression* _tmp49_;
	ValaCCodeBinaryExpression* _tmp50_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaCCodeIdentifier* _tmp51_;
	ValaCCodeIdentifier* _tmp52_;
	ValaCCodeFunctionCall* _tmp53_;
	ValaCCodeFunctionCall* _tmp54_;
	ValaCCodeBinaryExpression* _tmp55_;
	ValaCCodeBinaryExpression* _tmp56_;
	ValaCCodeFunction* _tmp57_;
	ValaCCodeFunction* _tmp58_;
	ValaCCodeFunction* _tmp59_;
	ValaCCodeFunction* _tmp60_;
	ValaCCodeBinaryExpression* _tmp61_;
	ValaCCodeBinaryExpression* _tmp62_;
	ValaCCodeBinaryExpression* _tmp63_;
	ValaCCodeBinaryExpression* _tmp64_;
	ValaCCodeBinaryExpression* _tmp65_;
	ValaCCodeBinaryExpression* _tmp66_;
	ValaCCodeFunctionCall* czero1 = NULL;
	ValaCCodeIdentifier* _tmp67_;
	ValaCCodeIdentifier* _tmp68_;
	ValaCCodeFunctionCall* _tmp69_;
	ValaCCodeFunctionCall* _tmp70_;
	ValaCCodeConstant* _tmp71_;
	ValaCCodeConstant* _tmp72_;
	ValaCCodeBinaryExpression* _tmp73_;
	ValaCCodeBinaryExpression* _tmp74_;
	ValaCCodeBinaryExpression* _tmp75_;
	ValaCCodeBinaryExpression* _tmp76_;
	ValaCCodeFunction* _tmp77_;
	ValaCCodeFunction* _tmp78_;
	ValaCCodeFunction* _tmp79_;
	ValaCCodeFunction* _tmp80_;
	ValaCCodeBinaryExpression* _tmp81_;
	ValaCCodeBinaryExpression* _tmp82_;
	ValaCCodeBinaryExpression* _tmp83_;
	ValaCCodeBinaryExpression* _tmp84_;
	ValaCCodeBinaryExpression* _tmp85_;
	ValaCCodeBinaryExpression* _tmp86_;
	ValaCCodeFunctionCall* czero2 = NULL;
	ValaCCodeIdentifier* _tmp87_;
	ValaCCodeIdentifier* _tmp88_;
	ValaCCodeFunctionCall* _tmp89_;
	ValaCCodeFunctionCall* _tmp90_;
	ValaCCodeConstant* _tmp91_;
	ValaCCodeConstant* _tmp92_;
	ValaCCodeBinaryExpression* _tmp93_;
	ValaCCodeBinaryExpression* _tmp94_;
	ValaCCodeBinaryExpression* _tmp95_;
	ValaCCodeBinaryExpression* _tmp96_;
	ValaCCodeFunction* _tmp97_;
	ValaCCodeFunction* _tmp98_;
	ValaCCodeFunction* _tmp99_;
	ValaCCodeFunction* _tmp100_;
	ValaCCodeBinaryExpression* _tmp101_;
	ValaCCodeBinaryExpression* _tmp102_;
	ValaCCodeFunctionCall* czero3 = NULL;
	ValaCCodeIdentifier* _tmp103_;
	ValaCCodeIdentifier* _tmp104_;
	ValaCCodeFunctionCall* _tmp105_;
	ValaCCodeFunctionCall* _tmp106_;
	ValaCCodeConstant* _tmp107_;
	ValaCCodeConstant* _tmp108_;
	ValaCCodeBinaryExpression* _tmp109_;
	ValaCCodeBinaryExpression* _tmp110_;
	ValaCCodeFunction* _tmp111_;
	ValaCCodeFunction* _tmp112_;
	ValaCCodeFunction* _tmp113_;
	ValaCCodeFunction* _tmp114_;
	ValaCCodeFile* _tmp115_;
	ValaCCodeFile* _tmp116_;
	self = (ValaCCodeArrayModule*) base;
	_tmp0_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_include (_tmp0_, "string.h", FALSE);
	_tmp1_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp2_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp1_, _tmp2_);
	_tmp3_ = vala_ccode_function_new ("_vala_array_move", "void");
	fun = _tmp3_;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) fun, VALA_CCODE_MODIFIERS_STATIC);
	_tmp4_ = ((ValaCCodeBaseModule*) self)->pointer_type;
	_tmp5_ = vala_get_ccode_name ((ValaCodeNode*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_ccode_parameter_new ("array", _tmp6_);
	_tmp8_ = _tmp7_;
	vala_ccode_function_add_parameter (fun, _tmp8_);
	_vala_ccode_node_unref0 (_tmp8_);
	_g_free0 (_tmp6_);
	_tmp9_ = ((ValaCCodeBaseModule*) self)->size_t_type;
	_tmp10_ = vala_get_ccode_name ((ValaCodeNode*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = vala_ccode_parameter_new ("element_size", _tmp11_);
	_tmp13_ = _tmp12_;
	vala_ccode_function_add_parameter (fun, _tmp13_);
	_vala_ccode_node_unref0 (_tmp13_);
	_g_free0 (_tmp11_);
	_tmp14_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp15_ = vala_get_ccode_name ((ValaCodeNode*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = vala_ccode_parameter_new ("src", _tmp16_);
	_tmp18_ = _tmp17_;
	vala_ccode_function_add_parameter (fun, _tmp18_);
	_vala_ccode_node_unref0 (_tmp18_);
	_g_free0 (_tmp16_);
	_tmp19_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp20_ = vala_get_ccode_name ((ValaCodeNode*) _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_parameter_new ("dest", _tmp21_);
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_parameter (fun, _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_tmp24_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp25_ = vala_get_ccode_name ((ValaCodeNode*) _tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_ccode_parameter_new ("length", _tmp26_);
	_tmp28_ = _tmp27_;
	vala_ccode_function_add_parameter (fun, _tmp28_);
	_vala_ccode_node_unref0 (_tmp28_);
	_g_free0 (_tmp26_);
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
	_tmp29_ = vala_ccode_identifier_new ("array");
	_tmp30_ = _tmp29_;
	_tmp31_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp30_, "char*");
	_tmp32_ = _tmp31_;
	_vala_ccode_node_unref0 (_tmp30_);
	array = _tmp32_;
	_tmp33_ = vala_ccode_identifier_new ("element_size");
	element_size = _tmp33_;
	_tmp34_ = vala_ccode_identifier_new ("length");
	length = _tmp34_;
	_tmp35_ = vala_ccode_identifier_new ("src");
	src = _tmp35_;
	_tmp36_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) src, (ValaCCodeExpression*) length);
	src_end = _tmp36_;
	_tmp37_ = vala_ccode_identifier_new ("dest");
	dest = _tmp37_;
	_tmp38_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) length);
	dest_end = _tmp38_;
	_tmp39_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) src, (ValaCCodeExpression*) element_size);
	_tmp40_ = _tmp39_;
	_tmp41_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp40_);
	_tmp42_ = _tmp41_;
	_vala_ccode_node_unref0 (_tmp40_);
	src_address = _tmp42_;
	_tmp43_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) element_size);
	_tmp44_ = _tmp43_;
	_tmp45_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp44_);
	_tmp46_ = _tmp45_;
	_vala_ccode_node_unref0 (_tmp44_);
	dest_address = _tmp46_;
	_tmp47_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) dest_end, (ValaCCodeExpression*) element_size);
	_tmp48_ = _tmp47_;
	_tmp49_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp48_);
	_tmp50_ = _tmp49_;
	_vala_ccode_node_unref0 (_tmp48_);
	dest_end_address = _tmp50_;
	_tmp51_ = vala_ccode_identifier_new ("memmove");
	_tmp52_ = _tmp51_;
	_tmp53_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp52_);
	_tmp54_ = _tmp53_;
	_vala_ccode_node_unref0 (_tmp52_);
	ccall = _tmp54_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) dest_address);
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) src_address);
	_tmp55_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) length, (ValaCCodeExpression*) element_size);
	_tmp56_ = _tmp55_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp56_);
	_vala_ccode_node_unref0 (_tmp56_);
	_tmp57_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp58_ = _tmp57_;
	vala_ccode_function_add_expression (_tmp58_, (ValaCCodeExpression*) ccall);
	_tmp59_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp60_ = _tmp59_;
	_tmp61_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp62_ = _tmp61_;
	_tmp63_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_GREATER_THAN, (ValaCCodeExpression*) src_end, (ValaCCodeExpression*) dest);
	_tmp64_ = _tmp63_;
	_tmp65_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) _tmp62_, (ValaCCodeExpression*) _tmp64_);
	_tmp66_ = _tmp65_;
	vala_ccode_function_open_if (_tmp60_, (ValaCCodeExpression*) _tmp66_);
	_vala_ccode_node_unref0 (_tmp66_);
	_vala_ccode_node_unref0 (_tmp64_);
	_vala_ccode_node_unref0 (_tmp62_);
	_tmp67_ = vala_ccode_identifier_new ("memset");
	_tmp68_ = _tmp67_;
	_tmp69_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp68_);
	_tmp70_ = _tmp69_;
	_vala_ccode_node_unref0 (_tmp68_);
	czero1 = _tmp70_;
	vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) src_address);
	_tmp71_ = vala_ccode_constant_new ("0");
	_tmp72_ = _tmp71_;
	vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp72_);
	_vala_ccode_node_unref0 (_tmp72_);
	_tmp73_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) src);
	_tmp74_ = _tmp73_;
	_tmp75_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp74_, (ValaCCodeExpression*) element_size);
	_tmp76_ = _tmp75_;
	vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp76_);
	_vala_ccode_node_unref0 (_tmp76_);
	_vala_ccode_node_unref0 (_tmp74_);
	_tmp77_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp78_ = _tmp77_;
	vala_ccode_function_add_expression (_tmp78_, (ValaCCodeExpression*) czero1);
	_tmp79_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp80_ = _tmp79_;
	_tmp81_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_GREATER_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp82_ = _tmp81_;
	_tmp83_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest_end);
	_tmp84_ = _tmp83_;
	_tmp85_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) _tmp82_, (ValaCCodeExpression*) _tmp84_);
	_tmp86_ = _tmp85_;
	vala_ccode_function_else_if (_tmp80_, (ValaCCodeExpression*) _tmp86_);
	_vala_ccode_node_unref0 (_tmp86_);
	_vala_ccode_node_unref0 (_tmp84_);
	_vala_ccode_node_unref0 (_tmp82_);
	_tmp87_ = vala_ccode_identifier_new ("memset");
	_tmp88_ = _tmp87_;
	_tmp89_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp88_);
	_tmp90_ = _tmp89_;
	_vala_ccode_node_unref0 (_tmp88_);
	czero2 = _tmp90_;
	vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) dest_end_address);
	_tmp91_ = vala_ccode_constant_new ("0");
	_tmp92_ = _tmp91_;
	vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp92_);
	_vala_ccode_node_unref0 (_tmp92_);
	_tmp93_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp94_ = _tmp93_;
	_tmp95_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp94_, (ValaCCodeExpression*) element_size);
	_tmp96_ = _tmp95_;
	vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp96_);
	_vala_ccode_node_unref0 (_tmp96_);
	_vala_ccode_node_unref0 (_tmp94_);
	_tmp97_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp98_ = _tmp97_;
	vala_ccode_function_add_expression (_tmp98_, (ValaCCodeExpression*) czero2);
	_tmp99_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp100_ = _tmp99_;
	_tmp101_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest);
	_tmp102_ = _tmp101_;
	vala_ccode_function_else_if (_tmp100_, (ValaCCodeExpression*) _tmp102_);
	_vala_ccode_node_unref0 (_tmp102_);
	_tmp103_ = vala_ccode_identifier_new ("memset");
	_tmp104_ = _tmp103_;
	_tmp105_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp104_);
	_tmp106_ = _tmp105_;
	_vala_ccode_node_unref0 (_tmp104_);
	czero3 = _tmp106_;
	vala_ccode_function_call_add_argument (czero3, (ValaCCodeExpression*) src_address);
	_tmp107_ = vala_ccode_constant_new ("0");
	_tmp108_ = _tmp107_;
	vala_ccode_function_call_add_argument (czero3, (ValaCCodeExpression*) _tmp108_);
	_vala_ccode_node_unref0 (_tmp108_);
	_tmp109_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) length, (ValaCCodeExpression*) element_size);
	_tmp110_ = _tmp109_;
	vala_ccode_function_call_add_argument (czero3, (ValaCCodeExpression*) _tmp110_);
	_vala_ccode_node_unref0 (_tmp110_);
	_tmp111_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp112_ = _tmp111_;
	vala_ccode_function_add_expression (_tmp112_, (ValaCCodeExpression*) czero3);
	_tmp113_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp114_ = _tmp113_;
	vala_ccode_function_close (_tmp114_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp115_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function_declaration (_tmp115_, fun);
	_tmp116_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function (_tmp116_, 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;
	ValaDataType* _tmp0_;
	ValaCCodeFile* _tmp1_;
	ValaCCodeFunction* fun = NULL;
	ValaDataType* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaCCodeFunction* _tmp6_;
	ValaDataType* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	ValaCCodeParameter* _tmp10_;
	ValaCCodeParameter* _tmp11_;
	ValaCCodeFunction* _tmp12_;
	ValaCCodeFunction* _tmp13_;
	ValaDataType* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	ValaCCodeConstant* _tmp17_;
	ValaCCodeConstant* _tmp18_;
	ValaCCodeVariableDeclarator* _tmp19_;
	ValaCCodeVariableDeclarator* _tmp20_;
	ValaCCodeIdentifier* array_check = NULL;
	ValaCCodeIdentifier* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaCCodeFunction* _tmp23_;
	ValaCCodeElementAccess* array_element_check = NULL;
	ValaCCodeIdentifier* _tmp24_;
	ValaCCodeIdentifier* _tmp25_;
	ValaDataType* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	ValaCCodeCastExpression* _tmp31_;
	ValaCCodeCastExpression* _tmp32_;
	ValaCCodeConstant* _tmp33_;
	ValaCCodeConstant* _tmp34_;
	ValaCCodeElementAccess* _tmp35_;
	ValaCCodeElementAccess* _tmp36_;
	ValaCCodeFunction* _tmp37_;
	ValaCCodeFunction* _tmp38_;
	ValaCCodeFunction* _tmp39_;
	ValaCCodeFunction* _tmp40_;
	ValaCCodeIdentifier* _tmp41_;
	ValaCCodeIdentifier* _tmp42_;
	ValaCCodeUnaryExpression* _tmp43_;
	ValaCCodeUnaryExpression* _tmp44_;
	ValaCCodeFunction* _tmp45_;
	ValaCCodeFunction* _tmp46_;
	ValaCCodeFunction* _tmp47_;
	ValaCCodeFunction* _tmp48_;
	ValaCCodeFunction* _tmp49_;
	ValaCCodeFunction* _tmp50_;
	ValaCCodeIdentifier* _tmp51_;
	ValaCCodeIdentifier* _tmp52_;
	ValaCCodeFile* _tmp53_;
	ValaCCodeFile* _tmp54_;
	self = (ValaCCodeArrayModule*) base;
	_tmp0_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp1_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp0_, _tmp1_);
	_tmp2_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp3_ = vala_get_ccode_name ((ValaCodeNode*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_ccode_function_new ("_vala_array_length", _tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	fun = _tmp6_;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) fun, VALA_CCODE_MODIFIERS_STATIC);
	_tmp7_ = ((ValaCCodeBaseModule*) self)->pointer_type;
	_tmp8_ = vala_get_ccode_name ((ValaCodeNode*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_ccode_parameter_new ("array", _tmp9_);
	_tmp11_ = _tmp10_;
	vala_ccode_function_add_parameter (fun, _tmp11_);
	_vala_ccode_node_unref0 (_tmp11_);
	_g_free0 (_tmp9_);
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun);
	_tmp12_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp13_ = _tmp12_;
	_tmp14_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp15_ = vala_get_ccode_name ((ValaCodeNode*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = vala_ccode_constant_new ("0");
	_tmp18_ = _tmp17_;
	_tmp19_ = vala_ccode_variable_declarator_new ("length", (ValaCCodeExpression*) _tmp18_, NULL);
	_tmp20_ = _tmp19_;
	vala_ccode_function_add_declaration (_tmp13_, _tmp16_, (ValaCCodeDeclarator*) _tmp20_, 0);
	_vala_ccode_node_unref0 (_tmp20_);
	_vala_ccode_node_unref0 (_tmp18_);
	_g_free0 (_tmp16_);
	_tmp21_ = vala_ccode_identifier_new ("array");
	array_check = _tmp21_;
	_tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp23_ = _tmp22_;
	vala_ccode_function_open_if (_tmp23_, (ValaCCodeExpression*) array_check);
	_tmp24_ = vala_ccode_identifier_new ("array");
	_tmp25_ = _tmp24_;
	_tmp26_ = ((ValaCCodeBaseModule*) self)->pointer_type;
	_tmp27_ = vala_get_ccode_name ((ValaCodeNode*) _tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = g_strdup_printf ("%s*", _tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp25_, _tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = vala_ccode_constant_new ("length");
	_tmp34_ = _tmp33_;
	_tmp35_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp32_, (ValaCCodeExpression*) _tmp34_);
	_tmp36_ = _tmp35_;
	_vala_ccode_node_unref0 (_tmp34_);
	_vala_ccode_node_unref0 (_tmp32_);
	_g_free0 (_tmp30_);
	_g_free0 (_tmp28_);
	_vala_ccode_node_unref0 (_tmp25_);
	array_element_check = _tmp36_;
	_tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp38_ = _tmp37_;
	vala_ccode_function_open_while (_tmp38_, (ValaCCodeExpression*) array_element_check);
	_tmp39_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp40_ = _tmp39_;
	_tmp41_ = vala_ccode_identifier_new ("length");
	_tmp42_ = _tmp41_;
	_tmp43_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp42_);
	_tmp44_ = _tmp43_;
	vala_ccode_function_add_expression (_tmp40_, (ValaCCodeExpression*) _tmp44_);
	_vala_ccode_node_unref0 (_tmp44_);
	_vala_ccode_node_unref0 (_tmp42_);
	_tmp45_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp46_ = _tmp45_;
	vala_ccode_function_close (_tmp46_);
	_tmp47_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp48_ = _tmp47_;
	vala_ccode_function_close (_tmp48_);
	_tmp49_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp50_ = _tmp49_;
	_tmp51_ = vala_ccode_identifier_new ("length");
	_tmp52_ = _tmp51_;
	vala_ccode_function_add_return (_tmp50_, (ValaCCodeExpression*) _tmp52_);
	_vala_ccode_node_unref0 (_tmp52_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp53_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function_declaration (_tmp53_, fun);
	_tmp54_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_file_add_function (_tmp54_, 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;
	ValaDataType* type = NULL;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaCCodeExpression* cexpr = NULL;
	ValaCCodeExpression* _tmp3_;
	ValaCCodeExpression* _tmp4_;
	ValaDataType* _tmp5_;
	ValaTargetValue* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (value != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = vala_target_value_get_value_type (value);
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_code_node_ref0 (_tmp1_);
	type = _tmp2_;
	_tmp3_ = vala_get_cvalue_ (value);
	_tmp4_ = _vala_ccode_node_ref0 (_tmp3_);
	cexpr = _tmp4_;
	_tmp5_ = type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, VALA_TYPE_ARRAY_TYPE)) {
		ValaArrayType* array_type = NULL;
		ValaDataType* _tmp6_;
		ValaArrayType* _tmp7_;
		ValaArrayType* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		ValaTargetValue* temp_value = NULL;
		ValaDataType* _tmp12_;
		ValaTargetValue* _tmp13_;
		ValaCCodeFunctionCall* copy_call = NULL;
		ValaArrayType* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		ValaCCodeIdentifier* _tmp17_;
		ValaCCodeIdentifier* _tmp18_;
		ValaCCodeFunctionCall* _tmp19_;
		ValaCCodeFunctionCall* _tmp20_;
		ValaCCodeFunctionCall* _tmp21_;
		ValaCCodeExpression* _tmp22_;
		ValaCCodeFunctionCall* _tmp23_;
		ValaTargetValue* _tmp24_;
		ValaCCodeExpression* _tmp25_;
		ValaCCodeFunction* _tmp26_;
		ValaCCodeFunction* _tmp27_;
		ValaCCodeFunctionCall* _tmp28_;
		_tmp6_ = type;
		_tmp7_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		array_type = _tmp7_;
		_tmp8_ = array_type;
		_tmp9_ = vala_array_type_get_fixed_length (_tmp8_);
		_tmp10_ = _tmp9_;
		if (!_tmp10_) {
			ValaTargetValue* _tmp11_;
			_tmp11_ = 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), value, node);
			result = _tmp11_;
			_vala_code_node_unref0 (array_type);
			_vala_ccode_node_unref0 (cexpr);
			_vala_code_node_unref0 (type);
			return result;
		}
		_tmp12_ = type;
		_tmp13_ = vala_ccode_base_module_create_temp_value ((ValaCCodeBaseModule*) self, _tmp12_, FALSE, node, NULL);
		temp_value = _tmp13_;
		_tmp14_ = array_type;
		_tmp15_ = vala_ccode_array_module_generate_array_copy_wrapper (self, _tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = vala_ccode_identifier_new (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp18_);
		_tmp20_ = _tmp19_;
		_vala_ccode_node_unref0 (_tmp18_);
		_g_free0 (_tmp16_);
		copy_call = _tmp20_;
		_tmp21_ = copy_call;
		_tmp22_ = cexpr;
		vala_ccode_function_call_add_argument (_tmp21_, _tmp22_);
		_tmp23_ = copy_call;
		_tmp24_ = temp_value;
		_tmp25_ = vala_get_cvalue_ (_tmp24_);
		vala_ccode_function_call_add_argument (_tmp23_, _tmp25_);
		_tmp26_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp27_ = _tmp26_;
		_tmp28_ = copy_call;
		vala_ccode_function_add_expression (_tmp27_, (ValaCCodeExpression*) _tmp28_);
		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* _tmp29_;
		_tmp29_ = 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), value, node);
		result = _tmp29_;
		_vala_ccode_node_unref0 (cexpr);
		_vala_code_node_unref0 (type);
		return result;
	}
}

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;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (type != NULL, NULL);
	if (G_TYPE_CHECK_INSTANCE_TYPE (type, VALA_TYPE_ARRAY_TYPE)) {
		ValaArrayType* array_type = NULL;
		ValaArrayType* _tmp0_;
		ValaArrayType* _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_;
		ValaArrayType* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		ValaCCodeIdentifier* _tmp7_;
		ValaCCodeExpression* _tmp8_;
		_tmp0_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (type, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		array_type = _tmp0_;
		_tmp1_ = array_type;
		_tmp2_ = vala_array_type_get_fixed_length (_tmp1_);
		_tmp3_ = _tmp2_;
		_vala_assert (!_tmp3_, "!array_type.fixed_length");
		_tmp4_ = array_type;
		_tmp5_ = vala_ccode_array_module_generate_array_dup_wrapper (self, _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = vala_ccode_identifier_new (_tmp6_);
		_tmp8_ = (ValaCCodeExpression*) _tmp7_;
		_g_free0 (_tmp6_);
		result = _tmp8_;
		_vala_code_node_unref0 (array_type);
		return result;
	} else {
		ValaCCodeExpression* _tmp9_;
		_tmp9_ = 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), type, source_reference, is_chainup);
		result = _tmp9_;
		return result;
	}
}

static ValaCCodeExpression*
vala_ccode_array_module_real_destroy_value (ValaCCodeBaseModule* base,
                                            ValaTargetValue* value,
                                            gboolean is_macro_definition)
{
	ValaCCodeArrayModule * self;
	ValaArrayType* array_type = NULL;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ValaArrayType* _tmp3_;
	ValaCCodeExpression* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (value != NULL, NULL);
	_tmp0_ = vala_target_value_get_value_type (value);
	_tmp1_ = _tmp0_;
	array_type = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp1_) : NULL;
	_tmp3_ = array_type;
	if (_tmp3_ != NULL) {
		ValaArrayType* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = array_type;
		_tmp5_ = vala_array_type_get_fixed_length (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp2_ = _tmp6_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		ValaStruct* st = NULL;
		ValaArrayType* _tmp7_;
		ValaDataType* _tmp8_;
		ValaDataType* _tmp9_;
		ValaTypeSymbol* _tmp10_;
		ValaTypeSymbol* _tmp11_;
		gboolean _tmp12_ = FALSE;
		ValaStruct* _tmp13_;
		ValaDelegateType* _tmp34_;
		ValaCCodeFile* _tmp35_;
		ValaCCodeFunctionCall* ccall = NULL;
		ValaCCodeIdentifier* _tmp36_;
		ValaCCodeIdentifier* _tmp37_;
		ValaCCodeFunctionCall* _tmp38_;
		ValaCCodeFunctionCall* _tmp39_;
		ValaCCodeFunctionCall* _tmp40_;
		ValaCCodeExpression* _tmp41_;
		ValaCCodeFunctionCall* _tmp42_;
		ValaArrayType* _tmp43_;
		ValaExpression* _tmp44_;
		ValaExpression* _tmp45_;
		ValaCCodeExpression* _tmp46_;
		ValaCCodeExpression* _tmp47_;
		ValaCCodeFunctionCall* _tmp48_;
		ValaArrayType* _tmp49_;
		ValaDataType* _tmp50_;
		ValaDataType* _tmp51_;
		ValaCCodeExpression* _tmp52_;
		ValaCCodeExpression* _tmp53_;
		ValaDelegateType* _tmp54_;
		gchar* _tmp55_;
		gchar* _tmp56_;
		ValaCCodeCastExpression* _tmp57_;
		ValaCCodeCastExpression* _tmp58_;
		_tmp7_ = array_type;
		_tmp8_ = vala_array_type_get_element_type (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = vala_data_type_get_type_symbol (_tmp9_);
		_tmp11_ = _tmp10_;
		st = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, VALA_TYPE_STRUCT) ? ((ValaStruct*) _tmp11_) : NULL;
		_tmp13_ = st;
		if (_tmp13_ != NULL) {
			ValaArrayType* _tmp14_;
			ValaDataType* _tmp15_;
			ValaDataType* _tmp16_;
			gboolean _tmp17_;
			gboolean _tmp18_;
			_tmp14_ = array_type;
			_tmp15_ = vala_array_type_get_element_type (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = vala_data_type_get_nullable (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp12_ = !_tmp18_;
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			ValaCCodeFunctionCall* ccall = NULL;
			ValaStruct* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			ValaCCodeIdentifier* _tmp22_;
			ValaCCodeIdentifier* _tmp23_;
			ValaCCodeFunctionCall* _tmp24_;
			ValaCCodeFunctionCall* _tmp25_;
			ValaCCodeFunctionCall* _tmp26_;
			ValaCCodeExpression* _tmp27_;
			ValaCCodeFunctionCall* _tmp28_;
			ValaArrayType* _tmp29_;
			ValaExpression* _tmp30_;
			ValaExpression* _tmp31_;
			ValaCCodeExpression* _tmp32_;
			ValaCCodeExpression* _tmp33_;
			_tmp19_ = st;
			_tmp20_ = vala_ccode_base_module_append_struct_array_destroy ((ValaCCodeBaseModule*) self, _tmp19_);
			_tmp21_ = _tmp20_;
			_tmp22_ = vala_ccode_identifier_new (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp23_);
			_tmp25_ = _tmp24_;
			_vala_ccode_node_unref0 (_tmp23_);
			_g_free0 (_tmp21_);
			ccall = _tmp25_;
			_tmp26_ = ccall;
			_tmp27_ = vala_get_cvalue_ (value);
			vala_ccode_function_call_add_argument (_tmp26_, _tmp27_);
			_tmp28_ = ccall;
			_tmp29_ = array_type;
			_tmp30_ = vala_array_type_get_length (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp31_);
			_tmp33_ = _tmp32_;
			vala_ccode_function_call_add_argument (_tmp28_, _tmp33_);
			_vala_ccode_node_unref0 (_tmp33_);
			result = (ValaCCodeExpression*) ccall;
			return result;
		}
		((ValaCCodeBaseModule*) self)->requires_array_free = TRUE;
		_tmp34_ = ((ValaCCodeBaseModule*) self)->delegate_target_destroy_type;
		_tmp35_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp34_, _tmp35_);
		_tmp36_ = vala_ccode_identifier_new ("_vala_array_destroy");
		_tmp37_ = _tmp36_;
		_tmp38_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp37_);
		_tmp39_ = _tmp38_;
		_vala_ccode_node_unref0 (_tmp37_);
		ccall = _tmp39_;
		_tmp40_ = ccall;
		_tmp41_ = vala_get_cvalue_ (value);
		vala_ccode_function_call_add_argument (_tmp40_, _tmp41_);
		_tmp42_ = ccall;
		_tmp43_ = array_type;
		_tmp44_ = vala_array_type_get_length (_tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp45_);
		_tmp47_ = _tmp46_;
		vala_ccode_function_call_add_argument (_tmp42_, _tmp47_);
		_vala_ccode_node_unref0 (_tmp47_);
		_tmp48_ = ccall;
		_tmp49_ = array_type;
		_tmp50_ = vala_array_type_get_element_type (_tmp49_);
		_tmp51_ = _tmp50_;
		_tmp52_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, _tmp51_, FALSE);
		_tmp53_ = _tmp52_;
		_tmp54_ = ((ValaCCodeBaseModule*) self)->delegate_target_destroy_type;
		_tmp55_ = vala_get_ccode_name ((ValaCodeNode*) _tmp54_);
		_tmp56_ = _tmp55_;
		_tmp57_ = vala_ccode_cast_expression_new (_tmp53_, _tmp56_);
		_tmp58_ = _tmp57_;
		vala_ccode_function_call_add_argument (_tmp48_, (ValaCCodeExpression*) _tmp58_);
		_vala_ccode_node_unref0 (_tmp58_);
		_g_free0 (_tmp56_);
		_vala_ccode_node_unref0 (_tmp53_);
		result = (ValaCCodeExpression*) ccall;
		return result;
	} else {
		ValaCCodeExpression* _tmp59_;
		_tmp59_ = 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), value, is_macro_definition);
		result = _tmp59_;
		return result;
	}
}

static gchar*
vala_ccode_array_module_generate_array_dup_wrapper (ValaCCodeArrayModule* self,
                                                    ValaArrayType* array_type)
{
	gchar* dup_func = NULL;
	gint _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	ValaDataType* _tmp3_;
	ValaCCodeFile* _tmp4_;
	ValaCCodeFunction* function = NULL;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	ValaCCodeFunction* _tmp8_;
	ValaCCodeFunction* _tmp9_;
	ValaCCodeFunction* _tmp10_;
	ValaCCodeFunction* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	ValaCCodeParameter* _tmp14_;
	ValaCCodeParameter* _tmp15_;
	ValaCCodeFunction* _tmp16_;
	ValaDataType* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	ValaCCodeParameter* _tmp20_;
	ValaCCodeParameter* _tmp21_;
	ValaDataType* _tmp22_;
	ValaDataType* _tmp23_;
	ValaCCodeBaseModuleEmitContext* _tmp33_;
	ValaCCodeBaseModuleEmitContext* _tmp34_;
	ValaCCodeFunction* _tmp35_;
	ValaDataType* _tmp36_;
	ValaDataType* _tmp37_;
	ValaCCodeFile* _tmp260_;
	ValaCCodeFunction* _tmp261_;
	ValaCCodeFile* _tmp262_;
	ValaCCodeFunction* _tmp263_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (array_type != NULL, NULL);
	self->priv->next_array_dup_id = self->priv->next_array_dup_id + 1;
	_tmp0_ = self->priv->next_array_dup_id;
	_tmp1_ = g_strdup_printf ("_vala_array_dup%d", _tmp0_);
	dup_func = _tmp1_;
	_tmp2_ = dup_func;
	if (!vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp2_)) {
		result = dup_func;
		return result;
	}
	_tmp3_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp4_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp3_, _tmp4_);
	_tmp5_ = dup_func;
	_tmp6_ = vala_get_ccode_name ((ValaCodeNode*) array_type);
	_tmp7_ = _tmp6_;
	_tmp8_ = vala_ccode_function_new (_tmp5_, _tmp7_);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	function = _tmp9_;
	_tmp10_ = function;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp10_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp11_ = function;
	_tmp12_ = vala_get_ccode_name ((ValaCodeNode*) array_type);
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_ccode_parameter_new ("self", _tmp13_);
	_tmp15_ = _tmp14_;
	vala_ccode_function_add_parameter (_tmp11_, _tmp15_);
	_vala_ccode_node_unref0 (_tmp15_);
	_g_free0 (_tmp13_);
	_tmp16_ = function;
	_tmp17_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
	_tmp18_ = vala_get_ccode_name ((ValaCodeNode*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = vala_ccode_parameter_new ("length", _tmp19_);
	_tmp21_ = _tmp20_;
	vala_ccode_function_add_parameter (_tmp16_, _tmp21_);
	_vala_ccode_node_unref0 (_tmp21_);
	_g_free0 (_tmp19_);
	_tmp22_ = vala_array_type_get_element_type (array_type);
	_tmp23_ = _tmp22_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, VALA_TYPE_GENERIC_TYPE)) {
		ValaCCodeFunction* _tmp24_;
		ValaDataType* _tmp25_;
		ValaDataType* _tmp26_;
		ValaTypeParameter* _tmp27_;
		ValaTypeParameter* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		ValaCCodeParameter* _tmp31_;
		ValaCCodeParameter* _tmp32_;
		_tmp24_ = function;
		_tmp25_ = vala_array_type_get_element_type (array_type);
		_tmp26_ = _tmp25_;
		_tmp27_ = vala_generic_type_get_type_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, VALA_TYPE_GENERIC_TYPE, ValaGenericType));
		_tmp28_ = _tmp27_;
		_tmp29_ = vala_get_ccode_copy_function ((ValaTypeSymbol*) _tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = vala_ccode_parameter_new (_tmp30_, "GBoxedCopyFunc");
		_tmp32_ = _tmp31_;
		vala_ccode_function_add_parameter (_tmp24_, _tmp32_);
		_vala_ccode_node_unref0 (_tmp32_);
		_g_free0 (_tmp30_);
	}
	_tmp33_ = vala_ccode_base_module_emit_context_new (NULL);
	_tmp34_ = _tmp33_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp34_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp34_);
	_tmp35_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp35_);
	_tmp36_ = vala_array_type_get_element_type (array_type);
	_tmp37_ = _tmp36_;
	if (vala_ccode_base_module_requires_copy (_tmp37_)) {
		ValaCCodeVariableDeclarator* cvardecl = NULL;
		ValaCCodeVariableDeclarator* _tmp38_;
		ValaCCodeFunctionCall* gnew = NULL;
		ValaCodeContext* _tmp39_;
		ValaCodeContext* _tmp40_;
		ValaProfile _tmp41_;
		ValaProfile _tmp42_;
		ValaCCodeExpression* length_expr = NULL;
		ValaCCodeIdentifier* _tmp57_;
		ValaCCodeBinaryOperator length_check_op = 0;
		gboolean _tmp58_ = FALSE;
		ValaDataType* _tmp59_;
		ValaDataType* _tmp60_;
		ValaTypeSymbol* _tmp61_;
		ValaTypeSymbol* _tmp62_;
		ValaCCodeFunctionCall* _tmp71_;
		ValaCCodeExpression* _tmp72_;
		ValaCodeContext* _tmp73_;
		ValaCodeContext* _tmp74_;
		ValaProfile _tmp75_;
		ValaProfile _tmp76_;
		ValaCCodeBinaryExpression* length_check = NULL;
		ValaCCodeIdentifier* _tmp90_;
		ValaCCodeIdentifier* _tmp91_;
		ValaCCodeConstant* _tmp92_;
		ValaCCodeConstant* _tmp93_;
		ValaCCodeBinaryExpression* _tmp94_;
		ValaCCodeBinaryExpression* _tmp95_;
		ValaCCodeFunction* _tmp96_;
		ValaCCodeFunction* _tmp97_;
		ValaCCodeBinaryExpression* _tmp98_;
		ValaCCodeFunction* _tmp99_;
		ValaCCodeFunction* _tmp100_;
		gchar* _tmp101_;
		gchar* _tmp102_;
		ValaCCodeVariableDeclarator* _tmp103_;
		ValaCCodeFunction* _tmp104_;
		ValaCCodeFunction* _tmp105_;
		ValaCCodeIdentifier* _tmp106_;
		ValaCCodeIdentifier* _tmp107_;
		ValaCCodeFunctionCall* _tmp108_;
		ValaCCodeFunction* _tmp109_;
		ValaCCodeFunction* _tmp110_;
		ValaDataType* _tmp111_;
		gchar* _tmp112_;
		gchar* _tmp113_;
		ValaCCodeVariableDeclarator* _tmp114_;
		ValaCCodeVariableDeclarator* _tmp115_;
		ValaCCodeFunction* _tmp116_;
		ValaCCodeFunction* _tmp117_;
		ValaCCodeIdentifier* _tmp118_;
		ValaCCodeIdentifier* _tmp119_;
		ValaCCodeConstant* _tmp120_;
		ValaCCodeConstant* _tmp121_;
		ValaCCodeAssignment* _tmp122_;
		ValaCCodeAssignment* _tmp123_;
		ValaCCodeIdentifier* _tmp124_;
		ValaCCodeIdentifier* _tmp125_;
		ValaCCodeIdentifier* _tmp126_;
		ValaCCodeIdentifier* _tmp127_;
		ValaCCodeBinaryExpression* _tmp128_;
		ValaCCodeBinaryExpression* _tmp129_;
		ValaCCodeIdentifier* _tmp130_;
		ValaCCodeIdentifier* _tmp131_;
		ValaCCodeUnaryExpression* _tmp132_;
		ValaCCodeUnaryExpression* _tmp133_;
		ValaCCodeFunction* _tmp134_;
		ValaCCodeFunction* _tmp135_;
		ValaCCodeIdentifier* _tmp136_;
		ValaCCodeIdentifier* _tmp137_;
		ValaCCodeIdentifier* _tmp138_;
		ValaCCodeIdentifier* _tmp139_;
		ValaCCodeElementAccess* _tmp140_;
		ValaCCodeElementAccess* _tmp141_;
		ValaDataType* _tmp142_;
		ValaDataType* _tmp143_;
		ValaCCodeIdentifier* _tmp144_;
		ValaCCodeIdentifier* _tmp145_;
		ValaCCodeIdentifier* _tmp146_;
		ValaCCodeIdentifier* _tmp147_;
		ValaCCodeElementAccess* _tmp148_;
		ValaCCodeElementAccess* _tmp149_;
		ValaGLibValue* _tmp150_;
		ValaGLibValue* _tmp151_;
		ValaTargetValue* _tmp152_;
		ValaTargetValue* _tmp153_;
		ValaCCodeExpression* _tmp154_;
		ValaCCodeFunction* _tmp155_;
		ValaCCodeFunction* _tmp156_;
		ValaCCodeFunction* _tmp157_;
		ValaCCodeFunction* _tmp158_;
		ValaCCodeIdentifier* _tmp159_;
		ValaCCodeIdentifier* _tmp160_;
		ValaCCodeFunction* _tmp161_;
		ValaCCodeFunction* _tmp162_;
		ValaCCodeFunction* _tmp163_;
		ValaCCodeFunction* _tmp164_;
		ValaCCodeConstant* _tmp165_;
		ValaCCodeConstant* _tmp166_;
		_tmp38_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
		cvardecl = _tmp38_;
		_tmp39_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp40_ = _tmp39_;
		_tmp41_ = vala_code_context_get_profile (_tmp40_);
		_tmp42_ = _tmp41_;
		if (_tmp42_ == VALA_PROFILE_POSIX) {
			ValaCCodeFile* _tmp43_;
			ValaCCodeIdentifier* _tmp44_;
			ValaCCodeIdentifier* _tmp45_;
			ValaCCodeFunctionCall* _tmp46_;
			_tmp43_ = ((ValaCCodeBaseModule*) self)->cfile;
			vala_ccode_file_add_include (_tmp43_, "stdlib.h", FALSE);
			_tmp44_ = vala_ccode_identifier_new ("calloc");
			_tmp45_ = _tmp44_;
			_tmp46_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp45_);
			_vala_ccode_node_unref0 (gnew);
			gnew = _tmp46_;
			_vala_ccode_node_unref0 (_tmp45_);
		} else {
			ValaCCodeIdentifier* _tmp47_;
			ValaCCodeIdentifier* _tmp48_;
			ValaCCodeFunctionCall* _tmp49_;
			ValaCCodeFunctionCall* _tmp50_;
			ValaDataType* _tmp51_;
			ValaDataType* _tmp52_;
			gchar* _tmp53_;
			gchar* _tmp54_;
			ValaCCodeIdentifier* _tmp55_;
			ValaCCodeIdentifier* _tmp56_;
			_tmp47_ = vala_ccode_identifier_new ("g_new0");
			_tmp48_ = _tmp47_;
			_tmp49_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp48_);
			_vala_ccode_node_unref0 (gnew);
			gnew = _tmp49_;
			_vala_ccode_node_unref0 (_tmp48_);
			_tmp50_ = gnew;
			_tmp51_ = vala_array_type_get_element_type (array_type);
			_tmp52_ = _tmp51_;
			_tmp53_ = vala_get_ccode_name ((ValaCodeNode*) _tmp52_);
			_tmp54_ = _tmp53_;
			_tmp55_ = vala_ccode_identifier_new (_tmp54_);
			_tmp56_ = _tmp55_;
			vala_ccode_function_call_add_argument (_tmp50_, (ValaCCodeExpression*) _tmp56_);
			_vala_ccode_node_unref0 (_tmp56_);
			_g_free0 (_tmp54_);
		}
		_tmp57_ = vala_ccode_identifier_new ("length");
		length_expr = (ValaCCodeExpression*) _tmp57_;
		_tmp59_ = vala_array_type_get_element_type (array_type);
		_tmp60_ = _tmp59_;
		_tmp61_ = vala_data_type_get_type_symbol (_tmp60_);
		_tmp62_ = _tmp61_;
		if (_tmp62_ != NULL) {
			ValaDataType* _tmp63_;
			ValaDataType* _tmp64_;
			ValaTypeSymbol* _tmp65_;
			ValaTypeSymbol* _tmp66_;
			_tmp63_ = vala_array_type_get_element_type (array_type);
			_tmp64_ = _tmp63_;
			_tmp65_ = vala_data_type_get_type_symbol (_tmp64_);
			_tmp66_ = _tmp65_;
			_tmp58_ = vala_typesymbol_is_reference_type (_tmp66_);
		} else {
			_tmp58_ = FALSE;
		}
		if (_tmp58_) {
			ValaCCodeExpression* _tmp67_;
			ValaCCodeConstant* _tmp68_;
			ValaCCodeConstant* _tmp69_;
			ValaCCodeBinaryExpression* _tmp70_;
			_tmp67_ = length_expr;
			_tmp68_ = vala_ccode_constant_new ("1");
			_tmp69_ = _tmp68_;
			_tmp70_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp67_, (ValaCCodeExpression*) _tmp69_);
			_vala_ccode_node_unref0 (length_expr);
			length_expr = (ValaCCodeExpression*) _tmp70_;
			_vala_ccode_node_unref0 (_tmp69_);
			length_check_op = VALA_CCODE_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL;
		} else {
			length_check_op = VALA_CCODE_BINARY_OPERATOR_GREATER_THAN;
		}
		_tmp71_ = gnew;
		_tmp72_ = length_expr;
		vala_ccode_function_call_add_argument (_tmp71_, _tmp72_);
		_tmp73_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp74_ = _tmp73_;
		_tmp75_ = vala_code_context_get_profile (_tmp74_);
		_tmp76_ = _tmp75_;
		if (_tmp76_ == VALA_PROFILE_POSIX) {
			ValaCCodeFunctionCall* csizeof = NULL;
			ValaCCodeIdentifier* _tmp77_;
			ValaCCodeIdentifier* _tmp78_;
			ValaCCodeFunctionCall* _tmp79_;
			ValaCCodeFunctionCall* _tmp80_;
			ValaCCodeFunctionCall* _tmp81_;
			ValaDataType* _tmp82_;
			ValaDataType* _tmp83_;
			gchar* _tmp84_;
			gchar* _tmp85_;
			ValaCCodeIdentifier* _tmp86_;
			ValaCCodeIdentifier* _tmp87_;
			ValaCCodeFunctionCall* _tmp88_;
			ValaCCodeFunctionCall* _tmp89_;
			_tmp77_ = vala_ccode_identifier_new ("sizeof");
			_tmp78_ = _tmp77_;
			_tmp79_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp78_);
			_tmp80_ = _tmp79_;
			_vala_ccode_node_unref0 (_tmp78_);
			csizeof = _tmp80_;
			_tmp81_ = csizeof;
			_tmp82_ = vala_array_type_get_element_type (array_type);
			_tmp83_ = _tmp82_;
			_tmp84_ = vala_get_ccode_name ((ValaCodeNode*) _tmp83_);
			_tmp85_ = _tmp84_;
			_tmp86_ = vala_ccode_identifier_new (_tmp85_);
			_tmp87_ = _tmp86_;
			vala_ccode_function_call_add_argument (_tmp81_, (ValaCCodeExpression*) _tmp87_);
			_vala_ccode_node_unref0 (_tmp87_);
			_g_free0 (_tmp85_);
			_tmp88_ = gnew;
			_tmp89_ = csizeof;
			vala_ccode_function_call_add_argument (_tmp88_, (ValaCCodeExpression*) _tmp89_);
			_vala_ccode_node_unref0 (csizeof);
		}
		_tmp90_ = vala_ccode_identifier_new ("length");
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_ccode_constant_new ("0");
		_tmp93_ = _tmp92_;
		_tmp94_ = vala_ccode_binary_expression_new (length_check_op, (ValaCCodeExpression*) _tmp91_, (ValaCCodeExpression*) _tmp93_);
		_tmp95_ = _tmp94_;
		_vala_ccode_node_unref0 (_tmp93_);
		_vala_ccode_node_unref0 (_tmp91_);
		length_check = _tmp95_;
		_tmp96_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp97_ = _tmp96_;
		_tmp98_ = length_check;
		vala_ccode_function_open_if (_tmp97_, (ValaCCodeExpression*) _tmp98_);
		_tmp99_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp100_ = _tmp99_;
		_tmp101_ = vala_get_ccode_name ((ValaCodeNode*) array_type);
		_tmp102_ = _tmp101_;
		_tmp103_ = cvardecl;
		vala_ccode_function_add_declaration (_tmp100_, _tmp102_, (ValaCCodeDeclarator*) _tmp103_, 0);
		_g_free0 (_tmp102_);
		_tmp104_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp105_ = _tmp104_;
		_tmp106_ = vala_ccode_identifier_new ("result");
		_tmp107_ = _tmp106_;
		_tmp108_ = gnew;
		vala_ccode_function_add_assignment (_tmp105_, (ValaCCodeExpression*) _tmp107_, (ValaCCodeExpression*) _tmp108_);
		_vala_ccode_node_unref0 (_tmp107_);
		_tmp109_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp110_ = _tmp109_;
		_tmp111_ = ((ValaCCodeBaseModule*) self)->ssize_t_type;
		_tmp112_ = vala_get_ccode_name ((ValaCodeNode*) _tmp111_);
		_tmp113_ = _tmp112_;
		_tmp114_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
		_tmp115_ = _tmp114_;
		vala_ccode_function_add_declaration (_tmp110_, _tmp113_, (ValaCCodeDeclarator*) _tmp115_, 0);
		_vala_ccode_node_unref0 (_tmp115_);
		_g_free0 (_tmp113_);
		_tmp116_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp117_ = _tmp116_;
		_tmp118_ = vala_ccode_identifier_new ("i");
		_tmp119_ = _tmp118_;
		_tmp120_ = vala_ccode_constant_new ("0");
		_tmp121_ = _tmp120_;
		_tmp122_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp119_, (ValaCCodeExpression*) _tmp121_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp123_ = _tmp122_;
		_tmp124_ = vala_ccode_identifier_new ("i");
		_tmp125_ = _tmp124_;
		_tmp126_ = vala_ccode_identifier_new ("length");
		_tmp127_ = _tmp126_;
		_tmp128_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp125_, (ValaCCodeExpression*) _tmp127_);
		_tmp129_ = _tmp128_;
		_tmp130_ = vala_ccode_identifier_new ("i");
		_tmp131_ = _tmp130_;
		_tmp132_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp131_);
		_tmp133_ = _tmp132_;
		vala_ccode_function_open_for (_tmp117_, (ValaCCodeExpression*) _tmp123_, (ValaCCodeExpression*) _tmp129_, (ValaCCodeExpression*) _tmp133_);
		_vala_ccode_node_unref0 (_tmp133_);
		_vala_ccode_node_unref0 (_tmp131_);
		_vala_ccode_node_unref0 (_tmp129_);
		_vala_ccode_node_unref0 (_tmp127_);
		_vala_ccode_node_unref0 (_tmp125_);
		_vala_ccode_node_unref0 (_tmp123_);
		_vala_ccode_node_unref0 (_tmp121_);
		_vala_ccode_node_unref0 (_tmp119_);
		_tmp134_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp135_ = _tmp134_;
		_tmp136_ = vala_ccode_identifier_new ("result");
		_tmp137_ = _tmp136_;
		_tmp138_ = vala_ccode_identifier_new ("i");
		_tmp139_ = _tmp138_;
		_tmp140_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp137_, (ValaCCodeExpression*) _tmp139_);
		_tmp141_ = _tmp140_;
		_tmp142_ = vala_array_type_get_element_type (array_type);
		_tmp143_ = _tmp142_;
		_tmp144_ = vala_ccode_identifier_new ("self");
		_tmp145_ = _tmp144_;
		_tmp146_ = vala_ccode_identifier_new ("i");
		_tmp147_ = _tmp146_;
		_tmp148_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp145_, (ValaCCodeExpression*) _tmp147_);
		_tmp149_ = _tmp148_;
		_tmp150_ = vala_glib_value_new (_tmp143_, (ValaCCodeExpression*) _tmp149_, TRUE);
		_tmp151_ = _tmp150_;
		_tmp152_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp151_, (ValaCodeNode*) array_type);
		_tmp153_ = _tmp152_;
		_tmp154_ = vala_get_cvalue_ (_tmp153_);
		vala_ccode_function_add_assignment (_tmp135_, (ValaCCodeExpression*) _tmp141_, _tmp154_);
		_vala_target_value_unref0 (_tmp153_);
		_vala_target_value_unref0 (_tmp151_);
		_vala_ccode_node_unref0 (_tmp149_);
		_vala_ccode_node_unref0 (_tmp147_);
		_vala_ccode_node_unref0 (_tmp145_);
		_vala_ccode_node_unref0 (_tmp141_);
		_vala_ccode_node_unref0 (_tmp139_);
		_vala_ccode_node_unref0 (_tmp137_);
		_tmp155_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp156_ = _tmp155_;
		vala_ccode_function_close (_tmp156_);
		_tmp157_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp158_ = _tmp157_;
		_tmp159_ = vala_ccode_identifier_new ("result");
		_tmp160_ = _tmp159_;
		vala_ccode_function_add_return (_tmp158_, (ValaCCodeExpression*) _tmp160_);
		_vala_ccode_node_unref0 (_tmp160_);
		_tmp161_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp162_ = _tmp161_;
		vala_ccode_function_close (_tmp162_);
		_tmp163_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp164_ = _tmp163_;
		_tmp165_ = vala_ccode_constant_new ("NULL");
		_tmp166_ = _tmp165_;
		vala_ccode_function_add_return (_tmp164_, (ValaCCodeExpression*) _tmp166_);
		_vala_ccode_node_unref0 (_tmp166_);
		_vala_ccode_node_unref0 (length_check);
		_vala_ccode_node_unref0 (length_expr);
		_vala_ccode_node_unref0 (gnew);
		_vala_ccode_node_unref0 (cvardecl);
	} else {
		ValaCCodeBinaryExpression* length_check = NULL;
		ValaCCodeIdentifier* _tmp167_;
		ValaCCodeIdentifier* _tmp168_;
		ValaCCodeConstant* _tmp169_;
		ValaCCodeConstant* _tmp170_;
		ValaCCodeBinaryExpression* _tmp171_;
		ValaCCodeBinaryExpression* _tmp172_;
		ValaCCodeFunction* _tmp173_;
		ValaCCodeFunction* _tmp174_;
		ValaCCodeBinaryExpression* _tmp175_;
		ValaCCodeFunctionCall* sizeof_call = NULL;
		ValaCCodeIdentifier* _tmp176_;
		ValaCCodeIdentifier* _tmp177_;
		ValaCCodeFunctionCall* _tmp178_;
		ValaCCodeFunctionCall* _tmp179_;
		ValaCCodeFunctionCall* _tmp180_;
		ValaDataType* _tmp181_;
		ValaDataType* _tmp182_;
		gchar* _tmp183_;
		gchar* _tmp184_;
		ValaCCodeIdentifier* _tmp185_;
		ValaCCodeIdentifier* _tmp186_;
		ValaCCodeIdentifier* length_expr = NULL;
		ValaCCodeIdentifier* _tmp187_;
		ValaCodeContext* _tmp188_;
		ValaCodeContext* _tmp189_;
		ValaProfile _tmp190_;
		ValaProfile _tmp191_;
		ValaCCodeFunction* _tmp254_;
		ValaCCodeFunction* _tmp255_;
		ValaCCodeFunction* _tmp256_;
		ValaCCodeFunction* _tmp257_;
		ValaCCodeConstant* _tmp258_;
		ValaCCodeConstant* _tmp259_;
		_tmp167_ = vala_ccode_identifier_new ("length");
		_tmp168_ = _tmp167_;
		_tmp169_ = vala_ccode_constant_new ("0");
		_tmp170_ = _tmp169_;
		_tmp171_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_GREATER_THAN, (ValaCCodeExpression*) _tmp168_, (ValaCCodeExpression*) _tmp170_);
		_tmp172_ = _tmp171_;
		_vala_ccode_node_unref0 (_tmp170_);
		_vala_ccode_node_unref0 (_tmp168_);
		length_check = _tmp172_;
		_tmp173_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp174_ = _tmp173_;
		_tmp175_ = length_check;
		vala_ccode_function_open_if (_tmp174_, (ValaCCodeExpression*) _tmp175_);
		_tmp176_ = vala_ccode_identifier_new ("sizeof");
		_tmp177_ = _tmp176_;
		_tmp178_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp177_);
		_tmp179_ = _tmp178_;
		_vala_ccode_node_unref0 (_tmp177_);
		sizeof_call = _tmp179_;
		_tmp180_ = sizeof_call;
		_tmp181_ = vala_array_type_get_element_type (array_type);
		_tmp182_ = _tmp181_;
		_tmp183_ = vala_get_ccode_name ((ValaCodeNode*) _tmp182_);
		_tmp184_ = _tmp183_;
		_tmp185_ = vala_ccode_identifier_new (_tmp184_);
		_tmp186_ = _tmp185_;
		vala_ccode_function_call_add_argument (_tmp180_, (ValaCCodeExpression*) _tmp186_);
		_vala_ccode_node_unref0 (_tmp186_);
		_g_free0 (_tmp184_);
		_tmp187_ = vala_ccode_identifier_new ("length");
		length_expr = _tmp187_;
		_tmp188_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp189_ = _tmp188_;
		_tmp190_ = vala_code_context_get_profile (_tmp189_);
		_tmp191_ = _tmp190_;
		if (_tmp191_ == VALA_PROFILE_POSIX) {
			ValaCCodeFile* _tmp192_;
			ValaCCodeFile* _tmp193_;
			ValaCCodeFunctionCall* alloc = NULL;
			ValaCCodeIdentifier* _tmp194_;
			ValaCCodeIdentifier* _tmp195_;
			ValaCCodeFunctionCall* _tmp196_;
			ValaCCodeFunctionCall* _tmp197_;
			ValaCCodeFunctionCall* _tmp198_;
			ValaCCodeIdentifier* _tmp199_;
			ValaCCodeFunctionCall* _tmp200_;
			ValaCCodeFunctionCall* _tmp201_;
			ValaCCodeVariableDeclarator* cvardecl = NULL;
			ValaCCodeVariableDeclarator* _tmp202_;
			ValaCCodeFunction* _tmp203_;
			ValaCCodeFunction* _tmp204_;
			gchar* _tmp205_;
			gchar* _tmp206_;
			ValaCCodeVariableDeclarator* _tmp207_;
			ValaCCodeFunction* _tmp208_;
			ValaCCodeFunction* _tmp209_;
			ValaCCodeIdentifier* _tmp210_;
			ValaCCodeIdentifier* _tmp211_;
			ValaCCodeFunctionCall* _tmp212_;
			ValaCCodeFunctionCall* dup_call = NULL;
			ValaCCodeIdentifier* _tmp213_;
			ValaCCodeIdentifier* _tmp214_;
			ValaCCodeFunctionCall* _tmp215_;
			ValaCCodeFunctionCall* _tmp216_;
			ValaCCodeFunctionCall* _tmp217_;
			ValaCCodeIdentifier* _tmp218_;
			ValaCCodeIdentifier* _tmp219_;
			ValaCCodeFunctionCall* _tmp220_;
			ValaCCodeIdentifier* _tmp221_;
			ValaCCodeIdentifier* _tmp222_;
			ValaCCodeFunctionCall* _tmp223_;
			ValaCCodeIdentifier* _tmp224_;
			ValaCCodeFunctionCall* _tmp225_;
			ValaCCodeBinaryExpression* _tmp226_;
			ValaCCodeBinaryExpression* _tmp227_;
			ValaCCodeFunction* _tmp228_;
			ValaCCodeFunction* _tmp229_;
			ValaCCodeFunctionCall* _tmp230_;
			ValaCCodeFunction* _tmp231_;
			ValaCCodeFunction* _tmp232_;
			ValaCCodeIdentifier* _tmp233_;
			ValaCCodeIdentifier* _tmp234_;
			_tmp192_ = ((ValaCCodeBaseModule*) self)->cfile;
			vala_ccode_file_add_include (_tmp192_, "stdlib.h", FALSE);
			_tmp193_ = ((ValaCCodeBaseModule*) self)->cfile;
			vala_ccode_file_add_include (_tmp193_, "string.h", FALSE);
			_tmp194_ = vala_ccode_identifier_new ("calloc");
			_tmp195_ = _tmp194_;
			_tmp196_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp195_);
			_tmp197_ = _tmp196_;
			_vala_ccode_node_unref0 (_tmp195_);
			alloc = _tmp197_;
			_tmp198_ = alloc;
			_tmp199_ = length_expr;
			vala_ccode_function_call_add_argument (_tmp198_, (ValaCCodeExpression*) _tmp199_);
			_tmp200_ = alloc;
			_tmp201_ = sizeof_call;
			vala_ccode_function_call_add_argument (_tmp200_, (ValaCCodeExpression*) _tmp201_);
			_tmp202_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
			cvardecl = _tmp202_;
			_tmp203_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp204_ = _tmp203_;
			_tmp205_ = vala_get_ccode_name ((ValaCodeNode*) array_type);
			_tmp206_ = _tmp205_;
			_tmp207_ = cvardecl;
			vala_ccode_function_add_declaration (_tmp204_, _tmp206_, (ValaCCodeDeclarator*) _tmp207_, 0);
			_g_free0 (_tmp206_);
			_tmp208_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp209_ = _tmp208_;
			_tmp210_ = vala_ccode_identifier_new ("result");
			_tmp211_ = _tmp210_;
			_tmp212_ = alloc;
			vala_ccode_function_add_assignment (_tmp209_, (ValaCCodeExpression*) _tmp211_, (ValaCCodeExpression*) _tmp212_);
			_vala_ccode_node_unref0 (_tmp211_);
			_tmp213_ = vala_ccode_identifier_new ("memcpy");
			_tmp214_ = _tmp213_;
			_tmp215_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp214_);
			_tmp216_ = _tmp215_;
			_vala_ccode_node_unref0 (_tmp214_);
			dup_call = _tmp216_;
			_tmp217_ = dup_call;
			_tmp218_ = vala_ccode_identifier_new ("result");
			_tmp219_ = _tmp218_;
			vala_ccode_function_call_add_argument (_tmp217_, (ValaCCodeExpression*) _tmp219_);
			_vala_ccode_node_unref0 (_tmp219_);
			_tmp220_ = dup_call;
			_tmp221_ = vala_ccode_identifier_new ("self");
			_tmp222_ = _tmp221_;
			vala_ccode_function_call_add_argument (_tmp220_, (ValaCCodeExpression*) _tmp222_);
			_vala_ccode_node_unref0 (_tmp222_);
			_tmp223_ = dup_call;
			_tmp224_ = length_expr;
			_tmp225_ = sizeof_call;
			_tmp226_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp224_, (ValaCCodeExpression*) _tmp225_);
			_tmp227_ = _tmp226_;
			vala_ccode_function_call_add_argument (_tmp223_, (ValaCCodeExpression*) _tmp227_);
			_vala_ccode_node_unref0 (_tmp227_);
			_tmp228_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp229_ = _tmp228_;
			_tmp230_ = dup_call;
			vala_ccode_function_add_expression (_tmp229_, (ValaCCodeExpression*) _tmp230_);
			_tmp231_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp232_ = _tmp231_;
			_tmp233_ = vala_ccode_identifier_new ("result");
			_tmp234_ = _tmp233_;
			vala_ccode_function_add_return (_tmp232_, (ValaCCodeExpression*) _tmp234_);
			_vala_ccode_node_unref0 (_tmp234_);
			_vala_ccode_node_unref0 (dup_call);
			_vala_ccode_node_unref0 (cvardecl);
			_vala_ccode_node_unref0 (alloc);
		} else {
			ValaCCodeFunctionCall* dup_call = NULL;
			ValaCodeContext* _tmp235_;
			ValaCodeContext* _tmp236_;
			ValaCCodeFunctionCall* _tmp243_;
			ValaCCodeIdentifier* _tmp244_;
			ValaCCodeIdentifier* _tmp245_;
			ValaCCodeFunctionCall* _tmp246_;
			ValaCCodeIdentifier* _tmp247_;
			ValaCCodeFunctionCall* _tmp248_;
			ValaCCodeBinaryExpression* _tmp249_;
			ValaCCodeBinaryExpression* _tmp250_;
			ValaCCodeFunction* _tmp251_;
			ValaCCodeFunction* _tmp252_;
			ValaCCodeFunctionCall* _tmp253_;
			_tmp235_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
			_tmp236_ = _tmp235_;
			if (vala_code_context_require_glib_version (_tmp236_, 2, 68)) {
				ValaCCodeIdentifier* _tmp237_;
				ValaCCodeIdentifier* _tmp238_;
				ValaCCodeFunctionCall* _tmp239_;
				_tmp237_ = vala_ccode_identifier_new ("g_memdup2");
				_tmp238_ = _tmp237_;
				_tmp239_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp238_);
				_vala_ccode_node_unref0 (dup_call);
				dup_call = _tmp239_;
				_vala_ccode_node_unref0 (_tmp238_);
			} else {
				ValaCCodeIdentifier* _tmp240_;
				ValaCCodeIdentifier* _tmp241_;
				ValaCCodeFunctionCall* _tmp242_;
				((ValaCCodeBaseModule*) self)->requires_memdup2 = TRUE;
				_tmp240_ = vala_ccode_identifier_new ("_vala_memdup2");
				_tmp241_ = _tmp240_;
				_tmp242_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp241_);
				_vala_ccode_node_unref0 (dup_call);
				dup_call = _tmp242_;
				_vala_ccode_node_unref0 (_tmp241_);
			}
			_tmp243_ = dup_call;
			_tmp244_ = vala_ccode_identifier_new ("self");
			_tmp245_ = _tmp244_;
			vala_ccode_function_call_add_argument (_tmp243_, (ValaCCodeExpression*) _tmp245_);
			_vala_ccode_node_unref0 (_tmp245_);
			_tmp246_ = dup_call;
			_tmp247_ = length_expr;
			_tmp248_ = sizeof_call;
			_tmp249_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp247_, (ValaCCodeExpression*) _tmp248_);
			_tmp250_ = _tmp249_;
			vala_ccode_function_call_add_argument (_tmp246_, (ValaCCodeExpression*) _tmp250_);
			_vala_ccode_node_unref0 (_tmp250_);
			_tmp251_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp252_ = _tmp251_;
			_tmp253_ = dup_call;
			vala_ccode_function_add_return (_tmp252_, (ValaCCodeExpression*) _tmp253_);
			_vala_ccode_node_unref0 (dup_call);
		}
		_tmp254_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp255_ = _tmp254_;
		vala_ccode_function_close (_tmp255_);
		_tmp256_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp257_ = _tmp256_;
		_tmp258_ = vala_ccode_constant_new ("NULL");
		_tmp259_ = _tmp258_;
		vala_ccode_function_add_return (_tmp257_, (ValaCCodeExpression*) _tmp259_);
		_vala_ccode_node_unref0 (_tmp259_);
		_vala_ccode_node_unref0 (length_expr);
		_vala_ccode_node_unref0 (sizeof_call);
		_vala_ccode_node_unref0 (length_check);
	}
	_tmp260_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp261_ = function;
	vala_ccode_file_add_function_declaration (_tmp260_, _tmp261_);
	_tmp262_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp263_ = function;
	vala_ccode_file_add_function (_tmp262_, _tmp263_);
	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* dup_func = NULL;
	gint _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	ValaCCodeFunction* function = NULL;
	const gchar* _tmp3_;
	ValaCCodeFunction* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaCCodeFunction* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	ValaCCodeParameter* _tmp11_;
	ValaCCodeParameter* _tmp12_;
	ValaCCodeFunction* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	ValaCCodeParameter* _tmp18_;
	ValaCCodeParameter* _tmp19_;
	ValaCCodeBaseModuleEmitContext* _tmp20_;
	ValaCCodeBaseModuleEmitContext* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaDataType* _tmp23_;
	ValaDataType* _tmp24_;
	ValaCCodeFile* _tmp107_;
	ValaCCodeFunction* _tmp108_;
	ValaCCodeFile* _tmp109_;
	ValaCCodeFunction* _tmp110_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (array_type != NULL, NULL);
	self->priv->next_array_dup_id = self->priv->next_array_dup_id + 1;
	_tmp0_ = self->priv->next_array_dup_id;
	_tmp1_ = g_strdup_printf ("_vala_array_copy%d", _tmp0_);
	dup_func = _tmp1_;
	_tmp2_ = dup_func;
	if (!vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp2_)) {
		result = dup_func;
		return result;
	}
	_tmp3_ = dup_func;
	_tmp4_ = vala_ccode_function_new (_tmp3_, "void");
	function = _tmp4_;
	_tmp5_ = function;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp5_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp6_ = function;
	_tmp7_ = vala_get_ccode_name ((ValaCodeNode*) array_type);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup_printf ("%s *", _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_ccode_parameter_new ("self", _tmp10_);
	_tmp12_ = _tmp11_;
	vala_ccode_function_add_parameter (_tmp6_, _tmp12_);
	_vala_ccode_node_unref0 (_tmp12_);
	_g_free0 (_tmp10_);
	_g_free0 (_tmp8_);
	_tmp13_ = function;
	_tmp14_ = vala_get_ccode_name ((ValaCodeNode*) array_type);
	_tmp15_ = _tmp14_;
	_tmp16_ = g_strdup_printf ("%s *", _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = vala_ccode_parameter_new ("dest", _tmp17_);
	_tmp19_ = _tmp18_;
	vala_ccode_function_add_parameter (_tmp13_, _tmp19_);
	_vala_ccode_node_unref0 (_tmp19_);
	_g_free0 (_tmp17_);
	_g_free0 (_tmp15_);
	_tmp20_ = vala_ccode_base_module_emit_context_new (NULL);
	_tmp21_ = _tmp20_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp21_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp21_);
	_tmp22_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp22_);
	_tmp23_ = vala_array_type_get_element_type (array_type);
	_tmp24_ = _tmp23_;
	if (vala_ccode_base_module_requires_copy (_tmp24_)) {
		ValaCCodeFunction* _tmp25_;
		ValaCCodeFunction* _tmp26_;
		ValaDataType* _tmp27_;
		ValaDataType* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		ValaCCodeVariableDeclarator* _tmp31_;
		ValaCCodeVariableDeclarator* _tmp32_;
		ValaCCodeFunction* _tmp33_;
		ValaCCodeFunction* _tmp34_;
		ValaCCodeIdentifier* _tmp35_;
		ValaCCodeIdentifier* _tmp36_;
		ValaCCodeConstant* _tmp37_;
		ValaCCodeConstant* _tmp38_;
		ValaCCodeAssignment* _tmp39_;
		ValaCCodeAssignment* _tmp40_;
		ValaCCodeIdentifier* _tmp41_;
		ValaCCodeIdentifier* _tmp42_;
		ValaExpression* _tmp43_;
		ValaExpression* _tmp44_;
		ValaCCodeExpression* _tmp45_;
		ValaCCodeExpression* _tmp46_;
		ValaCCodeBinaryExpression* _tmp47_;
		ValaCCodeBinaryExpression* _tmp48_;
		ValaCCodeIdentifier* _tmp49_;
		ValaCCodeIdentifier* _tmp50_;
		ValaCCodeUnaryExpression* _tmp51_;
		ValaCCodeUnaryExpression* _tmp52_;
		ValaCCodeFunction* _tmp53_;
		ValaCCodeFunction* _tmp54_;
		ValaCCodeIdentifier* _tmp55_;
		ValaCCodeIdentifier* _tmp56_;
		ValaCCodeIdentifier* _tmp57_;
		ValaCCodeIdentifier* _tmp58_;
		ValaCCodeElementAccess* _tmp59_;
		ValaCCodeElementAccess* _tmp60_;
		ValaDataType* _tmp61_;
		ValaDataType* _tmp62_;
		ValaCCodeIdentifier* _tmp63_;
		ValaCCodeIdentifier* _tmp64_;
		ValaCCodeIdentifier* _tmp65_;
		ValaCCodeIdentifier* _tmp66_;
		ValaCCodeElementAccess* _tmp67_;
		ValaCCodeElementAccess* _tmp68_;
		ValaGLibValue* _tmp69_;
		ValaGLibValue* _tmp70_;
		ValaTargetValue* _tmp71_;
		ValaTargetValue* _tmp72_;
		ValaCCodeExpression* _tmp73_;
		_tmp25_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp26_ = _tmp25_;
		_tmp27_ = vala_array_type_get_length_type (array_type);
		_tmp28_ = _tmp27_;
		_tmp29_ = vala_get_ccode_name ((ValaCodeNode*) _tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = vala_ccode_variable_declarator_new ("i", NULL, NULL);
		_tmp32_ = _tmp31_;
		vala_ccode_function_add_declaration (_tmp26_, _tmp30_, (ValaCCodeDeclarator*) _tmp32_, 0);
		_vala_ccode_node_unref0 (_tmp32_);
		_g_free0 (_tmp30_);
		_tmp33_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp34_ = _tmp33_;
		_tmp35_ = vala_ccode_identifier_new ("i");
		_tmp36_ = _tmp35_;
		_tmp37_ = vala_ccode_constant_new ("0");
		_tmp38_ = _tmp37_;
		_tmp39_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp36_, (ValaCCodeExpression*) _tmp38_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp40_ = _tmp39_;
		_tmp41_ = vala_ccode_identifier_new ("i");
		_tmp42_ = _tmp41_;
		_tmp43_ = vala_array_type_get_length (array_type);
		_tmp44_ = _tmp43_;
		_tmp45_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp44_);
		_tmp46_ = _tmp45_;
		_tmp47_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp42_, _tmp46_);
		_tmp48_ = _tmp47_;
		_tmp49_ = vala_ccode_identifier_new ("i");
		_tmp50_ = _tmp49_;
		_tmp51_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp50_);
		_tmp52_ = _tmp51_;
		vala_ccode_function_open_for (_tmp34_, (ValaCCodeExpression*) _tmp40_, (ValaCCodeExpression*) _tmp48_, (ValaCCodeExpression*) _tmp52_);
		_vala_ccode_node_unref0 (_tmp52_);
		_vala_ccode_node_unref0 (_tmp50_);
		_vala_ccode_node_unref0 (_tmp48_);
		_vala_ccode_node_unref0 (_tmp46_);
		_vala_ccode_node_unref0 (_tmp42_);
		_vala_ccode_node_unref0 (_tmp40_);
		_vala_ccode_node_unref0 (_tmp38_);
		_vala_ccode_node_unref0 (_tmp36_);
		_tmp53_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp54_ = _tmp53_;
		_tmp55_ = vala_ccode_identifier_new ("dest");
		_tmp56_ = _tmp55_;
		_tmp57_ = vala_ccode_identifier_new ("i");
		_tmp58_ = _tmp57_;
		_tmp59_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp56_, (ValaCCodeExpression*) _tmp58_);
		_tmp60_ = _tmp59_;
		_tmp61_ = vala_array_type_get_element_type (array_type);
		_tmp62_ = _tmp61_;
		_tmp63_ = vala_ccode_identifier_new ("self");
		_tmp64_ = _tmp63_;
		_tmp65_ = vala_ccode_identifier_new ("i");
		_tmp66_ = _tmp65_;
		_tmp67_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp64_, (ValaCCodeExpression*) _tmp66_);
		_tmp68_ = _tmp67_;
		_tmp69_ = vala_glib_value_new (_tmp62_, (ValaCCodeExpression*) _tmp68_, TRUE);
		_tmp70_ = _tmp69_;
		_tmp71_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp70_, (ValaCodeNode*) array_type);
		_tmp72_ = _tmp71_;
		_tmp73_ = vala_get_cvalue_ (_tmp72_);
		vala_ccode_function_add_assignment (_tmp54_, (ValaCCodeExpression*) _tmp60_, _tmp73_);
		_vala_target_value_unref0 (_tmp72_);
		_vala_target_value_unref0 (_tmp70_);
		_vala_ccode_node_unref0 (_tmp68_);
		_vala_ccode_node_unref0 (_tmp66_);
		_vala_ccode_node_unref0 (_tmp64_);
		_vala_ccode_node_unref0 (_tmp60_);
		_vala_ccode_node_unref0 (_tmp58_);
		_vala_ccode_node_unref0 (_tmp56_);
	} else {
		ValaCCodeFile* _tmp74_;
		ValaCCodeFunctionCall* dup_call = NULL;
		ValaCCodeIdentifier* _tmp75_;
		ValaCCodeIdentifier* _tmp76_;
		ValaCCodeFunctionCall* _tmp77_;
		ValaCCodeFunctionCall* _tmp78_;
		ValaCCodeFunctionCall* _tmp79_;
		ValaCCodeIdentifier* _tmp80_;
		ValaCCodeIdentifier* _tmp81_;
		ValaCCodeFunctionCall* _tmp82_;
		ValaCCodeIdentifier* _tmp83_;
		ValaCCodeIdentifier* _tmp84_;
		ValaCCodeFunctionCall* sizeof_call = NULL;
		ValaCCodeIdentifier* _tmp85_;
		ValaCCodeIdentifier* _tmp86_;
		ValaCCodeFunctionCall* _tmp87_;
		ValaCCodeFunctionCall* _tmp88_;
		ValaCCodeFunctionCall* _tmp89_;
		ValaDataType* _tmp90_;
		ValaDataType* _tmp91_;
		gchar* _tmp92_;
		gchar* _tmp93_;
		ValaCCodeIdentifier* _tmp94_;
		ValaCCodeIdentifier* _tmp95_;
		ValaCCodeFunctionCall* _tmp96_;
		ValaExpression* _tmp97_;
		ValaExpression* _tmp98_;
		ValaCCodeExpression* _tmp99_;
		ValaCCodeExpression* _tmp100_;
		ValaCCodeFunctionCall* _tmp101_;
		ValaCCodeBinaryExpression* _tmp102_;
		ValaCCodeBinaryExpression* _tmp103_;
		ValaCCodeFunction* _tmp104_;
		ValaCCodeFunction* _tmp105_;
		ValaCCodeFunctionCall* _tmp106_;
		_tmp74_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp74_, "string.h", FALSE);
		_tmp75_ = vala_ccode_identifier_new ("memcpy");
		_tmp76_ = _tmp75_;
		_tmp77_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp76_);
		_tmp78_ = _tmp77_;
		_vala_ccode_node_unref0 (_tmp76_);
		dup_call = _tmp78_;
		_tmp79_ = dup_call;
		_tmp80_ = vala_ccode_identifier_new ("dest");
		_tmp81_ = _tmp80_;
		vala_ccode_function_call_add_argument (_tmp79_, (ValaCCodeExpression*) _tmp81_);
		_vala_ccode_node_unref0 (_tmp81_);
		_tmp82_ = dup_call;
		_tmp83_ = vala_ccode_identifier_new ("self");
		_tmp84_ = _tmp83_;
		vala_ccode_function_call_add_argument (_tmp82_, (ValaCCodeExpression*) _tmp84_);
		_vala_ccode_node_unref0 (_tmp84_);
		_tmp85_ = vala_ccode_identifier_new ("sizeof");
		_tmp86_ = _tmp85_;
		_tmp87_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp86_);
		_tmp88_ = _tmp87_;
		_vala_ccode_node_unref0 (_tmp86_);
		sizeof_call = _tmp88_;
		_tmp89_ = sizeof_call;
		_tmp90_ = vala_array_type_get_element_type (array_type);
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_get_ccode_name ((ValaCodeNode*) _tmp91_);
		_tmp93_ = _tmp92_;
		_tmp94_ = vala_ccode_identifier_new (_tmp93_);
		_tmp95_ = _tmp94_;
		vala_ccode_function_call_add_argument (_tmp89_, (ValaCCodeExpression*) _tmp95_);
		_vala_ccode_node_unref0 (_tmp95_);
		_g_free0 (_tmp93_);
		_tmp96_ = dup_call;
		_tmp97_ = vala_array_type_get_length (array_type);
		_tmp98_ = _tmp97_;
		_tmp99_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp98_);
		_tmp100_ = _tmp99_;
		_tmp101_ = sizeof_call;
		_tmp102_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp100_, (ValaCCodeExpression*) _tmp101_);
		_tmp103_ = _tmp102_;
		vala_ccode_function_call_add_argument (_tmp96_, (ValaCCodeExpression*) _tmp103_);
		_vala_ccode_node_unref0 (_tmp103_);
		_vala_ccode_node_unref0 (_tmp100_);
		_tmp104_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp105_ = _tmp104_;
		_tmp106_ = dup_call;
		vala_ccode_function_add_expression (_tmp105_, (ValaCCodeExpression*) _tmp106_);
		_vala_ccode_node_unref0 (sizeof_call);
		_vala_ccode_node_unref0 (dup_call);
	}
	_tmp107_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp108_ = function;
	vala_ccode_file_add_function_declaration (_tmp107_, _tmp108_);
	_tmp109_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp110_ = function;
	vala_ccode_file_add_function (_tmp109_, _tmp110_);
	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* add_func = NULL;
	gint _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	ValaCCodeFunction* function = NULL;
	const gchar* _tmp3_;
	ValaCCodeFunction* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaCCodeFunction* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	ValaCCodeParameter* _tmp11_;
	ValaCCodeParameter* _tmp12_;
	ValaCCodeFunction* _tmp13_;
	ValaDataType* _tmp14_;
	ValaDataType* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	ValaCCodeParameter* _tmp20_;
	ValaCCodeParameter* _tmp21_;
	ValaCCodeFunction* _tmp22_;
	ValaDataType* _tmp23_;
	ValaDataType* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	ValaCCodeParameter* _tmp29_;
	ValaCCodeParameter* _tmp30_;
	ValaCCodeFunction* _tmp31_;
	gchar* typename = NULL;
	ValaDataType* _tmp32_;
	ValaDataType* _tmp33_;
	gchar* _tmp34_;
	ValaCCodeExpression* value = NULL;
	ValaCCodeIdentifier* _tmp35_;
	ValaDataType* _tmp36_;
	ValaDataType* _tmp37_;
	ValaCCodeFunction* _tmp57_;
	const gchar* _tmp58_;
	ValaCCodeParameter* _tmp59_;
	ValaCCodeParameter* _tmp60_;
	ValaCCodeUnaryExpression* array = NULL;
	ValaCCodeIdentifier* _tmp61_;
	ValaCCodeIdentifier* _tmp62_;
	ValaCCodeUnaryExpression* _tmp63_;
	ValaCCodeUnaryExpression* _tmp64_;
	ValaCCodeUnaryExpression* length = NULL;
	ValaCCodeIdentifier* _tmp65_;
	ValaCCodeIdentifier* _tmp66_;
	ValaCCodeUnaryExpression* _tmp67_;
	ValaCCodeUnaryExpression* _tmp68_;
	ValaCCodeUnaryExpression* size = NULL;
	ValaCCodeIdentifier* _tmp69_;
	ValaCCodeIdentifier* _tmp70_;
	ValaCCodeUnaryExpression* _tmp71_;
	ValaCCodeUnaryExpression* _tmp72_;
	ValaCCodeFunctionCall* renew_call = NULL;
	ValaCodeContext* _tmp73_;
	ValaCodeContext* _tmp74_;
	ValaProfile _tmp75_;
	ValaProfile _tmp76_;
	ValaCCodeExpression* renew_call_size = NULL;
	ValaDataType* _tmp95_;
	ValaDataType* _tmp96_;
	ValaCodeContext* _tmp103_;
	ValaCodeContext* _tmp104_;
	ValaProfile _tmp105_;
	ValaProfile _tmp106_;
	ValaCCodeFunctionCall* _tmp121_;
	ValaCCodeExpression* _tmp122_;
	ValaCCodeBinaryExpression* csizecheck = NULL;
	ValaCCodeUnaryExpression* _tmp123_;
	ValaCCodeUnaryExpression* _tmp124_;
	ValaCCodeBinaryExpression* _tmp125_;
	ValaCCodeFunction* _tmp126_;
	ValaCCodeFunction* _tmp127_;
	ValaCCodeBinaryExpression* _tmp128_;
	ValaCCodeFunction* _tmp129_;
	ValaCCodeFunction* _tmp130_;
	ValaCCodeUnaryExpression* _tmp131_;
	ValaCCodeUnaryExpression* _tmp132_;
	ValaCCodeConstant* _tmp133_;
	ValaCCodeConstant* _tmp134_;
	ValaCCodeUnaryExpression* _tmp135_;
	ValaCCodeBinaryExpression* _tmp136_;
	ValaCCodeBinaryExpression* _tmp137_;
	ValaCCodeConstant* _tmp138_;
	ValaCCodeConstant* _tmp139_;
	ValaCCodeConditionalExpression* _tmp140_;
	ValaCCodeConditionalExpression* _tmp141_;
	ValaCCodeFunction* _tmp142_;
	ValaCCodeFunction* _tmp143_;
	ValaCCodeUnaryExpression* _tmp144_;
	ValaCCodeFunctionCall* _tmp145_;
	ValaCCodeFunction* _tmp146_;
	ValaCCodeFunction* _tmp147_;
	ValaCCodeFunction* _tmp148_;
	ValaCCodeFunction* _tmp149_;
	ValaCCodeUnaryExpression* _tmp150_;
	ValaCCodeUnaryExpression* _tmp151_;
	ValaCCodeUnaryExpression* _tmp152_;
	ValaCCodeUnaryExpression* _tmp153_;
	ValaCCodeElementAccess* _tmp154_;
	ValaCCodeElementAccess* _tmp155_;
	ValaCCodeExpression* _tmp156_;
	ValaDataType* _tmp157_;
	ValaDataType* _tmp158_;
	ValaCCodeFile* _tmp167_;
	ValaCCodeFunction* _tmp168_;
	ValaCCodeFile* _tmp169_;
	ValaCCodeFunction* _tmp170_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (array_type != NULL, NULL);
	self->priv->next_array_add_id = self->priv->next_array_add_id + 1;
	_tmp0_ = self->priv->next_array_add_id;
	_tmp1_ = g_strdup_printf ("_vala_array_add%d", _tmp0_);
	add_func = _tmp1_;
	_tmp2_ = add_func;
	if (!vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp2_)) {
		result = add_func;
		return result;
	}
	_tmp3_ = add_func;
	_tmp4_ = vala_ccode_function_new (_tmp3_, "void");
	function = _tmp4_;
	_tmp5_ = function;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp5_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp6_ = function;
	_tmp7_ = vala_get_ccode_name ((ValaCodeNode*) array_type);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup_printf ("%s *", _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_ccode_parameter_new ("array", _tmp10_);
	_tmp12_ = _tmp11_;
	vala_ccode_function_add_parameter (_tmp6_, _tmp12_);
	_vala_ccode_node_unref0 (_tmp12_);
	_g_free0 (_tmp10_);
	_g_free0 (_tmp8_);
	_tmp13_ = function;
	_tmp14_ = vala_array_type_get_length_type (array_type);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_get_ccode_name ((ValaCodeNode*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strdup_printf ("%s*", _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = vala_ccode_parameter_new ("length", _tmp19_);
	_tmp21_ = _tmp20_;
	vala_ccode_function_add_parameter (_tmp13_, _tmp21_);
	_vala_ccode_node_unref0 (_tmp21_);
	_g_free0 (_tmp19_);
	_g_free0 (_tmp17_);
	_tmp22_ = function;
	_tmp23_ = vala_array_type_get_length_type (array_type);
	_tmp24_ = _tmp23_;
	_tmp25_ = vala_get_ccode_name ((ValaCodeNode*) _tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = g_strdup_printf ("%s*", _tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = vala_ccode_parameter_new ("size", _tmp28_);
	_tmp30_ = _tmp29_;
	vala_ccode_function_add_parameter (_tmp22_, _tmp30_);
	_vala_ccode_node_unref0 (_tmp30_);
	_g_free0 (_tmp28_);
	_g_free0 (_tmp26_);
	_tmp31_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp31_);
	_tmp32_ = vala_array_type_get_element_type (array_type);
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_get_ccode_name ((ValaCodeNode*) _tmp33_);
	typename = _tmp34_;
	_tmp35_ = vala_ccode_identifier_new ("value");
	value = (ValaCCodeExpression*) _tmp35_;
	_tmp36_ = vala_array_type_get_element_type (array_type);
	_tmp37_ = _tmp36_;
	if (vala_data_type_is_real_struct_type (_tmp37_)) {
		gboolean _tmp38_ = FALSE;
		ValaDataType* _tmp39_;
		ValaDataType* _tmp40_;
		gboolean _tmp41_;
		gboolean _tmp42_;
		ValaDataType* _tmp49_;
		ValaDataType* _tmp50_;
		gboolean _tmp51_;
		gboolean _tmp52_;
		_tmp39_ = vala_array_type_get_element_type (array_type);
		_tmp40_ = _tmp39_;
		_tmp41_ = vala_data_type_get_nullable (_tmp40_);
		_tmp42_ = _tmp41_;
		if (!_tmp42_) {
			_tmp38_ = TRUE;
		} else {
			ValaDataType* _tmp43_;
			ValaDataType* _tmp44_;
			gboolean _tmp45_;
			gboolean _tmp46_;
			_tmp43_ = vala_array_type_get_element_type (array_type);
			_tmp44_ = _tmp43_;
			_tmp45_ = vala_data_type_get_value_owned (_tmp44_);
			_tmp46_ = _tmp45_;
			_tmp38_ = !_tmp46_;
		}
		if (_tmp38_) {
			const gchar* _tmp47_;
			gchar* _tmp48_;
			_tmp47_ = typename;
			_tmp48_ = g_strconcat ("const ", _tmp47_, NULL);
			_g_free0 (typename);
			typename = _tmp48_;
		}
		_tmp49_ = vala_array_type_get_element_type (array_type);
		_tmp50_ = _tmp49_;
		_tmp51_ = vala_data_type_get_nullable (_tmp50_);
		_tmp52_ = _tmp51_;
		if (!_tmp52_) {
			const gchar* _tmp53_;
			gchar* _tmp54_;
			ValaCCodeExpression* _tmp55_;
			ValaCCodeUnaryExpression* _tmp56_;
			_tmp53_ = typename;
			_tmp54_ = g_strconcat (_tmp53_, "*", NULL);
			_g_free0 (typename);
			typename = _tmp54_;
			_tmp55_ = value;
			_tmp56_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp55_);
			_vala_ccode_node_unref0 (value);
			value = (ValaCCodeExpression*) _tmp56_;
		}
	}
	_tmp57_ = function;
	_tmp58_ = typename;
	_tmp59_ = vala_ccode_parameter_new ("value", _tmp58_);
	_tmp60_ = _tmp59_;
	vala_ccode_function_add_parameter (_tmp57_, _tmp60_);
	_vala_ccode_node_unref0 (_tmp60_);
	_tmp61_ = vala_ccode_identifier_new ("array");
	_tmp62_ = _tmp61_;
	_tmp63_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp62_);
	_tmp64_ = _tmp63_;
	_vala_ccode_node_unref0 (_tmp62_);
	array = _tmp64_;
	_tmp65_ = vala_ccode_identifier_new ("length");
	_tmp66_ = _tmp65_;
	_tmp67_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp66_);
	_tmp68_ = _tmp67_;
	_vala_ccode_node_unref0 (_tmp66_);
	length = _tmp68_;
	_tmp69_ = vala_ccode_identifier_new ("size");
	_tmp70_ = _tmp69_;
	_tmp71_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp70_);
	_tmp72_ = _tmp71_;
	_vala_ccode_node_unref0 (_tmp70_);
	size = _tmp72_;
	_tmp73_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp74_ = _tmp73_;
	_tmp75_ = vala_code_context_get_profile (_tmp74_);
	_tmp76_ = _tmp75_;
	if (_tmp76_ == VALA_PROFILE_POSIX) {
		ValaCCodeFile* _tmp77_;
		ValaCCodeIdentifier* _tmp78_;
		ValaCCodeIdentifier* _tmp79_;
		ValaCCodeFunctionCall* _tmp80_;
		ValaCCodeFunctionCall* _tmp81_;
		ValaCCodeUnaryExpression* _tmp82_;
		_tmp77_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp77_, "stdlib.h", FALSE);
		_tmp78_ = vala_ccode_identifier_new ("realloc");
		_tmp79_ = _tmp78_;
		_tmp80_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp79_);
		_vala_ccode_node_unref0 (renew_call);
		renew_call = _tmp80_;
		_vala_ccode_node_unref0 (_tmp79_);
		_tmp81_ = renew_call;
		_tmp82_ = array;
		vala_ccode_function_call_add_argument (_tmp81_, (ValaCCodeExpression*) _tmp82_);
	} else {
		ValaCCodeIdentifier* _tmp83_;
		ValaCCodeIdentifier* _tmp84_;
		ValaCCodeFunctionCall* _tmp85_;
		ValaCCodeFunctionCall* _tmp86_;
		ValaDataType* _tmp87_;
		ValaDataType* _tmp88_;
		gchar* _tmp89_;
		gchar* _tmp90_;
		ValaCCodeIdentifier* _tmp91_;
		ValaCCodeIdentifier* _tmp92_;
		ValaCCodeFunctionCall* _tmp93_;
		ValaCCodeUnaryExpression* _tmp94_;
		_tmp83_ = vala_ccode_identifier_new ("g_renew");
		_tmp84_ = _tmp83_;
		_tmp85_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp84_);
		_vala_ccode_node_unref0 (renew_call);
		renew_call = _tmp85_;
		_vala_ccode_node_unref0 (_tmp84_);
		_tmp86_ = renew_call;
		_tmp87_ = vala_array_type_get_element_type (array_type);
		_tmp88_ = _tmp87_;
		_tmp89_ = vala_get_ccode_name ((ValaCodeNode*) _tmp88_);
		_tmp90_ = _tmp89_;
		_tmp91_ = vala_ccode_identifier_new (_tmp90_);
		_tmp92_ = _tmp91_;
		vala_ccode_function_call_add_argument (_tmp86_, (ValaCCodeExpression*) _tmp92_);
		_vala_ccode_node_unref0 (_tmp92_);
		_g_free0 (_tmp90_);
		_tmp93_ = renew_call;
		_tmp94_ = array;
		vala_ccode_function_call_add_argument (_tmp93_, (ValaCCodeExpression*) _tmp94_);
	}
	_tmp95_ = vala_array_type_get_element_type (array_type);
	_tmp96_ = _tmp95_;
	if (vala_data_type_is_reference_type_or_type_parameter (_tmp96_)) {
		ValaCCodeUnaryExpression* _tmp97_;
		ValaCCodeConstant* _tmp98_;
		ValaCCodeConstant* _tmp99_;
		ValaCCodeBinaryExpression* _tmp100_;
		_tmp97_ = size;
		_tmp98_ = vala_ccode_constant_new ("1");
		_tmp99_ = _tmp98_;
		_tmp100_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp97_, (ValaCCodeExpression*) _tmp99_);
		_vala_ccode_node_unref0 (renew_call_size);
		renew_call_size = (ValaCCodeExpression*) _tmp100_;
		_vala_ccode_node_unref0 (_tmp99_);
	} else {
		ValaCCodeUnaryExpression* _tmp101_;
		ValaCCodeExpression* _tmp102_;
		_tmp101_ = size;
		_tmp102_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp101_);
		_vala_ccode_node_unref0 (renew_call_size);
		renew_call_size = _tmp102_;
	}
	_tmp103_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp104_ = _tmp103_;
	_tmp105_ = vala_code_context_get_profile (_tmp104_);
	_tmp106_ = _tmp105_;
	if (_tmp106_ == VALA_PROFILE_POSIX) {
		ValaCCodeFunctionCall* csizeof = NULL;
		ValaCCodeIdentifier* _tmp107_;
		ValaCCodeIdentifier* _tmp108_;
		ValaCCodeFunctionCall* _tmp109_;
		ValaCCodeFunctionCall* _tmp110_;
		ValaCCodeFunctionCall* _tmp111_;
		ValaDataType* _tmp112_;
		ValaDataType* _tmp113_;
		gchar* _tmp114_;
		gchar* _tmp115_;
		ValaCCodeIdentifier* _tmp116_;
		ValaCCodeIdentifier* _tmp117_;
		ValaCCodeUnaryExpression* _tmp118_;
		ValaCCodeFunctionCall* _tmp119_;
		ValaCCodeBinaryExpression* _tmp120_;
		_tmp107_ = vala_ccode_identifier_new ("sizeof");
		_tmp108_ = _tmp107_;
		_tmp109_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp108_);
		_tmp110_ = _tmp109_;
		_vala_ccode_node_unref0 (_tmp108_);
		csizeof = _tmp110_;
		_tmp111_ = csizeof;
		_tmp112_ = vala_array_type_get_element_type (array_type);
		_tmp113_ = _tmp112_;
		_tmp114_ = vala_get_ccode_name ((ValaCodeNode*) _tmp113_);
		_tmp115_ = _tmp114_;
		_tmp116_ = vala_ccode_identifier_new (_tmp115_);
		_tmp117_ = _tmp116_;
		vala_ccode_function_call_add_argument (_tmp111_, (ValaCCodeExpression*) _tmp117_);
		_vala_ccode_node_unref0 (_tmp117_);
		_g_free0 (_tmp115_);
		_tmp118_ = size;
		_tmp119_ = csizeof;
		_tmp120_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp118_, (ValaCCodeExpression*) _tmp119_);
		_vala_ccode_node_unref0 (renew_call_size);
		renew_call_size = (ValaCCodeExpression*) _tmp120_;
		_vala_ccode_node_unref0 (csizeof);
	}
	_tmp121_ = renew_call;
	_tmp122_ = renew_call_size;
	vala_ccode_function_call_add_argument (_tmp121_, _tmp122_);
	_tmp123_ = length;
	_tmp124_ = size;
	_tmp125_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp123_, (ValaCCodeExpression*) _tmp124_);
	csizecheck = _tmp125_;
	_tmp126_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp127_ = _tmp126_;
	_tmp128_ = csizecheck;
	vala_ccode_function_open_if (_tmp127_, (ValaCCodeExpression*) _tmp128_);
	_tmp129_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp130_ = _tmp129_;
	_tmp131_ = size;
	_tmp132_ = size;
	_tmp133_ = vala_ccode_constant_new ("2");
	_tmp134_ = _tmp133_;
	_tmp135_ = size;
	_tmp136_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp134_, (ValaCCodeExpression*) _tmp135_);
	_tmp137_ = _tmp136_;
	_tmp138_ = vala_ccode_constant_new ("4");
	_tmp139_ = _tmp138_;
	_tmp140_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) _tmp132_, (ValaCCodeExpression*) _tmp137_, (ValaCCodeExpression*) _tmp139_);
	_tmp141_ = _tmp140_;
	vala_ccode_function_add_assignment (_tmp130_, (ValaCCodeExpression*) _tmp131_, (ValaCCodeExpression*) _tmp141_);
	_vala_ccode_node_unref0 (_tmp141_);
	_vala_ccode_node_unref0 (_tmp139_);
	_vala_ccode_node_unref0 (_tmp137_);
	_vala_ccode_node_unref0 (_tmp134_);
	_tmp142_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp143_ = _tmp142_;
	_tmp144_ = array;
	_tmp145_ = renew_call;
	vala_ccode_function_add_assignment (_tmp143_, (ValaCCodeExpression*) _tmp144_, (ValaCCodeExpression*) _tmp145_);
	_tmp146_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp147_ = _tmp146_;
	vala_ccode_function_close (_tmp147_);
	_tmp148_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp149_ = _tmp148_;
	_tmp150_ = array;
	_tmp151_ = length;
	_tmp152_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp151_);
	_tmp153_ = _tmp152_;
	_tmp154_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp150_, (ValaCCodeExpression*) _tmp153_);
	_tmp155_ = _tmp154_;
	_tmp156_ = value;
	vala_ccode_function_add_assignment (_tmp149_, (ValaCCodeExpression*) _tmp155_, _tmp156_);
	_vala_ccode_node_unref0 (_tmp155_);
	_vala_ccode_node_unref0 (_tmp153_);
	_tmp157_ = vala_array_type_get_element_type (array_type);
	_tmp158_ = _tmp157_;
	if (vala_data_type_is_reference_type_or_type_parameter (_tmp158_)) {
		ValaCCodeFunction* _tmp159_;
		ValaCCodeFunction* _tmp160_;
		ValaCCodeUnaryExpression* _tmp161_;
		ValaCCodeUnaryExpression* _tmp162_;
		ValaCCodeElementAccess* _tmp163_;
		ValaCCodeElementAccess* _tmp164_;
		ValaCCodeConstant* _tmp165_;
		ValaCCodeConstant* _tmp166_;
		_tmp159_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp160_ = _tmp159_;
		_tmp161_ = array;
		_tmp162_ = length;
		_tmp163_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp161_, (ValaCCodeExpression*) _tmp162_);
		_tmp164_ = _tmp163_;
		_tmp165_ = vala_ccode_constant_new ("NULL");
		_tmp166_ = _tmp165_;
		vala_ccode_function_add_assignment (_tmp160_, (ValaCCodeExpression*) _tmp164_, (ValaCCodeExpression*) _tmp166_);
		_vala_ccode_node_unref0 (_tmp166_);
		_vala_ccode_node_unref0 (_tmp164_);
	}
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp167_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp168_ = function;
	vala_ccode_file_add_function_declaration (_tmp167_, _tmp168_);
	_tmp169_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp170_ = function;
	vala_ccode_file_add_function (_tmp169_, _tmp170_);
	result = add_func;
	_vala_ccode_node_unref0 (csizecheck);
	_vala_ccode_node_unref0 (renew_call_size);
	_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)
{
	ValaBinaryExpression* binary = NULL;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaBinaryExpression* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValaBinaryExpression* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (assignment != NULL, FALSE);
	_tmp0_ = vala_assignment_get_right (assignment);
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_BINARY_EXPRESSION) ? ((ValaBinaryExpression*) _tmp1_) : NULL);
	binary = _tmp2_;
	_tmp4_ = binary;
	if (_tmp4_ != NULL) {
		ValaBinaryExpression* _tmp5_;
		ValaExpression* _tmp6_;
		ValaExpression* _tmp7_;
		ValaDataType* _tmp8_;
		ValaDataType* _tmp9_;
		_tmp5_ = binary;
		_tmp6_ = vala_binary_expression_get_left (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = vala_expression_get_value_type (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, VALA_TYPE_ARRAY_TYPE);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaBinaryExpression* _tmp10_;
		ValaBinaryOperator _tmp11_;
		ValaBinaryOperator _tmp12_;
		_tmp10_ = binary;
		_tmp11_ = vala_binary_expression_get_operator (_tmp10_);
		_tmp12_ = _tmp11_;
		if (_tmp12_ == VALA_BINARY_OPERATOR_PLUS) {
			ValaExpression* _tmp13_;
			ValaExpression* _tmp14_;
			ValaSymbol* _tmp15_;
			ValaSymbol* _tmp16_;
			ValaBinaryExpression* _tmp17_;
			ValaExpression* _tmp18_;
			ValaExpression* _tmp19_;
			ValaSymbol* _tmp20_;
			ValaSymbol* _tmp21_;
			_tmp13_ = vala_assignment_get_left (assignment);
			_tmp14_ = _tmp13_;
			_tmp15_ = vala_expression_get_symbol_reference (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = binary;
			_tmp18_ = vala_binary_expression_get_left (_tmp17_);
			_tmp19_ = _tmp18_;
			_tmp20_ = vala_expression_get_symbol_reference (_tmp19_);
			_tmp21_ = _tmp20_;
			if (_tmp16_ == _tmp21_) {
				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;
	ValaBinaryExpression* binary = NULL;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaBinaryExpression* _tmp2_;
	ValaExpression* array = NULL;
	ValaExpression* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaArrayType* array_type = NULL;
	ValaExpression* _tmp6_;
	ValaDataType* _tmp7_;
	ValaDataType* _tmp8_;
	ValaArrayType* _tmp9_;
	ValaExpression* element = NULL;
	ValaBinaryExpression* _tmp10_;
	ValaExpression* _tmp11_;
	ValaExpression* _tmp12_;
	ValaExpression* _tmp13_;
	ValaSymbol* array_var = NULL;
	ValaExpression* _tmp14_;
	ValaSymbol* _tmp15_;
	ValaSymbol* _tmp16_;
	ValaSymbol* _tmp17_;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp20_ = FALSE;
	ValaArrayType* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	ValaParameter* value_param = NULL;
	ValaExpression* _tmp31_;
	ValaDataType* _tmp32_;
	ValaDataType* _tmp33_;
	ValaParameter* _tmp34_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaArrayType* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	ValaCCodeIdentifier* _tmp38_;
	ValaCCodeIdentifier* _tmp39_;
	ValaCCodeFunctionCall* _tmp40_;
	ValaCCodeFunctionCall* _tmp41_;
	ValaCCodeFunctionCall* _tmp42_;
	ValaExpression* _tmp43_;
	ValaCCodeExpression* _tmp44_;
	ValaCCodeUnaryExpression* _tmp45_;
	ValaCCodeUnaryExpression* _tmp46_;
	ValaCCodeFunctionCall* _tmp47_;
	ValaExpression* _tmp48_;
	ValaCCodeExpression* _tmp49_;
	ValaCCodeExpression* _tmp50_;
	ValaCCodeUnaryExpression* _tmp51_;
	ValaCCodeUnaryExpression* _tmp52_;
	ValaCCodeFunctionCall* _tmp53_;
	ValaExpression* _tmp54_;
	ValaTargetValue* _tmp55_;
	ValaTargetValue* _tmp56_;
	ValaCCodeExpression* _tmp57_;
	ValaCCodeUnaryExpression* _tmp58_;
	ValaCCodeUnaryExpression* _tmp59_;
	ValaCCodeFunctionCall* _tmp60_;
	ValaParameter* _tmp61_;
	ValaExpression* _tmp62_;
	ValaExpression* _tmp63_;
	ValaCCodeExpression* _tmp64_;
	ValaCCodeExpression* _tmp65_;
	ValaCCodeExpression* _tmp66_;
	ValaCCodeFunction* _tmp67_;
	ValaCCodeFunction* _tmp68_;
	ValaCCodeFunctionCall* _tmp69_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (assignment != NULL);
	if (!vala_ccode_array_module_is_array_add (self, 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), assignment);
		return;
	}
	_tmp0_ = vala_assignment_get_right (assignment);
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_BINARY_EXPRESSION, ValaBinaryExpression));
	binary = _tmp2_;
	_tmp3_ = vala_assignment_get_left (assignment);
	_tmp4_ = _tmp3_;
	_tmp5_ = _vala_code_node_ref0 (_tmp4_);
	array = _tmp5_;
	_tmp6_ = array;
	_tmp7_ = vala_expression_get_value_type (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
	array_type = _tmp9_;
	_tmp10_ = binary;
	_tmp11_ = vala_binary_expression_get_right (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = _vala_code_node_ref0 (_tmp12_);
	element = _tmp13_;
	_tmp14_ = array;
	_tmp15_ = vala_expression_get_symbol_reference (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = _vala_code_node_ref0 (_tmp16_);
	array_var = _tmp17_;
	_tmp21_ = array_type;
	_tmp22_ = vala_array_type_get_rank (_tmp21_);
	_tmp23_ = _tmp22_;
	if (_tmp23_ == 1) {
		ValaSymbol* _tmp24_;
		_tmp24_ = array_var;
		_tmp20_ = _tmp24_ != NULL;
	} else {
		_tmp20_ = FALSE;
	}
	if (_tmp20_) {
		ValaSymbol* _tmp25_;
		_tmp25_ = array_var;
		_tmp19_ = vala_symbol_is_internal_symbol (_tmp25_);
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		gboolean _tmp26_ = FALSE;
		ValaSymbol* _tmp27_;
		_tmp27_ = array_var;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, VALA_TYPE_LOCAL_VARIABLE)) {
			_tmp26_ = TRUE;
		} else {
			ValaSymbol* _tmp28_;
			_tmp28_ = array_var;
			_tmp26_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, VALA_TYPE_FIELD);
		}
		_tmp18_ = _tmp26_;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
	} else {
		ValaSourceReference* _tmp29_;
		ValaSourceReference* _tmp30_;
		_tmp29_ = vala_code_node_get_source_reference ((ValaCodeNode*) assignment);
		_tmp30_ = _tmp29_;
		vala_report_error (_tmp30_, "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;
	}
	_tmp31_ = element;
	_tmp32_ = vala_expression_get_target_type (_tmp31_);
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_parameter_new ("value", _tmp33_, NULL);
	value_param = _tmp34_;
	_tmp35_ = array_type;
	_tmp36_ = vala_ccode_array_module_generate_array_add_wrapper (self, _tmp35_);
	_tmp37_ = _tmp36_;
	_tmp38_ = vala_ccode_identifier_new (_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp39_);
	_tmp41_ = _tmp40_;
	_vala_ccode_node_unref0 (_tmp39_);
	_g_free0 (_tmp37_);
	ccall = _tmp41_;
	_tmp42_ = ccall;
	_tmp43_ = array;
	_tmp44_ = vala_get_cvalue (_tmp43_);
	_tmp45_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp44_);
	_tmp46_ = _tmp45_;
	vala_ccode_function_call_add_argument (_tmp42_, (ValaCCodeExpression*) _tmp46_);
	_vala_ccode_node_unref0 (_tmp46_);
	_tmp47_ = ccall;
	_tmp48_ = array;
	_tmp49_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp48_, -1);
	_tmp50_ = _tmp49_;
	_tmp51_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp50_);
	_tmp52_ = _tmp51_;
	vala_ccode_function_call_add_argument (_tmp47_, (ValaCCodeExpression*) _tmp52_);
	_vala_ccode_node_unref0 (_tmp52_);
	_vala_ccode_node_unref0 (_tmp50_);
	_tmp53_ = ccall;
	_tmp54_ = array;
	_tmp55_ = vala_expression_get_target_value (_tmp54_);
	_tmp56_ = _tmp55_;
	_tmp57_ = vala_get_array_size_cvalue (_tmp56_);
	_tmp58_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp57_);
	_tmp59_ = _tmp58_;
	vala_ccode_function_call_add_argument (_tmp53_, (ValaCCodeExpression*) _tmp59_);
	_vala_ccode_node_unref0 (_tmp59_);
	_tmp60_ = ccall;
	_tmp61_ = value_param;
	_tmp62_ = element;
	_tmp63_ = element;
	_tmp64_ = vala_get_cvalue (_tmp63_);
	_tmp65_ = vala_ccode_base_module_handle_struct_argument ((ValaCCodeBaseModule*) self, _tmp61_, _tmp62_, _tmp64_);
	_tmp66_ = _tmp65_;
	vala_ccode_function_call_add_argument (_tmp60_, _tmp66_);
	_vala_ccode_node_unref0 (_tmp66_);
	_tmp67_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp68_ = _tmp67_;
	_tmp69_ = ccall;
	vala_ccode_function_add_expression (_tmp68_, (ValaCCodeExpression*) _tmp69_);
	_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;
	ValaArrayType* array_type = NULL;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ValaArrayType* _tmp3_;
	gchar* ctypename = NULL;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	ValaCCodeParameter* main_cparam = NULL;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	ValaArrayType* _tmp19_;
	ValaCCodeDeclaratorSuffix* _tmp20_;
	ValaCCodeDeclaratorSuffix* _tmp21_;
	ValaCCodeVariableDeclarator* _tmp22_;
	ValaCCodeVariableDeclarator* _tmp23_;
	ValaCCodeParameter* _tmp24_;
	ValaCCodeParameter* _tmp25_;
	ValaArrayType* _tmp26_;
	ValaDataType* _tmp27_;
	ValaDataType* _tmp28_;
	ValaCCodeParameter* _tmp29_;
	gboolean _tmp32_ = FALSE;
	ValaArrayType* _tmp33_;
	gboolean _tmp34_;
	gboolean _tmp35_;
	ValaCCodeParameter* result;
	self = (ValaCCodeArrayModule*) base;
	g_return_val_if_fail (param != NULL, NULL);
	g_return_val_if_fail (decl_space != NULL, NULL);
	g_return_val_if_fail (cparam_map != NULL, NULL);
	_tmp0_ = vala_variable_get_variable_type ((ValaVariable*) param);
	_tmp1_ = _tmp0_;
	array_type = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp1_) : NULL;
	_tmp3_ = array_type;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = vala_parameter_get_params_array (param);
		_tmp5_ = _tmp4_;
		_tmp2_ = _tmp5_;
	}
	if (_tmp2_) {
		ValaCCodeParameter* _tmp6_;
		_tmp6_ = 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), param, decl_space, cparam_map, carg_map);
		result = _tmp6_;
		return result;
	}
	_tmp7_ = vala_get_ccode_type ((ValaCodeNode*) param);
	ctypename = _tmp7_;
	_tmp8_ = ctypename;
	if (_tmp8_ == NULL) {
		ValaDataType* _tmp9_;
		ValaDataType* _tmp10_;
		gchar* _tmp11_;
		ValaParameterDirection _tmp12_;
		ValaParameterDirection _tmp13_;
		_tmp9_ = vala_variable_get_variable_type ((ValaVariable*) param);
		_tmp10_ = _tmp9_;
		_tmp11_ = vala_get_ccode_name ((ValaCodeNode*) _tmp10_);
		_g_free0 (ctypename);
		ctypename = _tmp11_;
		_tmp12_ = vala_parameter_get_direction (param);
		_tmp13_ = _tmp12_;
		if (_tmp13_ != VALA_PARAMETER_DIRECTION_IN) {
			const gchar* _tmp14_;
			gchar* _tmp15_;
			_tmp14_ = ctypename;
			_tmp15_ = g_strconcat (_tmp14_, "*", NULL);
			_g_free0 (ctypename);
			ctypename = _tmp15_;
		}
	}
	_tmp16_ = ctypename;
	_tmp17_ = vala_get_ccode_name ((ValaCodeNode*) param);
	_tmp18_ = _tmp17_;
	_tmp19_ = array_type;
	_tmp20_ = vala_ccode_base_module_get_ccode_declarator_suffix ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_variable_declarator_new (_tmp18_, NULL, _tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_ccode_parameter_new_with_declarator (_tmp16_, (ValaCCodeDeclarator*) _tmp23_);
	_tmp25_ = _tmp24_;
	_vala_ccode_node_unref0 (_tmp23_);
	_vala_ccode_declarator_suffix_unref0 (_tmp21_);
	_g_free0 (_tmp18_);
	main_cparam = _tmp25_;
	_tmp26_ = array_type;
	_tmp27_ = vala_array_type_get_element_type (_tmp26_);
	_tmp28_ = _tmp27_;
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp28_, decl_space);
	_tmp29_ = main_cparam;
	vala_map_set (cparam_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_get_ccode_pos (param), FALSE)), _tmp29_);
	if (carg_map != NULL) {
		ValaCCodeExpression* _tmp30_;
		ValaCCodeExpression* _tmp31_;
		_tmp30_ = vala_ccode_base_module_get_parameter_cexpression ((ValaCCodeBaseModule*) self, param);
		_tmp31_ = _tmp30_;
		vala_map_set (carg_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_get_ccode_pos (param), FALSE)), _tmp31_);
		_vala_ccode_node_unref0 (_tmp31_);
	}
	_tmp33_ = array_type;
	_tmp34_ = vala_array_type_get_fixed_length (_tmp33_);
	_tmp35_ = _tmp34_;
	if (!_tmp35_) {
		_tmp32_ = vala_get_ccode_array_length ((ValaCodeNode*) param);
	} else {
		_tmp32_ = FALSE;
	}
	if (_tmp32_) {
		gchar* length_ctype = NULL;
		gchar* _tmp36_;
		ValaParameterDirection _tmp37_;
		ValaParameterDirection _tmp38_;
		_tmp36_ = vala_get_ccode_array_length_type ((ValaCodeNode*) param);
		length_ctype = _tmp36_;
		_tmp37_ = vala_parameter_get_direction (param);
		_tmp38_ = _tmp37_;
		if (_tmp38_ != VALA_PARAMETER_DIRECTION_IN) {
			const gchar* _tmp39_;
			gchar* _tmp40_;
			_tmp39_ = length_ctype;
			_tmp40_ = g_strdup_printf ("%s*", _tmp39_);
			_g_free0 (length_ctype);
			length_ctype = _tmp40_;
		}
		{
			gint dim = 0;
			dim = 1;
			{
				gboolean _tmp41_ = FALSE;
				_tmp41_ = TRUE;
				while (TRUE) {
					ValaArrayType* _tmp43_;
					gint _tmp44_;
					gint _tmp45_;
					ValaCCodeParameter* cparam = NULL;
					gchar* _tmp46_;
					gchar* _tmp47_;
					const gchar* _tmp48_;
					ValaCCodeParameter* _tmp49_;
					ValaCCodeParameter* _tmp50_;
					ValaCCodeParameter* _tmp51_;
					if (!_tmp41_) {
						gint _tmp42_;
						_tmp42_ = dim;
						dim = _tmp42_ + 1;
					}
					_tmp41_ = FALSE;
					_tmp43_ = array_type;
					_tmp44_ = vala_array_type_get_rank (_tmp43_);
					_tmp45_ = _tmp44_;
					if (!(dim <= _tmp45_)) {
						break;
					}
					_tmp46_ = vala_ccode_base_module_get_variable_array_length_cname ((ValaCCodeBaseModule*) self, (ValaVariable*) param, dim);
					_tmp47_ = _tmp46_;
					_tmp48_ = length_ctype;
					_tmp49_ = vala_ccode_parameter_new (_tmp47_, _tmp48_);
					_tmp50_ = _tmp49_;
					_g_free0 (_tmp47_);
					cparam = _tmp50_;
					_tmp51_ = cparam;
					vala_map_set (cparam_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_get_ccode_array_length_pos ((ValaCodeNode*) param) + (0.01 * dim), FALSE)), _tmp51_);
					if (carg_map != NULL) {
						ValaCCodeParameter* _tmp52_;
						const gchar* _tmp53_;
						const gchar* _tmp54_;
						ValaCCodeExpression* _tmp55_;
						ValaCCodeExpression* _tmp56_;
						_tmp52_ = cparam;
						_tmp53_ = vala_ccode_parameter_get_name (_tmp52_);
						_tmp54_ = _tmp53_;
						_tmp55_ = vala_ccode_base_module_get_cexpression ((ValaCCodeBaseModule*) self, _tmp54_);
						_tmp56_ = _tmp55_;
						vala_map_set (carg_map, (gpointer) ((gintptr) vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_get_ccode_array_length_pos ((ValaCodeNode*) param) + (0.01 * dim), FALSE)), _tmp56_);
						_vala_ccode_node_unref0 (_tmp56_);
					}
					_vala_ccode_node_unref0 (cparam);
				}
			}
		}
		_g_free0 (length_ctype);
	}
	result = main_cparam;
	_g_free0 (ctypename);
	return result;
}

static void
vala_ccode_array_module_real_append_params_array (ValaCCodeBaseModule* base,
                                                  ValaMethod* m)
{
	ValaCCodeArrayModule * self;
	ValaLocalVariable* local = NULL;
	ValaLocalVariable* _tmp0_;
	ValaLocalVariable* _tmp1_;
	ValaLocalVariable* _tmp2_;
	ValaArrayType* array_type = NULL;
	ValaLocalVariable* _tmp3_;
	ValaDataType* _tmp4_;
	ValaDataType* _tmp5_;
	ValaArrayType* _tmp6_;
	ValaLocalVariable* local_length = NULL;
	ValaArrayType* _tmp7_;
	ValaDataType* _tmp8_;
	ValaDataType* _tmp9_;
	ValaDataType* _tmp10_;
	ValaDataType* _tmp11_;
	ValaLocalVariable* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	ValaLocalVariable* _tmp17_;
	ValaSourceReference* _tmp18_;
	ValaSourceReference* _tmp19_;
	ValaLocalVariable* _tmp20_;
	ValaLocalVariable* _tmp21_;
	ValaLocalVariable* local_size = NULL;
	ValaArrayType* _tmp22_;
	ValaDataType* _tmp23_;
	ValaDataType* _tmp24_;
	ValaDataType* _tmp25_;
	ValaDataType* _tmp26_;
	ValaLocalVariable* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	ValaLocalVariable* _tmp32_;
	ValaLocalVariable* _tmp33_;
	ValaCCodeFunctionCall* gnew = NULL;
	ValaCodeContext* _tmp34_;
	ValaCodeContext* _tmp35_;
	ValaProfile _tmp36_;
	ValaProfile _tmp37_;
	ValaCCodeExpression* length_expr = NULL;
	ValaLocalVariable* _tmp53_;
	ValaCCodeExpression* _tmp54_;
	gboolean _tmp55_ = FALSE;
	ValaArrayType* _tmp56_;
	ValaDataType* _tmp57_;
	ValaDataType* _tmp58_;
	ValaTypeSymbol* _tmp59_;
	ValaTypeSymbol* _tmp60_;
	ValaCCodeFunctionCall* _tmp70_;
	ValaCCodeExpression* _tmp71_;
	ValaCodeContext* _tmp72_;
	ValaCodeContext* _tmp73_;
	ValaProfile _tmp74_;
	ValaProfile _tmp75_;
	ValaCCodeFunction* _tmp90_;
	ValaCCodeFunction* _tmp91_;
	ValaLocalVariable* _tmp92_;
	ValaCCodeExpression* _tmp93_;
	ValaCCodeExpression* _tmp94_;
	ValaCCodeFunctionCall* _tmp95_;
	ValaLocalVariable* element = NULL;
	ValaArrayType* _tmp96_;
	ValaDataType* _tmp97_;
	ValaDataType* _tmp98_;
	ValaDataType* _tmp99_;
	ValaDataType* _tmp100_;
	ValaLocalVariable* _tmp101_;
	gchar* _tmp102_;
	gchar* _tmp103_;
	gchar* _tmp104_;
	gchar* _tmp105_;
	ValaLocalVariable* _tmp106_;
	ValaSourceReference* _tmp107_;
	ValaSourceReference* _tmp108_;
	ValaLocalVariable* _tmp109_;
	ValaLocalVariable* _tmp110_;
	ValaLocalVariable* _tmp111_;
	ValaCodeContext* _tmp112_;
	ValaCodeContext* _tmp113_;
	ValaProfile _tmp114_;
	ValaProfile _tmp115_;
	gboolean _tmp117_ = FALSE;
	ValaCCodeFunction* _tmp152_;
	ValaCCodeFunction* _tmp153_;
	ValaLocalVariable* _tmp154_;
	ValaCCodeExpression* _tmp155_;
	ValaCCodeExpression* _tmp156_;
	ValaLocalVariable* _tmp157_;
	gchar* _tmp158_;
	gchar* _tmp159_;
	gchar* _tmp160_;
	gchar* _tmp161_;
	ValaCCodeIdentifier* _tmp162_;
	ValaCCodeIdentifier* _tmp163_;
	ValaCCodeFunction* _tmp164_;
	ValaCCodeFunction* _tmp165_;
	ValaLocalVariable* _tmp166_;
	ValaCCodeExpression* _tmp167_;
	ValaCCodeExpression* _tmp168_;
	ValaCCodeConstant* _tmp169_;
	ValaCCodeConstant* _tmp170_;
	ValaCCodeBinaryExpression* _tmp171_;
	ValaCCodeBinaryExpression* _tmp172_;
	ValaCCodeFunctionCall* vaarg = NULL;
	ValaCCodeIdentifier* _tmp173_;
	ValaCCodeIdentifier* _tmp174_;
	ValaCCodeFunctionCall* _tmp175_;
	ValaCCodeFunctionCall* _tmp176_;
	ValaLocalVariable* _tmp177_;
	gchar* _tmp178_;
	gchar* _tmp179_;
	gchar* _tmp180_;
	gchar* _tmp181_;
	ValaCCodeIdentifier* _tmp182_;
	ValaCCodeIdentifier* _tmp183_;
	ValaArrayType* _tmp184_;
	ValaDataType* _tmp185_;
	ValaDataType* _tmp186_;
	gchar* _tmp187_;
	gchar* _tmp188_;
	ValaCCodeIdentifier* _tmp189_;
	ValaCCodeIdentifier* _tmp190_;
	ValaCCodeFunctionCall* ccall = NULL;
	ValaArrayType* _tmp191_;
	gchar* _tmp192_;
	gchar* _tmp193_;
	ValaCCodeIdentifier* _tmp194_;
	ValaCCodeIdentifier* _tmp195_;
	ValaCCodeFunctionCall* _tmp196_;
	ValaCCodeFunctionCall* _tmp197_;
	ValaLocalVariable* _tmp198_;
	ValaCCodeExpression* _tmp199_;
	ValaCCodeExpression* _tmp200_;
	ValaCCodeUnaryExpression* _tmp201_;
	ValaCCodeUnaryExpression* _tmp202_;
	ValaLocalVariable* _tmp203_;
	ValaCCodeExpression* _tmp204_;
	ValaCCodeExpression* _tmp205_;
	ValaCCodeUnaryExpression* _tmp206_;
	ValaCCodeUnaryExpression* _tmp207_;
	ValaLocalVariable* _tmp208_;
	ValaCCodeExpression* _tmp209_;
	ValaCCodeExpression* _tmp210_;
	ValaCCodeUnaryExpression* _tmp211_;
	ValaCCodeUnaryExpression* _tmp212_;
	ValaLocalVariable* _tmp213_;
	ValaCCodeExpression* _tmp214_;
	ValaCCodeExpression* _tmp215_;
	ValaCCodeFunction* _tmp216_;
	ValaCCodeFunction* _tmp217_;
	ValaCCodeFunction* _tmp218_;
	ValaCCodeFunction* _tmp219_;
	ValaLocalVariable* _tmp220_;
	ValaCCodeExpression* _tmp221_;
	ValaCCodeExpression* _tmp222_;
	ValaCCodeFunction* _tmp223_;
	ValaCCodeFunction* _tmp224_;
	ValaCCodeFunctionCall* vaend = NULL;
	ValaCCodeIdentifier* _tmp225_;
	ValaCCodeIdentifier* _tmp226_;
	ValaCCodeFunctionCall* _tmp227_;
	ValaCCodeFunctionCall* _tmp228_;
	ValaLocalVariable* _tmp229_;
	gchar* _tmp230_;
	gchar* _tmp231_;
	gchar* _tmp232_;
	gchar* _tmp233_;
	ValaCCodeIdentifier* _tmp234_;
	ValaCCodeIdentifier* _tmp235_;
	ValaCCodeFunction* _tmp236_;
	ValaCCodeFunction* _tmp237_;
	self = (ValaCCodeArrayModule*) base;
	g_return_if_fail (m != NULL);
	_tmp0_ = vala_method_get_params_array_var (m);
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_code_node_ref0 (_tmp1_);
	local = _tmp2_;
	_tmp3_ = local;
	_tmp4_ = vala_variable_get_variable_type ((ValaVariable*) _tmp3_);
	_tmp5_ = _tmp4_;
	_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_length_type (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_data_type_copy (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = local;
	_tmp13_ = vala_symbol_get_name ((ValaSymbol*) _tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp14_, 1);
	_tmp16_ = _tmp15_;
	_tmp17_ = local;
	_tmp18_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = vala_local_variable_new (_tmp11_, _tmp16_, NULL, _tmp19_);
	_tmp21_ = _tmp20_;
	_g_free0 (_tmp16_);
	_vala_code_node_unref0 (_tmp11_);
	local_length = _tmp21_;
	_tmp22_ = array_type;
	_tmp23_ = vala_array_type_get_length_type (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = vala_data_type_copy (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = local;
	_tmp28_ = vala_ccode_base_module_get_local_cname ((ValaCCodeBaseModule*) self, _tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = vala_ccode_base_module_get_array_size_cname ((ValaCCodeBaseModule*) self, _tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_local_variable_new (_tmp26_, _tmp31_, NULL, NULL);
	_tmp33_ = _tmp32_;
	_g_free0 (_tmp31_);
	_g_free0 (_tmp29_);
	_vala_code_node_unref0 (_tmp26_);
	local_size = _tmp33_;
	_tmp34_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp35_ = _tmp34_;
	_tmp36_ = vala_code_context_get_profile (_tmp35_);
	_tmp37_ = _tmp36_;
	if (_tmp37_ == VALA_PROFILE_POSIX) {
		ValaCCodeFile* _tmp38_;
		ValaCCodeIdentifier* _tmp39_;
		ValaCCodeIdentifier* _tmp40_;
		ValaCCodeFunctionCall* _tmp41_;
		_tmp38_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp38_, "stdlib.h", FALSE);
		_tmp39_ = vala_ccode_identifier_new ("calloc");
		_tmp40_ = _tmp39_;
		_tmp41_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp40_);
		_vala_ccode_node_unref0 (gnew);
		gnew = _tmp41_;
		_vala_ccode_node_unref0 (_tmp40_);
	} else {
		ValaCCodeIdentifier* _tmp42_;
		ValaCCodeIdentifier* _tmp43_;
		ValaCCodeFunctionCall* _tmp44_;
		ValaCCodeFunctionCall* _tmp45_;
		ValaArrayType* _tmp46_;
		ValaDataType* _tmp47_;
		ValaDataType* _tmp48_;
		gchar* _tmp49_;
		gchar* _tmp50_;
		ValaCCodeIdentifier* _tmp51_;
		ValaCCodeIdentifier* _tmp52_;
		_tmp42_ = vala_ccode_identifier_new ("g_new0");
		_tmp43_ = _tmp42_;
		_tmp44_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp43_);
		_vala_ccode_node_unref0 (gnew);
		gnew = _tmp44_;
		_vala_ccode_node_unref0 (_tmp43_);
		_tmp45_ = gnew;
		_tmp46_ = array_type;
		_tmp47_ = vala_array_type_get_element_type (_tmp46_);
		_tmp48_ = _tmp47_;
		_tmp49_ = vala_get_ccode_name ((ValaCodeNode*) _tmp48_);
		_tmp50_ = _tmp49_;
		_tmp51_ = vala_ccode_identifier_new (_tmp50_);
		_tmp52_ = _tmp51_;
		vala_ccode_function_call_add_argument (_tmp45_, (ValaCCodeExpression*) _tmp52_);
		_vala_ccode_node_unref0 (_tmp52_);
		_g_free0 (_tmp50_);
	}
	_tmp53_ = local_length;
	_tmp54_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp53_);
	length_expr = _tmp54_;
	_tmp56_ = array_type;
	_tmp57_ = vala_array_type_get_element_type (_tmp56_);
	_tmp58_ = _tmp57_;
	_tmp59_ = vala_data_type_get_type_symbol (_tmp58_);
	_tmp60_ = _tmp59_;
	if (_tmp60_ != NULL) {
		ValaArrayType* _tmp61_;
		ValaDataType* _tmp62_;
		ValaDataType* _tmp63_;
		ValaTypeSymbol* _tmp64_;
		ValaTypeSymbol* _tmp65_;
		_tmp61_ = array_type;
		_tmp62_ = vala_array_type_get_element_type (_tmp61_);
		_tmp63_ = _tmp62_;
		_tmp64_ = vala_data_type_get_type_symbol (_tmp63_);
		_tmp65_ = _tmp64_;
		_tmp55_ = vala_typesymbol_is_reference_type (_tmp65_);
	} else {
		_tmp55_ = FALSE;
	}
	if (_tmp55_) {
		ValaCCodeExpression* _tmp66_;
		ValaCCodeConstant* _tmp67_;
		ValaCCodeConstant* _tmp68_;
		ValaCCodeBinaryExpression* _tmp69_;
		_tmp66_ = length_expr;
		_tmp67_ = vala_ccode_constant_new ("1");
		_tmp68_ = _tmp67_;
		_tmp69_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp66_, (ValaCCodeExpression*) _tmp68_);
		_vala_ccode_node_unref0 (length_expr);
		length_expr = (ValaCCodeExpression*) _tmp69_;
		_vala_ccode_node_unref0 (_tmp68_);
	}
	_tmp70_ = gnew;
	_tmp71_ = length_expr;
	vala_ccode_function_call_add_argument (_tmp70_, _tmp71_);
	_tmp72_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp73_ = _tmp72_;
	_tmp74_ = vala_code_context_get_profile (_tmp73_);
	_tmp75_ = _tmp74_;
	if (_tmp75_ == VALA_PROFILE_POSIX) {
		ValaCCodeFunctionCall* csizeof = NULL;
		ValaCCodeIdentifier* _tmp76_;
		ValaCCodeIdentifier* _tmp77_;
		ValaCCodeFunctionCall* _tmp78_;
		ValaCCodeFunctionCall* _tmp79_;
		ValaCCodeFunctionCall* _tmp80_;
		ValaArrayType* _tmp81_;
		ValaDataType* _tmp82_;
		ValaDataType* _tmp83_;
		gchar* _tmp84_;
		gchar* _tmp85_;
		ValaCCodeIdentifier* _tmp86_;
		ValaCCodeIdentifier* _tmp87_;
		ValaCCodeFunctionCall* _tmp88_;
		ValaCCodeFunctionCall* _tmp89_;
		_tmp76_ = vala_ccode_identifier_new ("sizeof");
		_tmp77_ = _tmp76_;
		_tmp78_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp77_);
		_tmp79_ = _tmp78_;
		_vala_ccode_node_unref0 (_tmp77_);
		csizeof = _tmp79_;
		_tmp80_ = csizeof;
		_tmp81_ = array_type;
		_tmp82_ = vala_array_type_get_element_type (_tmp81_);
		_tmp83_ = _tmp82_;
		_tmp84_ = vala_get_ccode_name ((ValaCodeNode*) _tmp83_);
		_tmp85_ = _tmp84_;
		_tmp86_ = vala_ccode_identifier_new (_tmp85_);
		_tmp87_ = _tmp86_;
		vala_ccode_function_call_add_argument (_tmp80_, (ValaCCodeExpression*) _tmp87_);
		_vala_ccode_node_unref0 (_tmp87_);
		_g_free0 (_tmp85_);
		_tmp88_ = gnew;
		_tmp89_ = csizeof;
		vala_ccode_function_call_add_argument (_tmp88_, (ValaCCodeExpression*) _tmp89_);
		_vala_ccode_node_unref0 (csizeof);
	}
	_tmp90_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp91_ = _tmp90_;
	_tmp92_ = local;
	_tmp93_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp92_);
	_tmp94_ = _tmp93_;
	_tmp95_ = gnew;
	vala_ccode_function_add_assignment (_tmp91_, _tmp94_, (ValaCCodeExpression*) _tmp95_);
	_vala_ccode_node_unref0 (_tmp94_);
	_tmp96_ = array_type;
	_tmp97_ = vala_array_type_get_element_type (_tmp96_);
	_tmp98_ = _tmp97_;
	_tmp99_ = vala_data_type_copy (_tmp98_);
	_tmp100_ = _tmp99_;
	_tmp101_ = local;
	_tmp102_ = vala_get_ccode_name ((ValaCodeNode*) _tmp101_);
	_tmp103_ = _tmp102_;
	_tmp104_ = g_strdup_printf ("_%s_element", _tmp103_);
	_tmp105_ = _tmp104_;
	_tmp106_ = local;
	_tmp107_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp106_);
	_tmp108_ = _tmp107_;
	_tmp109_ = vala_local_variable_new (_tmp100_, _tmp105_, NULL, _tmp108_);
	_tmp110_ = _tmp109_;
	_g_free0 (_tmp105_);
	_g_free0 (_tmp103_);
	_vala_code_node_unref0 (_tmp100_);
	element = _tmp110_;
	_tmp111_ = element;
	vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp111_, FALSE);
	_tmp112_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp113_ = _tmp112_;
	_tmp114_ = vala_code_context_get_profile (_tmp113_);
	_tmp115_ = _tmp114_;
	if (_tmp115_ == VALA_PROFILE_POSIX) {
		ValaCCodeFile* _tmp116_;
		_tmp116_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp116_, "stdarg.h", FALSE);
	}
	if (!G_TYPE_CHECK_INSTANCE_TYPE (m, VALA_TYPE_CREATION_METHOD)) {
		_tmp117_ = TRUE;
	} else {
		ValaSymbol* _tmp118_;
		ValaSymbol* _tmp119_;
		_tmp118_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m);
		_tmp119_ = _tmp118_;
		_tmp117_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp119_, VALA_TYPE_STRUCT);
	}
	if (_tmp117_) {
		ValaCCodeFunction* _tmp120_;
		ValaCCodeFunction* _tmp121_;
		ValaLocalVariable* _tmp122_;
		gchar* _tmp123_;
		gchar* _tmp124_;
		gchar* _tmp125_;
		gchar* _tmp126_;
		ValaCCodeVariableDeclarator* _tmp127_;
		ValaCCodeVariableDeclarator* _tmp128_;
		ValaCCodeFunctionCall* vastart = NULL;
		ValaCCodeIdentifier* _tmp129_;
		ValaCCodeIdentifier* _tmp130_;
		ValaCCodeFunctionCall* _tmp131_;
		ValaCCodeFunctionCall* _tmp132_;
		ValaCCodeFunctionCall* _tmp133_;
		ValaLocalVariable* _tmp134_;
		gchar* _tmp135_;
		gchar* _tmp136_;
		gchar* _tmp137_;
		gchar* _tmp138_;
		ValaCCodeIdentifier* _tmp139_;
		ValaCCodeIdentifier* _tmp140_;
		ValaCCodeFunctionCall* _tmp141_;
		ValaLocalVariable* _tmp142_;
		gchar* _tmp143_;
		gchar* _tmp144_;
		gchar* _tmp145_;
		gchar* _tmp146_;
		ValaCCodeIdentifier* _tmp147_;
		ValaCCodeIdentifier* _tmp148_;
		ValaCCodeFunction* _tmp149_;
		ValaCCodeFunction* _tmp150_;
		ValaCCodeFunctionCall* _tmp151_;
		_tmp120_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp121_ = _tmp120_;
		_tmp122_ = local;
		_tmp123_ = vala_get_ccode_name ((ValaCodeNode*) _tmp122_);
		_tmp124_ = _tmp123_;
		_tmp125_ = g_strdup_printf ("_va_list_%s", _tmp124_);
		_tmp126_ = _tmp125_;
		_tmp127_ = vala_ccode_variable_declarator_new (_tmp126_, NULL, NULL);
		_tmp128_ = _tmp127_;
		vala_ccode_function_add_declaration (_tmp121_, "va_list", (ValaCCodeDeclarator*) _tmp128_, 0);
		_vala_ccode_node_unref0 (_tmp128_);
		_g_free0 (_tmp126_);
		_g_free0 (_tmp124_);
		_tmp129_ = vala_ccode_identifier_new ("va_start");
		_tmp130_ = _tmp129_;
		_tmp131_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp130_);
		_tmp132_ = _tmp131_;
		_vala_ccode_node_unref0 (_tmp130_);
		vastart = _tmp132_;
		_tmp133_ = vastart;
		_tmp134_ = local;
		_tmp135_ = vala_get_ccode_name ((ValaCodeNode*) _tmp134_);
		_tmp136_ = _tmp135_;
		_tmp137_ = g_strdup_printf ("_va_list_%s", _tmp136_);
		_tmp138_ = _tmp137_;
		_tmp139_ = vala_ccode_identifier_new (_tmp138_);
		_tmp140_ = _tmp139_;
		vala_ccode_function_call_add_argument (_tmp133_, (ValaCCodeExpression*) _tmp140_);
		_vala_ccode_node_unref0 (_tmp140_);
		_g_free0 (_tmp138_);
		_g_free0 (_tmp136_);
		_tmp141_ = vastart;
		_tmp142_ = local;
		_tmp143_ = vala_get_ccode_name ((ValaCodeNode*) _tmp142_);
		_tmp144_ = _tmp143_;
		_tmp145_ = g_strdup_printf ("_first_%s", _tmp144_);
		_tmp146_ = _tmp145_;
		_tmp147_ = vala_ccode_identifier_new (_tmp146_);
		_tmp148_ = _tmp147_;
		vala_ccode_function_call_add_argument (_tmp141_, (ValaCCodeExpression*) _tmp148_);
		_vala_ccode_node_unref0 (_tmp148_);
		_g_free0 (_tmp146_);
		_g_free0 (_tmp144_);
		_tmp149_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp150_ = _tmp149_;
		_tmp151_ = vastart;
		vala_ccode_function_add_expression (_tmp150_, (ValaCCodeExpression*) _tmp151_);
		_vala_ccode_node_unref0 (vastart);
	}
	_tmp152_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp153_ = _tmp152_;
	_tmp154_ = element;
	_tmp155_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp154_);
	_tmp156_ = _tmp155_;
	_tmp157_ = local;
	_tmp158_ = vala_get_ccode_name ((ValaCodeNode*) _tmp157_);
	_tmp159_ = _tmp158_;
	_tmp160_ = g_strdup_printf ("_first_%s", _tmp159_);
	_tmp161_ = _tmp160_;
	_tmp162_ = vala_ccode_identifier_new (_tmp161_);
	_tmp163_ = _tmp162_;
	vala_ccode_function_add_assignment (_tmp153_, _tmp156_, (ValaCCodeExpression*) _tmp163_);
	_vala_ccode_node_unref0 (_tmp163_);
	_g_free0 (_tmp161_);
	_g_free0 (_tmp159_);
	_vala_ccode_node_unref0 (_tmp156_);
	_tmp164_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp165_ = _tmp164_;
	_tmp166_ = element;
	_tmp167_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp166_);
	_tmp168_ = _tmp167_;
	_tmp169_ = vala_ccode_constant_new ("NULL");
	_tmp170_ = _tmp169_;
	_tmp171_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, _tmp168_, (ValaCCodeExpression*) _tmp170_);
	_tmp172_ = _tmp171_;
	vala_ccode_function_open_while (_tmp165_, (ValaCCodeExpression*) _tmp172_);
	_vala_ccode_node_unref0 (_tmp172_);
	_vala_ccode_node_unref0 (_tmp170_);
	_vala_ccode_node_unref0 (_tmp168_);
	_tmp173_ = vala_ccode_identifier_new ("va_arg");
	_tmp174_ = _tmp173_;
	_tmp175_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp174_);
	_tmp176_ = _tmp175_;
	_vala_ccode_node_unref0 (_tmp174_);
	vaarg = _tmp176_;
	_tmp177_ = local;
	_tmp178_ = vala_get_ccode_name ((ValaCodeNode*) _tmp177_);
	_tmp179_ = _tmp178_;
	_tmp180_ = g_strdup_printf ("_va_list_%s", _tmp179_);
	_tmp181_ = _tmp180_;
	_tmp182_ = vala_ccode_identifier_new (_tmp181_);
	_tmp183_ = _tmp182_;
	vala_ccode_function_call_add_argument (vaarg, (ValaCCodeExpression*) _tmp183_);
	_vala_ccode_node_unref0 (_tmp183_);
	_g_free0 (_tmp181_);
	_g_free0 (_tmp179_);
	_tmp184_ = array_type;
	_tmp185_ = vala_array_type_get_element_type (_tmp184_);
	_tmp186_ = _tmp185_;
	_tmp187_ = vala_get_ccode_name ((ValaCodeNode*) _tmp186_);
	_tmp188_ = _tmp187_;
	_tmp189_ = vala_ccode_identifier_new (_tmp188_);
	_tmp190_ = _tmp189_;
	vala_ccode_function_call_add_argument (vaarg, (ValaCCodeExpression*) _tmp190_);
	_vala_ccode_node_unref0 (_tmp190_);
	_g_free0 (_tmp188_);
	_tmp191_ = array_type;
	_tmp192_ = vala_ccode_array_module_generate_array_add_wrapper (self, _tmp191_);
	_tmp193_ = _tmp192_;
	_tmp194_ = vala_ccode_identifier_new (_tmp193_);
	_tmp195_ = _tmp194_;
	_tmp196_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp195_);
	_tmp197_ = _tmp196_;
	_vala_ccode_node_unref0 (_tmp195_);
	_g_free0 (_tmp193_);
	ccall = _tmp197_;
	_tmp198_ = local;
	_tmp199_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp198_);
	_tmp200_ = _tmp199_;
	_tmp201_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp200_);
	_tmp202_ = _tmp201_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp202_);
	_vala_ccode_node_unref0 (_tmp202_);
	_vala_ccode_node_unref0 (_tmp200_);
	_tmp203_ = local_length;
	_tmp204_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp203_);
	_tmp205_ = _tmp204_;
	_tmp206_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp205_);
	_tmp207_ = _tmp206_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp207_);
	_vala_ccode_node_unref0 (_tmp207_);
	_vala_ccode_node_unref0 (_tmp205_);
	_tmp208_ = local_size;
	_tmp209_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp208_);
	_tmp210_ = _tmp209_;
	_tmp211_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp210_);
	_tmp212_ = _tmp211_;
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp212_);
	_vala_ccode_node_unref0 (_tmp212_);
	_vala_ccode_node_unref0 (_tmp210_);
	_tmp213_ = element;
	_tmp214_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp213_);
	_tmp215_ = _tmp214_;
	vala_ccode_function_call_add_argument (ccall, _tmp215_);
	_vala_ccode_node_unref0 (_tmp215_);
	_tmp216_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp217_ = _tmp216_;
	vala_ccode_function_add_expression (_tmp217_, (ValaCCodeExpression*) ccall);
	_tmp218_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp219_ = _tmp218_;
	_tmp220_ = element;
	_tmp221_ = vala_ccode_base_module_get_local_cexpression ((ValaCCodeBaseModule*) self, _tmp220_);
	_tmp222_ = _tmp221_;
	vala_ccode_function_add_assignment (_tmp219_, _tmp222_, (ValaCCodeExpression*) vaarg);
	_vala_ccode_node_unref0 (_tmp222_);
	_tmp223_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp224_ = _tmp223_;
	vala_ccode_function_close (_tmp224_);
	_tmp225_ = vala_ccode_identifier_new ("va_end");
	_tmp226_ = _tmp225_;
	_tmp227_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp226_);
	_tmp228_ = _tmp227_;
	_vala_ccode_node_unref0 (_tmp226_);
	vaend = _tmp228_;
	_tmp229_ = local;
	_tmp230_ = vala_get_ccode_name ((ValaCodeNode*) _tmp229_);
	_tmp231_ = _tmp230_;
	_tmp232_ = g_strdup_printf ("_va_list_%s", _tmp231_);
	_tmp233_ = _tmp232_;
	_tmp234_ = vala_ccode_identifier_new (_tmp233_);
	_tmp235_ = _tmp234_;
	vala_ccode_function_call_add_argument (vaend, (ValaCCodeExpression*) _tmp235_);
	_vala_ccode_node_unref0 (_tmp235_);
	_g_free0 (_tmp233_);
	_g_free0 (_tmp231_);
	_tmp236_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp237_ = _tmp236_;
	vala_ccode_function_add_expression (_tmp237_, (ValaCCodeExpression*) vaend);
	_vala_ccode_node_unref0 (vaend);
	_vala_ccode_node_unref0 (ccall);
	_vala_ccode_node_unref0 (vaarg);
	_vala_code_node_unref0 (element);
	_vala_ccode_node_unref0 (length_expr);
	_vala_ccode_node_unref0 (gnew);
	_vala_code_node_unref0 (local_size);
	_vala_code_node_unref0 (local_length);
	_vala_code_node_unref0 (array_type);
	_vala_code_node_unref0 (local);
}

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,
                                    gpointer klass_data)
{
	vala_ccode_array_module_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeVisitorClass *) klass)->finalize = vala_ccode_array_module_finalize;
	g_type_class_adjust_private_offset (klass, &ValaCCodeArrayModule_private_offset);
	((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_variable_array_length_cname = (gchar* (*) (ValaCCodeBaseModule*, ValaVariable*, gint)) vala_ccode_array_module_real_get_variable_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_struct_array_destroy = (gchar* (*) (ValaCCodeBaseModule*, ValaStruct*)) vala_ccode_array_module_real_append_struct_array_destroy;
	((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;
	((ValaCCodeBaseModuleClass *) klass)->append_params_array = (void (*) (ValaCCodeBaseModule*, ValaMethod*)) vala_ccode_array_module_real_append_params_array;
}

static void
vala_ccode_array_module_instance_init (ValaCCodeArrayModule * self,
                                       gpointer klass)
{
	self->priv = vala_ccode_array_module_get_instance_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);
}

static GType
vala_ccode_array_module_get_type_once (void)
{
	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);
	ValaCCodeArrayModule_private_offset = g_type_add_instance_private (vala_ccode_array_module_type_id, sizeof (ValaCCodeArrayModulePrivate));
	return vala_ccode_array_module_type_id;
}

GType
vala_ccode_array_module_get_type (void)
{
	static volatile gsize vala_ccode_array_module_type_id__once = 0;
	if (g_once_init_enter (&vala_ccode_array_module_type_id__once)) {
		GType vala_ccode_array_module_type_id;
		vala_ccode_array_module_type_id = vala_ccode_array_module_get_type_once ();
		g_once_init_leave (&vala_ccode_array_module_type_id__once, vala_ccode_array_module_type_id);
	}
	return vala_ccode_array_module_type_id__once;
}

