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

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

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

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

#include <glib.h>
#include <glib-object.h>
#include "valacodegen.h"
#include <vala.h>
#include <valaccode.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>

#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _vala_typeregister_function_unref0(var) ((var == NULL) ? NULL : (var = (vala_typeregister_function_unref (var), NULL)))
#define _vala_ccode_declarator_suffix_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_declarator_suffix_unref (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_ccode_base_module_emit_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_base_module_emit_context_unref (var), NULL)))

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

typedef struct _ValaGLibValue ValaGLibValue;
typedef struct _ValaGLibValueClass ValaGLibValueClass;
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))


static gpointer vala_ccode_struct_module_parent_class = NULL;

static void vala_ccode_struct_module_real_generate_struct_declaration (ValaCCodeBaseModule* base, ValaStruct* st, ValaCCodeFile* decl_space);
static void vala_ccode_struct_module_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st);
static void vala_ccode_struct_module_begin_struct_destroy_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_copy_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_destroy_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_dup_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_free_function (ValaCCodeStructModule* self, ValaStruct* st);
G_GNUC_INTERNAL GType vala_glib_value_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
G_GNUC_INTERNAL ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);
G_GNUC_INTERNAL ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);


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


static void vala_ccode_struct_module_real_generate_struct_declaration (ValaCCodeBaseModule* base, ValaStruct* st, ValaCCodeFile* decl_space) {
	ValaCCodeStructModule * self;
	ValaCCodeFile* _tmp0_;
	ValaStruct* _tmp1_;
	ValaStruct* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	ValaStruct* _tmp9_;
	gboolean _tmp10_;
	ValaStruct* _tmp66_;
	gboolean _tmp67_;
	ValaCCodeStruct* instance_struct = NULL;
	ValaStruct* _tmp93_;
	gchar* _tmp94_;
	gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* _tmp97_;
	ValaCCodeStruct* _tmp98_;
	ValaCCodeStruct* _tmp99_;
	ValaCCodeModifiers _tmp100_ = 0;
	ValaStruct* _tmp101_;
	ValaVersionAttribute* _tmp102_;
	ValaVersionAttribute* _tmp103_;
	gboolean _tmp104_;
	gboolean _tmp105_;
	ValaCCodeStruct* _tmp106_;
	ValaCCodeStruct* _tmp107_;
	ValaCCodeModifiers _tmp108_;
	ValaCCodeModifiers _tmp109_;
	ValaStruct* _tmp229_;
	ValaStruct* _tmp230_;
	ValaStruct* _tmp231_;
	ValaCCodeFunction* function = NULL;
	ValaStruct* _tmp260_;
	gchar* _tmp261_;
	gchar* _tmp262_;
	ValaStruct* _tmp263_;
	gchar* _tmp264_;
	gchar* _tmp265_;
	gchar* _tmp266_;
	gchar* _tmp267_;
	ValaCCodeFunction* _tmp268_;
	ValaCCodeFunction* _tmp269_;
	ValaStruct* _tmp270_;
	gboolean _tmp271_;
	ValaCCodeFunction* _tmp281_;
	ValaStruct* _tmp282_;
	gchar* _tmp283_;
	gchar* _tmp284_;
	gchar* _tmp285_;
	gchar* _tmp286_;
	gchar* _tmp287_;
	gchar* _tmp288_;
	ValaCCodeParameter* _tmp289_;
	ValaCCodeParameter* _tmp290_;
	ValaCCodeFile* _tmp291_;
	ValaCCodeFunction* _tmp292_;
	ValaStruct* _tmp293_;
	gchar* _tmp294_;
	gchar* _tmp295_;
	ValaCCodeFunction* _tmp296_;
	ValaStruct* _tmp297_;
	gboolean _tmp298_;
	ValaCCodeFunction* _tmp308_;
	ValaStruct* _tmp309_;
	gchar* _tmp310_;
	gchar* _tmp311_;
	gchar* _tmp312_;
	gchar* _tmp313_;
	ValaCCodeParameter* _tmp314_;
	ValaCCodeParameter* _tmp315_;
	ValaCCodeFile* _tmp316_;
	ValaCCodeFunction* _tmp317_;
	ValaStruct* _tmp318_;
	gboolean _tmp319_;
	self = (ValaCCodeStructModule*) base;
	g_return_if_fail (st != NULL);
	g_return_if_fail (decl_space != NULL);
	_tmp0_ = decl_space;
	_tmp1_ = st;
	_tmp2_ = st;
	_tmp3_ = vala_get_ccode_name ((ValaCodeNode*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_ccode_base_module_add_symbol_declaration ((ValaCCodeBaseModule*) self, _tmp0_, (ValaSymbol*) _tmp1_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	if (_tmp6_) {
		return;
	}
	_tmp9_ = st;
	_tmp10_ = vala_struct_is_boolean_type (_tmp9_);
	if (_tmp10_) {
		_tmp8_ = TRUE;
	} else {
		ValaStruct* _tmp11_;
		gboolean _tmp12_;
		_tmp11_ = st;
		_tmp12_ = vala_struct_is_integer_type (_tmp11_);
		_tmp8_ = _tmp12_;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		ValaStruct* _tmp13_;
		gboolean _tmp14_;
		_tmp13_ = st;
		_tmp14_ = vala_struct_is_floating_type (_tmp13_);
		_tmp7_ = _tmp14_;
	}
	if (_tmp7_) {
		ValaStruct* _tmp15_;
		ValaStruct* _tmp16_;
		ValaStruct* _tmp17_;
		_tmp15_ = st;
		_tmp16_ = vala_struct_get_base_struct (_tmp15_);
		_tmp17_ = _tmp16_;
		if (_tmp17_ != NULL) {
			ValaStruct* _tmp18_;
			ValaStruct* _tmp19_;
			ValaStruct* _tmp20_;
			ValaCCodeFile* _tmp21_;
			ValaCCodeFile* _tmp22_;
			ValaStruct* _tmp23_;
			ValaStruct* _tmp24_;
			ValaStruct* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			ValaStruct* _tmp28_;
			gchar* _tmp29_;
			gchar* _tmp30_;
			ValaCCodeVariableDeclarator* _tmp31_;
			ValaCCodeVariableDeclarator* _tmp32_;
			ValaCCodeTypeDefinition* _tmp33_;
			ValaCCodeTypeDefinition* _tmp34_;
			_tmp18_ = st;
			_tmp19_ = vala_struct_get_base_struct (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = decl_space;
			vala_ccode_base_module_generate_struct_declaration ((ValaCCodeBaseModule*) self, _tmp20_, _tmp21_);
			_tmp22_ = decl_space;
			_tmp23_ = st;
			_tmp24_ = vala_struct_get_base_struct (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = vala_get_ccode_name ((ValaCodeNode*) _tmp25_);
			_tmp27_ = _tmp26_;
			_tmp28_ = st;
			_tmp29_ = vala_get_ccode_name ((ValaCodeNode*) _tmp28_);
			_tmp30_ = _tmp29_;
			_tmp31_ = vala_ccode_variable_declarator_new (_tmp30_, NULL, NULL);
			_tmp32_ = _tmp31_;
			_tmp33_ = vala_ccode_type_definition_new (_tmp27_, (ValaCCodeDeclarator*) _tmp32_);
			_tmp34_ = _tmp33_;
			vala_ccode_file_add_type_declaration (_tmp22_, (ValaCCodeNode*) _tmp34_);
			_vala_ccode_node_unref0 (_tmp34_);
			_vala_ccode_node_unref0 (_tmp32_);
			_g_free0 (_tmp30_);
			_g_free0 (_tmp27_);
		} else {
			gchar* typename = NULL;
			ValaStruct* _tmp35_;
			gboolean _tmp36_;
			ValaCCodeFile* _tmp57_;
			const gchar* _tmp58_;
			ValaStruct* _tmp59_;
			gchar* _tmp60_;
			gchar* _tmp61_;
			ValaCCodeVariableDeclarator* _tmp62_;
			ValaCCodeVariableDeclarator* _tmp63_;
			ValaCCodeTypeDefinition* _tmp64_;
			ValaCCodeTypeDefinition* _tmp65_;
			typename = NULL;
			_tmp35_ = st;
			_tmp36_ = vala_struct_is_boolean_type (_tmp35_);
			if (_tmp36_) {
				ValaCCodeFile* _tmp37_;
				gchar* _tmp38_;
				_tmp37_ = decl_space;
				vala_ccode_file_add_include (_tmp37_, "stdbool.h", FALSE);
				_tmp38_ = g_strdup ("bool");
				_g_free0 (typename);
				typename = _tmp38_;
			} else {
				ValaStruct* _tmp39_;
				gboolean _tmp40_;
				_tmp39_ = st;
				_tmp40_ = vala_struct_is_integer_type (_tmp39_);
				if (_tmp40_) {
					ValaCCodeFile* _tmp41_;
					const gchar* _tmp42_ = NULL;
					ValaStruct* _tmp43_;
					gboolean _tmp44_;
					gboolean _tmp45_;
					ValaStruct* _tmp46_;
					gint _tmp47_;
					gint _tmp48_;
					gchar* _tmp49_;
					_tmp41_ = decl_space;
					vala_ccode_file_add_include (_tmp41_, "stdint.h", FALSE);
					_tmp43_ = st;
					_tmp44_ = vala_struct_get_signed (_tmp43_);
					_tmp45_ = _tmp44_;
					if (_tmp45_) {
						_tmp42_ = "";
					} else {
						_tmp42_ = "u";
					}
					_tmp46_ = st;
					_tmp47_ = vala_struct_get_width (_tmp46_);
					_tmp48_ = _tmp47_;
					_tmp49_ = g_strdup_printf ("%sint%d_t", _tmp42_, _tmp48_);
					_g_free0 (typename);
					typename = _tmp49_;
				} else {
					ValaStruct* _tmp50_;
					gboolean _tmp51_;
					_tmp50_ = st;
					_tmp51_ = vala_struct_is_floating_type (_tmp50_);
					if (_tmp51_) {
						const gchar* _tmp52_ = NULL;
						ValaStruct* _tmp53_;
						gint _tmp54_;
						gint _tmp55_;
						gchar* _tmp56_;
						_tmp53_ = st;
						_tmp54_ = vala_struct_get_width (_tmp53_);
						_tmp55_ = _tmp54_;
						if (_tmp55_ == 64) {
							_tmp52_ = "double";
						} else {
							_tmp52_ = "float";
						}
						_tmp56_ = g_strdup (_tmp52_);
						_g_free0 (typename);
						typename = _tmp56_;
					}
				}
			}
			_tmp57_ = decl_space;
			_tmp58_ = typename;
			_tmp59_ = st;
			_tmp60_ = vala_get_ccode_name ((ValaCodeNode*) _tmp59_);
			_tmp61_ = _tmp60_;
			_tmp62_ = vala_ccode_variable_declarator_new (_tmp61_, NULL, NULL);
			_tmp63_ = _tmp62_;
			_tmp64_ = vala_ccode_type_definition_new (_tmp58_, (ValaCCodeDeclarator*) _tmp63_);
			_tmp65_ = _tmp64_;
			vala_ccode_file_add_type_declaration (_tmp57_, (ValaCCodeNode*) _tmp65_);
			_vala_ccode_node_unref0 (_tmp65_);
			_vala_ccode_node_unref0 (_tmp63_);
			_g_free0 (_tmp61_);
			_g_free0 (typename);
		}
		return;
	}
	_tmp66_ = st;
	_tmp67_ = vala_get_ccode_has_type_id ((ValaTypeSymbol*) _tmp66_);
	if (_tmp67_) {
		ValaCCodeFile* _tmp68_;
		ValaCCodeFile* _tmp69_;
		ValaCCodeNewline* _tmp70_;
		ValaCCodeNewline* _tmp71_;
		gchar* macro = NULL;
		ValaStruct* _tmp72_;
		gchar* _tmp73_;
		gchar* _tmp74_;
		gchar* _tmp75_;
		gchar* _tmp76_;
		ValaCCodeFile* _tmp77_;
		ValaStruct* _tmp78_;
		gchar* _tmp79_;
		gchar* _tmp80_;
		const gchar* _tmp81_;
		ValaCCodeMacroReplacement* _tmp82_;
		ValaCCodeMacroReplacement* _tmp83_;
		ValaStructRegisterFunction* type_fun = NULL;
		ValaStruct* _tmp84_;
		ValaCodeContext* _tmp85_;
		ValaCodeContext* _tmp86_;
		ValaStructRegisterFunction* _tmp87_;
		ValaStructRegisterFunction* _tmp88_;
		ValaCCodeFile* _tmp89_;
		ValaStructRegisterFunction* _tmp90_;
		ValaCCodeFragment* _tmp91_;
		ValaCCodeFragment* _tmp92_;
		_tmp68_ = decl_space;
		vala_ccode_file_add_include (_tmp68_, "glib-object.h", FALSE);
		_tmp69_ = decl_space;
		_tmp70_ = vala_ccode_newline_new ();
		_tmp71_ = _tmp70_;
		vala_ccode_file_add_type_declaration (_tmp69_, (ValaCCodeNode*) _tmp71_);
		_vala_ccode_node_unref0 (_tmp71_);
		_tmp72_ = st;
		_tmp73_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp72_, NULL);
		_tmp74_ = _tmp73_;
		_tmp75_ = g_strdup_printf ("(%s_get_type ())", _tmp74_);
		_tmp76_ = _tmp75_;
		_g_free0 (_tmp74_);
		macro = _tmp76_;
		_tmp77_ = decl_space;
		_tmp78_ = st;
		_tmp79_ = vala_get_ccode_type_id ((ValaCodeNode*) _tmp78_);
		_tmp80_ = _tmp79_;
		_tmp81_ = macro;
		_tmp82_ = vala_ccode_macro_replacement_new (_tmp80_, _tmp81_);
		_tmp83_ = _tmp82_;
		vala_ccode_file_add_type_declaration (_tmp77_, (ValaCCodeNode*) _tmp83_);
		_vala_ccode_node_unref0 (_tmp83_);
		_g_free0 (_tmp80_);
		_tmp84_ = st;
		_tmp85_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp86_ = _tmp85_;
		_tmp87_ = vala_struct_register_function_new (_tmp84_, _tmp86_);
		type_fun = _tmp87_;
		_tmp88_ = type_fun;
		vala_typeregister_function_init_from_type ((ValaTypeRegisterFunction*) _tmp88_, FALSE, TRUE);
		_tmp89_ = decl_space;
		_tmp90_ = type_fun;
		_tmp91_ = vala_typeregister_function_get_declaration ((ValaTypeRegisterFunction*) _tmp90_);
		_tmp92_ = _tmp91_;
		vala_ccode_file_add_type_member_declaration (_tmp89_, (ValaCCodeNode*) _tmp92_);
		_vala_ccode_node_unref0 (_tmp92_);
		_vala_typeregister_function_unref0 (type_fun);
		_g_free0 (macro);
	}
	_tmp93_ = st;
	_tmp94_ = vala_get_ccode_name ((ValaCodeNode*) _tmp93_);
	_tmp95_ = _tmp94_;
	_tmp96_ = g_strdup_printf ("_%s", _tmp95_);
	_tmp97_ = _tmp96_;
	_tmp98_ = vala_ccode_struct_new (_tmp97_);
	_tmp99_ = _tmp98_;
	_g_free0 (_tmp97_);
	_g_free0 (_tmp95_);
	instance_struct = _tmp99_;
	_tmp101_ = st;
	_tmp102_ = vala_symbol_get_version ((ValaSymbol*) _tmp101_);
	_tmp103_ = _tmp102_;
	_tmp104_ = vala_version_attribute_get_deprecated (_tmp103_);
	_tmp105_ = _tmp104_;
	if (_tmp105_) {
		_tmp100_ = VALA_CCODE_MODIFIERS_DEPRECATED;
	} else {
		_tmp100_ = 0;
	}
	_tmp106_ = instance_struct;
	_tmp107_ = instance_struct;
	_tmp108_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp107_);
	_tmp109_ = _tmp108_;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp107_, _tmp109_ | _tmp100_);
	{
		ValaList* _f_list = NULL;
		ValaStruct* _tmp110_;
		ValaList* _tmp111_;
		gint _f_size = 0;
		ValaList* _tmp112_;
		gint _tmp113_;
		gint _tmp114_;
		gint _f_index = 0;
		_tmp110_ = st;
		_tmp111_ = vala_struct_get_fields (_tmp110_);
		_f_list = _tmp111_;
		_tmp112_ = _f_list;
		_tmp113_ = vala_collection_get_size ((ValaCollection*) _tmp112_);
		_tmp114_ = _tmp113_;
		_f_size = _tmp114_;
		_f_index = -1;
		while (TRUE) {
			gint _tmp115_;
			gint _tmp116_;
			gint _tmp117_;
			ValaField* f = NULL;
			ValaList* _tmp118_;
			gint _tmp119_;
			gpointer _tmp120_;
			ValaField* _tmp121_;
			ValaMemberBinding _tmp122_;
			ValaMemberBinding _tmp123_;
			_tmp115_ = _f_index;
			_f_index = _tmp115_ + 1;
			_tmp116_ = _f_index;
			_tmp117_ = _f_size;
			if (!(_tmp116_ < _tmp117_)) {
				break;
			}
			_tmp118_ = _f_list;
			_tmp119_ = _f_index;
			_tmp120_ = vala_list_get (_tmp118_, _tmp119_);
			f = (ValaField*) _tmp120_;
			_tmp121_ = f;
			_tmp122_ = vala_field_get_binding (_tmp121_);
			_tmp123_ = _tmp122_;
			if (_tmp123_ == VALA_MEMBER_BINDING_INSTANCE) {
				ValaField* _tmp124_;
				ValaDataType* _tmp125_;
				ValaDataType* _tmp126_;
				ValaCCodeFile* _tmp127_;
				ValaCCodeModifiers _tmp128_ = 0;
				ValaField* _tmp129_;
				gboolean _tmp130_;
				gboolean _tmp131_;
				ValaCCodeModifiers _tmp132_ = 0;
				ValaField* _tmp133_;
				ValaVersionAttribute* _tmp134_;
				ValaVersionAttribute* _tmp135_;
				gboolean _tmp136_;
				gboolean _tmp137_;
				ValaCCodeModifiers modifiers = 0;
				ValaCCodeStruct* _tmp138_;
				ValaField* _tmp139_;
				ValaDataType* _tmp140_;
				ValaDataType* _tmp141_;
				gchar* _tmp142_;
				gchar* _tmp143_;
				ValaField* _tmp144_;
				gchar* _tmp145_;
				gchar* _tmp146_;
				ValaCCodeModifiers _tmp147_;
				ValaField* _tmp148_;
				ValaDataType* _tmp149_;
				ValaDataType* _tmp150_;
				ValaCCodeDeclaratorSuffix* _tmp151_;
				ValaCCodeDeclaratorSuffix* _tmp152_;
				gboolean _tmp153_ = FALSE;
				ValaField* _tmp154_;
				ValaDataType* _tmp155_;
				ValaDataType* _tmp156_;
				_tmp124_ = f;
				_tmp125_ = vala_variable_get_variable_type ((ValaVariable*) _tmp124_);
				_tmp126_ = _tmp125_;
				_tmp127_ = decl_space;
				vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp126_, _tmp127_);
				_tmp129_ = f;
				_tmp130_ = vala_field_get_is_volatile (_tmp129_);
				_tmp131_ = _tmp130_;
				if (_tmp131_) {
					_tmp128_ = VALA_CCODE_MODIFIERS_VOLATILE;
				} else {
					_tmp128_ = 0;
				}
				_tmp133_ = f;
				_tmp134_ = vala_symbol_get_version ((ValaSymbol*) _tmp133_);
				_tmp135_ = _tmp134_;
				_tmp136_ = vala_version_attribute_get_deprecated (_tmp135_);
				_tmp137_ = _tmp136_;
				if (_tmp137_) {
					_tmp132_ = VALA_CCODE_MODIFIERS_DEPRECATED;
				} else {
					_tmp132_ = 0;
				}
				modifiers = _tmp128_ | _tmp132_;
				_tmp138_ = instance_struct;
				_tmp139_ = f;
				_tmp140_ = vala_variable_get_variable_type ((ValaVariable*) _tmp139_);
				_tmp141_ = _tmp140_;
				_tmp142_ = vala_get_ccode_name ((ValaCodeNode*) _tmp141_);
				_tmp143_ = _tmp142_;
				_tmp144_ = f;
				_tmp145_ = vala_get_ccode_name ((ValaCodeNode*) _tmp144_);
				_tmp146_ = _tmp145_;
				_tmp147_ = modifiers;
				_tmp148_ = f;
				_tmp149_ = vala_variable_get_variable_type ((ValaVariable*) _tmp148_);
				_tmp150_ = _tmp149_;
				_tmp151_ = vala_ccode_base_module_get_ccode_declarator_suffix ((ValaCCodeBaseModule*) self, _tmp150_);
				_tmp152_ = _tmp151_;
				vala_ccode_struct_add_field (_tmp138_, _tmp143_, _tmp146_, _tmp147_, _tmp152_);
				_vala_ccode_declarator_suffix_unref0 (_tmp152_);
				_g_free0 (_tmp146_);
				_g_free0 (_tmp143_);
				_tmp154_ = f;
				_tmp155_ = vala_variable_get_variable_type ((ValaVariable*) _tmp154_);
				_tmp156_ = _tmp155_;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp156_, VALA_TYPE_ARRAY_TYPE)) {
					ValaField* _tmp157_;
					gboolean _tmp158_;
					_tmp157_ = f;
					_tmp158_ = vala_get_ccode_array_length ((ValaCodeNode*) _tmp157_);
					_tmp153_ = _tmp158_;
				} else {
					_tmp153_ = FALSE;
				}
				if (_tmp153_) {
					ValaArrayType* array_type = NULL;
					ValaField* _tmp159_;
					ValaDataType* _tmp160_;
					ValaDataType* _tmp161_;
					ValaArrayType* _tmp162_;
					ValaArrayType* _tmp163_;
					gboolean _tmp164_;
					gboolean _tmp165_;
					_tmp159_ = f;
					_tmp160_ = vala_variable_get_variable_type ((ValaVariable*) _tmp159_);
					_tmp161_ = _tmp160_;
					_tmp162_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp161_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
					array_type = _tmp162_;
					_tmp163_ = array_type;
					_tmp164_ = vala_array_type_get_fixed_length (_tmp163_);
					_tmp165_ = _tmp164_;
					if (!_tmp165_) {
						ValaDataType* len_type = NULL;
						ValaDataType* _tmp166_;
						ValaDataType* _tmp167_;
						gboolean _tmp190_ = FALSE;
						ValaArrayType* _tmp191_;
						gint _tmp192_;
						gint _tmp193_;
						_tmp166_ = ((ValaCCodeBaseModule*) self)->int_type;
						_tmp167_ = vala_data_type_copy (_tmp166_);
						len_type = _tmp167_;
						{
							gint dim = 0;
							dim = 1;
							{
								gboolean _tmp168_ = FALSE;
								_tmp168_ = TRUE;
								while (TRUE) {
									gint _tmp170_;
									ValaArrayType* _tmp171_;
									gint _tmp172_;
									gint _tmp173_;
									gchar* length_cname = NULL;
									ValaField* _tmp174_;
									gchar* _tmp175_;
									gchar* _tmp176_;
									gboolean _tmp177_;
									ValaCCodeStruct* _tmp185_;
									ValaDataType* _tmp186_;
									gchar* _tmp187_;
									gchar* _tmp188_;
									const gchar* _tmp189_;
									if (!_tmp168_) {
										gint _tmp169_;
										_tmp169_ = dim;
										dim = _tmp169_ + 1;
									}
									_tmp168_ = FALSE;
									_tmp170_ = dim;
									_tmp171_ = array_type;
									_tmp172_ = vala_array_type_get_rank (_tmp171_);
									_tmp173_ = _tmp172_;
									if (!(_tmp170_ <= _tmp173_)) {
										break;
									}
									_tmp174_ = f;
									_tmp175_ = vala_get_ccode_array_length_name ((ValaCodeNode*) _tmp174_);
									_tmp176_ = _tmp175_;
									_tmp177_ = _tmp176_ != NULL;
									_g_free0 (_tmp176_);
									if (_tmp177_) {
										ValaField* _tmp178_;
										gchar* _tmp179_;
										_tmp178_ = f;
										_tmp179_ = vala_get_ccode_array_length_name ((ValaCodeNode*) _tmp178_);
										_g_free0 (length_cname);
										length_cname = _tmp179_;
									} else {
										ValaField* _tmp180_;
										gchar* _tmp181_;
										gchar* _tmp182_;
										gint _tmp183_;
										gchar* _tmp184_;
										_tmp180_ = f;
										_tmp181_ = vala_get_ccode_name ((ValaCodeNode*) _tmp180_);
										_tmp182_ = _tmp181_;
										_tmp183_ = dim;
										_tmp184_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp182_, _tmp183_);
										_g_free0 (length_cname);
										length_cname = _tmp184_;
										_g_free0 (_tmp182_);
									}
									_tmp185_ = instance_struct;
									_tmp186_ = len_type;
									_tmp187_ = vala_get_ccode_name ((ValaCodeNode*) _tmp186_);
									_tmp188_ = _tmp187_;
									_tmp189_ = length_cname;
									vala_ccode_struct_add_field (_tmp185_, _tmp188_, _tmp189_, 0, NULL);
									_g_free0 (_tmp188_);
									_g_free0 (length_cname);
								}
							}
						}
						_tmp191_ = array_type;
						_tmp192_ = vala_array_type_get_rank (_tmp191_);
						_tmp193_ = _tmp192_;
						if (_tmp193_ == 1) {
							ValaField* _tmp194_;
							gboolean _tmp195_;
							_tmp194_ = f;
							_tmp195_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp194_);
							_tmp190_ = _tmp195_;
						} else {
							_tmp190_ = FALSE;
						}
						if (_tmp190_) {
							ValaCCodeStruct* _tmp196_;
							ValaDataType* _tmp197_;
							gchar* _tmp198_;
							gchar* _tmp199_;
							ValaField* _tmp200_;
							gchar* _tmp201_;
							gchar* _tmp202_;
							gchar* _tmp203_;
							gchar* _tmp204_;
							_tmp196_ = instance_struct;
							_tmp197_ = len_type;
							_tmp198_ = vala_get_ccode_name ((ValaCodeNode*) _tmp197_);
							_tmp199_ = _tmp198_;
							_tmp200_ = f;
							_tmp201_ = vala_get_ccode_name ((ValaCodeNode*) _tmp200_);
							_tmp202_ = _tmp201_;
							_tmp203_ = vala_ccode_base_module_get_array_size_cname ((ValaCCodeBaseModule*) self, _tmp202_);
							_tmp204_ = _tmp203_;
							vala_ccode_struct_add_field (_tmp196_, _tmp199_, _tmp204_, 0, NULL);
							_g_free0 (_tmp204_);
							_g_free0 (_tmp202_);
							_g_free0 (_tmp199_);
						}
						_vala_code_node_unref0 (len_type);
					}
					_vala_code_node_unref0 (array_type);
				} else {
					ValaField* _tmp205_;
					ValaDataType* _tmp206_;
					ValaDataType* _tmp207_;
					_tmp205_ = f;
					_tmp206_ = vala_variable_get_variable_type ((ValaVariable*) _tmp205_);
					_tmp207_ = _tmp206_;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp207_, VALA_TYPE_DELEGATE_TYPE)) {
						ValaDelegateType* delegate_type = NULL;
						ValaField* _tmp208_;
						ValaDataType* _tmp209_;
						ValaDataType* _tmp210_;
						ValaDelegateType* _tmp211_;
						ValaDelegateType* _tmp212_;
						ValaDelegate* _tmp213_;
						ValaDelegate* _tmp214_;
						gboolean _tmp215_;
						gboolean _tmp216_;
						_tmp208_ = f;
						_tmp209_ = vala_variable_get_variable_type ((ValaVariable*) _tmp208_);
						_tmp210_ = _tmp209_;
						_tmp211_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp210_, VALA_TYPE_DELEGATE_TYPE, ValaDelegateType));
						delegate_type = _tmp211_;
						_tmp212_ = delegate_type;
						_tmp213_ = vala_delegate_type_get_delegate_symbol (_tmp212_);
						_tmp214_ = _tmp213_;
						_tmp215_ = vala_delegate_get_has_target (_tmp214_);
						_tmp216_ = _tmp215_;
						if (_tmp216_) {
							ValaCCodeStruct* _tmp217_;
							ValaField* _tmp218_;
							gchar* _tmp219_;
							gchar* _tmp220_;
							ValaDelegateType* _tmp221_;
							gboolean _tmp222_;
							_tmp217_ = instance_struct;
							_tmp218_ = f;
							_tmp219_ = vala_get_ccode_delegate_target_name ((ValaVariable*) _tmp218_);
							_tmp220_ = _tmp219_;
							vala_ccode_struct_add_field (_tmp217_, "gpointer", _tmp220_, 0, NULL);
							_g_free0 (_tmp220_);
							_tmp221_ = delegate_type;
							_tmp222_ = vala_data_type_is_disposable ((ValaDataType*) _tmp221_);
							if (_tmp222_) {
								ValaCCodeStruct* _tmp223_;
								ValaField* _tmp224_;
								gchar* _tmp225_;
								gchar* _tmp226_;
								gchar* _tmp227_;
								gchar* _tmp228_;
								_tmp223_ = instance_struct;
								_tmp224_ = f;
								_tmp225_ = vala_get_ccode_name ((ValaCodeNode*) _tmp224_);
								_tmp226_ = _tmp225_;
								_tmp227_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, _tmp226_);
								_tmp228_ = _tmp227_;
								vala_ccode_struct_add_field (_tmp223_, "GDestroyNotify", _tmp228_, 0, NULL);
								_g_free0 (_tmp228_);
								_g_free0 (_tmp226_);
							}
						}
						_vala_code_node_unref0 (delegate_type);
					}
				}
			}
			_vala_code_node_unref0 (f);
		}
		_vala_iterable_unref0 (_f_list);
	}
	_tmp229_ = st;
	_tmp230_ = vala_struct_get_base_struct (_tmp229_);
	_tmp231_ = _tmp230_;
	if (_tmp231_ == NULL) {
		ValaCCodeFile* _tmp232_;
		ValaStruct* _tmp233_;
		gchar* _tmp234_;
		gchar* _tmp235_;
		gchar* _tmp236_;
		gchar* _tmp237_;
		ValaStruct* _tmp238_;
		gchar* _tmp239_;
		gchar* _tmp240_;
		ValaCCodeVariableDeclarator* _tmp241_;
		ValaCCodeVariableDeclarator* _tmp242_;
		ValaCCodeTypeDefinition* _tmp243_;
		ValaCCodeTypeDefinition* _tmp244_;
		ValaCCodeFile* _tmp245_;
		ValaCCodeStruct* _tmp246_;
		_tmp232_ = decl_space;
		_tmp233_ = st;
		_tmp234_ = vala_get_ccode_name ((ValaCodeNode*) _tmp233_);
		_tmp235_ = _tmp234_;
		_tmp236_ = g_strdup_printf ("struct _%s", _tmp235_);
		_tmp237_ = _tmp236_;
		_tmp238_ = st;
		_tmp239_ = vala_get_ccode_name ((ValaCodeNode*) _tmp238_);
		_tmp240_ = _tmp239_;
		_tmp241_ = vala_ccode_variable_declarator_new (_tmp240_, NULL, NULL);
		_tmp242_ = _tmp241_;
		_tmp243_ = vala_ccode_type_definition_new (_tmp237_, (ValaCCodeDeclarator*) _tmp242_);
		_tmp244_ = _tmp243_;
		vala_ccode_file_add_type_declaration (_tmp232_, (ValaCCodeNode*) _tmp244_);
		_vala_ccode_node_unref0 (_tmp244_);
		_vala_ccode_node_unref0 (_tmp242_);
		_g_free0 (_tmp240_);
		_g_free0 (_tmp237_);
		_g_free0 (_tmp235_);
		_tmp245_ = decl_space;
		_tmp246_ = instance_struct;
		vala_ccode_file_add_type_definition (_tmp245_, (ValaCCodeNode*) _tmp246_);
	} else {
		ValaCCodeFile* _tmp247_;
		ValaStruct* _tmp248_;
		ValaStruct* _tmp249_;
		ValaStruct* _tmp250_;
		gchar* _tmp251_;
		gchar* _tmp252_;
		ValaStruct* _tmp253_;
		gchar* _tmp254_;
		gchar* _tmp255_;
		ValaCCodeVariableDeclarator* _tmp256_;
		ValaCCodeVariableDeclarator* _tmp257_;
		ValaCCodeTypeDefinition* _tmp258_;
		ValaCCodeTypeDefinition* _tmp259_;
		_tmp247_ = decl_space;
		_tmp248_ = st;
		_tmp249_ = vala_struct_get_base_struct (_tmp248_);
		_tmp250_ = _tmp249_;
		_tmp251_ = vala_get_ccode_name ((ValaCodeNode*) _tmp250_);
		_tmp252_ = _tmp251_;
		_tmp253_ = st;
		_tmp254_ = vala_get_ccode_name ((ValaCodeNode*) _tmp253_);
		_tmp255_ = _tmp254_;
		_tmp256_ = vala_ccode_variable_declarator_new (_tmp255_, NULL, NULL);
		_tmp257_ = _tmp256_;
		_tmp258_ = vala_ccode_type_definition_new (_tmp252_, (ValaCCodeDeclarator*) _tmp257_);
		_tmp259_ = _tmp258_;
		vala_ccode_file_add_type_declaration (_tmp247_, (ValaCCodeNode*) _tmp259_);
		_vala_ccode_node_unref0 (_tmp259_);
		_vala_ccode_node_unref0 (_tmp257_);
		_g_free0 (_tmp255_);
		_g_free0 (_tmp252_);
	}
	_tmp260_ = st;
	_tmp261_ = vala_get_ccode_dup_function ((ValaTypeSymbol*) _tmp260_);
	_tmp262_ = _tmp261_;
	_tmp263_ = st;
	_tmp264_ = vala_get_ccode_name ((ValaCodeNode*) _tmp263_);
	_tmp265_ = _tmp264_;
	_tmp266_ = g_strconcat (_tmp265_, "*", NULL);
	_tmp267_ = _tmp266_;
	_tmp268_ = vala_ccode_function_new (_tmp262_, _tmp267_);
	_tmp269_ = _tmp268_;
	_g_free0 (_tmp267_);
	_g_free0 (_tmp265_);
	_g_free0 (_tmp262_);
	function = _tmp269_;
	_tmp270_ = st;
	_tmp271_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp270_);
	if (_tmp271_) {
		ValaCCodeFunction* _tmp272_;
		_tmp272_ = function;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp272_, VALA_CCODE_MODIFIERS_STATIC);
	} else {
		gboolean _tmp273_ = FALSE;
		ValaCodeContext* _tmp274_;
		ValaCodeContext* _tmp275_;
		gboolean _tmp276_;
		gboolean _tmp277_;
		_tmp274_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp275_ = _tmp274_;
		_tmp276_ = vala_code_context_get_hide_internal (_tmp275_);
		_tmp277_ = _tmp276_;
		if (_tmp277_) {
			ValaStruct* _tmp278_;
			gboolean _tmp279_;
			_tmp278_ = st;
			_tmp279_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp278_);
			_tmp273_ = _tmp279_;
		} else {
			_tmp273_ = FALSE;
		}
		if (_tmp273_) {
			ValaCCodeFunction* _tmp280_;
			_tmp280_ = function;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp280_, VALA_CCODE_MODIFIERS_INTERNAL);
		}
	}
	_tmp281_ = function;
	_tmp282_ = st;
	_tmp283_ = vala_get_ccode_name ((ValaCodeNode*) _tmp282_);
	_tmp284_ = _tmp283_;
	_tmp285_ = g_strconcat ("const ", _tmp284_, NULL);
	_tmp286_ = _tmp285_;
	_tmp287_ = g_strconcat (_tmp286_, "*", NULL);
	_tmp288_ = _tmp287_;
	_tmp289_ = vala_ccode_parameter_new ("self", _tmp288_);
	_tmp290_ = _tmp289_;
	vala_ccode_function_add_parameter (_tmp281_, _tmp290_);
	_vala_ccode_node_unref0 (_tmp290_);
	_g_free0 (_tmp288_);
	_g_free0 (_tmp286_);
	_g_free0 (_tmp284_);
	_tmp291_ = decl_space;
	_tmp292_ = function;
	vala_ccode_file_add_function_declaration (_tmp291_, _tmp292_);
	_tmp293_ = st;
	_tmp294_ = vala_get_ccode_free_function ((ValaTypeSymbol*) _tmp293_);
	_tmp295_ = _tmp294_;
	_tmp296_ = vala_ccode_function_new (_tmp295_, "void");
	_vala_ccode_node_unref0 (function);
	function = _tmp296_;
	_g_free0 (_tmp295_);
	_tmp297_ = st;
	_tmp298_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp297_);
	if (_tmp298_) {
		ValaCCodeFunction* _tmp299_;
		_tmp299_ = function;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp299_, VALA_CCODE_MODIFIERS_STATIC);
	} else {
		gboolean _tmp300_ = FALSE;
		ValaCodeContext* _tmp301_;
		ValaCodeContext* _tmp302_;
		gboolean _tmp303_;
		gboolean _tmp304_;
		_tmp301_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp302_ = _tmp301_;
		_tmp303_ = vala_code_context_get_hide_internal (_tmp302_);
		_tmp304_ = _tmp303_;
		if (_tmp304_) {
			ValaStruct* _tmp305_;
			gboolean _tmp306_;
			_tmp305_ = st;
			_tmp306_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp305_);
			_tmp300_ = _tmp306_;
		} else {
			_tmp300_ = FALSE;
		}
		if (_tmp300_) {
			ValaCCodeFunction* _tmp307_;
			_tmp307_ = function;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp307_, VALA_CCODE_MODIFIERS_INTERNAL);
		}
	}
	_tmp308_ = function;
	_tmp309_ = st;
	_tmp310_ = vala_get_ccode_name ((ValaCodeNode*) _tmp309_);
	_tmp311_ = _tmp310_;
	_tmp312_ = g_strconcat (_tmp311_, "*", NULL);
	_tmp313_ = _tmp312_;
	_tmp314_ = vala_ccode_parameter_new ("self", _tmp313_);
	_tmp315_ = _tmp314_;
	vala_ccode_function_add_parameter (_tmp308_, _tmp315_);
	_vala_ccode_node_unref0 (_tmp315_);
	_g_free0 (_tmp313_);
	_g_free0 (_tmp311_);
	_tmp316_ = decl_space;
	_tmp317_ = function;
	vala_ccode_file_add_function_declaration (_tmp316_, _tmp317_);
	_tmp318_ = st;
	_tmp319_ = vala_struct_is_disposable (_tmp318_);
	if (_tmp319_) {
		ValaStruct* _tmp320_;
		gchar* _tmp321_;
		gchar* _tmp322_;
		ValaCCodeFunction* _tmp323_;
		ValaStruct* _tmp324_;
		gboolean _tmp325_;
		ValaCCodeFunction* _tmp335_;
		ValaStruct* _tmp336_;
		gchar* _tmp337_;
		gchar* _tmp338_;
		gchar* _tmp339_;
		gchar* _tmp340_;
		gchar* _tmp341_;
		gchar* _tmp342_;
		ValaCCodeParameter* _tmp343_;
		ValaCCodeParameter* _tmp344_;
		ValaCCodeFunction* _tmp345_;
		ValaStruct* _tmp346_;
		gchar* _tmp347_;
		gchar* _tmp348_;
		gchar* _tmp349_;
		gchar* _tmp350_;
		ValaCCodeParameter* _tmp351_;
		ValaCCodeParameter* _tmp352_;
		ValaCCodeFile* _tmp353_;
		ValaCCodeFunction* _tmp354_;
		ValaStruct* _tmp355_;
		gchar* _tmp356_;
		gchar* _tmp357_;
		ValaCCodeFunction* _tmp358_;
		ValaStruct* _tmp359_;
		gboolean _tmp360_;
		ValaCCodeFunction* _tmp370_;
		ValaStruct* _tmp371_;
		gchar* _tmp372_;
		gchar* _tmp373_;
		gchar* _tmp374_;
		gchar* _tmp375_;
		ValaCCodeParameter* _tmp376_;
		ValaCCodeParameter* _tmp377_;
		ValaCCodeFile* _tmp378_;
		ValaCCodeFunction* _tmp379_;
		_tmp320_ = st;
		_tmp321_ = vala_get_ccode_copy_function ((ValaTypeSymbol*) _tmp320_);
		_tmp322_ = _tmp321_;
		_tmp323_ = vala_ccode_function_new (_tmp322_, "void");
		_vala_ccode_node_unref0 (function);
		function = _tmp323_;
		_g_free0 (_tmp322_);
		_tmp324_ = st;
		_tmp325_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp324_);
		if (_tmp325_) {
			ValaCCodeFunction* _tmp326_;
			_tmp326_ = function;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp326_, VALA_CCODE_MODIFIERS_STATIC);
		} else {
			gboolean _tmp327_ = FALSE;
			ValaCodeContext* _tmp328_;
			ValaCodeContext* _tmp329_;
			gboolean _tmp330_;
			gboolean _tmp331_;
			_tmp328_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
			_tmp329_ = _tmp328_;
			_tmp330_ = vala_code_context_get_hide_internal (_tmp329_);
			_tmp331_ = _tmp330_;
			if (_tmp331_) {
				ValaStruct* _tmp332_;
				gboolean _tmp333_;
				_tmp332_ = st;
				_tmp333_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp332_);
				_tmp327_ = _tmp333_;
			} else {
				_tmp327_ = FALSE;
			}
			if (_tmp327_) {
				ValaCCodeFunction* _tmp334_;
				_tmp334_ = function;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp334_, VALA_CCODE_MODIFIERS_INTERNAL);
			}
		}
		_tmp335_ = function;
		_tmp336_ = st;
		_tmp337_ = vala_get_ccode_name ((ValaCodeNode*) _tmp336_);
		_tmp338_ = _tmp337_;
		_tmp339_ = g_strconcat ("const ", _tmp338_, NULL);
		_tmp340_ = _tmp339_;
		_tmp341_ = g_strconcat (_tmp340_, "*", NULL);
		_tmp342_ = _tmp341_;
		_tmp343_ = vala_ccode_parameter_new ("self", _tmp342_);
		_tmp344_ = _tmp343_;
		vala_ccode_function_add_parameter (_tmp335_, _tmp344_);
		_vala_ccode_node_unref0 (_tmp344_);
		_g_free0 (_tmp342_);
		_g_free0 (_tmp340_);
		_g_free0 (_tmp338_);
		_tmp345_ = function;
		_tmp346_ = st;
		_tmp347_ = vala_get_ccode_name ((ValaCodeNode*) _tmp346_);
		_tmp348_ = _tmp347_;
		_tmp349_ = g_strconcat (_tmp348_, "*", NULL);
		_tmp350_ = _tmp349_;
		_tmp351_ = vala_ccode_parameter_new ("dest", _tmp350_);
		_tmp352_ = _tmp351_;
		vala_ccode_function_add_parameter (_tmp345_, _tmp352_);
		_vala_ccode_node_unref0 (_tmp352_);
		_g_free0 (_tmp350_);
		_g_free0 (_tmp348_);
		_tmp353_ = decl_space;
		_tmp354_ = function;
		vala_ccode_file_add_function_declaration (_tmp353_, _tmp354_);
		_tmp355_ = st;
		_tmp356_ = vala_get_ccode_destroy_function ((ValaTypeSymbol*) _tmp355_);
		_tmp357_ = _tmp356_;
		_tmp358_ = vala_ccode_function_new (_tmp357_, "void");
		_vala_ccode_node_unref0 (function);
		function = _tmp358_;
		_g_free0 (_tmp357_);
		_tmp359_ = st;
		_tmp360_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp359_);
		if (_tmp360_) {
			ValaCCodeFunction* _tmp361_;
			_tmp361_ = function;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp361_, VALA_CCODE_MODIFIERS_STATIC);
		} else {
			gboolean _tmp362_ = FALSE;
			ValaCodeContext* _tmp363_;
			ValaCodeContext* _tmp364_;
			gboolean _tmp365_;
			gboolean _tmp366_;
			_tmp363_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
			_tmp364_ = _tmp363_;
			_tmp365_ = vala_code_context_get_hide_internal (_tmp364_);
			_tmp366_ = _tmp365_;
			if (_tmp366_) {
				ValaStruct* _tmp367_;
				gboolean _tmp368_;
				_tmp367_ = st;
				_tmp368_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp367_);
				_tmp362_ = _tmp368_;
			} else {
				_tmp362_ = FALSE;
			}
			if (_tmp362_) {
				ValaCCodeFunction* _tmp369_;
				_tmp369_ = function;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp369_, VALA_CCODE_MODIFIERS_INTERNAL);
			}
		}
		_tmp370_ = function;
		_tmp371_ = st;
		_tmp372_ = vala_get_ccode_name ((ValaCodeNode*) _tmp371_);
		_tmp373_ = _tmp372_;
		_tmp374_ = g_strconcat (_tmp373_, "*", NULL);
		_tmp375_ = _tmp374_;
		_tmp376_ = vala_ccode_parameter_new ("self", _tmp375_);
		_tmp377_ = _tmp376_;
		vala_ccode_function_add_parameter (_tmp370_, _tmp377_);
		_vala_ccode_node_unref0 (_tmp377_);
		_g_free0 (_tmp375_);
		_g_free0 (_tmp373_);
		_tmp378_ = decl_space;
		_tmp379_ = function;
		vala_ccode_file_add_function_declaration (_tmp378_, _tmp379_);
	}
	_vala_ccode_node_unref0 (function);
	_vala_ccode_node_unref0 (instance_struct);
}


static gpointer _vala_ccode_base_module_emit_context_ref0 (gpointer self) {
	return self ? vala_ccode_base_module_emit_context_ref (self) : NULL;
}


static void vala_ccode_struct_module_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st) {
	ValaCCodeStructModule * self;
	ValaStruct* _tmp0_;
	ValaCCodeBaseModuleEmitContext* _tmp1_;
	ValaCCodeBaseModuleEmitContext* _tmp2_;
	ValaStruct* _tmp3_;
	ValaSourceReference* _tmp4_;
	ValaSourceReference* _tmp5_;
	gboolean _tmp6_ = FALSE;
	ValaStruct* _tmp7_;
	gboolean _tmp8_;
	ValaCCodeBaseModuleEmitContext* old_instance_finalize_context = NULL;
	ValaCCodeBaseModuleEmitContext* _tmp23_;
	ValaCCodeBaseModuleEmitContext* _tmp24_;
	ValaCCodeBaseModuleEmitContext* _tmp25_;
	ValaStruct* _tmp26_;
	ValaCCodeFile* _tmp27_;
	ValaStruct* _tmp28_;
	gboolean _tmp29_;
	ValaStruct* _tmp32_;
	gboolean _tmp33_;
	gboolean _tmp36_ = FALSE;
	gboolean _tmp37_ = FALSE;
	ValaStruct* _tmp38_;
	gboolean _tmp39_;
	ValaStruct* _tmp47_;
	gboolean _tmp48_ = FALSE;
	gboolean _tmp49_ = FALSE;
	ValaStruct* _tmp50_;
	gboolean _tmp51_;
	ValaCCodeBaseModuleEmitContext* _tmp62_;
	ValaCCodeBaseModuleEmitContext* _tmp63_;
	self = (ValaCCodeStructModule*) base;
	g_return_if_fail (st != NULL);
	_tmp0_ = st;
	_tmp1_ = vala_ccode_base_module_emit_context_new ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp2_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp2_);
	_tmp3_ = st;
	_tmp4_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp3_);
	_tmp5_ = _tmp4_;
	vala_ccode_base_module_push_line ((ValaCCodeBaseModule*) self, _tmp5_);
	_tmp7_ = st;
	_tmp8_ = vala_get_ccode_has_type_id ((ValaTypeSymbol*) _tmp7_);
	if (_tmp8_) {
		ValaStruct* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		_tmp9_ = st;
		_tmp10_ = vala_get_ccode_name ((ValaCodeNode*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = strlen (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp6_ = _tmp13_ < 3;
		_g_free0 (_tmp11_);
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		ValaStruct* _tmp14_;
		ValaStruct* _tmp15_;
		ValaSourceReference* _tmp16_;
		ValaSourceReference* _tmp17_;
		ValaStruct* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp14_ = st;
		vala_code_node_set_error ((ValaCodeNode*) _tmp14_, TRUE);
		_tmp15_ = st;
		_tmp16_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = st;
		_tmp19_ = vala_get_ccode_name ((ValaCodeNode*) _tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = g_strdup_printf ("Name `%s' is too short for struct using GType", _tmp20_);
		_tmp22_ = _tmp21_;
		vala_report_error (_tmp17_, _tmp22_);
		_g_free0 (_tmp22_);
		_g_free0 (_tmp20_);
		return;
	}
	_tmp23_ = ((ValaCCodeBaseModule*) self)->instance_finalize_context;
	_tmp24_ = _vala_ccode_base_module_emit_context_ref0 (_tmp23_);
	old_instance_finalize_context = _tmp24_;
	_tmp25_ = vala_ccode_base_module_emit_context_new (NULL);
	_vala_ccode_base_module_emit_context_unref0 (((ValaCCodeBaseModule*) self)->instance_finalize_context);
	((ValaCCodeBaseModule*) self)->instance_finalize_context = _tmp25_;
	_tmp26_ = st;
	_tmp27_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_struct_declaration ((ValaCCodeBaseModule*) self, _tmp26_, _tmp27_);
	_tmp28_ = st;
	_tmp29_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp28_);
	if (!_tmp29_) {
		ValaStruct* _tmp30_;
		ValaCCodeFile* _tmp31_;
		_tmp30_ = st;
		_tmp31_ = ((ValaCCodeBaseModule*) self)->header_file;
		vala_ccode_base_module_generate_struct_declaration ((ValaCCodeBaseModule*) self, _tmp30_, _tmp31_);
	}
	_tmp32_ = st;
	_tmp33_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp32_);
	if (!_tmp33_) {
		ValaStruct* _tmp34_;
		ValaCCodeFile* _tmp35_;
		_tmp34_ = st;
		_tmp35_ = ((ValaCCodeBaseModule*) self)->internal_header_file;
		vala_ccode_base_module_generate_struct_declaration ((ValaCCodeBaseModule*) self, _tmp34_, _tmp35_);
	}
	_tmp38_ = st;
	_tmp39_ = vala_struct_is_boolean_type (_tmp38_);
	if (!_tmp39_) {
		ValaStruct* _tmp40_;
		gboolean _tmp41_;
		_tmp40_ = st;
		_tmp41_ = vala_struct_is_integer_type (_tmp40_);
		_tmp37_ = !_tmp41_;
	} else {
		_tmp37_ = FALSE;
	}
	if (_tmp37_) {
		ValaStruct* _tmp42_;
		gboolean _tmp43_;
		_tmp42_ = st;
		_tmp43_ = vala_struct_is_floating_type (_tmp42_);
		_tmp36_ = !_tmp43_;
	} else {
		_tmp36_ = FALSE;
	}
	if (_tmp36_) {
		ValaStruct* _tmp44_;
		gboolean _tmp45_;
		_tmp44_ = st;
		_tmp45_ = vala_struct_is_disposable (_tmp44_);
		if (_tmp45_) {
			ValaStruct* _tmp46_;
			_tmp46_ = st;
			vala_ccode_struct_module_begin_struct_destroy_function (self, _tmp46_);
		}
	}
	_tmp47_ = st;
	vala_code_node_accept_children ((ValaCodeNode*) _tmp47_, (ValaCodeVisitor*) self);
	_tmp50_ = st;
	_tmp51_ = vala_struct_is_boolean_type (_tmp50_);
	if (!_tmp51_) {
		ValaStruct* _tmp52_;
		gboolean _tmp53_;
		_tmp52_ = st;
		_tmp53_ = vala_struct_is_integer_type (_tmp52_);
		_tmp49_ = !_tmp53_;
	} else {
		_tmp49_ = FALSE;
	}
	if (_tmp49_) {
		ValaStruct* _tmp54_;
		gboolean _tmp55_;
		_tmp54_ = st;
		_tmp55_ = vala_struct_is_floating_type (_tmp54_);
		_tmp48_ = !_tmp55_;
	} else {
		_tmp48_ = FALSE;
	}
	if (_tmp48_) {
		ValaStruct* _tmp56_;
		gboolean _tmp57_;
		ValaStruct* _tmp60_;
		ValaStruct* _tmp61_;
		_tmp56_ = st;
		_tmp57_ = vala_struct_is_disposable (_tmp56_);
		if (_tmp57_) {
			ValaStruct* _tmp58_;
			ValaStruct* _tmp59_;
			_tmp58_ = st;
			vala_ccode_struct_module_add_struct_copy_function (self, _tmp58_);
			_tmp59_ = st;
			vala_ccode_struct_module_add_struct_destroy_function (self, _tmp59_);
		}
		_tmp60_ = st;
		vala_ccode_struct_module_add_struct_dup_function (self, _tmp60_);
		_tmp61_ = st;
		vala_ccode_struct_module_add_struct_free_function (self, _tmp61_);
	}
	_tmp62_ = old_instance_finalize_context;
	_tmp63_ = _vala_ccode_base_module_emit_context_ref0 (_tmp62_);
	_vala_ccode_base_module_emit_context_unref0 (((ValaCCodeBaseModule*) self)->instance_finalize_context);
	((ValaCCodeBaseModule*) self)->instance_finalize_context = _tmp63_;
	vala_ccode_base_module_pop_line ((ValaCCodeBaseModule*) self);
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_vala_ccode_base_module_emit_context_unref0 (old_instance_finalize_context);
}


static void vala_ccode_struct_module_add_struct_dup_function (ValaCCodeStructModule* self, ValaStruct* st) {
	ValaCCodeFunction* function = NULL;
	ValaStruct* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	ValaStruct* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	ValaCCodeFunction* _tmp8_;
	ValaCCodeFunction* _tmp9_;
	ValaStruct* _tmp10_;
	ValaSymbolAccessibility _tmp11_;
	ValaSymbolAccessibility _tmp12_;
	ValaCCodeFunction* _tmp14_;
	ValaStruct* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValaCCodeParameter* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	ValaCCodeFunction* _tmp25_;
	ValaCCodeFunction* _tmp26_;
	ValaStruct* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	ValaCCodeVariableDeclarator* _tmp32_;
	ValaCCodeVariableDeclarator* _tmp33_;
	ValaCCodeFunctionCall* creation_call = NULL;
	ValaCCodeIdentifier* _tmp34_;
	ValaCCodeIdentifier* _tmp35_;
	ValaCCodeFunctionCall* _tmp36_;
	ValaCCodeFunctionCall* _tmp37_;
	ValaCCodeFunctionCall* _tmp38_;
	ValaStruct* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	ValaCCodeConstant* _tmp42_;
	ValaCCodeConstant* _tmp43_;
	ValaCCodeFunctionCall* _tmp44_;
	ValaCCodeConstant* _tmp45_;
	ValaCCodeConstant* _tmp46_;
	ValaCCodeFunction* _tmp47_;
	ValaCCodeFunction* _tmp48_;
	ValaCCodeIdentifier* _tmp49_;
	ValaCCodeIdentifier* _tmp50_;
	ValaCCodeFunctionCall* _tmp51_;
	ValaStruct* _tmp52_;
	gboolean _tmp53_;
	ValaCCodeFunction* _tmp96_;
	ValaCCodeFunction* _tmp97_;
	ValaCCodeIdentifier* _tmp98_;
	ValaCCodeIdentifier* _tmp99_;
	ValaCCodeFile* _tmp100_;
	ValaCCodeFunction* _tmp101_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (st != NULL);
	_tmp0_ = st;
	_tmp1_ = vala_get_ccode_dup_function ((ValaTypeSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = st;
	_tmp4_ = vala_get_ccode_name ((ValaCodeNode*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strconcat (_tmp5_, "*", NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = vala_ccode_function_new (_tmp2_, _tmp7_);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp2_);
	function = _tmp9_;
	_tmp10_ = st;
	_tmp11_ = vala_symbol_get_access ((ValaSymbol*) _tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
		ValaCCodeFunction* _tmp13_;
		_tmp13_ = function;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp13_, VALA_CCODE_MODIFIERS_STATIC);
	}
	_tmp14_ = function;
	_tmp15_ = st;
	_tmp16_ = vala_get_ccode_name ((ValaCodeNode*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strconcat ("const ", _tmp17_, NULL);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strconcat (_tmp19_, "*", NULL);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_parameter_new ("self", _tmp21_);
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_parameter (_tmp14_, _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp19_);
	_g_free0 (_tmp17_);
	_tmp24_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp24_);
	_tmp25_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp26_ = _tmp25_;
	_tmp27_ = st;
	_tmp28_ = vala_get_ccode_name ((ValaCodeNode*) _tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = g_strconcat (_tmp29_, "*", NULL);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_ccode_variable_declarator_new ("dup", NULL, NULL);
	_tmp33_ = _tmp32_;
	vala_ccode_function_add_declaration (_tmp26_, _tmp31_, (ValaCCodeDeclarator*) _tmp33_, 0);
	_vala_ccode_node_unref0 (_tmp33_);
	_g_free0 (_tmp31_);
	_g_free0 (_tmp29_);
	_tmp34_ = vala_ccode_identifier_new ("g_new0");
	_tmp35_ = _tmp34_;
	_tmp36_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp35_);
	_tmp37_ = _tmp36_;
	_vala_ccode_node_unref0 (_tmp35_);
	creation_call = _tmp37_;
	_tmp38_ = creation_call;
	_tmp39_ = st;
	_tmp40_ = vala_get_ccode_name ((ValaCodeNode*) _tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = vala_ccode_constant_new (_tmp41_);
	_tmp43_ = _tmp42_;
	vala_ccode_function_call_add_argument (_tmp38_, (ValaCCodeExpression*) _tmp43_);
	_vala_ccode_node_unref0 (_tmp43_);
	_g_free0 (_tmp41_);
	_tmp44_ = creation_call;
	_tmp45_ = vala_ccode_constant_new ("1");
	_tmp46_ = _tmp45_;
	vala_ccode_function_call_add_argument (_tmp44_, (ValaCCodeExpression*) _tmp46_);
	_vala_ccode_node_unref0 (_tmp46_);
	_tmp47_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp48_ = _tmp47_;
	_tmp49_ = vala_ccode_identifier_new ("dup");
	_tmp50_ = _tmp49_;
	_tmp51_ = creation_call;
	vala_ccode_function_add_assignment (_tmp48_, (ValaCCodeExpression*) _tmp50_, (ValaCCodeExpression*) _tmp51_);
	_vala_ccode_node_unref0 (_tmp50_);
	_tmp52_ = st;
	_tmp53_ = vala_struct_is_disposable (_tmp52_);
	if (_tmp53_) {
		ValaCCodeFunctionCall* copy_call = NULL;
		ValaStruct* _tmp54_;
		gchar* _tmp55_;
		gchar* _tmp56_;
		ValaCCodeIdentifier* _tmp57_;
		ValaCCodeIdentifier* _tmp58_;
		ValaCCodeFunctionCall* _tmp59_;
		ValaCCodeFunctionCall* _tmp60_;
		ValaCCodeFunctionCall* _tmp61_;
		ValaCCodeIdentifier* _tmp62_;
		ValaCCodeIdentifier* _tmp63_;
		ValaCCodeFunctionCall* _tmp64_;
		ValaCCodeIdentifier* _tmp65_;
		ValaCCodeIdentifier* _tmp66_;
		ValaCCodeFunction* _tmp67_;
		ValaCCodeFunction* _tmp68_;
		ValaCCodeFunctionCall* _tmp69_;
		_tmp54_ = st;
		_tmp55_ = vala_get_ccode_copy_function ((ValaTypeSymbol*) _tmp54_);
		_tmp56_ = _tmp55_;
		_tmp57_ = vala_ccode_identifier_new (_tmp56_);
		_tmp58_ = _tmp57_;
		_tmp59_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp58_);
		_tmp60_ = _tmp59_;
		_vala_ccode_node_unref0 (_tmp58_);
		_g_free0 (_tmp56_);
		copy_call = _tmp60_;
		_tmp61_ = copy_call;
		_tmp62_ = vala_ccode_identifier_new ("self");
		_tmp63_ = _tmp62_;
		vala_ccode_function_call_add_argument (_tmp61_, (ValaCCodeExpression*) _tmp63_);
		_vala_ccode_node_unref0 (_tmp63_);
		_tmp64_ = copy_call;
		_tmp65_ = vala_ccode_identifier_new ("dup");
		_tmp66_ = _tmp65_;
		vala_ccode_function_call_add_argument (_tmp64_, (ValaCCodeExpression*) _tmp66_);
		_vala_ccode_node_unref0 (_tmp66_);
		_tmp67_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp68_ = _tmp67_;
		_tmp69_ = copy_call;
		vala_ccode_function_add_expression (_tmp68_, (ValaCCodeExpression*) _tmp69_);
		_vala_ccode_node_unref0 (copy_call);
	} else {
		ValaCCodeFile* _tmp70_;
		ValaCCodeFunctionCall* sizeof_call = NULL;
		ValaCCodeIdentifier* _tmp71_;
		ValaCCodeIdentifier* _tmp72_;
		ValaCCodeFunctionCall* _tmp73_;
		ValaCCodeFunctionCall* _tmp74_;
		ValaCCodeFunctionCall* _tmp75_;
		ValaStruct* _tmp76_;
		gchar* _tmp77_;
		gchar* _tmp78_;
		ValaCCodeConstant* _tmp79_;
		ValaCCodeConstant* _tmp80_;
		ValaCCodeFunctionCall* copy_call = NULL;
		ValaCCodeIdentifier* _tmp81_;
		ValaCCodeIdentifier* _tmp82_;
		ValaCCodeFunctionCall* _tmp83_;
		ValaCCodeFunctionCall* _tmp84_;
		ValaCCodeFunctionCall* _tmp85_;
		ValaCCodeIdentifier* _tmp86_;
		ValaCCodeIdentifier* _tmp87_;
		ValaCCodeFunctionCall* _tmp88_;
		ValaCCodeIdentifier* _tmp89_;
		ValaCCodeIdentifier* _tmp90_;
		ValaCCodeFunctionCall* _tmp91_;
		ValaCCodeFunctionCall* _tmp92_;
		ValaCCodeFunction* _tmp93_;
		ValaCCodeFunction* _tmp94_;
		ValaCCodeFunctionCall* _tmp95_;
		_tmp70_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp70_, "string.h", FALSE);
		_tmp71_ = vala_ccode_identifier_new ("sizeof");
		_tmp72_ = _tmp71_;
		_tmp73_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp72_);
		_tmp74_ = _tmp73_;
		_vala_ccode_node_unref0 (_tmp72_);
		sizeof_call = _tmp74_;
		_tmp75_ = sizeof_call;
		_tmp76_ = st;
		_tmp77_ = vala_get_ccode_name ((ValaCodeNode*) _tmp76_);
		_tmp78_ = _tmp77_;
		_tmp79_ = vala_ccode_constant_new (_tmp78_);
		_tmp80_ = _tmp79_;
		vala_ccode_function_call_add_argument (_tmp75_, (ValaCCodeExpression*) _tmp80_);
		_vala_ccode_node_unref0 (_tmp80_);
		_g_free0 (_tmp78_);
		_tmp81_ = vala_ccode_identifier_new ("memcpy");
		_tmp82_ = _tmp81_;
		_tmp83_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp82_);
		_tmp84_ = _tmp83_;
		_vala_ccode_node_unref0 (_tmp82_);
		copy_call = _tmp84_;
		_tmp85_ = copy_call;
		_tmp86_ = vala_ccode_identifier_new ("dup");
		_tmp87_ = _tmp86_;
		vala_ccode_function_call_add_argument (_tmp85_, (ValaCCodeExpression*) _tmp87_);
		_vala_ccode_node_unref0 (_tmp87_);
		_tmp88_ = copy_call;
		_tmp89_ = vala_ccode_identifier_new ("self");
		_tmp90_ = _tmp89_;
		vala_ccode_function_call_add_argument (_tmp88_, (ValaCCodeExpression*) _tmp90_);
		_vala_ccode_node_unref0 (_tmp90_);
		_tmp91_ = copy_call;
		_tmp92_ = sizeof_call;
		vala_ccode_function_call_add_argument (_tmp91_, (ValaCCodeExpression*) _tmp92_);
		_tmp93_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp94_ = _tmp93_;
		_tmp95_ = copy_call;
		vala_ccode_function_add_expression (_tmp94_, (ValaCCodeExpression*) _tmp95_);
		_vala_ccode_node_unref0 (copy_call);
		_vala_ccode_node_unref0 (sizeof_call);
	}
	_tmp96_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp97_ = _tmp96_;
	_tmp98_ = vala_ccode_identifier_new ("dup");
	_tmp99_ = _tmp98_;
	vala_ccode_function_add_return (_tmp97_, (ValaCCodeExpression*) _tmp99_);
	_vala_ccode_node_unref0 (_tmp99_);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp100_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp101_ = function;
	vala_ccode_file_add_function (_tmp100_, _tmp101_);
	_vala_ccode_node_unref0 (creation_call);
	_vala_ccode_node_unref0 (function);
}


static void vala_ccode_struct_module_add_struct_free_function (ValaCCodeStructModule* self, ValaStruct* st) {
	ValaCCodeFunction* function = NULL;
	ValaStruct* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	ValaCCodeFunction* _tmp4_;
	ValaStruct* _tmp5_;
	gboolean _tmp6_;
	ValaCCodeFunction* _tmp16_;
	ValaStruct* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ValaCCodeParameter* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	ValaStruct* _tmp25_;
	gboolean _tmp26_;
	ValaCCodeFunctionCall* free_call = NULL;
	ValaCCodeIdentifier* _tmp40_;
	ValaCCodeIdentifier* _tmp41_;
	ValaCCodeFunctionCall* _tmp42_;
	ValaCCodeFunctionCall* _tmp43_;
	ValaCCodeIdentifier* _tmp44_;
	ValaCCodeIdentifier* _tmp45_;
	ValaCCodeFunction* _tmp46_;
	ValaCCodeFunction* _tmp47_;
	ValaCCodeFile* _tmp48_;
	ValaCCodeFunction* _tmp49_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (st != NULL);
	_tmp0_ = st;
	_tmp1_ = vala_get_ccode_free_function ((ValaTypeSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_ccode_function_new (_tmp2_, "void");
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	function = _tmp4_;
	_tmp5_ = st;
	_tmp6_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp5_);
	if (_tmp6_) {
		ValaCCodeFunction* _tmp7_;
		_tmp7_ = function;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp7_, VALA_CCODE_MODIFIERS_STATIC);
	} else {
		gboolean _tmp8_ = FALSE;
		ValaCodeContext* _tmp9_;
		ValaCodeContext* _tmp10_;
		gboolean _tmp11_;
		gboolean _tmp12_;
		_tmp9_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp10_ = _tmp9_;
		_tmp11_ = vala_code_context_get_hide_internal (_tmp10_);
		_tmp12_ = _tmp11_;
		if (_tmp12_) {
			ValaStruct* _tmp13_;
			gboolean _tmp14_;
			_tmp13_ = st;
			_tmp14_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp13_);
			_tmp8_ = _tmp14_;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			ValaCCodeFunction* _tmp15_;
			_tmp15_ = function;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp15_, VALA_CCODE_MODIFIERS_INTERNAL);
		}
	}
	_tmp16_ = function;
	_tmp17_ = st;
	_tmp18_ = vala_get_ccode_name ((ValaCodeNode*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strconcat (_tmp19_, "*", NULL);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_ccode_parameter_new ("self", _tmp21_);
	_tmp23_ = _tmp22_;
	vala_ccode_function_add_parameter (_tmp16_, _tmp23_);
	_vala_ccode_node_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp19_);
	_tmp24_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp24_);
	_tmp25_ = st;
	_tmp26_ = vala_struct_is_disposable (_tmp25_);
	if (_tmp26_) {
		ValaCCodeFunctionCall* destroy_call = NULL;
		ValaStruct* _tmp27_;
		gchar* _tmp28_;
		gchar* _tmp29_;
		ValaCCodeIdentifier* _tmp30_;
		ValaCCodeIdentifier* _tmp31_;
		ValaCCodeFunctionCall* _tmp32_;
		ValaCCodeFunctionCall* _tmp33_;
		ValaCCodeFunctionCall* _tmp34_;
		ValaCCodeIdentifier* _tmp35_;
		ValaCCodeIdentifier* _tmp36_;
		ValaCCodeFunction* _tmp37_;
		ValaCCodeFunction* _tmp38_;
		ValaCCodeFunctionCall* _tmp39_;
		_tmp27_ = st;
		_tmp28_ = vala_get_ccode_destroy_function ((ValaTypeSymbol*) _tmp27_);
		_tmp29_ = _tmp28_;
		_tmp30_ = vala_ccode_identifier_new (_tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp31_);
		_tmp33_ = _tmp32_;
		_vala_ccode_node_unref0 (_tmp31_);
		_g_free0 (_tmp29_);
		destroy_call = _tmp33_;
		_tmp34_ = destroy_call;
		_tmp35_ = vala_ccode_identifier_new ("self");
		_tmp36_ = _tmp35_;
		vala_ccode_function_call_add_argument (_tmp34_, (ValaCCodeExpression*) _tmp36_);
		_vala_ccode_node_unref0 (_tmp36_);
		_tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp38_ = _tmp37_;
		_tmp39_ = destroy_call;
		vala_ccode_function_add_expression (_tmp38_, (ValaCCodeExpression*) _tmp39_);
		_vala_ccode_node_unref0 (destroy_call);
	}
	_tmp40_ = vala_ccode_identifier_new ("g_free");
	_tmp41_ = _tmp40_;
	_tmp42_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp41_);
	_tmp43_ = _tmp42_;
	_vala_ccode_node_unref0 (_tmp41_);
	free_call = _tmp43_;
	_tmp44_ = vala_ccode_identifier_new ("self");
	_tmp45_ = _tmp44_;
	vala_ccode_function_call_add_argument (free_call, (ValaCCodeExpression*) _tmp45_);
	_vala_ccode_node_unref0 (_tmp45_);
	_tmp46_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp47_ = _tmp46_;
	vala_ccode_function_add_expression (_tmp47_, (ValaCCodeExpression*) free_call);
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp48_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp49_ = function;
	vala_ccode_file_add_function (_tmp48_, _tmp49_);
	_vala_ccode_node_unref0 (free_call);
	_vala_ccode_node_unref0 (function);
}


static void vala_ccode_struct_module_add_struct_copy_function (ValaCCodeStructModule* self, ValaStruct* st) {
	ValaCCodeFunction* function = NULL;
	ValaStruct* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	ValaCCodeFunction* _tmp4_;
	ValaStruct* _tmp5_;
	gboolean _tmp6_;
	ValaCCodeFunction* _tmp16_;
	ValaStruct* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	ValaCCodeParameter* _tmp24_;
	ValaCCodeParameter* _tmp25_;
	ValaCCodeFunction* _tmp26_;
	ValaStruct* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	ValaCCodeParameter* _tmp32_;
	ValaCCodeParameter* _tmp33_;
	ValaCCodeFunction* _tmp34_;
	ValaGLibValue* dest_struct = NULL;
	ValaStruct* _tmp35_;
	ValaDataType* _tmp36_;
	ValaDataType* _tmp37_;
	ValaCCodeIdentifier* _tmp38_;
	ValaCCodeIdentifier* _tmp39_;
	ValaGLibValue* _tmp40_;
	ValaGLibValue* _tmp41_;
	ValaCCodeFile* _tmp73_;
	ValaCCodeFunction* _tmp74_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (st != NULL);
	_tmp0_ = st;
	_tmp1_ = vala_get_ccode_copy_function ((ValaTypeSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_ccode_function_new (_tmp2_, "void");
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	function = _tmp4_;
	_tmp5_ = st;
	_tmp6_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp5_);
	if (_tmp6_) {
		ValaCCodeFunction* _tmp7_;
		_tmp7_ = function;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp7_, VALA_CCODE_MODIFIERS_STATIC);
	} else {
		gboolean _tmp8_ = FALSE;
		ValaCodeContext* _tmp9_;
		ValaCodeContext* _tmp10_;
		gboolean _tmp11_;
		gboolean _tmp12_;
		_tmp9_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp10_ = _tmp9_;
		_tmp11_ = vala_code_context_get_hide_internal (_tmp10_);
		_tmp12_ = _tmp11_;
		if (_tmp12_) {
			ValaStruct* _tmp13_;
			gboolean _tmp14_;
			_tmp13_ = st;
			_tmp14_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp13_);
			_tmp8_ = _tmp14_;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			ValaCCodeFunction* _tmp15_;
			_tmp15_ = function;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp15_, VALA_CCODE_MODIFIERS_INTERNAL);
		}
	}
	_tmp16_ = function;
	_tmp17_ = st;
	_tmp18_ = vala_get_ccode_name ((ValaCodeNode*) _tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strconcat ("const ", _tmp19_, NULL);
	_tmp21_ = _tmp20_;
	_tmp22_ = g_strconcat (_tmp21_, "*", NULL);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_ccode_parameter_new ("self", _tmp23_);
	_tmp25_ = _tmp24_;
	vala_ccode_function_add_parameter (_tmp16_, _tmp25_);
	_vala_ccode_node_unref0 (_tmp25_);
	_g_free0 (_tmp23_);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp19_);
	_tmp26_ = function;
	_tmp27_ = st;
	_tmp28_ = vala_get_ccode_name ((ValaCodeNode*) _tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = g_strconcat (_tmp29_, "*", NULL);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_ccode_parameter_new ("dest", _tmp31_);
	_tmp33_ = _tmp32_;
	vala_ccode_function_add_parameter (_tmp26_, _tmp33_);
	_vala_ccode_node_unref0 (_tmp33_);
	_g_free0 (_tmp31_);
	_g_free0 (_tmp29_);
	_tmp34_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp34_);
	_tmp35_ = st;
	_tmp36_ = vala_ccode_base_module_get_data_type_for_symbol ((ValaTypeSymbol*) _tmp35_);
	_tmp37_ = _tmp36_;
	_tmp38_ = vala_ccode_identifier_new ("(*dest)");
	_tmp39_ = _tmp38_;
	_tmp40_ = vala_glib_value_new (_tmp37_, (ValaCCodeExpression*) _tmp39_, TRUE);
	_tmp41_ = _tmp40_;
	_vala_ccode_node_unref0 (_tmp39_);
	_vala_code_node_unref0 (_tmp37_);
	dest_struct = _tmp41_;
	{
		ValaList* _f_list = NULL;
		ValaStruct* _tmp42_;
		ValaList* _tmp43_;
		gint _f_size = 0;
		ValaList* _tmp44_;
		gint _tmp45_;
		gint _tmp46_;
		gint _f_index = 0;
		_tmp42_ = st;
		_tmp43_ = vala_struct_get_fields (_tmp42_);
		_f_list = _tmp43_;
		_tmp44_ = _f_list;
		_tmp45_ = vala_collection_get_size ((ValaCollection*) _tmp44_);
		_tmp46_ = _tmp45_;
		_f_size = _tmp46_;
		_f_index = -1;
		while (TRUE) {
			gint _tmp47_;
			gint _tmp48_;
			gint _tmp49_;
			ValaField* f = NULL;
			ValaList* _tmp50_;
			gint _tmp51_;
			gpointer _tmp52_;
			ValaField* _tmp53_;
			ValaMemberBinding _tmp54_;
			ValaMemberBinding _tmp55_;
			_tmp47_ = _f_index;
			_f_index = _tmp47_ + 1;
			_tmp48_ = _f_index;
			_tmp49_ = _f_size;
			if (!(_tmp48_ < _tmp49_)) {
				break;
			}
			_tmp50_ = _f_list;
			_tmp51_ = _f_index;
			_tmp52_ = vala_list_get (_tmp50_, _tmp51_);
			f = (ValaField*) _tmp52_;
			_tmp53_ = f;
			_tmp54_ = vala_field_get_binding (_tmp53_);
			_tmp55_ = _tmp54_;
			if (_tmp55_ == VALA_MEMBER_BINDING_INSTANCE) {
				ValaTargetValue* value = NULL;
				ValaField* _tmp56_;
				ValaStruct* _tmp57_;
				ValaTargetValue* _tmp58_;
				ValaTargetValue* _tmp59_;
				ValaTargetValue* _tmp60_;
				ValaTargetValue* _tmp61_;
				ValaField* _tmp62_;
				ValaDataType* _tmp63_;
				ValaDataType* _tmp64_;
				gboolean _tmp65_;
				ValaField* _tmp70_;
				ValaGLibValue* _tmp71_;
				ValaTargetValue* _tmp72_;
				_tmp56_ = f;
				_tmp57_ = st;
				_tmp58_ = vala_ccode_base_module_load_this_parameter ((ValaCCodeBaseModule*) self, G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol));
				_tmp59_ = _tmp58_;
				_tmp60_ = vala_code_generator_load_field ((ValaCodeGenerator*) self, _tmp56_, _tmp59_);
				_tmp61_ = _tmp60_;
				_vala_target_value_unref0 (_tmp59_);
				value = _tmp61_;
				_tmp62_ = f;
				_tmp63_ = vala_variable_get_variable_type ((ValaVariable*) _tmp62_);
				_tmp64_ = _tmp63_;
				_tmp65_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp64_);
				if (_tmp65_) {
					ValaTargetValue* _tmp66_;
					ValaField* _tmp67_;
					ValaTargetValue* _tmp68_;
					ValaTargetValue* _tmp69_;
					_tmp66_ = value;
					_tmp67_ = f;
					_tmp68_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, _tmp66_, (ValaCodeNode*) _tmp67_);
					_vala_target_value_unref0 (value);
					value = _tmp68_;
					_tmp69_ = value;
					if (_tmp69_ == NULL) {
						_vala_target_value_unref0 (value);
						_vala_code_node_unref0 (f);
						continue;
					}
				}
				_tmp70_ = f;
				_tmp71_ = dest_struct;
				_tmp72_ = value;
				vala_code_generator_store_field ((ValaCodeGenerator*) self, _tmp70_, (ValaTargetValue*) _tmp71_, _tmp72_, NULL);
				_vala_target_value_unref0 (value);
			}
			_vala_code_node_unref0 (f);
		}
		_vala_iterable_unref0 (_f_list);
	}
	vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self);
	_tmp73_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp74_ = function;
	vala_ccode_file_add_function (_tmp73_, _tmp74_);
	_vala_target_value_unref0 (dest_struct);
	_vala_ccode_node_unref0 (function);
}


static void vala_ccode_struct_module_begin_struct_destroy_function (ValaCCodeStructModule* self, ValaStruct* st) {
	ValaCCodeBaseModuleEmitContext* _tmp0_;
	ValaCCodeFunction* function = NULL;
	ValaStruct* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	ValaCCodeFunction* _tmp4_;
	ValaCCodeFunction* _tmp5_;
	ValaStruct* _tmp6_;
	gboolean _tmp7_;
	ValaCCodeFunction* _tmp17_;
	ValaStruct* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	ValaCCodeParameter* _tmp23_;
	ValaCCodeParameter* _tmp24_;
	ValaCCodeFunction* _tmp25_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (st != NULL);
	_tmp0_ = ((ValaCCodeBaseModule*) self)->instance_finalize_context;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp0_);
	_tmp1_ = st;
	_tmp2_ = vala_get_ccode_destroy_function ((ValaTypeSymbol*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_ccode_function_new (_tmp3_, "void");
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	function = _tmp5_;
	_tmp6_ = st;
	_tmp7_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp6_);
	if (_tmp7_) {
		ValaCCodeFunction* _tmp8_;
		_tmp8_ = function;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp8_, VALA_CCODE_MODIFIERS_STATIC);
	} else {
		gboolean _tmp9_ = FALSE;
		ValaCodeContext* _tmp10_;
		ValaCodeContext* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		_tmp10_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp11_ = _tmp10_;
		_tmp12_ = vala_code_context_get_hide_internal (_tmp11_);
		_tmp13_ = _tmp12_;
		if (_tmp13_) {
			ValaStruct* _tmp14_;
			gboolean _tmp15_;
			_tmp14_ = st;
			_tmp15_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp14_);
			_tmp9_ = _tmp15_;
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			ValaCCodeFunction* _tmp16_;
			_tmp16_ = function;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp16_, VALA_CCODE_MODIFIERS_INTERNAL);
		}
	}
	_tmp17_ = function;
	_tmp18_ = st;
	_tmp19_ = vala_get_ccode_name ((ValaCodeNode*) _tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = g_strconcat (_tmp20_, "*", NULL);
	_tmp22_ = _tmp21_;
	_tmp23_ = vala_ccode_parameter_new ("self", _tmp22_);
	_tmp24_ = _tmp23_;
	vala_ccode_function_add_parameter (_tmp17_, _tmp24_);
	_vala_ccode_node_unref0 (_tmp24_);
	_g_free0 (_tmp22_);
	_g_free0 (_tmp20_);
	_tmp25_ = function;
	vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp25_);
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_vala_ccode_node_unref0 (function);
}


static void vala_ccode_struct_module_add_struct_destroy_function (ValaCCodeStructModule* self, ValaStruct* st) {
	ValaCCodeFile* _tmp0_;
	ValaCCodeBaseModuleEmitContext* _tmp1_;
	ValaCCodeFunction* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (st != NULL);
	_tmp0_ = ((ValaCCodeBaseModule*) self)->cfile;
	_tmp1_ = ((ValaCCodeBaseModule*) self)->instance_finalize_context;
	_tmp2_ = _tmp1_->ccode;
	vala_ccode_file_add_function (_tmp0_, _tmp2_);
}


ValaCCodeStructModule* vala_ccode_struct_module_construct (GType object_type) {
	ValaCCodeStructModule* self = NULL;
	self = (ValaCCodeStructModule*) vala_ccode_base_module_construct (object_type);
	return self;
}


static void vala_ccode_struct_module_class_init (ValaCCodeStructModuleClass * klass) {
	vala_ccode_struct_module_parent_class = g_type_class_peek_parent (klass);
	((ValaCCodeBaseModuleClass *) klass)->generate_struct_declaration = (void (*) (ValaCCodeBaseModule *, ValaStruct*, ValaCCodeFile*)) vala_ccode_struct_module_real_generate_struct_declaration;
	((ValaCodeVisitorClass *) klass)->visit_struct = (void (*) (ValaCodeVisitor *, ValaStruct*)) vala_ccode_struct_module_real_visit_struct;
}


static void vala_ccode_struct_module_instance_init (ValaCCodeStructModule * self) {
}


GType vala_ccode_struct_module_get_type (void) {
	static volatile gsize vala_ccode_struct_module_type_id__volatile = 0;
	if (g_once_init_enter (&vala_ccode_struct_module_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeStructModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_struct_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeStructModule), 0, (GInstanceInitFunc) vala_ccode_struct_module_instance_init, NULL };
		GType vala_ccode_struct_module_type_id;
		vala_ccode_struct_module_type_id = g_type_register_static (VALA_TYPE_CCODE_BASE_MODULE, "ValaCCodeStructModule", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&vala_ccode_struct_module_type_id__volatile, vala_ccode_struct_module_type_id);
	}
	return vala_ccode_struct_module_type_id__volatile;
}



