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

/* valatyperegisterfunction.vala
 *
 * Copyright (C) 2006-2010  Jürg Billeter
 *
 * 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>
 */

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

#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
typedef struct _ValaParamSpecTypeRegisterFunction ValaParamSpecTypeRegisterFunction;

struct _ValaTypeRegisterFunctionPrivate {
	ValaCCodeFragment* source_declaration_fragment;
	ValaCCodeFragment* declaration_fragment;
	ValaCCodeFragment* definition_fragment;
	ValaCodeContext* _context;
};

struct _ValaParamSpecTypeRegisterFunction {
	GParamSpec parent_instance;
};


static gpointer vala_typeregister_function_parent_class = NULL;

#define VALA_TYPEREGISTER_FUNCTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunctionPrivate))
static ValaTypeSymbol* vala_typeregister_function_real_get_type_declaration (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_type_struct_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_base_init_func_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_class_finalize_func_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_base_finalize_func_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_class_init_func_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_instance_struct_size (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_instance_init_func_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_parent_type_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_gtype_value_table_init_function_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_gtype_value_table_peek_pointer_function_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_gtype_value_table_free_function_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_gtype_value_table_copy_function_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_gtype_value_table_lcopy_value_function_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_gtype_value_table_collect_value_function_name (ValaTypeRegisterFunction* self);
static gchar* vala_typeregister_function_real_get_type_flags (ValaTypeRegisterFunction* self);
static ValaCCodeFragment* vala_typeregister_function_real_get_type_interface_init_declaration (ValaTypeRegisterFunction* self);
static void vala_typeregister_function_real_get_type_interface_init_statements (ValaTypeRegisterFunction* self, ValaCCodeBlock* block, gboolean plugin);
static ValaSymbolAccessibility vala_typeregister_function_real_get_accessibility (ValaTypeRegisterFunction* self);
static void vala_typeregister_function_finalize (ValaTypeRegisterFunction * obj);


/**
 * Constructs the C function from the specified type.
 */
static gpointer _vala_ccode_node_ref0 (gpointer self) {
	return self ? vala_ccode_node_ref (self) : NULL;
}


void vala_typeregister_function_init_from_type (ValaTypeRegisterFunction* self, gboolean plugin, gboolean declaration_only) {
	gboolean use_thread_safe = FALSE;
	gboolean _tmp0_;
	gboolean fundamental = FALSE;
	ValaClass* cl = NULL;
	ValaTypeSymbol* _tmp1_;
	ValaClass* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	ValaClass* _tmp5_;
	gchar* type_id_name = NULL;
	ValaTypeSymbol* _tmp12_;
	ValaTypeSymbol* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	ValaCCodeBlock* type_block = NULL;
	ValaCCodeBlock* _tmp18_;
	ValaCCodeDeclaration* _cdecl_ = NULL;
	gboolean _tmp19_;
	ValaCCodeDeclaration* _tmp36_;
	gboolean _tmp37_;
	gboolean _tmp42_;
	ValaCCodeFunction* fun = NULL;
	gboolean _tmp47_;
	gchar* type_value_table_decl_name = NULL;
	ValaCCodeBlock* type_init = NULL;
	ValaCCodeBlock* _tmp114_;
	gboolean _tmp115_;
	ValaTypeSymbol* _tmp141_;
	ValaTypeSymbol* _tmp142_;
	gboolean _tmp143_;
	ValaCCodeBlock* _tmp182_;
	ValaCCodeFragment* _tmp183_;
	ValaCCodeFragment* _tmp184_;
	ValaCCodeFunctionCall* reg_call = NULL;
	ValaTypeSymbol* _tmp185_;
	ValaTypeSymbol* _tmp186_;
	gboolean _tmp187_;
	ValaCCodeFunctionCall* _tmp234_;
	ValaTypeSymbol* _tmp235_;
	ValaTypeSymbol* _tmp236_;
	gchar* _tmp237_;
	gchar* _tmp238_;
	gchar* _tmp239_;
	gchar* _tmp240_;
	ValaCCodeConstant* _tmp241_;
	ValaCCodeConstant* _tmp242_;
	ValaTypeSymbol* _tmp243_;
	ValaTypeSymbol* _tmp244_;
	gboolean _tmp245_;
	gboolean _tmp340_ = FALSE;
	gboolean _tmp341_;
	gboolean _tmp360_ = FALSE;
	ValaClass* _tmp361_;
	gboolean _tmp385_;
	gboolean _tmp388_;
	gboolean _tmp445_;
	ValaCCodeFunction* _tmp460_;
	ValaCCodeBlock* _tmp461_;
	ValaCCodeFragment* _tmp462_;
	ValaCCodeFunction* _tmp463_;
	g_return_if_fail (self != NULL);
	_tmp0_ = plugin;
	use_thread_safe = !_tmp0_;
	fundamental = FALSE;
	_tmp1_ = vala_typeregister_function_get_type_declaration (self);
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_CLASS) ? ((ValaClass*) _tmp1_) : NULL;
	if (_tmp2_ == NULL) {
		_vala_code_node_unref0 (_tmp1_);
	}
	cl = _tmp2_;
	_tmp5_ = cl;
	if (_tmp5_ != NULL) {
		ValaClass* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = cl;
		_tmp7_ = vala_class_get_is_compact (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = !_tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaClass* _tmp9_;
		ValaClass* _tmp10_;
		ValaClass* _tmp11_;
		_tmp9_ = cl;
		_tmp10_ = vala_class_get_base_class (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp3_ = _tmp11_ == NULL;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		fundamental = TRUE;
	}
	_tmp12_ = vala_typeregister_function_get_type_declaration (self);
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp13_, NULL);
	_tmp15_ = _tmp14_;
	_tmp16_ = g_strdup_printf ("%s_type_id", _tmp15_);
	_tmp17_ = _tmp16_;
	_g_free0 (_tmp15_);
	_vala_code_node_unref0 (_tmp13_);
	type_id_name = _tmp17_;
	_tmp18_ = vala_ccode_block_new ();
	type_block = _tmp18_;
	_tmp19_ = use_thread_safe;
	if (_tmp19_) {
		ValaCCodeDeclaration* _tmp20_;
		ValaCCodeDeclaration* _tmp21_;
		const gchar* _tmp22_;
		gchar* _tmp23_;
		gchar* _tmp24_;
		ValaCCodeConstant* _tmp25_;
		ValaCCodeConstant* _tmp26_;
		ValaCCodeVariableDeclarator* _tmp27_;
		ValaCCodeVariableDeclarator* _tmp28_;
		_tmp20_ = vala_ccode_declaration_new ("gsize");
		_vala_ccode_node_unref0 (_cdecl_);
		_cdecl_ = _tmp20_;
		_tmp21_ = _cdecl_;
		_tmp22_ = type_id_name;
		_tmp23_ = g_strconcat (_tmp22_, "__volatile", NULL);
		_tmp24_ = _tmp23_;
		_tmp25_ = vala_ccode_constant_new ("0");
		_tmp26_ = _tmp25_;
		_tmp27_ = vala_ccode_variable_declarator_new (_tmp24_, (ValaCCodeExpression*) _tmp26_, NULL);
		_tmp28_ = _tmp27_;
		vala_ccode_declaration_add_declarator (_tmp21_, (ValaCCodeDeclarator*) _tmp28_);
		_vala_ccode_node_unref0 (_tmp28_);
		_vala_ccode_node_unref0 (_tmp26_);
		_g_free0 (_tmp24_);
	} else {
		ValaCCodeDeclaration* _tmp29_;
		ValaCCodeDeclaration* _tmp30_;
		const gchar* _tmp31_;
		ValaCCodeConstant* _tmp32_;
		ValaCCodeConstant* _tmp33_;
		ValaCCodeVariableDeclarator* _tmp34_;
		ValaCCodeVariableDeclarator* _tmp35_;
		_tmp29_ = vala_ccode_declaration_new ("GType");
		_vala_ccode_node_unref0 (_cdecl_);
		_cdecl_ = _tmp29_;
		_tmp30_ = _cdecl_;
		_tmp31_ = type_id_name;
		_tmp32_ = vala_ccode_constant_new ("0");
		_tmp33_ = _tmp32_;
		_tmp34_ = vala_ccode_variable_declarator_new (_tmp31_, (ValaCCodeExpression*) _tmp33_, NULL);
		_tmp35_ = _tmp34_;
		vala_ccode_declaration_add_declarator (_tmp30_, (ValaCCodeDeclarator*) _tmp35_);
		_vala_ccode_node_unref0 (_tmp35_);
		_vala_ccode_node_unref0 (_tmp33_);
	}
	_tmp36_ = _cdecl_;
	vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp36_, VALA_CCODE_MODIFIERS_STATIC);
	_tmp37_ = use_thread_safe;
	if (_tmp37_) {
		ValaCCodeDeclaration* _tmp38_;
		ValaCCodeDeclaration* _tmp39_;
		ValaCCodeModifiers _tmp40_;
		ValaCCodeModifiers _tmp41_;
		_tmp38_ = _cdecl_;
		_tmp39_ = _cdecl_;
		_tmp40_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp39_);
		_tmp41_ = _tmp40_;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp39_, _tmp41_ | VALA_CCODE_MODIFIERS_VOLATILE);
	}
	_tmp42_ = plugin;
	if (!_tmp42_) {
		ValaCCodeBlock* _tmp43_;
		ValaCCodeDeclaration* _tmp44_;
		_tmp43_ = type_block;
		_tmp44_ = _cdecl_;
		vala_ccode_block_add_statement (_tmp43_, (ValaCCodeNode*) _tmp44_);
	} else {
		ValaCCodeFragment* _tmp45_;
		ValaCCodeDeclaration* _tmp46_;
		_tmp45_ = self->priv->source_declaration_fragment;
		_tmp46_ = _cdecl_;
		vala_ccode_fragment_append (_tmp45_, (ValaCCodeNode*) _tmp46_);
	}
	_tmp47_ = plugin;
	if (!_tmp47_) {
		ValaTypeSymbol* _tmp48_;
		ValaTypeSymbol* _tmp49_;
		gchar* _tmp50_;
		gchar* _tmp51_;
		gchar* _tmp52_;
		gchar* _tmp53_;
		ValaCCodeFunction* _tmp54_;
		ValaCCodeFunction* _tmp55_;
		ValaSymbolAccessibility _tmp56_;
		ValaCCodeFunction* _tmp70_;
		ValaCCodeFragment* _tmp71_;
		ValaCCodeFunction* _tmp72_;
		ValaCCodeFunction* _tmp73_;
		ValaCCodeFunction* _tmp74_;
		ValaCCodeFunction* _tmp75_;
		_tmp48_ = vala_typeregister_function_get_type_declaration (self);
		_tmp49_ = _tmp48_;
		_tmp50_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp49_, NULL);
		_tmp51_ = _tmp50_;
		_tmp52_ = g_strdup_printf ("%s_get_type", _tmp51_);
		_tmp53_ = _tmp52_;
		_tmp54_ = vala_ccode_function_new (_tmp53_, "GType");
		_vala_ccode_node_unref0 (fun);
		fun = _tmp54_;
		_g_free0 (_tmp53_);
		_g_free0 (_tmp51_);
		_vala_code_node_unref0 (_tmp49_);
		_tmp55_ = fun;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp55_, VALA_CCODE_MODIFIERS_CONST);
		_tmp56_ = vala_typeregister_function_get_accessibility (self);
		if (_tmp56_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
			ValaCCodeFunction* _tmp57_;
			ValaCCodeFunction* _tmp58_;
			ValaCCodeModifiers _tmp59_;
			ValaCCodeModifiers _tmp60_;
			_tmp57_ = fun;
			_tmp58_ = fun;
			_tmp59_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp58_);
			_tmp60_ = _tmp59_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp58_, _tmp60_ | (VALA_CCODE_MODIFIERS_STATIC | VALA_CCODE_MODIFIERS_UNUSED));
		} else {
			gboolean _tmp61_ = FALSE;
			ValaCodeContext* _tmp62_;
			gboolean _tmp63_;
			gboolean _tmp64_;
			_tmp62_ = self->priv->_context;
			_tmp63_ = vala_code_context_get_hide_internal (_tmp62_);
			_tmp64_ = _tmp63_;
			if (_tmp64_) {
				ValaSymbolAccessibility _tmp65_;
				_tmp65_ = vala_typeregister_function_get_accessibility (self);
				_tmp61_ = _tmp65_ == VALA_SYMBOL_ACCESSIBILITY_INTERNAL;
			} else {
				_tmp61_ = FALSE;
			}
			if (_tmp61_) {
				ValaCCodeFunction* _tmp66_;
				ValaCCodeFunction* _tmp67_;
				ValaCCodeModifiers _tmp68_;
				ValaCCodeModifiers _tmp69_;
				_tmp66_ = fun;
				_tmp67_ = fun;
				_tmp68_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp67_);
				_tmp69_ = _tmp68_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp67_, _tmp69_ | (VALA_CCODE_MODIFIERS_INTERNAL | VALA_CCODE_MODIFIERS_UNUSED));
			}
		}
		_tmp70_ = fun;
		vala_ccode_function_set_is_declaration (_tmp70_, TRUE);
		_tmp71_ = self->priv->declaration_fragment;
		_tmp72_ = fun;
		_tmp73_ = vala_ccode_function_copy (_tmp72_);
		_tmp74_ = _tmp73_;
		vala_ccode_fragment_append (_tmp71_, (ValaCCodeNode*) _tmp74_);
		_vala_ccode_node_unref0 (_tmp74_);
		_tmp75_ = fun;
		vala_ccode_function_set_is_declaration (_tmp75_, FALSE);
	} else {
		ValaTypeSymbol* _tmp76_;
		ValaTypeSymbol* _tmp77_;
		gchar* _tmp78_;
		gchar* _tmp79_;
		gchar* _tmp80_;
		gchar* _tmp81_;
		ValaCCodeFunction* _tmp82_;
		ValaCCodeFunction* _tmp83_;
		ValaCCodeParameter* _tmp84_;
		ValaCCodeParameter* _tmp85_;
		ValaCCodeFunction* get_fun = NULL;
		ValaTypeSymbol* _tmp86_;
		ValaTypeSymbol* _tmp87_;
		gchar* _tmp88_;
		gchar* _tmp89_;
		gchar* _tmp90_;
		gchar* _tmp91_;
		ValaCCodeFunction* _tmp92_;
		ValaCCodeFunction* _tmp93_;
		ValaCCodeFunction* _tmp94_;
		ValaCCodeFunction* _tmp95_;
		ValaCCodeFragment* _tmp96_;
		ValaCCodeFunction* _tmp97_;
		ValaCCodeFunction* _tmp98_;
		ValaCCodeFunction* _tmp99_;
		ValaCCodeFunction* _tmp100_;
		ValaCCodeFunction* _tmp101_;
		ValaCCodeBlock* _tmp102_;
		ValaCCodeBlock* _tmp103_;
		ValaCCodeFunction* _tmp104_;
		ValaCCodeBlock* _tmp105_;
		ValaCCodeBlock* _tmp106_;
		const gchar* _tmp107_;
		ValaCCodeIdentifier* _tmp108_;
		ValaCCodeIdentifier* _tmp109_;
		ValaCCodeReturnStatement* _tmp110_;
		ValaCCodeReturnStatement* _tmp111_;
		ValaCCodeFragment* _tmp112_;
		ValaCCodeFunction* _tmp113_;
		_tmp76_ = vala_typeregister_function_get_type_declaration (self);
		_tmp77_ = _tmp76_;
		_tmp78_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp77_, NULL);
		_tmp79_ = _tmp78_;
		_tmp80_ = g_strdup_printf ("%s_register_type", _tmp79_);
		_tmp81_ = _tmp80_;
		_tmp82_ = vala_ccode_function_new (_tmp81_, "GType");
		_vala_ccode_node_unref0 (fun);
		fun = _tmp82_;
		_g_free0 (_tmp81_);
		_g_free0 (_tmp79_);
		_vala_code_node_unref0 (_tmp77_);
		_tmp83_ = fun;
		_tmp84_ = vala_ccode_parameter_new ("module", "GTypeModule *");
		_tmp85_ = _tmp84_;
		vala_ccode_function_add_parameter (_tmp83_, _tmp85_);
		_vala_ccode_node_unref0 (_tmp85_);
		_tmp86_ = vala_typeregister_function_get_type_declaration (self);
		_tmp87_ = _tmp86_;
		_tmp88_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp87_, NULL);
		_tmp89_ = _tmp88_;
		_tmp90_ = g_strdup_printf ("%s_get_type", _tmp89_);
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_ccode_function_new (_tmp91_, "GType");
		_tmp93_ = _tmp92_;
		_g_free0 (_tmp91_);
		_g_free0 (_tmp89_);
		_vala_code_node_unref0 (_tmp87_);
		get_fun = _tmp93_;
		_tmp94_ = get_fun;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp94_, VALA_CCODE_MODIFIERS_CONST);
		_tmp95_ = get_fun;
		vala_ccode_function_set_is_declaration (_tmp95_, TRUE);
		_tmp96_ = self->priv->declaration_fragment;
		_tmp97_ = get_fun;
		_tmp98_ = vala_ccode_function_copy (_tmp97_);
		_tmp99_ = _tmp98_;
		vala_ccode_fragment_append (_tmp96_, (ValaCCodeNode*) _tmp99_);
		_vala_ccode_node_unref0 (_tmp99_);
		_tmp100_ = get_fun;
		vala_ccode_function_set_is_declaration (_tmp100_, FALSE);
		_tmp101_ = get_fun;
		_tmp102_ = vala_ccode_block_new ();
		_tmp103_ = _tmp102_;
		vala_ccode_function_set_block (_tmp101_, _tmp103_);
		_vala_ccode_node_unref0 (_tmp103_);
		_tmp104_ = get_fun;
		_tmp105_ = vala_ccode_function_get_block (_tmp104_);
		_tmp106_ = _tmp105_;
		_tmp107_ = type_id_name;
		_tmp108_ = vala_ccode_identifier_new (_tmp107_);
		_tmp109_ = _tmp108_;
		_tmp110_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp109_);
		_tmp111_ = _tmp110_;
		vala_ccode_block_add_statement (_tmp106_, (ValaCCodeNode*) _tmp111_);
		_vala_ccode_node_unref0 (_tmp111_);
		_vala_ccode_node_unref0 (_tmp109_);
		_tmp112_ = self->priv->definition_fragment;
		_tmp113_ = get_fun;
		vala_ccode_fragment_append (_tmp112_, (ValaCCodeNode*) _tmp113_);
		_vala_ccode_node_unref0 (get_fun);
	}
	type_value_table_decl_name = NULL;
	_tmp114_ = vala_ccode_block_new ();
	type_init = _tmp114_;
	_tmp115_ = fundamental;
	if (_tmp115_) {
		ValaCCodeDeclaration* cgtypetabledecl = NULL;
		ValaCCodeDeclaration* _tmp116_;
		ValaCCodeDeclaration* _tmp117_;
		ValaCCodeDeclaration* _tmp118_;
		gchar* _tmp119_;
		gchar* _tmp120_;
		gchar* _tmp121_;
		gchar* _tmp122_;
		gchar* _tmp123_;
		gchar* _tmp124_;
		gchar* _tmp125_;
		gchar* _tmp126_;
		gchar* _tmp127_;
		gchar* _tmp128_;
		gchar* _tmp129_;
		gchar* _tmp130_;
		gchar* _tmp131_;
		gchar* _tmp132_;
		ValaCCodeConstant* _tmp133_;
		ValaCCodeConstant* _tmp134_;
		ValaCCodeVariableDeclarator* _tmp135_;
		ValaCCodeVariableDeclarator* _tmp136_;
		gchar* _tmp137_;
		ValaCCodeBlock* _tmp138_;
		ValaCCodeDeclaration* _tmp139_;
		_tmp116_ = vala_ccode_declaration_new ("const GTypeValueTable");
		cgtypetabledecl = _tmp116_;
		_tmp117_ = cgtypetabledecl;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp117_, VALA_CCODE_MODIFIERS_STATIC);
		_tmp118_ = cgtypetabledecl;
		_tmp119_ = vala_typeregister_function_get_gtype_value_table_init_function_name (self);
		_tmp120_ = _tmp119_;
		_tmp121_ = vala_typeregister_function_get_gtype_value_table_free_function_name (self);
		_tmp122_ = _tmp121_;
		_tmp123_ = vala_typeregister_function_get_gtype_value_table_copy_function_name (self);
		_tmp124_ = _tmp123_;
		_tmp125_ = vala_typeregister_function_get_gtype_value_table_peek_pointer_function_name (self);
		_tmp126_ = _tmp125_;
		_tmp127_ = vala_typeregister_function_get_gtype_value_table_collect_value_function_name (self);
		_tmp128_ = _tmp127_;
		_tmp129_ = vala_typeregister_function_get_gtype_value_table_lcopy_value_function_name (self);
		_tmp130_ = _tmp129_;
		_tmp131_ = g_strdup_printf ("{ %s, %s, %s, %s, \"p\", %s, \"p\", %s }", _tmp120_, _tmp122_, _tmp124_, _tmp126_, _tmp128_, _tmp130_);
		_tmp132_ = _tmp131_;
		_tmp133_ = vala_ccode_constant_new (_tmp132_);
		_tmp134_ = _tmp133_;
		_tmp135_ = vala_ccode_variable_declarator_new ("g_define_type_value_table", (ValaCCodeExpression*) _tmp134_, NULL);
		_tmp136_ = _tmp135_;
		vala_ccode_declaration_add_declarator (_tmp118_, (ValaCCodeDeclarator*) _tmp136_);
		_vala_ccode_node_unref0 (_tmp136_);
		_vala_ccode_node_unref0 (_tmp134_);
		_g_free0 (_tmp132_);
		_g_free0 (_tmp130_);
		_g_free0 (_tmp128_);
		_g_free0 (_tmp126_);
		_g_free0 (_tmp124_);
		_g_free0 (_tmp122_);
		_g_free0 (_tmp120_);
		_tmp137_ = g_strdup ("&g_define_type_value_table");
		_g_free0 (type_value_table_decl_name);
		type_value_table_decl_name = _tmp137_;
		_tmp138_ = type_init;
		_tmp139_ = cgtypetabledecl;
		vala_ccode_block_add_statement (_tmp138_, (ValaCCodeNode*) _tmp139_);
		_vala_ccode_node_unref0 (cgtypetabledecl);
	} else {
		gchar* _tmp140_;
		_tmp140_ = g_strdup ("NULL");
		_g_free0 (type_value_table_decl_name);
		type_value_table_decl_name = _tmp140_;
	}
	_tmp141_ = vala_typeregister_function_get_type_declaration (self);
	_tmp142_ = _tmp141_;
	_tmp143_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp142_, VALA_TYPE_OBJECT_TYPE_SYMBOL);
	_vala_code_node_unref0 (_tmp142_);
	if (_tmp143_) {
		ValaCCodeDeclaration* ctypedecl = NULL;
		ValaCCodeDeclaration* _tmp144_;
		ValaCCodeDeclaration* _tmp145_;
		gchar* _tmp146_ = NULL;
		gboolean _tmp147_;
		ValaCCodeDeclaration* _tmp150_;
		gchar* _tmp151_;
		gchar* _tmp152_;
		gchar* _tmp153_;
		gchar* _tmp154_;
		gchar* _tmp155_;
		gchar* _tmp156_;
		gchar* _tmp157_;
		gchar* _tmp158_;
		gchar* _tmp159_;
		gchar* _tmp160_;
		gchar* _tmp161_;
		gchar* _tmp162_;
		const gchar* _tmp163_;
		gchar* _tmp164_;
		gchar* _tmp165_;
		ValaCCodeConstant* _tmp166_;
		ValaCCodeConstant* _tmp167_;
		ValaCCodeVariableDeclarator* _tmp168_;
		ValaCCodeVariableDeclarator* _tmp169_;
		ValaCCodeBlock* _tmp170_;
		ValaCCodeDeclaration* _tmp171_;
		gboolean _tmp172_;
		_tmp144_ = vala_ccode_declaration_new ("const GTypeInfo");
		ctypedecl = _tmp144_;
		_tmp145_ = ctypedecl;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp145_, VALA_CCODE_MODIFIERS_STATIC);
		_tmp147_ = plugin;
		if (_tmp147_) {
			gchar* _tmp148_;
			_tmp148_ = vala_typeregister_function_get_base_finalize_func_name (self);
			_g_free0 (_tmp146_);
			_tmp146_ = _tmp148_;
		} else {
			gchar* _tmp149_;
			_tmp149_ = g_strdup ("NULL");
			_g_free0 (_tmp146_);
			_tmp146_ = _tmp149_;
		}
		_tmp150_ = ctypedecl;
		_tmp151_ = vala_typeregister_function_get_type_struct_name (self);
		_tmp152_ = _tmp151_;
		_tmp153_ = vala_typeregister_function_get_base_init_func_name (self);
		_tmp154_ = _tmp153_;
		_tmp155_ = vala_typeregister_function_get_class_init_func_name (self);
		_tmp156_ = _tmp155_;
		_tmp157_ = vala_typeregister_function_get_class_finalize_func_name (self);
		_tmp158_ = _tmp157_;
		_tmp159_ = vala_typeregister_function_get_instance_struct_size (self);
		_tmp160_ = _tmp159_;
		_tmp161_ = vala_typeregister_function_get_instance_init_func_name (self);
		_tmp162_ = _tmp161_;
		_tmp163_ = type_value_table_decl_name;
		_tmp164_ = g_strdup_printf ("{ sizeof (%s), (GBaseInitFunc) %s, (GBaseFinalizeFunc) %s, (GClassInit" \
"Func) %s, (GClassFinalizeFunc) %s, NULL, %s, 0, (GInstanceInitFunc) %s" \
", %s }", _tmp152_, _tmp154_, _tmp146_, _tmp156_, _tmp158_, _tmp160_, _tmp162_, _tmp163_);
		_tmp165_ = _tmp164_;
		_tmp166_ = vala_ccode_constant_new (_tmp165_);
		_tmp167_ = _tmp166_;
		_tmp168_ = vala_ccode_variable_declarator_new ("g_define_type_info", (ValaCCodeExpression*) _tmp167_, NULL);
		_tmp169_ = _tmp168_;
		vala_ccode_declaration_add_declarator (_tmp150_, (ValaCCodeDeclarator*) _tmp169_);
		_vala_ccode_node_unref0 (_tmp169_);
		_vala_ccode_node_unref0 (_tmp167_);
		_g_free0 (_tmp165_);
		_g_free0 (_tmp162_);
		_g_free0 (_tmp160_);
		_g_free0 (_tmp158_);
		_g_free0 (_tmp156_);
		_g_free0 (_tmp154_);
		_g_free0 (_tmp152_);
		_tmp170_ = type_init;
		_tmp171_ = ctypedecl;
		vala_ccode_block_add_statement (_tmp170_, (ValaCCodeNode*) _tmp171_);
		_tmp172_ = fundamental;
		if (_tmp172_) {
			ValaCCodeDeclaration* ctypefundamentaldecl = NULL;
			ValaCCodeDeclaration* _tmp173_;
			ValaCCodeDeclaration* _tmp174_;
			ValaCCodeDeclaration* _tmp175_;
			ValaCCodeConstant* _tmp176_;
			ValaCCodeConstant* _tmp177_;
			ValaCCodeVariableDeclarator* _tmp178_;
			ValaCCodeVariableDeclarator* _tmp179_;
			ValaCCodeBlock* _tmp180_;
			ValaCCodeDeclaration* _tmp181_;
			_tmp173_ = vala_ccode_declaration_new ("const GTypeFundamentalInfo");
			ctypefundamentaldecl = _tmp173_;
			_tmp174_ = ctypefundamentaldecl;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp174_, VALA_CCODE_MODIFIERS_STATIC);
			_tmp175_ = ctypefundamentaldecl;
			_tmp176_ = vala_ccode_constant_new ("{ (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERI" \
"VABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }");
			_tmp177_ = _tmp176_;
			_tmp178_ = vala_ccode_variable_declarator_new ("g_define_type_fundamental_info", (ValaCCodeExpression*) _tmp177_, NULL);
			_tmp179_ = _tmp178_;
			vala_ccode_declaration_add_declarator (_tmp175_, (ValaCCodeDeclarator*) _tmp179_);
			_vala_ccode_node_unref0 (_tmp179_);
			_vala_ccode_node_unref0 (_tmp177_);
			_tmp180_ = type_init;
			_tmp181_ = ctypefundamentaldecl;
			vala_ccode_block_add_statement (_tmp180_, (ValaCCodeNode*) _tmp181_);
			_vala_ccode_node_unref0 (ctypefundamentaldecl);
		}
		_g_free0 (_tmp146_);
		_vala_ccode_node_unref0 (ctypedecl);
	}
	_tmp182_ = type_init;
	_tmp183_ = vala_typeregister_function_get_type_interface_init_declaration (self);
	_tmp184_ = _tmp183_;
	vala_ccode_block_add_statement (_tmp182_, (ValaCCodeNode*) _tmp184_);
	_vala_ccode_node_unref0 (_tmp184_);
	_tmp185_ = vala_typeregister_function_get_type_declaration (self);
	_tmp186_ = _tmp185_;
	_tmp187_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp186_, VALA_TYPE_STRUCT);
	_vala_code_node_unref0 (_tmp186_);
	if (_tmp187_) {
		ValaCCodeIdentifier* _tmp188_;
		ValaCCodeIdentifier* _tmp189_;
		ValaCCodeFunctionCall* _tmp190_;
		_tmp188_ = vala_ccode_identifier_new ("g_boxed_type_register_static");
		_tmp189_ = _tmp188_;
		_tmp190_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp189_);
		_vala_ccode_node_unref0 (reg_call);
		reg_call = _tmp190_;
		_vala_ccode_node_unref0 (_tmp189_);
	} else {
		ValaTypeSymbol* _tmp191_;
		ValaTypeSymbol* _tmp192_;
		gboolean _tmp193_;
		_tmp191_ = vala_typeregister_function_get_type_declaration (self);
		_tmp192_ = _tmp191_;
		_tmp193_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp192_, VALA_TYPE_ENUM);
		_vala_code_node_unref0 (_tmp192_);
		if (_tmp193_) {
			ValaEnum* en = NULL;
			ValaTypeSymbol* _tmp194_;
			ValaEnum* _tmp195_;
			ValaEnum* _tmp196_;
			gboolean _tmp197_;
			gboolean _tmp198_;
			_tmp194_ = vala_typeregister_function_get_type_declaration (self);
			_tmp195_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp194_, VALA_TYPE_ENUM) ? ((ValaEnum*) _tmp194_) : NULL;
			if (_tmp195_ == NULL) {
				_vala_code_node_unref0 (_tmp194_);
			}
			en = _tmp195_;
			_tmp196_ = en;
			_tmp197_ = vala_enum_get_is_flags (_tmp196_);
			_tmp198_ = _tmp197_;
			if (_tmp198_) {
				ValaCCodeIdentifier* _tmp199_;
				ValaCCodeIdentifier* _tmp200_;
				ValaCCodeFunctionCall* _tmp201_;
				_tmp199_ = vala_ccode_identifier_new ("g_flags_register_static");
				_tmp200_ = _tmp199_;
				_tmp201_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp200_);
				_vala_ccode_node_unref0 (reg_call);
				reg_call = _tmp201_;
				_vala_ccode_node_unref0 (_tmp200_);
			} else {
				ValaCCodeIdentifier* _tmp202_;
				ValaCCodeIdentifier* _tmp203_;
				ValaCCodeFunctionCall* _tmp204_;
				_tmp202_ = vala_ccode_identifier_new ("g_enum_register_static");
				_tmp203_ = _tmp202_;
				_tmp204_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp203_);
				_vala_ccode_node_unref0 (reg_call);
				reg_call = _tmp204_;
				_vala_ccode_node_unref0 (_tmp203_);
			}
			_vala_code_node_unref0 (en);
		} else {
			gboolean _tmp205_;
			_tmp205_ = fundamental;
			if (_tmp205_) {
				ValaCCodeIdentifier* _tmp206_;
				ValaCCodeIdentifier* _tmp207_;
				ValaCCodeFunctionCall* _tmp208_;
				ValaCCodeFunctionCall* _tmp209_;
				ValaCCodeIdentifier* _tmp210_;
				ValaCCodeIdentifier* _tmp211_;
				ValaCCodeFunctionCall* _tmp212_;
				ValaCCodeFunctionCall* _tmp213_;
				_tmp206_ = vala_ccode_identifier_new ("g_type_register_fundamental");
				_tmp207_ = _tmp206_;
				_tmp208_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp207_);
				_vala_ccode_node_unref0 (reg_call);
				reg_call = _tmp208_;
				_vala_ccode_node_unref0 (_tmp207_);
				_tmp209_ = reg_call;
				_tmp210_ = vala_ccode_identifier_new ("g_type_fundamental_next");
				_tmp211_ = _tmp210_;
				_tmp212_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp211_);
				_tmp213_ = _tmp212_;
				vala_ccode_function_call_add_argument (_tmp209_, (ValaCCodeExpression*) _tmp213_);
				_vala_ccode_node_unref0 (_tmp213_);
				_vala_ccode_node_unref0 (_tmp211_);
			} else {
				gboolean _tmp214_;
				_tmp214_ = plugin;
				if (!_tmp214_) {
					ValaCCodeIdentifier* _tmp215_;
					ValaCCodeIdentifier* _tmp216_;
					ValaCCodeFunctionCall* _tmp217_;
					ValaCCodeFunctionCall* _tmp218_;
					gchar* _tmp219_;
					gchar* _tmp220_;
					ValaCCodeIdentifier* _tmp221_;
					ValaCCodeIdentifier* _tmp222_;
					_tmp215_ = vala_ccode_identifier_new ("g_type_register_static");
					_tmp216_ = _tmp215_;
					_tmp217_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp216_);
					_vala_ccode_node_unref0 (reg_call);
					reg_call = _tmp217_;
					_vala_ccode_node_unref0 (_tmp216_);
					_tmp218_ = reg_call;
					_tmp219_ = vala_typeregister_function_get_parent_type_name (self);
					_tmp220_ = _tmp219_;
					_tmp221_ = vala_ccode_identifier_new (_tmp220_);
					_tmp222_ = _tmp221_;
					vala_ccode_function_call_add_argument (_tmp218_, (ValaCCodeExpression*) _tmp222_);
					_vala_ccode_node_unref0 (_tmp222_);
					_g_free0 (_tmp220_);
				} else {
					ValaCCodeIdentifier* _tmp223_;
					ValaCCodeIdentifier* _tmp224_;
					ValaCCodeFunctionCall* _tmp225_;
					ValaCCodeFunctionCall* _tmp226_;
					ValaCCodeIdentifier* _tmp227_;
					ValaCCodeIdentifier* _tmp228_;
					ValaCCodeFunctionCall* _tmp229_;
					gchar* _tmp230_;
					gchar* _tmp231_;
					ValaCCodeIdentifier* _tmp232_;
					ValaCCodeIdentifier* _tmp233_;
					_tmp223_ = vala_ccode_identifier_new ("g_type_module_register_type");
					_tmp224_ = _tmp223_;
					_tmp225_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp224_);
					_vala_ccode_node_unref0 (reg_call);
					reg_call = _tmp225_;
					_vala_ccode_node_unref0 (_tmp224_);
					_tmp226_ = reg_call;
					_tmp227_ = vala_ccode_identifier_new ("module");
					_tmp228_ = _tmp227_;
					vala_ccode_function_call_add_argument (_tmp226_, (ValaCCodeExpression*) _tmp228_);
					_vala_ccode_node_unref0 (_tmp228_);
					_tmp229_ = reg_call;
					_tmp230_ = vala_typeregister_function_get_parent_type_name (self);
					_tmp231_ = _tmp230_;
					_tmp232_ = vala_ccode_identifier_new (_tmp231_);
					_tmp233_ = _tmp232_;
					vala_ccode_function_call_add_argument (_tmp229_, (ValaCCodeExpression*) _tmp233_);
					_vala_ccode_node_unref0 (_tmp233_);
					_g_free0 (_tmp231_);
				}
			}
		}
	}
	_tmp234_ = reg_call;
	_tmp235_ = vala_typeregister_function_get_type_declaration (self);
	_tmp236_ = _tmp235_;
	_tmp237_ = vala_get_ccode_name ((ValaCodeNode*) _tmp236_);
	_tmp238_ = _tmp237_;
	_tmp239_ = g_strdup_printf ("\"%s\"", _tmp238_);
	_tmp240_ = _tmp239_;
	_tmp241_ = vala_ccode_constant_new (_tmp240_);
	_tmp242_ = _tmp241_;
	vala_ccode_function_call_add_argument (_tmp234_, (ValaCCodeExpression*) _tmp242_);
	_vala_ccode_node_unref0 (_tmp242_);
	_g_free0 (_tmp240_);
	_g_free0 (_tmp238_);
	_vala_code_node_unref0 (_tmp236_);
	_tmp243_ = vala_typeregister_function_get_type_declaration (self);
	_tmp244_ = _tmp243_;
	_tmp245_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp244_, VALA_TYPE_STRUCT);
	_vala_code_node_unref0 (_tmp244_);
	if (_tmp245_) {
		ValaStruct* st = NULL;
		ValaTypeSymbol* _tmp246_;
		ValaCCodeFunctionCall* _tmp247_;
		ValaStruct* _tmp248_;
		gchar* _tmp249_;
		gchar* _tmp250_;
		ValaCCodeIdentifier* _tmp251_;
		ValaCCodeIdentifier* _tmp252_;
		ValaCCodeCastExpression* _tmp253_;
		ValaCCodeCastExpression* _tmp254_;
		ValaCCodeFunctionCall* _tmp255_;
		ValaStruct* _tmp256_;
		gchar* _tmp257_;
		gchar* _tmp258_;
		ValaCCodeIdentifier* _tmp259_;
		ValaCCodeIdentifier* _tmp260_;
		ValaCCodeCastExpression* _tmp261_;
		ValaCCodeCastExpression* _tmp262_;
		_tmp246_ = vala_typeregister_function_get_type_declaration (self);
		st = G_TYPE_CHECK_INSTANCE_CAST (_tmp246_, VALA_TYPE_STRUCT, ValaStruct);
		_tmp247_ = reg_call;
		_tmp248_ = st;
		_tmp249_ = vala_get_ccode_dup_function ((ValaTypeSymbol*) _tmp248_);
		_tmp250_ = _tmp249_;
		_tmp251_ = vala_ccode_identifier_new (_tmp250_);
		_tmp252_ = _tmp251_;
		_tmp253_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp252_, "GBoxedCopyFunc");
		_tmp254_ = _tmp253_;
		vala_ccode_function_call_add_argument (_tmp247_, (ValaCCodeExpression*) _tmp254_);
		_vala_ccode_node_unref0 (_tmp254_);
		_vala_ccode_node_unref0 (_tmp252_);
		_g_free0 (_tmp250_);
		_tmp255_ = reg_call;
		_tmp256_ = st;
		_tmp257_ = vala_get_ccode_free_function ((ValaTypeSymbol*) _tmp256_);
		_tmp258_ = _tmp257_;
		_tmp259_ = vala_ccode_identifier_new (_tmp258_);
		_tmp260_ = _tmp259_;
		_tmp261_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp260_, "GBoxedFreeFunc");
		_tmp262_ = _tmp261_;
		vala_ccode_function_call_add_argument (_tmp255_, (ValaCCodeExpression*) _tmp262_);
		_vala_ccode_node_unref0 (_tmp262_);
		_vala_ccode_node_unref0 (_tmp260_);
		_g_free0 (_tmp258_);
		_vala_code_node_unref0 (st);
	} else {
		ValaTypeSymbol* _tmp263_;
		ValaTypeSymbol* _tmp264_;
		gboolean _tmp265_;
		_tmp263_ = vala_typeregister_function_get_type_declaration (self);
		_tmp264_ = _tmp263_;
		_tmp265_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp264_, VALA_TYPE_ENUM);
		_vala_code_node_unref0 (_tmp264_);
		if (_tmp265_) {
			ValaEnum* en = NULL;
			ValaTypeSymbol* _tmp266_;
			ValaEnum* _tmp267_;
			ValaCCodeInitializerList* clist = NULL;
			ValaCCodeInitializerList* _tmp268_;
			ValaCCodeInitializerList* clist_ev = NULL;
			ValaCCodeInitializerList* _tmp301_;
			ValaCCodeInitializerList* _tmp302_;
			ValaCCodeConstant* _tmp303_;
			ValaCCodeConstant* _tmp304_;
			ValaCCodeInitializerList* _tmp305_;
			ValaCCodeConstant* _tmp306_;
			ValaCCodeConstant* _tmp307_;
			ValaCCodeInitializerList* _tmp308_;
			ValaCCodeConstant* _tmp309_;
			ValaCCodeConstant* _tmp310_;
			ValaCCodeInitializerList* _tmp311_;
			ValaCCodeInitializerList* _tmp312_;
			ValaCCodeVariableDeclarator* enum_decl = NULL;
			ValaCCodeInitializerList* _tmp313_;
			ValaCCodeVariableDeclarator* _tmp314_;
			ValaEnum* _tmp315_;
			gboolean _tmp316_;
			gboolean _tmp317_;
			ValaCCodeDeclaration* _tmp320_;
			ValaCCodeVariableDeclarator* _tmp321_;
			ValaCCodeDeclaration* _tmp322_;
			ValaCCodeBlock* _tmp323_;
			ValaCCodeDeclaration* _tmp324_;
			ValaCCodeFunctionCall* _tmp325_;
			ValaCCodeIdentifier* _tmp326_;
			ValaCCodeIdentifier* _tmp327_;
			_tmp266_ = vala_typeregister_function_get_type_declaration (self);
			_tmp267_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp266_, VALA_TYPE_ENUM) ? ((ValaEnum*) _tmp266_) : NULL;
			if (_tmp267_ == NULL) {
				_vala_code_node_unref0 (_tmp266_);
			}
			en = _tmp267_;
			_tmp268_ = vala_ccode_initializer_list_new ();
			clist = _tmp268_;
			clist_ev = NULL;
			{
				ValaList* _ev_list = NULL;
				ValaEnum* _tmp269_;
				ValaList* _tmp270_;
				gint _ev_size = 0;
				ValaList* _tmp271_;
				gint _tmp272_;
				gint _tmp273_;
				gint _ev_index = 0;
				_tmp269_ = en;
				_tmp270_ = vala_enum_get_values (_tmp269_);
				_ev_list = _tmp270_;
				_tmp271_ = _ev_list;
				_tmp272_ = vala_collection_get_size ((ValaCollection*) _tmp271_);
				_tmp273_ = _tmp272_;
				_ev_size = _tmp273_;
				_ev_index = -1;
				while (TRUE) {
					gint _tmp274_;
					gint _tmp275_;
					gint _tmp276_;
					ValaEnumValue* ev = NULL;
					ValaList* _tmp277_;
					gint _tmp278_;
					gpointer _tmp279_;
					ValaCCodeInitializerList* _tmp280_;
					ValaCCodeInitializerList* _tmp281_;
					ValaEnumValue* _tmp282_;
					gchar* _tmp283_;
					gchar* _tmp284_;
					ValaCCodeConstant* _tmp285_;
					ValaCCodeConstant* _tmp286_;
					ValaCCodeInitializerList* _tmp287_;
					ValaEnumValue* _tmp288_;
					gchar* _tmp289_;
					gchar* _tmp290_;
					gchar* _tmp291_;
					gchar* _tmp292_;
					ValaCCodeIdentifier* _tmp293_;
					ValaCCodeIdentifier* _tmp294_;
					ValaCCodeInitializerList* _tmp295_;
					ValaEnumValue* _tmp296_;
					ValaCCodeConstant* _tmp297_;
					ValaCCodeConstant* _tmp298_;
					ValaCCodeInitializerList* _tmp299_;
					ValaCCodeInitializerList* _tmp300_;
					_tmp274_ = _ev_index;
					_ev_index = _tmp274_ + 1;
					_tmp275_ = _ev_index;
					_tmp276_ = _ev_size;
					if (!(_tmp275_ < _tmp276_)) {
						break;
					}
					_tmp277_ = _ev_list;
					_tmp278_ = _ev_index;
					_tmp279_ = vala_list_get (_tmp277_, _tmp278_);
					ev = (ValaEnumValue*) _tmp279_;
					_tmp280_ = vala_ccode_initializer_list_new ();
					_vala_ccode_node_unref0 (clist_ev);
					clist_ev = _tmp280_;
					_tmp281_ = clist_ev;
					_tmp282_ = ev;
					_tmp283_ = vala_get_ccode_name ((ValaCodeNode*) _tmp282_);
					_tmp284_ = _tmp283_;
					_tmp285_ = vala_ccode_constant_new (_tmp284_);
					_tmp286_ = _tmp285_;
					vala_ccode_initializer_list_append (_tmp281_, (ValaCCodeExpression*) _tmp286_);
					_vala_ccode_node_unref0 (_tmp286_);
					_g_free0 (_tmp284_);
					_tmp287_ = clist_ev;
					_tmp288_ = ev;
					_tmp289_ = vala_get_ccode_name ((ValaCodeNode*) _tmp288_);
					_tmp290_ = _tmp289_;
					_tmp291_ = g_strdup_printf ("\"%s\"", _tmp290_);
					_tmp292_ = _tmp291_;
					_tmp293_ = vala_ccode_identifier_new (_tmp292_);
					_tmp294_ = _tmp293_;
					vala_ccode_initializer_list_append (_tmp287_, (ValaCCodeExpression*) _tmp294_);
					_vala_ccode_node_unref0 (_tmp294_);
					_g_free0 (_tmp292_);
					_g_free0 (_tmp290_);
					_tmp295_ = clist_ev;
					_tmp296_ = ev;
					_tmp297_ = vala_ccode_base_module_get_enum_value_canonical_cconstant (_tmp296_);
					_tmp298_ = _tmp297_;
					vala_ccode_initializer_list_append (_tmp295_, (ValaCCodeExpression*) _tmp298_);
					_vala_ccode_node_unref0 (_tmp298_);
					_tmp299_ = clist;
					_tmp300_ = clist_ev;
					vala_ccode_initializer_list_append (_tmp299_, (ValaCCodeExpression*) _tmp300_);
					_vala_code_node_unref0 (ev);
				}
				_vala_iterable_unref0 (_ev_list);
			}
			_tmp301_ = vala_ccode_initializer_list_new ();
			_vala_ccode_node_unref0 (clist_ev);
			clist_ev = _tmp301_;
			_tmp302_ = clist_ev;
			_tmp303_ = vala_ccode_constant_new ("0");
			_tmp304_ = _tmp303_;
			vala_ccode_initializer_list_append (_tmp302_, (ValaCCodeExpression*) _tmp304_);
			_vala_ccode_node_unref0 (_tmp304_);
			_tmp305_ = clist_ev;
			_tmp306_ = vala_ccode_constant_new ("NULL");
			_tmp307_ = _tmp306_;
			vala_ccode_initializer_list_append (_tmp305_, (ValaCCodeExpression*) _tmp307_);
			_vala_ccode_node_unref0 (_tmp307_);
			_tmp308_ = clist_ev;
			_tmp309_ = vala_ccode_constant_new ("NULL");
			_tmp310_ = _tmp309_;
			vala_ccode_initializer_list_append (_tmp308_, (ValaCCodeExpression*) _tmp310_);
			_vala_ccode_node_unref0 (_tmp310_);
			_tmp311_ = clist;
			_tmp312_ = clist_ev;
			vala_ccode_initializer_list_append (_tmp311_, (ValaCCodeExpression*) _tmp312_);
			_tmp313_ = clist;
			_tmp314_ = vala_ccode_variable_declarator_new ("values[]", (ValaCCodeExpression*) _tmp313_, NULL);
			enum_decl = _tmp314_;
			_tmp315_ = en;
			_tmp316_ = vala_enum_get_is_flags (_tmp315_);
			_tmp317_ = _tmp316_;
			if (_tmp317_) {
				ValaCCodeDeclaration* _tmp318_;
				_tmp318_ = vala_ccode_declaration_new ("const GFlagsValue");
				_vala_ccode_node_unref0 (_cdecl_);
				_cdecl_ = _tmp318_;
			} else {
				ValaCCodeDeclaration* _tmp319_;
				_tmp319_ = vala_ccode_declaration_new ("const GEnumValue");
				_vala_ccode_node_unref0 (_cdecl_);
				_cdecl_ = _tmp319_;
			}
			_tmp320_ = _cdecl_;
			_tmp321_ = enum_decl;
			vala_ccode_declaration_add_declarator (_tmp320_, (ValaCCodeDeclarator*) _tmp321_);
			_tmp322_ = _cdecl_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp322_, VALA_CCODE_MODIFIERS_STATIC);
			_tmp323_ = type_init;
			_tmp324_ = _cdecl_;
			vala_ccode_block_add_statement (_tmp323_, (ValaCCodeNode*) _tmp324_);
			_tmp325_ = reg_call;
			_tmp326_ = vala_ccode_identifier_new ("values");
			_tmp327_ = _tmp326_;
			vala_ccode_function_call_add_argument (_tmp325_, (ValaCCodeExpression*) _tmp327_);
			_vala_ccode_node_unref0 (_tmp327_);
			_vala_ccode_node_unref0 (enum_decl);
			_vala_ccode_node_unref0 (clist_ev);
			_vala_ccode_node_unref0 (clist);
			_vala_code_node_unref0 (en);
		} else {
			ValaCCodeFunctionCall* _tmp328_;
			ValaCCodeIdentifier* _tmp329_;
			ValaCCodeIdentifier* _tmp330_;
			gboolean _tmp331_;
			ValaCCodeFunctionCall* _tmp335_;
			gchar* _tmp336_;
			gchar* _tmp337_;
			ValaCCodeConstant* _tmp338_;
			ValaCCodeConstant* _tmp339_;
			_tmp328_ = reg_call;
			_tmp329_ = vala_ccode_identifier_new ("&g_define_type_info");
			_tmp330_ = _tmp329_;
			vala_ccode_function_call_add_argument (_tmp328_, (ValaCCodeExpression*) _tmp330_);
			_vala_ccode_node_unref0 (_tmp330_);
			_tmp331_ = fundamental;
			if (_tmp331_) {
				ValaCCodeFunctionCall* _tmp332_;
				ValaCCodeIdentifier* _tmp333_;
				ValaCCodeIdentifier* _tmp334_;
				_tmp332_ = reg_call;
				_tmp333_ = vala_ccode_identifier_new ("&g_define_type_fundamental_info");
				_tmp334_ = _tmp333_;
				vala_ccode_function_call_add_argument (_tmp332_, (ValaCCodeExpression*) _tmp334_);
				_vala_ccode_node_unref0 (_tmp334_);
			}
			_tmp335_ = reg_call;
			_tmp336_ = vala_typeregister_function_get_type_flags (self);
			_tmp337_ = _tmp336_;
			_tmp338_ = vala_ccode_constant_new (_tmp337_);
			_tmp339_ = _tmp338_;
			vala_ccode_function_call_add_argument (_tmp335_, (ValaCCodeExpression*) _tmp339_);
			_vala_ccode_node_unref0 (_tmp339_);
			_g_free0 (_tmp337_);
		}
	}
	_tmp341_ = use_thread_safe;
	if (_tmp341_) {
		gboolean _tmp342_;
		_tmp342_ = plugin;
		_tmp340_ = !_tmp342_;
	} else {
		_tmp340_ = FALSE;
	}
	if (_tmp340_) {
		ValaCCodeDeclaration* temp_decl = NULL;
		ValaCCodeDeclaration* _tmp343_;
		ValaCCodeDeclaration* _tmp344_;
		const gchar* _tmp345_;
		ValaCCodeFunctionCall* _tmp346_;
		ValaCCodeVariableDeclarator* _tmp347_;
		ValaCCodeVariableDeclarator* _tmp348_;
		ValaCCodeBlock* _tmp349_;
		ValaCCodeDeclaration* _tmp350_;
		_tmp343_ = vala_ccode_declaration_new ("GType");
		temp_decl = _tmp343_;
		_tmp344_ = temp_decl;
		_tmp345_ = type_id_name;
		_tmp346_ = reg_call;
		_tmp347_ = vala_ccode_variable_declarator_new (_tmp345_, (ValaCCodeExpression*) _tmp346_, NULL);
		_tmp348_ = _tmp347_;
		vala_ccode_declaration_add_declarator (_tmp344_, (ValaCCodeDeclarator*) _tmp348_);
		_vala_ccode_node_unref0 (_tmp348_);
		_tmp349_ = type_init;
		_tmp350_ = temp_decl;
		vala_ccode_block_add_statement (_tmp349_, (ValaCCodeNode*) _tmp350_);
		_vala_ccode_node_unref0 (temp_decl);
	} else {
		ValaCCodeBlock* _tmp351_;
		const gchar* _tmp352_;
		ValaCCodeIdentifier* _tmp353_;
		ValaCCodeIdentifier* _tmp354_;
		ValaCCodeFunctionCall* _tmp355_;
		ValaCCodeAssignment* _tmp356_;
		ValaCCodeAssignment* _tmp357_;
		ValaCCodeExpressionStatement* _tmp358_;
		ValaCCodeExpressionStatement* _tmp359_;
		_tmp351_ = type_init;
		_tmp352_ = type_id_name;
		_tmp353_ = vala_ccode_identifier_new (_tmp352_);
		_tmp354_ = _tmp353_;
		_tmp355_ = reg_call;
		_tmp356_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp354_, (ValaCCodeExpression*) _tmp355_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp357_ = _tmp356_;
		_tmp358_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp357_);
		_tmp359_ = _tmp358_;
		vala_ccode_block_add_statement (_tmp351_, (ValaCCodeNode*) _tmp359_);
		_vala_ccode_node_unref0 (_tmp359_);
		_vala_ccode_node_unref0 (_tmp357_);
		_vala_ccode_node_unref0 (_tmp354_);
	}
	_tmp361_ = cl;
	if (_tmp361_ != NULL) {
		ValaClass* _tmp362_;
		gboolean _tmp363_;
		gboolean _tmp364_;
		_tmp362_ = cl;
		_tmp363_ = vala_class_get_has_class_private_fields (_tmp362_);
		_tmp364_ = _tmp363_;
		_tmp360_ = _tmp364_;
	} else {
		_tmp360_ = FALSE;
	}
	if (_tmp360_) {
		ValaCCodeFunctionCall* add_class_private_call = NULL;
		ValaCCodeIdentifier* _tmp365_;
		ValaCCodeIdentifier* _tmp366_;
		ValaCCodeFunctionCall* _tmp367_;
		ValaCCodeFunctionCall* _tmp368_;
		const gchar* _tmp369_;
		ValaCCodeIdentifier* _tmp370_;
		ValaCCodeIdentifier* _tmp371_;
		ValaCCodeFunctionCall* _tmp372_;
		ValaTypeSymbol* _tmp373_;
		ValaTypeSymbol* _tmp374_;
		gchar* _tmp375_;
		gchar* _tmp376_;
		gchar* _tmp377_;
		gchar* _tmp378_;
		ValaCCodeIdentifier* _tmp379_;
		ValaCCodeIdentifier* _tmp380_;
		ValaCCodeBlock* _tmp381_;
		ValaCCodeFunctionCall* _tmp382_;
		ValaCCodeExpressionStatement* _tmp383_;
		ValaCCodeExpressionStatement* _tmp384_;
		_tmp365_ = vala_ccode_identifier_new ("g_type_add_class_private");
		_tmp366_ = _tmp365_;
		_tmp367_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp366_);
		_vala_ccode_node_unref0 (add_class_private_call);
		add_class_private_call = _tmp367_;
		_vala_ccode_node_unref0 (_tmp366_);
		_tmp368_ = add_class_private_call;
		_tmp369_ = type_id_name;
		_tmp370_ = vala_ccode_identifier_new (_tmp369_);
		_tmp371_ = _tmp370_;
		vala_ccode_function_call_add_argument (_tmp368_, (ValaCCodeExpression*) _tmp371_);
		_vala_ccode_node_unref0 (_tmp371_);
		_tmp372_ = add_class_private_call;
		_tmp373_ = vala_typeregister_function_get_type_declaration (self);
		_tmp374_ = _tmp373_;
		_tmp375_ = vala_get_ccode_name ((ValaCodeNode*) _tmp374_);
		_tmp376_ = _tmp375_;
		_tmp377_ = g_strdup_printf ("sizeof (%sClassPrivate)", _tmp376_);
		_tmp378_ = _tmp377_;
		_tmp379_ = vala_ccode_identifier_new (_tmp378_);
		_tmp380_ = _tmp379_;
		vala_ccode_function_call_add_argument (_tmp372_, (ValaCCodeExpression*) _tmp380_);
		_vala_ccode_node_unref0 (_tmp380_);
		_g_free0 (_tmp378_);
		_g_free0 (_tmp376_);
		_vala_code_node_unref0 (_tmp374_);
		_tmp381_ = type_init;
		_tmp382_ = add_class_private_call;
		_tmp383_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp382_);
		_tmp384_ = _tmp383_;
		vala_ccode_block_add_statement (_tmp381_, (ValaCCodeNode*) _tmp384_);
		_vala_ccode_node_unref0 (_tmp384_);
		_vala_ccode_node_unref0 (add_class_private_call);
	}
	_tmp385_ = declaration_only;
	if (!_tmp385_) {
		ValaCCodeBlock* _tmp386_;
		gboolean _tmp387_;
		_tmp386_ = type_init;
		_tmp387_ = plugin;
		vala_typeregister_function_get_type_interface_init_statements (self, _tmp386_, _tmp387_);
	}
	_tmp388_ = plugin;
	if (!_tmp388_) {
		ValaCCodeExpression* condition = NULL;
		gboolean _tmp389_;
		ValaCCodeExpression* cond = NULL;
		gboolean _tmp430_;
		ValaCCodeIfStatement* cif = NULL;
		ValaCCodeExpression* _tmp438_;
		ValaCCodeBlock* _tmp439_;
		ValaCCodeIfStatement* _tmp440_;
		ValaCCodeBlock* _tmp441_;
		ValaCCodeIfStatement* _tmp442_;
		_tmp389_ = use_thread_safe;
		if (_tmp389_) {
			ValaCCodeFunctionCall* enter = NULL;
			ValaCCodeIdentifier* _tmp390_;
			ValaCCodeIdentifier* _tmp391_;
			ValaCCodeFunctionCall* _tmp392_;
			ValaCCodeFunctionCall* _tmp393_;
			ValaCCodeFunctionCall* _tmp394_;
			const gchar* _tmp395_;
			gchar* _tmp396_;
			gchar* _tmp397_;
			ValaCCodeIdentifier* _tmp398_;
			ValaCCodeIdentifier* _tmp399_;
			ValaCCodeUnaryExpression* _tmp400_;
			ValaCCodeUnaryExpression* _tmp401_;
			ValaCCodeFunctionCall* _tmp402_;
			ValaCCodeExpression* _tmp403_;
			ValaCCodeFunctionCall* leave = NULL;
			ValaCCodeIdentifier* _tmp404_;
			ValaCCodeIdentifier* _tmp405_;
			ValaCCodeFunctionCall* _tmp406_;
			ValaCCodeFunctionCall* _tmp407_;
			ValaCCodeFunctionCall* _tmp408_;
			const gchar* _tmp409_;
			gchar* _tmp410_;
			gchar* _tmp411_;
			ValaCCodeIdentifier* _tmp412_;
			ValaCCodeIdentifier* _tmp413_;
			ValaCCodeUnaryExpression* _tmp414_;
			ValaCCodeUnaryExpression* _tmp415_;
			ValaCCodeFunctionCall* _tmp416_;
			const gchar* _tmp417_;
			ValaCCodeIdentifier* _tmp418_;
			ValaCCodeIdentifier* _tmp419_;
			ValaCCodeBlock* _tmp420_;
			ValaCCodeFunctionCall* _tmp421_;
			ValaCCodeExpressionStatement* _tmp422_;
			ValaCCodeExpressionStatement* _tmp423_;
			_tmp390_ = vala_ccode_identifier_new ("g_once_init_enter");
			_tmp391_ = _tmp390_;
			_tmp392_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp391_);
			_tmp393_ = _tmp392_;
			_vala_ccode_node_unref0 (_tmp391_);
			enter = _tmp393_;
			_tmp394_ = enter;
			_tmp395_ = type_id_name;
			_tmp396_ = g_strconcat (_tmp395_, "__volatile", NULL);
			_tmp397_ = _tmp396_;
			_tmp398_ = vala_ccode_identifier_new (_tmp397_);
			_tmp399_ = _tmp398_;
			_tmp400_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp399_);
			_tmp401_ = _tmp400_;
			vala_ccode_function_call_add_argument (_tmp394_, (ValaCCodeExpression*) _tmp401_);
			_vala_ccode_node_unref0 (_tmp401_);
			_vala_ccode_node_unref0 (_tmp399_);
			_g_free0 (_tmp397_);
			_tmp402_ = enter;
			_tmp403_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp402_);
			_vala_ccode_node_unref0 (condition);
			condition = _tmp403_;
			_tmp404_ = vala_ccode_identifier_new ("g_once_init_leave");
			_tmp405_ = _tmp404_;
			_tmp406_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp405_);
			_tmp407_ = _tmp406_;
			_vala_ccode_node_unref0 (_tmp405_);
			leave = _tmp407_;
			_tmp408_ = leave;
			_tmp409_ = type_id_name;
			_tmp410_ = g_strconcat (_tmp409_, "__volatile", NULL);
			_tmp411_ = _tmp410_;
			_tmp412_ = vala_ccode_identifier_new (_tmp411_);
			_tmp413_ = _tmp412_;
			_tmp414_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp413_);
			_tmp415_ = _tmp414_;
			vala_ccode_function_call_add_argument (_tmp408_, (ValaCCodeExpression*) _tmp415_);
			_vala_ccode_node_unref0 (_tmp415_);
			_vala_ccode_node_unref0 (_tmp413_);
			_g_free0 (_tmp411_);
			_tmp416_ = leave;
			_tmp417_ = type_id_name;
			_tmp418_ = vala_ccode_identifier_new (_tmp417_);
			_tmp419_ = _tmp418_;
			vala_ccode_function_call_add_argument (_tmp416_, (ValaCCodeExpression*) _tmp419_);
			_vala_ccode_node_unref0 (_tmp419_);
			_tmp420_ = type_init;
			_tmp421_ = leave;
			_tmp422_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp421_);
			_tmp423_ = _tmp422_;
			vala_ccode_block_add_statement (_tmp420_, (ValaCCodeNode*) _tmp423_);
			_vala_ccode_node_unref0 (_tmp423_);
			_vala_ccode_node_unref0 (leave);
			_vala_ccode_node_unref0 (enter);
		} else {
			ValaCCodeIdentifier* id = NULL;
			const gchar* _tmp424_;
			ValaCCodeIdentifier* _tmp425_;
			ValaCCodeConstant* zero = NULL;
			ValaCCodeConstant* _tmp426_;
			ValaCCodeIdentifier* _tmp427_;
			ValaCCodeConstant* _tmp428_;
			ValaCCodeBinaryExpression* _tmp429_;
			_tmp424_ = type_id_name;
			_tmp425_ = vala_ccode_identifier_new (_tmp424_);
			id = _tmp425_;
			_tmp426_ = vala_ccode_constant_new ("0");
			zero = _tmp426_;
			_tmp427_ = id;
			_tmp428_ = zero;
			_tmp429_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp427_, (ValaCCodeExpression*) _tmp428_);
			_vala_ccode_node_unref0 (condition);
			condition = (ValaCCodeExpression*) _tmp429_;
			_vala_ccode_node_unref0 (zero);
			_vala_ccode_node_unref0 (id);
		}
		_tmp430_ = use_thread_safe;
		if (_tmp430_) {
			ValaCCodeExpression* _tmp431_;
			ValaCCodeExpression* _tmp432_;
			_tmp431_ = condition;
			_tmp432_ = _vala_ccode_node_ref0 (_tmp431_);
			_vala_ccode_node_unref0 (cond);
			cond = _tmp432_;
		} else {
			ValaCCodeIdentifier* _tmp433_;
			ValaCCodeIdentifier* _tmp434_;
			ValaCCodeFunctionCall* _tmp435_;
			ValaCCodeExpression* _tmp436_;
			ValaCCodeExpression* _tmp437_;
			_tmp433_ = vala_ccode_identifier_new ("G_UNLIKELY");
			_tmp434_ = _tmp433_;
			_tmp435_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp434_);
			_vala_ccode_node_unref0 (cond);
			cond = (ValaCCodeExpression*) _tmp435_;
			_vala_ccode_node_unref0 (_tmp434_);
			_tmp436_ = cond;
			_tmp437_ = condition;
			vala_ccode_function_call_add_argument (G_TYPE_CHECK_INSTANCE_CAST (_tmp436_, VALA_TYPE_CCODE_FUNCTION_CALL, ValaCCodeFunctionCall), _tmp437_);
		}
		_tmp438_ = cond;
		_tmp439_ = type_init;
		_tmp440_ = vala_ccode_if_statement_new (_tmp438_, (ValaCCodeStatement*) _tmp439_, NULL);
		cif = _tmp440_;
		_tmp441_ = type_block;
		_tmp442_ = cif;
		vala_ccode_block_add_statement (_tmp441_, (ValaCCodeNode*) _tmp442_);
		_vala_ccode_node_unref0 (cif);
		_vala_ccode_node_unref0 (cond);
		_vala_ccode_node_unref0 (condition);
	} else {
		ValaCCodeBlock* _tmp443_;
		ValaCCodeBlock* _tmp444_;
		_tmp443_ = type_init;
		_tmp444_ = _vala_ccode_node_ref0 (_tmp443_);
		_vala_ccode_node_unref0 (type_block);
		type_block = _tmp444_;
	}
	_tmp445_ = use_thread_safe;
	if (_tmp445_) {
		ValaCCodeBlock* _tmp446_;
		const gchar* _tmp447_;
		gchar* _tmp448_;
		gchar* _tmp449_;
		ValaCCodeIdentifier* _tmp450_;
		ValaCCodeIdentifier* _tmp451_;
		ValaCCodeReturnStatement* _tmp452_;
		ValaCCodeReturnStatement* _tmp453_;
		_tmp446_ = type_block;
		_tmp447_ = type_id_name;
		_tmp448_ = g_strconcat (_tmp447_, "__volatile", NULL);
		_tmp449_ = _tmp448_;
		_tmp450_ = vala_ccode_identifier_new (_tmp449_);
		_tmp451_ = _tmp450_;
		_tmp452_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp451_);
		_tmp453_ = _tmp452_;
		vala_ccode_block_add_statement (_tmp446_, (ValaCCodeNode*) _tmp453_);
		_vala_ccode_node_unref0 (_tmp453_);
		_vala_ccode_node_unref0 (_tmp451_);
		_g_free0 (_tmp449_);
	} else {
		ValaCCodeBlock* _tmp454_;
		const gchar* _tmp455_;
		ValaCCodeIdentifier* _tmp456_;
		ValaCCodeIdentifier* _tmp457_;
		ValaCCodeReturnStatement* _tmp458_;
		ValaCCodeReturnStatement* _tmp459_;
		_tmp454_ = type_block;
		_tmp455_ = type_id_name;
		_tmp456_ = vala_ccode_identifier_new (_tmp455_);
		_tmp457_ = _tmp456_;
		_tmp458_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp457_);
		_tmp459_ = _tmp458_;
		vala_ccode_block_add_statement (_tmp454_, (ValaCCodeNode*) _tmp459_);
		_vala_ccode_node_unref0 (_tmp459_);
		_vala_ccode_node_unref0 (_tmp457_);
	}
	_tmp460_ = fun;
	_tmp461_ = type_block;
	vala_ccode_function_set_block (_tmp460_, _tmp461_);
	_tmp462_ = self->priv->definition_fragment;
	_tmp463_ = fun;
	vala_ccode_fragment_append (_tmp462_, (ValaCCodeNode*) _tmp463_);
	_vala_ccode_node_unref0 (reg_call);
	_vala_ccode_node_unref0 (type_init);
	_g_free0 (type_value_table_decl_name);
	_vala_ccode_node_unref0 (fun);
	_vala_ccode_node_unref0 (_cdecl_);
	_vala_ccode_node_unref0 (type_block);
	_g_free0 (type_id_name);
	_vala_code_node_unref0 (cl);
}


/**
 * Returns the data type to be registered.
 *
 * @return type to be registered
 */
static ValaTypeSymbol* vala_typeregister_function_real_get_type_declaration (ValaTypeRegisterFunction* self) {
	g_critical ("Type `%s' does not implement abstract method `vala_typeregister_function_get_type_declaration'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}


ValaTypeSymbol* vala_typeregister_function_get_type_declaration (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_type_declaration (self);
}


/**
 * Returns the name of the type struct in C code.
 *
 * @return C struct name
 */
static gchar* vala_typeregister_function_real_get_type_struct_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_type_struct_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_type_struct_name (self);
}


/**
 * Returns the name of the base_init function in C code.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_base_init_func_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_base_init_func_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_base_init_func_name (self);
}


/**
 * Returns the name of the class_finalize function in C code.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_class_finalize_func_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_class_finalize_func_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_class_finalize_func_name (self);
}


/**
 * Returns the name of the base_finalize function in C code.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_base_finalize_func_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_base_finalize_func_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_base_finalize_func_name (self);
}


/**
 * Returns the name of the class_init function in C code.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_class_init_func_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_class_init_func_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_class_init_func_name (self);
}


/**
 * Returns the size of the instance struct in C code.
 *
 * @return C instance struct size
 */
static gchar* vala_typeregister_function_real_get_instance_struct_size (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_instance_struct_size (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_instance_struct_size (self);
}


/**
 * Returns the name of the instance_init function in C code.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_instance_init_func_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_instance_init_func_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_instance_init_func_name (self);
}


/**
 * Returns the name of the parent type in C code.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_parent_type_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	g_assert_not_reached ();
	return result;
}


gchar* vala_typeregister_function_get_parent_type_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_parent_type_name (self);
}


/**
 * Returns the C-name of the new generated GTypeValueTable init function or null when not available.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_gtype_value_table_init_function_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	result = NULL;
	return result;
}


gchar* vala_typeregister_function_get_gtype_value_table_init_function_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_gtype_value_table_init_function_name (self);
}


/**
 * Returns the C-name of the new generated GTypeValueTable peek pointer function or null when not available.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_gtype_value_table_peek_pointer_function_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	result = NULL;
	return result;
}


gchar* vala_typeregister_function_get_gtype_value_table_peek_pointer_function_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_gtype_value_table_peek_pointer_function_name (self);
}


/**
 * Returns the C-name of the new generated GTypeValueTable free function or null when not available.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_gtype_value_table_free_function_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	result = NULL;
	return result;
}


gchar* vala_typeregister_function_get_gtype_value_table_free_function_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_gtype_value_table_free_function_name (self);
}


/**
 * Returns the C-name of the new generated GTypeValueTable copy function or null when not available.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_gtype_value_table_copy_function_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	result = NULL;
	return result;
}


gchar* vala_typeregister_function_get_gtype_value_table_copy_function_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_gtype_value_table_copy_function_name (self);
}


/**
 * Returns the C-name of the new generated GTypeValueTable lcopy function or null when not available.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_gtype_value_table_lcopy_value_function_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	result = NULL;
	return result;
}


gchar* vala_typeregister_function_get_gtype_value_table_lcopy_value_function_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_gtype_value_table_lcopy_value_function_name (self);
}


/**
 * Returns the C-name of the new generated GTypeValueTable collect value function or null when not available.
 *
 * @return C function name
 */
static gchar* vala_typeregister_function_real_get_gtype_value_table_collect_value_function_name (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	result = NULL;
	return result;
}


gchar* vala_typeregister_function_get_gtype_value_table_collect_value_function_name (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_gtype_value_table_collect_value_function_name (self);
}


/**
 * Returns the set of type flags to be applied when registering.
 *
 * @return type flags
 */
static gchar* vala_typeregister_function_real_get_type_flags (ValaTypeRegisterFunction* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	_tmp0_ = g_strdup ("0");
	result = _tmp0_;
	return result;
}


gchar* vala_typeregister_function_get_type_flags (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_type_flags (self);
}


/**
 * Returns additional C declarations to setup interfaces.
 *
 * @return C declarations
 */
static ValaCCodeFragment* vala_typeregister_function_real_get_type_interface_init_declaration (ValaTypeRegisterFunction* self) {
	ValaCCodeFragment* result = NULL;
	ValaCCodeFragment* _tmp0_;
	_tmp0_ = vala_ccode_fragment_new ();
	result = _tmp0_;
	return result;
}


ValaCCodeFragment* vala_typeregister_function_get_type_interface_init_declaration (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_type_interface_init_declaration (self);
}


/**
 * Returns additional C initialization statements to setup interfaces.
 */
static void vala_typeregister_function_real_get_type_interface_init_statements (ValaTypeRegisterFunction* self, ValaCCodeBlock* block, gboolean plugin) {
	g_return_if_fail (block != NULL);
}


void vala_typeregister_function_get_type_interface_init_statements (ValaTypeRegisterFunction* self, ValaCCodeBlock* block, gboolean plugin) {
	g_return_if_fail (self != NULL);
	VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_type_interface_init_statements (self, block, plugin);
}


ValaCCodeFragment* vala_typeregister_function_get_source_declaration (ValaTypeRegisterFunction* self) {
	ValaCCodeFragment* result = NULL;
	ValaCCodeFragment* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->source_declaration_fragment;
	_tmp1_ = _vala_ccode_node_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the declaration for this type register function in C code.
 *
 * @return C function declaration fragment
 */
ValaCCodeFragment* vala_typeregister_function_get_declaration (ValaTypeRegisterFunction* self) {
	ValaCCodeFragment* result = NULL;
	ValaCCodeFragment* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->declaration_fragment;
	_tmp1_ = _vala_ccode_node_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the definition for this type register function in C code.
 *
 * @return C function definition fragment
 */
ValaCCodeFragment* vala_typeregister_function_get_definition (ValaTypeRegisterFunction* self) {
	ValaCCodeFragment* result = NULL;
	ValaCCodeFragment* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->definition_fragment;
	_tmp1_ = _vala_ccode_node_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
 * Returns the accessibility for this type.
 */
static ValaSymbolAccessibility vala_typeregister_function_real_get_accessibility (ValaTypeRegisterFunction* self) {
	g_critical ("Type `%s' does not implement abstract method `vala_typeregister_function_get_accessibility'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return 0;
}


ValaSymbolAccessibility vala_typeregister_function_get_accessibility (ValaTypeRegisterFunction* self) {
	g_return_val_if_fail (self != NULL, 0);
	return VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->get_accessibility (self);
}


ValaTypeRegisterFunction* vala_typeregister_function_construct (GType object_type) {
	ValaTypeRegisterFunction* self = NULL;
	self = (ValaTypeRegisterFunction*) g_type_create_instance (object_type);
	return self;
}


ValaCodeContext* vala_typeregister_function_get_context (ValaTypeRegisterFunction* self) {
	ValaCodeContext* result;
	ValaCodeContext* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_context;
	result = _tmp0_;
	return result;
}


static gpointer _vala_code_context_ref0 (gpointer self) {
	return self ? vala_code_context_ref (self) : NULL;
}


void vala_typeregister_function_set_context (ValaTypeRegisterFunction* self, ValaCodeContext* value) {
	ValaCodeContext* _tmp0_;
	ValaCodeContext* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_context_ref0 (_tmp0_);
	_vala_code_context_unref0 (self->priv->_context);
	self->priv->_context = _tmp1_;
}


static void vala_value_typeregister_function_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void vala_value_typeregister_function_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		vala_typeregister_function_unref (value->data[0].v_pointer);
	}
}


static void vala_value_typeregister_function_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = vala_typeregister_function_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer vala_value_typeregister_function_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* vala_value_typeregister_function_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		ValaTypeRegisterFunction * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = vala_typeregister_function_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* vala_value_typeregister_function_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ValaTypeRegisterFunction ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = vala_typeregister_function_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* vala_param_spec_typeregister_function (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ValaParamSpecTypeRegisterFunction* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VALA_TYPE_TYPEREGISTER_FUNCTION), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer vala_value_get_typeregister_function (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_TYPE_TYPEREGISTER_FUNCTION), NULL);
	return value->data[0].v_pointer;
}


void vala_value_set_typeregister_function (GValue* value, gpointer v_object) {
	ValaTypeRegisterFunction * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_TYPE_TYPEREGISTER_FUNCTION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_TYPE_TYPEREGISTER_FUNCTION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		vala_typeregister_function_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_typeregister_function_unref (old);
	}
}


void vala_value_take_typeregister_function (GValue* value, gpointer v_object) {
	ValaTypeRegisterFunction * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_TYPE_TYPEREGISTER_FUNCTION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_TYPE_TYPEREGISTER_FUNCTION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_typeregister_function_unref (old);
	}
}


static void vala_typeregister_function_class_init (ValaTypeRegisterFunctionClass * klass) {
	vala_typeregister_function_parent_class = g_type_class_peek_parent (klass);
	((ValaTypeRegisterFunctionClass *) klass)->finalize = vala_typeregister_function_finalize;
	g_type_class_add_private (klass, sizeof (ValaTypeRegisterFunctionPrivate));
	((ValaTypeRegisterFunctionClass *) klass)->get_type_declaration = (ValaTypeSymbol* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_type_declaration;
	((ValaTypeRegisterFunctionClass *) klass)->get_type_struct_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_type_struct_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_base_init_func_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_base_init_func_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_class_finalize_func_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_class_finalize_func_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_base_finalize_func_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_base_finalize_func_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_class_init_func_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_class_init_func_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_instance_struct_size = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_instance_struct_size;
	((ValaTypeRegisterFunctionClass *) klass)->get_instance_init_func_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_instance_init_func_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_parent_type_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_parent_type_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_gtype_value_table_init_function_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_gtype_value_table_init_function_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_gtype_value_table_peek_pointer_function_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_gtype_value_table_peek_pointer_function_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_gtype_value_table_free_function_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_gtype_value_table_free_function_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_gtype_value_table_copy_function_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_gtype_value_table_copy_function_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_gtype_value_table_lcopy_value_function_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_gtype_value_table_lcopy_value_function_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_gtype_value_table_collect_value_function_name = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_gtype_value_table_collect_value_function_name;
	((ValaTypeRegisterFunctionClass *) klass)->get_type_flags = (gchar* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_type_flags;
	((ValaTypeRegisterFunctionClass *) klass)->get_type_interface_init_declaration = (ValaCCodeFragment* (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_type_interface_init_declaration;
	((ValaTypeRegisterFunctionClass *) klass)->get_type_interface_init_statements = (void (*) (ValaTypeRegisterFunction *, ValaCCodeBlock*, gboolean)) vala_typeregister_function_real_get_type_interface_init_statements;
	((ValaTypeRegisterFunctionClass *) klass)->get_accessibility = (ValaSymbolAccessibility (*) (ValaTypeRegisterFunction *)) vala_typeregister_function_real_get_accessibility;
}


static void vala_typeregister_function_instance_init (ValaTypeRegisterFunction * self) {
	ValaCCodeFragment* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	ValaCCodeFragment* _tmp2_;
	self->priv = VALA_TYPEREGISTER_FUNCTION_GET_PRIVATE (self);
	_tmp0_ = vala_ccode_fragment_new ();
	self->priv->source_declaration_fragment = _tmp0_;
	_tmp1_ = vala_ccode_fragment_new ();
	self->priv->declaration_fragment = _tmp1_;
	_tmp2_ = vala_ccode_fragment_new ();
	self->priv->definition_fragment = _tmp2_;
	self->ref_count = 1;
}


static void vala_typeregister_function_finalize (ValaTypeRegisterFunction * obj) {
	ValaTypeRegisterFunction * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunction);
	g_signal_handlers_destroy (self);
	_vala_ccode_node_unref0 (self->priv->source_declaration_fragment);
	_vala_ccode_node_unref0 (self->priv->declaration_fragment);
	_vala_ccode_node_unref0 (self->priv->definition_fragment);
	_vala_code_context_unref0 (self->priv->_context);
}


/**
 * C function to register a type at runtime.
 */
GType vala_typeregister_function_get_type (void) {
	static volatile gsize vala_typeregister_function_type_id__volatile = 0;
	if (g_once_init_enter (&vala_typeregister_function_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { vala_value_typeregister_function_init, vala_value_typeregister_function_free_value, vala_value_typeregister_function_copy_value, vala_value_typeregister_function_peek_pointer, "p", vala_value_typeregister_function_collect_value, "p", vala_value_typeregister_function_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ValaTypeRegisterFunctionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_typeregister_function_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaTypeRegisterFunction), 0, (GInstanceInitFunc) vala_typeregister_function_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType vala_typeregister_function_type_id;
		vala_typeregister_function_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaTypeRegisterFunction", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&vala_typeregister_function_type_id__volatile, vala_typeregister_function_type_id);
	}
	return vala_typeregister_function_type_id__volatile;
}


gpointer vala_typeregister_function_ref (gpointer instance) {
	ValaTypeRegisterFunction * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void vala_typeregister_function_unref (gpointer instance) {
	ValaTypeRegisterFunction * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}



