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

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

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

struct _ValaParamSpecTypeRegisterFunction {
	GParamSpec parent_instance;
};

static gint ValaTypeRegisterFunction_private_offset;
static gpointer vala_typeregister_function_parent_class = NULL;

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,
                                                                         ValaCodeContext* context,
                                                                         ValaCCodeBlock* block,
                                                                         gboolean plugin);
static ValaSymbolAccessibility vala_typeregister_function_real_get_accessibility (ValaTypeRegisterFunction* self);
static void vala_typeregister_function_finalize (ValaTypeRegisterFunction * obj);
static GType vala_typeregister_function_get_type_once (void);

static inline gpointer
vala_typeregister_function_get_instance_private (ValaTypeRegisterFunction* self)
{
	return G_STRUCT_MEMBER_P (self, ValaTypeRegisterFunction_private_offset);
}

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

static gpointer
_vala_ccode_node_ref0 (gpointer self)
{
	return self ? vala_ccode_node_ref (self) : NULL;
}

void
vala_typeregister_function_init_from_type (ValaTypeRegisterFunction* self,
                                           ValaCodeContext* context,
                                           gboolean plugin,
                                           gboolean declaration_only)
{
	ValaTypeSymbol* type_symbol = NULL;
	ValaTypeSymbol* _tmp0_;
	gboolean fundamental = FALSE;
	ValaClass* cl = NULL;
	ValaTypeSymbol* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	ValaClass* _tmp4_;
	gchar* type_id_name = NULL;
	ValaTypeSymbol* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	ValaCCodeBlock* type_block = NULL;
	ValaCCodeBlock* _tmp16_;
	ValaCCodeBlock* type_once_block = NULL;
	ValaCCodeBlock* _tmp17_;
	ValaCCodeDeclaration* _cdecl_ = NULL;
	ValaCCodeFunction* fun = NULL;
	ValaCCodeFunction* fun_once = NULL;
	gchar* type_value_table_decl_name = NULL;
	ValaCCodeBlock* type_init = NULL;
	ValaCCodeBlock* _tmp124_;
	ValaTypeSymbol* _tmp150_;
	ValaCCodeBlock* _tmp187_;
	ValaCCodeFragment* _tmp188_;
	ValaCCodeFragment* _tmp189_;
	ValaCCodeFunctionCall* reg_call = NULL;
	ValaTypeSymbol* _tmp190_;
	ValaCCodeFunctionCall* _tmp236_;
	ValaTypeSymbol* _tmp237_;
	gchar* _tmp238_;
	gchar* _tmp239_;
	gchar* _tmp240_;
	gchar* _tmp241_;
	ValaCCodeConstant* _tmp242_;
	ValaCCodeConstant* _tmp243_;
	ValaTypeSymbol* _tmp244_;
	ValaCCodeBlock* once_call_block = NULL;
	ValaCCodeBlock* _tmp398_;
	gboolean _tmp430_ = FALSE;
	ValaClass* _tmp431_;
	gboolean _tmp455_ = FALSE;
	ValaClass* _tmp456_;
	ValaCCodeFunction* _tmp575_;
	ValaCCodeBlock* _tmp576_;
	ValaCCodeFragment* _tmp577_;
	ValaCCodeFunction* _tmp578_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	_tmp0_ = vala_typeregister_function_get_type_declaration (self);
	type_symbol = _tmp0_;
	fundamental = FALSE;
	_tmp1_ = type_symbol;
	cl = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_CLASS) ? ((ValaClass*) _tmp1_) : NULL;
	_tmp4_ = cl;
	if (_tmp4_ != NULL) {
		ValaClass* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = cl;
		_tmp6_ = vala_class_get_is_compact (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp3_ = !_tmp7_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaClass* _tmp8_;
		ValaClass* _tmp9_;
		ValaClass* _tmp10_;
		_tmp8_ = cl;
		_tmp9_ = vala_class_get_base_class (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp2_ = _tmp10_ == NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		fundamental = TRUE;
	}
	_tmp11_ = type_symbol;
	_tmp12_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp11_, NULL);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strdup_printf ("%s_type_id", _tmp13_);
	_tmp15_ = _tmp14_;
	_g_free0 (_tmp13_);
	type_id_name = _tmp15_;
	_tmp16_ = vala_ccode_block_new ();
	type_block = _tmp16_;
	_tmp17_ = vala_ccode_block_new ();
	type_once_block = _tmp17_;
	if (!plugin) {
		ValaCCodeDeclaration* _tmp18_;
		ValaCCodeDeclaration* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		ValaCCodeConstant* _tmp23_;
		ValaCCodeConstant* _tmp24_;
		ValaCCodeVariableDeclarator* _tmp25_;
		ValaCCodeVariableDeclarator* _tmp26_;
		ValaCCodeBlock* _tmp29_;
		ValaCCodeDeclaration* _tmp30_;
		_tmp18_ = vala_ccode_declaration_new ("gsize");
		_vala_ccode_node_unref0 (_cdecl_);
		_cdecl_ = _tmp18_;
		_tmp19_ = _cdecl_;
		_tmp20_ = type_id_name;
		_tmp21_ = g_strconcat (_tmp20_, "__once", NULL);
		_tmp22_ = _tmp21_;
		_tmp23_ = vala_ccode_constant_new ("0");
		_tmp24_ = _tmp23_;
		_tmp25_ = vala_ccode_variable_declarator_new (_tmp22_, (ValaCCodeExpression*) _tmp24_, NULL);
		_tmp26_ = _tmp25_;
		vala_ccode_declaration_add_declarator (_tmp19_, (ValaCCodeDeclarator*) _tmp26_);
		_vala_ccode_node_unref0 (_tmp26_);
		_vala_ccode_node_unref0 (_tmp24_);
		_g_free0 (_tmp22_);
		if (vala_code_context_require_glib_version (context, 2, 68)) {
			ValaCCodeDeclaration* _tmp27_;
			_tmp27_ = _cdecl_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp27_, VALA_CCODE_MODIFIERS_STATIC);
		} else {
			ValaCCodeDeclaration* _tmp28_;
			_tmp28_ = _cdecl_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp28_, VALA_CCODE_MODIFIERS_STATIC | VALA_CCODE_MODIFIERS_VOLATILE);
		}
		_tmp29_ = type_block;
		_tmp30_ = _cdecl_;
		vala_ccode_block_add_statement (_tmp29_, (ValaCCodeNode*) _tmp30_);
	} else {
		ValaCCodeDeclaration* _tmp31_;
		ValaCCodeDeclaration* _tmp32_;
		const gchar* _tmp33_;
		ValaCCodeConstant* _tmp34_;
		ValaCCodeConstant* _tmp35_;
		ValaCCodeVariableDeclarator* _tmp36_;
		ValaCCodeVariableDeclarator* _tmp37_;
		ValaCCodeDeclaration* _tmp38_;
		ValaCCodeFragment* _tmp39_;
		ValaCCodeDeclaration* _tmp40_;
		_tmp31_ = vala_ccode_declaration_new ("GType");
		_vala_ccode_node_unref0 (_cdecl_);
		_cdecl_ = _tmp31_;
		_tmp32_ = _cdecl_;
		_tmp33_ = type_id_name;
		_tmp34_ = vala_ccode_constant_new ("0");
		_tmp35_ = _tmp34_;
		_tmp36_ = vala_ccode_variable_declarator_new (_tmp33_, (ValaCCodeExpression*) _tmp35_, NULL);
		_tmp37_ = _tmp36_;
		vala_ccode_declaration_add_declarator (_tmp32_, (ValaCCodeDeclarator*) _tmp37_);
		_vala_ccode_node_unref0 (_tmp37_);
		_vala_ccode_node_unref0 (_tmp35_);
		_tmp38_ = _cdecl_;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp38_, VALA_CCODE_MODIFIERS_STATIC);
		_tmp39_ = self->priv->source_declaration_fragment;
		_tmp40_ = _cdecl_;
		vala_ccode_fragment_append (_tmp39_, (ValaCCodeNode*) _tmp40_);
	}
	fun_once = NULL;
	if (!plugin) {
		ValaTypeSymbol* _tmp41_;
		gchar* _tmp42_;
		gchar* _tmp43_;
		ValaCCodeFunction* _tmp44_;
		ValaCCodeFunction* _tmp45_;
		ValaCCodeFunction* _tmp61_;
		ValaCCodeFragment* _tmp62_;
		ValaCCodeFunction* _tmp63_;
		ValaCCodeFunction* _tmp64_;
		ValaCCodeFunction* _tmp65_;
		ValaCCodeFunction* _tmp66_;
		ValaCCodeFunction* _tmp67_;
		const gchar* _tmp68_;
		const gchar* _tmp69_;
		gchar* _tmp70_;
		gchar* _tmp71_;
		ValaCCodeFunction* _tmp72_;
		ValaCCodeFunction* _tmp73_;
		ValaCCodeFunction* _tmp78_;
		ValaCCodeFragment* _tmp79_;
		ValaCCodeFunction* _tmp80_;
		ValaCCodeFunction* _tmp81_;
		ValaCCodeFunction* _tmp82_;
		ValaCCodeFunction* _tmp83_;
		_tmp41_ = type_symbol;
		_tmp42_ = vala_get_ccode_type_function (_tmp41_);
		_tmp43_ = _tmp42_;
		_tmp44_ = vala_ccode_function_new (_tmp43_, "GType");
		_vala_ccode_node_unref0 (fun);
		fun = _tmp44_;
		_g_free0 (_tmp43_);
		_tmp45_ = fun;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp45_, VALA_CCODE_MODIFIERS_CONST);
		if (vala_typeregister_function_get_accessibility (self) == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
			ValaCCodeFunction* _tmp46_;
			ValaCCodeFunction* _tmp47_;
			ValaCCodeModifiers _tmp48_;
			ValaCCodeModifiers _tmp49_;
			_tmp46_ = fun;
			_tmp47_ = fun;
			_tmp48_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp47_);
			_tmp49_ = _tmp48_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp47_, _tmp49_ | (VALA_CCODE_MODIFIERS_STATIC | VALA_CCODE_MODIFIERS_UNUSED));
		} else {
			gboolean _tmp50_ = FALSE;
			gboolean _tmp51_;
			gboolean _tmp52_;
			_tmp51_ = vala_code_context_get_hide_internal (context);
			_tmp52_ = _tmp51_;
			if (_tmp52_) {
				_tmp50_ = vala_typeregister_function_get_accessibility (self) == VALA_SYMBOL_ACCESSIBILITY_INTERNAL;
			} else {
				_tmp50_ = FALSE;
			}
			if (_tmp50_) {
				ValaCCodeFunction* _tmp53_;
				ValaCCodeFunction* _tmp54_;
				ValaCCodeModifiers _tmp55_;
				ValaCCodeModifiers _tmp56_;
				_tmp53_ = fun;
				_tmp54_ = fun;
				_tmp55_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp54_);
				_tmp56_ = _tmp55_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp54_, _tmp56_ | (VALA_CCODE_MODIFIERS_INTERNAL | VALA_CCODE_MODIFIERS_UNUSED));
			} else {
				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_EXTERN);
			}
		}
		_tmp61_ = fun;
		vala_ccode_function_set_is_declaration (_tmp61_, TRUE);
		_tmp62_ = self->priv->declaration_fragment;
		_tmp63_ = fun;
		_tmp64_ = vala_ccode_function_copy (_tmp63_);
		_tmp65_ = _tmp64_;
		vala_ccode_fragment_append (_tmp62_, (ValaCCodeNode*) _tmp65_);
		_vala_ccode_node_unref0 (_tmp65_);
		_tmp66_ = fun;
		vala_ccode_function_set_is_declaration (_tmp66_, FALSE);
		_tmp67_ = fun;
		_tmp68_ = vala_ccode_function_get_name (_tmp67_);
		_tmp69_ = _tmp68_;
		_tmp70_ = g_strdup_printf ("%s_once", _tmp69_);
		_tmp71_ = _tmp70_;
		_tmp72_ = vala_ccode_function_new (_tmp71_, "GType");
		_vala_ccode_node_unref0 (fun_once);
		fun_once = _tmp72_;
		_g_free0 (_tmp71_);
		_tmp73_ = fun_once;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp73_, VALA_CCODE_MODIFIERS_STATIC);
		if (vala_code_context_require_glib_version (context, 2, 58)) {
			ValaCCodeFunction* _tmp74_;
			ValaCCodeFunction* _tmp75_;
			ValaCCodeModifiers _tmp76_;
			ValaCCodeModifiers _tmp77_;
			_tmp74_ = fun_once;
			_tmp75_ = fun_once;
			_tmp76_ = vala_ccode_node_get_modifiers ((ValaCCodeNode*) _tmp75_);
			_tmp77_ = _tmp76_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp75_, _tmp77_ | VALA_CCODE_MODIFIERS_NO_INLINE);
		}
		_tmp78_ = fun_once;
		vala_ccode_function_set_is_declaration (_tmp78_, TRUE);
		_tmp79_ = self->priv->source_declaration_fragment;
		_tmp80_ = fun_once;
		_tmp81_ = vala_ccode_function_copy (_tmp80_);
		_tmp82_ = _tmp81_;
		vala_ccode_fragment_append (_tmp79_, (ValaCCodeNode*) _tmp82_);
		_vala_ccode_node_unref0 (_tmp82_);
		_tmp83_ = fun_once;
		vala_ccode_function_set_is_declaration (_tmp83_, FALSE);
	} else {
		ValaTypeSymbol* _tmp84_;
		gchar* _tmp85_;
		gchar* _tmp86_;
		gchar* _tmp87_;
		gchar* _tmp88_;
		ValaCCodeFunction* _tmp89_;
		ValaCCodeFunction* _tmp90_;
		ValaCCodeParameter* _tmp91_;
		ValaCCodeParameter* _tmp92_;
		ValaCCodeFunction* _tmp93_;
		ValaCCodeFragment* _tmp94_;
		ValaCCodeFunction* _tmp95_;
		ValaCCodeFunction* _tmp96_;
		ValaCCodeFunction* _tmp97_;
		ValaCCodeFunction* _tmp98_;
		ValaCCodeFunction* get_fun = NULL;
		ValaTypeSymbol* _tmp99_;
		gchar* _tmp100_;
		gchar* _tmp101_;
		ValaCCodeFunction* _tmp102_;
		ValaCCodeFunction* _tmp103_;
		ValaCCodeFunction* _tmp104_;
		ValaCCodeFunction* _tmp105_;
		ValaCCodeFragment* _tmp106_;
		ValaCCodeFunction* _tmp107_;
		ValaCCodeFunction* _tmp108_;
		ValaCCodeFunction* _tmp109_;
		ValaCCodeFunction* _tmp110_;
		ValaCCodeFunction* _tmp111_;
		ValaCCodeBlock* _tmp112_;
		ValaCCodeBlock* _tmp113_;
		ValaCCodeFunction* _tmp114_;
		ValaCCodeBlock* _tmp115_;
		ValaCCodeBlock* _tmp116_;
		const gchar* _tmp117_;
		ValaCCodeIdentifier* _tmp118_;
		ValaCCodeIdentifier* _tmp119_;
		ValaCCodeReturnStatement* _tmp120_;
		ValaCCodeReturnStatement* _tmp121_;
		ValaCCodeFragment* _tmp122_;
		ValaCCodeFunction* _tmp123_;
		_tmp84_ = type_symbol;
		_tmp85_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp84_, NULL);
		_tmp86_ = _tmp85_;
		_tmp87_ = g_strdup_printf ("%s_register_type", _tmp86_);
		_tmp88_ = _tmp87_;
		_tmp89_ = vala_ccode_function_new (_tmp88_, "GType");
		_vala_ccode_node_unref0 (fun);
		fun = _tmp89_;
		_g_free0 (_tmp88_);
		_g_free0 (_tmp86_);
		_tmp90_ = fun;
		_tmp91_ = vala_ccode_parameter_new ("module", "GTypeModule *");
		_tmp92_ = _tmp91_;
		vala_ccode_function_add_parameter (_tmp90_, _tmp92_);
		_vala_ccode_node_unref0 (_tmp92_);
		_tmp93_ = fun;
		vala_ccode_function_set_is_declaration (_tmp93_, TRUE);
		_tmp94_ = self->priv->declaration_fragment;
		_tmp95_ = fun;
		_tmp96_ = vala_ccode_function_copy (_tmp95_);
		_tmp97_ = _tmp96_;
		vala_ccode_fragment_append (_tmp94_, (ValaCCodeNode*) _tmp97_);
		_vala_ccode_node_unref0 (_tmp97_);
		_tmp98_ = fun;
		vala_ccode_function_set_is_declaration (_tmp98_, FALSE);
		_tmp99_ = type_symbol;
		_tmp100_ = vala_get_ccode_type_function (_tmp99_);
		_tmp101_ = _tmp100_;
		_tmp102_ = vala_ccode_function_new (_tmp101_, "GType");
		_tmp103_ = _tmp102_;
		_g_free0 (_tmp101_);
		get_fun = _tmp103_;
		_tmp104_ = get_fun;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp104_, VALA_CCODE_MODIFIERS_CONST | VALA_CCODE_MODIFIERS_EXTERN);
		_tmp105_ = get_fun;
		vala_ccode_function_set_is_declaration (_tmp105_, TRUE);
		_tmp106_ = self->priv->declaration_fragment;
		_tmp107_ = get_fun;
		_tmp108_ = vala_ccode_function_copy (_tmp107_);
		_tmp109_ = _tmp108_;
		vala_ccode_fragment_append (_tmp106_, (ValaCCodeNode*) _tmp109_);
		_vala_ccode_node_unref0 (_tmp109_);
		_tmp110_ = get_fun;
		vala_ccode_function_set_is_declaration (_tmp110_, FALSE);
		_tmp111_ = get_fun;
		_tmp112_ = vala_ccode_block_new ();
		_tmp113_ = _tmp112_;
		vala_ccode_function_set_block (_tmp111_, _tmp113_);
		_vala_ccode_node_unref0 (_tmp113_);
		_tmp114_ = get_fun;
		_tmp115_ = vala_ccode_function_get_block (_tmp114_);
		_tmp116_ = _tmp115_;
		_tmp117_ = type_id_name;
		_tmp118_ = vala_ccode_identifier_new (_tmp117_);
		_tmp119_ = _tmp118_;
		_tmp120_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp119_);
		_tmp121_ = _tmp120_;
		vala_ccode_block_add_statement (_tmp116_, (ValaCCodeNode*) _tmp121_);
		_vala_ccode_node_unref0 (_tmp121_);
		_vala_ccode_node_unref0 (_tmp119_);
		_tmp122_ = self->priv->definition_fragment;
		_tmp123_ = get_fun;
		vala_ccode_fragment_append (_tmp122_, (ValaCCodeNode*) _tmp123_);
		_vala_ccode_node_unref0 (get_fun);
	}
	type_value_table_decl_name = NULL;
	_tmp124_ = vala_ccode_block_new ();
	type_init = _tmp124_;
	if (fundamental) {
		ValaCCodeDeclaration* cgtypetabledecl = NULL;
		ValaCCodeDeclaration* _tmp125_;
		ValaCCodeDeclaration* _tmp126_;
		ValaCCodeDeclaration* _tmp127_;
		gchar* _tmp128_;
		gchar* _tmp129_;
		gchar* _tmp130_;
		gchar* _tmp131_;
		gchar* _tmp132_;
		gchar* _tmp133_;
		gchar* _tmp134_;
		gchar* _tmp135_;
		gchar* _tmp136_;
		gchar* _tmp137_;
		gchar* _tmp138_;
		gchar* _tmp139_;
		gchar* _tmp140_;
		gchar* _tmp141_;
		ValaCCodeConstant* _tmp142_;
		ValaCCodeConstant* _tmp143_;
		ValaCCodeVariableDeclarator* _tmp144_;
		ValaCCodeVariableDeclarator* _tmp145_;
		gchar* _tmp146_;
		ValaCCodeBlock* _tmp147_;
		ValaCCodeDeclaration* _tmp148_;
		_tmp125_ = vala_ccode_declaration_new ("const GTypeValueTable");
		cgtypetabledecl = _tmp125_;
		_tmp126_ = cgtypetabledecl;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp126_, VALA_CCODE_MODIFIERS_STATIC);
		_tmp127_ = cgtypetabledecl;
		_tmp128_ = vala_typeregister_function_get_gtype_value_table_init_function_name (self);
		_tmp129_ = _tmp128_;
		_tmp130_ = vala_typeregister_function_get_gtype_value_table_free_function_name (self);
		_tmp131_ = _tmp130_;
		_tmp132_ = vala_typeregister_function_get_gtype_value_table_copy_function_name (self);
		_tmp133_ = _tmp132_;
		_tmp134_ = vala_typeregister_function_get_gtype_value_table_peek_pointer_function_name (self);
		_tmp135_ = _tmp134_;
		_tmp136_ = vala_typeregister_function_get_gtype_value_table_collect_value_function_name (self);
		_tmp137_ = _tmp136_;
		_tmp138_ = vala_typeregister_function_get_gtype_value_table_lcopy_value_function_name (self);
		_tmp139_ = _tmp138_;
		_tmp140_ = g_strdup_printf ("{ %s, %s, %s, %s, \"p\", %s, \"p\", %s }", _tmp129_, _tmp131_, _tmp133_, _tmp135_, _tmp137_, _tmp139_);
		_tmp141_ = _tmp140_;
		_tmp142_ = vala_ccode_constant_new (_tmp141_);
		_tmp143_ = _tmp142_;
		_tmp144_ = vala_ccode_variable_declarator_new ("g_define_type_value_table", (ValaCCodeExpression*) _tmp143_, NULL);
		_tmp145_ = _tmp144_;
		vala_ccode_declaration_add_declarator (_tmp127_, (ValaCCodeDeclarator*) _tmp145_);
		_vala_ccode_node_unref0 (_tmp145_);
		_vala_ccode_node_unref0 (_tmp143_);
		_g_free0 (_tmp141_);
		_g_free0 (_tmp139_);
		_g_free0 (_tmp137_);
		_g_free0 (_tmp135_);
		_g_free0 (_tmp133_);
		_g_free0 (_tmp131_);
		_g_free0 (_tmp129_);
		_tmp146_ = g_strdup ("&g_define_type_value_table");
		_g_free0 (type_value_table_decl_name);
		type_value_table_decl_name = _tmp146_;
		_tmp147_ = type_init;
		_tmp148_ = cgtypetabledecl;
		vala_ccode_block_add_statement (_tmp147_, (ValaCCodeNode*) _tmp148_);
		_vala_ccode_node_unref0 (cgtypetabledecl);
	} else {
		gchar* _tmp149_;
		_tmp149_ = g_strdup ("NULL");
		_g_free0 (type_value_table_decl_name);
		type_value_table_decl_name = _tmp149_;
	}
	_tmp150_ = type_symbol;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp150_, VALA_TYPE_OBJECT_TYPE_SYMBOL)) {
		ValaCCodeDeclaration* ctypedecl = NULL;
		ValaCCodeDeclaration* _tmp151_;
		ValaCCodeDeclaration* _tmp152_;
		gchar* _tmp153_ = NULL;
		ValaCCodeDeclaration* _tmp156_;
		gchar* _tmp157_;
		gchar* _tmp158_;
		gchar* _tmp159_;
		gchar* _tmp160_;
		gchar* _tmp161_;
		gchar* _tmp162_;
		gchar* _tmp163_;
		gchar* _tmp164_;
		gchar* _tmp165_;
		gchar* _tmp166_;
		gchar* _tmp167_;
		gchar* _tmp168_;
		const gchar* _tmp169_;
		gchar* _tmp170_;
		gchar* _tmp171_;
		ValaCCodeConstant* _tmp172_;
		ValaCCodeConstant* _tmp173_;
		ValaCCodeVariableDeclarator* _tmp174_;
		ValaCCodeVariableDeclarator* _tmp175_;
		ValaCCodeBlock* _tmp176_;
		ValaCCodeDeclaration* _tmp177_;
		_tmp151_ = vala_ccode_declaration_new ("const GTypeInfo");
		ctypedecl = _tmp151_;
		_tmp152_ = ctypedecl;
		vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp152_, VALA_CCODE_MODIFIERS_STATIC);
		if (plugin) {
			gchar* _tmp154_;
			_tmp154_ = vala_typeregister_function_get_base_finalize_func_name (self);
			_g_free0 (_tmp153_);
			_tmp153_ = _tmp154_;
		} else {
			gchar* _tmp155_;
			_tmp155_ = g_strdup ("NULL");
			_g_free0 (_tmp153_);
			_tmp153_ = _tmp155_;
		}
		_tmp156_ = ctypedecl;
		_tmp157_ = vala_typeregister_function_get_type_struct_name (self);
		_tmp158_ = _tmp157_;
		_tmp159_ = vala_typeregister_function_get_base_init_func_name (self);
		_tmp160_ = _tmp159_;
		_tmp161_ = vala_typeregister_function_get_class_init_func_name (self);
		_tmp162_ = _tmp161_;
		_tmp163_ = vala_typeregister_function_get_class_finalize_func_name (self);
		_tmp164_ = _tmp163_;
		_tmp165_ = vala_typeregister_function_get_instance_struct_size (self);
		_tmp166_ = _tmp165_;
		_tmp167_ = vala_typeregister_function_get_instance_init_func_name (self);
		_tmp168_ = _tmp167_;
		_tmp169_ = type_value_table_decl_name;
		_tmp170_ = g_strdup_printf ("{ sizeof (%s), (GBaseInitFunc) %s, (GBaseFinalizeFunc) %s, (GClassInit" \
"Func) %s, (GClassFinalizeFunc) %s, NULL, %s, 0, (GInstanceInitFunc) %s" \
", %s }", _tmp158_, _tmp160_, _tmp153_, _tmp162_, _tmp164_, _tmp166_, _tmp168_, _tmp169_);
		_tmp171_ = _tmp170_;
		_tmp172_ = vala_ccode_constant_new (_tmp171_);
		_tmp173_ = _tmp172_;
		_tmp174_ = vala_ccode_variable_declarator_new ("g_define_type_info", (ValaCCodeExpression*) _tmp173_, NULL);
		_tmp175_ = _tmp174_;
		vala_ccode_declaration_add_declarator (_tmp156_, (ValaCCodeDeclarator*) _tmp175_);
		_vala_ccode_node_unref0 (_tmp175_);
		_vala_ccode_node_unref0 (_tmp173_);
		_g_free0 (_tmp171_);
		_g_free0 (_tmp168_);
		_g_free0 (_tmp166_);
		_g_free0 (_tmp164_);
		_g_free0 (_tmp162_);
		_g_free0 (_tmp160_);
		_g_free0 (_tmp158_);
		_tmp176_ = type_init;
		_tmp177_ = ctypedecl;
		vala_ccode_block_add_statement (_tmp176_, (ValaCCodeNode*) _tmp177_);
		if (fundamental) {
			ValaCCodeDeclaration* ctypefundamentaldecl = NULL;
			ValaCCodeDeclaration* _tmp178_;
			ValaCCodeDeclaration* _tmp179_;
			ValaCCodeDeclaration* _tmp180_;
			ValaCCodeConstant* _tmp181_;
			ValaCCodeConstant* _tmp182_;
			ValaCCodeVariableDeclarator* _tmp183_;
			ValaCCodeVariableDeclarator* _tmp184_;
			ValaCCodeBlock* _tmp185_;
			ValaCCodeDeclaration* _tmp186_;
			_tmp178_ = vala_ccode_declaration_new ("const GTypeFundamentalInfo");
			ctypefundamentaldecl = _tmp178_;
			_tmp179_ = ctypefundamentaldecl;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp179_, VALA_CCODE_MODIFIERS_STATIC);
			_tmp180_ = ctypefundamentaldecl;
			_tmp181_ = vala_ccode_constant_new ("{ (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERI" \
"VABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }");
			_tmp182_ = _tmp181_;
			_tmp183_ = vala_ccode_variable_declarator_new ("g_define_type_fundamental_info", (ValaCCodeExpression*) _tmp182_, NULL);
			_tmp184_ = _tmp183_;
			vala_ccode_declaration_add_declarator (_tmp180_, (ValaCCodeDeclarator*) _tmp184_);
			_vala_ccode_node_unref0 (_tmp184_);
			_vala_ccode_node_unref0 (_tmp182_);
			_tmp185_ = type_init;
			_tmp186_ = ctypefundamentaldecl;
			vala_ccode_block_add_statement (_tmp185_, (ValaCCodeNode*) _tmp186_);
			_vala_ccode_node_unref0 (ctypefundamentaldecl);
		}
		_g_free0 (_tmp153_);
		_vala_ccode_node_unref0 (ctypedecl);
	}
	_tmp187_ = type_init;
	_tmp188_ = vala_typeregister_function_get_type_interface_init_declaration (self);
	_tmp189_ = _tmp188_;
	vala_ccode_block_add_statement (_tmp187_, (ValaCCodeNode*) _tmp189_);
	_vala_ccode_node_unref0 (_tmp189_);
	_tmp190_ = type_symbol;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp190_, VALA_TYPE_STRUCT)) {
		ValaCCodeIdentifier* _tmp191_;
		ValaCCodeIdentifier* _tmp192_;
		ValaCCodeFunctionCall* _tmp193_;
		_tmp191_ = vala_ccode_identifier_new ("g_boxed_type_register_static");
		_tmp192_ = _tmp191_;
		_tmp193_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp192_);
		_vala_ccode_node_unref0 (reg_call);
		reg_call = _tmp193_;
		_vala_ccode_node_unref0 (_tmp192_);
	} else {
		ValaTypeSymbol* _tmp194_;
		_tmp194_ = type_symbol;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp194_, VALA_TYPE_ENUM)) {
			ValaEnum* en = NULL;
			ValaTypeSymbol* _tmp195_;
			ValaEnum* _tmp196_;
			gboolean _tmp197_;
			gboolean _tmp198_;
			_tmp195_ = type_symbol;
			en = G_TYPE_CHECK_INSTANCE_CAST (_tmp195_, VALA_TYPE_ENUM, ValaEnum);
			_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_);
			}
		} else {
			ValaTypeSymbol* _tmp205_;
			_tmp205_ = type_symbol;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp205_, VALA_TYPE_ERROR_DOMAIN)) {
				ValaCCodeIdentifier* _tmp206_;
				ValaCCodeIdentifier* _tmp207_;
				ValaCCodeFunctionCall* _tmp208_;
				_tmp206_ = vala_ccode_identifier_new ("g_enum_register_static");
				_tmp207_ = _tmp206_;
				_tmp208_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp207_);
				_vala_ccode_node_unref0 (reg_call);
				reg_call = _tmp208_;
				_vala_ccode_node_unref0 (_tmp207_);
			} else {
				if (fundamental) {
					ValaCCodeIdentifier* _tmp209_;
					ValaCCodeIdentifier* _tmp210_;
					ValaCCodeFunctionCall* _tmp211_;
					ValaCCodeFunctionCall* _tmp212_;
					ValaCCodeIdentifier* _tmp213_;
					ValaCCodeIdentifier* _tmp214_;
					ValaCCodeFunctionCall* _tmp215_;
					ValaCCodeFunctionCall* _tmp216_;
					_tmp209_ = vala_ccode_identifier_new ("g_type_register_fundamental");
					_tmp210_ = _tmp209_;
					_tmp211_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp210_);
					_vala_ccode_node_unref0 (reg_call);
					reg_call = _tmp211_;
					_vala_ccode_node_unref0 (_tmp210_);
					_tmp212_ = reg_call;
					_tmp213_ = vala_ccode_identifier_new ("g_type_fundamental_next");
					_tmp214_ = _tmp213_;
					_tmp215_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp214_);
					_tmp216_ = _tmp215_;
					vala_ccode_function_call_add_argument (_tmp212_, (ValaCCodeExpression*) _tmp216_);
					_vala_ccode_node_unref0 (_tmp216_);
					_vala_ccode_node_unref0 (_tmp214_);
				} else {
					if (!plugin) {
						ValaCCodeIdentifier* _tmp217_;
						ValaCCodeIdentifier* _tmp218_;
						ValaCCodeFunctionCall* _tmp219_;
						ValaCCodeFunctionCall* _tmp220_;
						gchar* _tmp221_;
						gchar* _tmp222_;
						ValaCCodeIdentifier* _tmp223_;
						ValaCCodeIdentifier* _tmp224_;
						_tmp217_ = vala_ccode_identifier_new ("g_type_register_static");
						_tmp218_ = _tmp217_;
						_tmp219_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp218_);
						_vala_ccode_node_unref0 (reg_call);
						reg_call = _tmp219_;
						_vala_ccode_node_unref0 (_tmp218_);
						_tmp220_ = reg_call;
						_tmp221_ = vala_typeregister_function_get_parent_type_name (self);
						_tmp222_ = _tmp221_;
						_tmp223_ = vala_ccode_identifier_new (_tmp222_);
						_tmp224_ = _tmp223_;
						vala_ccode_function_call_add_argument (_tmp220_, (ValaCCodeExpression*) _tmp224_);
						_vala_ccode_node_unref0 (_tmp224_);
						_g_free0 (_tmp222_);
					} else {
						ValaCCodeIdentifier* _tmp225_;
						ValaCCodeIdentifier* _tmp226_;
						ValaCCodeFunctionCall* _tmp227_;
						ValaCCodeFunctionCall* _tmp228_;
						ValaCCodeIdentifier* _tmp229_;
						ValaCCodeIdentifier* _tmp230_;
						ValaCCodeFunctionCall* _tmp231_;
						gchar* _tmp232_;
						gchar* _tmp233_;
						ValaCCodeIdentifier* _tmp234_;
						ValaCCodeIdentifier* _tmp235_;
						_tmp225_ = vala_ccode_identifier_new ("g_type_module_register_type");
						_tmp226_ = _tmp225_;
						_tmp227_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp226_);
						_vala_ccode_node_unref0 (reg_call);
						reg_call = _tmp227_;
						_vala_ccode_node_unref0 (_tmp226_);
						_tmp228_ = reg_call;
						_tmp229_ = vala_ccode_identifier_new ("module");
						_tmp230_ = _tmp229_;
						vala_ccode_function_call_add_argument (_tmp228_, (ValaCCodeExpression*) _tmp230_);
						_vala_ccode_node_unref0 (_tmp230_);
						_tmp231_ = reg_call;
						_tmp232_ = vala_typeregister_function_get_parent_type_name (self);
						_tmp233_ = _tmp232_;
						_tmp234_ = vala_ccode_identifier_new (_tmp233_);
						_tmp235_ = _tmp234_;
						vala_ccode_function_call_add_argument (_tmp231_, (ValaCCodeExpression*) _tmp235_);
						_vala_ccode_node_unref0 (_tmp235_);
						_g_free0 (_tmp233_);
					}
				}
			}
		}
	}
	_tmp236_ = reg_call;
	_tmp237_ = type_symbol;
	_tmp238_ = vala_get_ccode_name ((ValaCodeNode*) _tmp237_);
	_tmp239_ = _tmp238_;
	_tmp240_ = g_strdup_printf ("\"%s\"", _tmp239_);
	_tmp241_ = _tmp240_;
	_tmp242_ = vala_ccode_constant_new (_tmp241_);
	_tmp243_ = _tmp242_;
	vala_ccode_function_call_add_argument (_tmp236_, (ValaCCodeExpression*) _tmp243_);
	_vala_ccode_node_unref0 (_tmp243_);
	_g_free0 (_tmp241_);
	_g_free0 (_tmp239_);
	_tmp244_ = type_symbol;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp244_, VALA_TYPE_STRUCT)) {
		ValaStruct* st = NULL;
		ValaTypeSymbol* _tmp245_;
		ValaStruct* _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_;
		_tmp245_ = type_symbol;
		_tmp246_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp245_, VALA_TYPE_STRUCT, ValaStruct));
		st = _tmp246_;
		_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_;
		_tmp263_ = type_symbol;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp263_, VALA_TYPE_ENUM)) {
			ValaEnum* en = NULL;
			ValaTypeSymbol* _tmp264_;
			ValaCCodeInitializerList* clist = NULL;
			ValaCCodeInitializerList* _tmp265_;
			ValaCCodeInitializerList* clist_ev = NULL;
			ValaCCodeInitializerList* _tmp300_;
			ValaCCodeInitializerList* _tmp301_;
			ValaCCodeConstant* _tmp302_;
			ValaCCodeConstant* _tmp303_;
			ValaCCodeInitializerList* _tmp304_;
			ValaCCodeConstant* _tmp305_;
			ValaCCodeConstant* _tmp306_;
			ValaCCodeInitializerList* _tmp307_;
			ValaCCodeConstant* _tmp308_;
			ValaCCodeConstant* _tmp309_;
			ValaCCodeInitializerList* _tmp310_;
			ValaCCodeInitializerList* _tmp311_;
			ValaCCodeVariableDeclarator* enum_decl = NULL;
			ValaCCodeInitializerList* _tmp312_;
			ValaCCodeVariableDeclarator* _tmp313_;
			ValaEnum* _tmp314_;
			gboolean _tmp315_;
			gboolean _tmp316_;
			ValaCCodeDeclaration* _tmp319_;
			ValaCCodeVariableDeclarator* _tmp320_;
			ValaCCodeDeclaration* _tmp321_;
			ValaCCodeBlock* _tmp322_;
			ValaCCodeDeclaration* _tmp323_;
			ValaCCodeFunctionCall* _tmp324_;
			ValaCCodeIdentifier* _tmp325_;
			ValaCCodeIdentifier* _tmp326_;
			_tmp264_ = type_symbol;
			en = G_TYPE_CHECK_INSTANCE_CAST (_tmp264_, VALA_TYPE_ENUM, ValaEnum);
			_tmp265_ = vala_ccode_initializer_list_new ();
			clist = _tmp265_;
			clist_ev = NULL;
			{
				ValaList* _ev_list = NULL;
				ValaEnum* _tmp266_;
				ValaList* _tmp267_;
				gint _ev_size = 0;
				ValaList* _tmp268_;
				gint _tmp269_;
				gint _tmp270_;
				gint _ev_index = 0;
				_tmp266_ = en;
				_tmp267_ = vala_enum_get_values (_tmp266_);
				_ev_list = _tmp267_;
				_tmp268_ = _ev_list;
				_tmp269_ = vala_collection_get_size ((ValaCollection*) _tmp268_);
				_tmp270_ = _tmp269_;
				_ev_size = _tmp270_;
				_ev_index = -1;
				while (TRUE) {
					gint _tmp271_;
					gint _tmp272_;
					ValaEnumValue* ev = NULL;
					ValaList* _tmp273_;
					gpointer _tmp274_;
					ValaCCodeInitializerList* _tmp275_;
					ValaCCodeInitializerList* _tmp276_;
					ValaEnumValue* _tmp277_;
					gchar* _tmp278_;
					gchar* _tmp279_;
					ValaCCodeConstant* _tmp280_;
					ValaCCodeConstant* _tmp281_;
					ValaCCodeInitializerList* _tmp282_;
					ValaEnumValue* _tmp283_;
					gchar* _tmp284_;
					gchar* _tmp285_;
					gchar* _tmp286_;
					gchar* _tmp287_;
					ValaCCodeConstant* _tmp288_;
					ValaCCodeConstant* _tmp289_;
					ValaCCodeInitializerList* _tmp290_;
					ValaEnumValue* _tmp291_;
					const gchar* _tmp292_;
					const gchar* _tmp293_;
					gchar* _tmp294_;
					gchar* _tmp295_;
					ValaCCodeConstant* _tmp296_;
					ValaCCodeConstant* _tmp297_;
					ValaCCodeInitializerList* _tmp298_;
					ValaCCodeInitializerList* _tmp299_;
					_ev_index = _ev_index + 1;
					_tmp271_ = _ev_index;
					_tmp272_ = _ev_size;
					if (!(_tmp271_ < _tmp272_)) {
						break;
					}
					_tmp273_ = _ev_list;
					_tmp274_ = vala_list_get (_tmp273_, _ev_index);
					ev = (ValaEnumValue*) _tmp274_;
					_tmp275_ = vala_ccode_initializer_list_new ();
					_vala_ccode_node_unref0 (clist_ev);
					clist_ev = _tmp275_;
					_tmp276_ = clist_ev;
					_tmp277_ = ev;
					_tmp278_ = vala_get_ccode_name ((ValaCodeNode*) _tmp277_);
					_tmp279_ = _tmp278_;
					_tmp280_ = vala_ccode_constant_new (_tmp279_);
					_tmp281_ = _tmp280_;
					vala_ccode_initializer_list_append (_tmp276_, (ValaCCodeExpression*) _tmp281_);
					_vala_ccode_node_unref0 (_tmp281_);
					_g_free0 (_tmp279_);
					_tmp282_ = clist_ev;
					_tmp283_ = ev;
					_tmp284_ = vala_get_ccode_name ((ValaCodeNode*) _tmp283_);
					_tmp285_ = _tmp284_;
					_tmp286_ = g_strdup_printf ("\"%s\"", _tmp285_);
					_tmp287_ = _tmp286_;
					_tmp288_ = vala_ccode_constant_new (_tmp287_);
					_tmp289_ = _tmp288_;
					vala_ccode_initializer_list_append (_tmp282_, (ValaCCodeExpression*) _tmp289_);
					_vala_ccode_node_unref0 (_tmp289_);
					_g_free0 (_tmp287_);
					_g_free0 (_tmp285_);
					_tmp290_ = clist_ev;
					_tmp291_ = ev;
					_tmp292_ = vala_enum_value_get_nick (_tmp291_);
					_tmp293_ = _tmp292_;
					_tmp294_ = g_strdup_printf ("\"%s\"", _tmp293_);
					_tmp295_ = _tmp294_;
					_tmp296_ = vala_ccode_constant_new (_tmp295_);
					_tmp297_ = _tmp296_;
					vala_ccode_initializer_list_append (_tmp290_, (ValaCCodeExpression*) _tmp297_);
					_vala_ccode_node_unref0 (_tmp297_);
					_g_free0 (_tmp295_);
					_tmp298_ = clist;
					_tmp299_ = clist_ev;
					vala_ccode_initializer_list_append (_tmp298_, (ValaCCodeExpression*) _tmp299_);
					_vala_code_node_unref0 (ev);
				}
			}
			_tmp300_ = vala_ccode_initializer_list_new ();
			_vala_ccode_node_unref0 (clist_ev);
			clist_ev = _tmp300_;
			_tmp301_ = clist_ev;
			_tmp302_ = vala_ccode_constant_new ("0");
			_tmp303_ = _tmp302_;
			vala_ccode_initializer_list_append (_tmp301_, (ValaCCodeExpression*) _tmp303_);
			_vala_ccode_node_unref0 (_tmp303_);
			_tmp304_ = clist_ev;
			_tmp305_ = vala_ccode_constant_new ("NULL");
			_tmp306_ = _tmp305_;
			vala_ccode_initializer_list_append (_tmp304_, (ValaCCodeExpression*) _tmp306_);
			_vala_ccode_node_unref0 (_tmp306_);
			_tmp307_ = clist_ev;
			_tmp308_ = vala_ccode_constant_new ("NULL");
			_tmp309_ = _tmp308_;
			vala_ccode_initializer_list_append (_tmp307_, (ValaCCodeExpression*) _tmp309_);
			_vala_ccode_node_unref0 (_tmp309_);
			_tmp310_ = clist;
			_tmp311_ = clist_ev;
			vala_ccode_initializer_list_append (_tmp310_, (ValaCCodeExpression*) _tmp311_);
			_tmp312_ = clist;
			_tmp313_ = vala_ccode_variable_declarator_new ("values[]", (ValaCCodeExpression*) _tmp312_, NULL);
			enum_decl = _tmp313_;
			_tmp314_ = en;
			_tmp315_ = vala_enum_get_is_flags (_tmp314_);
			_tmp316_ = _tmp315_;
			if (_tmp316_) {
				ValaCCodeDeclaration* _tmp317_;
				_tmp317_ = vala_ccode_declaration_new ("const GFlagsValue");
				_vala_ccode_node_unref0 (_cdecl_);
				_cdecl_ = _tmp317_;
			} else {
				ValaCCodeDeclaration* _tmp318_;
				_tmp318_ = vala_ccode_declaration_new ("const GEnumValue");
				_vala_ccode_node_unref0 (_cdecl_);
				_cdecl_ = _tmp318_;
			}
			_tmp319_ = _cdecl_;
			_tmp320_ = enum_decl;
			vala_ccode_declaration_add_declarator (_tmp319_, (ValaCCodeDeclarator*) _tmp320_);
			_tmp321_ = _cdecl_;
			vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp321_, VALA_CCODE_MODIFIERS_STATIC);
			_tmp322_ = type_init;
			_tmp323_ = _cdecl_;
			vala_ccode_block_add_statement (_tmp322_, (ValaCCodeNode*) _tmp323_);
			_tmp324_ = reg_call;
			_tmp325_ = vala_ccode_identifier_new ("values");
			_tmp326_ = _tmp325_;
			vala_ccode_function_call_add_argument (_tmp324_, (ValaCCodeExpression*) _tmp326_);
			_vala_ccode_node_unref0 (_tmp326_);
			_vala_ccode_node_unref0 (enum_decl);
			_vala_ccode_node_unref0 (clist_ev);
			_vala_ccode_node_unref0 (clist);
		} else {
			ValaTypeSymbol* _tmp327_;
			_tmp327_ = type_symbol;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp327_, VALA_TYPE_ERROR_DOMAIN)) {
				ValaErrorDomain* edomain = NULL;
				ValaTypeSymbol* _tmp328_;
				ValaCCodeInitializerList* clist = NULL;
				ValaCCodeInitializerList* _tmp329_;
				ValaCCodeInitializerList* clist_ec = NULL;
				ValaCCodeInitializerList* _tmp364_;
				ValaCCodeInitializerList* _tmp365_;
				ValaCCodeConstant* _tmp366_;
				ValaCCodeConstant* _tmp367_;
				ValaCCodeInitializerList* _tmp368_;
				ValaCCodeConstant* _tmp369_;
				ValaCCodeConstant* _tmp370_;
				ValaCCodeInitializerList* _tmp371_;
				ValaCCodeConstant* _tmp372_;
				ValaCCodeConstant* _tmp373_;
				ValaCCodeInitializerList* _tmp374_;
				ValaCCodeInitializerList* _tmp375_;
				ValaCCodeVariableDeclarator* edomain_decl = NULL;
				ValaCCodeInitializerList* _tmp376_;
				ValaCCodeVariableDeclarator* _tmp377_;
				ValaCCodeDeclaration* _tmp378_;
				ValaCCodeDeclaration* _tmp379_;
				ValaCCodeVariableDeclarator* _tmp380_;
				ValaCCodeDeclaration* _tmp381_;
				ValaCCodeBlock* _tmp382_;
				ValaCCodeDeclaration* _tmp383_;
				ValaCCodeFunctionCall* _tmp384_;
				ValaCCodeIdentifier* _tmp385_;
				ValaCCodeIdentifier* _tmp386_;
				_tmp328_ = type_symbol;
				edomain = G_TYPE_CHECK_INSTANCE_CAST (_tmp328_, VALA_TYPE_ERROR_DOMAIN, ValaErrorDomain);
				_tmp329_ = vala_ccode_initializer_list_new ();
				clist = _tmp329_;
				clist_ec = NULL;
				{
					ValaList* _ec_list = NULL;
					ValaErrorDomain* _tmp330_;
					ValaList* _tmp331_;
					gint _ec_size = 0;
					ValaList* _tmp332_;
					gint _tmp333_;
					gint _tmp334_;
					gint _ec_index = 0;
					_tmp330_ = edomain;
					_tmp331_ = vala_error_domain_get_codes (_tmp330_);
					_ec_list = _tmp331_;
					_tmp332_ = _ec_list;
					_tmp333_ = vala_collection_get_size ((ValaCollection*) _tmp332_);
					_tmp334_ = _tmp333_;
					_ec_size = _tmp334_;
					_ec_index = -1;
					while (TRUE) {
						gint _tmp335_;
						gint _tmp336_;
						ValaErrorCode* ec = NULL;
						ValaList* _tmp337_;
						gpointer _tmp338_;
						ValaCCodeInitializerList* _tmp339_;
						ValaCCodeInitializerList* _tmp340_;
						ValaErrorCode* _tmp341_;
						gchar* _tmp342_;
						gchar* _tmp343_;
						ValaCCodeConstant* _tmp344_;
						ValaCCodeConstant* _tmp345_;
						ValaCCodeInitializerList* _tmp346_;
						ValaErrorCode* _tmp347_;
						gchar* _tmp348_;
						gchar* _tmp349_;
						gchar* _tmp350_;
						gchar* _tmp351_;
						ValaCCodeConstant* _tmp352_;
						ValaCCodeConstant* _tmp353_;
						ValaCCodeInitializerList* _tmp354_;
						ValaErrorCode* _tmp355_;
						const gchar* _tmp356_;
						const gchar* _tmp357_;
						gchar* _tmp358_;
						gchar* _tmp359_;
						ValaCCodeConstant* _tmp360_;
						ValaCCodeConstant* _tmp361_;
						ValaCCodeInitializerList* _tmp362_;
						ValaCCodeInitializerList* _tmp363_;
						_ec_index = _ec_index + 1;
						_tmp335_ = _ec_index;
						_tmp336_ = _ec_size;
						if (!(_tmp335_ < _tmp336_)) {
							break;
						}
						_tmp337_ = _ec_list;
						_tmp338_ = vala_list_get (_tmp337_, _ec_index);
						ec = (ValaErrorCode*) _tmp338_;
						_tmp339_ = vala_ccode_initializer_list_new ();
						_vala_ccode_node_unref0 (clist_ec);
						clist_ec = _tmp339_;
						_tmp340_ = clist_ec;
						_tmp341_ = ec;
						_tmp342_ = vala_get_ccode_name ((ValaCodeNode*) _tmp341_);
						_tmp343_ = _tmp342_;
						_tmp344_ = vala_ccode_constant_new (_tmp343_);
						_tmp345_ = _tmp344_;
						vala_ccode_initializer_list_append (_tmp340_, (ValaCCodeExpression*) _tmp345_);
						_vala_ccode_node_unref0 (_tmp345_);
						_g_free0 (_tmp343_);
						_tmp346_ = clist_ec;
						_tmp347_ = ec;
						_tmp348_ = vala_get_ccode_name ((ValaCodeNode*) _tmp347_);
						_tmp349_ = _tmp348_;
						_tmp350_ = g_strdup_printf ("\"%s\"", _tmp349_);
						_tmp351_ = _tmp350_;
						_tmp352_ = vala_ccode_constant_new (_tmp351_);
						_tmp353_ = _tmp352_;
						vala_ccode_initializer_list_append (_tmp346_, (ValaCCodeExpression*) _tmp353_);
						_vala_ccode_node_unref0 (_tmp353_);
						_g_free0 (_tmp351_);
						_g_free0 (_tmp349_);
						_tmp354_ = clist_ec;
						_tmp355_ = ec;
						_tmp356_ = vala_error_code_get_nick (_tmp355_);
						_tmp357_ = _tmp356_;
						_tmp358_ = g_strdup_printf ("\"%s\"", _tmp357_);
						_tmp359_ = _tmp358_;
						_tmp360_ = vala_ccode_constant_new (_tmp359_);
						_tmp361_ = _tmp360_;
						vala_ccode_initializer_list_append (_tmp354_, (ValaCCodeExpression*) _tmp361_);
						_vala_ccode_node_unref0 (_tmp361_);
						_g_free0 (_tmp359_);
						_tmp362_ = clist;
						_tmp363_ = clist_ec;
						vala_ccode_initializer_list_append (_tmp362_, (ValaCCodeExpression*) _tmp363_);
						_vala_code_node_unref0 (ec);
					}
				}
				_tmp364_ = vala_ccode_initializer_list_new ();
				_vala_ccode_node_unref0 (clist_ec);
				clist_ec = _tmp364_;
				_tmp365_ = clist_ec;
				_tmp366_ = vala_ccode_constant_new ("0");
				_tmp367_ = _tmp366_;
				vala_ccode_initializer_list_append (_tmp365_, (ValaCCodeExpression*) _tmp367_);
				_vala_ccode_node_unref0 (_tmp367_);
				_tmp368_ = clist_ec;
				_tmp369_ = vala_ccode_constant_new ("NULL");
				_tmp370_ = _tmp369_;
				vala_ccode_initializer_list_append (_tmp368_, (ValaCCodeExpression*) _tmp370_);
				_vala_ccode_node_unref0 (_tmp370_);
				_tmp371_ = clist_ec;
				_tmp372_ = vala_ccode_constant_new ("NULL");
				_tmp373_ = _tmp372_;
				vala_ccode_initializer_list_append (_tmp371_, (ValaCCodeExpression*) _tmp373_);
				_vala_ccode_node_unref0 (_tmp373_);
				_tmp374_ = clist;
				_tmp375_ = clist_ec;
				vala_ccode_initializer_list_append (_tmp374_, (ValaCCodeExpression*) _tmp375_);
				_tmp376_ = clist;
				_tmp377_ = vala_ccode_variable_declarator_new ("values[]", (ValaCCodeExpression*) _tmp376_, NULL);
				edomain_decl = _tmp377_;
				_tmp378_ = vala_ccode_declaration_new ("const GEnumValue");
				_vala_ccode_node_unref0 (_cdecl_);
				_cdecl_ = _tmp378_;
				_tmp379_ = _cdecl_;
				_tmp380_ = edomain_decl;
				vala_ccode_declaration_add_declarator (_tmp379_, (ValaCCodeDeclarator*) _tmp380_);
				_tmp381_ = _cdecl_;
				vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp381_, VALA_CCODE_MODIFIERS_STATIC);
				_tmp382_ = type_init;
				_tmp383_ = _cdecl_;
				vala_ccode_block_add_statement (_tmp382_, (ValaCCodeNode*) _tmp383_);
				_tmp384_ = reg_call;
				_tmp385_ = vala_ccode_identifier_new ("values");
				_tmp386_ = _tmp385_;
				vala_ccode_function_call_add_argument (_tmp384_, (ValaCCodeExpression*) _tmp386_);
				_vala_ccode_node_unref0 (_tmp386_);
				_vala_ccode_node_unref0 (edomain_decl);
				_vala_ccode_node_unref0 (clist_ec);
				_vala_ccode_node_unref0 (clist);
			} else {
				ValaCCodeFunctionCall* _tmp387_;
				ValaCCodeIdentifier* _tmp388_;
				ValaCCodeIdentifier* _tmp389_;
				ValaCCodeFunctionCall* _tmp393_;
				gchar* _tmp394_;
				gchar* _tmp395_;
				ValaCCodeConstant* _tmp396_;
				ValaCCodeConstant* _tmp397_;
				_tmp387_ = reg_call;
				_tmp388_ = vala_ccode_identifier_new ("&g_define_type_info");
				_tmp389_ = _tmp388_;
				vala_ccode_function_call_add_argument (_tmp387_, (ValaCCodeExpression*) _tmp389_);
				_vala_ccode_node_unref0 (_tmp389_);
				if (fundamental) {
					ValaCCodeFunctionCall* _tmp390_;
					ValaCCodeIdentifier* _tmp391_;
					ValaCCodeIdentifier* _tmp392_;
					_tmp390_ = reg_call;
					_tmp391_ = vala_ccode_identifier_new ("&g_define_type_fundamental_info");
					_tmp392_ = _tmp391_;
					vala_ccode_function_call_add_argument (_tmp390_, (ValaCCodeExpression*) _tmp392_);
					_vala_ccode_node_unref0 (_tmp392_);
				}
				_tmp393_ = reg_call;
				_tmp394_ = vala_typeregister_function_get_type_flags (self);
				_tmp395_ = _tmp394_;
				_tmp396_ = vala_ccode_constant_new (_tmp395_);
				_tmp397_ = _tmp396_;
				vala_ccode_function_call_add_argument (_tmp393_, (ValaCCodeExpression*) _tmp397_);
				_vala_ccode_node_unref0 (_tmp397_);
				_g_free0 (_tmp395_);
			}
		}
	}
	_tmp398_ = vala_ccode_block_new ();
	once_call_block = _tmp398_;
	if (!plugin) {
		ValaCCodeDeclaration* temp_decl = NULL;
		ValaCCodeDeclaration* _tmp399_;
		ValaCCodeDeclaration* _tmp400_;
		const gchar* _tmp401_;
		ValaCCodeFunctionCall* _tmp402_;
		ValaCCodeVariableDeclarator* _tmp403_;
		ValaCCodeVariableDeclarator* _tmp404_;
		ValaCCodeBlock* _tmp405_;
		ValaCCodeDeclaration* _tmp406_;
		ValaCCodeDeclaration* _tmp407_;
		ValaCCodeDeclaration* _tmp408_;
		const gchar* _tmp409_;
		ValaCCodeFunction* _tmp410_;
		const gchar* _tmp411_;
		const gchar* _tmp412_;
		ValaCCodeIdentifier* _tmp413_;
		ValaCCodeIdentifier* _tmp414_;
		ValaCCodeFunctionCall* _tmp415_;
		ValaCCodeFunctionCall* _tmp416_;
		ValaCCodeVariableDeclarator* _tmp417_;
		ValaCCodeVariableDeclarator* _tmp418_;
		ValaCCodeBlock* _tmp419_;
		ValaCCodeDeclaration* _tmp420_;
		_tmp399_ = vala_ccode_declaration_new ("GType");
		temp_decl = _tmp399_;
		_tmp400_ = temp_decl;
		_tmp401_ = type_id_name;
		_tmp402_ = reg_call;
		_tmp403_ = vala_ccode_variable_declarator_new (_tmp401_, (ValaCCodeExpression*) _tmp402_, NULL);
		_tmp404_ = _tmp403_;
		vala_ccode_declaration_add_declarator (_tmp400_, (ValaCCodeDeclarator*) _tmp404_);
		_vala_ccode_node_unref0 (_tmp404_);
		_tmp405_ = type_init;
		_tmp406_ = temp_decl;
		vala_ccode_block_add_statement (_tmp405_, (ValaCCodeNode*) _tmp406_);
		_tmp407_ = vala_ccode_declaration_new ("GType");
		_vala_ccode_node_unref0 (temp_decl);
		temp_decl = _tmp407_;
		_tmp408_ = temp_decl;
		_tmp409_ = type_id_name;
		_tmp410_ = fun_once;
		_tmp411_ = vala_ccode_function_get_name (_tmp410_);
		_tmp412_ = _tmp411_;
		_tmp413_ = vala_ccode_identifier_new (_tmp412_);
		_tmp414_ = _tmp413_;
		_tmp415_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp414_);
		_tmp416_ = _tmp415_;
		_tmp417_ = vala_ccode_variable_declarator_new (_tmp409_, (ValaCCodeExpression*) _tmp416_, NULL);
		_tmp418_ = _tmp417_;
		vala_ccode_declaration_add_declarator (_tmp408_, (ValaCCodeDeclarator*) _tmp418_);
		_vala_ccode_node_unref0 (_tmp418_);
		_vala_ccode_node_unref0 (_tmp416_);
		_vala_ccode_node_unref0 (_tmp414_);
		_tmp419_ = once_call_block;
		_tmp420_ = temp_decl;
		vala_ccode_block_add_statement (_tmp419_, (ValaCCodeNode*) _tmp420_);
		_vala_ccode_node_unref0 (temp_decl);
	} else {
		ValaCCodeBlock* _tmp421_;
		const gchar* _tmp422_;
		ValaCCodeIdentifier* _tmp423_;
		ValaCCodeIdentifier* _tmp424_;
		ValaCCodeFunctionCall* _tmp425_;
		ValaCCodeAssignment* _tmp426_;
		ValaCCodeAssignment* _tmp427_;
		ValaCCodeExpressionStatement* _tmp428_;
		ValaCCodeExpressionStatement* _tmp429_;
		_tmp421_ = type_init;
		_tmp422_ = type_id_name;
		_tmp423_ = vala_ccode_identifier_new (_tmp422_);
		_tmp424_ = _tmp423_;
		_tmp425_ = reg_call;
		_tmp426_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp424_, (ValaCCodeExpression*) _tmp425_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
		_tmp427_ = _tmp426_;
		_tmp428_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp427_);
		_tmp429_ = _tmp428_;
		vala_ccode_block_add_statement (_tmp421_, (ValaCCodeNode*) _tmp429_);
		_vala_ccode_node_unref0 (_tmp429_);
		_vala_ccode_node_unref0 (_tmp427_);
		_vala_ccode_node_unref0 (_tmp424_);
	}
	_tmp431_ = cl;
	if (_tmp431_ != NULL) {
		ValaClass* _tmp432_;
		gboolean _tmp433_;
		gboolean _tmp434_;
		_tmp432_ = cl;
		_tmp433_ = vala_class_get_has_class_private_fields (_tmp432_);
		_tmp434_ = _tmp433_;
		_tmp430_ = _tmp434_;
	} else {
		_tmp430_ = FALSE;
	}
	if (_tmp430_) {
		ValaCCodeFunctionCall* add_class_private_call = NULL;
		ValaCCodeIdentifier* _tmp435_;
		ValaCCodeIdentifier* _tmp436_;
		ValaCCodeFunctionCall* _tmp437_;
		ValaCCodeFunctionCall* _tmp438_;
		const gchar* _tmp439_;
		ValaCCodeIdentifier* _tmp440_;
		ValaCCodeIdentifier* _tmp441_;
		ValaCCodeFunctionCall* _tmp442_;
		ValaClass* _tmp443_;
		gchar* _tmp444_;
		gchar* _tmp445_;
		gchar* _tmp446_;
		gchar* _tmp447_;
		ValaCCodeIdentifier* _tmp448_;
		ValaCCodeIdentifier* _tmp449_;
		ValaCCodeBlock* _tmp450_;
		ValaCCodeFunctionCall* _tmp451_;
		ValaCCodeExpressionStatement* _tmp452_;
		ValaCCodeExpressionStatement* _tmp453_;
		_tmp435_ = vala_ccode_identifier_new ("g_type_add_class_private");
		_tmp436_ = _tmp435_;
		_tmp437_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp436_);
		_vala_ccode_node_unref0 (add_class_private_call);
		add_class_private_call = _tmp437_;
		_vala_ccode_node_unref0 (_tmp436_);
		_tmp438_ = add_class_private_call;
		_tmp439_ = type_id_name;
		_tmp440_ = vala_ccode_identifier_new (_tmp439_);
		_tmp441_ = _tmp440_;
		vala_ccode_function_call_add_argument (_tmp438_, (ValaCCodeExpression*) _tmp441_);
		_vala_ccode_node_unref0 (_tmp441_);
		_tmp442_ = add_class_private_call;
		_tmp443_ = cl;
		_tmp444_ = vala_get_ccode_type_name ((ValaObjectTypeSymbol*) _tmp443_);
		_tmp445_ = _tmp444_;
		_tmp446_ = g_strdup_printf ("sizeof (%sPrivate)", _tmp445_);
		_tmp447_ = _tmp446_;
		_tmp448_ = vala_ccode_identifier_new (_tmp447_);
		_tmp449_ = _tmp448_;
		vala_ccode_function_call_add_argument (_tmp442_, (ValaCCodeExpression*) _tmp449_);
		_vala_ccode_node_unref0 (_tmp449_);
		_g_free0 (_tmp447_);
		_g_free0 (_tmp445_);
		_tmp450_ = type_init;
		_tmp451_ = add_class_private_call;
		_tmp452_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp451_);
		_tmp453_ = _tmp452_;
		vala_ccode_block_add_statement (_tmp450_, (ValaCCodeNode*) _tmp453_);
		_vala_ccode_node_unref0 (_tmp453_);
		_vala_ccode_node_unref0 (add_class_private_call);
	}
	if (!declaration_only) {
		ValaCCodeBlock* _tmp454_;
		_tmp454_ = type_init;
		vala_typeregister_function_get_type_interface_init_statements (self, context, _tmp454_, plugin);
	}
	_tmp456_ = cl;
	if (_tmp456_ != NULL) {
		gboolean _tmp457_ = FALSE;
		ValaClass* _tmp458_;
		gboolean _tmp459_;
		gboolean _tmp460_;
		_tmp458_ = cl;
		_tmp459_ = vala_class_get_has_private_fields (_tmp458_);
		_tmp460_ = _tmp459_;
		if (_tmp460_) {
			_tmp457_ = TRUE;
		} else {
			ValaClass* _tmp461_;
			_tmp461_ = cl;
			_tmp457_ = vala_object_type_symbol_has_type_parameters ((ValaObjectTypeSymbol*) _tmp461_);
		}
		_tmp455_ = _tmp457_;
	} else {
		_tmp455_ = FALSE;
	}
	if (_tmp455_) {
		if (!plugin) {
			ValaCCodeFunctionCall* ccall = NULL;
			ValaCCodeIdentifier* _tmp462_;
			ValaCCodeIdentifier* _tmp463_;
			ValaCCodeFunctionCall* _tmp464_;
			ValaCCodeFunctionCall* _tmp465_;
			ValaCCodeFunctionCall* _tmp466_;
			const gchar* _tmp467_;
			ValaCCodeIdentifier* _tmp468_;
			ValaCCodeIdentifier* _tmp469_;
			ValaCCodeFunctionCall* _tmp470_;
			ValaClass* _tmp471_;
			gchar* _tmp472_;
			gchar* _tmp473_;
			gchar* _tmp474_;
			gchar* _tmp475_;
			ValaCCodeIdentifier* _tmp476_;
			ValaCCodeIdentifier* _tmp477_;
			ValaCCodeBlock* _tmp478_;
			ValaClass* _tmp479_;
			gchar* _tmp480_;
			gchar* _tmp481_;
			gchar* _tmp482_;
			gchar* _tmp483_;
			ValaCCodeIdentifier* _tmp484_;
			ValaCCodeIdentifier* _tmp485_;
			ValaCCodeFunctionCall* _tmp486_;
			ValaCCodeAssignment* _tmp487_;
			ValaCCodeAssignment* _tmp488_;
			ValaCCodeExpressionStatement* _tmp489_;
			ValaCCodeExpressionStatement* _tmp490_;
			_tmp462_ = vala_ccode_identifier_new ("g_type_add_instance_private");
			_tmp463_ = _tmp462_;
			_tmp464_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp463_);
			_tmp465_ = _tmp464_;
			_vala_ccode_node_unref0 (_tmp463_);
			ccall = _tmp465_;
			_tmp466_ = ccall;
			_tmp467_ = type_id_name;
			_tmp468_ = vala_ccode_identifier_new (_tmp467_);
			_tmp469_ = _tmp468_;
			vala_ccode_function_call_add_argument (_tmp466_, (ValaCCodeExpression*) _tmp469_);
			_vala_ccode_node_unref0 (_tmp469_);
			_tmp470_ = ccall;
			_tmp471_ = cl;
			_tmp472_ = vala_get_ccode_name ((ValaCodeNode*) _tmp471_);
			_tmp473_ = _tmp472_;
			_tmp474_ = g_strdup_printf ("sizeof (%sPrivate)", _tmp473_);
			_tmp475_ = _tmp474_;
			_tmp476_ = vala_ccode_identifier_new (_tmp475_);
			_tmp477_ = _tmp476_;
			vala_ccode_function_call_add_argument (_tmp470_, (ValaCCodeExpression*) _tmp477_);
			_vala_ccode_node_unref0 (_tmp477_);
			_g_free0 (_tmp475_);
			_g_free0 (_tmp473_);
			_tmp478_ = type_init;
			_tmp479_ = cl;
			_tmp480_ = vala_get_ccode_name ((ValaCodeNode*) _tmp479_);
			_tmp481_ = _tmp480_;
			_tmp482_ = g_strdup_printf ("%s_private_offset", _tmp481_);
			_tmp483_ = _tmp482_;
			_tmp484_ = vala_ccode_identifier_new (_tmp483_);
			_tmp485_ = _tmp484_;
			_tmp486_ = ccall;
			_tmp487_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp485_, (ValaCCodeExpression*) _tmp486_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
			_tmp488_ = _tmp487_;
			_tmp489_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp488_);
			_tmp490_ = _tmp489_;
			vala_ccode_block_add_statement (_tmp478_, (ValaCCodeNode*) _tmp490_);
			_vala_ccode_node_unref0 (_tmp490_);
			_vala_ccode_node_unref0 (_tmp488_);
			_vala_ccode_node_unref0 (_tmp485_);
			_g_free0 (_tmp483_);
			_g_free0 (_tmp481_);
			_vala_ccode_node_unref0 (ccall);
		} else {
			ValaCCodeBlock* _tmp491_;
			ValaClass* _tmp492_;
			gchar* _tmp493_;
			gchar* _tmp494_;
			gchar* _tmp495_;
			gchar* _tmp496_;
			ValaCCodeIdentifier* _tmp497_;
			ValaCCodeIdentifier* _tmp498_;
			ValaClass* _tmp499_;
			gchar* _tmp500_;
			gchar* _tmp501_;
			gchar* _tmp502_;
			gchar* _tmp503_;
			ValaCCodeIdentifier* _tmp504_;
			ValaCCodeIdentifier* _tmp505_;
			ValaCCodeAssignment* _tmp506_;
			ValaCCodeAssignment* _tmp507_;
			ValaCCodeExpressionStatement* _tmp508_;
			ValaCCodeExpressionStatement* _tmp509_;
			_tmp491_ = type_init;
			_tmp492_ = cl;
			_tmp493_ = vala_get_ccode_name ((ValaCodeNode*) _tmp492_);
			_tmp494_ = _tmp493_;
			_tmp495_ = g_strdup_printf ("%s_private_offset", _tmp494_);
			_tmp496_ = _tmp495_;
			_tmp497_ = vala_ccode_identifier_new (_tmp496_);
			_tmp498_ = _tmp497_;
			_tmp499_ = cl;
			_tmp500_ = vala_get_ccode_name ((ValaCodeNode*) _tmp499_);
			_tmp501_ = _tmp500_;
			_tmp502_ = g_strdup_printf ("sizeof (%sPrivate)", _tmp501_);
			_tmp503_ = _tmp502_;
			_tmp504_ = vala_ccode_identifier_new (_tmp503_);
			_tmp505_ = _tmp504_;
			_tmp506_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp498_, (ValaCCodeExpression*) _tmp505_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
			_tmp507_ = _tmp506_;
			_tmp508_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp507_);
			_tmp509_ = _tmp508_;
			vala_ccode_block_add_statement (_tmp491_, (ValaCCodeNode*) _tmp509_);
			_vala_ccode_node_unref0 (_tmp509_);
			_vala_ccode_node_unref0 (_tmp507_);
			_vala_ccode_node_unref0 (_tmp505_);
			_g_free0 (_tmp503_);
			_g_free0 (_tmp501_);
			_vala_ccode_node_unref0 (_tmp498_);
			_g_free0 (_tmp496_);
			_g_free0 (_tmp494_);
		}
	}
	if (!plugin) {
		ValaCCodeFunctionCall* enter = NULL;
		ValaCCodeIdentifier* _tmp510_;
		ValaCCodeIdentifier* _tmp511_;
		ValaCCodeFunctionCall* _tmp512_;
		ValaCCodeFunctionCall* _tmp513_;
		ValaCCodeFunctionCall* _tmp514_;
		const gchar* _tmp515_;
		gchar* _tmp516_;
		gchar* _tmp517_;
		ValaCCodeIdentifier* _tmp518_;
		ValaCCodeIdentifier* _tmp519_;
		ValaCCodeUnaryExpression* _tmp520_;
		ValaCCodeUnaryExpression* _tmp521_;
		ValaCCodeFunctionCall* leave = NULL;
		ValaCCodeIdentifier* _tmp522_;
		ValaCCodeIdentifier* _tmp523_;
		ValaCCodeFunctionCall* _tmp524_;
		ValaCCodeFunctionCall* _tmp525_;
		ValaCCodeFunctionCall* _tmp526_;
		const gchar* _tmp527_;
		gchar* _tmp528_;
		gchar* _tmp529_;
		ValaCCodeIdentifier* _tmp530_;
		ValaCCodeIdentifier* _tmp531_;
		ValaCCodeUnaryExpression* _tmp532_;
		ValaCCodeUnaryExpression* _tmp533_;
		ValaCCodeFunctionCall* _tmp534_;
		const gchar* _tmp535_;
		ValaCCodeIdentifier* _tmp536_;
		ValaCCodeIdentifier* _tmp537_;
		ValaCCodeBlock* _tmp538_;
		ValaCCodeFunctionCall* _tmp539_;
		ValaCCodeExpressionStatement* _tmp540_;
		ValaCCodeExpressionStatement* _tmp541_;
		ValaCCodeIfStatement* cif = NULL;
		ValaCCodeFunctionCall* _tmp542_;
		ValaCCodeBlock* _tmp543_;
		ValaCCodeIfStatement* _tmp544_;
		ValaCCodeBlock* _tmp545_;
		ValaCCodeIfStatement* _tmp546_;
		ValaCCodeBlock* _tmp547_;
		const gchar* _tmp548_;
		gchar* _tmp549_;
		gchar* _tmp550_;
		ValaCCodeIdentifier* _tmp551_;
		ValaCCodeIdentifier* _tmp552_;
		ValaCCodeReturnStatement* _tmp553_;
		ValaCCodeReturnStatement* _tmp554_;
		ValaCCodeBlock* _tmp555_;
		ValaCCodeBlock* _tmp556_;
		ValaCCodeBlock* _tmp557_;
		const gchar* _tmp558_;
		ValaCCodeIdentifier* _tmp559_;
		ValaCCodeIdentifier* _tmp560_;
		ValaCCodeReturnStatement* _tmp561_;
		ValaCCodeReturnStatement* _tmp562_;
		_tmp510_ = vala_ccode_identifier_new ("g_once_init_enter");
		_tmp511_ = _tmp510_;
		_tmp512_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp511_);
		_tmp513_ = _tmp512_;
		_vala_ccode_node_unref0 (_tmp511_);
		enter = _tmp513_;
		_tmp514_ = enter;
		_tmp515_ = type_id_name;
		_tmp516_ = g_strconcat (_tmp515_, "__once", NULL);
		_tmp517_ = _tmp516_;
		_tmp518_ = vala_ccode_identifier_new (_tmp517_);
		_tmp519_ = _tmp518_;
		_tmp520_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp519_);
		_tmp521_ = _tmp520_;
		vala_ccode_function_call_add_argument (_tmp514_, (ValaCCodeExpression*) _tmp521_);
		_vala_ccode_node_unref0 (_tmp521_);
		_vala_ccode_node_unref0 (_tmp519_);
		_g_free0 (_tmp517_);
		_tmp522_ = vala_ccode_identifier_new ("g_once_init_leave");
		_tmp523_ = _tmp522_;
		_tmp524_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp523_);
		_tmp525_ = _tmp524_;
		_vala_ccode_node_unref0 (_tmp523_);
		leave = _tmp525_;
		_tmp526_ = leave;
		_tmp527_ = type_id_name;
		_tmp528_ = g_strconcat (_tmp527_, "__once", NULL);
		_tmp529_ = _tmp528_;
		_tmp530_ = vala_ccode_identifier_new (_tmp529_);
		_tmp531_ = _tmp530_;
		_tmp532_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp531_);
		_tmp533_ = _tmp532_;
		vala_ccode_function_call_add_argument (_tmp526_, (ValaCCodeExpression*) _tmp533_);
		_vala_ccode_node_unref0 (_tmp533_);
		_vala_ccode_node_unref0 (_tmp531_);
		_g_free0 (_tmp529_);
		_tmp534_ = leave;
		_tmp535_ = type_id_name;
		_tmp536_ = vala_ccode_identifier_new (_tmp535_);
		_tmp537_ = _tmp536_;
		vala_ccode_function_call_add_argument (_tmp534_, (ValaCCodeExpression*) _tmp537_);
		_vala_ccode_node_unref0 (_tmp537_);
		_tmp538_ = once_call_block;
		_tmp539_ = leave;
		_tmp540_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp539_);
		_tmp541_ = _tmp540_;
		vala_ccode_block_add_statement (_tmp538_, (ValaCCodeNode*) _tmp541_);
		_vala_ccode_node_unref0 (_tmp541_);
		_tmp542_ = enter;
		_tmp543_ = once_call_block;
		_tmp544_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) _tmp542_, (ValaCCodeStatement*) _tmp543_, NULL);
		cif = _tmp544_;
		_tmp545_ = type_block;
		_tmp546_ = cif;
		vala_ccode_block_add_statement (_tmp545_, (ValaCCodeNode*) _tmp546_);
		_tmp547_ = type_block;
		_tmp548_ = type_id_name;
		_tmp549_ = g_strconcat (_tmp548_, "__once", NULL);
		_tmp550_ = _tmp549_;
		_tmp551_ = vala_ccode_identifier_new (_tmp550_);
		_tmp552_ = _tmp551_;
		_tmp553_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp552_);
		_tmp554_ = _tmp553_;
		vala_ccode_block_add_statement (_tmp547_, (ValaCCodeNode*) _tmp554_);
		_vala_ccode_node_unref0 (_tmp554_);
		_vala_ccode_node_unref0 (_tmp552_);
		_g_free0 (_tmp550_);
		_tmp555_ = type_init;
		_tmp556_ = _vala_ccode_node_ref0 (_tmp555_);
		_vala_ccode_node_unref0 (type_once_block);
		type_once_block = _tmp556_;
		_tmp557_ = type_once_block;
		_tmp558_ = type_id_name;
		_tmp559_ = vala_ccode_identifier_new (_tmp558_);
		_tmp560_ = _tmp559_;
		_tmp561_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp560_);
		_tmp562_ = _tmp561_;
		vala_ccode_block_add_statement (_tmp557_, (ValaCCodeNode*) _tmp562_);
		_vala_ccode_node_unref0 (_tmp562_);
		_vala_ccode_node_unref0 (_tmp560_);
		_vala_ccode_node_unref0 (cif);
		_vala_ccode_node_unref0 (leave);
		_vala_ccode_node_unref0 (enter);
	} else {
		ValaCCodeBlock* _tmp563_;
		ValaCCodeBlock* _tmp564_;
		ValaCCodeBlock* _tmp565_;
		const gchar* _tmp566_;
		ValaCCodeIdentifier* _tmp567_;
		ValaCCodeIdentifier* _tmp568_;
		ValaCCodeReturnStatement* _tmp569_;
		ValaCCodeReturnStatement* _tmp570_;
		_tmp563_ = type_init;
		_tmp564_ = _vala_ccode_node_ref0 (_tmp563_);
		_vala_ccode_node_unref0 (type_block);
		type_block = _tmp564_;
		_tmp565_ = type_block;
		_tmp566_ = type_id_name;
		_tmp567_ = vala_ccode_identifier_new (_tmp566_);
		_tmp568_ = _tmp567_;
		_tmp569_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp568_);
		_tmp570_ = _tmp569_;
		vala_ccode_block_add_statement (_tmp565_, (ValaCCodeNode*) _tmp570_);
		_vala_ccode_node_unref0 (_tmp570_);
		_vala_ccode_node_unref0 (_tmp568_);
	}
	if (!plugin) {
		ValaCCodeFunction* _tmp571_;
		ValaCCodeBlock* _tmp572_;
		ValaCCodeFragment* _tmp573_;
		ValaCCodeFunction* _tmp574_;
		_tmp571_ = fun_once;
		_tmp572_ = type_once_block;
		vala_ccode_function_set_block (_tmp571_, _tmp572_);
		_tmp573_ = self->priv->definition_fragment;
		_tmp574_ = fun_once;
		vala_ccode_fragment_append (_tmp573_, (ValaCCodeNode*) _tmp574_);
	}
	_tmp575_ = fun;
	_tmp576_ = type_block;
	vala_ccode_function_set_block (_tmp575_, _tmp576_);
	_tmp577_ = self->priv->definition_fragment;
	_tmp578_ = fun;
	vala_ccode_fragment_append (_tmp577_, (ValaCCodeNode*) _tmp578_);
	_vala_ccode_node_unref0 (once_call_block);
	_vala_ccode_node_unref0 (reg_call);
	_vala_ccode_node_unref0 (type_init);
	_g_free0 (type_value_table_decl_name);
	_vala_ccode_node_unref0 (fun_once);
	_vala_ccode_node_unref0 (fun);
	_vala_ccode_node_unref0 (_cdecl_);
	_vala_ccode_node_unref0 (type_once_block);
	_vala_ccode_node_unref0 (type_block);
	_g_free0 (type_id_name);
	_vala_code_node_unref0 (type_symbol);
}

/**
 * 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)
{
	ValaTypeRegisterFunctionClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self);
	if (_klass_->get_type_declaration) {
		return _klass_->get_type_declaration (self);
	}
	return NULL;
}

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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)
{
	g_assert_not_reached ();
}

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

/**
 * 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;
	result = NULL;
	return result;
}

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

/**
 * 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;
	result = NULL;
	return result;
}

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

/**
 * 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;
	result = NULL;
	return result;
}

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

/**
 * 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;
	result = NULL;
	return result;
}

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

/**
 * 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;
	result = NULL;
	return result;
}

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

/**
 * 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;
	result = NULL;
	return result;
}

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

/**
 * 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* _tmp0_;
	gchar* result;
	_tmp0_ = g_strdup ("0");
	result = _tmp0_;
	return result;
}

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

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

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

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

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

ValaCCodeFragment*
vala_typeregister_function_get_source_declaration (ValaTypeRegisterFunction* self)
{
	ValaCCodeFragment* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	ValaCCodeFragment* result;
	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* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	ValaCCodeFragment* result;
	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* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	ValaCCodeFragment* result;
	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)
{
	ValaTypeRegisterFunctionClass* _klass_;
	g_return_val_if_fail (self != NULL, 0);
	_klass_ = VALA_TYPEREGISTER_FUNCTION_GET_CLASS (self);
	if (_klass_->get_accessibility) {
		return _klass_->get_accessibility (self);
	}
	return 0;
}

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

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,
                                       gpointer klass_data)
{
	vala_typeregister_function_parent_class = g_type_class_peek_parent (klass);
	((ValaTypeRegisterFunctionClass *) klass)->finalize = vala_typeregister_function_finalize;
	g_type_class_adjust_private_offset (klass, &ValaTypeRegisterFunction_private_offset);
	((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*, ValaCodeContext*, 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,
                                          gpointer klass)
{
	ValaCCodeFragment* _tmp0_;
	ValaCCodeFragment* _tmp1_;
	ValaCCodeFragment* _tmp2_;
	self->priv = vala_typeregister_function_get_instance_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);
}

/**
 * C function to register a type at runtime.
 */
static GType
vala_typeregister_function_get_type_once (void)
{
	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);
	ValaTypeRegisterFunction_private_offset = g_type_add_instance_private (vala_typeregister_function_type_id, sizeof (ValaTypeRegisterFunctionPrivate));
	return vala_typeregister_function_type_id;
}

GType
vala_typeregister_function_get_type (void)
{
	static volatile gsize vala_typeregister_function_type_id__once = 0;
	if (g_once_init_enter (&vala_typeregister_function_type_id__once)) {
		GType vala_typeregister_function_type_id;
		vala_typeregister_function_type_id = vala_typeregister_function_get_type_once ();
		g_once_init_leave (&vala_typeregister_function_type_id__once, vala_typeregister_function_type_id);
	}
	return vala_typeregister_function_type_id__once;
}

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

