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

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

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

struct _ValaTypeRegisterFunctionPrivate {
	ValaTypeSymbol* _type_symbol;
	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 void vala_typeregister_function_set_type_symbol (ValaTypeRegisterFunction* self,
                                                 ValaTypeSymbol* value);
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 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);
}

ValaTypeSymbol*
vala_typeregister_function_get_type_symbol (ValaTypeRegisterFunction* self)
{
	ValaTypeSymbol* result;
	ValaTypeSymbol* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_type_symbol;
	result = _tmp0_;
	return result;
}

static void
vala_typeregister_function_set_type_symbol (ValaTypeRegisterFunction* self,
                                            ValaTypeSymbol* value)
{
	g_return_if_fail (self != NULL);
	self->priv->_type_symbol = value;
}

ValaTypeRegisterFunction*
vala_typeregister_function_construct (GType object_type,
                                      ValaTypeSymbol* sym)
{
	ValaTypeRegisterFunction* self = NULL;
	g_return_val_if_fail (sym != NULL, NULL);
	self = (ValaTypeRegisterFunction*) g_type_create_instance (object_type);
	vala_typeregister_function_set_type_symbol (self, sym);
	return self;
}

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

/**
 * 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)
{
	ValaCodeContext* _tmp0_;
	ValaCodeContext* _tmp1_;
	gboolean _tmp2_;
	gchar* result;
	_tmp0_ = vala_code_context_get ();
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_code_context_require_glib_version (_tmp1_, 2, 74);
	_vala_code_context_unref0 (_tmp1_);
	if (_tmp2_) {
		gchar* _tmp3_;
		_tmp3_ = g_strdup ("G_TYPE_FLAG_NONE");
		result = _tmp3_;
		return result;
	} else {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("0");
		result = _tmp4_;
		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;
}

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

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

