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

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

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

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

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


#define VALA_TYPE_CCODE_BASE_MODULE (vala_ccode_base_module_get_type ())
#define VALA_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModule))
#define VALA_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))
#define VALA_IS_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_IS_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_CCODE_BASE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))

typedef struct _ValaCCodeBaseModule ValaCCodeBaseModule;
typedef struct _ValaCCodeBaseModuleClass ValaCCodeBaseModuleClass;
typedef struct _ValaCCodeBaseModulePrivate ValaCCodeBaseModulePrivate;

#define VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT (vala_ccode_base_module_emit_context_get_type ())
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContext))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))

typedef struct _ValaCCodeBaseModuleEmitContext ValaCCodeBaseModuleEmitContext;
typedef struct _ValaCCodeBaseModuleEmitContextClass ValaCCodeBaseModuleEmitContextClass;

#define VALA_TYPE_CCODE_STRUCT_MODULE (vala_ccode_struct_module_get_type ())
#define VALA_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModule))
#define VALA_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))
#define VALA_IS_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_IS_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_CCODE_STRUCT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))

typedef struct _ValaCCodeStructModule ValaCCodeStructModule;
typedef struct _ValaCCodeStructModuleClass ValaCCodeStructModuleClass;
typedef struct _ValaCCodeStructModulePrivate ValaCCodeStructModulePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))

#define VALA_TYPE_TYPEREGISTER_FUNCTION (vala_typeregister_function_get_type ())
#define VALA_TYPEREGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunction))
#define VALA_TYPEREGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunctionClass))
#define VALA_IS_TYPEREGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TYPEREGISTER_FUNCTION))
#define VALA_IS_TYPEREGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TYPEREGISTER_FUNCTION))
#define VALA_TYPEREGISTER_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunctionClass))

typedef struct _ValaTypeRegisterFunction ValaTypeRegisterFunction;
typedef struct _ValaTypeRegisterFunctionClass ValaTypeRegisterFunctionClass;

#define VALA_TYPE_STRUCT_REGISTER_FUNCTION (vala_struct_register_function_get_type ())
#define VALA_STRUCT_REGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_STRUCT_REGISTER_FUNCTION, ValaStructRegisterFunction))
#define VALA_STRUCT_REGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_STRUCT_REGISTER_FUNCTION, ValaStructRegisterFunctionClass))
#define VALA_IS_STRUCT_REGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_STRUCT_REGISTER_FUNCTION))
#define VALA_IS_STRUCT_REGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_STRUCT_REGISTER_FUNCTION))
#define VALA_STRUCT_REGISTER_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_STRUCT_REGISTER_FUNCTION, ValaStructRegisterFunctionClass))

typedef struct _ValaStructRegisterFunction ValaStructRegisterFunction;
typedef struct _ValaStructRegisterFunctionClass ValaStructRegisterFunctionClass;
#define _vala_typeregister_function_unref0(var) ((var == NULL) ? NULL : (var = (vala_typeregister_function_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_ccode_declarator_suffix_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_declarator_suffix_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_ccode_base_module_emit_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_base_module_emit_context_unref (var), NULL)))

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

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

struct _ValaCCodeBaseModule {
	ValaCodeGenerator parent_instance;
	ValaCCodeBaseModulePrivate * priv;
	ValaSymbol* root_symbol;
	ValaCCodeBaseModuleEmitContext* emit_context;
	ValaCCodeLineDirective* current_line;
	ValaCCodeFile* header_file;
	ValaCCodeFile* internal_header_file;
	ValaCCodeFile* cfile;
	ValaCCodeBaseModuleEmitContext* class_init_context;
	ValaCCodeBaseModuleEmitContext* base_init_context;
	ValaCCodeBaseModuleEmitContext* class_finalize_context;
	ValaCCodeBaseModuleEmitContext* base_finalize_context;
	ValaCCodeBaseModuleEmitContext* instance_init_context;
	ValaCCodeBaseModuleEmitContext* instance_finalize_context;
	ValaCCodeStruct* param_spec_struct;
	ValaCCodeStruct* closure_struct;
	ValaCCodeEnum* prop_enum;
	ValaSet* user_marshal_set;
	ValaSet* predefined_marshal_set;
	gint next_regex_id;
	gint next_coroutine_state;
	ValaDataType* void_type;
	ValaDataType* bool_type;
	ValaDataType* char_type;
	ValaDataType* uchar_type;
	ValaDataType* unichar_type;
	ValaDataType* short_type;
	ValaDataType* ushort_type;
	ValaDataType* int_type;
	ValaDataType* uint_type;
	ValaDataType* long_type;
	ValaDataType* ulong_type;
	ValaDataType* int8_type;
	ValaDataType* uint8_type;
	ValaDataType* int16_type;
	ValaDataType* uint16_type;
	ValaDataType* int32_type;
	ValaDataType* uint32_type;
	ValaDataType* int64_type;
	ValaDataType* uint64_type;
	ValaDataType* string_type;
	ValaDataType* regex_type;
	ValaDataType* float_type;
	ValaDataType* double_type;
	ValaTypeSymbol* gtype_type;
	ValaTypeSymbol* gobject_type;
	ValaErrorType* gerror_type;
	ValaClass* glist_type;
	ValaClass* gslist_type;
	ValaClass* gnode_type;
	ValaClass* gqueue_type;
	ValaClass* gvaluearray_type;
	ValaTypeSymbol* gstringbuilder_type;
	ValaTypeSymbol* garray_type;
	ValaTypeSymbol* gbytearray_type;
	ValaTypeSymbol* gptrarray_type;
	ValaTypeSymbol* gthreadpool_type;
	ValaDataType* gdestroynotify_type;
	ValaDataType* gquark_type;
	ValaStruct* gvalue_type;
	ValaClass* gvariant_type;
	ValaStruct* mutex_type;
	ValaStruct* gmutex_type;
	ValaStruct* grecmutex_type;
	ValaStruct* grwlock_type;
	ValaStruct* gcond_type;
	ValaClass* gsource_type;
	ValaTypeSymbol* type_module_type;
	ValaTypeSymbol* dbus_proxy_type;
	ValaClass* gtk_widget_type;
	gboolean in_plugin;
	gchar* module_init_param_name;
	gboolean gvaluecollector_h_needed;
	gboolean requires_assert;
	gboolean requires_array_free;
	gboolean requires_array_move;
	gboolean requires_array_length;
	gboolean requires_clear_mutex;
	ValaSet* wrappers;
};

struct _ValaCCodeBaseModuleClass {
	ValaCodeGeneratorClass parent_class;
	void (*append_vala_array_free) (ValaCCodeBaseModule* self);
	void (*append_vala_array_move) (ValaCCodeBaseModule* self);
	void (*append_vala_array_length) (ValaCCodeBaseModule* self);
	gboolean (*generate_enum_declaration) (ValaCCodeBaseModule* self, ValaEnum* en, ValaCCodeFile* decl_space);
	void (*generate_class_struct_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
	void (*generate_struct_declaration) (ValaCCodeBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space);
	void (*generate_delegate_declaration) (ValaCCodeBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space);
	void (*generate_cparameters) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
	ValaCCodeExpression* (*get_dup_func_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
	gchar* (*append_struct_array_free) (ValaCCodeBaseModule* self, ValaStruct* st);
	ValaCCodeExpression* (*destroy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition);
	void (*append_scope_free) (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCodeNode* stop_at);
	ValaTargetValue* (*get_local_cvalue) (ValaCCodeBaseModule* self, ValaLocalVariable* local);
	ValaTargetValue* (*get_parameter_cvalue) (ValaCCodeBaseModule* self, ValaParameter* param);
	ValaTargetValue* (*get_field_cvalue) (ValaCCodeBaseModule* self, ValaField* field, ValaTargetValue* instance);
	ValaTargetValue* (*load_variable) (ValaCCodeBaseModule* self, ValaVariable* variable, ValaTargetValue* value);
	ValaTargetValue* (*load_this_parameter) (ValaCCodeBaseModule* self, ValaTypeSymbol* sym);
	void (*store_value) (ValaCCodeBaseModule* self, ValaTargetValue* lvalue, ValaTargetValue* value);
	gchar* (*get_delegate_target_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname);
	ValaCCodeExpression* (*get_delegate_target_cexpression) (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify);
	ValaCCodeExpression* (*get_delegate_target_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value);
	ValaCCodeExpression* (*get_delegate_target_destroy_notify_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value);
	gchar* (*get_delegate_target_destroy_notify_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname);
	ValaTargetValue* (*copy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node);
	void (*generate_class_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
	void (*generate_interface_declaration) (ValaCCodeBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space);
	void (*generate_method_declaration) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
	void (*generate_error_domain_declaration) (ValaCCodeBaseModule* self, ValaErrorDomain* edomain, ValaCCodeFile* decl_space);
	ValaCCodeExpression* (*deserialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr, gboolean* may_fail);
	ValaCCodeExpression* (*serialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* expr);
	ValaCCodeExpression* (*get_implicit_cast_expression) (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaCodeNode* node);
	void (*create_type_check_statement) (ValaCCodeBaseModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaTypeSymbol* t, gboolean non_null, const gchar* var_name);
	gboolean (*is_gobject_property) (ValaCCodeBaseModule* self, ValaProperty* prop);
	void (*generate_dynamic_method_wrapper) (ValaCCodeBaseModule* self, ValaDynamicMethod* method);
	gboolean (*method_has_wrapper) (ValaCCodeBaseModule* self, ValaMethod* method);
	ValaCCodeFunctionCall* (*get_param_spec) (ValaCCodeBaseModule* self, ValaProperty* prop);
	ValaCCodeFunctionCall* (*get_signal_creation) (ValaCCodeBaseModule* self, ValaSignal* sig, ValaTypeSymbol* type);
	void (*register_dbus_info) (ValaCCodeBaseModule* self, ValaCCodeBlock* block, ValaObjectTypeSymbol* bindable);
	gchar* (*get_dynamic_property_getter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node);
	gchar* (*get_dynamic_property_setter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node);
	gchar* (*get_dynamic_signal_cname) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_dynamic_signal_connect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_dynamic_signal_connect_after_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_dynamic_signal_disconnect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_array_length_cname) (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim);
	gchar* (*get_parameter_array_length_cname) (ValaCCodeBaseModule* self, ValaParameter* param, gint dim);
	ValaCCodeExpression* (*get_array_length_cexpression) (ValaCCodeBaseModule* self, ValaExpression* array_expr, gint dim);
	ValaCCodeExpression* (*get_array_length_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value, gint dim);
	gchar* (*get_array_size_cname) (ValaCCodeBaseModule* self, const gchar* array_cname);
	void (*add_simple_check) (ValaCCodeBaseModule* self, ValaCodeNode* node, gboolean always_fails);
	gchar* (*generate_ready_function) (ValaCCodeBaseModule* self, ValaMethod* m);
};

struct _ValaCCodeStructModule {
	ValaCCodeBaseModule parent_instance;
	ValaCCodeStructModulePrivate * priv;
};

struct _ValaCCodeStructModuleClass {
	ValaCCodeBaseModuleClass parent_class;
};

struct _ValaCCodeBaseModuleEmitContext {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaCCodeBaseModuleEmitContextPrivate * priv;
	ValaSymbol* current_symbol;
	ValaArrayList* symbol_stack;
	ValaTryStatement* current_try;
	ValaCatchClause* current_catch;
	ValaCCodeFunction* ccode;
	ValaArrayList* ccode_stack;
	ValaArrayList* temp_ref_values;
	gint next_temp_var_id;
	gboolean current_method_inner_error;
	gboolean current_method_return;
	ValaMap* variable_name_map;
	ValaMap* closure_variable_count_map;
	ValaMap* closure_variable_clash_map;
};

struct _ValaCCodeBaseModuleEmitContextClass {
	GTypeClass parent_class;
	void (*finalize) (ValaCCodeBaseModuleEmitContext *self);
};


static gpointer vala_ccode_struct_module_parent_class = NULL;

GType vala_ccode_base_module_get_type (void) G_GNUC_CONST;
gpointer vala_ccode_base_module_emit_context_ref (gpointer instance);
void vala_ccode_base_module_emit_context_unref (gpointer instance);
GParamSpec* vala_ccode_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_ccode_base_module_value_set_emit_context (GValue* value, gpointer v_object);
void vala_ccode_base_module_value_take_emit_context (GValue* value, gpointer v_object);
gpointer vala_ccode_base_module_value_get_emit_context (const GValue* value);
GType vala_ccode_base_module_emit_context_get_type (void) G_GNUC_CONST;
GType vala_ccode_struct_module_get_type (void) G_GNUC_CONST;
enum  {
	VALA_CCODE_STRUCT_MODULE_DUMMY_PROPERTY
};
static void vala_ccode_struct_module_real_generate_struct_declaration (ValaCCodeBaseModule* base, ValaStruct* st, ValaCCodeFile* decl_space);
gboolean vala_ccode_base_module_add_symbol_declaration (ValaCCodeBaseModule* self, ValaCCodeFile* decl_space, ValaSymbol* sym, const gchar* name);
gchar* vala_ccode_base_module_get_ccode_name (ValaCodeNode* node);
void vala_ccode_base_module_generate_struct_declaration (ValaCCodeBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space);
gboolean vala_ccode_base_module_get_ccode_has_type_id (ValaTypeSymbol* sym);
gchar* vala_ccode_base_module_get_ccode_lower_case_name (ValaCodeNode* node, const gchar* infix);
gchar* vala_ccode_base_module_get_ccode_type_id (ValaCodeNode* node);
gpointer vala_typeregister_function_ref (gpointer instance);
void vala_typeregister_function_unref (gpointer instance);
GParamSpec* vala_param_spec_typeregister_function (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_typeregister_function (GValue* value, gpointer v_object);
void vala_value_take_typeregister_function (GValue* value, gpointer v_object);
gpointer vala_value_get_typeregister_function (const GValue* value);
GType vala_typeregister_function_get_type (void) G_GNUC_CONST;
GType vala_struct_register_function_get_type (void) G_GNUC_CONST;
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
ValaStructRegisterFunction* vala_struct_register_function_new (ValaStruct* st, ValaCodeContext* context);
ValaStructRegisterFunction* vala_struct_register_function_construct (GType object_type, ValaStruct* st, ValaCodeContext* context);
void vala_typeregister_function_init_from_type (ValaTypeRegisterFunction* self, gboolean plugin, gboolean declaration_only);
ValaCCodeFragment* vala_typeregister_function_get_declaration (ValaTypeRegisterFunction* self);
void vala_ccode_base_module_generate_type_declaration (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeFile* decl_space);
ValaCCodeDeclaratorSuffix* vala_ccode_base_module_get_ccode_declarator_suffix (ValaCCodeBaseModule* self, ValaDataType* type);
gboolean vala_ccode_base_module_get_ccode_array_length (ValaCodeNode* node);
gchar* vala_ccode_base_module_get_ccode_array_length_name (ValaCodeNode* node);
gchar* vala_ccode_base_module_get_array_length_cname (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim);
gchar* vala_ccode_base_module_get_array_size_cname (ValaCCodeBaseModule* self, const gchar* array_cname);
gchar* vala_ccode_base_module_get_ccode_delegate_target_name (ValaVariable* variable);
gchar* vala_ccode_base_module_get_delegate_target_destroy_notify_cname (ValaCCodeBaseModule* self, const gchar* delegate_cname);
gchar* vala_ccode_base_module_get_ccode_dup_function (ValaTypeSymbol* sym);
gchar* vala_ccode_base_module_get_ccode_free_function (ValaTypeSymbol* sym);
gchar* vala_ccode_base_module_get_ccode_copy_function (ValaTypeSymbol* sym);
gchar* vala_ccode_base_module_get_ccode_destroy_function (ValaTypeSymbol* sym);
static void vala_ccode_struct_module_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st);
void vala_ccode_base_module_push_context (ValaCCodeBaseModule* self, ValaCCodeBaseModuleEmitContext* emit_context);
ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_new (ValaSymbol* symbol);
ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_construct (GType object_type, ValaSymbol* symbol);
void vala_ccode_base_module_push_line (ValaCCodeBaseModule* self, ValaSourceReference* source_reference);
static void vala_ccode_struct_module_begin_struct_destroy_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_copy_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_destroy_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_dup_function (ValaCCodeStructModule* self, ValaStruct* st);
static void vala_ccode_struct_module_add_struct_free_function (ValaCCodeStructModule* self, ValaStruct* st);
void vala_ccode_base_module_pop_line (ValaCCodeBaseModule* self);
void vala_ccode_base_module_pop_context (ValaCCodeBaseModule* self);
void vala_ccode_base_module_push_function (ValaCCodeBaseModule* self, ValaCCodeFunction* func);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
void vala_ccode_base_module_pop_function (ValaCCodeBaseModule* self);
GType vala_glib_value_get_type (void) G_GNUC_CONST;
ValaDataType* vala_ccode_base_module_get_data_type_for_symbol (ValaTypeSymbol* sym);
ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);
ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue);
ValaTargetValue* vala_ccode_base_module_load_this_parameter (ValaCCodeBaseModule* self, ValaTypeSymbol* sym);
gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type);
ValaTargetValue* vala_ccode_base_module_copy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node);
ValaCCodeStructModule* vala_ccode_struct_module_construct (GType object_type);
ValaCCodeBaseModule* vala_ccode_base_module_construct (GType object_type);


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


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


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


static void vala_ccode_struct_module_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st) {
	ValaCCodeStructModule * self;
	ValaStruct* _tmp0_ = NULL;
	ValaCCodeBaseModuleEmitContext* _tmp1_ = NULL;
	ValaCCodeBaseModuleEmitContext* _tmp2_ = NULL;
	ValaStruct* _tmp3_ = NULL;
	ValaSourceReference* _tmp4_ = NULL;
	ValaSourceReference* _tmp5_ = NULL;
	ValaCCodeBaseModuleEmitContext* old_instance_finalize_context = NULL;
	ValaCCodeBaseModuleEmitContext* _tmp6_ = NULL;
	ValaCCodeBaseModuleEmitContext* _tmp7_ = NULL;
	ValaCCodeBaseModuleEmitContext* _tmp8_ = NULL;
	ValaStruct* _tmp9_ = NULL;
	ValaCCodeFile* _tmp10_ = NULL;
	ValaStruct* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
	ValaStruct* _tmp15_ = NULL;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp20_ = FALSE;
	ValaStruct* _tmp21_ = NULL;
	gboolean _tmp22_ = FALSE;
	ValaStruct* _tmp30_ = NULL;
	gboolean _tmp31_ = FALSE;
	gboolean _tmp32_ = FALSE;
	ValaStruct* _tmp33_ = NULL;
	gboolean _tmp34_ = FALSE;
	ValaCCodeBaseModuleEmitContext* _tmp45_ = NULL;
	ValaCCodeBaseModuleEmitContext* _tmp46_ = NULL;
	self = (ValaCCodeStructModule*) base;
	g_return_if_fail (st != NULL);
	_tmp0_ = st;
	_tmp1_ = vala_ccode_base_module_emit_context_new ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp2_);
	_vala_ccode_base_module_emit_context_unref0 (_tmp2_);
	_tmp3_ = st;
	_tmp4_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp3_);
	_tmp5_ = _tmp4_;
	vala_ccode_base_module_push_line ((ValaCCodeBaseModule*) self, _tmp5_);
	_tmp6_ = ((ValaCCodeBaseModule*) self)->instance_finalize_context;
	_tmp7_ = _vala_ccode_base_module_emit_context_ref0 (_tmp6_);
	old_instance_finalize_context = _tmp7_;
	_tmp8_ = vala_ccode_base_module_emit_context_new (NULL);
	_vala_ccode_base_module_emit_context_unref0 (((ValaCCodeBaseModule*) self)->instance_finalize_context);
	((ValaCCodeBaseModule*) self)->instance_finalize_context = _tmp8_;
	_tmp9_ = st;
	_tmp10_ = ((ValaCCodeBaseModule*) self)->cfile;
	vala_ccode_base_module_generate_struct_declaration ((ValaCCodeBaseModule*) self, _tmp9_, _tmp10_);
	_tmp11_ = st;
	_tmp12_ = vala_symbol_is_internal_symbol ((ValaSymbol*) _tmp11_);
	if (!_tmp12_) {
		ValaStruct* _tmp13_ = NULL;
		ValaCCodeFile* _tmp14_ = NULL;
		_tmp13_ = st;
		_tmp14_ = ((ValaCCodeBaseModule*) self)->header_file;
		vala_ccode_base_module_generate_struct_declaration ((ValaCCodeBaseModule*) self, _tmp13_, _tmp14_);
	}
	_tmp15_ = st;
	_tmp16_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp15_);
	if (!_tmp16_) {
		ValaStruct* _tmp17_ = NULL;
		ValaCCodeFile* _tmp18_ = NULL;
		_tmp17_ = st;
		_tmp18_ = ((ValaCCodeBaseModule*) self)->internal_header_file;
		vala_ccode_base_module_generate_struct_declaration ((ValaCCodeBaseModule*) self, _tmp17_, _tmp18_);
	}
	_tmp21_ = st;
	_tmp22_ = vala_struct_is_boolean_type (_tmp21_);
	if (!_tmp22_) {
		ValaStruct* _tmp23_ = NULL;
		gboolean _tmp24_ = FALSE;
		_tmp23_ = st;
		_tmp24_ = vala_struct_is_integer_type (_tmp23_);
		_tmp20_ = !_tmp24_;
	} else {
		_tmp20_ = FALSE;
	}
	if (_tmp20_) {
		ValaStruct* _tmp25_ = NULL;
		gboolean _tmp26_ = FALSE;
		_tmp25_ = st;
		_tmp26_ = vala_struct_is_floating_type (_tmp25_);
		_tmp19_ = !_tmp26_;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		ValaStruct* _tmp27_ = NULL;
		gboolean _tmp28_ = FALSE;
		_tmp27_ = st;
		_tmp28_ = vala_struct_is_disposable (_tmp27_);
		if (_tmp28_) {
			ValaStruct* _tmp29_ = NULL;
			_tmp29_ = st;
			vala_ccode_struct_module_begin_struct_destroy_function (self, _tmp29_);
		}
	}
	_tmp30_ = st;
	vala_code_node_accept_children ((ValaCodeNode*) _tmp30_, (ValaCodeVisitor*) self);
	_tmp33_ = st;
	_tmp34_ = vala_struct_is_boolean_type (_tmp33_);
	if (!_tmp34_) {
		ValaStruct* _tmp35_ = NULL;
		gboolean _tmp36_ = FALSE;
		_tmp35_ = st;
		_tmp36_ = vala_struct_is_integer_type (_tmp35_);
		_tmp32_ = !_tmp36_;
	} else {
		_tmp32_ = FALSE;
	}
	if (_tmp32_) {
		ValaStruct* _tmp37_ = NULL;
		gboolean _tmp38_ = FALSE;
		_tmp37_ = st;
		_tmp38_ = vala_struct_is_floating_type (_tmp37_);
		_tmp31_ = !_tmp38_;
	} else {
		_tmp31_ = FALSE;
	}
	if (_tmp31_) {
		ValaStruct* _tmp39_ = NULL;
		gboolean _tmp40_ = FALSE;
		ValaStruct* _tmp43_ = NULL;
		ValaStruct* _tmp44_ = NULL;
		_tmp39_ = st;
		_tmp40_ = vala_struct_is_disposable (_tmp39_);
		if (_tmp40_) {
			ValaStruct* _tmp41_ = NULL;
			ValaStruct* _tmp42_ = NULL;
			_tmp41_ = st;
			vala_ccode_struct_module_add_struct_copy_function (self, _tmp41_);
			_tmp42_ = st;
			vala_ccode_struct_module_add_struct_destroy_function (self, _tmp42_);
		}
		_tmp43_ = st;
		vala_ccode_struct_module_add_struct_dup_function (self, _tmp43_);
		_tmp44_ = st;
		vala_ccode_struct_module_add_struct_free_function (self, _tmp44_);
	}
	_tmp45_ = old_instance_finalize_context;
	_tmp46_ = _vala_ccode_base_module_emit_context_ref0 (_tmp45_);
	_vala_ccode_base_module_emit_context_unref0 (((ValaCCodeBaseModule*) self)->instance_finalize_context);
	((ValaCCodeBaseModule*) self)->instance_finalize_context = _tmp46_;
	vala_ccode_base_module_pop_line ((ValaCCodeBaseModule*) self);
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_vala_ccode_base_module_emit_context_unref0 (old_instance_finalize_context);
}


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


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


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


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


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


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


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


static void vala_ccode_struct_module_instance_init (ValaCCodeStructModule * self) {
}


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



