Logo Search packages:      
Sourcecode: vala-0.12 version File versions  Download package

valadovabasemodule.c

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

/* valadovabasemodule.vala
 *
 * Copyright (C) 2006-2010  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 <stdlib.h>
#include <string.h>
#include <valagee.h>
#include <gobject/gvaluecollector.h>


#define VALA_TYPE_DOVA_BASE_MODULE (vala_dova_base_module_get_type ())
#define VALA_DOVA_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DOVA_BASE_MODULE, ValaDovaBaseModule))
#define VALA_DOVA_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DOVA_BASE_MODULE, ValaDovaBaseModuleClass))
#define VALA_IS_DOVA_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DOVA_BASE_MODULE))
#define VALA_IS_DOVA_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DOVA_BASE_MODULE))
#define VALA_DOVA_BASE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DOVA_BASE_MODULE, ValaDovaBaseModuleClass))

typedef struct _ValaDovaBaseModule ValaDovaBaseModule;
typedef struct _ValaDovaBaseModuleClass ValaDovaBaseModuleClass;
typedef struct _ValaDovaBaseModulePrivate ValaDovaBaseModulePrivate;

#define VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT (vala_dova_base_module_emit_context_get_type ())
#define VALA_DOVA_BASE_MODULE_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaDovaBaseModuleEmitContext))
#define VALA_DOVA_BASE_MODULE_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaDovaBaseModuleEmitContextClass))
#define VALA_DOVA_BASE_MODULE_IS_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_DOVA_BASE_MODULE_IS_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_DOVA_BASE_MODULE_EMIT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaDovaBaseModuleEmitContextClass))

typedef struct _ValaDovaBaseModuleEmitContext ValaDovaBaseModuleEmitContext;
typedef struct _ValaDovaBaseModuleEmitContextClass ValaDovaBaseModuleEmitContextClass;
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_dova_base_module_emit_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_dova_base_module_emit_context_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_ccode_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_file_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
typedef struct _ValaDovaBaseModuleEmitContextPrivate ValaDovaBaseModuleEmitContextPrivate;
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _vala_ccode_writer_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_writer_unref (var), NULL)))
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))

#define VALA_TYPE_DOVA_VALUE (vala_dova_value_get_type ())
#define VALA_DOVA_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DOVA_VALUE, ValaDovaValue))
#define VALA_DOVA_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DOVA_VALUE, ValaDovaValueClass))
#define VALA_IS_DOVA_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DOVA_VALUE))
#define VALA_IS_DOVA_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DOVA_VALUE))
#define VALA_DOVA_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DOVA_VALUE, ValaDovaValueClass))

typedef struct _ValaDovaValue ValaDovaValue;
typedef struct _ValaDovaValueClass ValaDovaValueClass;
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))
typedef struct _ValaDovaValuePrivate ValaDovaValuePrivate;
typedef struct _ValaDovaBaseModuleParamSpecEmitContext ValaDovaBaseModuleParamSpecEmitContext;

struct _ValaDovaBaseModule {
      ValaCodeGenerator parent_instance;
      ValaDovaBaseModulePrivate * priv;
      ValaSymbol* root_symbol;
      ValaDovaBaseModuleEmitContext* emit_context;
      ValaCCodeFile* header_file;
      ValaCCodeFile* cfile;
      ValaList* static_fields;
      gint next_wrapper_id;
      ValaDataType* void_type;
      ValaDataType* bool_type;
      ValaDataType* char_type;
      ValaDataType* int_type;
      ValaDataType* uint_type;
      ValaDataType* string_type;
      ValaDataType* float_type;
      ValaDataType* double_type;
      ValaClass* object_class;
      ValaClass* type_class;
      ValaClass* value_class;
      ValaClass* string_class;
      ValaClass* array_class;
      ValaClass* delegate_class;
      ValaClass* error_class;
};

struct _ValaDovaBaseModuleClass {
      ValaCodeGeneratorClass parent_class;
      void (*generate_struct_declaration) (ValaDovaBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space);
      void (*generate_delegate_declaration) (ValaDovaBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space);
      void (*generate_cparameters) (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaCCodeFunctionCall* vcall);
      void (*generate_property_accessor_declaration) (ValaDovaBaseModule* self, ValaPropertyAccessor* acc, ValaCCodeFile* decl_space);
      ValaCCodeExpression* (*get_dup_func_expression) (ValaDovaBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
      void (*append_local_free) (ValaDovaBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at);
      ValaCCodeExpression* (*get_ref_cexpression) (ValaDovaBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node);
      void (*generate_class_declaration) (ValaDovaBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
      void (*generate_interface_declaration) (ValaDovaBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space);
      void (*generate_method_declaration) (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
      ValaCCodeExpression* (*get_implicit_cast_expression) (ValaDovaBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
      gchar* (*get_custom_creturn_type) (ValaDovaBaseModule* self, ValaMethod* m);
      gboolean (*method_has_wrapper) (ValaDovaBaseModule* self, ValaMethod* method);
      void (*add_simple_check) (ValaDovaBaseModule* self, ValaCodeNode* node, gboolean always_fails);
};

00128 struct _ValaDovaBaseModulePrivate {
      ValaCodeContext* _context;
      ValaList* emit_context_stack;
      gchar* csource_filename;
      ValaSet* reserved_identifiers;
      gint next_block_id;
      ValaMap* block_map;
      ValaSet* generated_external_symbols;
};

struct _ValaDovaBaseModuleEmitContext {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaDovaBaseModuleEmitContextPrivate * priv;
      ValaSymbol* current_symbol;
      ValaArrayList* symbol_stack;
      ValaTryStatement* current_try;
      ValaCCodeFunction* ccode;
      ValaArrayList* ccode_stack;
      ValaArrayList* temp_ref_vars;
      gint next_temp_var_id;
      ValaMap* variable_name_map;
};

struct _ValaDovaBaseModuleEmitContextClass {
      GTypeClass parent_class;
      void (*finalize) (ValaDovaBaseModuleEmitContext *self);
};

struct _ValaDovaValue {
      ValaTargetValue parent_instance;
      ValaDovaValuePrivate * priv;
      ValaCCodeExpression* cvalue;
};

struct _ValaDovaValueClass {
      ValaTargetValueClass parent_class;
};

00167 struct _ValaDovaBaseModuleParamSpecEmitContext {
      GParamSpec parent_instance;
};


static gpointer vala_dova_base_module_parent_class = NULL;
static gpointer vala_dova_base_module_emit_context_parent_class = NULL;
static gpointer vala_dova_value_parent_class = NULL;

GType vala_dova_base_module_get_type (void) G_GNUC_CONST;
gpointer vala_dova_base_module_emit_context_ref (gpointer instance);
void vala_dova_base_module_emit_context_unref (gpointer instance);
GParamSpec* vala_dova_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_dova_base_module_value_set_emit_context (GValue* value, gpointer v_object);
void vala_dova_base_module_value_take_emit_context (GValue* value, gpointer v_object);
gpointer vala_dova_base_module_value_get_emit_context (const GValue* value);
GType vala_dova_base_module_emit_context_get_type (void) G_GNUC_CONST;
#define VALA_DOVA_BASE_MODULE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_DOVA_BASE_MODULE, ValaDovaBaseModulePrivate))
enum  {
      VALA_DOVA_BASE_MODULE_DUMMY_PROPERTY
};
ValaDovaBaseModuleEmitContext* vala_dova_base_module_emit_context_new (ValaSymbol* symbol);
ValaDovaBaseModuleEmitContext* vala_dova_base_module_emit_context_construct (GType object_type, ValaSymbol* symbol);
ValaBlock* vala_dova_base_module_next_closure_block (ValaDovaBaseModule* self, ValaSymbol* sym);
ValaDovaBaseModule* vala_dova_base_module_construct (GType object_type);
static void vala_dova_base_module_real_emit (ValaCodeGenerator* base, ValaCodeContext* context);
void vala_dova_base_module_set_context (ValaDovaBaseModule* self, ValaCodeContext* value);
void vala_dova_base_module_push_context (ValaDovaBaseModule* self, ValaDovaBaseModuleEmitContext* emit_context);
void vala_dova_base_module_pop_context (ValaDovaBaseModule* self);
void vala_dova_base_module_push_function (ValaDovaBaseModule* self, ValaCCodeFunction* func);
ValaCCodeFunction* vala_dova_base_module_get_ccode (ValaDovaBaseModule* self);
void vala_dova_base_module_pop_function (ValaDovaBaseModule* self);
gboolean vala_dova_base_module_add_symbol_declaration (ValaDovaBaseModule* self, ValaCCodeFile* decl_space, ValaSymbol* sym, const gchar* name);
static void vala_dova_base_module_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file);
ValaCodeContext* vala_dova_base_module_get_context (ValaDovaBaseModule* self);
void vala_dova_base_module_generate_enum_declaration (ValaDovaBaseModule* self, ValaEnum* en, ValaCCodeFile* decl_space);
ValaCCodeExpression* vala_dova_base_module_get_cvalue (ValaDovaBaseModule* self, ValaExpression* expr);
static void vala_dova_base_module_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en);
void vala_dova_base_module_generate_constant_declaration (ValaDovaBaseModule* self, ValaConstant* c, ValaCCodeFile* decl_space);
static void vala_dova_base_module_real_visit_constant (ValaCodeVisitor* base, ValaConstant* c);
void vala_dova_base_module_generate_field_declaration (ValaDovaBaseModule* self, ValaField* f, ValaCCodeFile* decl_space);
void vala_dova_base_module_generate_type_declaration (ValaDovaBaseModule* self, ValaDataType* type, ValaCCodeFile* decl_space);
static void vala_dova_base_module_real_visit_field (ValaCodeVisitor* base, ValaField* f);
ValaCCodeExpression* vala_dova_base_module_default_value_for_type (ValaDovaBaseModule* self, ValaDataType* type, gboolean initializer_expression);
gboolean vala_dova_base_module_is_constant_ccode_expression (ValaDovaBaseModule* self, ValaCCodeExpression* cexpr);
gboolean vala_dova_base_module_is_pure_ccode_expression (ValaDovaBaseModule* self, ValaCCodeExpression* cexpr);
static void vala_dova_base_module_real_visit_formal_parameter (ValaCodeVisitor* base, ValaParameter* p);
static void vala_dova_base_module_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop);
void vala_dova_base_module_generate_class_declaration (ValaDovaBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
void vala_dova_base_module_generate_interface_declaration (ValaDovaBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space);
void vala_dova_base_module_generate_delegate_declaration (ValaDovaBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space);
void vala_dova_base_module_generate_struct_declaration (ValaDovaBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space);
static void vala_dova_base_module_real_generate_struct_declaration (ValaDovaBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space);
static void vala_dova_base_module_real_generate_delegate_declaration (ValaDovaBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space);
void vala_dova_base_module_generate_cparameters (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaCCodeFunctionCall* vcall);
static void vala_dova_base_module_real_generate_cparameters (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaCCodeFunctionCall* vcall);
void vala_dova_base_module_generate_property_accessor_declaration (ValaDovaBaseModule* self, ValaPropertyAccessor* acc, ValaCCodeFile* decl_space);
static void vala_dova_base_module_real_generate_property_accessor_declaration (ValaDovaBaseModule* self, ValaPropertyAccessor* acc, ValaCCodeFile* decl_space);
gint vala_dova_base_module_get_block_id (ValaDovaBaseModule* self, ValaBlock* b);
static void vala_dova_base_module_capture_parameter (ValaDovaBaseModule* self, ValaParameter* param, ValaCCodeStruct* data, gint block_id, ValaCCodeBlock* free_block);
gchar* vala_dova_base_module_get_variable_cname (ValaDovaBaseModule* self, const gchar* name);
ValaCCodeExpression* vala_dova_base_module_get_variable_cexpression (ValaDovaBaseModule* self, const gchar* name);
gboolean vala_dova_base_module_requires_copy (ValaDovaBaseModule* self, ValaDataType* type);
ValaCCodeExpression* vala_dova_base_module_get_ref_cexpression (ValaDovaBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node);
gboolean vala_dova_base_module_requires_destroy (ValaDovaBaseModule* self, ValaDataType* type);
ValaCCodeExpression* vala_dova_base_module_get_unref_expression (ValaDovaBaseModule* self, ValaCCodeExpression* cvar, ValaDataType* type, ValaExpression* expr);
static void vala_dova_base_module_real_visit_block (ValaCodeVisitor* base, ValaBlock* b);
void vala_dova_base_module_emit_context_push_symbol (ValaDovaBaseModuleEmitContext* self, ValaSymbol* symbol);
ValaMethod* vala_dova_base_module_get_current_method (ValaDovaBaseModule* self);
ValaPropertyAccessor* vala_dova_base_module_get_current_property_accessor (ValaDovaBaseModule* self);
ValaClass* vala_dova_base_module_get_current_class (ValaDovaBaseModule* self);
ValaCCodeExpression* vala_dova_base_module_get_dup_func_expression (ValaDovaBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
void vala_dova_base_module_emit_context_pop_symbol (ValaDovaBaseModuleEmitContext* self);
static void vala_dova_base_module_real_visit_declaration_statement (ValaCodeVisitor* base, ValaDeclarationStatement* stmt);
ValaMap* vala_dova_base_module_get_variable_name_map (ValaDovaBaseModule* self);
gint vala_dova_base_module_get_next_temp_var_id (ValaDovaBaseModule* self);
void vala_dova_base_module_set_next_temp_var_id (ValaDovaBaseModule* self, gint value);
static void vala_dova_base_module_real_visit_local_variable (ValaCodeVisitor* base, ValaLocalVariable* local);
void vala_dova_base_module_add_simple_check (ValaDovaBaseModule* self, ValaCodeNode* node, gboolean always_fails);
static void vala_dova_base_module_real_visit_initializer_list (ValaCodeVisitor* base, ValaInitializerList* list);
void vala_dova_base_module_set_cvalue (ValaDovaBaseModule* self, ValaExpression* expr, ValaCCodeExpression* cvalue);
static ValaLocalVariable* vala_dova_base_module_real_create_local (ValaCodeGenerator* base, ValaDataType* type);
ValaLocalVariable* vala_dova_base_module_get_temp_variable (ValaDovaBaseModule* self, ValaDataType* type, gboolean value_owned, ValaCodeNode* node_reference);
void vala_dova_base_module_emit_temp_var (ValaDovaBaseModule* self, ValaLocalVariable* local);
static gboolean vala_dova_base_module_is_in_generic_type (ValaDovaBaseModule* self, ValaDataType* type);
ValaCCodeExpression* vala_dova_base_module_get_type_private_from_type (ValaDovaBaseModule* self, ValaObjectTypeSymbol* type_symbol, ValaCCodeExpression* type_expression);
ValaCCodeExpression* vala_dova_base_module_get_type_id_expression (ValaDovaBaseModule* self, ValaDataType* type, gboolean is_chainup);
static ValaCCodeExpression* vala_dova_base_module_real_get_dup_func_expression (ValaDovaBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
ValaCCodeExpression* vala_dova_base_module_get_destroy_func_expression (ValaDovaBaseModule* self, ValaDataType* type, gboolean is_chainup);
ValaTypeSymbol* vala_dova_base_module_get_current_type_symbol (ValaDovaBaseModule* self);
ValaCCodeExpression* vala_dova_base_module_destroy_value (ValaDovaBaseModule* self, ValaTargetValue* value);
ValaDovaValue* vala_dova_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue);
ValaDovaValue* vala_dova_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue);
GType vala_dova_value_get_type (void) G_GNUC_CONST;
ValaCCodeExpression* vala_dova_base_module_get_cvalue_ (ValaDovaBaseModule* self, ValaTargetValue* value);
static void vala_dova_base_module_real_visit_end_full_expression (ValaCodeVisitor* base, ValaExpression* expr);
ValaArrayList* vala_dova_base_module_get_temp_ref_vars (ValaDovaBaseModule* self);
static void vala_dova_base_module_real_visit_expression_statement (ValaCodeVisitor* base, ValaExpressionStatement* stmt);
void vala_dova_base_module_append_local_free (ValaDovaBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at);
static void vala_dova_base_module_real_append_local_free (ValaDovaBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at);
static void vala_dova_base_module_append_param_free (ValaDovaBaseModule* self, ValaMethod* m);
static void vala_dova_base_module_real_visit_return_statement (ValaCodeVisitor* base, ValaReturnStatement* stmt);
ValaSymbol* vala_dova_base_module_get_current_symbol (ValaDovaBaseModule* self);
ValaDataType* vala_dova_base_module_get_current_return_type (ValaDovaBaseModule* self);
static void vala_dova_base_module_real_visit_delete_statement (ValaCodeVisitor* base, ValaDeleteStatement* stmt);
static void vala_dova_base_module_real_visit_expression (ValaCodeVisitor* base, ValaExpression* expr);
ValaCCodeExpression* vala_dova_base_module_transform_expression (ValaDovaBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
static void vala_dova_base_module_real_visit_boolean_literal (ValaCodeVisitor* base, ValaBooleanLiteral* expr);
static void vala_dova_base_module_real_visit_character_literal (ValaCodeVisitor* base, ValaCharacterLiteral* expr);
static void vala_dova_base_module_real_visit_integer_literal (ValaCodeVisitor* base, ValaIntegerLiteral* expr);
static void vala_dova_base_module_real_visit_real_literal (ValaCodeVisitor* base, ValaRealLiteral* expr);
static void vala_dova_base_module_real_visit_string_literal (ValaCodeVisitor* base, ValaStringLiteral* expr);
static void vala_dova_base_module_real_visit_null_literal (ValaCodeVisitor* base, ValaNullLiteral* expr);
static void vala_dova_base_module_real_visit_base_access (ValaCodeVisitor* base, ValaBaseAccess* expr);
static void vala_dova_base_module_real_visit_postfix_expression (ValaCodeVisitor* base, ValaPostfixExpression* expr);
static ValaMemberAccess* vala_dova_base_module_find_property_access (ValaDovaBaseModule* self, ValaExpression* expr);
void vala_dova_base_module_store_property (ValaDovaBaseModule* self, ValaProperty* prop, ValaExpression* instance, ValaTargetValue* value);
static gboolean vala_dova_base_module_is_ref_function_void (ValaDovaBaseModule* self, ValaDataType* type);
static ValaCCodeExpression* vala_dova_base_module_real_get_ref_cexpression (ValaDovaBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node);
static void vala_dova_base_module_real_generate_class_declaration (ValaDovaBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
static void vala_dova_base_module_real_generate_interface_declaration (ValaDovaBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space);
void vala_dova_base_module_generate_method_declaration (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
static void vala_dova_base_module_real_generate_method_declaration (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
void vala_dova_base_module_add_generic_type_arguments (ValaDovaBaseModule* self, ValaCCodeFunctionCall* ccall, ValaList* type_args, ValaCodeNode* expr, gboolean is_chainup);
static void vala_dova_base_module_real_visit_object_creation_expression (ValaCodeVisitor* base, ValaObjectCreationExpression* expr);
ValaCCodeExpression* vala_dova_base_module_handle_struct_argument (ValaDovaBaseModule* self, ValaParameter* param, ValaExpression* arg, ValaCCodeExpression* cexpr);
gchar* vala_dova_base_module_get_custom_creturn_type (ValaDovaBaseModule* self, ValaMethod* m);
ValaDataType* vala_dova_base_module_get_data_type_for_symbol (ValaTypeSymbol* sym);
static void vala_dova_base_module_real_visit_sizeof_expression (ValaCodeVisitor* base, ValaSizeofExpression* expr);
static void vala_dova_base_module_real_visit_typeof_expression (ValaCodeVisitor* base, ValaTypeofExpression* expr);
static void vala_dova_base_module_real_visit_unary_expression (ValaCodeVisitor* base, ValaUnaryExpression* expr);
static void vala_dova_base_module_real_visit_cast_expression (ValaCodeVisitor* base, ValaCastExpression* expr);
static ValaCCodeExpression* vala_dova_base_module_create_type_check (ValaDovaBaseModule* self, ValaCCodeNode* ccodenode, ValaDataType* type);
static void vala_dova_base_module_real_visit_pointer_indirection (ValaCodeVisitor* base, ValaPointerIndirection* expr);
static void vala_dova_base_module_real_visit_addressof_expression (ValaCodeVisitor* base, ValaAddressofExpression* expr);
static void vala_dova_base_module_real_visit_reference_transfer_expression (ValaCodeVisitor* base, ValaReferenceTransferExpression* expr);
static void vala_dova_base_module_real_visit_binary_expression (ValaCodeVisitor* base, ValaBinaryExpression* expr);
ValaCCodeExpression* vala_dova_base_module_generate_instance_cast (ValaDovaBaseModule* self, ValaCCodeExpression* expr, ValaTypeSymbol* type);
static void vala_dova_base_module_real_visit_type_check (ValaCodeVisitor* base, ValaTypeCheck* expr);
static void vala_dova_base_module_real_visit_lambda_expression (ValaCodeVisitor* base, ValaLambdaExpression* l);
ValaCCodeExpression* vala_dova_base_module_get_implicit_cast_expression (ValaDovaBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
static ValaCCodeExpression* vala_dova_base_module_real_get_implicit_cast_expression (ValaDovaBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
ValaBlock* vala_dova_base_module_get_current_closure_block (ValaDovaBaseModule* self);
ValaDataType* vala_dova_base_module_get_this_type (ValaDovaBaseModule* self);
ValaCCodeExpression* vala_dova_base_module_get_ccodenode (ValaDovaBaseModule* self, ValaExpression* node);
gboolean vala_dova_base_module_add_generated_external_symbol (ValaDovaBaseModule* self, ValaSymbol* external_symbol);
static gchar* vala_dova_base_module_real_get_custom_creturn_type (ValaDovaBaseModule* self, ValaMethod* m);
gboolean vala_dova_base_module_method_has_wrapper (ValaDovaBaseModule* self, ValaMethod* method);
static gboolean vala_dova_base_module_real_method_has_wrapper (ValaDovaBaseModule* self, ValaMethod* method);
static void vala_dova_base_module_real_add_simple_check (ValaDovaBaseModule* self, ValaCodeNode* node, gboolean always_fails);
ValaTryStatement* vala_dova_base_module_get_current_try (ValaDovaBaseModule* self);
void vala_dova_base_module_set_current_try (ValaDovaBaseModule* self, ValaTryStatement* value);
gboolean vala_dova_base_module_get_in_creation_method (ValaDovaBaseModule* self);
enum  {
      VALA_DOVA_BASE_MODULE_EMIT_CONTEXT_DUMMY_PROPERTY
};
static void vala_dova_base_module_emit_context_finalize (ValaDovaBaseModuleEmitContext* obj);
static void vala_dova_base_module_finalize (ValaCodeVisitor* obj);
enum  {
      VALA_DOVA_VALUE_DUMMY_PROPERTY
};
static void vala_dova_value_finalize (ValaTargetValue* obj);


ValaBlock* vala_dova_base_module_next_closure_block (ValaDovaBaseModule* self, ValaSymbol* sym) {
      ValaBlock* result = NULL;
      ValaBlock* block;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (sym != NULL, NULL);
      block = NULL;
      while (TRUE) {
            ValaSymbol* _tmp0_;
            gboolean _tmp1_ = FALSE;
            gboolean _tmp2_ = FALSE;
            ValaSymbol* _tmp4_ = NULL;
            _tmp0_ = sym;
            block = VALA_IS_BLOCK (_tmp0_) ? ((ValaBlock*) _tmp0_) : NULL;
            if (VALA_IS_BLOCK (sym)) {
                  _tmp1_ = TRUE;
            } else {
                  _tmp1_ = VALA_IS_METHOD (sym);
            }
            if (!_tmp1_) {
                  break;
            }
            if (block != NULL) {
                  gboolean _tmp3_;
                  _tmp3_ = vala_block_get_captured (block);
                  _tmp2_ = _tmp3_;
            } else {
                  _tmp2_ = FALSE;
            }
            if (_tmp2_) {
                  break;
            }
            _tmp4_ = vala_symbol_get_parent_symbol (sym);
            sym = _tmp4_;
      }
      result = block;
      return result;
}


ValaDovaBaseModule* vala_dova_base_module_construct (GType object_type) {
      ValaDovaBaseModule* self = NULL;
      ValaHashSet* _tmp0_ = NULL;
      self = (ValaDovaBaseModule*) vala_code_generator_construct (object_type);
      _tmp0_ = vala_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal);
      _vala_iterable_unref0 (self->priv->reserved_identifiers);
      self->priv->reserved_identifiers = (ValaSet*) _tmp0_;
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "_Bool");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "_Complex");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "_Imaginary");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "auto");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "break");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "case");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "char");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "const");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "continue");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "default");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "do");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "double");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "else");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "enum");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "extern");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "float");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "for");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "goto");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "if");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "inline");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "int");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "long");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "register");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "restrict");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "return");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "short");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "signed");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "sizeof");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "static");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "struct");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "switch");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "typedef");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "union");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "unsigned");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "void");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "volatile");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "while");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "result");
      vala_collection_add ((ValaCollection*) self->priv->reserved_identifiers, "this");
      return self;
}


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


static gpointer _vala_iterable_ref0 (gpointer self) {
      return self ? vala_iterable_ref (self) : NULL;
}


static void vala_dova_base_module_real_emit (ValaCodeGenerator* base, ValaCodeContext* context) {
      ValaDovaBaseModule * self;
      ValaNamespace* _tmp0_ = NULL;
      ValaSymbol* _tmp1_;
      ValaScope* _tmp2_ = NULL;
      ValaSymbol* _tmp3_ = NULL;
      ValaStruct* _tmp4_;
      ValaBooleanType* _tmp5_ = NULL;
      ValaScope* _tmp6_ = NULL;
      ValaSymbol* _tmp7_ = NULL;
      ValaStruct* _tmp8_;
      ValaIntegerType* _tmp9_ = NULL;
      ValaScope* _tmp10_ = NULL;
      ValaSymbol* _tmp11_ = NULL;
      ValaStruct* _tmp12_;
      ValaIntegerType* _tmp13_ = NULL;
      ValaScope* _tmp14_ = NULL;
      ValaSymbol* _tmp15_ = NULL;
      ValaStruct* _tmp16_;
      ValaIntegerType* _tmp17_ = NULL;
      ValaScope* _tmp18_ = NULL;
      ValaSymbol* _tmp19_ = NULL;
      ValaStruct* _tmp20_;
      ValaFloatingType* _tmp21_ = NULL;
      ValaScope* _tmp22_ = NULL;
      ValaSymbol* _tmp23_ = NULL;
      ValaStruct* _tmp24_;
      ValaFloatingType* _tmp25_ = NULL;
      ValaScope* _tmp26_ = NULL;
      ValaSymbol* _tmp27_ = NULL;
      ValaClass* _tmp28_;
      ValaObjectType* _tmp29_ = NULL;
      ValaScope* _tmp30_ = NULL;
      ValaSymbol* _tmp31_ = NULL;
      ValaNamespace* dova_ns;
      ValaScope* _tmp32_ = NULL;
      ValaSymbol* _tmp33_ = NULL;
      ValaScope* _tmp34_ = NULL;
      ValaSymbol* _tmp35_ = NULL;
      ValaScope* _tmp36_ = NULL;
      ValaSymbol* _tmp37_ = NULL;
      ValaScope* _tmp38_ = NULL;
      ValaSymbol* _tmp39_ = NULL;
      ValaScope* _tmp40_ = NULL;
      ValaSymbol* _tmp41_ = NULL;
      ValaScope* _tmp42_ = NULL;
      ValaSymbol* _tmp43_ = NULL;
      ValaScope* _tmp44_ = NULL;
      ValaSymbol* _tmp45_ = NULL;
      ValaCCodeFile* _tmp46_ = NULL;
      ValaCCodeFile* _tmp47_ = NULL;
      gboolean _tmp48_;
      ValaHashSet* _tmp49_ = NULL;
      ValaList* _tmp50_ = NULL;
      ValaList* source_files;
      const gchar* _tmp60_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (context != NULL);
      vala_dova_base_module_set_context (self, context);
      _tmp0_ = vala_code_context_get_root (context);
      _tmp1_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp0_);
      _vala_code_node_unref0 (self->root_symbol);
      self->root_symbol = _tmp1_;
      _tmp2_ = vala_symbol_get_scope (self->root_symbol);
      _tmp3_ = vala_scope_lookup (_tmp2_, "bool");
      _tmp4_ = VALA_STRUCT (_tmp3_);
      _tmp5_ = vala_boolean_type_new (_tmp4_);
      _vala_code_node_unref0 (self->bool_type);
      self->bool_type = (ValaDataType*) _tmp5_;
      _vala_code_node_unref0 (_tmp4_);
      _tmp6_ = vala_symbol_get_scope (self->root_symbol);
      _tmp7_ = vala_scope_lookup (_tmp6_, "char");
      _tmp8_ = VALA_STRUCT (_tmp7_);
      _tmp9_ = vala_integer_type_new (_tmp8_, NULL, NULL);
      _vala_code_node_unref0 (self->char_type);
      self->char_type = (ValaDataType*) _tmp9_;
      _vala_code_node_unref0 (_tmp8_);
      _tmp10_ = vala_symbol_get_scope (self->root_symbol);
      _tmp11_ = vala_scope_lookup (_tmp10_, "int");
      _tmp12_ = VALA_STRUCT (_tmp11_);
      _tmp13_ = vala_integer_type_new (_tmp12_, NULL, NULL);
      _vala_code_node_unref0 (self->int_type);
      self->int_type = (ValaDataType*) _tmp13_;
      _vala_code_node_unref0 (_tmp12_);
      _tmp14_ = vala_symbol_get_scope (self->root_symbol);
      _tmp15_ = vala_scope_lookup (_tmp14_, "uint");
      _tmp16_ = VALA_STRUCT (_tmp15_);
      _tmp17_ = vala_integer_type_new (_tmp16_, NULL, NULL);
      _vala_code_node_unref0 (self->uint_type);
      self->uint_type = (ValaDataType*) _tmp17_;
      _vala_code_node_unref0 (_tmp16_);
      _tmp18_ = vala_symbol_get_scope (self->root_symbol);
      _tmp19_ = vala_scope_lookup (_tmp18_, "float");
      _tmp20_ = VALA_STRUCT (_tmp19_);
      _tmp21_ = vala_floating_type_new (_tmp20_);
      _vala_code_node_unref0 (self->float_type);
      self->float_type = (ValaDataType*) _tmp21_;
      _vala_code_node_unref0 (_tmp20_);
      _tmp22_ = vala_symbol_get_scope (self->root_symbol);
      _tmp23_ = vala_scope_lookup (_tmp22_, "double");
      _tmp24_ = VALA_STRUCT (_tmp23_);
      _tmp25_ = vala_floating_type_new (_tmp24_);
      _vala_code_node_unref0 (self->double_type);
      self->double_type = (ValaDataType*) _tmp25_;
      _vala_code_node_unref0 (_tmp24_);
      _tmp26_ = vala_symbol_get_scope (self->root_symbol);
      _tmp27_ = vala_scope_lookup (_tmp26_, "string");
      _tmp28_ = VALA_CLASS (_tmp27_);
      _tmp29_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp28_);
      _vala_code_node_unref0 (self->string_type);
      self->string_type = (ValaDataType*) _tmp29_;
      _vala_code_node_unref0 (_tmp28_);
      _tmp30_ = vala_symbol_get_scope (self->root_symbol);
      _tmp31_ = vala_scope_lookup (_tmp30_, "Dova");
      dova_ns = VALA_NAMESPACE (_tmp31_);
      _tmp32_ = vala_symbol_get_scope ((ValaSymbol*) dova_ns);
      _tmp33_ = vala_scope_lookup (_tmp32_, "Object");
      _vala_code_node_unref0 (self->object_class);
      self->object_class = VALA_CLASS (_tmp33_);
      _tmp34_ = vala_symbol_get_scope ((ValaSymbol*) dova_ns);
      _tmp35_ = vala_scope_lookup (_tmp34_, "Type");
      _vala_code_node_unref0 (self->type_class);
      self->type_class = VALA_CLASS (_tmp35_);
      _tmp36_ = vala_symbol_get_scope ((ValaSymbol*) dova_ns);
      _tmp37_ = vala_scope_lookup (_tmp36_, "Value");
      _vala_code_node_unref0 (self->value_class);
      self->value_class = VALA_CLASS (_tmp37_);
      _tmp38_ = vala_symbol_get_scope (self->root_symbol);
      _tmp39_ = vala_scope_lookup (_tmp38_, "string");
      _vala_code_node_unref0 (self->string_class);
      self->string_class = VALA_CLASS (_tmp39_);
      _tmp40_ = vala_symbol_get_scope ((ValaSymbol*) dova_ns);
      _tmp41_ = vala_scope_lookup (_tmp40_, "Array");
      _vala_code_node_unref0 (self->array_class);
      self->array_class = VALA_CLASS (_tmp41_);
      _tmp42_ = vala_symbol_get_scope ((ValaSymbol*) dova_ns);
      _tmp43_ = vala_scope_lookup (_tmp42_, "Delegate");
      _vala_code_node_unref0 (self->delegate_class);
      self->delegate_class = VALA_CLASS (_tmp43_);
      _tmp44_ = vala_symbol_get_scope ((ValaSymbol*) dova_ns);
      _tmp45_ = vala_scope_lookup (_tmp44_, "Error");
      _vala_code_node_unref0 (self->error_class);
      self->error_class = VALA_CLASS (_tmp45_);
      _tmp46_ = vala_ccode_file_new ();
      _vala_ccode_file_unref0 (self->header_file);
      self->header_file = _tmp46_;
      vala_ccode_file_set_is_header (self->header_file, TRUE);
      _tmp47_ = vala_ccode_file_new ();
      _vala_ccode_file_unref0 (self->cfile);
      self->cfile = _tmp47_;
      _tmp48_ = vala_code_context_get_nostdpkg (context);
      if (_tmp48_) {
            vala_ccode_file_add_include (self->header_file, "dova-types.h", FALSE);
            vala_ccode_file_add_include (self->cfile, "dova-types.h", FALSE);
      } else {
            vala_ccode_file_add_include (self->header_file, "dova-base.h", FALSE);
            vala_ccode_file_add_include (self->cfile, "dova-base.h", FALSE);
      }
      _tmp49_ = vala_hash_set_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_hash, g_direct_equal);
      _vala_iterable_unref0 (self->priv->generated_external_symbols);
      self->priv->generated_external_symbols = (ValaSet*) _tmp49_;
      _tmp50_ = vala_code_context_get_source_files (context);
      source_files = _tmp50_;
      {
            ValaList* _tmp51_;
            ValaList* _file_list;
            gint _tmp52_;
            gint _file_size;
            gint _file_index;
            _tmp51_ = _vala_iterable_ref0 (source_files);
            _file_list = _tmp51_;
            _tmp52_ = vala_collection_get_size ((ValaCollection*) _file_list);
            _file_size = _tmp52_;
            _file_index = -1;
            while (TRUE) {
                  gpointer _tmp53_ = NULL;
                  ValaSourceFile* file;
                  ValaSourceFileType _tmp54_;
                  _file_index = _file_index + 1;
                  if (!(_file_index < _file_size)) {
                        break;
                  }
                  _tmp53_ = vala_list_get (_file_list, _file_index);
                  file = (ValaSourceFile*) _tmp53_;
                  _tmp54_ = vala_source_file_get_file_type (file);
                  if (_tmp54_ == VALA_SOURCE_FILE_TYPE_SOURCE) {
                        vala_source_file_accept (file, (ValaCodeVisitor*) self);
                  }
                  _vala_source_file_unref0 (file);
            }
            _vala_iterable_unref0 (_file_list);
      }
      if (self->priv->csource_filename != NULL) {
            gboolean _tmp55_;
            gboolean _tmp56_;
            gboolean _tmp57_;
            _tmp55_ = vala_code_context_get_version_header (context);
            _tmp56_ = vala_code_context_get_debug (context);
            _tmp57_ = vala_ccode_file_store (self->cfile, self->priv->csource_filename, NULL, _tmp55_, _tmp56_, NULL, NULL);
            if (!_tmp57_) {
                  gchar* _tmp58_ = NULL;
                  gchar* _tmp59_;
                  _tmp58_ = g_strdup_printf ("unable to open `%s' for writing", self->priv->csource_filename);
                  _tmp59_ = _tmp58_;
                  vala_report_error (NULL, _tmp59_);
                  _g_free0 (_tmp59_);
            }
      }
      _vala_ccode_file_unref0 (self->cfile);
      self->cfile = NULL;
      _tmp60_ = vala_code_context_get_header_filename (context);
      if (_tmp60_ != NULL) {
            const gchar* _tmp61_ = NULL;
            gboolean _tmp62_;
            gboolean _tmp63_;
            _tmp61_ = vala_code_context_get_header_filename (context);
            _tmp62_ = vala_code_context_get_version_header (context);
            _tmp63_ = vala_ccode_file_store (self->header_file, _tmp61_, NULL, _tmp62_, FALSE, NULL, NULL);
            if (!_tmp63_) {
                  const gchar* _tmp64_ = NULL;
                  gchar* _tmp65_ = NULL;
                  gchar* _tmp66_;
                  _tmp64_ = vala_code_context_get_header_filename (context);
                  _tmp65_ = g_strdup_printf ("unable to open `%s' for writing", _tmp64_);
                  _tmp66_ = _tmp65_;
                  vala_report_error (NULL, _tmp66_);
                  _g_free0 (_tmp66_);
            }
      }
      _vala_iterable_unref0 (source_files);
      _vala_code_node_unref0 (dova_ns);
}


static gpointer _vala_dova_base_module_emit_context_ref0 (gpointer self) {
      return self ? vala_dova_base_module_emit_context_ref (self) : NULL;
}


void vala_dova_base_module_push_context (ValaDovaBaseModule* self, ValaDovaBaseModuleEmitContext* emit_context) {
      ValaDovaBaseModuleEmitContext* _tmp0_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (emit_context != NULL);
      if (self->emit_context != NULL) {
            vala_collection_add ((ValaCollection*) self->priv->emit_context_stack, self->emit_context);
      }
      _tmp0_ = _vala_dova_base_module_emit_context_ref0 (emit_context);
      _vala_dova_base_module_emit_context_unref0 (self->emit_context);
      self->emit_context = _tmp0_;
}


void vala_dova_base_module_pop_context (ValaDovaBaseModule* self) {
      gint _tmp0_;
      g_return_if_fail (self != NULL);
      _tmp0_ = vala_collection_get_size ((ValaCollection*) self->priv->emit_context_stack);
      if (_tmp0_ > 0) {
            gint _tmp1_;
            gpointer _tmp2_ = NULL;
            gint _tmp3_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) self->priv->emit_context_stack);
            _tmp2_ = vala_list_get (self->priv->emit_context_stack, _tmp1_ - 1);
            _vala_dova_base_module_emit_context_unref0 (self->emit_context);
            self->emit_context = (ValaDovaBaseModuleEmitContext*) _tmp2_;
            _tmp3_ = vala_collection_get_size ((ValaCollection*) self->priv->emit_context_stack);
            vala_list_remove_at (self->priv->emit_context_stack, _tmp3_ - 1);
      } else {
            _vala_dova_base_module_emit_context_unref0 (self->emit_context);
            self->emit_context = NULL;
      }
}


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


void vala_dova_base_module_push_function (ValaDovaBaseModule* self, ValaCCodeFunction* func) {
      ValaCCodeFunction* _tmp0_ = NULL;
      ValaCCodeFunction* _tmp1_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (func != NULL);
      _tmp0_ = vala_dova_base_module_get_ccode (self);
      vala_collection_add ((ValaCollection*) self->emit_context->ccode_stack, _tmp0_);
      _tmp1_ = _vala_ccode_node_ref0 (func);
      _vala_ccode_node_unref0 (self->emit_context->ccode);
      self->emit_context->ccode = _tmp1_;
}


void vala_dova_base_module_pop_function (ValaDovaBaseModule* self) {
      gint _tmp0_;
      gpointer _tmp1_ = NULL;
      gint _tmp2_;
      g_return_if_fail (self != NULL);
      _tmp0_ = vala_collection_get_size ((ValaCollection*) self->emit_context->ccode_stack);
      _tmp1_ = vala_list_get ((ValaList*) self->emit_context->ccode_stack, _tmp0_ - 1);
      _vala_ccode_node_unref0 (self->emit_context->ccode);
      self->emit_context->ccode = (ValaCCodeFunction*) _tmp1_;
      _tmp2_ = vala_collection_get_size ((ValaCollection*) self->emit_context->ccode_stack);
      vala_list_remove_at ((ValaList*) self->emit_context->ccode_stack, _tmp2_ - 1);
}


gboolean vala_dova_base_module_add_symbol_declaration (ValaDovaBaseModule* self, ValaCCodeFile* decl_space, ValaSymbol* sym, const gchar* name) {
      gboolean result = FALSE;
      gboolean _tmp0_;
      gboolean _tmp1_ = FALSE;
      gboolean _tmp2_;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (decl_space != NULL, FALSE);
      g_return_val_if_fail (sym != NULL, FALSE);
      g_return_val_if_fail (name != NULL, FALSE);
      _tmp0_ = vala_ccode_file_add_declaration (decl_space, name);
      if (_tmp0_) {
            result = TRUE;
            return result;
      }
      _tmp2_ = vala_symbol_get_external_package (sym);
      if (_tmp2_) {
            _tmp1_ = TRUE;
      } else {
            gboolean _tmp3_ = FALSE;
            gboolean _tmp4_ = FALSE;
            gboolean _tmp5_;
            _tmp5_ = vala_ccode_file_get_is_header (decl_space);
            if (!_tmp5_) {
                  ValaCodeContext* _tmp6_ = NULL;
                  ValaCodeContext* _tmp7_;
                  gboolean _tmp8_;
                  _tmp6_ = vala_code_context_get ();
                  _tmp7_ = _tmp6_;
                  _tmp8_ = vala_code_context_get_use_header (_tmp7_);
                  _tmp4_ = _tmp8_;
                  _vala_code_context_unref0 (_tmp7_);
            } else {
                  _tmp4_ = FALSE;
            }
            if (_tmp4_) {
                  gboolean _tmp9_;
                  _tmp9_ = vala_symbol_is_internal_symbol (sym);
                  _tmp3_ = !_tmp9_;
            } else {
                  _tmp3_ = FALSE;
            }
            _tmp1_ = _tmp3_;
      }
      if (_tmp1_) {
            {
                  ValaList* _tmp10_ = NULL;
                  ValaList* _header_filename_list;
                  gint _tmp11_;
                  gint _header_filename_size;
                  gint _header_filename_index;
                  _tmp10_ = vala_symbol_get_cheader_filenames (sym);
                  _header_filename_list = _tmp10_;
                  _tmp11_ = vala_collection_get_size ((ValaCollection*) _header_filename_list);
                  _header_filename_size = _tmp11_;
                  _header_filename_index = -1;
                  while (TRUE) {
                        gpointer _tmp12_ = NULL;
                        gchar* header_filename;
                        gboolean _tmp13_;
                        _header_filename_index = _header_filename_index + 1;
                        if (!(_header_filename_index < _header_filename_size)) {
                              break;
                        }
                        _tmp12_ = vala_list_get (_header_filename_list, _header_filename_index);
                        header_filename = (gchar*) _tmp12_;
                        _tmp13_ = vala_symbol_get_external_package (sym);
                        vala_ccode_file_add_include (decl_space, header_filename, !_tmp13_);
                        _g_free0 (header_filename);
                  }
                  _vala_iterable_unref0 (_header_filename_list);
            }
            result = TRUE;
            return result;
      } else {
            result = FALSE;
            return result;
      }
}


static void vala_dova_base_module_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file) {
      ValaDovaBaseModule * self;
      ValaReport* _tmp10_ = NULL;
      gint _tmp11_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (source_file != NULL);
      if (self->priv->csource_filename == NULL) {
            gchar* _tmp0_ = NULL;
            _tmp0_ = vala_source_file_get_csource_filename (source_file);
            _g_free0 (self->priv->csource_filename);
            self->priv->csource_filename = _tmp0_;
      } else {
            gchar* _tmp1_ = NULL;
            gchar* _tmp2_;
            ValaCCodeWriter* _tmp3_ = NULL;
            ValaCCodeWriter* _tmp4_;
            ValaCCodeWriter* writer;
            gboolean _tmp5_;
            gboolean _tmp6_;
            _tmp1_ = vala_source_file_get_csource_filename (source_file);
            _tmp2_ = _tmp1_;
            _tmp3_ = vala_ccode_writer_new (_tmp2_, NULL);
            _tmp4_ = _tmp3_;
            _g_free0 (_tmp2_);
            writer = _tmp4_;
            _tmp5_ = vala_code_context_get_version_header (self->priv->_context);
            _tmp6_ = vala_ccode_writer_open (writer, _tmp5_);
            if (!_tmp6_) {
                  const gchar* _tmp7_ = NULL;
                  gchar* _tmp8_ = NULL;
                  gchar* _tmp9_;
                  _tmp7_ = vala_ccode_writer_get_filename (writer);
                  _tmp8_ = g_strdup_printf ("unable to open `%s' for writing", _tmp7_);
                  _tmp9_ = _tmp8_;
                  vala_report_error (NULL, _tmp9_);
                  _g_free0 (_tmp9_);
                  _vala_ccode_writer_unref0 (writer);
                  return;
            }
            vala_ccode_writer_close (writer);
            _vala_ccode_writer_unref0 (writer);
      }
      vala_source_file_accept_children (source_file, (ValaCodeVisitor*) self);
      _tmp10_ = vala_code_context_get_report (self->priv->_context);
      _tmp11_ = vala_report_get_errors (_tmp10_);
      if (_tmp11_ > 0) {
            return;
      }
}


void vala_dova_base_module_generate_enum_declaration (ValaDovaBaseModule* self, ValaEnum* en, ValaCCodeFile* decl_space) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gboolean _tmp2_;
      gboolean _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      ValaCCodeEnum* _tmp6_ = NULL;
      ValaCCodeEnum* _tmp7_;
      ValaCCodeEnum* cenum;
      ValaCCodeNewline* _tmp24_ = NULL;
      ValaCCodeNewline* _tmp25_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (en != NULL);
      g_return_if_fail (decl_space != NULL);
      _tmp0_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) en, FALSE);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_dova_base_module_add_symbol_declaration (self, decl_space, (ValaSymbol*) en, _tmp1_);
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      if (_tmp3_) {
            return;
      }
      _tmp4_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) en, FALSE);
      _tmp5_ = _tmp4_;
      _tmp6_ = vala_ccode_enum_new (_tmp5_);
      _tmp7_ = _tmp6_;
      _g_free0 (_tmp5_);
      cenum = _tmp7_;
      {
            ValaList* _tmp8_ = NULL;
            ValaList* _ev_list;
            gint _tmp9_;
            gint _ev_size;
            gint _ev_index;
            _tmp8_ = vala_enum_get_values (en);
            _ev_list = _tmp8_;
            _tmp9_ = vala_collection_get_size ((ValaCollection*) _ev_list);
            _ev_size = _tmp9_;
            _ev_index = -1;
            while (TRUE) {
                  gpointer _tmp10_ = NULL;
                  ValaEnumValue* ev;
                  ValaExpression* _tmp11_ = NULL;
                  _ev_index = _ev_index + 1;
                  if (!(_ev_index < _ev_size)) {
                        break;
                  }
                  _tmp10_ = vala_list_get (_ev_list, _ev_index);
                  ev = (ValaEnumValue*) _tmp10_;
                  _tmp11_ = vala_constant_get_value ((ValaConstant*) ev);
                  if (_tmp11_ == NULL) {
                        gchar* _tmp12_ = NULL;
                        gchar* _tmp13_;
                        ValaCCodeEnumValue* _tmp14_ = NULL;
                        ValaCCodeEnumValue* _tmp15_;
                        _tmp12_ = vala_constant_get_cname ((ValaConstant*) ev);
                        _tmp13_ = _tmp12_;
                        _tmp14_ = vala_ccode_enum_value_new (_tmp13_, NULL);
                        _tmp15_ = _tmp14_;
                        vala_ccode_enum_add_value (cenum, _tmp15_);
                        _vala_ccode_node_unref0 (_tmp15_);
                        _g_free0 (_tmp13_);
                  } else {
                        ValaExpression* _tmp16_ = NULL;
                        gchar* _tmp17_ = NULL;
                        gchar* _tmp18_;
                        ValaExpression* _tmp19_ = NULL;
                        ValaCCodeExpression* _tmp20_ = NULL;
                        ValaCCodeExpression* _tmp21_;
                        ValaCCodeEnumValue* _tmp22_ = NULL;
                        ValaCCodeEnumValue* _tmp23_;
                        _tmp16_ = vala_constant_get_value ((ValaConstant*) ev);
                        vala_code_node_emit ((ValaCodeNode*) _tmp16_, (ValaCodeGenerator*) self);
                        _tmp17_ = vala_constant_get_cname ((ValaConstant*) ev);
                        _tmp18_ = _tmp17_;
                        _tmp19_ = vala_constant_get_value ((ValaConstant*) ev);
                        _tmp20_ = vala_dova_base_module_get_cvalue (self, _tmp19_);
                        _tmp21_ = _tmp20_;
                        _tmp22_ = vala_ccode_enum_value_new (_tmp18_, _tmp21_);
                        _tmp23_ = _tmp22_;
                        vala_ccode_enum_add_value (cenum, _tmp23_);
                        _vala_ccode_node_unref0 (_tmp23_);
                        _vala_ccode_node_unref0 (_tmp21_);
                        _g_free0 (_tmp18_);
                  }
                  _vala_code_node_unref0 (ev);
            }
            _vala_iterable_unref0 (_ev_list);
      }
      vala_ccode_file_add_type_definition (decl_space, (ValaCCodeNode*) cenum);
      _tmp24_ = vala_ccode_newline_new ();
      _tmp25_ = _tmp24_;
      vala_ccode_file_add_type_definition (decl_space, (ValaCCodeNode*) _tmp25_);
      _vala_ccode_node_unref0 (_tmp25_);
      _vala_ccode_node_unref0 (cenum);
}


static void vala_dova_base_module_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en) {
      ValaDovaBaseModule * self;
      gboolean _tmp0_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (en != NULL);
      vala_code_node_accept_children ((ValaCodeNode*) en, (ValaCodeVisitor*) self);
      vala_dova_base_module_generate_enum_declaration (self, en, self->cfile);
      _tmp0_ = vala_symbol_is_internal_symbol ((ValaSymbol*) en);
      if (!_tmp0_) {
            vala_dova_base_module_generate_enum_declaration (self, en, self->header_file);
      }
}


void vala_dova_base_module_generate_constant_declaration (ValaDovaBaseModule* self, ValaConstant* c, ValaCCodeFile* decl_space) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gboolean _tmp2_;
      gboolean _tmp3_;
      gboolean _tmp4_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (c != NULL);
      g_return_if_fail (decl_space != NULL);
      _tmp0_ = vala_constant_get_cname (c);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_dova_base_module_add_symbol_declaration (self, decl_space, (ValaSymbol*) c, _tmp1_);
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      if (_tmp3_) {
            return;
      }
      _tmp4_ = vala_symbol_get_external ((ValaSymbol*) c);
      if (!_tmp4_) {
            ValaExpression* _tmp5_ = NULL;
            ValaExpression* _tmp6_ = NULL;
            _tmp5_ = vala_constant_get_value (c);
            vala_code_node_emit ((ValaCodeNode*) _tmp5_, (ValaCodeGenerator*) self);
            _tmp6_ = vala_constant_get_value (c);
            if (VALA_IS_INITIALIZER_LIST (_tmp6_)) {
                  ValaDataType* _tmp7_ = NULL;
                  gchar* _tmp8_ = NULL;
                  gchar* _tmp9_;
                  ValaCCodeDeclaration* _tmp10_ = NULL;
                  ValaCCodeDeclaration* _tmp11_;
                  ValaCCodeDeclaration* _cdecl_;
                  gchar* _tmp12_;
                  gchar* arr;
                  ValaDataType* _tmp13_ = NULL;
                  gchar* _tmp15_ = NULL;
                  gchar* _tmp16_;
                  gchar* _tmp17_ = NULL;
                  gchar* _tmp18_;
                  ValaExpression* _tmp19_ = NULL;
                  ValaCCodeExpression* _tmp20_ = NULL;
                  ValaCCodeExpression* _tmp21_;
                  ValaCCodeVariableDeclarator* _tmp22_ = NULL;
                  ValaCCodeVariableDeclarator* _tmp23_;
                  _tmp7_ = vala_constant_get_type_reference (c);
                  _tmp8_ = vala_data_type_get_const_cname (_tmp7_);
                  _tmp9_ = _tmp8_;
                  _tmp10_ = vala_ccode_declaration_new (_tmp9_);
                  _tmp11_ = _tmp10_;
                  _g_free0 (_tmp9_);
                  _cdecl_ = _tmp11_;
                  _tmp12_ = g_strdup ("");
                  arr = _tmp12_;
                  _tmp13_ = vala_constant_get_type_reference (c);
                  if (VALA_IS_ARRAY_TYPE (_tmp13_)) {
                        gchar* _tmp14_;
                        _tmp14_ = g_strdup ("[]");
                        _g_free0 (arr);
                        arr = _tmp14_;
                  }
                  _tmp15_ = vala_constant_get_cname (c);
                  _tmp16_ = _tmp15_;
                  _tmp17_ = g_strdup_printf ("%s%s", _tmp16_, arr);
                  _tmp18_ = _tmp17_;
                  _tmp19_ = vala_constant_get_value (c);
                  _tmp20_ = vala_dova_base_module_get_cvalue (self, _tmp19_);
                  _tmp21_ = _tmp20_;
                  _tmp22_ = vala_ccode_variable_declarator_new (_tmp18_, _tmp21_, NULL);
                  _tmp23_ = _tmp22_;
                  vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) _tmp23_);
                  _vala_ccode_node_unref0 (_tmp23_);
                  _vala_ccode_node_unref0 (_tmp21_);
                  _g_free0 (_tmp18_);
                  _g_free0 (_tmp16_);
                  vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
                  vala_ccode_file_add_constant_declaration (decl_space, (ValaCCodeNode*) _cdecl_);
                  _g_free0 (arr);
                  _vala_ccode_node_unref0 (_cdecl_);
            } else {
                  gchar* _tmp24_ = NULL;
                  gchar* _tmp25_;
                  ValaExpression* _tmp26_ = NULL;
                  ValaCCodeExpression* _tmp27_ = NULL;
                  ValaCCodeExpression* _tmp28_;
                  ValaCCodeMacroReplacement* _tmp29_ = NULL;
                  ValaCCodeMacroReplacement* _tmp30_;
                  ValaCCodeMacroReplacement* cdefine;
                  _tmp24_ = vala_constant_get_cname (c);
                  _tmp25_ = _tmp24_;
                  _tmp26_ = vala_constant_get_value (c);
                  _tmp27_ = vala_dova_base_module_get_cvalue (self, _tmp26_);
                  _tmp28_ = _tmp27_;
                  _tmp29_ = vala_ccode_macro_replacement_new_with_expression (_tmp25_, _tmp28_);
                  _tmp30_ = _tmp29_;
                  _vala_ccode_node_unref0 (_tmp28_);
                  _g_free0 (_tmp25_);
                  cdefine = _tmp30_;
                  vala_ccode_file_add_type_member_declaration (decl_space, (ValaCCodeNode*) cdefine);
                  _vala_ccode_node_unref0 (cdefine);
            }
      }
}


static void vala_dova_base_module_real_visit_constant (ValaCodeVisitor* base, ValaConstant* c) {
      ValaDovaBaseModule * self;
      gboolean _tmp0_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (c != NULL);
      vala_dova_base_module_generate_constant_declaration (self, c, self->cfile);
      _tmp0_ = vala_symbol_is_internal_symbol ((ValaSymbol*) c);
      if (!_tmp0_) {
            vala_dova_base_module_generate_constant_declaration (self, c, self->header_file);
      }
}


void vala_dova_base_module_generate_field_declaration (ValaDovaBaseModule* self, ValaField* f, ValaCCodeFile* decl_space) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gboolean _tmp2_;
      gboolean _tmp3_;
      ValaDataType* _tmp4_ = NULL;
      ValaDataType* _tmp5_ = NULL;
      gchar* _tmp6_ = NULL;
      gchar* field_ctype;
      gboolean _tmp7_;
      ValaCCodeDeclaration* _tmp9_ = NULL;
      ValaCCodeDeclaration* _cdecl_;
      gchar* _tmp10_ = NULL;
      gchar* _tmp11_;
      ValaCCodeVariableDeclarator* _tmp12_ = NULL;
      ValaCCodeVariableDeclarator* _tmp13_;
      gboolean _tmp14_;
      ValaAttribute* _tmp15_ = NULL;
      ValaAttribute* _tmp16_;
      gboolean _tmp17_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (f != NULL);
      g_return_if_fail (decl_space != NULL);
      _tmp0_ = vala_field_get_cname (f);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_dova_base_module_add_symbol_declaration (self, decl_space, (ValaSymbol*) f, _tmp1_);
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      if (_tmp3_) {
            return;
      }
      _tmp4_ = vala_variable_get_variable_type ((ValaVariable*) f);
      vala_dova_base_module_generate_type_declaration (self, _tmp4_, decl_space);
      _tmp5_ = vala_variable_get_variable_type ((ValaVariable*) f);
      _tmp6_ = vala_data_type_get_cname (_tmp5_);
      field_ctype = _tmp6_;
      _tmp7_ = vala_field_get_is_volatile (f);
      if (_tmp7_) {
            gchar* _tmp8_;
            _tmp8_ = g_strconcat ("volatile ", field_ctype, NULL);
            _g_free0 (field_ctype);
            field_ctype = _tmp8_;
      }
      _tmp9_ = vala_ccode_declaration_new (field_ctype);
      _cdecl_ = _tmp9_;
      _tmp10_ = vala_field_get_cname (f);
      _tmp11_ = _tmp10_;
      _tmp12_ = vala_ccode_variable_declarator_new (_tmp11_, NULL, NULL);
      _tmp13_ = _tmp12_;
      vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) _tmp13_);
      _vala_ccode_node_unref0 (_tmp13_);
      _g_free0 (_tmp11_);
      _tmp14_ = vala_symbol_is_internal_symbol ((ValaSymbol*) f);
      if (_tmp14_) {
            vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
      } else {
            vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_EXTERN);
      }
      _tmp15_ = vala_code_node_get_attribute ((ValaCodeNode*) f, "ThreadLocal");
      _tmp16_ = _tmp15_;
      _tmp17_ = _tmp16_ != NULL;
      _vala_code_node_unref0 (_tmp16_);
      if (_tmp17_) {
            ValaCCodeModifiers _tmp18_;
            _tmp18_ = vala_ccode_declaration_get_modifiers (_cdecl_);
            vala_ccode_declaration_set_modifiers (_cdecl_, _tmp18_ | VALA_CCODE_MODIFIERS_THREAD_LOCAL);
      }
      vala_ccode_file_add_type_member_declaration (decl_space, (ValaCCodeNode*) _cdecl_);
      _vala_ccode_node_unref0 (_cdecl_);
      _g_free0 (field_ctype);
}


static void vala_dova_base_module_real_visit_field (ValaCodeVisitor* base, ValaField* f) {
      ValaDovaBaseModule * self;
      ValaMemberBinding _tmp0_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (f != NULL);
      _tmp0_ = vala_field_get_binding (f);
      if (_tmp0_ == VALA_MEMBER_BINDING_STATIC) {
            gboolean _tmp1_;
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            ValaCCodeVariableDeclarator* _tmp4_ = NULL;
            ValaCCodeVariableDeclarator* _tmp5_;
            ValaCCodeVariableDeclarator* var_decl;
            ValaDataType* _tmp6_ = NULL;
            ValaCCodeExpression* _tmp7_ = NULL;
            ValaCCodeExpression* _tmp8_;
            ValaExpression* _tmp9_ = NULL;
            ValaDataType* _tmp10_ = NULL;
            gchar* _tmp11_ = NULL;
            gchar* field_ctype;
            gboolean _tmp12_;
            ValaCCodeDeclaration* _tmp14_ = NULL;
            ValaCCodeDeclaration* var_def;
            gboolean _tmp15_;
            ValaAttribute* _tmp16_ = NULL;
            ValaAttribute* _tmp17_;
            gboolean _tmp18_;
            vala_dova_base_module_generate_field_declaration (self, f, self->cfile);
            _tmp1_ = vala_symbol_is_internal_symbol ((ValaSymbol*) f);
            if (!_tmp1_) {
                  vala_dova_base_module_generate_field_declaration (self, f, self->header_file);
            }
            _tmp2_ = vala_field_get_cname (f);
            _tmp3_ = _tmp2_;
            _tmp4_ = vala_ccode_variable_declarator_new (_tmp3_, NULL, NULL);
            _tmp5_ = _tmp4_;
            _g_free0 (_tmp3_);
            var_decl = _tmp5_;
            _tmp6_ = vala_variable_get_variable_type ((ValaVariable*) f);
            _tmp7_ = vala_dova_base_module_default_value_for_type (self, _tmp6_, TRUE);
            _tmp8_ = _tmp7_;
            vala_ccode_variable_declarator_set_initializer (var_decl, _tmp8_);
            _vala_ccode_node_unref0 (_tmp8_);
            _tmp9_ = vala_variable_get_initializer ((ValaVariable*) f);
            if (_tmp9_ != NULL) {
                  vala_collection_add ((ValaCollection*) self->static_fields, f);
            }
            _tmp10_ = vala_variable_get_variable_type ((ValaVariable*) f);
            _tmp11_ = vala_data_type_get_cname (_tmp10_);
            field_ctype = _tmp11_;
            _tmp12_ = vala_field_get_is_volatile (f);
            if (_tmp12_) {
                  gchar* _tmp13_;
                  _tmp13_ = g_strconcat ("volatile ", field_ctype, NULL);
                  _g_free0 (field_ctype);
                  field_ctype = _tmp13_;
            }
            _tmp14_ = vala_ccode_declaration_new (field_ctype);
            var_def = _tmp14_;
            vala_ccode_declaration_add_declarator (var_def, (ValaCCodeDeclarator*) var_decl);
            _tmp15_ = vala_symbol_is_internal_symbol ((ValaSymbol*) f);
            if (!_tmp15_) {
                  vala_ccode_declaration_set_modifiers (var_def, VALA_CCODE_MODIFIERS_EXTERN);
            } else {
                  vala_ccode_declaration_set_modifiers (var_def, VALA_CCODE_MODIFIERS_STATIC);
            }
            _tmp16_ = vala_code_node_get_attribute ((ValaCodeNode*) f, "ThreadLocal");
            _tmp17_ = _tmp16_;
            _tmp18_ = _tmp17_ != NULL;
            _vala_code_node_unref0 (_tmp17_);
            if (_tmp18_) {
                  ValaCCodeModifiers _tmp19_;
                  _tmp19_ = vala_ccode_declaration_get_modifiers (var_def);
                  vala_ccode_declaration_set_modifiers (var_def, _tmp19_ | VALA_CCODE_MODIFIERS_THREAD_LOCAL);
            }
            vala_ccode_file_add_type_member_declaration (self->cfile, (ValaCCodeNode*) var_def);
            _vala_ccode_node_unref0 (var_def);
            _g_free0 (field_ctype);
            _vala_ccode_node_unref0 (var_decl);
      }
}


gboolean vala_dova_base_module_is_constant_ccode_expression (ValaDovaBaseModule* self, ValaCCodeExpression* cexpr) {
      gboolean result = FALSE;
      ValaCCodeExpression* _tmp9_;
      ValaCCodeParenthesizedExpression* _tmp10_;
      ValaCCodeParenthesizedExpression* cparenthesized;
      gboolean _tmp11_ = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (cexpr != NULL, FALSE);
      if (VALA_IS_CCODE_CONSTANT (cexpr)) {
            result = TRUE;
            return result;
      } else {
            if (VALA_IS_CCODE_CAST_EXPRESSION (cexpr)) {
                  ValaCCodeCastExpression* _tmp0_;
                  ValaCCodeCastExpression* ccast;
                  ValaCCodeExpression* _tmp1_ = NULL;
                  gboolean _tmp2_;
                  _tmp0_ = _vala_ccode_node_ref0 (VALA_CCODE_CAST_EXPRESSION (cexpr));
                  ccast = _tmp0_;
                  _tmp1_ = vala_ccode_cast_expression_get_inner (ccast);
                  _tmp2_ = vala_dova_base_module_is_constant_ccode_expression (self, _tmp1_);
                  result = _tmp2_;
                  _vala_ccode_node_unref0 (ccast);
                  return result;
            } else {
                  if (VALA_IS_CCODE_BINARY_EXPRESSION (cexpr)) {
                        ValaCCodeBinaryExpression* _tmp3_;
                        ValaCCodeBinaryExpression* cbinary;
                        gboolean _tmp4_ = FALSE;
                        ValaCCodeExpression* _tmp5_ = NULL;
                        gboolean _tmp6_;
                        _tmp3_ = _vala_ccode_node_ref0 (VALA_CCODE_BINARY_EXPRESSION (cexpr));
                        cbinary = _tmp3_;
                        _tmp5_ = vala_ccode_binary_expression_get_left (cbinary);
                        _tmp6_ = vala_dova_base_module_is_constant_ccode_expression (self, _tmp5_);
                        if (_tmp6_) {
                              ValaCCodeExpression* _tmp7_ = NULL;
                              gboolean _tmp8_;
                              _tmp7_ = vala_ccode_binary_expression_get_right (cbinary);
                              _tmp8_ = vala_dova_base_module_is_constant_ccode_expression (self, _tmp7_);
                              _tmp4_ = _tmp8_;
                        } else {
                              _tmp4_ = FALSE;
                        }
                        result = _tmp4_;
                        _vala_ccode_node_unref0 (cbinary);
                        return result;
                  }
            }
      }
      _tmp9_ = cexpr;
      _tmp10_ = _vala_ccode_node_ref0 (VALA_IS_CCODE_PARENTHESIZED_EXPRESSION (_tmp9_) ? ((ValaCCodeParenthesizedExpression*) _tmp9_) : NULL);
      cparenthesized = _tmp10_;
      if (NULL != cparenthesized) {
            ValaCCodeExpression* _tmp12_ = NULL;
            gboolean _tmp13_;
            _tmp12_ = vala_ccode_parenthesized_expression_get_inner (cparenthesized);
            _tmp13_ = vala_dova_base_module_is_constant_ccode_expression (self, _tmp12_);
            _tmp11_ = _tmp13_;
      } else {
            _tmp11_ = FALSE;
      }
      result = _tmp11_;
      _vala_ccode_node_unref0 (cparenthesized);
      return result;
}


/**
 * Returns whether the passed cexpr is a pure expression, i.e. an
 * expression without side-effects.
 */
gboolean vala_dova_base_module_is_pure_ccode_expression (ValaDovaBaseModule* self, ValaCCodeExpression* cexpr) {
      gboolean result = FALSE;
      gboolean _tmp0_ = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (cexpr != NULL, FALSE);
      if (VALA_IS_CCODE_CONSTANT (cexpr)) {
            _tmp0_ = TRUE;
      } else {
            _tmp0_ = VALA_IS_CCODE_IDENTIFIER (cexpr);
      }
      if (_tmp0_) {
            result = TRUE;
            return result;
      } else {
            if (VALA_IS_CCODE_BINARY_EXPRESSION (cexpr)) {
                  ValaCCodeBinaryExpression* _tmp1_;
                  ValaCCodeBinaryExpression* cbinary;
                  gboolean _tmp2_ = FALSE;
                  ValaCCodeExpression* _tmp3_ = NULL;
                  gboolean _tmp4_;
                  _tmp1_ = _vala_ccode_node_ref0 (VALA_CCODE_BINARY_EXPRESSION (cexpr));
                  cbinary = _tmp1_;
                  _tmp3_ = vala_ccode_binary_expression_get_left (cbinary);
                  _tmp4_ = vala_dova_base_module_is_pure_ccode_expression (self, _tmp3_);
                  if (_tmp4_) {
                        ValaCCodeExpression* _tmp5_ = NULL;
                        gboolean _tmp6_;
                        _tmp5_ = vala_ccode_binary_expression_get_right (cbinary);
                        _tmp6_ = vala_dova_base_module_is_constant_ccode_expression (self, _tmp5_);
                        _tmp2_ = _tmp6_;
                  } else {
                        _tmp2_ = FALSE;
                  }
                  result = _tmp2_;
                  _vala_ccode_node_unref0 (cbinary);
                  return result;
            } else {
                  if (VALA_IS_CCODE_UNARY_EXPRESSION (cexpr)) {
                        ValaCCodeUnaryExpression* _tmp7_;
                        ValaCCodeUnaryExpression* cunary;
                        ValaCCodeUnaryOperator _tmp8_;
                        _tmp7_ = _vala_ccode_node_ref0 (VALA_CCODE_UNARY_EXPRESSION (cexpr));
                        cunary = _tmp7_;
                        _tmp8_ = vala_ccode_unary_expression_get_operator (cunary);
                        switch (_tmp8_) {
                              case VALA_CCODE_UNARY_OPERATOR_PREFIX_INCREMENT:
                              case VALA_CCODE_UNARY_OPERATOR_PREFIX_DECREMENT:
                              case VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT:
                              case VALA_CCODE_UNARY_OPERATOR_POSTFIX_DECREMENT:
                              {
                                    result = FALSE;
                                    _vala_ccode_node_unref0 (cunary);
                                    return result;
                              }
                              default:
                              {
                                    ValaCCodeExpression* _tmp9_ = NULL;
                                    gboolean _tmp10_;
                                    _tmp9_ = vala_ccode_unary_expression_get_inner (cunary);
                                    _tmp10_ = vala_dova_base_module_is_pure_ccode_expression (self, _tmp9_);
                                    result = _tmp10_;
                                    _vala_ccode_node_unref0 (cunary);
                                    return result;
                              }
                        }
                        _vala_ccode_node_unref0 (cunary);
                  } else {
                        if (VALA_IS_CCODE_MEMBER_ACCESS (cexpr)) {
                              ValaCCodeMemberAccess* _tmp11_;
                              ValaCCodeMemberAccess* cma;
                              ValaCCodeExpression* _tmp12_ = NULL;
                              gboolean _tmp13_;
                              _tmp11_ = _vala_ccode_node_ref0 (VALA_CCODE_MEMBER_ACCESS (cexpr));
                              cma = _tmp11_;
                              _tmp12_ = vala_ccode_member_access_get_inner (cma);
                              _tmp13_ = vala_dova_base_module_is_pure_ccode_expression (self, _tmp12_);
                              result = _tmp13_;
                              _vala_ccode_node_unref0 (cma);
                              return result;
                        } else {
                              if (VALA_IS_CCODE_ELEMENT_ACCESS (cexpr)) {
                                    ValaCCodeElementAccess* _tmp14_;
                                    ValaCCodeElementAccess* cea;
                                    gboolean _tmp15_ = FALSE;
                                    ValaCCodeExpression* _tmp16_ = NULL;
                                    gboolean _tmp17_;
                                    _tmp14_ = _vala_ccode_node_ref0 (VALA_CCODE_ELEMENT_ACCESS (cexpr));
                                    cea = _tmp14_;
                                    _tmp16_ = vala_ccode_element_access_get_container (cea);
                                    _tmp17_ = vala_dova_base_module_is_pure_ccode_expression (self, _tmp16_);
                                    if (_tmp17_) {
                                          ValaCCodeExpression* _tmp18_ = NULL;
                                          gboolean _tmp19_;
                                          _tmp18_ = vala_ccode_element_access_get_index (cea);
                                          _tmp19_ = vala_dova_base_module_is_pure_ccode_expression (self, _tmp18_);
                                          _tmp15_ = _tmp19_;
                                    } else {
                                          _tmp15_ = FALSE;
                                    }
                                    result = _tmp15_;
                                    _vala_ccode_node_unref0 (cea);
                                    return result;
                              } else {
                                    if (VALA_IS_CCODE_CAST_EXPRESSION (cexpr)) {
                                          ValaCCodeCastExpression* _tmp20_;
                                          ValaCCodeCastExpression* ccast;
                                          ValaCCodeExpression* _tmp21_ = NULL;
                                          gboolean _tmp22_;
                                          _tmp20_ = _vala_ccode_node_ref0 (VALA_CCODE_CAST_EXPRESSION (cexpr));
                                          ccast = _tmp20_;
                                          _tmp21_ = vala_ccode_cast_expression_get_inner (ccast);
                                          _tmp22_ = vala_dova_base_module_is_pure_ccode_expression (self, _tmp21_);
                                          result = _tmp22_;
                                          _vala_ccode_node_unref0 (ccast);
                                          return result;
                                    } else {
                                          if (VALA_IS_CCODE_PARENTHESIZED_EXPRESSION (cexpr)) {
                                                ValaCCodeParenthesizedExpression* _tmp23_;
                                                ValaCCodeParenthesizedExpression* cparenthesized;
                                                ValaCCodeExpression* _tmp24_ = NULL;
                                                gboolean _tmp25_;
                                                _tmp23_ = _vala_ccode_node_ref0 (VALA_CCODE_PARENTHESIZED_EXPRESSION (cexpr));
                                                cparenthesized = _tmp23_;
                                                _tmp24_ = vala_ccode_parenthesized_expression_get_inner (cparenthesized);
                                                _tmp25_ = vala_dova_base_module_is_pure_ccode_expression (self, _tmp24_);
                                                result = _tmp25_;
                                                _vala_ccode_node_unref0 (cparenthesized);
                                                return result;
                                          }
                                    }
                              }
                        }
                  }
            }
      }
      result = FALSE;
      return result;
}


static void vala_dova_base_module_real_visit_formal_parameter (ValaCodeVisitor* base, ValaParameter* p) {
      ValaDovaBaseModule * self;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (p != NULL);
}


static void vala_dova_base_module_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop) {
      ValaDovaBaseModule * self;
      ValaPropertyAccessor* _tmp0_ = NULL;
      ValaPropertyAccessor* _tmp2_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (prop != NULL);
      _tmp0_ = vala_property_get_get_accessor (prop);
      if (_tmp0_ != NULL) {
            ValaPropertyAccessor* _tmp1_ = NULL;
            _tmp1_ = vala_property_get_get_accessor (prop);
            vala_code_node_accept ((ValaCodeNode*) _tmp1_, (ValaCodeVisitor*) self);
      }
      _tmp2_ = vala_property_get_set_accessor (prop);
      if (_tmp2_ != NULL) {
            ValaPropertyAccessor* _tmp3_ = NULL;
            _tmp3_ = vala_property_get_set_accessor (prop);
            vala_code_node_accept ((ValaCodeNode*) _tmp3_, (ValaCodeVisitor*) self);
      }
}


void vala_dova_base_module_generate_type_declaration (ValaDovaBaseModule* self, ValaDataType* type, ValaCCodeFile* decl_space) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (type != NULL);
      g_return_if_fail (decl_space != NULL);
      if (VALA_IS_OBJECT_TYPE (type)) {
            ValaObjectType* _tmp0_;
            ValaObjectType* object_type;
            ValaObjectTypeSymbol* _tmp1_ = NULL;
            _tmp0_ = _vala_code_node_ref0 (VALA_OBJECT_TYPE (type));
            object_type = _tmp0_;
            _tmp1_ = vala_object_type_get_type_symbol (object_type);
            if (VALA_IS_CLASS (_tmp1_)) {
                  ValaObjectTypeSymbol* _tmp2_ = NULL;
                  _tmp2_ = vala_object_type_get_type_symbol (object_type);
                  vala_dova_base_module_generate_class_declaration (self, VALA_CLASS (_tmp2_), decl_space);
            } else {
                  ValaObjectTypeSymbol* _tmp3_ = NULL;
                  _tmp3_ = vala_object_type_get_type_symbol (object_type);
                  if (VALA_IS_INTERFACE (_tmp3_)) {
                        ValaObjectTypeSymbol* _tmp4_ = NULL;
                        _tmp4_ = vala_object_type_get_type_symbol (object_type);
                        vala_dova_base_module_generate_interface_declaration (self, VALA_INTERFACE (_tmp4_), decl_space);
                  }
            }
            _vala_code_node_unref0 (object_type);
      } else {
            if (VALA_IS_DELEGATE_TYPE (type)) {
                  ValaDelegateType* _tmp5_;
                  ValaDelegateType* deleg_type;
                  ValaDelegate* _tmp6_ = NULL;
                  ValaDelegate* _tmp7_;
                  ValaDelegate* d;
                  _tmp5_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (type));
                  deleg_type = _tmp5_;
                  _tmp6_ = vala_delegate_type_get_delegate_symbol (deleg_type);
                  _tmp7_ = _vala_code_node_ref0 (_tmp6_);
                  d = _tmp7_;
                  vala_dova_base_module_generate_delegate_declaration (self, d, decl_space);
                  _vala_code_node_unref0 (d);
                  _vala_code_node_unref0 (deleg_type);
            } else {
                  ValaTypeSymbol* _tmp8_ = NULL;
                  _tmp8_ = vala_data_type_get_data_type (type);
                  if (VALA_IS_ENUM (_tmp8_)) {
                        ValaTypeSymbol* _tmp9_ = NULL;
                        ValaEnum* _tmp10_;
                        ValaEnum* en;
                        _tmp9_ = vala_data_type_get_data_type (type);
                        _tmp10_ = _vala_code_node_ref0 (VALA_ENUM (_tmp9_));
                        en = _tmp10_;
                        vala_dova_base_module_generate_enum_declaration (self, en, decl_space);
                        _vala_code_node_unref0 (en);
                  } else {
                        if (VALA_IS_VALUE_TYPE (type)) {
                              ValaValueType* _tmp11_;
                              ValaValueType* value_type;
                              ValaTypeSymbol* _tmp12_ = NULL;
                              _tmp11_ = _vala_code_node_ref0 (VALA_VALUE_TYPE (type));
                              value_type = _tmp11_;
                              _tmp12_ = vala_value_type_get_type_symbol (value_type);
                              vala_dova_base_module_generate_struct_declaration (self, VALA_STRUCT (_tmp12_), decl_space);
                              _vala_code_node_unref0 (value_type);
                        } else {
                              if (VALA_IS_ARRAY_TYPE (type)) {
                                    ValaArrayType* _tmp13_;
                                    ValaArrayType* array_type;
                                    ValaDataType* _tmp14_ = NULL;
                                    _tmp13_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (type));
                                    array_type = _tmp13_;
                                    _tmp14_ = vala_array_type_get_element_type (array_type);
                                    vala_dova_base_module_generate_type_declaration (self, _tmp14_, decl_space);
                                    _vala_code_node_unref0 (array_type);
                              } else {
                                    if (VALA_IS_POINTER_TYPE (type)) {
                                          ValaPointerType* _tmp15_;
                                          ValaPointerType* pointer_type;
                                          ValaDataType* _tmp16_ = NULL;
                                          _tmp15_ = _vala_code_node_ref0 (VALA_POINTER_TYPE (type));
                                          pointer_type = _tmp15_;
                                          _tmp16_ = vala_pointer_type_get_base_type (pointer_type);
                                          vala_dova_base_module_generate_type_declaration (self, _tmp16_, decl_space);
                                          _vala_code_node_unref0 (pointer_type);
                                    }
                              }
                        }
                  }
            }
      }
      {
            ValaList* _tmp17_ = NULL;
            ValaList* _type_arg_list;
            gint _tmp18_;
            gint _type_arg_size;
            gint _type_arg_index;
            _tmp17_ = vala_data_type_get_type_arguments (type);
            _type_arg_list = _tmp17_;
            _tmp18_ = vala_collection_get_size ((ValaCollection*) _type_arg_list);
            _type_arg_size = _tmp18_;
            _type_arg_index = -1;
            while (TRUE) {
                  gpointer _tmp19_ = NULL;
                  ValaDataType* type_arg;
                  _type_arg_index = _type_arg_index + 1;
                  if (!(_type_arg_index < _type_arg_size)) {
                        break;
                  }
                  _tmp19_ = vala_list_get (_type_arg_list, _type_arg_index);
                  type_arg = (ValaDataType*) _tmp19_;
                  vala_dova_base_module_generate_type_declaration (self, type_arg, decl_space);
                  _vala_code_node_unref0 (type_arg);
            }
            _vala_iterable_unref0 (_type_arg_list);
      }
}


static void vala_dova_base_module_real_generate_struct_declaration (ValaDovaBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (st != NULL);
      g_return_if_fail (decl_space != NULL);
}


void vala_dova_base_module_generate_struct_declaration (ValaDovaBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->generate_struct_declaration (self, st, decl_space);
}


static void vala_dova_base_module_real_generate_delegate_declaration (ValaDovaBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (d != NULL);
      g_return_if_fail (decl_space != NULL);
}


void vala_dova_base_module_generate_delegate_declaration (ValaDovaBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->generate_delegate_declaration (self, d, decl_space);
}


static void vala_dova_base_module_real_generate_cparameters (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaCCodeFunctionCall* vcall) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != NULL);
      g_return_if_fail (decl_space != NULL);
      g_return_if_fail (func != NULL);
}


void vala_dova_base_module_generate_cparameters (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaCCodeFunctionCall* vcall) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->generate_cparameters (self, m, decl_space, func, vdeclarator, vcall);
}


static void vala_dova_base_module_real_generate_property_accessor_declaration (ValaDovaBaseModule* self, ValaPropertyAccessor* acc, ValaCCodeFile* decl_space) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (acc != NULL);
      g_return_if_fail (decl_space != NULL);
}


void vala_dova_base_module_generate_property_accessor_declaration (ValaDovaBaseModule* self, ValaPropertyAccessor* acc, ValaCCodeFile* decl_space) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->generate_property_accessor_declaration (self, acc, decl_space);
}


gint vala_dova_base_module_get_block_id (ValaDovaBaseModule* self, ValaBlock* b) {
      gint result = 0;
      gpointer _tmp0_ = NULL;
      gint _result_;
      g_return_val_if_fail (self != NULL, 0);
      g_return_val_if_fail (b != NULL, 0);
      _tmp0_ = vala_map_get (self->priv->block_map, b);
      _result_ = GPOINTER_TO_INT (_tmp0_);
      if (_result_ == 0) {
            self->priv->next_block_id = self->priv->next_block_id + 1;
            _result_ = self->priv->next_block_id;
            vala_map_set (self->priv->block_map, b, GINT_TO_POINTER (_result_));
      }
      result = _result_;
      return result;
}


static void vala_dova_base_module_capture_parameter (ValaDovaBaseModule* self, ValaParameter* param, ValaCCodeStruct* data, gint block_id, ValaCCodeBlock* free_block) {
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp1_ = NULL;
      ValaDataType* _tmp2_ = NULL;
      ValaDataType* param_type;
      gchar* _tmp3_ = NULL;
      gchar* _tmp4_;
      const gchar* _tmp5_ = NULL;
      gchar* _tmp6_ = NULL;
      gchar* _tmp7_;
      const gchar* _tmp8_ = NULL;
      ValaCCodeExpression* _tmp9_ = NULL;
      ValaCCodeExpression* cparam;
      gboolean _tmp10_ = FALSE;
      gboolean _tmp11_;
      ValaCCodeFunction* _tmp21_ = NULL;
      gchar* _tmp22_ = NULL;
      gchar* _tmp23_;
      ValaCCodeExpression* _tmp24_ = NULL;
      ValaCCodeExpression* _tmp25_;
      const gchar* _tmp26_ = NULL;
      gchar* _tmp27_ = NULL;
      gchar* _tmp28_;
      ValaCCodeMemberAccess* _tmp29_ = NULL;
      ValaCCodeMemberAccess* _tmp30_;
      gboolean _tmp31_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (param != NULL);
      g_return_if_fail (data != NULL);
      g_return_if_fail (free_block != NULL);
      _tmp0_ = vala_variable_get_variable_type ((ValaVariable*) param);
      vala_dova_base_module_generate_type_declaration (self, _tmp0_, self->cfile);
      _tmp1_ = vala_variable_get_variable_type ((ValaVariable*) param);
      _tmp2_ = vala_data_type_copy (_tmp1_);
      param_type = _tmp2_;
      vala_data_type_set_value_owned (param_type, TRUE);
      _tmp3_ = vala_data_type_get_cname (param_type);
      _tmp4_ = _tmp3_;
      _tmp5_ = vala_symbol_get_name ((ValaSymbol*) param);
      _tmp6_ = vala_dova_base_module_get_variable_cname (self, _tmp5_);
      _tmp7_ = _tmp6_;
      vala_ccode_struct_add_field (data, _tmp4_, _tmp7_, NULL);
      _g_free0 (_tmp7_);
      _g_free0 (_tmp4_);
      _tmp8_ = vala_symbol_get_name ((ValaSymbol*) param);
      _tmp9_ = vala_dova_base_module_get_variable_cexpression (self, _tmp8_);
      cparam = _tmp9_;
      _tmp11_ = vala_dova_base_module_requires_copy (self, param_type);
      if (_tmp11_) {
            ValaDataType* _tmp12_ = NULL;
            gboolean _tmp13_;
            _tmp12_ = vala_variable_get_variable_type ((ValaVariable*) param);
            _tmp13_ = vala_data_type_get_value_owned (_tmp12_);
            _tmp10_ = !_tmp13_;
      } else {
            _tmp10_ = FALSE;
      }
      if (_tmp10_) {
            const gchar* _tmp14_ = NULL;
            ValaMemberAccess* _tmp15_ = NULL;
            ValaMemberAccess* ma;
            ValaDataType* _tmp16_ = NULL;
            ValaDataType* _tmp17_ = NULL;
            ValaDataType* _tmp18_;
            ValaDataType* _tmp19_ = NULL;
            ValaCCodeExpression* _tmp20_ = NULL;
            _tmp14_ = vala_symbol_get_name ((ValaSymbol*) param);
            _tmp15_ = vala_member_access_new_simple (_tmp14_, NULL);
            ma = _tmp15_;
            vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
            _tmp16_ = vala_variable_get_variable_type ((ValaVariable*) param);
            _tmp17_ = vala_data_type_copy (_tmp16_);
            _tmp18_ = _tmp17_;
            vala_expression_set_value_type ((ValaExpression*) ma, _tmp18_);
            _vala_code_node_unref0 (_tmp18_);
            vala_parameter_set_captured (param, FALSE);
            _tmp19_ = vala_variable_get_variable_type ((ValaVariable*) param);
            _tmp20_ = vala_dova_base_module_get_ref_cexpression (self, _tmp19_, cparam, (ValaExpression*) ma, (ValaCodeNode*) param);
            _vala_ccode_node_unref0 (cparam);
            cparam = _tmp20_;
            vala_parameter_set_captured (param, TRUE);
            _vala_code_node_unref0 (ma);
      }
      _tmp21_ = vala_dova_base_module_get_ccode (self);
      _tmp22_ = g_strdup_printf ("_data%d_", block_id);
      _tmp23_ = _tmp22_;
      _tmp24_ = vala_dova_base_module_get_variable_cexpression (self, _tmp23_);
      _tmp25_ = _tmp24_;
      _tmp26_ = vala_symbol_get_name ((ValaSymbol*) param);
      _tmp27_ = vala_dova_base_module_get_variable_cname (self, _tmp26_);
      _tmp28_ = _tmp27_;
      _tmp29_ = vala_ccode_member_access_new_pointer (_tmp25_, _tmp28_);
      _tmp30_ = _tmp29_;
      vala_ccode_function_add_assignment (_tmp21_, (ValaCCodeExpression*) _tmp30_, cparam);
      _vala_ccode_node_unref0 (_tmp30_);
      _g_free0 (_tmp28_);
      _vala_ccode_node_unref0 (_tmp25_);
      _g_free0 (_tmp23_);
      _tmp31_ = vala_dova_base_module_requires_destroy (self, param_type);
      if (_tmp31_) {
            const gchar* _tmp32_ = NULL;
            ValaMemberAccess* _tmp33_ = NULL;
            ValaMemberAccess* ma;
            ValaDataType* _tmp34_ = NULL;
            ValaDataType* _tmp35_;
            gchar* _tmp36_ = NULL;
            gchar* _tmp37_;
            ValaCCodeIdentifier* _tmp38_ = NULL;
            ValaCCodeIdentifier* _tmp39_;
            const gchar* _tmp40_ = NULL;
            gchar* _tmp41_ = NULL;
            gchar* _tmp42_;
            ValaCCodeMemberAccess* _tmp43_ = NULL;
            ValaCCodeMemberAccess* _tmp44_;
            ValaDataType* _tmp45_ = NULL;
            ValaCCodeExpression* _tmp46_ = NULL;
            ValaCCodeExpression* _tmp47_;
            ValaCCodeExpressionStatement* _tmp48_ = NULL;
            ValaCCodeExpressionStatement* _tmp49_;
            _tmp32_ = vala_symbol_get_name ((ValaSymbol*) param);
            _tmp33_ = vala_member_access_new_simple (_tmp32_, NULL);
            ma = _tmp33_;
            vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
            _tmp34_ = vala_data_type_copy (param_type);
            _tmp35_ = _tmp34_;
            vala_expression_set_value_type ((ValaExpression*) ma, _tmp35_);
            _vala_code_node_unref0 (_tmp35_);
            _tmp36_ = g_strdup_printf ("_data%d_", block_id);
            _tmp37_ = _tmp36_;
            _tmp38_ = vala_ccode_identifier_new (_tmp37_);
            _tmp39_ = _tmp38_;
            _tmp40_ = vala_symbol_get_name ((ValaSymbol*) param);
            _tmp41_ = vala_dova_base_module_get_variable_cname (self, _tmp40_);
            _tmp42_ = _tmp41_;
            _tmp43_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp39_, _tmp42_);
            _tmp44_ = _tmp43_;
            _tmp45_ = vala_variable_get_variable_type ((ValaVariable*) param);
            _tmp46_ = vala_dova_base_module_get_unref_expression (self, (ValaCCodeExpression*) _tmp44_, _tmp45_, (ValaExpression*) ma);
            _tmp47_ = _tmp46_;
            _tmp48_ = vala_ccode_expression_statement_new (_tmp47_);
            _tmp49_ = _tmp48_;
            vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) _tmp49_);
            _vala_ccode_node_unref0 (_tmp49_);
            _vala_ccode_node_unref0 (_tmp47_);
            _vala_ccode_node_unref0 (_tmp44_);
            _g_free0 (_tmp42_);
            _vala_ccode_node_unref0 (_tmp39_);
            _g_free0 (_tmp37_);
            _vala_code_node_unref0 (ma);
      }
      _vala_ccode_node_unref0 (cparam);
      _vala_code_node_unref0 (param_type);
}


static void vala_dova_base_module_real_visit_block (ValaCodeVisitor* base, ValaBlock* b) {
      ValaDovaBaseModule * self;
      ValaList* _tmp0_ = NULL;
      ValaList* local_vars;
      gboolean _tmp1_ = FALSE;
      ValaCodeNode* _tmp2_ = NULL;
      gboolean _tmp5_;
      ValaSymbol* _tmp330_ = NULL;
      gboolean _tmp353_;
      gboolean _tmp366_ = FALSE;
      ValaCodeNode* _tmp367_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (b != NULL);
      vala_dova_base_module_emit_context_push_symbol (self->emit_context, (ValaSymbol*) b);
      _tmp0_ = vala_block_get_local_variables (b);
      local_vars = _tmp0_;
      _tmp2_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
      if (VALA_IS_BLOCK (_tmp2_)) {
            _tmp1_ = TRUE;
      } else {
            ValaCodeNode* _tmp3_ = NULL;
            _tmp3_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
            _tmp1_ = VALA_IS_SWITCH_STATEMENT (_tmp3_);
      }
      if (_tmp1_) {
            ValaCCodeFunction* _tmp4_ = NULL;
            _tmp4_ = vala_dova_base_module_get_ccode (self);
            vala_ccode_function_open_block (_tmp4_);
      }
      _tmp5_ = vala_block_get_captured (b);
      if (_tmp5_) {
            ValaSymbol* _tmp6_ = NULL;
            ValaBlock* _tmp7_ = NULL;
            ValaBlock* _tmp8_;
            ValaBlock* parent_block;
            gint _tmp9_;
            gint block_id;
            gchar* _tmp10_ = NULL;
            gchar* struct_name;
            ValaCCodeBlock* _tmp11_ = NULL;
            ValaCCodeBlock* free_block;
            gchar* _tmp12_;
            gchar* _tmp13_;
            ValaCCodeStruct* _tmp14_ = NULL;
            ValaCCodeStruct* _tmp15_;
            ValaCCodeStruct* data;
            ValaCCodeIdentifier* _tmp106_ = NULL;
            ValaCCodeIdentifier* _tmp107_;
            ValaCCodeFunctionCall* _tmp108_ = NULL;
            ValaCCodeFunctionCall* _tmp109_;
            ValaCCodeFunctionCall* data_alloc;
            gchar* _tmp110_ = NULL;
            gchar* _tmp111_;
            ValaCCodeIdentifier* _tmp112_ = NULL;
            ValaCCodeIdentifier* _tmp113_;
            ValaCCodeFunctionCall* _tmp114_ = NULL;
            ValaCCodeFunctionCall* _tmp115_;
            gchar* _tmp116_;
            gchar* _tmp117_;
            ValaCCodeDeclaration* _tmp118_ = NULL;
            ValaCCodeDeclaration* _tmp119_;
            ValaCCodeDeclaration* data_decl;
            gchar* _tmp120_ = NULL;
            gchar* _tmp121_;
            ValaCCodeVariableDeclarator* _tmp122_ = NULL;
            ValaCCodeVariableDeclarator* _tmp123_;
            ValaCCodeFunction* _tmp124_ = NULL;
            ValaSymbol* _tmp178_ = NULL;
            gchar* _tmp193_;
            gchar* _tmp194_;
            ValaCCodeVariableDeclarator* _tmp195_ = NULL;
            ValaCCodeVariableDeclarator* _tmp196_;
            ValaCCodeTypeDefinition* _tmp197_ = NULL;
            ValaCCodeTypeDefinition* _tmp198_;
            ValaCCodeTypeDefinition* _typedef_;
            ValaCCodeIdentifier* _tmp199_ = NULL;
            ValaCCodeIdentifier* _tmp200_;
            ValaCCodeFunctionCall* _tmp201_ = NULL;
            ValaCCodeFunctionCall* _tmp202_;
            ValaCCodeFunctionCall* data_free;
            gchar* _tmp203_ = NULL;
            gchar* _tmp204_;
            ValaCCodeIdentifier* _tmp205_ = NULL;
            ValaCCodeIdentifier* _tmp206_;
            ValaCCodeExpressionStatement* _tmp207_ = NULL;
            ValaCCodeExpressionStatement* _tmp208_;
            gchar* _tmp209_ = NULL;
            gchar* _tmp210_;
            ValaCCodeFunction* _tmp211_ = NULL;
            ValaCCodeFunction* _tmp212_;
            ValaCCodeFunction* type_get_fun;
            ValaCCodeBlock* _tmp213_ = NULL;
            ValaCCodeBlock* _tmp214_;
            ValaCCodeDeclaration* _tmp215_ = NULL;
            ValaCCodeDeclaration* _cdecl_;
            gchar* _tmp216_ = NULL;
            gchar* _tmp217_;
            ValaCCodeConstant* _tmp218_ = NULL;
            ValaCCodeConstant* _tmp219_;
            ValaCCodeVariableDeclarator* _tmp220_ = NULL;
            ValaCCodeVariableDeclarator* _tmp221_;
            ValaCCodeDeclaration* _tmp222_ = NULL;
            gchar* _tmp223_ = NULL;
            gchar* _tmp224_;
            ValaCCodeConstant* _tmp225_ = NULL;
            ValaCCodeConstant* _tmp226_;
            ValaCCodeVariableDeclarator* _tmp227_ = NULL;
            ValaCCodeVariableDeclarator* _tmp228_;
            ValaCCodeDeclaration* _tmp229_ = NULL;
            gchar* _tmp230_ = NULL;
            gchar* _tmp231_;
            ValaCCodeConstant* _tmp232_ = NULL;
            ValaCCodeConstant* _tmp233_;
            ValaCCodeVariableDeclarator* _tmp234_ = NULL;
            ValaCCodeVariableDeclarator* _tmp235_;
            ValaCCodeBlock* _tmp236_ = NULL;
            ValaCCodeBlock* type_init_block;
            ValaCCodeIdentifier* _tmp237_ = NULL;
            ValaCCodeIdentifier* _tmp238_;
            ValaCCodeFunctionCall* _tmp239_ = NULL;
            ValaCCodeFunctionCall* _tmp240_;
            ValaCCodeFunctionCall* alloc_call;
            ValaCCodeIdentifier* _tmp241_ = NULL;
            ValaCCodeIdentifier* _tmp242_;
            ValaCCodeFunctionCall* _tmp243_ = NULL;
            ValaCCodeFunctionCall* _tmp244_;
            gchar* _tmp245_ = NULL;
            gchar* _tmp246_;
            ValaCCodeConstant* _tmp247_ = NULL;
            ValaCCodeConstant* _tmp248_;
            ValaCCodeConstant* _tmp249_ = NULL;
            ValaCCodeConstant* _tmp250_;
            gchar* _tmp251_ = NULL;
            gchar* _tmp252_;
            ValaCCodeIdentifier* _tmp253_ = NULL;
            ValaCCodeIdentifier* _tmp254_;
            ValaCCodeUnaryExpression* _tmp255_ = NULL;
            ValaCCodeUnaryExpression* _tmp256_;
            gchar* _tmp257_ = NULL;
            gchar* _tmp258_;
            ValaCCodeIdentifier* _tmp259_ = NULL;
            ValaCCodeIdentifier* _tmp260_;
            ValaCCodeUnaryExpression* _tmp261_ = NULL;
            ValaCCodeUnaryExpression* _tmp262_;
            gchar* _tmp263_ = NULL;
            gchar* _tmp264_;
            ValaCCodeIdentifier* _tmp265_ = NULL;
            ValaCCodeIdentifier* _tmp266_;
            ValaCCodeUnaryExpression* _tmp267_ = NULL;
            ValaCCodeUnaryExpression* _tmp268_;
            ValaCCodeExpressionStatement* _tmp269_ = NULL;
            ValaCCodeExpressionStatement* _tmp270_;
            ValaCCodeIdentifier* _tmp271_ = NULL;
            ValaCCodeIdentifier* _tmp272_;
            ValaCCodeFunctionCall* _tmp273_ = NULL;
            ValaCCodeFunctionCall* _tmp274_;
            ValaCCodeFunctionCall* type_init_call;
            gchar* _tmp275_ = NULL;
            gchar* _tmp276_;
            ValaCCodeIdentifier* _tmp277_ = NULL;
            ValaCCodeIdentifier* _tmp278_;
            ValaCCodeExpressionStatement* _tmp279_ = NULL;
            ValaCCodeExpressionStatement* _tmp280_;
            ValaCCodeBlock* _tmp281_ = NULL;
            gchar* _tmp282_ = NULL;
            gchar* _tmp283_;
            ValaCCodeIdentifier* _tmp284_ = NULL;
            ValaCCodeIdentifier* _tmp285_;
            ValaCCodeUnaryExpression* _tmp286_ = NULL;
            ValaCCodeUnaryExpression* _tmp287_;
            ValaCCodeIfStatement* _tmp288_ = NULL;
            ValaCCodeIfStatement* _tmp289_;
            ValaCCodeBlock* _tmp290_ = NULL;
            gchar* _tmp291_ = NULL;
            gchar* _tmp292_;
            ValaCCodeIdentifier* _tmp293_ = NULL;
            ValaCCodeIdentifier* _tmp294_;
            ValaCCodeReturnStatement* _tmp295_ = NULL;
            ValaCCodeReturnStatement* _tmp296_;
            gchar* _tmp297_ = NULL;
            gchar* _tmp298_;
            ValaCCodeFunction* _tmp299_ = NULL;
            ValaCCodeFunction* _tmp300_;
            ValaCCodeFunction* unref_fun;
            gchar* _tmp301_ = NULL;
            gchar* _tmp302_;
            gchar* _tmp303_;
            gchar* _tmp304_;
            ValaCCodeParameter* _tmp305_ = NULL;
            ValaCCodeParameter* _tmp306_;
            _tmp6_ = vala_symbol_get_parent_symbol ((ValaSymbol*) b);
            _tmp7_ = vala_dova_base_module_next_closure_block (self, _tmp6_);
            _tmp8_ = _vala_code_node_ref0 (_tmp7_);
            parent_block = _tmp8_;
            _tmp9_ = vala_dova_base_module_get_block_id (self, b);
            block_id = _tmp9_;
            _tmp10_ = g_strdup_printf ("Block%dData", block_id);
            struct_name = _tmp10_;
            _tmp11_ = vala_ccode_block_new ();
            free_block = _tmp11_;
            _tmp12_ = g_strconcat ("_", struct_name, NULL);
            _tmp13_ = _tmp12_;
            _tmp14_ = vala_ccode_struct_new (_tmp13_);
            _tmp15_ = _tmp14_;
            _g_free0 (_tmp13_);
            data = _tmp15_;
            vala_ccode_struct_add_field (data, "DovaType*", "type", NULL);
            vala_ccode_struct_add_field (data, "int32_t", "_ref_count_", NULL);
            if (parent_block != NULL) {
                  gint _tmp16_;
                  gint parent_block_id;
                  gchar* _tmp17_ = NULL;
                  gchar* _tmp18_;
                  gchar* _tmp19_ = NULL;
                  gchar* _tmp20_;
                  ValaCCodeIdentifier* _tmp21_ = NULL;
                  ValaCCodeIdentifier* _tmp22_;
                  ValaCCodeFunctionCall* _tmp23_ = NULL;
                  ValaCCodeFunctionCall* _tmp24_;
                  ValaCCodeFunctionCall* unref_call;
                  gchar* _tmp25_ = NULL;
                  gchar* _tmp26_;
                  ValaCCodeIdentifier* _tmp27_ = NULL;
                  ValaCCodeIdentifier* _tmp28_;
                  gchar* _tmp29_ = NULL;
                  gchar* _tmp30_;
                  ValaCCodeMemberAccess* _tmp31_ = NULL;
                  ValaCCodeMemberAccess* _tmp32_;
                  ValaCCodeExpressionStatement* _tmp33_ = NULL;
                  ValaCCodeExpressionStatement* _tmp34_;
                  _tmp16_ = vala_dova_base_module_get_block_id (self, parent_block);
                  parent_block_id = _tmp16_;
                  _tmp17_ = g_strdup_printf ("Block%dData *", parent_block_id);
                  _tmp18_ = _tmp17_;
                  _tmp19_ = g_strdup_printf ("_data%d_", parent_block_id);
                  _tmp20_ = _tmp19_;
                  vala_ccode_struct_add_field (data, _tmp18_, _tmp20_, NULL);
                  _g_free0 (_tmp20_);
                  _g_free0 (_tmp18_);
                  _tmp21_ = vala_ccode_identifier_new ("dova_object_unref");
                  _tmp22_ = _tmp21_;
                  _tmp23_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp22_);
                  _tmp24_ = _tmp23_;
                  _vala_ccode_node_unref0 (_tmp22_);
                  unref_call = _tmp24_;
                  _tmp25_ = g_strdup_printf ("_data%d_", block_id);
                  _tmp26_ = _tmp25_;
                  _tmp27_ = vala_ccode_identifier_new (_tmp26_);
                  _tmp28_ = _tmp27_;
                  _tmp29_ = g_strdup_printf ("_data%d_", parent_block_id);
                  _tmp30_ = _tmp29_;
                  _tmp31_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp28_, _tmp30_);
                  _tmp32_ = _tmp31_;
                  vala_ccode_function_call_add_argument (unref_call, (ValaCCodeExpression*) _tmp32_);
                  _vala_ccode_node_unref0 (_tmp32_);
                  _g_free0 (_tmp30_);
                  _vala_ccode_node_unref0 (_tmp28_);
                  _g_free0 (_tmp26_);
                  _tmp33_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) unref_call);
                  _tmp34_ = _tmp33_;
                  vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) _tmp34_);
                  _vala_ccode_node_unref0 (_tmp34_);
                  _vala_ccode_node_unref0 (unref_call);
            } else {
                  gboolean _tmp35_ = FALSE;
                  gboolean _tmp36_ = FALSE;
                  ValaMethod* _tmp37_ = NULL;
                  _tmp37_ = vala_dova_base_module_get_current_method (self);
                  if (_tmp37_ != NULL) {
                        ValaMethod* _tmp38_ = NULL;
                        ValaMemberBinding _tmp39_;
                        _tmp38_ = vala_dova_base_module_get_current_method (self);
                        _tmp39_ = vala_method_get_binding (_tmp38_);
                        _tmp36_ = _tmp39_ == VALA_MEMBER_BINDING_INSTANCE;
                  } else {
                        _tmp36_ = FALSE;
                  }
                  if (_tmp36_) {
                        _tmp35_ = TRUE;
                  } else {
                        gboolean _tmp40_ = FALSE;
                        ValaPropertyAccessor* _tmp41_ = NULL;
                        _tmp41_ = vala_dova_base_module_get_current_property_accessor (self);
                        if (_tmp41_ != NULL) {
                              ValaPropertyAccessor* _tmp42_ = NULL;
                              ValaProperty* _tmp43_ = NULL;
                              ValaMemberBinding _tmp44_;
                              _tmp42_ = vala_dova_base_module_get_current_property_accessor (self);
                              _tmp43_ = vala_property_accessor_get_prop (_tmp42_);
                              _tmp44_ = vala_property_get_binding (_tmp43_);
                              _tmp40_ = _tmp44_ == VALA_MEMBER_BINDING_INSTANCE;
                        } else {
                              _tmp40_ = FALSE;
                        }
                        _tmp35_ = _tmp40_;
                  }
                  if (_tmp35_) {
                        ValaClass* _tmp45_ = NULL;
                        gchar* _tmp46_ = NULL;
                        gchar* _tmp47_;
                        gchar* _tmp48_ = NULL;
                        gchar* _tmp49_;
                        ValaMemberAccess* _tmp50_ = NULL;
                        ValaMemberAccess* ma;
                        ValaClass* _tmp51_ = NULL;
                        gchar* _tmp52_ = NULL;
                        gchar* _tmp53_;
                        ValaCCodeIdentifier* _tmp54_ = NULL;
                        ValaCCodeIdentifier* _tmp55_;
                        ValaCCodeMemberAccess* _tmp56_ = NULL;
                        ValaCCodeMemberAccess* _tmp57_;
                        ValaClass* _tmp58_ = NULL;
                        ValaObjectType* _tmp59_ = NULL;
                        ValaObjectType* _tmp60_;
                        ValaCCodeExpression* _tmp61_ = NULL;
                        ValaCCodeExpression* _tmp62_;
                        ValaCCodeExpressionStatement* _tmp63_ = NULL;
                        ValaCCodeExpressionStatement* _tmp64_;
                        _tmp45_ = vala_dova_base_module_get_current_class (self);
                        _tmp46_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) _tmp45_, FALSE);
                        _tmp47_ = _tmp46_;
                        _tmp48_ = g_strdup_printf ("%s *", _tmp47_);
                        _tmp49_ = _tmp48_;
                        vala_ccode_struct_add_field (data, _tmp49_, "this", NULL);
                        _g_free0 (_tmp49_);
                        _g_free0 (_tmp47_);
                        _tmp50_ = vala_member_access_new_simple ("this", NULL);
                        ma = _tmp50_;
                        _tmp51_ = vala_dova_base_module_get_current_class (self);
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) _tmp51_);
                        _tmp52_ = g_strdup_printf ("_data%d_", block_id);
                        _tmp53_ = _tmp52_;
                        _tmp54_ = vala_ccode_identifier_new (_tmp53_);
                        _tmp55_ = _tmp54_;
                        _tmp56_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp55_, "this");
                        _tmp57_ = _tmp56_;
                        _tmp58_ = vala_dova_base_module_get_current_class (self);
                        _tmp59_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp58_);
                        _tmp60_ = _tmp59_;
                        _tmp61_ = vala_dova_base_module_get_unref_expression (self, (ValaCCodeExpression*) _tmp57_, (ValaDataType*) _tmp60_, (ValaExpression*) ma);
                        _tmp62_ = _tmp61_;
                        _tmp63_ = vala_ccode_expression_statement_new (_tmp62_);
                        _tmp64_ = _tmp63_;
                        vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) _tmp64_);
                        _vala_ccode_node_unref0 (_tmp64_);
                        _vala_ccode_node_unref0 (_tmp62_);
                        _vala_code_node_unref0 (_tmp60_);
                        _vala_ccode_node_unref0 (_tmp57_);
                        _vala_ccode_node_unref0 (_tmp55_);
                        _g_free0 (_tmp53_);
                        _vala_code_node_unref0 (ma);
                  }
            }
            {
                  ValaList* _tmp65_;
                  ValaList* _local_list;
                  gint _tmp66_;
                  gint _local_size;
                  gint _local_index;
                  _tmp65_ = _vala_iterable_ref0 (local_vars);
                  _local_list = _tmp65_;
                  _tmp66_ = vala_collection_get_size ((ValaCollection*) _local_list);
                  _local_size = _tmp66_;
                  _local_index = -1;
                  while (TRUE) {
                        gpointer _tmp67_ = NULL;
                        ValaLocalVariable* local;
                        gboolean _tmp68_;
                        _local_index = _local_index + 1;
                        if (!(_local_index < _local_size)) {
                              break;
                        }
                        _tmp67_ = vala_list_get (_local_list, _local_index);
                        local = (ValaLocalVariable*) _tmp67_;
                        _tmp68_ = vala_local_variable_get_captured (local);
                        if (_tmp68_) {
                              ValaDataType* _tmp69_ = NULL;
                              ValaDataType* _tmp70_ = NULL;
                              gchar* _tmp71_ = NULL;
                              gchar* _tmp72_;
                              const gchar* _tmp73_ = NULL;
                              gchar* _tmp74_ = NULL;
                              gchar* _tmp75_;
                              ValaDataType* _tmp76_ = NULL;
                              gchar* _tmp77_ = NULL;
                              gchar* _tmp78_;
                              gchar* _tmp79_;
                              gchar* _tmp80_;
                              _tmp69_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              vala_dova_base_module_generate_type_declaration (self, _tmp69_, self->cfile);
                              _tmp70_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              _tmp71_ = vala_data_type_get_cname (_tmp70_);
                              _tmp72_ = _tmp71_;
                              _tmp73_ = vala_symbol_get_name ((ValaSymbol*) local);
                              _tmp74_ = vala_dova_base_module_get_variable_cname (self, _tmp73_);
                              _tmp75_ = _tmp74_;
                              _tmp76_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              _tmp77_ = vala_data_type_get_cdeclarator_suffix (_tmp76_);
                              _tmp78_ = _tmp77_;
                              _tmp79_ = g_strconcat (_tmp75_, _tmp78_, NULL);
                              _tmp80_ = _tmp79_;
                              vala_ccode_struct_add_field (data, _tmp72_, _tmp80_, NULL);
                              _g_free0 (_tmp80_);
                              _g_free0 (_tmp78_);
                              _g_free0 (_tmp75_);
                              _g_free0 (_tmp72_);
                        }
                        _vala_code_node_unref0 (local);
                  }
                  _vala_iterable_unref0 (_local_list);
            }
            {
                  gint _tmp81_;
                  gint i;
                  _tmp81_ = vala_collection_get_size ((ValaCollection*) local_vars);
                  i = _tmp81_ - 1;
                  {
                        gboolean _tmp82_;
                        _tmp82_ = TRUE;
                        while (TRUE) {
                              gpointer _tmp83_ = NULL;
                              ValaLocalVariable* local;
                              gboolean _tmp84_;
                              if (!_tmp82_) {
                                    i--;
                              }
                              _tmp82_ = FALSE;
                              if (!(i >= 0)) {
                                    break;
                              }
                              _tmp83_ = vala_list_get (local_vars, i);
                              local = (ValaLocalVariable*) _tmp83_;
                              _tmp84_ = vala_local_variable_get_captured (local);
                              if (_tmp84_) {
                                    ValaDataType* _tmp85_ = NULL;
                                    gboolean _tmp86_;
                                    _tmp85_ = vala_variable_get_variable_type ((ValaVariable*) local);
                                    _tmp86_ = vala_dova_base_module_requires_destroy (self, _tmp85_);
                                    if (_tmp86_) {
                                          const gchar* _tmp87_ = NULL;
                                          ValaMemberAccess* _tmp88_ = NULL;
                                          ValaMemberAccess* ma;
                                          ValaDataType* _tmp89_ = NULL;
                                          ValaDataType* _tmp90_ = NULL;
                                          ValaDataType* _tmp91_;
                                          gchar* _tmp92_ = NULL;
                                          gchar* _tmp93_;
                                          ValaCCodeIdentifier* _tmp94_ = NULL;
                                          ValaCCodeIdentifier* _tmp95_;
                                          const gchar* _tmp96_ = NULL;
                                          gchar* _tmp97_ = NULL;
                                          gchar* _tmp98_;
                                          ValaCCodeMemberAccess* _tmp99_ = NULL;
                                          ValaCCodeMemberAccess* _tmp100_;
                                          ValaDataType* _tmp101_ = NULL;
                                          ValaCCodeExpression* _tmp102_ = NULL;
                                          ValaCCodeExpression* _tmp103_;
                                          ValaCCodeExpressionStatement* _tmp104_ = NULL;
                                          ValaCCodeExpressionStatement* _tmp105_;
                                          _tmp87_ = vala_symbol_get_name ((ValaSymbol*) local);
                                          _tmp88_ = vala_member_access_new_simple (_tmp87_, NULL);
                                          ma = _tmp88_;
                                          vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
                                          _tmp89_ = vala_variable_get_variable_type ((ValaVariable*) local);
                                          _tmp90_ = vala_data_type_copy (_tmp89_);
                                          _tmp91_ = _tmp90_;
                                          vala_expression_set_value_type ((ValaExpression*) ma, _tmp91_);
                                          _vala_code_node_unref0 (_tmp91_);
                                          _tmp92_ = g_strdup_printf ("_data%d_", block_id);
                                          _tmp93_ = _tmp92_;
                                          _tmp94_ = vala_ccode_identifier_new (_tmp93_);
                                          _tmp95_ = _tmp94_;
                                          _tmp96_ = vala_symbol_get_name ((ValaSymbol*) local);
                                          _tmp97_ = vala_dova_base_module_get_variable_cname (self, _tmp96_);
                                          _tmp98_ = _tmp97_;
                                          _tmp99_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp95_, _tmp98_);
                                          _tmp100_ = _tmp99_;
                                          _tmp101_ = vala_variable_get_variable_type ((ValaVariable*) local);
                                          _tmp102_ = vala_dova_base_module_get_unref_expression (self, (ValaCCodeExpression*) _tmp100_, _tmp101_, (ValaExpression*) ma);
                                          _tmp103_ = _tmp102_;
                                          _tmp104_ = vala_ccode_expression_statement_new (_tmp103_);
                                          _tmp105_ = _tmp104_;
                                          vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) _tmp105_);
                                          _vala_ccode_node_unref0 (_tmp105_);
                                          _vala_ccode_node_unref0 (_tmp103_);
                                          _vala_ccode_node_unref0 (_tmp100_);
                                          _g_free0 (_tmp98_);
                                          _vala_ccode_node_unref0 (_tmp95_);
                                          _g_free0 (_tmp93_);
                                          _vala_code_node_unref0 (ma);
                                    }
                              }
                              _vala_code_node_unref0 (local);
                        }
                  }
            }
            _tmp106_ = vala_ccode_identifier_new ("dova_object_alloc");
            _tmp107_ = _tmp106_;
            _tmp108_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp107_);
            _tmp109_ = _tmp108_;
            _vala_ccode_node_unref0 (_tmp107_);
            data_alloc = _tmp109_;
            _tmp110_ = g_strdup_printf ("block%d_data_type_get", block_id);
            _tmp111_ = _tmp110_;
            _tmp112_ = vala_ccode_identifier_new (_tmp111_);
            _tmp113_ = _tmp112_;
            _tmp114_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp113_);
            _tmp115_ = _tmp114_;
            vala_ccode_function_call_add_argument (data_alloc, (ValaCCodeExpression*) _tmp115_);
            _vala_ccode_node_unref0 (_tmp115_);
            _vala_ccode_node_unref0 (_tmp113_);
            _g_free0 (_tmp111_);
            _tmp116_ = g_strconcat (struct_name, "*", NULL);
            _tmp117_ = _tmp116_;
            _tmp118_ = vala_ccode_declaration_new (_tmp117_);
            _tmp119_ = _tmp118_;
            _g_free0 (_tmp117_);
            data_decl = _tmp119_;
            _tmp120_ = g_strdup_printf ("_data%d_", block_id);
            _tmp121_ = _tmp120_;
            _tmp122_ = vala_ccode_variable_declarator_new (_tmp121_, (ValaCCodeExpression*) data_alloc, NULL);
            _tmp123_ = _tmp122_;
            vala_ccode_declaration_add_declarator (data_decl, (ValaCCodeDeclarator*) _tmp123_);
            _vala_ccode_node_unref0 (_tmp123_);
            _g_free0 (_tmp121_);
            _tmp124_ = vala_dova_base_module_get_ccode (self);
            vala_ccode_function_add_statement (_tmp124_, (ValaCCodeNode*) data_decl);
            if (parent_block != NULL) {
                  gint _tmp125_;
                  gint parent_block_id;
                  ValaCCodeIdentifier* _tmp126_ = NULL;
                  ValaCCodeIdentifier* _tmp127_;
                  ValaCCodeFunctionCall* _tmp128_ = NULL;
                  ValaCCodeFunctionCall* _tmp129_;
                  ValaCCodeFunctionCall* ref_call;
                  gchar* _tmp130_ = NULL;
                  gchar* _tmp131_;
                  ValaCCodeExpression* _tmp132_ = NULL;
                  ValaCCodeExpression* _tmp133_;
                  ValaCCodeFunction* _tmp134_ = NULL;
                  gchar* _tmp135_ = NULL;
                  gchar* _tmp136_;
                  ValaCCodeExpression* _tmp137_ = NULL;
                  ValaCCodeExpression* _tmp138_;
                  gchar* _tmp139_ = NULL;
                  gchar* _tmp140_;
                  ValaCCodeMemberAccess* _tmp141_ = NULL;
                  ValaCCodeMemberAccess* _tmp142_;
                  ValaCCodeAssignment* _tmp143_ = NULL;
                  ValaCCodeAssignment* _tmp144_;
                  ValaCCodeExpressionStatement* _tmp145_ = NULL;
                  ValaCCodeExpressionStatement* _tmp146_;
                  _tmp125_ = vala_dova_base_module_get_block_id (self, parent_block);
                  parent_block_id = _tmp125_;
                  _tmp126_ = vala_ccode_identifier_new ("dova_object_ref");
                  _tmp127_ = _tmp126_;
                  _tmp128_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp127_);
                  _tmp129_ = _tmp128_;
                  _vala_ccode_node_unref0 (_tmp127_);
                  ref_call = _tmp129_;
                  _tmp130_ = g_strdup_printf ("_data%d_", parent_block_id);
                  _tmp131_ = _tmp130_;
                  _tmp132_ = vala_dova_base_module_get_variable_cexpression (self, _tmp131_);
                  _tmp133_ = _tmp132_;
                  vala_ccode_function_call_add_argument (ref_call, _tmp133_);
                  _vala_ccode_node_unref0 (_tmp133_);
                  _g_free0 (_tmp131_);
                  _tmp134_ = vala_dova_base_module_get_ccode (self);
                  _tmp135_ = g_strdup_printf ("_data%d_", block_id);
                  _tmp136_ = _tmp135_;
                  _tmp137_ = vala_dova_base_module_get_variable_cexpression (self, _tmp136_);
                  _tmp138_ = _tmp137_;
                  _tmp139_ = g_strdup_printf ("_data%d_", parent_block_id);
                  _tmp140_ = _tmp139_;
                  _tmp141_ = vala_ccode_member_access_new_pointer (_tmp138_, _tmp140_);
                  _tmp142_ = _tmp141_;
                  _tmp143_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp142_, (ValaCCodeExpression*) ref_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                  _tmp144_ = _tmp143_;
                  _tmp145_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp144_);
                  _tmp146_ = _tmp145_;
                  vala_ccode_function_add_statement (_tmp134_, (ValaCCodeNode*) _tmp146_);
                  _vala_ccode_node_unref0 (_tmp146_);
                  _vala_ccode_node_unref0 (_tmp144_);
                  _vala_ccode_node_unref0 (_tmp142_);
                  _g_free0 (_tmp140_);
                  _vala_ccode_node_unref0 (_tmp138_);
                  _g_free0 (_tmp136_);
                  _vala_ccode_node_unref0 (ref_call);
            } else {
                  gboolean _tmp147_ = FALSE;
                  gboolean _tmp148_ = FALSE;
                  ValaMethod* _tmp149_ = NULL;
                  _tmp149_ = vala_dova_base_module_get_current_method (self);
                  if (_tmp149_ != NULL) {
                        ValaMethod* _tmp150_ = NULL;
                        ValaMemberBinding _tmp151_;
                        _tmp150_ = vala_dova_base_module_get_current_method (self);
                        _tmp151_ = vala_method_get_binding (_tmp150_);
                        _tmp148_ = _tmp151_ == VALA_MEMBER_BINDING_INSTANCE;
                  } else {
                        _tmp148_ = FALSE;
                  }
                  if (_tmp148_) {
                        _tmp147_ = TRUE;
                  } else {
                        gboolean _tmp152_ = FALSE;
                        ValaPropertyAccessor* _tmp153_ = NULL;
                        _tmp153_ = vala_dova_base_module_get_current_property_accessor (self);
                        if (_tmp153_ != NULL) {
                              ValaPropertyAccessor* _tmp154_ = NULL;
                              ValaProperty* _tmp155_ = NULL;
                              ValaMemberBinding _tmp156_;
                              _tmp154_ = vala_dova_base_module_get_current_property_accessor (self);
                              _tmp155_ = vala_property_accessor_get_prop (_tmp154_);
                              _tmp156_ = vala_property_get_binding (_tmp155_);
                              _tmp152_ = _tmp156_ == VALA_MEMBER_BINDING_INSTANCE;
                        } else {
                              _tmp152_ = FALSE;
                        }
                        _tmp147_ = _tmp152_;
                  }
                  if (_tmp147_) {
                        ValaClass* _tmp157_ = NULL;
                        ValaObjectType* _tmp158_ = NULL;
                        ValaObjectType* _tmp159_;
                        ValaSourceReference* _tmp160_ = NULL;
                        ValaCCodeExpression* _tmp161_ = NULL;
                        ValaCCodeExpression* _tmp162_;
                        ValaCCodeFunctionCall* _tmp163_ = NULL;
                        ValaCCodeFunctionCall* _tmp164_;
                        ValaCCodeFunctionCall* ref_call;
                        ValaCCodeIdentifier* _tmp165_ = NULL;
                        ValaCCodeIdentifier* _tmp166_;
                        ValaCCodeFunction* _tmp167_ = NULL;
                        gchar* _tmp168_ = NULL;
                        gchar* _tmp169_;
                        ValaCCodeExpression* _tmp170_ = NULL;
                        ValaCCodeExpression* _tmp171_;
                        ValaCCodeMemberAccess* _tmp172_ = NULL;
                        ValaCCodeMemberAccess* _tmp173_;
                        ValaCCodeAssignment* _tmp174_ = NULL;
                        ValaCCodeAssignment* _tmp175_;
                        ValaCCodeExpressionStatement* _tmp176_ = NULL;
                        ValaCCodeExpressionStatement* _tmp177_;
                        _tmp157_ = vala_dova_base_module_get_current_class (self);
                        _tmp158_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp157_);
                        _tmp159_ = _tmp158_;
                        _tmp160_ = vala_code_node_get_source_reference ((ValaCodeNode*) b);
                        _tmp161_ = vala_dova_base_module_get_dup_func_expression (self, (ValaDataType*) _tmp159_, _tmp160_, FALSE);
                        _tmp162_ = _tmp161_;
                        _tmp163_ = vala_ccode_function_call_new (_tmp162_);
                        _tmp164_ = _tmp163_;
                        _vala_ccode_node_unref0 (_tmp162_);
                        _vala_code_node_unref0 (_tmp159_);
                        ref_call = _tmp164_;
                        _tmp165_ = vala_ccode_identifier_new ("this");
                        _tmp166_ = _tmp165_;
                        vala_ccode_function_call_add_argument (ref_call, (ValaCCodeExpression*) _tmp166_);
                        _vala_ccode_node_unref0 (_tmp166_);
                        _tmp167_ = vala_dova_base_module_get_ccode (self);
                        _tmp168_ = g_strdup_printf ("_data%d_", block_id);
                        _tmp169_ = _tmp168_;
                        _tmp170_ = vala_dova_base_module_get_variable_cexpression (self, _tmp169_);
                        _tmp171_ = _tmp170_;
                        _tmp172_ = vala_ccode_member_access_new_pointer (_tmp171_, "this");
                        _tmp173_ = _tmp172_;
                        _tmp174_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp173_, (ValaCCodeExpression*) ref_call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                        _tmp175_ = _tmp174_;
                        _tmp176_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp175_);
                        _tmp177_ = _tmp176_;
                        vala_ccode_function_add_statement (_tmp167_, (ValaCCodeNode*) _tmp177_);
                        _vala_ccode_node_unref0 (_tmp177_);
                        _vala_ccode_node_unref0 (_tmp175_);
                        _vala_ccode_node_unref0 (_tmp173_);
                        _vala_ccode_node_unref0 (_tmp171_);
                        _g_free0 (_tmp169_);
                        _vala_ccode_node_unref0 (ref_call);
                  }
            }
            _tmp178_ = vala_symbol_get_parent_symbol ((ValaSymbol*) b);
            if (VALA_IS_METHOD (_tmp178_)) {
                  ValaSymbol* _tmp179_ = NULL;
                  ValaMethod* _tmp180_;
                  ValaMethod* m;
                  _tmp179_ = vala_symbol_get_parent_symbol ((ValaSymbol*) b);
                  _tmp180_ = _vala_code_node_ref0 (VALA_METHOD (_tmp179_));
                  m = _tmp180_;
                  {
                        ValaList* _tmp181_ = NULL;
                        ValaList* _param_list;
                        gint _tmp182_;
                        gint _param_size;
                        gint _param_index;
                        _tmp181_ = vala_method_get_parameters (m);
                        _param_list = _tmp181_;
                        _tmp182_ = vala_collection_get_size ((ValaCollection*) _param_list);
                        _param_size = _tmp182_;
                        _param_index = -1;
                        while (TRUE) {
                              gpointer _tmp183_ = NULL;
                              ValaParameter* param;
                              gboolean _tmp184_;
                              _param_index = _param_index + 1;
                              if (!(_param_index < _param_size)) {
                                    break;
                              }
                              _tmp183_ = vala_list_get (_param_list, _param_index);
                              param = (ValaParameter*) _tmp183_;
                              _tmp184_ = vala_parameter_get_captured (param);
                              if (_tmp184_) {
                                    vala_dova_base_module_capture_parameter (self, param, data, block_id, free_block);
                              }
                              _vala_code_node_unref0 (param);
                        }
                        _vala_iterable_unref0 (_param_list);
                  }
                  _vala_code_node_unref0 (m);
            } else {
                  ValaSymbol* _tmp185_ = NULL;
                  _tmp185_ = vala_symbol_get_parent_symbol ((ValaSymbol*) b);
                  if (VALA_IS_PROPERTY_ACCESSOR (_tmp185_)) {
                        ValaSymbol* _tmp186_ = NULL;
                        ValaPropertyAccessor* _tmp187_;
                        ValaPropertyAccessor* acc;
                        gboolean _tmp188_ = FALSE;
                        gboolean _tmp189_;
                        _tmp186_ = vala_symbol_get_parent_symbol ((ValaSymbol*) b);
                        _tmp187_ = _vala_code_node_ref0 (VALA_PROPERTY_ACCESSOR (_tmp186_));
                        acc = _tmp187_;
                        _tmp189_ = vala_property_accessor_get_readable (acc);
                        if (!_tmp189_) {
                              ValaParameter* _tmp190_ = NULL;
                              gboolean _tmp191_;
                              _tmp190_ = vala_property_accessor_get_value_parameter (acc);
                              _tmp191_ = vala_parameter_get_captured (_tmp190_);
                              _tmp188_ = _tmp191_;
                        } else {
                              _tmp188_ = FALSE;
                        }
                        if (_tmp188_) {
                              ValaParameter* _tmp192_ = NULL;
                              _tmp192_ = vala_property_accessor_get_value_parameter (acc);
                              vala_dova_base_module_capture_parameter (self, _tmp192_, data, block_id, free_block);
                        }
                        _vala_code_node_unref0 (acc);
                  }
            }
            _tmp193_ = g_strconcat ("struct _", struct_name, NULL);
            _tmp194_ = _tmp193_;
            _tmp195_ = vala_ccode_variable_declarator_new (struct_name, NULL, NULL);
            _tmp196_ = _tmp195_;
            _tmp197_ = vala_ccode_type_definition_new (_tmp194_, (ValaCCodeDeclarator*) _tmp196_);
            _tmp198_ = _tmp197_;
            _vala_ccode_node_unref0 (_tmp196_);
            _g_free0 (_tmp194_);
            _typedef_ = _tmp198_;
            vala_ccode_file_add_type_declaration (self->cfile, (ValaCCodeNode*) _typedef_);
            vala_ccode_file_add_type_definition (self->cfile, (ValaCCodeNode*) data);
            _tmp199_ = vala_ccode_identifier_new ("free");
            _tmp200_ = _tmp199_;
            _tmp201_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp200_);
            _tmp202_ = _tmp201_;
            _vala_ccode_node_unref0 (_tmp200_);
            data_free = _tmp202_;
            _tmp203_ = g_strdup_printf ("_data%d_", block_id);
            _tmp204_ = _tmp203_;
            _tmp205_ = vala_ccode_identifier_new (_tmp204_);
            _tmp206_ = _tmp205_;
            vala_ccode_function_call_add_argument (data_free, (ValaCCodeExpression*) _tmp206_);
            _vala_ccode_node_unref0 (_tmp206_);
            _g_free0 (_tmp204_);
            _tmp207_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) data_free);
            _tmp208_ = _tmp207_;
            vala_ccode_block_add_statement (free_block, (ValaCCodeNode*) _tmp208_);
            _vala_ccode_node_unref0 (_tmp208_);
            _tmp209_ = g_strdup_printf ("block%d_data_type_get", block_id);
            _tmp210_ = _tmp209_;
            _tmp211_ = vala_ccode_function_new (_tmp210_, "DovaType*");
            _tmp212_ = _tmp211_;
            _g_free0 (_tmp210_);
            type_get_fun = _tmp212_;
            vala_ccode_function_set_modifiers (type_get_fun, VALA_CCODE_MODIFIERS_STATIC);
            vala_ccode_file_add_function_declaration (self->cfile, type_get_fun);
            _tmp213_ = vala_ccode_block_new ();
            _tmp214_ = _tmp213_;
            vala_ccode_function_set_block (type_get_fun, _tmp214_);
            _vala_ccode_node_unref0 (_tmp214_);
            _tmp215_ = vala_ccode_declaration_new ("intptr_t");
            _cdecl_ = _tmp215_;
            _tmp216_ = g_strdup_printf ("_block%d_data_object_offset", block_id);
            _tmp217_ = _tmp216_;
            _tmp218_ = vala_ccode_constant_new ("0");
            _tmp219_ = _tmp218_;
            _tmp220_ = vala_ccode_variable_declarator_new (_tmp217_, (ValaCCodeExpression*) _tmp219_, NULL);
            _tmp221_ = _tmp220_;
            vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) _tmp221_);
            _vala_ccode_node_unref0 (_tmp221_);
            _vala_ccode_node_unref0 (_tmp219_);
            _g_free0 (_tmp217_);
            vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
            vala_ccode_file_add_type_member_declaration (self->cfile, (ValaCCodeNode*) _cdecl_);
            _tmp222_ = vala_ccode_declaration_new ("intptr_t");
            _vala_ccode_node_unref0 (_cdecl_);
            _cdecl_ = _tmp222_;
            _tmp223_ = g_strdup_printf ("_block%d_data_type_offset", block_id);
            _tmp224_ = _tmp223_;
            _tmp225_ = vala_ccode_constant_new ("0");
            _tmp226_ = _tmp225_;
            _tmp227_ = vala_ccode_variable_declarator_new (_tmp224_, (ValaCCodeExpression*) _tmp226_, NULL);
            _tmp228_ = _tmp227_;
            vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) _tmp228_);
            _vala_ccode_node_unref0 (_tmp228_);
            _vala_ccode_node_unref0 (_tmp226_);
            _g_free0 (_tmp224_);
            vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
            vala_ccode_file_add_type_member_declaration (self->cfile, (ValaCCodeNode*) _cdecl_);
            _tmp229_ = vala_ccode_declaration_new ("DovaType *");
            _vala_ccode_node_unref0 (_cdecl_);
            _cdecl_ = _tmp229_;
            _tmp230_ = g_strdup_printf ("block%d_data_type", block_id);
            _tmp231_ = _tmp230_;
            _tmp232_ = vala_ccode_constant_new ("NULL");
            _tmp233_ = _tmp232_;
            _tmp234_ = vala_ccode_variable_declarator_new (_tmp231_, (ValaCCodeExpression*) _tmp233_, NULL);
            _tmp235_ = _tmp234_;
            vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) _tmp235_);
            _vala_ccode_node_unref0 (_tmp235_);
            _vala_ccode_node_unref0 (_tmp233_);
            _g_free0 (_tmp231_);
            vala_ccode_declaration_set_modifiers (_cdecl_, VALA_CCODE_MODIFIERS_STATIC);
            vala_ccode_file_add_type_member_declaration (self->cfile, (ValaCCodeNode*) _cdecl_);
            _tmp236_ = vala_ccode_block_new ();
            type_init_block = _tmp236_;
            _tmp237_ = vala_ccode_identifier_new ("dova_type_alloc");
            _tmp238_ = _tmp237_;
            _tmp239_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp238_);
            _tmp240_ = _tmp239_;
            _vala_ccode_node_unref0 (_tmp238_);
            alloc_call = _tmp240_;
            _tmp241_ = vala_ccode_identifier_new ("dova_object_type_get");
            _tmp242_ = _tmp241_;
            _tmp243_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp242_);
            _tmp244_ = _tmp243_;
            vala_ccode_function_call_add_argument (alloc_call, (ValaCCodeExpression*) _tmp244_);
            _vala_ccode_node_unref0 (_tmp244_);
            _vala_ccode_node_unref0 (_tmp242_);
            _tmp245_ = g_strdup_printf ("sizeof (%s)", struct_name);
            _tmp246_ = _tmp245_;
            _tmp247_ = vala_ccode_constant_new (_tmp246_);
            _tmp248_ = _tmp247_;
            vala_ccode_function_call_add_argument (alloc_call, (ValaCCodeExpression*) _tmp248_);
            _vala_ccode_node_unref0 (_tmp248_);
            _g_free0 (_tmp246_);
            _tmp249_ = vala_ccode_constant_new ("0");
            _tmp250_ = _tmp249_;
            vala_ccode_function_call_add_argument (alloc_call, (ValaCCodeExpression*) _tmp250_);
            _vala_ccode_node_unref0 (_tmp250_);
            _tmp251_ = g_strdup_printf ("block%d_data_type", block_id);
            _tmp252_ = _tmp251_;
            _tmp253_ = vala_ccode_identifier_new (_tmp252_);
            _tmp254_ = _tmp253_;
            _tmp255_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp254_);
            _tmp256_ = _tmp255_;
            vala_ccode_function_call_add_argument (alloc_call, (ValaCCodeExpression*) _tmp256_);
            _vala_ccode_node_unref0 (_tmp256_);
            _vala_ccode_node_unref0 (_tmp254_);
            _g_free0 (_tmp252_);
            _tmp257_ = g_strdup_printf ("_block%d_data_object_offset", block_id);
            _tmp258_ = _tmp257_;
            _tmp259_ = vala_ccode_identifier_new (_tmp258_);
            _tmp260_ = _tmp259_;
            _tmp261_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp260_);
            _tmp262_ = _tmp261_;
            vala_ccode_function_call_add_argument (alloc_call, (ValaCCodeExpression*) _tmp262_);
            _vala_ccode_node_unref0 (_tmp262_);
            _vala_ccode_node_unref0 (_tmp260_);
            _g_free0 (_tmp258_);
            _tmp263_ = g_strdup_printf ("_block%d_data_type_offset", block_id);
            _tmp264_ = _tmp263_;
            _tmp265_ = vala_ccode_identifier_new (_tmp264_);
            _tmp266_ = _tmp265_;
            _tmp267_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp266_);
            _tmp268_ = _tmp267_;
            vala_ccode_function_call_add_argument (alloc_call, (ValaCCodeExpression*) _tmp268_);
            _vala_ccode_node_unref0 (_tmp268_);
            _vala_ccode_node_unref0 (_tmp266_);
            _g_free0 (_tmp264_);
            _tmp269_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) alloc_call);
            _tmp270_ = _tmp269_;
            vala_ccode_block_add_statement (type_init_block, (ValaCCodeNode*) _tmp270_);
            _vala_ccode_node_unref0 (_tmp270_);
            _tmp271_ = vala_ccode_identifier_new ("dova_object_type_init");
            _tmp272_ = _tmp271_;
            _tmp273_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp272_);
            _tmp274_ = _tmp273_;
            _vala_ccode_node_unref0 (_tmp272_);
            type_init_call = _tmp274_;
            _tmp275_ = g_strdup_printf ("block%d_data_type", block_id);
            _tmp276_ = _tmp275_;
            _tmp277_ = vala_ccode_identifier_new (_tmp276_);
            _tmp278_ = _tmp277_;
            vala_ccode_function_call_add_argument (type_init_call, (ValaCCodeExpression*) _tmp278_);
            _vala_ccode_node_unref0 (_tmp278_);
            _g_free0 (_tmp276_);
            _tmp279_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) type_init_call);
            _tmp280_ = _tmp279_;
            vala_ccode_block_add_statement (type_init_block, (ValaCCodeNode*) _tmp280_);
            _vala_ccode_node_unref0 (_tmp280_);
            _tmp281_ = vala_ccode_function_get_block (type_get_fun);
            _tmp282_ = g_strdup_printf ("block%d_data_type", block_id);
            _tmp283_ = _tmp282_;
            _tmp284_ = vala_ccode_identifier_new (_tmp283_);
            _tmp285_ = _tmp284_;
            _tmp286_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_LOGICAL_NEGATION, (ValaCCodeExpression*) _tmp285_);
            _tmp287_ = _tmp286_;
            _tmp288_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) _tmp287_, (ValaCCodeStatement*) type_init_block, NULL);
            _tmp289_ = _tmp288_;
            vala_ccode_block_add_statement (_tmp281_, (ValaCCodeNode*) _tmp289_);
            _vala_ccode_node_unref0 (_tmp289_);
            _vala_ccode_node_unref0 (_tmp287_);
            _vala_ccode_node_unref0 (_tmp285_);
            _g_free0 (_tmp283_);
            _tmp290_ = vala_ccode_function_get_block (type_get_fun);
            _tmp291_ = g_strdup_printf ("block%d_data_type", block_id);
            _tmp292_ = _tmp291_;
            _tmp293_ = vala_ccode_identifier_new (_tmp292_);
            _tmp294_ = _tmp293_;
            _tmp295_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp294_);
            _tmp296_ = _tmp295_;
            vala_ccode_block_add_statement (_tmp290_, (ValaCCodeNode*) _tmp296_);
            _vala_ccode_node_unref0 (_tmp296_);
            _vala_ccode_node_unref0 (_tmp294_);
            _g_free0 (_tmp292_);
            vala_ccode_file_add_function (self->cfile, type_get_fun);
            _tmp297_ = g_strdup_printf ("block%d_data_finalize", block_id);
            _tmp298_ = _tmp297_;
            _tmp299_ = vala_ccode_function_new (_tmp298_, "void");
            _tmp300_ = _tmp299_;
            _g_free0 (_tmp298_);
            unref_fun = _tmp300_;
            _tmp301_ = g_strdup_printf ("_data%d_", block_id);
            _tmp302_ = _tmp301_;
            _tmp303_ = g_strconcat (struct_name, "*", NULL);
            _tmp304_ = _tmp303_;
            _tmp305_ = vala_ccode_parameter_new (_tmp302_, _tmp304_);
            _tmp306_ = _tmp305_;
            vala_ccode_function_add_parameter (unref_fun, _tmp306_);
            _vala_ccode_node_unref0 (_tmp306_);
            _g_free0 (_tmp304_);
            _g_free0 (_tmp302_);
            vala_ccode_function_set_modifiers (unref_fun, VALA_CCODE_MODIFIERS_STATIC);
            vala_ccode_file_add_function_declaration (self->cfile, unref_fun);
            vala_ccode_function_set_block (unref_fun, free_block);
            vala_ccode_file_add_function (self->cfile, unref_fun);
            _vala_ccode_node_unref0 (unref_fun);
            _vala_ccode_node_unref0 (type_init_call);
            _vala_ccode_node_unref0 (alloc_call);
            _vala_ccode_node_unref0 (type_init_block);
            _vala_ccode_node_unref0 (_cdecl_);
            _vala_ccode_node_unref0 (type_get_fun);
            _vala_ccode_node_unref0 (data_free);
            _vala_ccode_node_unref0 (_typedef_);
            _vala_ccode_node_unref0 (data_decl);
            _vala_ccode_node_unref0 (data_alloc);
            _vala_ccode_node_unref0 (data);
            _vala_ccode_node_unref0 (free_block);
            _g_free0 (struct_name);
            _vala_code_node_unref0 (parent_block);
      }
      {
            ValaList* _tmp307_ = NULL;
            ValaList* _stmt_list;
            gint _tmp308_;
            gint _stmt_size;
            gint _stmt_index;
            _tmp307_ = vala_block_get_statements (b);
            _stmt_list = _tmp307_;
            _tmp308_ = vala_collection_get_size ((ValaCollection*) _stmt_list);
            _stmt_size = _tmp308_;
            _stmt_index = -1;
            while (TRUE) {
                  gpointer _tmp309_ = NULL;
                  ValaStatement* stmt;
                  _stmt_index = _stmt_index + 1;
                  if (!(_stmt_index < _stmt_size)) {
                        break;
                  }
                  _tmp309_ = vala_list_get (_stmt_list, _stmt_index);
                  stmt = (ValaStatement*) _tmp309_;
                  vala_code_node_emit ((ValaCodeNode*) stmt, (ValaCodeGenerator*) self);
                  _vala_code_node_unref0 (stmt);
            }
            _vala_iterable_unref0 (_stmt_list);
      }
      {
            gint _tmp310_;
            gint i;
            _tmp310_ = vala_collection_get_size ((ValaCollection*) local_vars);
            i = _tmp310_ - 1;
            {
                  gboolean _tmp311_;
                  _tmp311_ = TRUE;
                  while (TRUE) {
                        gpointer _tmp312_ = NULL;
                        ValaLocalVariable* local;
                        gboolean _tmp313_ = FALSE;
                        gboolean _tmp314_ = FALSE;
                        gboolean _tmp315_;
                        if (!_tmp311_) {
                              i--;
                        }
                        _tmp311_ = FALSE;
                        if (!(i >= 0)) {
                              break;
                        }
                        _tmp312_ = vala_list_get (local_vars, i);
                        local = (ValaLocalVariable*) _tmp312_;
                        _tmp315_ = vala_local_variable_get_floating (local);
                        if (!_tmp315_) {
                              gboolean _tmp316_;
                              _tmp316_ = vala_local_variable_get_captured (local);
                              _tmp314_ = !_tmp316_;
                        } else {
                              _tmp314_ = FALSE;
                        }
                        if (_tmp314_) {
                              ValaDataType* _tmp317_ = NULL;
                              gboolean _tmp318_;
                              _tmp317_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              _tmp318_ = vala_dova_base_module_requires_destroy (self, _tmp317_);
                              _tmp313_ = _tmp318_;
                        } else {
                              _tmp313_ = FALSE;
                        }
                        if (_tmp313_) {
                              const gchar* _tmp319_ = NULL;
                              ValaMemberAccess* _tmp320_ = NULL;
                              ValaMemberAccess* ma;
                              ValaCCodeFunction* _tmp321_ = NULL;
                              const gchar* _tmp322_ = NULL;
                              ValaCCodeExpression* _tmp323_ = NULL;
                              ValaCCodeExpression* _tmp324_;
                              ValaDataType* _tmp325_ = NULL;
                              ValaCCodeExpression* _tmp326_ = NULL;
                              ValaCCodeExpression* _tmp327_;
                              ValaCCodeExpressionStatement* _tmp328_ = NULL;
                              ValaCCodeExpressionStatement* _tmp329_;
                              _tmp319_ = vala_symbol_get_name ((ValaSymbol*) local);
                              _tmp320_ = vala_member_access_new_simple (_tmp319_, NULL);
                              ma = _tmp320_;
                              vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
                              _tmp321_ = vala_dova_base_module_get_ccode (self);
                              _tmp322_ = vala_symbol_get_name ((ValaSymbol*) local);
                              _tmp323_ = vala_dova_base_module_get_variable_cexpression (self, _tmp322_);
                              _tmp324_ = _tmp323_;
                              _tmp325_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              _tmp326_ = vala_dova_base_module_get_unref_expression (self, _tmp324_, _tmp325_, (ValaExpression*) ma);
                              _tmp327_ = _tmp326_;
                              _tmp328_ = vala_ccode_expression_statement_new (_tmp327_);
                              _tmp329_ = _tmp328_;
                              vala_ccode_function_add_statement (_tmp321_, (ValaCCodeNode*) _tmp329_);
                              _vala_ccode_node_unref0 (_tmp329_);
                              _vala_ccode_node_unref0 (_tmp327_);
                              _vala_ccode_node_unref0 (_tmp324_);
                              _vala_code_node_unref0 (ma);
                        }
                        _vala_code_node_unref0 (local);
                  }
            }
      }
      _tmp330_ = vala_symbol_get_parent_symbol ((ValaSymbol*) b);
      if (VALA_IS_METHOD (_tmp330_)) {
            ValaSymbol* _tmp331_ = NULL;
            ValaMethod* _tmp332_;
            ValaMethod* m;
            _tmp331_ = vala_symbol_get_parent_symbol ((ValaSymbol*) b);
            _tmp332_ = _vala_code_node_ref0 (VALA_METHOD (_tmp331_));
            m = _tmp332_;
            {
                  ValaList* _tmp333_ = NULL;
                  ValaList* _param_list;
                  gint _tmp334_;
                  gint _param_size;
                  gint _param_index;
                  _tmp333_ = vala_method_get_parameters (m);
                  _param_list = _tmp333_;
                  _tmp334_ = vala_collection_get_size ((ValaCollection*) _param_list);
                  _param_size = _tmp334_;
                  _param_index = -1;
                  while (TRUE) {
                        gpointer _tmp335_ = NULL;
                        ValaParameter* param;
                        gboolean _tmp336_ = FALSE;
                        gboolean _tmp337_ = FALSE;
                        gboolean _tmp338_;
                        _param_index = _param_index + 1;
                        if (!(_param_index < _param_size)) {
                              break;
                        }
                        _tmp335_ = vala_list_get (_param_list, _param_index);
                        param = (ValaParameter*) _tmp335_;
                        _tmp338_ = vala_parameter_get_captured (param);
                        if (!_tmp338_) {
                              ValaDataType* _tmp339_ = NULL;
                              gboolean _tmp340_;
                              _tmp339_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp340_ = vala_dova_base_module_requires_destroy (self, _tmp339_);
                              _tmp337_ = _tmp340_;
                        } else {
                              _tmp337_ = FALSE;
                        }
                        if (_tmp337_) {
                              ValaParameterDirection _tmp341_;
                              _tmp341_ = vala_parameter_get_direction (param);
                              _tmp336_ = _tmp341_ == VALA_PARAMETER_DIRECTION_IN;
                        } else {
                              _tmp336_ = FALSE;
                        }
                        if (_tmp336_) {
                              const gchar* _tmp342_ = NULL;
                              ValaMemberAccess* _tmp343_ = NULL;
                              ValaMemberAccess* ma;
                              ValaCCodeFunction* _tmp344_ = NULL;
                              const gchar* _tmp345_ = NULL;
                              ValaCCodeExpression* _tmp346_ = NULL;
                              ValaCCodeExpression* _tmp347_;
                              ValaDataType* _tmp348_ = NULL;
                              ValaCCodeExpression* _tmp349_ = NULL;
                              ValaCCodeExpression* _tmp350_;
                              ValaCCodeExpressionStatement* _tmp351_ = NULL;
                              ValaCCodeExpressionStatement* _tmp352_;
                              _tmp342_ = vala_symbol_get_name ((ValaSymbol*) param);
                              _tmp343_ = vala_member_access_new_simple (_tmp342_, NULL);
                              ma = _tmp343_;
                              vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
                              _tmp344_ = vala_dova_base_module_get_ccode (self);
                              _tmp345_ = vala_symbol_get_name ((ValaSymbol*) param);
                              _tmp346_ = vala_dova_base_module_get_variable_cexpression (self, _tmp345_);
                              _tmp347_ = _tmp346_;
                              _tmp348_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              _tmp349_ = vala_dova_base_module_get_unref_expression (self, _tmp347_, _tmp348_, (ValaExpression*) ma);
                              _tmp350_ = _tmp349_;
                              _tmp351_ = vala_ccode_expression_statement_new (_tmp350_);
                              _tmp352_ = _tmp351_;
                              vala_ccode_function_add_statement (_tmp344_, (ValaCCodeNode*) _tmp352_);
                              _vala_ccode_node_unref0 (_tmp352_);
                              _vala_ccode_node_unref0 (_tmp350_);
                              _vala_ccode_node_unref0 (_tmp347_);
                              _vala_code_node_unref0 (ma);
                        }
                        _vala_code_node_unref0 (param);
                  }
                  _vala_iterable_unref0 (_param_list);
            }
            _vala_code_node_unref0 (m);
      }
      _tmp353_ = vala_block_get_captured (b);
      if (_tmp353_) {
            gint _tmp354_;
            gint block_id;
            ValaCCodeIdentifier* _tmp355_ = NULL;
            ValaCCodeIdentifier* _tmp356_;
            ValaCCodeFunctionCall* _tmp357_ = NULL;
            ValaCCodeFunctionCall* _tmp358_;
            ValaCCodeFunctionCall* data_unref;
            gchar* _tmp359_ = NULL;
            gchar* _tmp360_;
            ValaCCodeExpression* _tmp361_ = NULL;
            ValaCCodeExpression* _tmp362_;
            ValaCCodeFunction* _tmp363_ = NULL;
            ValaCCodeExpressionStatement* _tmp364_ = NULL;
            ValaCCodeExpressionStatement* _tmp365_;
            _tmp354_ = vala_dova_base_module_get_block_id (self, b);
            block_id = _tmp354_;
            _tmp355_ = vala_ccode_identifier_new ("dova_object_unref");
            _tmp356_ = _tmp355_;
            _tmp357_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp356_);
            _tmp358_ = _tmp357_;
            _vala_ccode_node_unref0 (_tmp356_);
            data_unref = _tmp358_;
            _tmp359_ = g_strdup_printf ("_data%d_", block_id);
            _tmp360_ = _tmp359_;
            _tmp361_ = vala_dova_base_module_get_variable_cexpression (self, _tmp360_);
            _tmp362_ = _tmp361_;
            vala_ccode_function_call_add_argument (data_unref, _tmp362_);
            _vala_ccode_node_unref0 (_tmp362_);
            _g_free0 (_tmp360_);
            _tmp363_ = vala_dova_base_module_get_ccode (self);
            _tmp364_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) data_unref);
            _tmp365_ = _tmp364_;
            vala_ccode_function_add_statement (_tmp363_, (ValaCCodeNode*) _tmp365_);
            _vala_ccode_node_unref0 (_tmp365_);
            _vala_ccode_node_unref0 (data_unref);
      }
      _tmp367_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
      if (VALA_IS_BLOCK (_tmp367_)) {
            _tmp366_ = TRUE;
      } else {
            ValaCodeNode* _tmp368_ = NULL;
            _tmp368_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
            _tmp366_ = VALA_IS_SWITCH_STATEMENT (_tmp368_);
      }
      if (_tmp366_) {
            ValaCCodeFunction* _tmp369_ = NULL;
            _tmp369_ = vala_dova_base_module_get_ccode (self);
            vala_ccode_function_close (_tmp369_);
      }
      vala_dova_base_module_emit_context_pop_symbol (self->emit_context);
      _vala_iterable_unref0 (local_vars);
}


static void vala_dova_base_module_real_visit_declaration_statement (ValaCodeVisitor* base, ValaDeclarationStatement* stmt) {
      ValaDovaBaseModule * self;
      ValaSymbol* _tmp0_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_declaration_statement_get_declaration (stmt);
      vala_code_node_accept ((ValaCodeNode*) _tmp0_, (ValaCodeVisitor*) self);
}


ValaCCodeExpression* vala_dova_base_module_get_variable_cexpression (ValaDovaBaseModule* self, const gchar* name) {
      ValaCCodeExpression* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaCCodeIdentifier* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_variable_cname (self, name);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_ccode_identifier_new (_tmp1_);
      _tmp3_ = (ValaCCodeExpression*) _tmp2_;
      _g_free0 (_tmp1_);
      result = _tmp3_;
      return result;
}


static gchar string_get (const gchar* self, glong index) {
      gchar result = '\0';
      g_return_val_if_fail (self != NULL, '\0');
      result = ((gchar*) self)[index];
      return result;
}


gchar* vala_dova_base_module_get_variable_cname (ValaDovaBaseModule* self, const gchar* name) {
      gchar* result = NULL;
      gchar _tmp0_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = string_get (name, (glong) 0);
      if (_tmp0_ == '.') {
            ValaMap* _tmp1_ = NULL;
            gboolean _tmp2_;
            ValaMap* _tmp9_ = NULL;
            gpointer _tmp10_ = NULL;
            _tmp1_ = vala_dova_base_module_get_variable_name_map (self);
            _tmp2_ = vala_map_contains (_tmp1_, name);
            if (!_tmp2_) {
                  ValaMap* _tmp3_ = NULL;
                  gint _tmp4_;
                  gchar* _tmp5_ = NULL;
                  gchar* _tmp6_;
                  gint _tmp7_;
                  gint _tmp8_;
                  _tmp3_ = vala_dova_base_module_get_variable_name_map (self);
                  _tmp4_ = vala_dova_base_module_get_next_temp_var_id (self);
                  _tmp5_ = g_strdup_printf ("_tmp%d_", _tmp4_);
                  _tmp6_ = _tmp5_;
                  vala_map_set (_tmp3_, name, _tmp6_);
                  _g_free0 (_tmp6_);
                  _tmp7_ = vala_dova_base_module_get_next_temp_var_id (self);
                  _tmp8_ = _tmp7_;
                  vala_dova_base_module_set_next_temp_var_id (self, _tmp8_ + 1);
            }
            _tmp9_ = vala_dova_base_module_get_variable_name_map (self);
            _tmp10_ = vala_map_get (_tmp9_, name);
            result = (gchar*) _tmp10_;
            return result;
      } else {
            gboolean _tmp11_;
            _tmp11_ = vala_collection_contains ((ValaCollection*) self->priv->reserved_identifiers, name);
            if (_tmp11_) {
                  gchar* _tmp12_ = NULL;
                  _tmp12_ = g_strdup_printf ("_%s_", name);
                  result = _tmp12_;
                  return result;
            } else {
                  gchar* _tmp13_;
                  _tmp13_ = g_strdup (name);
                  result = _tmp13_;
                  return result;
            }
      }
}


static void vala_dova_base_module_real_visit_local_variable (ValaCodeVisitor* base, ValaLocalVariable* local) {
      ValaDovaBaseModule * self;
      ValaExpression* _tmp0_ = NULL;
      ValaDataType* _tmp3_ = NULL;
      ValaCCodeExpression* rhs;
      gboolean _tmp4_ = FALSE;
      ValaExpression* _tmp5_ = NULL;
      gboolean _tmp11_;
      gboolean _tmp43_ = FALSE;
      ValaExpression* _tmp44_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (local != NULL);
      _tmp0_ = vala_variable_get_initializer ((ValaVariable*) local);
      if (_tmp0_ != NULL) {
            ValaExpression* _tmp1_ = NULL;
            ValaExpression* _tmp2_ = NULL;
            _tmp1_ = vala_variable_get_initializer ((ValaVariable*) local);
            vala_code_node_emit ((ValaCodeNode*) _tmp1_, (ValaCodeGenerator*) self);
            _tmp2_ = vala_variable_get_initializer ((ValaVariable*) local);
            vala_code_visitor_visit_end_full_expression ((ValaCodeVisitor*) self, _tmp2_);
      }
      _tmp3_ = vala_variable_get_variable_type ((ValaVariable*) local);
      vala_dova_base_module_generate_type_declaration (self, _tmp3_, self->cfile);
      rhs = NULL;
      _tmp5_ = vala_variable_get_initializer ((ValaVariable*) local);
      if (_tmp5_ != NULL) {
            ValaExpression* _tmp6_ = NULL;
            ValaCCodeExpression* _tmp7_ = NULL;
            ValaCCodeExpression* _tmp8_;
            _tmp6_ = vala_variable_get_initializer ((ValaVariable*) local);
            _tmp7_ = vala_dova_base_module_get_cvalue (self, _tmp6_);
            _tmp8_ = _tmp7_;
            _tmp4_ = _tmp8_ != NULL;
            _vala_ccode_node_unref0 (_tmp8_);
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            ValaExpression* _tmp9_ = NULL;
            ValaCCodeExpression* _tmp10_ = NULL;
            _tmp9_ = vala_variable_get_initializer ((ValaVariable*) local);
            _tmp10_ = vala_dova_base_module_get_cvalue (self, _tmp9_);
            _vala_ccode_node_unref0 (rhs);
            rhs = _tmp10_;
      }
      _tmp11_ = vala_local_variable_get_captured (local);
      if (_tmp11_) {
            ValaExpression* _tmp12_ = NULL;
            _tmp12_ = vala_variable_get_initializer ((ValaVariable*) local);
            if (_tmp12_ != NULL) {
                  ValaCCodeFunction* _tmp13_ = NULL;
                  ValaSymbol* _tmp14_ = NULL;
                  gint _tmp15_;
                  gchar* _tmp16_ = NULL;
                  gchar* _tmp17_;
                  ValaCCodeExpression* _tmp18_ = NULL;
                  ValaCCodeExpression* _tmp19_;
                  const gchar* _tmp20_ = NULL;
                  gchar* _tmp21_ = NULL;
                  gchar* _tmp22_;
                  ValaCCodeMemberAccess* _tmp23_ = NULL;
                  ValaCCodeMemberAccess* _tmp24_;
                  _tmp13_ = vala_dova_base_module_get_ccode (self);
                  _tmp14_ = vala_symbol_get_parent_symbol ((ValaSymbol*) local);
                  _tmp15_ = vala_dova_base_module_get_block_id (self, VALA_BLOCK (_tmp14_));
                  _tmp16_ = g_strdup_printf ("_data%d_", _tmp15_);
                  _tmp17_ = _tmp16_;
                  _tmp18_ = vala_dova_base_module_get_variable_cexpression (self, _tmp17_);
                  _tmp19_ = _tmp18_;
                  _tmp20_ = vala_symbol_get_name ((ValaSymbol*) local);
                  _tmp21_ = vala_dova_base_module_get_variable_cname (self, _tmp20_);
                  _tmp22_ = _tmp21_;
                  _tmp23_ = vala_ccode_member_access_new_pointer (_tmp19_, _tmp22_);
                  _tmp24_ = _tmp23_;
                  vala_ccode_function_add_assignment (_tmp13_, (ValaCCodeExpression*) _tmp24_, rhs);
                  _vala_ccode_node_unref0 (_tmp24_);
                  _g_free0 (_tmp22_);
                  _vala_ccode_node_unref0 (_tmp19_);
                  _g_free0 (_tmp17_);
            }
      } else {
            const gchar* _tmp25_ = NULL;
            gchar* _tmp26_ = NULL;
            gchar* _tmp27_;
            ValaDataType* _tmp28_ = NULL;
            gchar* _tmp29_ = NULL;
            gchar* _tmp30_;
            ValaCCodeVariableDeclarator* _tmp31_ = NULL;
            ValaCCodeVariableDeclarator* _tmp32_;
            ValaCCodeVariableDeclarator* cvar;
            ValaDataType* _tmp33_ = NULL;
            gchar* _tmp34_ = NULL;
            gchar* _tmp35_;
            ValaCCodeDeclaration* _tmp36_ = NULL;
            ValaCCodeDeclaration* _tmp37_;
            ValaCCodeDeclaration* _cdecl_;
            ValaCCodeFunction* _tmp38_ = NULL;
            ValaCCodeExpression* _tmp39_ = NULL;
            _tmp25_ = vala_symbol_get_name ((ValaSymbol*) local);
            _tmp26_ = vala_dova_base_module_get_variable_cname (self, _tmp25_);
            _tmp27_ = _tmp26_;
            _tmp28_ = vala_variable_get_variable_type ((ValaVariable*) local);
            _tmp29_ = vala_data_type_get_cdeclarator_suffix (_tmp28_);
            _tmp30_ = _tmp29_;
            _tmp31_ = vala_ccode_variable_declarator_new (_tmp27_, rhs, _tmp30_);
            _tmp32_ = _tmp31_;
            _g_free0 (_tmp30_);
            _g_free0 (_tmp27_);
            cvar = _tmp32_;
            _tmp33_ = vala_variable_get_variable_type ((ValaVariable*) local);
            _tmp34_ = vala_data_type_get_cname (_tmp33_);
            _tmp35_ = _tmp34_;
            _tmp36_ = vala_ccode_declaration_new (_tmp35_);
            _tmp37_ = _tmp36_;
            _g_free0 (_tmp35_);
            _cdecl_ = _tmp37_;
            vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) cvar);
            _tmp38_ = vala_dova_base_module_get_ccode (self);
            vala_ccode_function_add_statement (_tmp38_, (ValaCCodeNode*) _cdecl_);
            _tmp39_ = vala_ccode_variable_declarator_get_initializer (cvar);
            if (_tmp39_ == NULL) {
                  ValaDataType* _tmp40_ = NULL;
                  ValaCCodeExpression* _tmp41_ = NULL;
                  ValaCCodeExpression* _tmp42_;
                  _tmp40_ = vala_variable_get_variable_type ((ValaVariable*) local);
                  _tmp41_ = vala_dova_base_module_default_value_for_type (self, _tmp40_, TRUE);
                  _tmp42_ = _tmp41_;
                  vala_ccode_variable_declarator_set_initializer (cvar, _tmp42_);
                  _vala_ccode_node_unref0 (_tmp42_);
                  vala_ccode_variable_declarator_set_init0 (cvar, TRUE);
            }
            _vala_ccode_node_unref0 (_cdecl_);
            _vala_ccode_node_unref0 (cvar);
      }
      _tmp44_ = vala_variable_get_initializer ((ValaVariable*) local);
      if (_tmp44_ != NULL) {
            ValaExpression* _tmp45_ = NULL;
            gboolean _tmp46_;
            _tmp45_ = vala_variable_get_initializer ((ValaVariable*) local);
            _tmp46_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) _tmp45_);
            _tmp43_ = _tmp46_;
      } else {
            _tmp43_ = FALSE;
      }
      if (_tmp43_) {
            ValaExpression* _tmp47_ = NULL;
            _tmp47_ = vala_variable_get_initializer ((ValaVariable*) local);
            vala_dova_base_module_add_simple_check (self, (ValaCodeNode*) _tmp47_, FALSE);
      }
      vala_symbol_set_active ((ValaSymbol*) local, TRUE);
      _vala_ccode_node_unref0 (rhs);
}


static void vala_dova_base_module_real_visit_initializer_list (ValaCodeVisitor* base, ValaInitializerList* list) {
      ValaDovaBaseModule * self;
      ValaDataType* _tmp0_ = NULL;
      ValaTypeSymbol* _tmp1_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (list != NULL);
      _tmp0_ = vala_expression_get_target_type ((ValaExpression*) list);
      _tmp1_ = vala_data_type_get_data_type (_tmp0_);
      if (VALA_IS_STRUCT (_tmp1_)) {
            ValaDataType* _tmp2_ = NULL;
            ValaTypeSymbol* _tmp3_ = NULL;
            ValaStruct* _tmp4_;
            ValaStruct* st;
            ValaCCodeInitializerList* _tmp5_ = NULL;
            ValaCCodeInitializerList* clist;
            ValaList* _tmp6_ = NULL;
            ValaList* _tmp7_;
            ValaIterator* _tmp8_ = NULL;
            ValaIterator* _tmp9_;
            ValaIterator* field_it;
            _tmp2_ = vala_expression_get_target_type ((ValaExpression*) list);
            _tmp3_ = vala_data_type_get_data_type (_tmp2_);
            _tmp4_ = _vala_code_node_ref0 (VALA_STRUCT (_tmp3_));
            st = _tmp4_;
            _tmp5_ = vala_ccode_initializer_list_new ();
            clist = _tmp5_;
            _tmp6_ = vala_struct_get_fields (st);
            _tmp7_ = _tmp6_;
            _tmp8_ = vala_iterable_iterator ((ValaIterable*) _tmp7_);
            _tmp9_ = _tmp8_;
            _vala_iterable_unref0 (_tmp7_);
            field_it = _tmp9_;
            {
                  ValaList* _tmp10_ = NULL;
                  ValaList* _expr_list;
                  gint _tmp11_;
                  gint _expr_size;
                  gint _expr_index;
                  _tmp10_ = vala_initializer_list_get_initializers (list);
                  _expr_list = _tmp10_;
                  _tmp11_ = vala_collection_get_size ((ValaCollection*) _expr_list);
                  _expr_size = _tmp11_;
                  _expr_index = -1;
                  while (TRUE) {
                        gpointer _tmp12_ = NULL;
                        ValaExpression* expr;
                        ValaField* field;
                        ValaCCodeExpression* _tmp15_ = NULL;
                        ValaCCodeExpression* cexpr;
                        gchar* _tmp16_ = NULL;
                        gchar* ctype;
                        _expr_index = _expr_index + 1;
                        if (!(_expr_index < _expr_size)) {
                              break;
                        }
                        _tmp12_ = vala_list_get (_expr_list, _expr_index);
                        expr = (ValaExpression*) _tmp12_;
                        field = NULL;
                        while (TRUE) {
                              gpointer _tmp13_ = NULL;
                              ValaMemberBinding _tmp14_;
                              if (!(field == NULL)) {
                                    break;
                              }
                              vala_iterator_next (field_it);
                              _tmp13_ = vala_iterator_get (field_it);
                              _vala_code_node_unref0 (field);
                              field = (ValaField*) _tmp13_;
                              _tmp14_ = vala_field_get_binding (field);
                              if (_tmp14_ != VALA_MEMBER_BINDING_INSTANCE) {
                                    _vala_code_node_unref0 (field);
                                    field = NULL;
                              }
                        }
                        _tmp15_ = vala_dova_base_module_get_cvalue (self, expr);
                        cexpr = _tmp15_;
                        _tmp16_ = vala_field_get_ctype (field);
                        ctype = _tmp16_;
                        if (ctype != NULL) {
                              ValaCCodeCastExpression* _tmp17_ = NULL;
                              _tmp17_ = vala_ccode_cast_expression_new (cexpr, ctype);
                              _vala_ccode_node_unref0 (cexpr);
                              cexpr = (ValaCCodeExpression*) _tmp17_;
                        }
                        vala_ccode_initializer_list_append (clist, cexpr);
                        _g_free0 (ctype);
                        _vala_ccode_node_unref0 (cexpr);
                        _vala_code_node_unref0 (field);
                        _vala_code_node_unref0 (expr);
                  }
                  _vala_iterable_unref0 (_expr_list);
            }
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) list, (ValaCCodeExpression*) clist);
            _vala_iterator_unref0 (field_it);
            _vala_ccode_node_unref0 (clist);
            _vala_code_node_unref0 (st);
      } else {
            ValaCCodeInitializerList* _tmp18_ = NULL;
            ValaCCodeInitializerList* clist;
            _tmp18_ = vala_ccode_initializer_list_new ();
            clist = _tmp18_;
            {
                  ValaList* _tmp19_ = NULL;
                  ValaList* _expr_list;
                  gint _tmp20_;
                  gint _expr_size;
                  gint _expr_index;
                  _tmp19_ = vala_initializer_list_get_initializers (list);
                  _expr_list = _tmp19_;
                  _tmp20_ = vala_collection_get_size ((ValaCollection*) _expr_list);
                  _expr_size = _tmp20_;
                  _expr_index = -1;
                  while (TRUE) {
                        gpointer _tmp21_ = NULL;
                        ValaExpression* expr;
                        ValaCCodeExpression* _tmp22_ = NULL;
                        ValaCCodeExpression* _tmp23_;
                        _expr_index = _expr_index + 1;
                        if (!(_expr_index < _expr_size)) {
                              break;
                        }
                        _tmp21_ = vala_list_get (_expr_list, _expr_index);
                        expr = (ValaExpression*) _tmp21_;
                        _tmp22_ = vala_dova_base_module_get_cvalue (self, expr);
                        _tmp23_ = _tmp22_;
                        vala_ccode_initializer_list_append (clist, _tmp23_);
                        _vala_ccode_node_unref0 (_tmp23_);
                        _vala_code_node_unref0 (expr);
                  }
                  _vala_iterable_unref0 (_expr_list);
            }
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) list, (ValaCCodeExpression*) clist);
            _vala_ccode_node_unref0 (clist);
      }
}


static ValaLocalVariable* vala_dova_base_module_real_create_local (ValaCodeGenerator* base, ValaDataType* type) {
      ValaDovaBaseModule * self;
      ValaLocalVariable* result = NULL;
      gboolean _tmp0_;
      ValaLocalVariable* _tmp1_ = NULL;
      ValaLocalVariable* _result_;
      self = (ValaDovaBaseModule*) base;
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_data_type_get_value_owned (type);
      _tmp1_ = vala_dova_base_module_get_temp_variable (self, type, _tmp0_, NULL);
      _result_ = _tmp1_;
      vala_dova_base_module_emit_temp_var (self, _result_);
      result = _result_;
      return result;
}


ValaLocalVariable* vala_dova_base_module_get_temp_variable (ValaDovaBaseModule* self, ValaDataType* type, gboolean value_owned, ValaCodeNode* node_reference) {
      ValaLocalVariable* result = NULL;
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* var_type;
      gint _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      ValaLocalVariable* _tmp4_ = NULL;
      ValaLocalVariable* _tmp5_;
      ValaLocalVariable* local;
      gint _tmp7_;
      gint _tmp8_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_data_type_copy (type);
      var_type = _tmp0_;
      vala_data_type_set_value_owned (var_type, value_owned);
      _tmp1_ = vala_dova_base_module_get_next_temp_var_id (self);
      _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_local_variable_new (var_type, _tmp3_, NULL, NULL);
      _tmp5_ = _tmp4_;
      _g_free0 (_tmp3_);
      local = _tmp5_;
      if (node_reference != NULL) {
            ValaSourceReference* _tmp6_ = NULL;
            _tmp6_ = vala_code_node_get_source_reference (node_reference);
            vala_code_node_set_source_reference ((ValaCodeNode*) local, _tmp6_);
      }
      _tmp7_ = vala_dova_base_module_get_next_temp_var_id (self);
      _tmp8_ = _tmp7_;
      vala_dova_base_module_set_next_temp_var_id (self, _tmp8_ + 1);
      result = local;
      _vala_code_node_unref0 (var_type);
      return result;
}


static gboolean vala_dova_base_module_is_in_generic_type (ValaDovaBaseModule* self, ValaDataType* type) {
      gboolean result = FALSE;
      gboolean _tmp0_ = FALSE;
      ValaTypeParameter* _tmp1_ = NULL;
      ValaSymbol* _tmp2_ = NULL;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (type != NULL, FALSE);
      _tmp1_ = vala_data_type_get_type_parameter (type);
      _tmp2_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp1_);
      if (VALA_IS_TYPESYMBOL (_tmp2_)) {
            gboolean _tmp3_ = FALSE;
            ValaMethod* _tmp4_ = NULL;
            _tmp4_ = vala_dova_base_module_get_current_method (self);
            if (_tmp4_ == NULL) {
                  _tmp3_ = TRUE;
            } else {
                  ValaMethod* _tmp5_ = NULL;
                  ValaMemberBinding _tmp6_;
                  _tmp5_ = vala_dova_base_module_get_current_method (self);
                  _tmp6_ = vala_method_get_binding (_tmp5_);
                  _tmp3_ = _tmp6_ == VALA_MEMBER_BINDING_INSTANCE;
            }
            _tmp0_ = _tmp3_;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            result = TRUE;
            return result;
      } else {
            result = FALSE;
            return result;
      }
}


ValaCCodeExpression* vala_dova_base_module_get_type_private_from_type (ValaDovaBaseModule* self, ValaObjectTypeSymbol* type_symbol, ValaCCodeExpression* type_expression) {
      ValaCCodeExpression* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type_symbol != NULL, NULL);
      g_return_val_if_fail (type_expression != NULL, NULL);
      if (VALA_IS_CLASS (type_symbol)) {
            ValaCCodeCastExpression* _tmp0_ = NULL;
            ValaCCodeCastExpression* _tmp1_;
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            ValaCCodeIdentifier* _tmp6_ = NULL;
            ValaCCodeIdentifier* _tmp7_;
            ValaCCodeBinaryExpression* _tmp8_ = NULL;
            ValaCCodeBinaryExpression* _tmp9_;
            gchar* _tmp10_ = NULL;
            gchar* _tmp11_;
            gchar* _tmp12_ = NULL;
            gchar* _tmp13_;
            ValaCCodeCastExpression* _tmp14_ = NULL;
            ValaCCodeExpression* _tmp15_;
            _tmp0_ = vala_ccode_cast_expression_new (type_expression, "char *");
            _tmp1_ = _tmp0_;
            _tmp2_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) VALA_CLASS (type_symbol), NULL);
            _tmp3_ = _tmp2_;
            _tmp4_ = g_strdup_printf ("_%s_type_offset", _tmp3_);
            _tmp5_ = _tmp4_;
            _tmp6_ = vala_ccode_identifier_new (_tmp5_);
            _tmp7_ = _tmp6_;
            _tmp8_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp1_, (ValaCCodeExpression*) _tmp7_);
            _tmp9_ = _tmp8_;
            _tmp10_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_CLASS (type_symbol), FALSE);
            _tmp11_ = _tmp10_;
            _tmp12_ = g_strdup_printf ("%sTypePrivate *", _tmp11_);
            _tmp13_ = _tmp12_;
            _tmp14_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp9_, _tmp13_);
            _tmp15_ = (ValaCCodeExpression*) _tmp14_;
            _g_free0 (_tmp13_);
            _g_free0 (_tmp11_);
            _vala_ccode_node_unref0 (_tmp9_);
            _vala_ccode_node_unref0 (_tmp7_);
            _g_free0 (_tmp5_);
            _g_free0 (_tmp3_);
            _vala_ccode_node_unref0 (_tmp1_);
            result = _tmp15_;
            return result;
      } else {
            ValaCCodeIdentifier* _tmp16_ = NULL;
            ValaCCodeIdentifier* _tmp17_;
            ValaCCodeFunctionCall* _tmp18_ = NULL;
            ValaCCodeFunctionCall* _tmp19_;
            ValaCCodeFunctionCall* get_interface;
            gchar* _tmp20_ = NULL;
            gchar* _tmp21_;
            gchar* _tmp22_ = NULL;
            gchar* _tmp23_;
            ValaCCodeIdentifier* _tmp24_ = NULL;
            ValaCCodeIdentifier* _tmp25_;
            gchar* _tmp26_ = NULL;
            gchar* _tmp27_;
            gchar* _tmp28_ = NULL;
            gchar* _tmp29_;
            ValaCCodeCastExpression* _tmp30_ = NULL;
            ValaCCodeExpression* _tmp31_;
            _tmp16_ = vala_ccode_identifier_new ("dova_type_get_interface");
            _tmp17_ = _tmp16_;
            _tmp18_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp17_);
            _tmp19_ = _tmp18_;
            _vala_ccode_node_unref0 (_tmp17_);
            get_interface = _tmp19_;
            vala_ccode_function_call_add_argument (get_interface, type_expression);
            _tmp20_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) VALA_INTERFACE (type_symbol), NULL);
            _tmp21_ = _tmp20_;
            _tmp22_ = g_strdup_printf ("%s_type", _tmp21_);
            _tmp23_ = _tmp22_;
            _tmp24_ = vala_ccode_identifier_new (_tmp23_);
            _tmp25_ = _tmp24_;
            vala_ccode_function_call_add_argument (get_interface, (ValaCCodeExpression*) _tmp25_);
            _vala_ccode_node_unref0 (_tmp25_);
            _g_free0 (_tmp23_);
            _g_free0 (_tmp21_);
            _tmp26_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_INTERFACE (type_symbol), FALSE);
            _tmp27_ = _tmp26_;
            _tmp28_ = g_strdup_printf ("%sTypePrivate *", _tmp27_);
            _tmp29_ = _tmp28_;
            _tmp30_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) get_interface, _tmp29_);
            _tmp31_ = (ValaCCodeExpression*) _tmp30_;
            _g_free0 (_tmp29_);
            _g_free0 (_tmp27_);
            result = _tmp31_;
            _vala_ccode_node_unref0 (get_interface);
            return result;
      }
}


ValaCCodeExpression* vala_dova_base_module_get_type_id_expression (ValaDovaBaseModule* self, ValaDataType* type, gboolean is_chainup) {
      ValaCCodeExpression* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      if (VALA_IS_GENERIC_TYPE (type)) {
            ValaTypeParameter* _tmp0_ = NULL;
            const gchar* _tmp1_ = NULL;
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            gchar* var_name;
            gboolean _tmp6_ = FALSE;
            gboolean _tmp7_;
            _tmp0_ = vala_data_type_get_type_parameter (type);
            _tmp1_ = vala_symbol_get_name ((ValaSymbol*) _tmp0_);
            _tmp2_ = g_utf8_strdown (_tmp1_, (gssize) (-1));
            _tmp3_ = _tmp2_;
            _tmp4_ = g_strdup_printf ("%s_type", _tmp3_);
            _tmp5_ = _tmp4_;
            _g_free0 (_tmp3_);
            var_name = _tmp5_;
            _tmp7_ = vala_dova_base_module_is_in_generic_type (self, type);
            if (_tmp7_) {
                  _tmp6_ = !is_chainup;
            } else {
                  _tmp6_ = FALSE;
            }
            if (_tmp6_) {
                  ValaTypeParameter* _tmp8_ = NULL;
                  ValaSymbol* _tmp9_ = NULL;
                  ValaCCodeIdentifier* _tmp10_ = NULL;
                  ValaCCodeIdentifier* _tmp11_;
                  ValaCCodeMemberAccess* _tmp12_ = NULL;
                  ValaCCodeMemberAccess* _tmp13_;
                  ValaCCodeExpression* _tmp14_ = NULL;
                  ValaCCodeExpression* _tmp15_;
                  ValaCCodeMemberAccess* _tmp16_ = NULL;
                  ValaCCodeExpression* _tmp17_;
                  _tmp8_ = vala_data_type_get_type_parameter (type);
                  _tmp9_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp8_);
                  _tmp10_ = vala_ccode_identifier_new ("this");
                  _tmp11_ = _tmp10_;
                  _tmp12_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) _tmp11_, "type");
                  _tmp13_ = _tmp12_;
                  _tmp14_ = vala_dova_base_module_get_type_private_from_type (self, VALA_OBJECT_TYPE_SYMBOL (_tmp9_), (ValaCCodeExpression*) _tmp13_);
                  _tmp15_ = _tmp14_;
                  _tmp16_ = vala_ccode_member_access_new_pointer (_tmp15_, var_name);
                  _tmp17_ = (ValaCCodeExpression*) _tmp16_;
                  _vala_ccode_node_unref0 (_tmp15_);
                  _vala_ccode_node_unref0 (_tmp13_);
                  _vala_ccode_node_unref0 (_tmp11_);
                  result = _tmp17_;
                  _g_free0 (var_name);
                  return result;
            } else {
                  ValaCCodeIdentifier* _tmp18_ = NULL;
                  _tmp18_ = vala_ccode_identifier_new (var_name);
                  result = (ValaCCodeExpression*) _tmp18_;
                  _g_free0 (var_name);
                  return result;
            }
            _g_free0 (var_name);
      } else {
            ValaTypeSymbol* _tmp19_ = NULL;
            gchar* _tmp20_ = NULL;
            gchar* _tmp21_;
            gchar* _tmp22_ = NULL;
            gchar* _tmp23_;
            ValaCCodeIdentifier* _tmp24_ = NULL;
            ValaCCodeIdentifier* _tmp25_;
            ValaCCodeFunctionCall* _tmp26_ = NULL;
            ValaCCodeFunctionCall* _tmp27_;
            ValaCCodeFunctionCall* ccall;
            ValaTypeSymbol* _tmp28_ = NULL;
            ValaTypeSymbol* _tmp29_;
            ValaObjectTypeSymbol* _tmp30_;
            ValaObjectTypeSymbol* object_type_symbol;
            _tmp19_ = vala_data_type_get_data_type (type);
            _tmp20_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) _tmp19_, NULL);
            _tmp21_ = _tmp20_;
            _tmp22_ = g_strdup_printf ("%s_type_get", _tmp21_);
            _tmp23_ = _tmp22_;
            _tmp24_ = vala_ccode_identifier_new (_tmp23_);
            _tmp25_ = _tmp24_;
            _tmp26_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp25_);
            _tmp27_ = _tmp26_;
            _vala_ccode_node_unref0 (_tmp25_);
            _g_free0 (_tmp23_);
            _g_free0 (_tmp21_);
            ccall = _tmp27_;
            _tmp28_ = vala_data_type_get_data_type (type);
            _tmp29_ = _tmp28_;
            _tmp30_ = _vala_code_node_ref0 (VALA_IS_OBJECT_TYPE_SYMBOL (_tmp29_) ? ((ValaObjectTypeSymbol*) _tmp29_) : NULL);
            object_type_symbol = _tmp30_;
            if (object_type_symbol != NULL) {
                  {
                        gint i;
                        i = 0;
                        {
                              gboolean _tmp31_;
                              _tmp31_ = TRUE;
                              while (TRUE) {
                                    ValaList* _tmp32_ = NULL;
                                    ValaList* _tmp33_;
                                    gint _tmp34_;
                                    gboolean _tmp35_;
                                    ValaList* _tmp36_ = NULL;
                                    ValaList* _tmp37_;
                                    gint _tmp38_;
                                    gboolean _tmp39_;
                                    if (!_tmp31_) {
                                          i++;
                                    }
                                    _tmp31_ = FALSE;
                                    _tmp32_ = vala_object_type_symbol_get_type_parameters (object_type_symbol);
                                    _tmp33_ = _tmp32_;
                                    _tmp34_ = vala_collection_get_size ((ValaCollection*) _tmp33_);
                                    _tmp35_ = !(i < _tmp34_);
                                    _vala_iterable_unref0 (_tmp33_);
                                    if (_tmp35_) {
                                          break;
                                    }
                                    _tmp36_ = vala_data_type_get_type_arguments (type);
                                    _tmp37_ = _tmp36_;
                                    _tmp38_ = vala_collection_get_size ((ValaCollection*) _tmp37_);
                                    _tmp39_ = _tmp38_ == 0;
                                    _vala_iterable_unref0 (_tmp37_);
                                    if (_tmp39_) {
                                          ValaCCodeConstant* _tmp40_ = NULL;
                                          ValaCCodeConstant* _tmp41_;
                                          _tmp40_ = vala_ccode_constant_new ("NULL");
                                          _tmp41_ = _tmp40_;
                                          vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp41_);
                                          _vala_ccode_node_unref0 (_tmp41_);
                                    } else {
                                          ValaList* _tmp42_ = NULL;
                                          ValaList* _tmp43_;
                                          gpointer _tmp44_ = NULL;
                                          ValaDataType* _tmp45_;
                                          ValaCCodeExpression* _tmp46_ = NULL;
                                          ValaCCodeExpression* _tmp47_;
                                          _tmp42_ = vala_data_type_get_type_arguments (type);
                                          _tmp43_ = _tmp42_;
                                          _tmp44_ = vala_list_get (_tmp43_, i);
                                          _tmp45_ = (ValaDataType*) _tmp44_;
                                          _tmp46_ = vala_dova_base_module_get_type_id_expression (self, _tmp45_, FALSE);
                                          _tmp47_ = _tmp46_;
                                          vala_ccode_function_call_add_argument (ccall, _tmp47_);
                                          _vala_ccode_node_unref0 (_tmp47_);
                                          _vala_code_node_unref0 (_tmp45_);
                                          _vala_iterable_unref0 (_tmp43_);
                                    }
                              }
                        }
                  }
            }
            result = (ValaCCodeExpression*) ccall;
            _vala_code_node_unref0 (object_type_symbol);
            return result;
      }
}


static ValaCCodeExpression* vala_dova_base_module_real_get_dup_func_expression (ValaDovaBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup) {
      ValaCCodeExpression* result = NULL;
      ValaTypeSymbol* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_data_type_get_data_type (type);
      if (_tmp0_ != NULL) {
            gchar* _tmp1_;
            gchar* dup_function;
            ValaTypeSymbol* _tmp2_ = NULL;
            gboolean _tmp3_;
            ValaCCodeIdentifier* _tmp9_ = NULL;
            _tmp1_ = g_strdup ("");
            dup_function = _tmp1_;
            _tmp2_ = vala_data_type_get_data_type (type);
            _tmp3_ = vala_typesymbol_is_reference_counting (_tmp2_);
            if (_tmp3_) {
                  ValaTypeSymbol* _tmp4_ = NULL;
                  gchar* _tmp5_ = NULL;
                  _tmp4_ = vala_data_type_get_data_type (type);
                  _tmp5_ = vala_typesymbol_get_ref_function (_tmp4_);
                  _g_free0 (dup_function);
                  dup_function = _tmp5_;
            } else {
                  if (VALA_IS_VALUE_TYPE (type)) {
                        ValaTypeSymbol* _tmp6_ = NULL;
                        gchar* _tmp7_ = NULL;
                        _tmp6_ = vala_data_type_get_data_type (type);
                        _tmp7_ = vala_typesymbol_get_dup_function (_tmp6_);
                        _g_free0 (dup_function);
                        dup_function = _tmp7_;
                        if (dup_function == NULL) {
                              gchar* _tmp8_;
                              _tmp8_ = g_strdup ("");
                              _g_free0 (dup_function);
                              dup_function = _tmp8_;
                        }
                  }
            }
            _tmp9_ = vala_ccode_identifier_new (dup_function);
            result = (ValaCCodeExpression*) _tmp9_;
            _g_free0 (dup_function);
            return result;
      } else {
            ValaTypeParameter* _tmp10_ = NULL;
            _tmp10_ = vala_data_type_get_type_parameter (type);
            if (_tmp10_ != NULL) {
                  result = NULL;
                  return result;
            } else {
                  if (VALA_IS_ARRAY_TYPE (type)) {
                        ValaCCodeIdentifier* _tmp11_ = NULL;
                        _tmp11_ = vala_ccode_identifier_new ("dova_object_ref");
                        result = (ValaCCodeExpression*) _tmp11_;
                        return result;
                  } else {
                        if (VALA_IS_DELEGATE_TYPE (type)) {
                              ValaCCodeIdentifier* _tmp12_ = NULL;
                              _tmp12_ = vala_ccode_identifier_new ("dova_object_ref");
                              result = (ValaCCodeExpression*) _tmp12_;
                              return result;
                        } else {
                              if (VALA_IS_POINTER_TYPE (type)) {
                                    ValaPointerType* _tmp13_;
                                    ValaPointerType* pointer_type;
                                    ValaDataType* _tmp14_ = NULL;
                                    ValaCCodeExpression* _tmp15_ = NULL;
                                    _tmp13_ = _vala_code_node_ref0 (VALA_POINTER_TYPE (type));
                                    pointer_type = _tmp13_;
                                    _tmp14_ = vala_pointer_type_get_base_type (pointer_type);
                                    _tmp15_ = vala_dova_base_module_get_dup_func_expression (self, _tmp14_, source_reference, FALSE);
                                    result = _tmp15_;
                                    _vala_code_node_unref0 (pointer_type);
                                    return result;
                              } else {
                                    ValaCCodeConstant* _tmp16_ = NULL;
                                    _tmp16_ = vala_ccode_constant_new ("NULL");
                                    result = (ValaCCodeExpression*) _tmp16_;
                                    return result;
                              }
                        }
                  }
            }
      }
}


ValaCCodeExpression* vala_dova_base_module_get_dup_func_expression (ValaDovaBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup) {
      return VALA_DOVA_BASE_MODULE_GET_CLASS (self)->get_dup_func_expression (self, type, source_reference, is_chainup);
}


ValaCCodeExpression* vala_dova_base_module_get_destroy_func_expression (ValaDovaBaseModule* self, ValaDataType* type, gboolean is_chainup) {
      ValaCCodeExpression* result = NULL;
      ValaTypeSymbol* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_data_type_get_data_type (type);
      if (_tmp0_ != NULL) {
            gchar* unref_function = NULL;
            ValaCCodeIdentifier* _tmp15_ = NULL;
            if (VALA_IS_REFERENCE_TYPE (type)) {
                  ValaTypeSymbol* _tmp1_ = NULL;
                  gboolean _tmp2_;
                  _tmp1_ = vala_data_type_get_data_type (type);
                  _tmp2_ = vala_typesymbol_is_reference_counting (_tmp1_);
                  if (_tmp2_) {
                        ValaTypeSymbol* _tmp3_ = NULL;
                        gchar* _tmp4_ = NULL;
                        _tmp3_ = vala_data_type_get_data_type (type);
                        _tmp4_ = vala_typesymbol_get_unref_function (_tmp3_);
                        _g_free0 (unref_function);
                        unref_function = _tmp4_;
                  } else {
                        ValaTypeSymbol* _tmp5_ = NULL;
                        gchar* _tmp6_ = NULL;
                        _tmp5_ = vala_data_type_get_data_type (type);
                        _tmp6_ = vala_typesymbol_get_free_function (_tmp5_);
                        _g_free0 (unref_function);
                        unref_function = _tmp6_;
                  }
            } else {
                  gboolean _tmp7_;
                  _tmp7_ = vala_data_type_get_nullable (type);
                  if (_tmp7_) {
                        ValaTypeSymbol* _tmp8_ = NULL;
                        gchar* _tmp9_ = NULL;
                        _tmp8_ = vala_data_type_get_data_type (type);
                        _tmp9_ = vala_typesymbol_get_free_function (_tmp8_);
                        _g_free0 (unref_function);
                        unref_function = _tmp9_;
                        if (unref_function == NULL) {
                              gchar* _tmp10_;
                              _tmp10_ = g_strdup ("free");
                              _g_free0 (unref_function);
                              unref_function = _tmp10_;
                        }
                  } else {
                        ValaTypeSymbol* _tmp11_ = NULL;
                        ValaStruct* _tmp12_;
                        ValaStruct* st;
                        gchar* _tmp13_ = NULL;
                        _tmp11_ = vala_data_type_get_data_type (type);
                        _tmp12_ = _vala_code_node_ref0 (VALA_STRUCT (_tmp11_));
                        st = _tmp12_;
                        _tmp13_ = vala_typesymbol_get_copy_function ((ValaTypeSymbol*) st);
                        _g_free0 (unref_function);
                        unref_function = _tmp13_;
                        _vala_code_node_unref0 (st);
                  }
            }
            if (unref_function == NULL) {
                  ValaCCodeConstant* _tmp14_ = NULL;
                  _tmp14_ = vala_ccode_constant_new ("NULL");
                  result = (ValaCCodeExpression*) _tmp14_;
                  _g_free0 (unref_function);
                  return result;
            }
            _tmp15_ = vala_ccode_identifier_new (unref_function);
            result = (ValaCCodeExpression*) _tmp15_;
            _g_free0 (unref_function);
            return result;
      } else {
            gboolean _tmp16_ = FALSE;
            ValaTypeParameter* _tmp17_ = NULL;
            _tmp17_ = vala_data_type_get_type_parameter (type);
            if (_tmp17_ != NULL) {
                  ValaTypeSymbol* _tmp18_ = NULL;
                  _tmp18_ = vala_dova_base_module_get_current_type_symbol (self);
                  _tmp16_ = VALA_IS_CLASS (_tmp18_);
            } else {
                  _tmp16_ = FALSE;
            }
            if (_tmp16_) {
                  ValaCCodeIdentifier* _tmp19_ = NULL;
                  _tmp19_ = vala_ccode_identifier_new ("dova_object_unref");
                  result = (ValaCCodeExpression*) _tmp19_;
                  return result;
            } else {
                  if (VALA_IS_ARRAY_TYPE (type)) {
                        ValaCCodeIdentifier* _tmp20_ = NULL;
                        _tmp20_ = vala_ccode_identifier_new ("dova_object_unref");
                        result = (ValaCCodeExpression*) _tmp20_;
                        return result;
                  } else {
                        if (VALA_IS_DELEGATE_TYPE (type)) {
                              ValaCCodeIdentifier* _tmp21_ = NULL;
                              _tmp21_ = vala_ccode_identifier_new ("dova_object_unref");
                              result = (ValaCCodeExpression*) _tmp21_;
                              return result;
                        } else {
                              if (VALA_IS_POINTER_TYPE (type)) {
                                    ValaCCodeIdentifier* _tmp22_ = NULL;
                                    _tmp22_ = vala_ccode_identifier_new ("free");
                                    result = (ValaCCodeExpression*) _tmp22_;
                                    return result;
                              } else {
                                    ValaCCodeConstant* _tmp23_ = NULL;
                                    _tmp23_ = vala_ccode_constant_new ("NULL");
                                    result = (ValaCCodeExpression*) _tmp23_;
                                    return result;
                              }
                        }
                  }
            }
      }
}


ValaCCodeExpression* vala_dova_base_module_get_unref_expression (ValaDovaBaseModule* self, ValaCCodeExpression* cvar, ValaDataType* type, ValaExpression* expr) {
      ValaCCodeExpression* result = NULL;
      ValaDovaValue* _tmp0_ = NULL;
      ValaDovaValue* _tmp1_;
      ValaCCodeExpression* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (cvar != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_dova_value_new (type, cvar);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_dova_base_module_destroy_value (self, (ValaTargetValue*) _tmp1_);
      _tmp3_ = _tmp2_;
      _vala_target_value_unref0 (_tmp1_);
      result = _tmp3_;
      return result;
}


ValaCCodeExpression* vala_dova_base_module_destroy_value (ValaDovaBaseModule* self, ValaTargetValue* value) {
      ValaCCodeExpression* result = NULL;
      ValaDataType* _tmp0_ = NULL;
      ValaDataType* _tmp1_;
      ValaDataType* type;
      ValaCCodeExpression* _tmp2_ = NULL;
      ValaCCodeExpression* cvar;
      ValaCCodeExpression* _tmp3_ = NULL;
      ValaCCodeExpression* _tmp4_;
      ValaCCodeFunctionCall* _tmp5_ = NULL;
      ValaCCodeFunctionCall* _tmp6_;
      ValaCCodeFunctionCall* ccall;
      gboolean _tmp7_ = FALSE;
      ValaCCodeConstant* _tmp17_ = NULL;
      ValaCCodeConstant* _tmp18_;
      ValaCCodeBinaryExpression* _tmp19_ = NULL;
      ValaCCodeBinaryExpression* _tmp20_;
      ValaCCodeBinaryExpression* cisnull;
      ValaTypeParameter* _tmp21_ = NULL;
      ValaCCodeCommaExpression* _tmp34_ = NULL;
      ValaCCodeCommaExpression* ccomma;
      ValaCCodeConstant* _tmp35_ = NULL;
      ValaCCodeConstant* _tmp36_;
      ValaCCodeAssignment* _tmp37_ = NULL;
      ValaCCodeAssignment* cassign;
      ValaCCodeConstant* _tmp38_ = NULL;
      ValaCCodeConstant* _tmp39_;
      ValaCCodeConditionalExpression* _tmp40_ = NULL;
      ValaCCodeExpression* _tmp41_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (value != NULL, NULL);
      _tmp0_ = vala_target_value_get_value_type (value);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      type = _tmp1_;
      _tmp2_ = vala_dova_base_module_get_cvalue_ (self, value);
      cvar = _tmp2_;
      _tmp3_ = vala_dova_base_module_get_destroy_func_expression (self, type, FALSE);
      _tmp4_ = _tmp3_;
      _tmp5_ = vala_ccode_function_call_new (_tmp4_);
      _tmp6_ = _tmp5_;
      _vala_ccode_node_unref0 (_tmp4_);
      ccall = _tmp6_;
      if (VALA_IS_VALUE_TYPE (type)) {
            gboolean _tmp8_;
            _tmp8_ = vala_data_type_get_nullable (type);
            _tmp7_ = !_tmp8_;
      } else {
            _tmp7_ = FALSE;
      }
      if (_tmp7_) {
            ValaCCodeUnaryExpression* _tmp9_ = NULL;
            ValaCCodeUnaryExpression* _tmp10_;
            ValaCCodeConstant* _tmp11_ = NULL;
            ValaCCodeConstant* _tmp12_;
            ValaCCodeConstant* _tmp13_ = NULL;
            ValaCCodeConstant* _tmp14_;
            ValaCCodeConstant* _tmp15_ = NULL;
            ValaCCodeConstant* _tmp16_;
            _tmp9_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cvar);
            _tmp10_ = _tmp9_;
            vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp10_);
            _vala_ccode_node_unref0 (_tmp10_);
            _tmp11_ = vala_ccode_constant_new ("0");
            _tmp12_ = _tmp11_;
            vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp12_);
            _vala_ccode_node_unref0 (_tmp12_);
            _tmp13_ = vala_ccode_constant_new ("NULL");
            _tmp14_ = _tmp13_;
            vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp14_);
            _vala_ccode_node_unref0 (_tmp14_);
            _tmp15_ = vala_ccode_constant_new ("0");
            _tmp16_ = _tmp15_;
            vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp16_);
            _vala_ccode_node_unref0 (_tmp16_);
            result = (ValaCCodeExpression*) ccall;
            _vala_ccode_node_unref0 (cvar);
            _vala_code_node_unref0 (type);
            return result;
      }
      _tmp17_ = vala_ccode_constant_new ("NULL");
      _tmp18_ = _tmp17_;
      _tmp19_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, cvar, (ValaCCodeExpression*) _tmp18_);
      _tmp20_ = _tmp19_;
      _vala_ccode_node_unref0 (_tmp18_);
      cisnull = _tmp20_;
      _tmp21_ = vala_data_type_get_type_parameter (type);
      if (_tmp21_ != NULL) {
            gboolean _tmp22_ = FALSE;
            ValaTypeSymbol* _tmp23_ = NULL;
            ValaCCodeExpression* _tmp27_ = NULL;
            ValaCCodeExpression* _tmp28_;
            ValaCCodeConstant* _tmp29_ = NULL;
            ValaCCodeConstant* _tmp30_;
            ValaCCodeBinaryExpression* _tmp31_ = NULL;
            ValaCCodeBinaryExpression* _tmp32_;
            ValaCCodeBinaryExpression* cunrefisnull;
            ValaCCodeBinaryExpression* _tmp33_ = NULL;
            _tmp23_ = vala_dova_base_module_get_current_type_symbol (self);
            if (!VALA_IS_CLASS (_tmp23_)) {
                  _tmp22_ = TRUE;
            } else {
                  ValaClass* _tmp24_ = NULL;
                  gboolean _tmp25_;
                  _tmp24_ = vala_dova_base_module_get_current_class (self);
                  _tmp25_ = vala_class_get_is_compact (_tmp24_);
                  _tmp22_ = _tmp25_;
            }
            if (_tmp22_) {
                  ValaCCodeConstant* _tmp26_ = NULL;
                  _tmp26_ = vala_ccode_constant_new ("NULL");
                  result = (ValaCCodeExpression*) _tmp26_;
                  _vala_ccode_node_unref0 (cisnull);
                  _vala_ccode_node_unref0 (ccall);
                  _vala_ccode_node_unref0 (cvar);
                  _vala_code_node_unref0 (type);
                  return result;
            }
            _tmp27_ = vala_dova_base_module_get_destroy_func_expression (self, type, FALSE);
            _tmp28_ = _tmp27_;
            _tmp29_ = vala_ccode_constant_new ("NULL");
            _tmp30_ = _tmp29_;
            _tmp31_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, _tmp28_, (ValaCCodeExpression*) _tmp30_);
            _tmp32_ = _tmp31_;
            _vala_ccode_node_unref0 (_tmp30_);
            _vala_ccode_node_unref0 (_tmp28_);
            cunrefisnull = _tmp32_;
            _tmp33_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) cunrefisnull);
            _vala_ccode_node_unref0 (cisnull);
            cisnull = _tmp33_;
            _vala_ccode_node_unref0 (cunrefisnull);
      }
      vala_ccode_function_call_add_argument (ccall, cvar);
      _tmp34_ = vala_ccode_comma_expression_new ();
      ccomma = _tmp34_;
      vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) ccall);
      _tmp35_ = vala_ccode_constant_new ("NULL");
      _tmp36_ = _tmp35_;
      vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp36_);
      _vala_ccode_node_unref0 (_tmp36_);
      _tmp37_ = vala_ccode_assignment_new (cvar, (ValaCCodeExpression*) ccomma, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      cassign = _tmp37_;
      _tmp38_ = vala_ccode_constant_new ("NULL");
      _tmp39_ = _tmp38_;
      _tmp40_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) _tmp39_, (ValaCCodeExpression*) cassign);
      _tmp41_ = (ValaCCodeExpression*) _tmp40_;
      _vala_ccode_node_unref0 (_tmp39_);
      result = _tmp41_;
      _vala_ccode_node_unref0 (cassign);
      _vala_ccode_node_unref0 (ccomma);
      _vala_ccode_node_unref0 (cisnull);
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (cvar);
      _vala_code_node_unref0 (type);
      return result;
}


static void vala_dova_base_module_real_visit_end_full_expression (ValaCodeVisitor* base, ValaExpression* expr) {
      ValaDovaBaseModule * self;
      ValaArrayList* _tmp0_ = NULL;
      gint _tmp1_;
      ValaDataType* _tmp2_ = NULL;
      ValaDataType* _tmp3_;
      ValaDataType* expr_type;
      ValaDataType* _tmp4_ = NULL;
      ValaLocalVariable* _tmp7_ = NULL;
      ValaLocalVariable* full_expr_var;
      ValaCCodeCommaExpression* _tmp8_ = NULL;
      ValaCCodeCommaExpression* expr_list;
      const gchar* _tmp9_ = NULL;
      ValaCCodeExpression* _tmp10_ = NULL;
      ValaCCodeExpression* _tmp11_;
      ValaCCodeExpression* _tmp12_ = NULL;
      ValaCCodeExpression* _tmp13_;
      ValaCCodeAssignment* _tmp14_ = NULL;
      ValaCCodeAssignment* _tmp15_;
      const gchar* _tmp28_ = NULL;
      ValaCCodeExpression* _tmp29_ = NULL;
      ValaCCodeExpression* _tmp30_;
      ValaArrayList* _tmp31_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_dova_base_module_get_temp_ref_vars (self);
      _tmp1_ = vala_collection_get_size ((ValaCollection*) VALA_LIST (_tmp0_));
      if (_tmp1_ == 0) {
            return;
      }
      _tmp2_ = vala_expression_get_value_type (expr);
      _tmp3_ = _vala_code_node_ref0 (_tmp2_);
      expr_type = _tmp3_;
      _tmp4_ = vala_expression_get_target_type (expr);
      if (_tmp4_ != NULL) {
            ValaDataType* _tmp5_ = NULL;
            ValaDataType* _tmp6_;
            _tmp5_ = vala_expression_get_target_type (expr);
            _tmp6_ = _vala_code_node_ref0 (_tmp5_);
            _vala_code_node_unref0 (expr_type);
            expr_type = _tmp6_;
      }
      _tmp7_ = vala_dova_base_module_get_temp_variable (self, expr_type, TRUE, (ValaCodeNode*) expr);
      full_expr_var = _tmp7_;
      vala_dova_base_module_emit_temp_var (self, full_expr_var);
      _tmp8_ = vala_ccode_comma_expression_new ();
      expr_list = _tmp8_;
      _tmp9_ = vala_symbol_get_name ((ValaSymbol*) full_expr_var);
      _tmp10_ = vala_dova_base_module_get_variable_cexpression (self, _tmp9_);
      _tmp11_ = _tmp10_;
      _tmp12_ = vala_dova_base_module_get_cvalue (self, expr);
      _tmp13_ = _tmp12_;
      _tmp14_ = vala_ccode_assignment_new (_tmp11_, _tmp13_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp15_ = _tmp14_;
      vala_ccode_comma_expression_append_expression (expr_list, (ValaCCodeExpression*) _tmp15_);
      _vala_ccode_node_unref0 (_tmp15_);
      _vala_ccode_node_unref0 (_tmp13_);
      _vala_ccode_node_unref0 (_tmp11_);
      {
            ValaArrayList* _tmp16_ = NULL;
            ValaArrayList* _tmp17_;
            ValaArrayList* _local_list;
            gint _tmp18_;
            gint _local_size;
            gint _local_index;
            _tmp16_ = vala_dova_base_module_get_temp_ref_vars (self);
            _tmp17_ = _vala_iterable_ref0 (_tmp16_);
            _local_list = _tmp17_;
            _tmp18_ = vala_collection_get_size ((ValaCollection*) _local_list);
            _local_size = _tmp18_;
            _local_index = -1;
            while (TRUE) {
                  gpointer _tmp19_ = NULL;
                  ValaLocalVariable* local;
                  const gchar* _tmp20_ = NULL;
                  ValaMemberAccess* _tmp21_ = NULL;
                  ValaMemberAccess* ma;
                  const gchar* _tmp22_ = NULL;
                  ValaCCodeExpression* _tmp23_ = NULL;
                  ValaCCodeExpression* _tmp24_;
                  ValaDataType* _tmp25_ = NULL;
                  ValaCCodeExpression* _tmp26_ = NULL;
                  ValaCCodeExpression* _tmp27_;
                  _local_index = _local_index + 1;
                  if (!(_local_index < _local_size)) {
                        break;
                  }
                  _tmp19_ = vala_list_get ((ValaList*) _local_list, _local_index);
                  local = (ValaLocalVariable*) _tmp19_;
                  _tmp20_ = vala_symbol_get_name ((ValaSymbol*) local);
                  _tmp21_ = vala_member_access_new_simple (_tmp20_, NULL);
                  ma = _tmp21_;
                  vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
                  _tmp22_ = vala_symbol_get_name ((ValaSymbol*) local);
                  _tmp23_ = vala_dova_base_module_get_variable_cexpression (self, _tmp22_);
                  _tmp24_ = _tmp23_;
                  _tmp25_ = vala_variable_get_variable_type ((ValaVariable*) local);
                  _tmp26_ = vala_dova_base_module_get_unref_expression (self, _tmp24_, _tmp25_, (ValaExpression*) ma);
                  _tmp27_ = _tmp26_;
                  vala_ccode_comma_expression_append_expression (expr_list, _tmp27_);
                  _vala_ccode_node_unref0 (_tmp27_);
                  _vala_ccode_node_unref0 (_tmp24_);
                  _vala_code_node_unref0 (ma);
                  _vala_code_node_unref0 (local);
            }
            _vala_iterable_unref0 (_local_list);
      }
      _tmp28_ = vala_symbol_get_name ((ValaSymbol*) full_expr_var);
      _tmp29_ = vala_dova_base_module_get_variable_cexpression (self, _tmp28_);
      _tmp30_ = _tmp29_;
      vala_ccode_comma_expression_append_expression (expr_list, _tmp30_);
      _vala_ccode_node_unref0 (_tmp30_);
      vala_dova_base_module_set_cvalue (self, expr, (ValaCCodeExpression*) expr_list);
      _tmp31_ = vala_dova_base_module_get_temp_ref_vars (self);
      vala_collection_clear ((ValaCollection*) _tmp31_);
      _vala_ccode_node_unref0 (expr_list);
      _vala_code_node_unref0 (full_expr_var);
      _vala_code_node_unref0 (expr_type);
}


void vala_dova_base_module_emit_temp_var (ValaDovaBaseModule* self, ValaLocalVariable* local) {
      ValaDataType* _tmp0_ = NULL;
      gchar* _tmp1_ = NULL;
      gchar* _tmp2_;
      ValaCCodeDeclaration* _tmp3_ = NULL;
      ValaCCodeDeclaration* _tmp4_;
      ValaCCodeDeclaration* _cdecl_;
      const gchar* _tmp5_ = NULL;
      ValaDataType* _tmp6_ = NULL;
      gchar* _tmp7_ = NULL;
      gchar* _tmp8_;
      ValaCCodeVariableDeclarator* _tmp9_ = NULL;
      ValaCCodeVariableDeclarator* _tmp10_;
      ValaCCodeVariableDeclarator* vardecl;
      ValaDataType* _tmp11_ = NULL;
      ValaTypeSymbol* _tmp12_ = NULL;
      ValaTypeSymbol* _tmp13_;
      ValaStruct* _tmp14_;
      ValaStruct* st;
      ValaDataType* _tmp15_ = NULL;
      ValaDataType* _tmp16_;
      ValaArrayType* _tmp17_;
      ValaArrayType* array_type;
      const gchar* _tmp18_ = NULL;
      gboolean _tmp19_;
      ValaCCodeFunction* _tmp58_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (local != NULL);
      _tmp0_ = vala_variable_get_variable_type ((ValaVariable*) local);
      _tmp1_ = vala_data_type_get_cname (_tmp0_);
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_ccode_declaration_new (_tmp2_);
      _tmp4_ = _tmp3_;
      _g_free0 (_tmp2_);
      _cdecl_ = _tmp4_;
      _tmp5_ = vala_symbol_get_name ((ValaSymbol*) local);
      _tmp6_ = vala_variable_get_variable_type ((ValaVariable*) local);
      _tmp7_ = vala_data_type_get_cdeclarator_suffix (_tmp6_);
      _tmp8_ = _tmp7_;
      _tmp9_ = vala_ccode_variable_declarator_new (_tmp5_, NULL, _tmp8_);
      _tmp10_ = _tmp9_;
      _g_free0 (_tmp8_);
      vardecl = _tmp10_;
      vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) vardecl);
      _tmp11_ = vala_variable_get_variable_type ((ValaVariable*) local);
      _tmp12_ = vala_data_type_get_data_type (_tmp11_);
      _tmp13_ = _tmp12_;
      _tmp14_ = _vala_code_node_ref0 (VALA_IS_STRUCT (_tmp13_) ? ((ValaStruct*) _tmp13_) : NULL);
      st = _tmp14_;
      _tmp15_ = vala_variable_get_variable_type ((ValaVariable*) local);
      _tmp16_ = _tmp15_;
      _tmp17_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp16_) ? ((ValaArrayType*) _tmp16_) : NULL);
      array_type = _tmp17_;
      _tmp18_ = vala_symbol_get_name ((ValaSymbol*) local);
      _tmp19_ = g_str_has_prefix (_tmp18_, "*");
      if (_tmp19_) {
      } else {
            ValaDataType* _tmp20_ = NULL;
            _tmp20_ = vala_variable_get_variable_type ((ValaVariable*) local);
            if (VALA_IS_GENERIC_TYPE (_tmp20_)) {
                  ValaCCodeIdentifier* _tmp21_ = NULL;
                  ValaCCodeIdentifier* _tmp22_;
                  ValaCCodeFunctionCall* _tmp23_ = NULL;
                  ValaCCodeFunctionCall* _tmp24_;
                  ValaCCodeFunctionCall* value_size;
                  ValaDataType* _tmp25_ = NULL;
                  ValaCCodeExpression* _tmp26_ = NULL;
                  ValaCCodeExpression* _tmp27_;
                  ValaCCodeIdentifier* _tmp28_ = NULL;
                  ValaCCodeIdentifier* _tmp29_;
                  ValaCCodeFunctionCall* _tmp30_ = NULL;
                  ValaCCodeFunctionCall* _tmp31_;
                  ValaCCodeFunctionCall* alloca_call;
                  ValaCCodeIdentifier* _tmp32_ = NULL;
                  ValaCCodeIdentifier* _tmp33_;
                  ValaCCodeFunctionCall* _tmp34_ = NULL;
                  ValaCCodeFunctionCall* _tmp35_;
                  ValaCCodeFunctionCall* memset_call;
                  ValaCCodeConstant* _tmp36_ = NULL;
                  ValaCCodeConstant* _tmp37_;
                  _tmp21_ = vala_ccode_identifier_new ("dova_type_get_value_size");
                  _tmp22_ = _tmp21_;
                  _tmp23_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp22_);
                  _tmp24_ = _tmp23_;
                  _vala_ccode_node_unref0 (_tmp22_);
                  value_size = _tmp24_;
                  _tmp25_ = vala_variable_get_variable_type ((ValaVariable*) local);
                  _tmp26_ = vala_dova_base_module_get_type_id_expression (self, _tmp25_, FALSE);
                  _tmp27_ = _tmp26_;
                  vala_ccode_function_call_add_argument (value_size, _tmp27_);
                  _vala_ccode_node_unref0 (_tmp27_);
                  _tmp28_ = vala_ccode_identifier_new ("alloca");
                  _tmp29_ = _tmp28_;
                  _tmp30_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp29_);
                  _tmp31_ = _tmp30_;
                  _vala_ccode_node_unref0 (_tmp29_);
                  alloca_call = _tmp31_;
                  vala_ccode_function_call_add_argument (alloca_call, (ValaCCodeExpression*) value_size);
                  _tmp32_ = vala_ccode_identifier_new ("memset");
                  _tmp33_ = _tmp32_;
                  _tmp34_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp33_);
                  _tmp35_ = _tmp34_;
                  _vala_ccode_node_unref0 (_tmp33_);
                  memset_call = _tmp35_;
                  vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) alloca_call);
                  _tmp36_ = vala_ccode_constant_new ("0");
                  _tmp37_ = _tmp36_;
                  vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) _tmp37_);
                  _vala_ccode_node_unref0 (_tmp37_);
                  vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) value_size);
                  vala_ccode_variable_declarator_set_initializer (vardecl, (ValaCCodeExpression*) memset_call);
                  vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
                  _vala_ccode_node_unref0 (memset_call);
                  _vala_ccode_node_unref0 (alloca_call);
                  _vala_ccode_node_unref0 (value_size);
            } else {
                  gboolean _tmp38_ = FALSE;
                  gboolean _tmp39_ = FALSE;
                  ValaDataType* _tmp40_ = NULL;
                  gboolean _tmp41_;
                  _tmp40_ = vala_variable_get_variable_type ((ValaVariable*) local);
                  _tmp41_ = vala_data_type_get_nullable (_tmp40_);
                  if (!_tmp41_) {
                        gboolean _tmp42_ = FALSE;
                        if (st != NULL) {
                              ValaList* _tmp43_ = NULL;
                              ValaList* _tmp44_;
                              gint _tmp45_;
                              _tmp43_ = vala_struct_get_fields (st);
                              _tmp44_ = _tmp43_;
                              _tmp45_ = vala_collection_get_size ((ValaCollection*) _tmp44_);
                              _tmp42_ = _tmp45_ > 0;
                              _vala_iterable_unref0 (_tmp44_);
                        } else {
                              _tmp42_ = FALSE;
                        }
                        _tmp39_ = _tmp42_;
                  } else {
                        _tmp39_ = FALSE;
                  }
                  if (_tmp39_) {
                        _tmp38_ = TRUE;
                  } else {
                        gboolean _tmp46_ = FALSE;
                        if (array_type != NULL) {
                              gboolean _tmp47_;
                              _tmp47_ = vala_array_type_get_fixed_length (array_type);
                              _tmp46_ = _tmp47_;
                        } else {
                              _tmp46_ = FALSE;
                        }
                        _tmp38_ = _tmp46_;
                  }
                  if (_tmp38_) {
                        ValaCCodeInitializerList* _tmp48_ = NULL;
                        ValaCCodeInitializerList* clist;
                        ValaCCodeConstant* _tmp49_ = NULL;
                        ValaCCodeConstant* _tmp50_;
                        _tmp48_ = vala_ccode_initializer_list_new ();
                        clist = _tmp48_;
                        _tmp49_ = vala_ccode_constant_new ("0");
                        _tmp50_ = _tmp49_;
                        vala_ccode_initializer_list_append (clist, (ValaCCodeExpression*) _tmp50_);
                        _vala_ccode_node_unref0 (_tmp50_);
                        vala_ccode_variable_declarator_set_initializer (vardecl, (ValaCCodeExpression*) clist);
                        vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
                        _vala_ccode_node_unref0 (clist);
                  } else {
                        gboolean _tmp51_ = FALSE;
                        ValaDataType* _tmp52_ = NULL;
                        gboolean _tmp53_;
                        _tmp52_ = vala_variable_get_variable_type ((ValaVariable*) local);
                        _tmp53_ = vala_data_type_is_reference_type_or_type_parameter (_tmp52_);
                        if (_tmp53_) {
                              _tmp51_ = TRUE;
                        } else {
                              ValaDataType* _tmp54_ = NULL;
                              gboolean _tmp55_;
                              _tmp54_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              _tmp55_ = vala_data_type_get_nullable (_tmp54_);
                              _tmp51_ = _tmp55_;
                        }
                        if (_tmp51_) {
                              ValaCCodeConstant* _tmp56_ = NULL;
                              ValaCCodeConstant* _tmp57_;
                              _tmp56_ = vala_ccode_constant_new ("NULL");
                              _tmp57_ = _tmp56_;
                              vala_ccode_variable_declarator_set_initializer (vardecl, (ValaCCodeExpression*) _tmp57_);
                              _vala_ccode_node_unref0 (_tmp57_);
                              vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
                        }
                  }
            }
      }
      _tmp58_ = vala_dova_base_module_get_ccode (self);
      vala_ccode_function_add_statement (_tmp58_, (ValaCCodeNode*) _cdecl_);
      _vala_code_node_unref0 (array_type);
      _vala_code_node_unref0 (st);
      _vala_ccode_node_unref0 (vardecl);
      _vala_ccode_node_unref0 (_cdecl_);
}


static void vala_dova_base_module_real_visit_expression_statement (ValaCodeVisitor* base, ValaExpressionStatement* stmt) {
      ValaDovaBaseModule * self;
      ValaExpression* _tmp0_ = NULL;
      gboolean _tmp1_;
      ValaExpression* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_ = NULL;
      ValaCCodeExpression* _tmp4_;
      gboolean _tmp5_;
      gboolean _tmp26_ = FALSE;
      gboolean _tmp27_;
      ValaArrayList* _tmp31_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_expression_statement_get_expression (stmt);
      _tmp1_ = vala_code_node_get_error ((ValaCodeNode*) _tmp0_);
      if (_tmp1_) {
            vala_code_node_set_error ((ValaCodeNode*) stmt, TRUE);
            return;
      }
      _tmp2_ = vala_expression_statement_get_expression (stmt);
      _tmp3_ = vala_dova_base_module_get_cvalue (self, _tmp2_);
      _tmp4_ = _tmp3_;
      _tmp5_ = _tmp4_ != NULL;
      _vala_ccode_node_unref0 (_tmp4_);
      if (_tmp5_) {
            ValaCCodeFunction* _tmp6_ = NULL;
            ValaExpression* _tmp7_ = NULL;
            ValaCCodeExpression* _tmp8_ = NULL;
            ValaCCodeExpression* _tmp9_;
            _tmp6_ = vala_dova_base_module_get_ccode (self);
            _tmp7_ = vala_expression_statement_get_expression (stmt);
            _tmp8_ = vala_dova_base_module_get_cvalue (self, _tmp7_);
            _tmp9_ = _tmp8_;
            vala_ccode_function_add_expression (_tmp6_, _tmp9_);
            _vala_ccode_node_unref0 (_tmp9_);
      }
      {
            ValaArrayList* _tmp10_ = NULL;
            ValaArrayList* _tmp11_;
            ValaArrayList* _local_list;
            gint _tmp12_;
            gint _local_size;
            gint _local_index;
            _tmp10_ = vala_dova_base_module_get_temp_ref_vars (self);
            _tmp11_ = _vala_iterable_ref0 (_tmp10_);
            _local_list = _tmp11_;
            _tmp12_ = vala_collection_get_size ((ValaCollection*) _local_list);
            _local_size = _tmp12_;
            _local_index = -1;
            while (TRUE) {
                  gpointer _tmp13_ = NULL;
                  ValaLocalVariable* local;
                  const gchar* _tmp14_ = NULL;
                  ValaMemberAccess* _tmp15_ = NULL;
                  ValaMemberAccess* ma;
                  ValaDataType* _tmp16_ = NULL;
                  ValaDataType* _tmp17_ = NULL;
                  ValaDataType* _tmp18_;
                  ValaCCodeFunction* _tmp19_ = NULL;
                  const gchar* _tmp20_ = NULL;
                  ValaCCodeExpression* _tmp21_ = NULL;
                  ValaCCodeExpression* _tmp22_;
                  ValaDataType* _tmp23_ = NULL;
                  ValaCCodeExpression* _tmp24_ = NULL;
                  ValaCCodeExpression* _tmp25_;
                  _local_index = _local_index + 1;
                  if (!(_local_index < _local_size)) {
                        break;
                  }
                  _tmp13_ = vala_list_get ((ValaList*) _local_list, _local_index);
                  local = (ValaLocalVariable*) _tmp13_;
                  _tmp14_ = vala_symbol_get_name ((ValaSymbol*) local);
                  _tmp15_ = vala_member_access_new_simple (_tmp14_, NULL);
                  ma = _tmp15_;
                  vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
                  _tmp16_ = vala_variable_get_variable_type ((ValaVariable*) local);
                  _tmp17_ = vala_data_type_copy (_tmp16_);
                  _tmp18_ = _tmp17_;
                  vala_expression_set_value_type ((ValaExpression*) ma, _tmp18_);
                  _vala_code_node_unref0 (_tmp18_);
                  _tmp19_ = vala_dova_base_module_get_ccode (self);
                  _tmp20_ = vala_symbol_get_name ((ValaSymbol*) local);
                  _tmp21_ = vala_dova_base_module_get_variable_cexpression (self, _tmp20_);
                  _tmp22_ = _tmp21_;
                  _tmp23_ = vala_variable_get_variable_type ((ValaVariable*) local);
                  _tmp24_ = vala_dova_base_module_get_unref_expression (self, _tmp22_, _tmp23_, (ValaExpression*) ma);
                  _tmp25_ = _tmp24_;
                  vala_ccode_function_add_expression (_tmp19_, _tmp25_);
                  _vala_ccode_node_unref0 (_tmp25_);
                  _vala_ccode_node_unref0 (_tmp22_);
                  _vala_code_node_unref0 (ma);
                  _vala_code_node_unref0 (local);
            }
            _vala_iterable_unref0 (_local_list);
      }
      _tmp27_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) stmt);
      if (_tmp27_) {
            ValaExpression* _tmp28_ = NULL;
            gboolean _tmp29_;
            _tmp28_ = vala_expression_statement_get_expression (stmt);
            _tmp29_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) _tmp28_);
            _tmp26_ = _tmp29_;
      } else {
            _tmp26_ = FALSE;
      }
      if (_tmp26_) {
            ValaExpression* _tmp30_ = NULL;
            _tmp30_ = vala_expression_statement_get_expression (stmt);
            vala_dova_base_module_add_simple_check (self, (ValaCodeNode*) _tmp30_, FALSE);
      }
      _tmp31_ = vala_dova_base_module_get_temp_ref_vars (self);
      vala_collection_clear ((ValaCollection*) _tmp31_);
}


static void vala_dova_base_module_real_append_local_free (ValaDovaBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at) {
      ValaBlock* _tmp0_;
      ValaBlock* b;
      ValaList* _tmp1_ = NULL;
      ValaList* local_vars;
      gboolean _tmp22_;
      ValaCodeNode* _tmp38_ = NULL;
      ValaSymbol* _tmp39_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (sym != NULL);
      _tmp0_ = _vala_code_node_ref0 (VALA_BLOCK (sym));
      b = _tmp0_;
      _tmp1_ = vala_block_get_local_variables (b);
      local_vars = _tmp1_;
      {
            gint _tmp2_;
            gint i;
            _tmp2_ = vala_collection_get_size ((ValaCollection*) local_vars);
            i = _tmp2_ - 1;
            {
                  gboolean _tmp3_;
                  _tmp3_ = TRUE;
                  while (TRUE) {
                        gpointer _tmp4_ = NULL;
                        ValaLocalVariable* local;
                        gboolean _tmp5_ = FALSE;
                        gboolean _tmp6_ = FALSE;
                        gboolean _tmp7_ = FALSE;
                        gboolean _tmp8_;
                        if (!_tmp3_) {
                              i--;
                        }
                        _tmp3_ = FALSE;
                        if (!(i >= 0)) {
                              break;
                        }
                        _tmp4_ = vala_list_get (local_vars, i);
                        local = (ValaLocalVariable*) _tmp4_;
                        _tmp8_ = vala_symbol_get_active ((ValaSymbol*) local);
                        if (_tmp8_) {
                              gboolean _tmp9_;
                              _tmp9_ = vala_local_variable_get_floating (local);
                              _tmp7_ = !_tmp9_;
                        } else {
                              _tmp7_ = FALSE;
                        }
                        if (_tmp7_) {
                              gboolean _tmp10_;
                              _tmp10_ = vala_local_variable_get_captured (local);
                              _tmp6_ = !_tmp10_;
                        } else {
                              _tmp6_ = FALSE;
                        }
                        if (_tmp6_) {
                              ValaDataType* _tmp11_ = NULL;
                              gboolean _tmp12_;
                              _tmp11_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              _tmp12_ = vala_dova_base_module_requires_destroy (self, _tmp11_);
                              _tmp5_ = _tmp12_;
                        } else {
                              _tmp5_ = FALSE;
                        }
                        if (_tmp5_) {
                              const gchar* _tmp13_ = NULL;
                              ValaMemberAccess* _tmp14_ = NULL;
                              ValaMemberAccess* ma;
                              ValaCCodeFunction* _tmp15_ = NULL;
                              const gchar* _tmp16_ = NULL;
                              ValaCCodeExpression* _tmp17_ = NULL;
                              ValaCCodeExpression* _tmp18_;
                              ValaDataType* _tmp19_ = NULL;
                              ValaCCodeExpression* _tmp20_ = NULL;
                              ValaCCodeExpression* _tmp21_;
                              _tmp13_ = vala_symbol_get_name ((ValaSymbol*) local);
                              _tmp14_ = vala_member_access_new_simple (_tmp13_, NULL);
                              ma = _tmp14_;
                              vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
                              _tmp15_ = vala_dova_base_module_get_ccode (self);
                              _tmp16_ = vala_symbol_get_name ((ValaSymbol*) local);
                              _tmp17_ = vala_dova_base_module_get_variable_cexpression (self, _tmp16_);
                              _tmp18_ = _tmp17_;
                              _tmp19_ = vala_variable_get_variable_type ((ValaVariable*) local);
                              _tmp20_ = vala_dova_base_module_get_unref_expression (self, _tmp18_, _tmp19_, (ValaExpression*) ma);
                              _tmp21_ = _tmp20_;
                              vala_ccode_function_add_expression (_tmp15_, _tmp21_);
                              _vala_ccode_node_unref0 (_tmp21_);
                              _vala_ccode_node_unref0 (_tmp18_);
                              _vala_code_node_unref0 (ma);
                        }
                        _vala_code_node_unref0 (local);
                  }
            }
      }
      _tmp22_ = vala_block_get_captured (b);
      if (_tmp22_) {
            gint _tmp23_;
            gint block_id;
            ValaCCodeIdentifier* _tmp24_ = NULL;
            ValaCCodeIdentifier* _tmp25_;
            ValaCCodeFunctionCall* _tmp26_ = NULL;
            ValaCCodeFunctionCall* _tmp27_;
            ValaCCodeFunctionCall* data_unref;
            gchar* _tmp28_ = NULL;
            gchar* _tmp29_;
            ValaCCodeExpression* _tmp30_ = NULL;
            ValaCCodeExpression* _tmp31_;
            ValaCCodeFunction* _tmp32_ = NULL;
            _tmp23_ = vala_dova_base_module_get_block_id (self, b);
            block_id = _tmp23_;
            _tmp24_ = vala_ccode_identifier_new ("dova_object_unref");
            _tmp25_ = _tmp24_;
            _tmp26_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp25_);
            _tmp27_ = _tmp26_;
            _vala_ccode_node_unref0 (_tmp25_);
            data_unref = _tmp27_;
            _tmp28_ = g_strdup_printf ("_data%d_", block_id);
            _tmp29_ = _tmp28_;
            _tmp30_ = vala_dova_base_module_get_variable_cexpression (self, _tmp29_);
            _tmp31_ = _tmp30_;
            vala_ccode_function_call_add_argument (data_unref, _tmp31_);
            _vala_ccode_node_unref0 (_tmp31_);
            _g_free0 (_tmp29_);
            _tmp32_ = vala_dova_base_module_get_ccode (self);
            vala_ccode_function_add_expression (_tmp32_, (ValaCCodeExpression*) data_unref);
            _vala_ccode_node_unref0 (data_unref);
      }
      if (stop_at_loop) {
            gboolean _tmp33_ = FALSE;
            gboolean _tmp34_ = FALSE;
            ValaCodeNode* _tmp35_ = NULL;
            _tmp35_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
            if (VALA_IS_LOOP (_tmp35_)) {
                  _tmp34_ = TRUE;
            } else {
                  ValaCodeNode* _tmp36_ = NULL;
                  _tmp36_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
                  _tmp34_ = VALA_IS_FOREACH_STATEMENT (_tmp36_);
            }
            if (_tmp34_) {
                  _tmp33_ = TRUE;
            } else {
                  ValaCodeNode* _tmp37_ = NULL;
                  _tmp37_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
                  _tmp33_ = VALA_IS_SWITCH_STATEMENT (_tmp37_);
            }
            if (_tmp33_) {
                  _vala_iterable_unref0 (local_vars);
                  _vala_code_node_unref0 (b);
                  return;
            }
      }
      _tmp38_ = vala_code_node_get_parent_node ((ValaCodeNode*) b);
      if (_tmp38_ == stop_at) {
            _vala_iterable_unref0 (local_vars);
            _vala_code_node_unref0 (b);
            return;
      }
      _tmp39_ = vala_symbol_get_parent_symbol (sym);
      if (VALA_IS_BLOCK (_tmp39_)) {
            ValaSymbol* _tmp40_ = NULL;
            _tmp40_ = vala_symbol_get_parent_symbol (sym);
            vala_dova_base_module_append_local_free (self, _tmp40_, stop_at_loop, stop_at);
      } else {
            ValaSymbol* _tmp41_ = NULL;
            _tmp41_ = vala_symbol_get_parent_symbol (sym);
            if (VALA_IS_METHOD (_tmp41_)) {
                  ValaSymbol* _tmp42_ = NULL;
                  _tmp42_ = vala_symbol_get_parent_symbol (sym);
                  vala_dova_base_module_append_param_free (self, VALA_METHOD (_tmp42_));
            }
      }
      _vala_iterable_unref0 (local_vars);
      _vala_code_node_unref0 (b);
}


void vala_dova_base_module_append_local_free (ValaDovaBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->append_local_free (self, sym, stop_at_loop, stop_at);
}


static void vala_dova_base_module_append_param_free (ValaDovaBaseModule* self, ValaMethod* m) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != NULL);
      {
            ValaList* _tmp0_ = NULL;
            ValaList* _param_list;
            gint _tmp1_;
            gint _param_size;
            gint _param_index;
            _tmp0_ = vala_method_get_parameters (m);
            _param_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp1_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaParameter* param;
                  gboolean _tmp3_ = FALSE;
                  ValaDataType* _tmp4_ = NULL;
                  gboolean _tmp5_;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp2_;
                  _tmp4_ = vala_variable_get_variable_type ((ValaVariable*) param);
                  _tmp5_ = vala_dova_base_module_requires_destroy (self, _tmp4_);
                  if (_tmp5_) {
                        ValaParameterDirection _tmp6_;
                        _tmp6_ = vala_parameter_get_direction (param);
                        _tmp3_ = _tmp6_ == VALA_PARAMETER_DIRECTION_IN;
                  } else {
                        _tmp3_ = FALSE;
                  }
                  if (_tmp3_) {
                        const gchar* _tmp7_ = NULL;
                        ValaMemberAccess* _tmp8_ = NULL;
                        ValaMemberAccess* ma;
                        ValaCCodeFunction* _tmp9_ = NULL;
                        const gchar* _tmp10_ = NULL;
                        ValaCCodeExpression* _tmp11_ = NULL;
                        ValaCCodeExpression* _tmp12_;
                        ValaDataType* _tmp13_ = NULL;
                        ValaCCodeExpression* _tmp14_ = NULL;
                        ValaCCodeExpression* _tmp15_;
                        _tmp7_ = vala_symbol_get_name ((ValaSymbol*) param);
                        _tmp8_ = vala_member_access_new_simple (_tmp7_, NULL);
                        ma = _tmp8_;
                        vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) param);
                        _tmp9_ = vala_dova_base_module_get_ccode (self);
                        _tmp10_ = vala_symbol_get_name ((ValaSymbol*) param);
                        _tmp11_ = vala_dova_base_module_get_variable_cexpression (self, _tmp10_);
                        _tmp12_ = _tmp11_;
                        _tmp13_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp14_ = vala_dova_base_module_get_unref_expression (self, _tmp12_, _tmp13_, (ValaExpression*) ma);
                        _tmp15_ = _tmp14_;
                        vala_ccode_function_add_expression (_tmp9_, _tmp15_);
                        _vala_ccode_node_unref0 (_tmp15_);
                        _vala_ccode_node_unref0 (_tmp12_);
                        _vala_code_node_unref0 (ma);
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
}


static void vala_dova_base_module_real_visit_return_statement (ValaCodeVisitor* base, ValaReturnStatement* stmt) {
      ValaDovaBaseModule * self;
      ValaSymbol* _tmp0_ = NULL;
      ValaCCodeIdentifier* _tmp1_ = NULL;
      ValaDataType* _tmp2_ = NULL;
      ValaCCodeFunction* _tmp4_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_dova_base_module_get_current_symbol (self);
      vala_dova_base_module_append_local_free (self, _tmp0_, FALSE, NULL);
      _tmp2_ = vala_dova_base_module_get_current_return_type (self);
      if (VALA_IS_VOID_TYPE (_tmp2_)) {
            _vala_ccode_node_unref0 (_tmp1_);
            _tmp1_ = NULL;
      } else {
            ValaCCodeIdentifier* _tmp3_ = NULL;
            _tmp3_ = vala_ccode_identifier_new ("result");
            _vala_ccode_node_unref0 (_tmp1_);
            _tmp1_ = _tmp3_;
      }
      _tmp4_ = vala_dova_base_module_get_ccode (self);
      vala_ccode_function_add_return (_tmp4_, (ValaCCodeExpression*) _tmp1_);
      _vala_ccode_node_unref0 (_tmp1_);
}


static void vala_dova_base_module_real_visit_delete_statement (ValaCodeVisitor* base, ValaDeleteStatement* stmt) {
      ValaDovaBaseModule * self;
      ValaExpression* _tmp0_ = NULL;
      ValaDataType* _tmp1_ = NULL;
      ValaPointerType* _tmp2_;
      ValaPointerType* pointer_type;
      ValaDataType* _tmp3_;
      ValaDataType* type;
      gboolean _tmp4_ = FALSE;
      ValaDataType* _tmp5_ = NULL;
      ValaTypeSymbol* _tmp6_ = NULL;
      ValaCCodeExpression* _tmp12_ = NULL;
      ValaCCodeExpression* _tmp13_;
      ValaCCodeFunctionCall* _tmp14_ = NULL;
      ValaCCodeFunctionCall* _tmp15_;
      ValaCCodeFunctionCall* ccall;
      ValaExpression* _tmp16_ = NULL;
      ValaCCodeExpression* _tmp17_ = NULL;
      ValaCCodeExpression* _tmp18_;
      ValaCCodeFunction* _tmp19_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (stmt != NULL);
      _tmp0_ = vala_delete_statement_get_expression (stmt);
      _tmp1_ = vala_expression_get_value_type (_tmp0_);
      _tmp2_ = _vala_code_node_ref0 (VALA_POINTER_TYPE (_tmp1_));
      pointer_type = _tmp2_;
      _tmp3_ = _vala_code_node_ref0 ((ValaDataType*) pointer_type);
      type = _tmp3_;
      _tmp5_ = vala_pointer_type_get_base_type (pointer_type);
      _tmp6_ = vala_data_type_get_data_type (_tmp5_);
      if (_tmp6_ != NULL) {
            ValaDataType* _tmp7_ = NULL;
            ValaTypeSymbol* _tmp8_ = NULL;
            gboolean _tmp9_;
            _tmp7_ = vala_pointer_type_get_base_type (pointer_type);
            _tmp8_ = vala_data_type_get_data_type (_tmp7_);
            _tmp9_ = vala_typesymbol_is_reference_type (_tmp8_);
            _tmp4_ = _tmp9_;
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            ValaDataType* _tmp10_ = NULL;
            ValaDataType* _tmp11_;
            _tmp10_ = vala_pointer_type_get_base_type (pointer_type);
            _tmp11_ = _vala_code_node_ref0 (_tmp10_);
            _vala_code_node_unref0 (type);
            type = _tmp11_;
      }
      _tmp12_ = vala_dova_base_module_get_destroy_func_expression (self, type, FALSE);
      _tmp13_ = _tmp12_;
      _tmp14_ = vala_ccode_function_call_new (_tmp13_);
      _tmp15_ = _tmp14_;
      _vala_ccode_node_unref0 (_tmp13_);
      ccall = _tmp15_;
      _tmp16_ = vala_delete_statement_get_expression (stmt);
      _tmp17_ = vala_dova_base_module_get_cvalue (self, _tmp16_);
      _tmp18_ = _tmp17_;
      vala_ccode_function_call_add_argument (ccall, _tmp18_);
      _vala_ccode_node_unref0 (_tmp18_);
      _tmp19_ = vala_dova_base_module_get_ccode (self);
      vala_ccode_function_add_expression (_tmp19_, (ValaCCodeExpression*) ccall);
      _vala_ccode_node_unref0 (ccall);
      _vala_code_node_unref0 (type);
      _vala_code_node_unref0 (pointer_type);
}


static void vala_dova_base_module_real_visit_expression (ValaCodeVisitor* base, ValaExpression* expr) {
      ValaDovaBaseModule * self;
      gboolean _tmp0_ = FALSE;
      ValaCCodeExpression* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp2_;
      gboolean _tmp3_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp1_ = vala_dova_base_module_get_cvalue (self, expr);
      _tmp2_ = _tmp1_;
      _tmp3_ = _tmp2_ != NULL;
      _vala_ccode_node_unref0 (_tmp2_);
      if (_tmp3_) {
            gboolean _tmp4_;
            _tmp4_ = vala_expression_get_lvalue (expr);
            _tmp0_ = !_tmp4_;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            ValaCCodeExpression* _tmp5_ = NULL;
            ValaCCodeExpression* _tmp6_;
            ValaDataType* _tmp7_ = NULL;
            ValaDataType* _tmp8_ = NULL;
            ValaCCodeExpression* _tmp9_ = NULL;
            ValaCCodeExpression* _tmp10_;
            _tmp5_ = vala_dova_base_module_get_cvalue (self, expr);
            _tmp6_ = _tmp5_;
            _tmp7_ = vala_expression_get_value_type (expr);
            _tmp8_ = vala_expression_get_target_type (expr);
            _tmp9_ = vala_dova_base_module_transform_expression (self, _tmp6_, _tmp7_, _tmp8_, expr);
            _tmp10_ = _tmp9_;
            vala_dova_base_module_set_cvalue (self, expr, _tmp10_);
            _vala_ccode_node_unref0 (_tmp10_);
            _vala_ccode_node_unref0 (_tmp6_);
      }
}


static void vala_dova_base_module_real_visit_boolean_literal (ValaCodeVisitor* base, ValaBooleanLiteral* expr) {
      ValaDovaBaseModule * self;
      const gchar* _tmp0_ = NULL;
      gboolean _tmp1_;
      ValaCCodeConstant* _tmp2_ = NULL;
      ValaCCodeConstant* _tmp3_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp1_ = vala_boolean_literal_get_value (expr);
      if (_tmp1_) {
            _tmp0_ = "true";
      } else {
            _tmp0_ = "false";
      }
      _tmp2_ = vala_ccode_constant_new (_tmp0_);
      _tmp3_ = _tmp2_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp3_);
      _vala_ccode_node_unref0 (_tmp3_);
}


static void vala_dova_base_module_real_visit_character_literal (ValaCodeVisitor* base, ValaCharacterLiteral* expr) {
      ValaDovaBaseModule * self;
      gboolean _tmp0_ = FALSE;
      gunichar _tmp1_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp1_ = vala_character_literal_get_char (expr);
      if (_tmp1_ >= 0x20) {
            gunichar _tmp2_;
            _tmp2_ = vala_character_literal_get_char (expr);
            _tmp0_ = _tmp2_ < 0x80;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            const gchar* _tmp3_ = NULL;
            ValaCCodeConstant* _tmp4_ = NULL;
            ValaCCodeConstant* _tmp5_;
            _tmp3_ = vala_character_literal_get_value (expr);
            _tmp4_ = vala_ccode_constant_new (_tmp3_);
            _tmp5_ = _tmp4_;
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp5_);
            _vala_ccode_node_unref0 (_tmp5_);
      } else {
            gunichar _tmp6_;
            gchar* _tmp7_ = NULL;
            gchar* _tmp8_;
            ValaCCodeConstant* _tmp9_ = NULL;
            ValaCCodeConstant* _tmp10_;
            _tmp6_ = vala_character_literal_get_char (expr);
            _tmp7_ = g_strdup_printf ("%uU", (guint) _tmp6_);
            _tmp8_ = _tmp7_;
            _tmp9_ = vala_ccode_constant_new (_tmp8_);
            _tmp10_ = _tmp9_;
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp10_);
            _vala_ccode_node_unref0 (_tmp10_);
            _g_free0 (_tmp8_);
      }
}


static void vala_dova_base_module_real_visit_integer_literal (ValaCodeVisitor* base, ValaIntegerLiteral* expr) {
      ValaDovaBaseModule * self;
      const gchar* _tmp0_ = NULL;
      ValaCCodeConstant* _tmp1_ = NULL;
      ValaCCodeConstant* _tmp2_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_integer_literal_get_value (expr);
      _tmp1_ = vala_ccode_constant_new (_tmp0_);
      _tmp2_ = _tmp1_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp2_);
      _vala_ccode_node_unref0 (_tmp2_);
}


static glong string_strnlen (gchar* str, glong maxlen) {
      glong result = 0L;
      gchar* _tmp0_ = NULL;
      gchar* end;
      _tmp0_ = memchr (str, 0, (gsize) maxlen);
      end = _tmp0_;
      if (end == NULL) {
            result = maxlen;
            return result;
      } else {
            result = (glong) (end - str);
            return result;
      }
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
      gchar* result = NULL;
      glong string_length = 0L;
      gboolean _tmp0_ = FALSE;
      gchar* _tmp3_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (offset >= 0) {
            _tmp0_ = len >= 0;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            glong _tmp1_;
            _tmp1_ = string_strnlen ((gchar*) self, offset + len);
            string_length = _tmp1_;
      } else {
            gint _tmp2_;
            _tmp2_ = strlen (self);
            string_length = (glong) _tmp2_;
      }
      if (offset < 0) {
            offset = string_length + offset;
            g_return_val_if_fail (offset >= 0, NULL);
      } else {
            g_return_val_if_fail (offset <= string_length, NULL);
      }
      if (len < 0) {
            len = string_length - offset;
      }
      g_return_val_if_fail ((offset + len) <= string_length, NULL);
      _tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
      result = _tmp3_;
      return result;
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
      gboolean result = FALSE;
      gchar* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (needle != NULL, FALSE);
      _tmp0_ = strstr ((gchar*) self, (gchar*) needle);
      result = _tmp0_ != NULL;
      return result;
}


static void vala_dova_base_module_real_visit_real_literal (ValaCodeVisitor* base, ValaRealLiteral* expr) {
      ValaDovaBaseModule * self;
      const gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* c_literal;
      gboolean _tmp2_ = FALSE;
      gboolean _tmp3_;
      gboolean _tmp7_ = FALSE;
      gboolean _tmp8_ = FALSE;
      gboolean _tmp9_;
      ValaCCodeConstant* _tmp20_ = NULL;
      ValaCCodeConstant* _tmp21_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_real_literal_get_value (expr);
      _tmp1_ = g_strdup (_tmp0_);
      c_literal = _tmp1_;
      _tmp3_ = g_str_has_suffix (c_literal, "d");
      if (_tmp3_) {
            _tmp2_ = TRUE;
      } else {
            gboolean _tmp4_;
            _tmp4_ = g_str_has_suffix (c_literal, "D");
            _tmp2_ = _tmp4_;
      }
      if (_tmp2_) {
            gint _tmp5_;
            gchar* _tmp6_ = NULL;
            _tmp5_ = strlen (c_literal);
            _tmp6_ = string_substring (c_literal, (glong) 0, (glong) (_tmp5_ - 1));
            _g_free0 (c_literal);
            c_literal = _tmp6_;
      }
      _tmp9_ = string_contains (c_literal, ".");
      if (_tmp9_) {
            _tmp8_ = TRUE;
      } else {
            gboolean _tmp10_;
            _tmp10_ = string_contains (c_literal, "e");
            _tmp8_ = _tmp10_;
      }
      if (_tmp8_) {
            _tmp7_ = TRUE;
      } else {
            gboolean _tmp11_;
            _tmp11_ = string_contains (c_literal, "E");
            _tmp7_ = _tmp11_;
      }
      if (!_tmp7_) {
            gboolean _tmp12_ = FALSE;
            gboolean _tmp13_;
            _tmp13_ = string_contains (c_literal, "f");
            if (_tmp13_) {
                  _tmp12_ = TRUE;
            } else {
                  gboolean _tmp14_;
                  _tmp14_ = string_contains (c_literal, "F");
                  _tmp12_ = _tmp14_;
            }
            if (_tmp12_) {
                  gint _tmp15_;
                  gchar* _tmp16_ = NULL;
                  gchar* _tmp17_;
                  gchar* _tmp18_;
                  _tmp15_ = strlen (c_literal);
                  _tmp16_ = string_substring (c_literal, (glong) 0, (glong) (_tmp15_ - 1));
                  _tmp17_ = _tmp16_;
                  _tmp18_ = g_strconcat (_tmp17_, ".f", NULL);
                  _g_free0 (c_literal);
                  c_literal = _tmp18_;
                  _g_free0 (_tmp17_);
            } else {
                  gchar* _tmp19_;
                  _tmp19_ = g_strconcat (c_literal, ".", NULL);
                  _g_free0 (c_literal);
                  c_literal = _tmp19_;
            }
      }
      _tmp20_ = vala_ccode_constant_new (c_literal);
      _tmp21_ = _tmp20_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp21_);
      _vala_ccode_node_unref0 (_tmp21_);
      _g_free0 (c_literal);
}


static void vala_dova_base_module_real_visit_string_literal (ValaCodeVisitor* base, ValaStringLiteral* expr) {
      ValaDovaBaseModule * self;
      const gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_;
      ValaCCodeConstant* _tmp3_ = NULL;
      ValaCCodeConstant* _tmp4_;
      ValaCCodeConstant* cliteral;
      ValaCCodeConstant* _tmp5_ = NULL;
      ValaCCodeConstant* _tmp6_;
      ValaCCodeBinaryExpression* _tmp7_ = NULL;
      ValaCCodeBinaryExpression* _tmp8_;
      ValaCCodeBinaryExpression* cbinary;
      ValaCCodeCastExpression* _tmp9_ = NULL;
      ValaCCodeCastExpression* _tmp10_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_string_literal_get_value (expr);
      _tmp1_ = g_strconcat ("\"\\0\" ", _tmp0_, NULL);
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_ccode_constant_new (_tmp2_);
      _tmp4_ = _tmp3_;
      _g_free0 (_tmp2_);
      cliteral = _tmp4_;
      _tmp5_ = vala_ccode_constant_new ("1");
      _tmp6_ = _tmp5_;
      _tmp7_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) cliteral, (ValaCCodeExpression*) _tmp6_);
      _tmp8_ = _tmp7_;
      _vala_ccode_node_unref0 (_tmp6_);
      cbinary = _tmp8_;
      _tmp9_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) cbinary, "string_t");
      _tmp10_ = _tmp9_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp10_);
      _vala_ccode_node_unref0 (_tmp10_);
      _vala_ccode_node_unref0 (cbinary);
      _vala_ccode_node_unref0 (cliteral);
}


static void vala_dova_base_module_real_visit_null_literal (ValaCodeVisitor* base, ValaNullLiteral* expr) {
      ValaDovaBaseModule * self;
      ValaCCodeConstant* _tmp0_ = NULL;
      ValaCCodeConstant* _tmp1_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_ccode_constant_new ("NULL");
      _tmp1_ = _tmp0_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp1_);
      _vala_ccode_node_unref0 (_tmp1_);
}


static void vala_dova_base_module_real_visit_base_access (ValaCodeVisitor* base, ValaBaseAccess* expr) {
      ValaDovaBaseModule * self;
      ValaDataType* _tmp0_ = NULL;
      ValaCCodeIdentifier* _tmp1_ = NULL;
      ValaCCodeIdentifier* _tmp2_;
      ValaDataType* _tmp3_ = NULL;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      ValaCCodeCastExpression* _tmp6_ = NULL;
      ValaCCodeCastExpression* _tmp7_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_expression_get_value_type ((ValaExpression*) expr);
      vala_dova_base_module_generate_type_declaration (self, _tmp0_, self->cfile);
      _tmp1_ = vala_ccode_identifier_new ("this");
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_expression_get_value_type ((ValaExpression*) expr);
      _tmp4_ = vala_data_type_get_cname (_tmp3_);
      _tmp5_ = _tmp4_;
      _tmp6_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp2_, _tmp5_);
      _tmp7_ = _tmp6_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp7_);
      _vala_ccode_node_unref0 (_tmp7_);
      _g_free0 (_tmp5_);
      _vala_ccode_node_unref0 (_tmp2_);
}


static void vala_dova_base_module_real_visit_postfix_expression (ValaCodeVisitor* base, ValaPostfixExpression* expr) {
      ValaDovaBaseModule * self;
      ValaExpression* _tmp0_ = NULL;
      ValaMemberAccess* _tmp1_ = NULL;
      ValaMemberAccess* ma;
      ValaCCodeUnaryOperator _tmp29_ = 0;
      gboolean _tmp30_;
      ValaCCodeUnaryOperator op;
      ValaExpression* _tmp31_ = NULL;
      ValaCCodeExpression* _tmp32_ = NULL;
      ValaCCodeExpression* _tmp33_;
      ValaCCodeUnaryExpression* _tmp34_ = NULL;
      ValaCCodeUnaryExpression* _tmp35_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_postfix_expression_get_inner (expr);
      _tmp1_ = vala_dova_base_module_find_property_access (self, _tmp0_);
      ma = _tmp1_;
      if (ma != NULL) {
            ValaSymbol* _tmp2_ = NULL;
            ValaProperty* _tmp3_;
            ValaProperty* prop;
            ValaDataType* _tmp4_ = NULL;
            ValaLocalVariable* _tmp5_ = NULL;
            ValaLocalVariable* temp_decl;
            ValaCCodeFunction* _tmp6_ = NULL;
            const gchar* _tmp7_ = NULL;
            ValaCCodeExpression* _tmp8_ = NULL;
            ValaCCodeExpression* _tmp9_;
            ValaExpression* _tmp10_ = NULL;
            ValaCCodeExpression* _tmp11_ = NULL;
            ValaCCodeExpression* _tmp12_;
            ValaCCodeBinaryOperator _tmp13_ = 0;
            gboolean _tmp14_;
            ValaCCodeBinaryOperator op;
            const gchar* _tmp15_ = NULL;
            ValaCCodeExpression* _tmp16_ = NULL;
            ValaCCodeExpression* _tmp17_;
            ValaCCodeConstant* _tmp18_ = NULL;
            ValaCCodeConstant* _tmp19_;
            ValaCCodeBinaryExpression* _tmp20_ = NULL;
            ValaCCodeBinaryExpression* _tmp21_;
            ValaCCodeBinaryExpression* cexpr;
            ValaExpression* _tmp22_ = NULL;
            ValaDataType* _tmp23_ = NULL;
            ValaDovaValue* _tmp24_ = NULL;
            ValaDovaValue* _tmp25_;
            const gchar* _tmp26_ = NULL;
            ValaCCodeIdentifier* _tmp27_ = NULL;
            ValaCCodeIdentifier* _tmp28_;
            _tmp2_ = vala_expression_get_symbol_reference ((ValaExpression*) ma);
            _tmp3_ = _vala_code_node_ref0 (VALA_PROPERTY (_tmp2_));
            prop = _tmp3_;
            _tmp4_ = vala_property_get_property_type (prop);
            _tmp5_ = vala_dova_base_module_get_temp_variable (self, _tmp4_, TRUE, (ValaCodeNode*) expr);
            temp_decl = _tmp5_;
            vala_dova_base_module_emit_temp_var (self, temp_decl);
            _tmp6_ = vala_dova_base_module_get_ccode (self);
            _tmp7_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
            _tmp8_ = vala_dova_base_module_get_variable_cexpression (self, _tmp7_);
            _tmp9_ = _tmp8_;
            _tmp10_ = vala_postfix_expression_get_inner (expr);
            _tmp11_ = vala_dova_base_module_get_cvalue (self, _tmp10_);
            _tmp12_ = _tmp11_;
            vala_ccode_function_add_assignment (_tmp6_, _tmp9_, _tmp12_);
            _vala_ccode_node_unref0 (_tmp12_);
            _vala_ccode_node_unref0 (_tmp9_);
            _tmp14_ = vala_postfix_expression_get_increment (expr);
            if (_tmp14_) {
                  _tmp13_ = VALA_CCODE_BINARY_OPERATOR_PLUS;
            } else {
                  _tmp13_ = VALA_CCODE_BINARY_OPERATOR_MINUS;
            }
            op = _tmp13_;
            _tmp15_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
            _tmp16_ = vala_dova_base_module_get_variable_cexpression (self, _tmp15_);
            _tmp17_ = _tmp16_;
            _tmp18_ = vala_ccode_constant_new ("1");
            _tmp19_ = _tmp18_;
            _tmp20_ = vala_ccode_binary_expression_new (op, _tmp17_, (ValaCCodeExpression*) _tmp19_);
            _tmp21_ = _tmp20_;
            _vala_ccode_node_unref0 (_tmp19_);
            _vala_ccode_node_unref0 (_tmp17_);
            cexpr = _tmp21_;
            _tmp22_ = vala_member_access_get_inner (ma);
            _tmp23_ = vala_expression_get_value_type ((ValaExpression*) expr);
            _tmp24_ = vala_dova_value_new (_tmp23_, (ValaCCodeExpression*) cexpr);
            _tmp25_ = _tmp24_;
            vala_dova_base_module_store_property (self, prop, _tmp22_, (ValaTargetValue*) _tmp25_);
            _vala_target_value_unref0 (_tmp25_);
            _tmp26_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
            _tmp27_ = vala_ccode_identifier_new (_tmp26_);
            _tmp28_ = _tmp27_;
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp28_);
            _vala_ccode_node_unref0 (_tmp28_);
            _vala_ccode_node_unref0 (cexpr);
            _vala_code_node_unref0 (temp_decl);
            _vala_code_node_unref0 (prop);
            _vala_code_node_unref0 (ma);
            return;
      }
      _tmp30_ = vala_postfix_expression_get_increment (expr);
      if (_tmp30_) {
            _tmp29_ = VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT;
      } else {
            _tmp29_ = VALA_CCODE_UNARY_OPERATOR_POSTFIX_DECREMENT;
      }
      op = _tmp29_;
      _tmp31_ = vala_postfix_expression_get_inner (expr);
      _tmp32_ = vala_dova_base_module_get_cvalue (self, _tmp31_);
      _tmp33_ = _tmp32_;
      _tmp34_ = vala_ccode_unary_expression_new (op, _tmp33_);
      _tmp35_ = _tmp34_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp35_);
      _vala_ccode_node_unref0 (_tmp35_);
      _vala_ccode_node_unref0 (_tmp33_);
      _vala_code_node_unref0 (ma);
}


static ValaMemberAccess* vala_dova_base_module_find_property_access (ValaDovaBaseModule* self, ValaExpression* expr) {
      ValaMemberAccess* result = NULL;
      ValaMemberAccess* _tmp0_;
      ValaMemberAccess* ma;
      ValaSymbol* _tmp1_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (expr != NULL, NULL);
      if (!VALA_IS_MEMBER_ACCESS (expr)) {
            result = NULL;
            return result;
      }
      _tmp0_ = _vala_code_node_ref0 (VALA_MEMBER_ACCESS (expr));
      ma = _tmp0_;
      _tmp1_ = vala_expression_get_symbol_reference ((ValaExpression*) ma);
      if (VALA_IS_PROPERTY (_tmp1_)) {
            result = ma;
            return result;
      }
      result = NULL;
      _vala_code_node_unref0 (ma);
      return result;
}


gboolean vala_dova_base_module_requires_copy (ValaDovaBaseModule* self, ValaDataType* type) {
      gboolean result = FALSE;
      gboolean _tmp0_;
      ValaTypeSymbol* _tmp1_ = NULL;
      ValaTypeSymbol* _tmp2_;
      ValaClass* _tmp3_;
      ValaClass* cl;
      gboolean _tmp4_ = FALSE;
      gboolean _tmp5_ = FALSE;
      ValaTypeParameter* _tmp9_ = NULL;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (type != NULL, FALSE);
      _tmp0_ = vala_data_type_is_disposable (type);
      if (!_tmp0_) {
            result = FALSE;
            return result;
      }
      _tmp1_ = vala_data_type_get_data_type (type);
      _tmp2_ = _tmp1_;
      _tmp3_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp2_) ? ((ValaClass*) _tmp2_) : NULL);
      cl = _tmp3_;
      if (cl != NULL) {
            gboolean _tmp6_;
            _tmp6_ = vala_typesymbol_is_reference_counting ((ValaTypeSymbol*) cl);
            _tmp5_ = _tmp6_;
      } else {
            _tmp5_ = FALSE;
      }
      if (_tmp5_) {
            gchar* _tmp7_ = NULL;
            gchar* _tmp8_;
            _tmp7_ = vala_typesymbol_get_ref_function ((ValaTypeSymbol*) cl);
            _tmp8_ = _tmp7_;
            _tmp4_ = g_strcmp0 (_tmp8_, "") == 0;
            _g_free0 (_tmp8_);
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            result = FALSE;
            _vala_code_node_unref0 (cl);
            return result;
      }
      _tmp9_ = vala_data_type_get_type_parameter (type);
      if (_tmp9_ != NULL) {
            result = FALSE;
            _vala_code_node_unref0 (cl);
            return result;
      }
      result = TRUE;
      _vala_code_node_unref0 (cl);
      return result;
}


gboolean vala_dova_base_module_requires_destroy (ValaDovaBaseModule* self, ValaDataType* type) {
      gboolean result = FALSE;
      gboolean _tmp0_;
      ValaDataType* _tmp1_;
      ValaArrayType* _tmp2_;
      ValaArrayType* array_type;
      gboolean _tmp3_ = FALSE;
      ValaTypeSymbol* _tmp7_ = NULL;
      ValaTypeSymbol* _tmp8_;
      ValaClass* _tmp9_;
      ValaClass* cl;
      gboolean _tmp10_ = FALSE;
      gboolean _tmp11_ = FALSE;
      ValaTypeParameter* _tmp15_ = NULL;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (type != NULL, FALSE);
      _tmp0_ = vala_data_type_is_disposable (type);
      if (!_tmp0_) {
            result = FALSE;
            return result;
      }
      _tmp1_ = type;
      _tmp2_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp1_) ? ((ValaArrayType*) _tmp1_) : NULL);
      array_type = _tmp2_;
      if (array_type != NULL) {
            gboolean _tmp4_;
            _tmp4_ = vala_array_type_get_inline_allocated (array_type);
            _tmp3_ = _tmp4_;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            ValaDataType* _tmp5_ = NULL;
            gboolean _tmp6_;
            _tmp5_ = vala_array_type_get_element_type (array_type);
            _tmp6_ = vala_dova_base_module_requires_destroy (self, _tmp5_);
            result = _tmp6_;
            _vala_code_node_unref0 (array_type);
            return result;
      }
      _tmp7_ = vala_data_type_get_data_type (type);
      _tmp8_ = _tmp7_;
      _tmp9_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp8_) ? ((ValaClass*) _tmp8_) : NULL);
      cl = _tmp9_;
      if (cl != NULL) {
            gboolean _tmp12_;
            _tmp12_ = vala_typesymbol_is_reference_counting ((ValaTypeSymbol*) cl);
            _tmp11_ = _tmp12_;
      } else {
            _tmp11_ = FALSE;
      }
      if (_tmp11_) {
            gchar* _tmp13_ = NULL;
            gchar* _tmp14_;
            _tmp13_ = vala_typesymbol_get_unref_function ((ValaTypeSymbol*) cl);
            _tmp14_ = _tmp13_;
            _tmp10_ = g_strcmp0 (_tmp14_, "") == 0;
            _g_free0 (_tmp14_);
      } else {
            _tmp10_ = FALSE;
      }
      if (_tmp10_) {
            result = FALSE;
            _vala_code_node_unref0 (cl);
            _vala_code_node_unref0 (array_type);
            return result;
      }
      _tmp15_ = vala_data_type_get_type_parameter (type);
      if (_tmp15_ != NULL) {
            result = FALSE;
            _vala_code_node_unref0 (cl);
            _vala_code_node_unref0 (array_type);
            return result;
      }
      result = TRUE;
      _vala_code_node_unref0 (cl);
      _vala_code_node_unref0 (array_type);
      return result;
}


static gboolean vala_dova_base_module_is_ref_function_void (ValaDovaBaseModule* self, ValaDataType* type) {
      gboolean result = FALSE;
      ValaTypeSymbol* _tmp0_ = NULL;
      ValaTypeSymbol* _tmp1_;
      ValaClass* _tmp2_;
      ValaClass* cl;
      gboolean _tmp3_ = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (type != NULL, FALSE);
      _tmp0_ = vala_data_type_get_data_type (type);
      _tmp1_ = _tmp0_;
      _tmp2_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp1_) ? ((ValaClass*) _tmp1_) : NULL);
      cl = _tmp2_;
      if (cl != NULL) {
            gboolean _tmp4_;
            _tmp4_ = vala_class_get_ref_function_void (cl);
            _tmp3_ = _tmp4_;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            result = TRUE;
            _vala_code_node_unref0 (cl);
            return result;
      } else {
            result = FALSE;
            _vala_code_node_unref0 (cl);
            return result;
      }
      _vala_code_node_unref0 (cl);
}


static ValaCCodeExpression* vala_dova_base_module_real_get_ref_cexpression (ValaDovaBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node) {
      ValaCCodeExpression* result = NULL;
      gboolean _tmp0_ = FALSE;
      ValaSourceReference* _tmp23_ = NULL;
      ValaCCodeExpression* _tmp24_ = NULL;
      ValaCCodeExpression* dupexpr;
      ValaCCodeFunctionCall* _tmp25_ = NULL;
      ValaCCodeFunctionCall* ccall;
      gboolean _tmp26_ = FALSE;
      gboolean _tmp27_ = FALSE;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (expression_type != NULL, NULL);
      g_return_val_if_fail (cexpr != NULL, NULL);
      g_return_val_if_fail (node != NULL, NULL);
      if (VALA_IS_VALUE_TYPE (expression_type)) {
            gboolean _tmp1_;
            _tmp1_ = vala_data_type_get_nullable (expression_type);
            _tmp0_ = !_tmp1_;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            ValaLocalVariable* _tmp2_ = NULL;
            ValaLocalVariable* decl;
            const gchar* _tmp3_ = NULL;
            ValaCCodeExpression* _tmp4_ = NULL;
            ValaCCodeExpression* ctemp;
            ValaValueType* _tmp5_;
            ValaValueType* vt;
            ValaTypeSymbol* _tmp6_ = NULL;
            ValaStruct* _tmp7_;
            ValaStruct* st;
            gchar* _tmp8_ = NULL;
            gchar* _tmp9_;
            ValaCCodeIdentifier* _tmp10_ = NULL;
            ValaCCodeIdentifier* _tmp11_;
            ValaCCodeFunctionCall* _tmp12_ = NULL;
            ValaCCodeFunctionCall* _tmp13_;
            ValaCCodeFunctionCall* copy_call;
            ValaCCodeUnaryExpression* _tmp14_ = NULL;
            ValaCCodeUnaryExpression* _tmp15_;
            ValaCCodeConstant* _tmp16_ = NULL;
            ValaCCodeConstant* _tmp17_;
            ValaCCodeUnaryExpression* _tmp18_ = NULL;
            ValaCCodeUnaryExpression* _tmp19_;
            ValaCCodeConstant* _tmp20_ = NULL;
            ValaCCodeConstant* _tmp21_;
            ValaCCodeCommaExpression* _tmp22_ = NULL;
            ValaCCodeCommaExpression* ccomma;
            _tmp2_ = vala_dova_base_module_get_temp_variable (self, expression_type, FALSE, node);
            decl = _tmp2_;
            vala_dova_base_module_emit_temp_var (self, decl);
            _tmp3_ = vala_symbol_get_name ((ValaSymbol*) decl);
            _tmp4_ = vala_dova_base_module_get_variable_cexpression (self, _tmp3_);
            ctemp = _tmp4_;
            _tmp5_ = _vala_code_node_ref0 (VALA_VALUE_TYPE (expression_type));
            vt = _tmp5_;
            _tmp6_ = vala_value_type_get_type_symbol (vt);
            _tmp7_ = _vala_code_node_ref0 (VALA_STRUCT (_tmp6_));
            st = _tmp7_;
            _tmp8_ = vala_typesymbol_get_copy_function ((ValaTypeSymbol*) st);
            _tmp9_ = _tmp8_;
            _tmp10_ = vala_ccode_identifier_new (_tmp9_);
            _tmp11_ = _tmp10_;
            _tmp12_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp11_);
            _tmp13_ = _tmp12_;
            _vala_ccode_node_unref0 (_tmp11_);
            _g_free0 (_tmp9_);
            copy_call = _tmp13_;
            _tmp14_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, ctemp);
            _tmp15_ = _tmp14_;
            vala_ccode_function_call_add_argument (copy_call, (ValaCCodeExpression*) _tmp15_);
            _vala_ccode_node_unref0 (_tmp15_);
            _tmp16_ = vala_ccode_constant_new ("0");
            _tmp17_ = _tmp16_;
            vala_ccode_function_call_add_argument (copy_call, (ValaCCodeExpression*) _tmp17_);
            _vala_ccode_node_unref0 (_tmp17_);
            _tmp18_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cexpr);
            _tmp19_ = _tmp18_;
            vala_ccode_function_call_add_argument (copy_call, (ValaCCodeExpression*) _tmp19_);
            _vala_ccode_node_unref0 (_tmp19_);
            _tmp20_ = vala_ccode_constant_new ("0");
            _tmp21_ = _tmp20_;
            vala_ccode_function_call_add_argument (copy_call, (ValaCCodeExpression*) _tmp21_);
            _vala_ccode_node_unref0 (_tmp21_);
            _tmp22_ = vala_ccode_comma_expression_new ();
            ccomma = _tmp22_;
            vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) copy_call);
            vala_ccode_comma_expression_append_expression (ccomma, ctemp);
            result = (ValaCCodeExpression*) ccomma;
            _vala_ccode_node_unref0 (copy_call);
            _vala_code_node_unref0 (st);
            _vala_code_node_unref0 (vt);
            _vala_ccode_node_unref0 (ctemp);
            _vala_code_node_unref0 (decl);
            return result;
      }
      _tmp23_ = vala_code_node_get_source_reference (node);
      _tmp24_ = vala_dova_base_module_get_dup_func_expression (self, expression_type, _tmp23_, FALSE);
      dupexpr = _tmp24_;
      if (dupexpr == NULL) {
            vala_code_node_set_error (node, TRUE);
            result = NULL;
            _vala_ccode_node_unref0 (dupexpr);
            return result;
      }
      _tmp25_ = vala_ccode_function_call_new (dupexpr);
      ccall = _tmp25_;
      if (expr != NULL) {
            gboolean _tmp28_;
            _tmp28_ = vala_expression_is_non_null (expr);
            _tmp27_ = _tmp28_;
      } else {
            _tmp27_ = FALSE;
      }
      if (_tmp27_) {
            gboolean _tmp29_;
            _tmp29_ = vala_dova_base_module_is_ref_function_void (self, expression_type);
            _tmp26_ = !_tmp29_;
      } else {
            _tmp26_ = FALSE;
      }
      if (_tmp26_) {
            ValaCCodeExpression* _tmp30_ = NULL;
            ValaCCodeExpression* _tmp31_;
            _tmp30_ = vala_dova_base_module_get_cvalue (self, expr);
            _tmp31_ = _tmp30_;
            vala_ccode_function_call_add_argument (ccall, _tmp31_);
            _vala_ccode_node_unref0 (_tmp31_);
            result = (ValaCCodeExpression*) ccall;
            _vala_ccode_node_unref0 (dupexpr);
            return result;
      } else {
            ValaLocalVariable* _tmp32_ = NULL;
            ValaLocalVariable* decl;
            const gchar* _tmp33_ = NULL;
            ValaCCodeExpression* _tmp34_ = NULL;
            ValaCCodeExpression* ctemp;
            ValaCCodeConstant* _tmp35_ = NULL;
            ValaCCodeConstant* _tmp36_;
            ValaCCodeBinaryExpression* _tmp37_ = NULL;
            ValaCCodeBinaryExpression* _tmp38_;
            ValaCCodeBinaryExpression* cisnull;
            ValaTypeParameter* _tmp39_ = NULL;
            ValaCCodeCommaExpression* _tmp48_ = NULL;
            ValaCCodeCommaExpression* ccomma;
            ValaCCodeAssignment* _tmp49_ = NULL;
            ValaCCodeAssignment* _tmp50_;
            ValaCCodeConstant* _tmp51_ = NULL;
            ValaCCodeConstant* cifnull;
            ValaCCodeConditionalExpression* _tmp52_ = NULL;
            ValaCCodeConditionalExpression* _tmp53_;
            gboolean _tmp54_;
            _tmp32_ = vala_dova_base_module_get_temp_variable (self, expression_type, FALSE, node);
            decl = _tmp32_;
            vala_dova_base_module_emit_temp_var (self, decl);
            _tmp33_ = vala_symbol_get_name ((ValaSymbol*) decl);
            _tmp34_ = vala_dova_base_module_get_variable_cexpression (self, _tmp33_);
            ctemp = _tmp34_;
            _tmp35_ = vala_ccode_constant_new ("NULL");
            _tmp36_ = _tmp35_;
            _tmp37_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, ctemp, (ValaCCodeExpression*) _tmp36_);
            _tmp38_ = _tmp37_;
            _vala_ccode_node_unref0 (_tmp36_);
            cisnull = _tmp38_;
            _tmp39_ = vala_data_type_get_type_parameter (expression_type);
            if (_tmp39_ != NULL) {
                  ValaSourceReference* _tmp40_ = NULL;
                  ValaCCodeExpression* _tmp41_ = NULL;
                  ValaCCodeExpression* _tmp42_;
                  ValaCCodeConstant* _tmp43_ = NULL;
                  ValaCCodeConstant* _tmp44_;
                  ValaCCodeBinaryExpression* _tmp45_ = NULL;
                  ValaCCodeBinaryExpression* _tmp46_;
                  ValaCCodeBinaryExpression* cdupisnull;
                  ValaCCodeBinaryExpression* _tmp47_ = NULL;
                  _tmp40_ = vala_code_node_get_source_reference (node);
                  _tmp41_ = vala_dova_base_module_get_dup_func_expression (self, expression_type, _tmp40_, FALSE);
                  _tmp42_ = _tmp41_;
                  _tmp43_ = vala_ccode_constant_new ("NULL");
                  _tmp44_ = _tmp43_;
                  _tmp45_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, _tmp42_, (ValaCCodeExpression*) _tmp44_);
                  _tmp46_ = _tmp45_;
                  _vala_ccode_node_unref0 (_tmp44_);
                  _vala_ccode_node_unref0 (_tmp42_);
                  cdupisnull = _tmp46_;
                  _tmp47_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) cdupisnull);
                  _vala_ccode_node_unref0 (cisnull);
                  cisnull = _tmp47_;
                  _vala_ccode_node_unref0 (cdupisnull);
            }
            vala_ccode_function_call_add_argument (ccall, ctemp);
            _tmp48_ = vala_ccode_comma_expression_new ();
            ccomma = _tmp48_;
            _tmp49_ = vala_ccode_assignment_new (ctemp, cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
            _tmp50_ = _tmp49_;
            vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp50_);
            _vala_ccode_node_unref0 (_tmp50_);
            _tmp51_ = vala_ccode_constant_new ("NULL");
            cifnull = _tmp51_;
            _tmp52_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) cisnull, (ValaCCodeExpression*) cifnull, (ValaCCodeExpression*) ccall);
            _tmp53_ = _tmp52_;
            vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp53_);
            _vala_ccode_node_unref0 (_tmp53_);
            _tmp54_ = vala_dova_base_module_is_ref_function_void (self, expression_type);
            if (_tmp54_) {
                  vala_ccode_comma_expression_append_expression (ccomma, ctemp);
            }
            result = (ValaCCodeExpression*) ccomma;
            _vala_ccode_node_unref0 (cifnull);
            _vala_ccode_node_unref0 (cisnull);
            _vala_ccode_node_unref0 (ctemp);
            _vala_code_node_unref0 (decl);
            _vala_ccode_node_unref0 (ccall);
            _vala_ccode_node_unref0 (dupexpr);
            return result;
      }
      _vala_ccode_node_unref0 (ccall);
      _vala_ccode_node_unref0 (dupexpr);
}


ValaCCodeExpression* vala_dova_base_module_get_ref_cexpression (ValaDovaBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node) {
      return VALA_DOVA_BASE_MODULE_GET_CLASS (self)->get_ref_cexpression (self, expression_type, cexpr, expr, node);
}


static void vala_dova_base_module_real_generate_class_declaration (ValaDovaBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gboolean _tmp2_;
      gboolean _tmp3_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (cl != NULL);
      g_return_if_fail (decl_space != NULL);
      _tmp0_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_dova_base_module_add_symbol_declaration (self, decl_space, (ValaSymbol*) cl, _tmp1_);
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      if (_tmp3_) {
            return;
      }
}


void vala_dova_base_module_generate_class_declaration (ValaDovaBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->generate_class_declaration (self, cl, decl_space);
}


static void vala_dova_base_module_real_generate_interface_declaration (ValaDovaBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (iface != NULL);
      g_return_if_fail (decl_space != NULL);
}


void vala_dova_base_module_generate_interface_declaration (ValaDovaBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->generate_interface_declaration (self, iface, decl_space);
}


static void vala_dova_base_module_real_generate_method_declaration (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (m != NULL);
      g_return_if_fail (decl_space != NULL);
}


void vala_dova_base_module_generate_method_declaration (ValaDovaBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->generate_method_declaration (self, m, decl_space);
}


void vala_dova_base_module_add_generic_type_arguments (ValaDovaBaseModule* self, ValaCCodeFunctionCall* ccall, ValaList* type_args, ValaCodeNode* expr, gboolean is_chainup) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (ccall != NULL);
      g_return_if_fail (type_args != NULL);
      g_return_if_fail (expr != NULL);
      {
            ValaList* _tmp0_;
            ValaList* _type_arg_list;
            gint _tmp1_;
            gint _type_arg_size;
            gint _type_arg_index;
            _tmp0_ = _vala_iterable_ref0 (type_args);
            _type_arg_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _type_arg_list);
            _type_arg_size = _tmp1_;
            _type_arg_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaDataType* type_arg;
                  ValaCCodeExpression* _tmp3_ = NULL;
                  ValaCCodeExpression* _tmp4_;
                  _type_arg_index = _type_arg_index + 1;
                  if (!(_type_arg_index < _type_arg_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get (_type_arg_list, _type_arg_index);
                  type_arg = (ValaDataType*) _tmp2_;
                  _tmp3_ = vala_dova_base_module_get_type_id_expression (self, type_arg, is_chainup);
                  _tmp4_ = _tmp3_;
                  vala_ccode_function_call_add_argument (ccall, _tmp4_);
                  _vala_ccode_node_unref0 (_tmp4_);
                  _vala_code_node_unref0 (type_arg);
            }
            _vala_iterable_unref0 (_type_arg_list);
      }
}


static void vala_dova_base_module_real_visit_object_creation_expression (ValaCodeVisitor* base, ValaObjectCreationExpression* expr) {
      ValaDovaBaseModule * self;
      ValaCCodeExpression* instance;
      ValaCCodeExpression* creation_expr;
      ValaDataType* _tmp0_ = NULL;
      ValaTypeSymbol* _tmp1_ = NULL;
      ValaTypeSymbol* _tmp2_;
      ValaStruct* _tmp3_;
      ValaStruct* st;
      gboolean struct_by_ref;
      gboolean _tmp4_ = FALSE;
      gboolean _tmp5_ = FALSE;
      gboolean _tmp6_ = FALSE;
      gboolean _tmp10_ = FALSE;
      ValaSymbol* _tmp20_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      instance = NULL;
      creation_expr = NULL;
      _tmp0_ = vala_object_creation_expression_get_type_reference (expr);
      _tmp1_ = vala_data_type_get_data_type (_tmp0_);
      _tmp2_ = _tmp1_;
      _tmp3_ = _vala_code_node_ref0 (VALA_IS_STRUCT (_tmp2_) ? ((ValaStruct*) _tmp2_) : NULL);
      st = _tmp3_;
      struct_by_ref = FALSE;
      if (st != NULL) {
            gboolean _tmp7_;
            _tmp7_ = vala_struct_is_boolean_type (st);
            _tmp6_ = !_tmp7_;
      } else {
            _tmp6_ = FALSE;
      }
      if (_tmp6_) {
            gboolean _tmp8_;
            _tmp8_ = vala_struct_is_integer_type (st);
            _tmp5_ = !_tmp8_;
      } else {
            _tmp5_ = FALSE;
      }
      if (_tmp5_) {
            gboolean _tmp9_;
            _tmp9_ = vala_struct_is_floating_type (st);
            _tmp4_ = !_tmp9_;
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            struct_by_ref = TRUE;
      }
      if (struct_by_ref) {
            _tmp10_ = TRUE;
      } else {
            ValaList* _tmp11_ = NULL;
            ValaList* _tmp12_;
            gint _tmp13_;
            _tmp11_ = vala_object_creation_expression_get_object_initializer (expr);
            _tmp12_ = _tmp11_;
            _tmp13_ = vala_collection_get_size ((ValaCollection*) _tmp12_);
            _tmp10_ = _tmp13_ > 0;
            _vala_iterable_unref0 (_tmp12_);
      }
      if (_tmp10_) {
            ValaDataType* _tmp14_ = NULL;
            ValaLocalVariable* _tmp15_ = NULL;
            ValaLocalVariable* temp_decl;
            const gchar* _tmp16_ = NULL;
            gchar* _tmp17_ = NULL;
            gchar* _tmp18_;
            ValaCCodeExpression* _tmp19_ = NULL;
            _tmp14_ = vala_object_creation_expression_get_type_reference (expr);
            _tmp15_ = vala_dova_base_module_get_temp_variable (self, _tmp14_, FALSE, (ValaCodeNode*) expr);
            temp_decl = _tmp15_;
            vala_dova_base_module_emit_temp_var (self, temp_decl);
            _tmp16_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
            _tmp17_ = vala_dova_base_module_get_variable_cname (self, _tmp16_);
            _tmp18_ = _tmp17_;
            _tmp19_ = vala_dova_base_module_get_variable_cexpression (self, _tmp18_);
            _vala_ccode_node_unref0 (instance);
            instance = _tmp19_;
            _g_free0 (_tmp18_);
            _vala_code_node_unref0 (temp_decl);
      }
      _tmp20_ = vala_expression_get_symbol_reference ((ValaExpression*) expr);
      if (_tmp20_ == NULL) {
            ValaDataType* _tmp21_ = NULL;
            ValaTypeSymbol* _tmp22_ = NULL;
            _tmp21_ = vala_object_creation_expression_get_type_reference (expr);
            _tmp22_ = vala_data_type_get_data_type (_tmp21_);
            if (VALA_IS_STRUCT (_tmp22_)) {
                  ValaCCodeIdentifier* _tmp23_ = NULL;
                  ValaCCodeIdentifier* _tmp24_;
                  ValaCCodeFunctionCall* _tmp25_ = NULL;
                  ValaCCodeFunctionCall* _tmp26_;
                  ValaCCodeFunctionCall* creation_call;
                  ValaCCodeUnaryExpression* _tmp27_ = NULL;
                  ValaCCodeUnaryExpression* _tmp28_;
                  ValaCCodeConstant* _tmp29_ = NULL;
                  ValaCCodeConstant* _tmp30_;
                  ValaDataType* _tmp31_ = NULL;
                  gchar* _tmp32_ = NULL;
                  gchar* _tmp33_;
                  gchar* _tmp34_ = NULL;
                  gchar* _tmp35_;
                  ValaCCodeIdentifier* _tmp36_ = NULL;
                  ValaCCodeIdentifier* _tmp37_;
                  ValaCCodeExpression* _tmp38_;
                  _tmp23_ = vala_ccode_identifier_new ("memset");
                  _tmp24_ = _tmp23_;
                  _tmp25_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp24_);
                  _tmp26_ = _tmp25_;
                  _vala_ccode_node_unref0 (_tmp24_);
                  creation_call = _tmp26_;
                  _tmp27_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance);
                  _tmp28_ = _tmp27_;
                  vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) _tmp28_);
                  _vala_ccode_node_unref0 (_tmp28_);
                  _tmp29_ = vala_ccode_constant_new ("0");
                  _tmp30_ = _tmp29_;
                  vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) _tmp30_);
                  _vala_ccode_node_unref0 (_tmp30_);
                  _tmp31_ = vala_object_creation_expression_get_type_reference (expr);
                  _tmp32_ = vala_data_type_get_cname (_tmp31_);
                  _tmp33_ = _tmp32_;
                  _tmp34_ = g_strdup_printf ("sizeof (%s)", _tmp33_);
                  _tmp35_ = _tmp34_;
                  _tmp36_ = vala_ccode_identifier_new (_tmp35_);
                  _tmp37_ = _tmp36_;
                  vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) _tmp37_);
                  _vala_ccode_node_unref0 (_tmp37_);
                  _g_free0 (_tmp35_);
                  _g_free0 (_tmp33_);
                  _tmp38_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call);
                  _vala_ccode_node_unref0 (creation_expr);
                  creation_expr = _tmp38_;
                  _vala_ccode_node_unref0 (creation_call);
            }
      } else {
            ValaSymbol* _tmp39_ = NULL;
            _tmp39_ = vala_expression_get_symbol_reference ((ValaExpression*) expr);
            if (VALA_IS_METHOD (_tmp39_)) {
                  ValaSymbol* _tmp40_ = NULL;
                  ValaMethod* _tmp41_;
                  ValaMethod* m;
                  ValaList* _tmp42_ = NULL;
                  ValaList* params;
                  ValaCCodeFunctionCall* creation_call = NULL;
                  ValaDataType* _tmp43_ = NULL;
                  ValaTypeSymbol* _tmp44_ = NULL;
                  ValaTypeSymbol* _tmp45_;
                  ValaClass* _tmp46_;
                  ValaClass* cl;
                  gboolean _tmp47_;
                  gboolean _tmp62_ = FALSE;
                  ValaDataType* _tmp66_ = NULL;
                  gboolean _tmp67_ = FALSE;
                  gboolean ellipsis;
                  gint i;
                  ValaIterator* _tmp72_ = NULL;
                  ValaIterator* params_it;
                  gboolean _tmp92_ = FALSE;
                  ValaCCodeExpression* _tmp104_;
                  gchar* _tmp105_ = NULL;
                  gchar* _tmp106_;
                  gboolean _tmp107_;
                  _tmp40_ = vala_expression_get_symbol_reference ((ValaExpression*) expr);
                  _tmp41_ = _vala_code_node_ref0 (VALA_METHOD (_tmp40_));
                  m = _tmp41_;
                  _tmp42_ = vala_method_get_parameters (m);
                  params = _tmp42_;
                  vala_dova_base_module_generate_method_declaration (self, m, self->cfile);
                  _tmp43_ = vala_object_creation_expression_get_type_reference (expr);
                  _tmp44_ = vala_data_type_get_data_type (_tmp43_);
                  _tmp45_ = _tmp44_;
                  _tmp46_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp45_) ? ((ValaClass*) _tmp45_) : NULL);
                  cl = _tmp46_;
                  _tmp47_ = vala_method_get_has_new_function (m);
                  if (!_tmp47_) {
                        gchar* _tmp48_ = NULL;
                        gchar* _tmp49_;
                        ValaCCodeIdentifier* _tmp50_ = NULL;
                        ValaCCodeIdentifier* _tmp51_;
                        ValaCCodeFunctionCall* _tmp52_ = NULL;
                        gchar* _tmp53_ = NULL;
                        gchar* _tmp54_;
                        ValaCCodeIdentifier* _tmp55_ = NULL;
                        ValaCCodeIdentifier* _tmp56_;
                        _tmp48_ = vala_method_get_real_cname (m);
                        _tmp49_ = _tmp48_;
                        _tmp50_ = vala_ccode_identifier_new (_tmp49_);
                        _tmp51_ = _tmp50_;
                        _tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp51_);
                        _vala_ccode_node_unref0 (creation_call);
                        creation_call = _tmp52_;
                        _vala_ccode_node_unref0 (_tmp51_);
                        _g_free0 (_tmp49_);
                        _tmp53_ = vala_typesymbol_get_type_id ((ValaTypeSymbol*) cl);
                        _tmp54_ = _tmp53_;
                        _tmp55_ = vala_ccode_identifier_new (_tmp54_);
                        _tmp56_ = _tmp55_;
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) _tmp56_);
                        _vala_ccode_node_unref0 (_tmp56_);
                        _g_free0 (_tmp54_);
                  } else {
                        gchar* _tmp57_ = NULL;
                        gchar* _tmp58_;
                        ValaCCodeIdentifier* _tmp59_ = NULL;
                        ValaCCodeIdentifier* _tmp60_;
                        ValaCCodeFunctionCall* _tmp61_ = NULL;
                        _tmp57_ = vala_method_get_cname (m);
                        _tmp58_ = _tmp57_;
                        _tmp59_ = vala_ccode_identifier_new (_tmp58_);
                        _tmp60_ = _tmp59_;
                        _tmp61_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp60_);
                        _vala_ccode_node_unref0 (creation_call);
                        creation_call = _tmp61_;
                        _vala_ccode_node_unref0 (_tmp60_);
                        _g_free0 (_tmp58_);
                  }
                  if (struct_by_ref) {
                        gdouble _tmp63_;
                        _tmp63_ = vala_method_get_cinstance_parameter_position (m);
                        _tmp62_ = !(_tmp63_ < 0);
                  } else {
                        _tmp62_ = FALSE;
                  }
                  if (_tmp62_) {
                        ValaCCodeUnaryExpression* _tmp64_ = NULL;
                        ValaCCodeUnaryExpression* _tmp65_;
                        _tmp64_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance);
                        _tmp65_ = _tmp64_;
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) _tmp65_);
                        _vala_ccode_node_unref0 (_tmp65_);
                  }
                  _tmp66_ = vala_object_creation_expression_get_type_reference (expr);
                  vala_dova_base_module_generate_type_declaration (self, _tmp66_, self->cfile);
                  if (cl != NULL) {
                        gboolean _tmp68_;
                        _tmp68_ = vala_class_get_is_compact (cl);
                        _tmp67_ = !_tmp68_;
                  } else {
                        _tmp67_ = FALSE;
                  }
                  if (_tmp67_) {
                        ValaDataType* _tmp69_ = NULL;
                        ValaList* _tmp70_ = NULL;
                        ValaList* _tmp71_;
                        _tmp69_ = vala_object_creation_expression_get_type_reference (expr);
                        _tmp70_ = vala_data_type_get_type_arguments (_tmp69_);
                        _tmp71_ = _tmp70_;
                        vala_dova_base_module_add_generic_type_arguments (self, creation_call, _tmp71_, (ValaCodeNode*) expr, FALSE);
                        _vala_iterable_unref0 (_tmp71_);
                  }
                  ellipsis = FALSE;
                  i = 1;
                  _tmp72_ = vala_iterable_iterator ((ValaIterable*) params);
                  params_it = _tmp72_;
                  {
                        ValaList* _tmp73_ = NULL;
                        ValaList* _arg_list;
                        gint _tmp74_;
                        gint _arg_size;
                        gint _arg_index;
                        _tmp73_ = vala_object_creation_expression_get_argument_list (expr);
                        _arg_list = _tmp73_;
                        _tmp74_ = vala_collection_get_size ((ValaCollection*) _arg_list);
                        _arg_size = _tmp74_;
                        _arg_index = -1;
                        while (TRUE) {
                              gpointer _tmp75_ = NULL;
                              ValaExpression* arg;
                              ValaCCodeExpression* _tmp76_ = NULL;
                              ValaCCodeExpression* cexpr;
                              ValaParameter* param;
                              gboolean _tmp77_;
                              _arg_index = _arg_index + 1;
                              if (!(_arg_index < _arg_size)) {
                                    break;
                              }
                              _tmp75_ = vala_list_get (_arg_list, _arg_index);
                              arg = (ValaExpression*) _tmp75_;
                              _tmp76_ = vala_dova_base_module_get_cvalue (self, arg);
                              cexpr = _tmp76_;
                              param = NULL;
                              _tmp77_ = vala_iterator_next (params_it);
                              if (_tmp77_) {
                                    gpointer _tmp78_ = NULL;
                                    gboolean _tmp79_;
                                    _tmp78_ = vala_iterator_get (params_it);
                                    _vala_code_node_unref0 (param);
                                    param = (ValaParameter*) _tmp78_;
                                    _tmp79_ = vala_parameter_get_ellipsis (param);
                                    ellipsis = _tmp79_;
                                    if (!ellipsis) {
                                          ValaCCodeExpression* _tmp80_ = NULL;
                                          _tmp80_ = vala_dova_base_module_handle_struct_argument (self, param, arg, cexpr);
                                          _vala_ccode_node_unref0 (cexpr);
                                          cexpr = _tmp80_;
                                    }
                              }
                              vala_ccode_function_call_add_argument (creation_call, cexpr);
                              i++;
                              _vala_code_node_unref0 (param);
                              _vala_ccode_node_unref0 (cexpr);
                              _vala_code_node_unref0 (arg);
                        }
                        _vala_iterable_unref0 (_arg_list);
                  }
                  while (TRUE) {
                        gboolean _tmp81_;
                        gpointer _tmp82_ = NULL;
                        ValaParameter* param;
                        gboolean _tmp83_;
                        ValaExpression* _tmp84_ = NULL;
                        ValaExpression* _tmp88_ = NULL;
                        ValaExpression* _tmp89_ = NULL;
                        ValaCCodeExpression* _tmp90_ = NULL;
                        ValaCCodeExpression* _tmp91_;
                        _tmp81_ = vala_iterator_next (params_it);
                        if (!_tmp81_) {
                              break;
                        }
                        _tmp82_ = vala_iterator_get (params_it);
                        param = (ValaParameter*) _tmp82_;
                        _tmp83_ = vala_parameter_get_ellipsis (param);
                        if (_tmp83_) {
                              ellipsis = TRUE;
                              _vala_code_node_unref0 (param);
                              break;
                        }
                        _tmp84_ = vala_variable_get_initializer ((ValaVariable*) param);
                        if (_tmp84_ == NULL) {
                              ValaSourceReference* _tmp85_ = NULL;
                              gchar* _tmp86_ = NULL;
                              gchar* _tmp87_;
                              _tmp85_ = vala_code_node_get_source_reference ((ValaCodeNode*) expr);
                              _tmp86_ = g_strdup_printf ("no default expression for argument %d", i);
                              _tmp87_ = _tmp86_;
                              vala_report_error (_tmp85_, _tmp87_);
                              _g_free0 (_tmp87_);
                              _vala_code_node_unref0 (param);
                              _vala_iterator_unref0 (params_it);
                              _vala_code_node_unref0 (cl);
                              _vala_ccode_node_unref0 (creation_call);
                              _vala_iterable_unref0 (params);
                              _vala_code_node_unref0 (m);
                              _vala_code_node_unref0 (st);
                              _vala_ccode_node_unref0 (creation_expr);
                              _vala_ccode_node_unref0 (instance);
                              return;
                        }
                        _tmp88_ = vala_variable_get_initializer ((ValaVariable*) param);
                        vala_code_node_emit ((ValaCodeNode*) _tmp88_, (ValaCodeGenerator*) self);
                        _tmp89_ = vala_variable_get_initializer ((ValaVariable*) param);
                        _tmp90_ = vala_dova_base_module_get_cvalue (self, _tmp89_);
                        _tmp91_ = _tmp90_;
                        vala_ccode_function_call_add_argument (creation_call, _tmp91_);
                        _vala_ccode_node_unref0 (_tmp91_);
                        i++;
                        _vala_code_node_unref0 (param);
                  }
                  if (struct_by_ref) {
                        gdouble _tmp93_;
                        _tmp93_ = vala_method_get_cinstance_parameter_position (m);
                        _tmp92_ = _tmp93_ < 0;
                  } else {
                        _tmp92_ = FALSE;
                  }
                  if (_tmp92_) {
                        ValaCCodeUnaryExpression* _tmp94_ = NULL;
                        ValaCCodeUnaryExpression* _tmp95_;
                        _tmp94_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, instance);
                        _tmp95_ = _tmp94_;
                        vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) _tmp95_);
                        _vala_ccode_node_unref0 (_tmp95_);
                  }
                  if (ellipsis) {
                        gboolean _tmp96_ = FALSE;
                        gboolean _tmp97_ = FALSE;
                        gboolean _tmp98_;
                        _tmp98_ = vala_method_get_printf_format (m);
                        if (!_tmp98_) {
                              gboolean _tmp99_;
                              _tmp99_ = vala_method_get_scanf_format (m);
                              _tmp97_ = !_tmp99_;
                        } else {
                              _tmp97_ = FALSE;
                        }
                        if (_tmp97_) {
                              const gchar* _tmp100_ = NULL;
                              _tmp100_ = vala_method_get_sentinel (m);
                              _tmp96_ = g_strcmp0 (_tmp100_, "") != 0;
                        } else {
                              _tmp96_ = FALSE;
                        }
                        if (_tmp96_) {
                              const gchar* _tmp101_ = NULL;
                              ValaCCodeConstant* _tmp102_ = NULL;
                              ValaCCodeConstant* _tmp103_;
                              _tmp101_ = vala_method_get_sentinel (m);
                              _tmp102_ = vala_ccode_constant_new (_tmp101_);
                              _tmp103_ = _tmp102_;
                              vala_ccode_function_call_add_argument (creation_call, (ValaCCodeExpression*) _tmp103_);
                              _vala_ccode_node_unref0 (_tmp103_);
                        }
                  }
                  _tmp104_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) creation_call);
                  _vala_ccode_node_unref0 (creation_expr);
                  creation_expr = _tmp104_;
                  _tmp105_ = vala_dova_base_module_get_custom_creturn_type (self, m);
                  _tmp106_ = _tmp105_;
                  _tmp107_ = _tmp106_ != NULL;
                  _g_free0 (_tmp106_);
                  if (_tmp107_) {
                        ValaDataType* _tmp108_ = NULL;
                        gchar* _tmp109_ = NULL;
                        gchar* _tmp110_;
                        ValaCCodeCastExpression* _tmp111_ = NULL;
                        _tmp108_ = vala_object_creation_expression_get_type_reference (expr);
                        _tmp109_ = vala_data_type_get_cname (_tmp108_);
                        _tmp110_ = _tmp109_;
                        _tmp111_ = vala_ccode_cast_expression_new (creation_expr, _tmp110_);
                        _vala_ccode_node_unref0 (creation_expr);
                        creation_expr = (ValaCCodeExpression*) _tmp111_;
                        _g_free0 (_tmp110_);
                  }
                  _vala_iterator_unref0 (params_it);
                  _vala_code_node_unref0 (cl);
                  _vala_ccode_node_unref0 (creation_call);
                  _vala_iterable_unref0 (params);
                  _vala_code_node_unref0 (m);
            } else {
                  g_assert (FALSE);
            }
      }
      if (instance != NULL) {
            ValaDataType* _tmp112_ = NULL;
            ValaTypeSymbol* _tmp113_ = NULL;
            ValaCCodeExpression* _tmp144_;
            _tmp112_ = vala_object_creation_expression_get_type_reference (expr);
            _tmp113_ = vala_data_type_get_data_type (_tmp112_);
            if (VALA_IS_STRUCT (_tmp113_)) {
                  ValaCCodeFunction* _tmp114_ = NULL;
                  _tmp114_ = vala_dova_base_module_get_ccode (self);
                  vala_ccode_function_add_expression (_tmp114_, creation_expr);
            } else {
                  ValaCCodeFunction* _tmp115_ = NULL;
                  _tmp115_ = vala_dova_base_module_get_ccode (self);
                  vala_ccode_function_add_assignment (_tmp115_, instance, creation_expr);
            }
            {
                  ValaList* _tmp116_ = NULL;
                  ValaList* _init_list;
                  gint _tmp117_;
                  gint _init_size;
                  gint _init_index;
                  _tmp116_ = vala_object_creation_expression_get_object_initializer (expr);
                  _init_list = _tmp116_;
                  _tmp117_ = vala_collection_get_size ((ValaCollection*) _init_list);
                  _init_size = _tmp117_;
                  _init_index = -1;
                  while (TRUE) {
                        gpointer _tmp118_ = NULL;
                        ValaMemberInitializer* init;
                        ValaSymbol* _tmp119_ = NULL;
                        _init_index = _init_index + 1;
                        if (!(_init_index < _init_size)) {
                              break;
                        }
                        _tmp118_ = vala_list_get (_init_list, _init_index);
                        init = (ValaMemberInitializer*) _tmp118_;
                        _tmp119_ = vala_member_initializer_get_symbol_reference (init);
                        if (VALA_IS_FIELD (_tmp119_)) {
                              ValaSymbol* _tmp120_ = NULL;
                              ValaField* _tmp121_;
                              ValaField* f;
                              ValaSymbol* _tmp122_ = NULL;
                              ValaDataType* _tmp123_ = NULL;
                              ValaDataType* instance_target_type;
                              ValaDataType* _tmp124_ = NULL;
                              ValaCCodeExpression* _tmp125_ = NULL;
                              ValaCCodeExpression* typed_inst;
                              ValaCCodeExpression* lhs = NULL;
                              ValaDataType* _tmp126_ = NULL;
                              ValaTypeSymbol* _tmp127_ = NULL;
                              ValaCCodeFunction* _tmp134_ = NULL;
                              ValaExpression* _tmp135_ = NULL;
                              ValaCCodeExpression* _tmp136_ = NULL;
                              ValaCCodeExpression* _tmp137_;
                              _tmp120_ = vala_member_initializer_get_symbol_reference (init);
                              _tmp121_ = _vala_code_node_ref0 (VALA_FIELD (_tmp120_));
                              f = _tmp121_;
                              _tmp122_ = vala_symbol_get_parent_symbol ((ValaSymbol*) f);
                              _tmp123_ = vala_dova_base_module_get_data_type_for_symbol (VALA_TYPESYMBOL (_tmp122_));
                              instance_target_type = _tmp123_;
                              _tmp124_ = vala_object_creation_expression_get_type_reference (expr);
                              _tmp125_ = vala_dova_base_module_transform_expression (self, instance, _tmp124_, instance_target_type, NULL);
                              typed_inst = _tmp125_;
                              _tmp126_ = vala_object_creation_expression_get_type_reference (expr);
                              _tmp127_ = vala_data_type_get_data_type (_tmp126_);
                              if (VALA_IS_STRUCT (_tmp127_)) {
                                    gchar* _tmp128_ = NULL;
                                    gchar* _tmp129_;
                                    ValaCCodeMemberAccess* _tmp130_ = NULL;
                                    _tmp128_ = vala_field_get_cname (f);
                                    _tmp129_ = _tmp128_;
                                    _tmp130_ = vala_ccode_member_access_new (typed_inst, _tmp129_, FALSE);
                                    _vala_ccode_node_unref0 (lhs);
                                    lhs = (ValaCCodeExpression*) _tmp130_;
                                    _g_free0 (_tmp129_);
                              } else {
                                    gchar* _tmp131_ = NULL;
                                    gchar* _tmp132_;
                                    ValaCCodeMemberAccess* _tmp133_ = NULL;
                                    _tmp131_ = vala_field_get_cname (f);
                                    _tmp132_ = _tmp131_;
                                    _tmp133_ = vala_ccode_member_access_new_pointer (typed_inst, _tmp132_);
                                    _vala_ccode_node_unref0 (lhs);
                                    lhs = (ValaCCodeExpression*) _tmp133_;
                                    _g_free0 (_tmp132_);
                              }
                              _tmp134_ = vala_dova_base_module_get_ccode (self);
                              _tmp135_ = vala_member_initializer_get_initializer (init);
                              _tmp136_ = vala_dova_base_module_get_cvalue (self, _tmp135_);
                              _tmp137_ = _tmp136_;
                              vala_ccode_function_add_assignment (_tmp134_, lhs, _tmp137_);
                              _vala_ccode_node_unref0 (_tmp137_);
                              _vala_ccode_node_unref0 (lhs);
                              _vala_ccode_node_unref0 (typed_inst);
                              _vala_code_node_unref0 (instance_target_type);
                              _vala_code_node_unref0 (f);
                        } else {
                              ValaSymbol* _tmp138_ = NULL;
                              _tmp138_ = vala_member_initializer_get_symbol_reference (init);
                              if (VALA_IS_PROPERTY (_tmp138_)) {
                                    ValaMemberAccess* _tmp139_ = NULL;
                                    ValaMemberAccess* inst_ma;
                                    ValaDataType* _tmp140_ = NULL;
                                    ValaSymbol* _tmp141_ = NULL;
                                    ValaExpression* _tmp142_ = NULL;
                                    ValaTargetValue* _tmp143_ = NULL;
                                    _tmp139_ = vala_member_access_new_simple ("new", NULL);
                                    inst_ma = _tmp139_;
                                    _tmp140_ = vala_object_creation_expression_get_type_reference (expr);
                                    vala_expression_set_value_type ((ValaExpression*) inst_ma, _tmp140_);
                                    vala_dova_base_module_set_cvalue (self, (ValaExpression*) inst_ma, instance);
                                    _tmp141_ = vala_member_initializer_get_symbol_reference (init);
                                    _tmp142_ = vala_member_initializer_get_initializer (init);
                                    _tmp143_ = vala_expression_get_target_value (_tmp142_);
                                    vala_dova_base_module_store_property (self, VALA_PROPERTY (_tmp141_), (ValaExpression*) inst_ma, _tmp143_);
                                    _vala_code_node_unref0 (inst_ma);
                              }
                        }
                        _vala_code_node_unref0 (init);
                  }
                  _vala_iterable_unref0 (_init_list);
            }
            _tmp144_ = _vala_ccode_node_ref0 (instance);
            _vala_ccode_node_unref0 (creation_expr);
            creation_expr = _tmp144_;
      }
      if (creation_expr != NULL) {
            ValaDataType* _tmp145_ = NULL;
            ValaLocalVariable* _tmp146_ = NULL;
            ValaLocalVariable* temp_var;
            const gchar* _tmp147_ = NULL;
            ValaCCodeExpression* _tmp148_ = NULL;
            ValaCCodeExpression* temp_ref;
            ValaCCodeFunction* _tmp149_ = NULL;
            _tmp145_ = vala_expression_get_value_type ((ValaExpression*) expr);
            _tmp146_ = vala_dova_base_module_get_temp_variable (self, _tmp145_, TRUE, NULL);
            temp_var = _tmp146_;
            _tmp147_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
            _tmp148_ = vala_dova_base_module_get_variable_cexpression (self, _tmp147_);
            temp_ref = _tmp148_;
            vala_dova_base_module_emit_temp_var (self, temp_var);
            _tmp149_ = vala_dova_base_module_get_ccode (self);
            vala_ccode_function_add_assignment (_tmp149_, temp_ref, creation_expr);
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, temp_ref);
            _vala_ccode_node_unref0 (temp_ref);
            _vala_code_node_unref0 (temp_var);
      }
      _vala_code_node_unref0 (st);
      _vala_ccode_node_unref0 (creation_expr);
      _vala_ccode_node_unref0 (instance);
}


ValaCCodeExpression* vala_dova_base_module_handle_struct_argument (ValaDovaBaseModule* self, ValaParameter* param, ValaExpression* arg, ValaCCodeExpression* cexpr) {
      ValaCCodeExpression* result = NULL;
      gboolean _tmp0_ = FALSE;
      ValaDataType* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp25_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (param != NULL, NULL);
      g_return_val_if_fail (arg != NULL, NULL);
      _tmp1_ = vala_expression_get_formal_target_type (arg);
      if (VALA_IS_GENERIC_TYPE (_tmp1_)) {
            ValaDataType* _tmp2_ = NULL;
            _tmp2_ = vala_expression_get_target_type (arg);
            _tmp0_ = !VALA_IS_GENERIC_TYPE (_tmp2_);
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            ValaParameterDirection _tmp3_;
            _tmp3_ = vala_parameter_get_direction (param);
            if (_tmp3_ == VALA_PARAMETER_DIRECTION_IN) {
                  ValaCCodeExpression* _tmp4_;
                  ValaCCodeUnaryExpression* _tmp5_;
                  ValaCCodeUnaryExpression* unary;
                  gboolean _tmp6_ = FALSE;
                  _tmp4_ = cexpr;
                  _tmp5_ = _vala_ccode_node_ref0 (VALA_IS_CCODE_UNARY_EXPRESSION (_tmp4_) ? ((ValaCCodeUnaryExpression*) _tmp4_) : NULL);
                  unary = _tmp5_;
                  if (unary != NULL) {
                        ValaCCodeUnaryOperator _tmp7_;
                        _tmp7_ = vala_ccode_unary_expression_get_operator (unary);
                        _tmp6_ = _tmp7_ == VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION;
                  } else {
                        _tmp6_ = FALSE;
                  }
                  if (_tmp6_) {
                        ValaCCodeExpression* _tmp8_ = NULL;
                        ValaCCodeExpression* _tmp9_;
                        _tmp8_ = vala_ccode_unary_expression_get_inner (unary);
                        _tmp9_ = _vala_ccode_node_ref0 (_tmp8_);
                        result = _tmp9_;
                        _vala_ccode_node_unref0 (unary);
                        return result;
                  } else {
                        gboolean _tmp10_ = FALSE;
                        if (VALA_IS_CCODE_IDENTIFIER (cexpr)) {
                              _tmp10_ = TRUE;
                        } else {
                              _tmp10_ = VALA_IS_CCODE_MEMBER_ACCESS (cexpr);
                        }
                        if (_tmp10_) {
                              ValaCCodeUnaryExpression* _tmp11_ = NULL;
                              _tmp11_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cexpr);
                              result = (ValaCCodeExpression*) _tmp11_;
                              _vala_ccode_node_unref0 (unary);
                              return result;
                        } else {
                              ValaCCodeCommaExpression* _tmp12_ = NULL;
                              ValaCCodeCommaExpression* ccomma;
                              ValaDataType* _tmp13_ = NULL;
                              ValaLocalVariable* _tmp14_ = NULL;
                              ValaLocalVariable* temp_var;
                              const gchar* _tmp15_ = NULL;
                              ValaCCodeExpression* _tmp16_ = NULL;
                              ValaCCodeExpression* _tmp17_;
                              ValaCCodeAssignment* _tmp18_ = NULL;
                              ValaCCodeAssignment* _tmp19_;
                              const gchar* _tmp20_ = NULL;
                              ValaCCodeIdentifier* _tmp21_ = NULL;
                              ValaCCodeIdentifier* _tmp22_;
                              ValaCCodeUnaryExpression* _tmp23_ = NULL;
                              ValaCCodeUnaryExpression* _tmp24_;
                              _tmp12_ = vala_ccode_comma_expression_new ();
                              ccomma = _tmp12_;
                              _tmp13_ = vala_expression_get_target_type (arg);
                              _tmp14_ = vala_dova_base_module_get_temp_variable (self, _tmp13_, TRUE, NULL);
                              temp_var = _tmp14_;
                              vala_dova_base_module_emit_temp_var (self, temp_var);
                              _tmp15_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
                              _tmp16_ = vala_dova_base_module_get_variable_cexpression (self, _tmp15_);
                              _tmp17_ = _tmp16_;
                              _tmp18_ = vala_ccode_assignment_new (_tmp17_, cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                              _tmp19_ = _tmp18_;
                              vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp19_);
                              _vala_ccode_node_unref0 (_tmp19_);
                              _vala_ccode_node_unref0 (_tmp17_);
                              _tmp20_ = vala_symbol_get_name ((ValaSymbol*) temp_var);
                              _tmp21_ = vala_ccode_identifier_new (_tmp20_);
                              _tmp22_ = _tmp21_;
                              _tmp23_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp22_);
                              _tmp24_ = _tmp23_;
                              vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp24_);
                              _vala_ccode_node_unref0 (_tmp24_);
                              _vala_ccode_node_unref0 (_tmp22_);
                              result = (ValaCCodeExpression*) ccomma;
                              _vala_code_node_unref0 (temp_var);
                              _vala_ccode_node_unref0 (unary);
                              return result;
                        }
                  }
                  _vala_ccode_node_unref0 (unary);
            }
      }
      _tmp25_ = _vala_ccode_node_ref0 (cexpr);
      result = _tmp25_;
      return result;
}


static void vala_dova_base_module_real_visit_sizeof_expression (ValaCodeVisitor* base, ValaSizeofExpression* expr) {
      ValaDovaBaseModule * self;
      ValaCCodeIdentifier* _tmp0_ = NULL;
      ValaCCodeIdentifier* _tmp1_;
      ValaCCodeFunctionCall* _tmp2_ = NULL;
      ValaCCodeFunctionCall* _tmp3_;
      ValaCCodeFunctionCall* csizeof;
      ValaDataType* _tmp4_ = NULL;
      gchar* _tmp5_ = NULL;
      gchar* _tmp6_;
      ValaCCodeIdentifier* _tmp7_ = NULL;
      ValaCCodeIdentifier* _tmp8_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_ccode_identifier_new ("sizeof");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp1_);
      _tmp3_ = _tmp2_;
      _vala_ccode_node_unref0 (_tmp1_);
      csizeof = _tmp3_;
      _tmp4_ = vala_sizeof_expression_get_type_reference (expr);
      _tmp5_ = vala_data_type_get_cname (_tmp4_);
      _tmp6_ = _tmp5_;
      _tmp7_ = vala_ccode_identifier_new (_tmp6_);
      _tmp8_ = _tmp7_;
      vala_ccode_function_call_add_argument (csizeof, (ValaCCodeExpression*) _tmp8_);
      _vala_ccode_node_unref0 (_tmp8_);
      _g_free0 (_tmp6_);
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) csizeof);
      _vala_ccode_node_unref0 (csizeof);
}


static void vala_dova_base_module_real_visit_typeof_expression (ValaCodeVisitor* base, ValaTypeofExpression* expr) {
      ValaDovaBaseModule * self;
      ValaDataType* _tmp0_ = NULL;
      ValaCCodeExpression* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp2_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_typeof_expression_get_type_reference (expr);
      _tmp1_ = vala_dova_base_module_get_type_id_expression (self, _tmp0_, FALSE);
      _tmp2_ = _tmp1_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, _tmp2_);
      _vala_ccode_node_unref0 (_tmp2_);
}


static void vala_dova_base_module_real_visit_unary_expression (ValaCodeVisitor* base, ValaUnaryExpression* expr) {
      ValaDovaBaseModule * self;
      ValaCCodeUnaryOperator op = 0;
      ValaUnaryOperator _tmp0_;
      ValaExpression* _tmp8_ = NULL;
      ValaCCodeExpression* _tmp9_ = NULL;
      ValaCCodeExpression* _tmp10_;
      ValaCCodeUnaryExpression* _tmp11_ = NULL;
      ValaCCodeUnaryExpression* _tmp12_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_unary_expression_get_operator (expr);
      if (_tmp0_ == VALA_UNARY_OPERATOR_PLUS) {
            op = VALA_CCODE_UNARY_OPERATOR_PLUS;
      } else {
            ValaUnaryOperator _tmp1_;
            _tmp1_ = vala_unary_expression_get_operator (expr);
            if (_tmp1_ == VALA_UNARY_OPERATOR_MINUS) {
                  op = VALA_CCODE_UNARY_OPERATOR_MINUS;
            } else {
                  ValaUnaryOperator _tmp2_;
                  _tmp2_ = vala_unary_expression_get_operator (expr);
                  if (_tmp2_ == VALA_UNARY_OPERATOR_LOGICAL_NEGATION) {
                        op = VALA_CCODE_UNARY_OPERATOR_LOGICAL_NEGATION;
                  } else {
                        ValaUnaryOperator _tmp3_;
                        _tmp3_ = vala_unary_expression_get_operator (expr);
                        if (_tmp3_ == VALA_UNARY_OPERATOR_BITWISE_COMPLEMENT) {
                              op = VALA_CCODE_UNARY_OPERATOR_BITWISE_COMPLEMENT;
                        } else {
                              ValaUnaryOperator _tmp4_;
                              _tmp4_ = vala_unary_expression_get_operator (expr);
                              if (_tmp4_ == VALA_UNARY_OPERATOR_INCREMENT) {
                                    op = VALA_CCODE_UNARY_OPERATOR_PREFIX_INCREMENT;
                              } else {
                                    ValaUnaryOperator _tmp5_;
                                    _tmp5_ = vala_unary_expression_get_operator (expr);
                                    if (_tmp5_ == VALA_UNARY_OPERATOR_DECREMENT) {
                                          op = VALA_CCODE_UNARY_OPERATOR_PREFIX_DECREMENT;
                                    } else {
                                          ValaUnaryOperator _tmp6_;
                                          _tmp6_ = vala_unary_expression_get_operator (expr);
                                          if (_tmp6_ == VALA_UNARY_OPERATOR_REF) {
                                                op = VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF;
                                          } else {
                                                ValaUnaryOperator _tmp7_;
                                                _tmp7_ = vala_unary_expression_get_operator (expr);
                                                if (_tmp7_ == VALA_UNARY_OPERATOR_OUT) {
                                                      op = VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF;
                                                } else {
                                                      g_assert_not_reached ();
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
      }
      _tmp8_ = vala_unary_expression_get_inner (expr);
      _tmp9_ = vala_dova_base_module_get_cvalue (self, _tmp8_);
      _tmp10_ = _tmp9_;
      _tmp11_ = vala_ccode_unary_expression_new (op, _tmp10_);
      _tmp12_ = _tmp11_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp12_);
      _vala_ccode_node_unref0 (_tmp12_);
      _vala_ccode_node_unref0 (_tmp10_);
}


static void vala_dova_base_module_real_visit_cast_expression (ValaCodeVisitor* base, ValaCastExpression* expr) {
      ValaDovaBaseModule * self;
      gboolean _tmp0_;
      gboolean _tmp25_ = FALSE;
      ValaDataType* _tmp26_ = NULL;
      ValaTypeSymbol* _tmp27_ = NULL;
      ValaDataType* _tmp92_ = NULL;
      gboolean _tmp93_ = FALSE;
      ValaExpression* _tmp94_ = NULL;
      ValaDataType* _tmp95_ = NULL;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_cast_expression_get_is_silent_cast (expr);
      if (_tmp0_) {
            ValaExpression* _tmp1_ = NULL;
            ValaDataType* _tmp2_ = NULL;
            _tmp1_ = vala_cast_expression_get_inner (expr);
            _tmp2_ = vala_expression_get_value_type (_tmp1_);
            if (VALA_IS_OBJECT_TYPE (_tmp2_)) {
                  ValaCCodeCommaExpression* _tmp3_ = NULL;
                  ValaCCodeCommaExpression* ccomma;
                  ValaExpression* _tmp4_ = NULL;
                  ValaDataType* _tmp5_ = NULL;
                  ValaLocalVariable* _tmp6_ = NULL;
                  ValaLocalVariable* temp_decl;
                  const gchar* _tmp7_ = NULL;
                  ValaCCodeExpression* _tmp8_ = NULL;
                  ValaCCodeExpression* ctemp;
                  ValaExpression* _tmp9_ = NULL;
                  ValaCCodeExpression* _tmp10_ = NULL;
                  ValaCCodeExpression* _tmp11_;
                  ValaCCodeAssignment* _tmp12_ = NULL;
                  ValaCCodeAssignment* _tmp13_;
                  ValaCCodeAssignment* cinit;
                  ValaDataType* _tmp14_ = NULL;
                  ValaCCodeExpression* _tmp15_ = NULL;
                  ValaCCodeExpression* ccheck;
                  ValaDataType* _tmp16_ = NULL;
                  gchar* _tmp17_ = NULL;
                  gchar* _tmp18_;
                  ValaCCodeCastExpression* _tmp19_ = NULL;
                  ValaCCodeCastExpression* _tmp20_;
                  ValaCCodeCastExpression* ccast;
                  ValaCCodeConstant* _tmp21_ = NULL;
                  ValaCCodeConstant* cnull;
                  ValaCCodeConditionalExpression* _tmp22_ = NULL;
                  ValaCCodeConditionalExpression* _tmp23_;
                  _tmp3_ = vala_ccode_comma_expression_new ();
                  ccomma = _tmp3_;
                  _tmp4_ = vala_cast_expression_get_inner (expr);
                  _tmp5_ = vala_expression_get_value_type (_tmp4_);
                  _tmp6_ = vala_dova_base_module_get_temp_variable (self, _tmp5_, TRUE, (ValaCodeNode*) expr);
                  temp_decl = _tmp6_;
                  vala_dova_base_module_emit_temp_var (self, temp_decl);
                  _tmp7_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
                  _tmp8_ = vala_dova_base_module_get_variable_cexpression (self, _tmp7_);
                  ctemp = _tmp8_;
                  _tmp9_ = vala_cast_expression_get_inner (expr);
                  _tmp10_ = vala_dova_base_module_get_cvalue (self, _tmp9_);
                  _tmp11_ = _tmp10_;
                  _tmp12_ = vala_ccode_assignment_new (ctemp, _tmp11_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                  _tmp13_ = _tmp12_;
                  _vala_ccode_node_unref0 (_tmp11_);
                  cinit = _tmp13_;
                  _tmp14_ = vala_cast_expression_get_type_reference (expr);
                  _tmp15_ = vala_dova_base_module_create_type_check (self, (ValaCCodeNode*) ctemp, _tmp14_);
                  ccheck = _tmp15_;
                  _tmp16_ = vala_cast_expression_get_type_reference (expr);
                  _tmp17_ = vala_data_type_get_cname (_tmp16_);
                  _tmp18_ = _tmp17_;
                  _tmp19_ = vala_ccode_cast_expression_new (ctemp, _tmp18_);
                  _tmp20_ = _tmp19_;
                  _g_free0 (_tmp18_);
                  ccast = _tmp20_;
                  _tmp21_ = vala_ccode_constant_new ("NULL");
                  cnull = _tmp21_;
                  vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) cinit);
                  _tmp22_ = vala_ccode_conditional_expression_new (ccheck, (ValaCCodeExpression*) ccast, (ValaCCodeExpression*) cnull);
                  _tmp23_ = _tmp22_;
                  vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp23_);
                  _vala_ccode_node_unref0 (_tmp23_);
                  vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) ccomma);
                  _vala_ccode_node_unref0 (cnull);
                  _vala_ccode_node_unref0 (ccast);
                  _vala_ccode_node_unref0 (ccheck);
                  _vala_ccode_node_unref0 (cinit);
                  _vala_ccode_node_unref0 (ctemp);
                  _vala_code_node_unref0 (temp_decl);
                  _vala_ccode_node_unref0 (ccomma);
            } else {
                  ValaSourceReference* _tmp24_ = NULL;
                  vala_code_node_set_error ((ValaCodeNode*) expr, TRUE);
                  _tmp24_ = vala_code_node_get_source_reference ((ValaCodeNode*) expr);
                  vala_report_error (_tmp24_, "Operation not supported for this type");
            }
            return;
      }
      _tmp26_ = vala_cast_expression_get_type_reference (expr);
      _tmp27_ = vala_data_type_get_data_type (_tmp26_);
      if (_tmp27_ != NULL) {
            ValaDataType* _tmp28_ = NULL;
            ValaTypeSymbol* _tmp29_ = NULL;
            gchar* _tmp30_ = NULL;
            gchar* _tmp31_;
            _tmp28_ = vala_cast_expression_get_type_reference (expr);
            _tmp29_ = vala_data_type_get_data_type (_tmp28_);
            _tmp30_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp29_);
            _tmp31_ = _tmp30_;
            _tmp25_ = g_strcmp0 (_tmp31_, "Dova.Value") == 0;
            _g_free0 (_tmp31_);
      } else {
            _tmp25_ = FALSE;
      }
      if (_tmp25_) {
            ValaExpression* _tmp32_ = NULL;
            ValaDataType* _tmp33_ = NULL;
            ValaLocalVariable* _tmp34_ = NULL;
            ValaLocalVariable* temp_decl;
            const gchar* _tmp35_ = NULL;
            ValaCCodeExpression* _tmp36_ = NULL;
            ValaCCodeExpression* cvar;
            ValaCCodeCommaExpression* _tmp37_ = NULL;
            ValaCCodeCommaExpression* ccomma;
            ValaExpression* _tmp38_ = NULL;
            ValaCCodeExpression* _tmp39_ = NULL;
            ValaCCodeExpression* _tmp40_;
            ValaCCodeAssignment* _tmp41_ = NULL;
            ValaCCodeAssignment* _tmp42_;
            ValaCCodeIdentifier* _tmp43_ = NULL;
            ValaCCodeIdentifier* _tmp44_;
            ValaCCodeFunctionCall* _tmp45_ = NULL;
            ValaCCodeFunctionCall* _tmp46_;
            ValaCCodeFunctionCall* to_any;
            ValaExpression* _tmp47_ = NULL;
            ValaDataType* _tmp48_ = NULL;
            ValaCCodeExpression* _tmp49_ = NULL;
            ValaCCodeExpression* _tmp50_;
            ValaCCodeUnaryExpression* _tmp51_ = NULL;
            ValaCCodeUnaryExpression* _tmp52_;
            ValaCCodeConstant* _tmp53_ = NULL;
            ValaCCodeConstant* _tmp54_;
            _tmp32_ = vala_cast_expression_get_inner (expr);
            _tmp33_ = vala_expression_get_value_type (_tmp32_);
            _tmp34_ = vala_dova_base_module_get_temp_variable (self, _tmp33_, TRUE, (ValaCodeNode*) expr);
            temp_decl = _tmp34_;
            vala_dova_base_module_emit_temp_var (self, temp_decl);
            _tmp35_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
            _tmp36_ = vala_dova_base_module_get_variable_cexpression (self, _tmp35_);
            cvar = _tmp36_;
            _tmp37_ = vala_ccode_comma_expression_new ();
            ccomma = _tmp37_;
            _tmp38_ = vala_cast_expression_get_inner (expr);
            _tmp39_ = vala_dova_base_module_get_cvalue (self, _tmp38_);
            _tmp40_ = _tmp39_;
            _tmp41_ = vala_ccode_assignment_new (cvar, _tmp40_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
            _tmp42_ = _tmp41_;
            vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp42_);
            _vala_ccode_node_unref0 (_tmp42_);
            _vala_ccode_node_unref0 (_tmp40_);
            _tmp43_ = vala_ccode_identifier_new ("dova_type_value_to_any");
            _tmp44_ = _tmp43_;
            _tmp45_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp44_);
            _tmp46_ = _tmp45_;
            _vala_ccode_node_unref0 (_tmp44_);
            to_any = _tmp46_;
            _tmp47_ = vala_cast_expression_get_inner (expr);
            _tmp48_ = vala_expression_get_value_type (_tmp47_);
            _tmp49_ = vala_dova_base_module_get_type_id_expression (self, _tmp48_, FALSE);
            _tmp50_ = _tmp49_;
            vala_ccode_function_call_add_argument (to_any, _tmp50_);
            _vala_ccode_node_unref0 (_tmp50_);
            _tmp51_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cvar);
            _tmp52_ = _tmp51_;
            vala_ccode_function_call_add_argument (to_any, (ValaCCodeExpression*) _tmp52_);
            _vala_ccode_node_unref0 (_tmp52_);
            _tmp53_ = vala_ccode_constant_new ("0");
            _tmp54_ = _tmp53_;
            vala_ccode_function_call_add_argument (to_any, (ValaCCodeExpression*) _tmp54_);
            _vala_ccode_node_unref0 (_tmp54_);
            vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) to_any);
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) ccomma);
            _vala_ccode_node_unref0 (to_any);
            _vala_ccode_node_unref0 (ccomma);
            _vala_ccode_node_unref0 (cvar);
            _vala_code_node_unref0 (temp_decl);
            return;
      } else {
            gboolean _tmp55_ = FALSE;
            ValaExpression* _tmp56_ = NULL;
            ValaDataType* _tmp57_ = NULL;
            ValaTypeSymbol* _tmp58_ = NULL;
            _tmp56_ = vala_cast_expression_get_inner (expr);
            _tmp57_ = vala_expression_get_value_type (_tmp56_);
            _tmp58_ = vala_data_type_get_data_type (_tmp57_);
            if (_tmp58_ != NULL) {
                  ValaExpression* _tmp59_ = NULL;
                  ValaDataType* _tmp60_ = NULL;
                  ValaTypeSymbol* _tmp61_ = NULL;
                  gchar* _tmp62_ = NULL;
                  gchar* _tmp63_;
                  _tmp59_ = vala_cast_expression_get_inner (expr);
                  _tmp60_ = vala_expression_get_value_type (_tmp59_);
                  _tmp61_ = vala_data_type_get_data_type (_tmp60_);
                  _tmp62_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp61_);
                  _tmp63_ = _tmp62_;
                  _tmp55_ = g_strcmp0 (_tmp63_, "Dova.Value") == 0;
                  _g_free0 (_tmp63_);
            } else {
                  _tmp55_ = FALSE;
            }
            if (_tmp55_) {
                  ValaDataType* _tmp64_ = NULL;
                  ValaLocalVariable* _tmp65_ = NULL;
                  ValaLocalVariable* temp_decl;
                  const gchar* _tmp66_ = NULL;
                  ValaCCodeExpression* _tmp67_ = NULL;
                  ValaCCodeExpression* cvar;
                  ValaCCodeCommaExpression* _tmp68_ = NULL;
                  ValaCCodeCommaExpression* ccomma;
                  ValaCCodeIdentifier* _tmp69_ = NULL;
                  ValaCCodeIdentifier* _tmp70_;
                  ValaCCodeFunctionCall* _tmp71_ = NULL;
                  ValaCCodeFunctionCall* _tmp72_;
                  ValaCCodeFunctionCall* sizeof_call;
                  ValaDataType* _tmp73_ = NULL;
                  gchar* _tmp74_ = NULL;
                  gchar* _tmp75_;
                  ValaCCodeIdentifier* _tmp76_ = NULL;
                  ValaCCodeIdentifier* _tmp77_;
                  ValaCCodeIdentifier* _tmp78_ = NULL;
                  ValaCCodeIdentifier* _tmp79_;
                  ValaCCodeFunctionCall* _tmp80_ = NULL;
                  ValaCCodeFunctionCall* _tmp81_;
                  ValaCCodeFunctionCall* to_any;
                  ValaDataType* _tmp82_ = NULL;
                  ValaCCodeExpression* _tmp83_ = NULL;
                  ValaCCodeExpression* _tmp84_;
                  ValaExpression* _tmp85_ = NULL;
                  ValaCCodeExpression* _tmp86_ = NULL;
                  ValaCCodeExpression* _tmp87_;
                  ValaCCodeUnaryExpression* _tmp88_ = NULL;
                  ValaCCodeUnaryExpression* _tmp89_;
                  ValaCCodeConstant* _tmp90_ = NULL;
                  ValaCCodeConstant* _tmp91_;
                  _tmp64_ = vala_cast_expression_get_type_reference (expr);
                  _tmp65_ = vala_dova_base_module_get_temp_variable (self, _tmp64_, TRUE, (ValaCodeNode*) expr);
                  temp_decl = _tmp65_;
                  vala_dova_base_module_emit_temp_var (self, temp_decl);
                  _tmp66_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
                  _tmp67_ = vala_dova_base_module_get_variable_cexpression (self, _tmp66_);
                  cvar = _tmp67_;
                  _tmp68_ = vala_ccode_comma_expression_new ();
                  ccomma = _tmp68_;
                  _tmp69_ = vala_ccode_identifier_new ("sizeof");
                  _tmp70_ = _tmp69_;
                  _tmp71_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp70_);
                  _tmp72_ = _tmp71_;
                  _vala_ccode_node_unref0 (_tmp70_);
                  sizeof_call = _tmp72_;
                  _tmp73_ = vala_cast_expression_get_type_reference (expr);
                  _tmp74_ = vala_data_type_get_cname (_tmp73_);
                  _tmp75_ = _tmp74_;
                  _tmp76_ = vala_ccode_identifier_new (_tmp75_);
                  _tmp77_ = _tmp76_;
                  vala_ccode_function_call_add_argument (sizeof_call, (ValaCCodeExpression*) _tmp77_);
                  _vala_ccode_node_unref0 (_tmp77_);
                  _g_free0 (_tmp75_);
                  _tmp78_ = vala_ccode_identifier_new ("dova_type_value_from_any");
                  _tmp79_ = _tmp78_;
                  _tmp80_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp79_);
                  _tmp81_ = _tmp80_;
                  _vala_ccode_node_unref0 (_tmp79_);
                  to_any = _tmp81_;
                  _tmp82_ = vala_cast_expression_get_type_reference (expr);
                  _tmp83_ = vala_dova_base_module_get_type_id_expression (self, _tmp82_, FALSE);
                  _tmp84_ = _tmp83_;
                  vala_ccode_function_call_add_argument (to_any, _tmp84_);
                  _vala_ccode_node_unref0 (_tmp84_);
                  _tmp85_ = vala_cast_expression_get_inner (expr);
                  _tmp86_ = vala_dova_base_module_get_cvalue (self, _tmp85_);
                  _tmp87_ = _tmp86_;
                  vala_ccode_function_call_add_argument (to_any, _tmp87_);
                  _vala_ccode_node_unref0 (_tmp87_);
                  _tmp88_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, cvar);
                  _tmp89_ = _tmp88_;
                  vala_ccode_function_call_add_argument (to_any, (ValaCCodeExpression*) _tmp89_);
                  _vala_ccode_node_unref0 (_tmp89_);
                  _tmp90_ = vala_ccode_constant_new ("0");
                  _tmp91_ = _tmp90_;
                  vala_ccode_function_call_add_argument (to_any, (ValaCCodeExpression*) _tmp91_);
                  _vala_ccode_node_unref0 (_tmp91_);
                  vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) to_any);
                  vala_ccode_comma_expression_append_expression (ccomma, cvar);
                  vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) ccomma);
                  _vala_ccode_node_unref0 (to_any);
                  _vala_ccode_node_unref0 (sizeof_call);
                  _vala_ccode_node_unref0 (ccomma);
                  _vala_ccode_node_unref0 (cvar);
                  _vala_code_node_unref0 (temp_decl);
                  return;
            }
      }
      _tmp92_ = vala_cast_expression_get_type_reference (expr);
      vala_dova_base_module_generate_type_declaration (self, _tmp92_, self->cfile);
      _tmp94_ = vala_cast_expression_get_inner (expr);
      _tmp95_ = vala_expression_get_value_type (_tmp94_);
      if (VALA_IS_GENERIC_TYPE (_tmp95_)) {
            ValaDataType* _tmp96_ = NULL;
            _tmp96_ = vala_cast_expression_get_type_reference (expr);
            _tmp93_ = !VALA_IS_GENERIC_TYPE (_tmp96_);
      } else {
            _tmp93_ = FALSE;
      }
      if (_tmp93_) {
            ValaExpression* _tmp97_ = NULL;
            ValaCCodeExpression* _tmp98_ = NULL;
            ValaCCodeExpression* _tmp99_;
            ValaDataType* _tmp100_ = NULL;
            gchar* _tmp101_ = NULL;
            gchar* _tmp102_;
            gchar* _tmp103_;
            gchar* _tmp104_;
            ValaCCodeCastExpression* _tmp105_ = NULL;
            ValaCCodeCastExpression* _tmp106_;
            ValaCCodeUnaryExpression* _tmp107_ = NULL;
            ValaCCodeUnaryExpression* _tmp108_;
            _tmp97_ = vala_cast_expression_get_inner (expr);
            _tmp98_ = vala_dova_base_module_get_cvalue (self, _tmp97_);
            _tmp99_ = _tmp98_;
            _tmp100_ = vala_cast_expression_get_type_reference (expr);
            _tmp101_ = vala_data_type_get_cname (_tmp100_);
            _tmp102_ = _tmp101_;
            _tmp103_ = g_strconcat (_tmp102_, "*", NULL);
            _tmp104_ = _tmp103_;
            _tmp105_ = vala_ccode_cast_expression_new (_tmp99_, _tmp104_);
            _tmp106_ = _tmp105_;
            _tmp107_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp106_);
            _tmp108_ = _tmp107_;
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp108_);
            _vala_ccode_node_unref0 (_tmp108_);
            _vala_ccode_node_unref0 (_tmp106_);
            _g_free0 (_tmp104_);
            _g_free0 (_tmp102_);
            _vala_ccode_node_unref0 (_tmp99_);
      } else {
            ValaExpression* _tmp109_ = NULL;
            ValaCCodeExpression* _tmp110_ = NULL;
            ValaCCodeExpression* _tmp111_;
            ValaDataType* _tmp112_ = NULL;
            gchar* _tmp113_ = NULL;
            gchar* _tmp114_;
            ValaCCodeCastExpression* _tmp115_ = NULL;
            ValaCCodeCastExpression* _tmp116_;
            _tmp109_ = vala_cast_expression_get_inner (expr);
            _tmp110_ = vala_dova_base_module_get_cvalue (self, _tmp109_);
            _tmp111_ = _tmp110_;
            _tmp112_ = vala_cast_expression_get_type_reference (expr);
            _tmp113_ = vala_data_type_get_cname (_tmp112_);
            _tmp114_ = _tmp113_;
            _tmp115_ = vala_ccode_cast_expression_new (_tmp111_, _tmp114_);
            _tmp116_ = _tmp115_;
            vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp116_);
            _vala_ccode_node_unref0 (_tmp116_);
            _g_free0 (_tmp114_);
            _vala_ccode_node_unref0 (_tmp111_);
      }
}


static void vala_dova_base_module_real_visit_pointer_indirection (ValaCodeVisitor* base, ValaPointerIndirection* expr) {
      ValaDovaBaseModule * self;
      ValaExpression* _tmp0_ = NULL;
      ValaCCodeExpression* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp2_;
      ValaCCodeUnaryExpression* _tmp3_ = NULL;
      ValaCCodeUnaryExpression* _tmp4_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_pointer_indirection_get_inner (expr);
      _tmp1_ = vala_dova_base_module_get_cvalue (self, _tmp0_);
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp2_);
      _tmp4_ = _tmp3_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp4_);
      _vala_ccode_node_unref0 (_tmp4_);
      _vala_ccode_node_unref0 (_tmp2_);
}


static void vala_dova_base_module_real_visit_addressof_expression (ValaCodeVisitor* base, ValaAddressofExpression* expr) {
      ValaDovaBaseModule * self;
      ValaExpression* _tmp0_ = NULL;
      ValaCCodeExpression* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp2_;
      ValaCCodeUnaryExpression* _tmp3_ = NULL;
      ValaCCodeUnaryExpression* _tmp4_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_addressof_expression_get_inner (expr);
      _tmp1_ = vala_dova_base_module_get_cvalue (self, _tmp0_);
      _tmp2_ = _tmp1_;
      _tmp3_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp2_);
      _tmp4_ = _tmp3_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp4_);
      _vala_ccode_node_unref0 (_tmp4_);
      _vala_ccode_node_unref0 (_tmp2_);
}


static void vala_dova_base_module_real_visit_reference_transfer_expression (ValaCodeVisitor* base, ValaReferenceTransferExpression* expr) {
      ValaDovaBaseModule * self;
      ValaCCodeCommaExpression* _tmp0_ = NULL;
      ValaCCodeCommaExpression* ccomma;
      ValaDataType* _tmp1_ = NULL;
      ValaLocalVariable* _tmp2_ = NULL;
      ValaLocalVariable* temp_decl;
      const gchar* _tmp3_ = NULL;
      ValaCCodeExpression* _tmp4_ = NULL;
      ValaCCodeExpression* cvar;
      ValaExpression* _tmp5_ = NULL;
      ValaCCodeExpression* _tmp6_ = NULL;
      ValaCCodeExpression* _tmp7_;
      ValaCCodeAssignment* _tmp8_ = NULL;
      ValaCCodeAssignment* _tmp9_;
      ValaExpression* _tmp10_ = NULL;
      ValaCCodeExpression* _tmp11_ = NULL;
      ValaCCodeExpression* _tmp12_;
      ValaCCodeConstant* _tmp13_ = NULL;
      ValaCCodeConstant* _tmp14_;
      ValaCCodeAssignment* _tmp15_ = NULL;
      ValaCCodeAssignment* _tmp16_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_ccode_comma_expression_new ();
      ccomma = _tmp0_;
      _tmp1_ = vala_expression_get_value_type ((ValaExpression*) expr);
      _tmp2_ = vala_dova_base_module_get_temp_variable (self, _tmp1_, TRUE, (ValaCodeNode*) expr);
      temp_decl = _tmp2_;
      vala_dova_base_module_emit_temp_var (self, temp_decl);
      _tmp3_ = vala_symbol_get_name ((ValaSymbol*) temp_decl);
      _tmp4_ = vala_dova_base_module_get_variable_cexpression (self, _tmp3_);
      cvar = _tmp4_;
      _tmp5_ = vala_reference_transfer_expression_get_inner (expr);
      _tmp6_ = vala_dova_base_module_get_cvalue (self, _tmp5_);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_ccode_assignment_new (cvar, _tmp7_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp9_ = _tmp8_;
      vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp9_);
      _vala_ccode_node_unref0 (_tmp9_);
      _vala_ccode_node_unref0 (_tmp7_);
      _tmp10_ = vala_reference_transfer_expression_get_inner (expr);
      _tmp11_ = vala_dova_base_module_get_cvalue (self, _tmp10_);
      _tmp12_ = _tmp11_;
      _tmp13_ = vala_ccode_constant_new ("NULL");
      _tmp14_ = _tmp13_;
      _tmp15_ = vala_ccode_assignment_new (_tmp12_, (ValaCCodeExpression*) _tmp14_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
      _tmp16_ = _tmp15_;
      vala_ccode_comma_expression_append_expression (ccomma, (ValaCCodeExpression*) _tmp16_);
      _vala_ccode_node_unref0 (_tmp16_);
      _vala_ccode_node_unref0 (_tmp14_);
      _vala_ccode_node_unref0 (_tmp12_);
      vala_ccode_comma_expression_append_expression (ccomma, cvar);
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) ccomma);
      _vala_ccode_node_unref0 (cvar);
      _vala_code_node_unref0 (temp_decl);
      _vala_ccode_node_unref0 (ccomma);
}


static void vala_dova_base_module_real_visit_binary_expression (ValaCodeVisitor* base, ValaBinaryExpression* expr) {
      ValaDovaBaseModule * self;
      ValaExpression* _tmp0_ = NULL;
      ValaCCodeExpression* _tmp1_ = NULL;
      ValaCCodeExpression* cleft;
      ValaExpression* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_ = NULL;
      ValaCCodeExpression* cright;
      ValaCCodeBinaryOperator op = 0;
      ValaBinaryOperator _tmp4_;
      gboolean _tmp27_ = FALSE;
      ValaBinaryOperator _tmp28_;
      ValaCCodeBinaryExpression* _tmp85_ = NULL;
      ValaCCodeBinaryExpression* _tmp86_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_binary_expression_get_left (expr);
      _tmp1_ = vala_dova_base_module_get_cvalue (self, _tmp0_);
      cleft = _tmp1_;
      _tmp2_ = vala_binary_expression_get_right (expr);
      _tmp3_ = vala_dova_base_module_get_cvalue (self, _tmp2_);
      cright = _tmp3_;
      _tmp4_ = vala_binary_expression_get_operator (expr);
      if (_tmp4_ == VALA_BINARY_OPERATOR_PLUS) {
            op = VALA_CCODE_BINARY_OPERATOR_PLUS;
      } else {
            ValaBinaryOperator _tmp5_;
            _tmp5_ = vala_binary_expression_get_operator (expr);
            if (_tmp5_ == VALA_BINARY_OPERATOR_MINUS) {
                  op = VALA_CCODE_BINARY_OPERATOR_MINUS;
            } else {
                  ValaBinaryOperator _tmp6_;
                  _tmp6_ = vala_binary_expression_get_operator (expr);
                  if (_tmp6_ == VALA_BINARY_OPERATOR_MUL) {
                        op = VALA_CCODE_BINARY_OPERATOR_MUL;
                  } else {
                        ValaBinaryOperator _tmp7_;
                        _tmp7_ = vala_binary_expression_get_operator (expr);
                        if (_tmp7_ == VALA_BINARY_OPERATOR_DIV) {
                              op = VALA_CCODE_BINARY_OPERATOR_DIV;
                        } else {
                              ValaBinaryOperator _tmp8_;
                              _tmp8_ = vala_binary_expression_get_operator (expr);
                              if (_tmp8_ == VALA_BINARY_OPERATOR_MOD) {
                                    op = VALA_CCODE_BINARY_OPERATOR_MOD;
                              } else {
                                    ValaBinaryOperator _tmp9_;
                                    _tmp9_ = vala_binary_expression_get_operator (expr);
                                    if (_tmp9_ == VALA_BINARY_OPERATOR_SHIFT_LEFT) {
                                          op = VALA_CCODE_BINARY_OPERATOR_SHIFT_LEFT;
                                    } else {
                                          ValaBinaryOperator _tmp10_;
                                          _tmp10_ = vala_binary_expression_get_operator (expr);
                                          if (_tmp10_ == VALA_BINARY_OPERATOR_SHIFT_RIGHT) {
                                                op = VALA_CCODE_BINARY_OPERATOR_SHIFT_RIGHT;
                                          } else {
                                                ValaBinaryOperator _tmp11_;
                                                _tmp11_ = vala_binary_expression_get_operator (expr);
                                                if (_tmp11_ == VALA_BINARY_OPERATOR_LESS_THAN) {
                                                      op = VALA_CCODE_BINARY_OPERATOR_LESS_THAN;
                                                } else {
                                                      ValaBinaryOperator _tmp12_;
                                                      _tmp12_ = vala_binary_expression_get_operator (expr);
                                                      if (_tmp12_ == VALA_BINARY_OPERATOR_GREATER_THAN) {
                                                            op = VALA_CCODE_BINARY_OPERATOR_GREATER_THAN;
                                                      } else {
                                                            ValaBinaryOperator _tmp13_;
                                                            _tmp13_ = vala_binary_expression_get_operator (expr);
                                                            if (_tmp13_ == VALA_BINARY_OPERATOR_LESS_THAN_OR_EQUAL) {
                                                                  op = VALA_CCODE_BINARY_OPERATOR_LESS_THAN_OR_EQUAL;
                                                            } else {
                                                                  ValaBinaryOperator _tmp14_;
                                                                  _tmp14_ = vala_binary_expression_get_operator (expr);
                                                                  if (_tmp14_ == VALA_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL) {
                                                                        op = VALA_CCODE_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL;
                                                                  } else {
                                                                        ValaBinaryOperator _tmp15_;
                                                                        _tmp15_ = vala_binary_expression_get_operator (expr);
                                                                        if (_tmp15_ == VALA_BINARY_OPERATOR_EQUALITY) {
                                                                              op = VALA_CCODE_BINARY_OPERATOR_EQUALITY;
                                                                        } else {
                                                                              ValaBinaryOperator _tmp16_;
                                                                              _tmp16_ = vala_binary_expression_get_operator (expr);
                                                                              if (_tmp16_ == VALA_BINARY_OPERATOR_INEQUALITY) {
                                                                                    op = VALA_CCODE_BINARY_OPERATOR_INEQUALITY;
                                                                              } else {
                                                                                    ValaBinaryOperator _tmp17_;
                                                                                    _tmp17_ = vala_binary_expression_get_operator (expr);
                                                                                    if (_tmp17_ == VALA_BINARY_OPERATOR_BITWISE_AND) {
                                                                                          op = VALA_CCODE_BINARY_OPERATOR_BITWISE_AND;
                                                                                    } else {
                                                                                          ValaBinaryOperator _tmp18_;
                                                                                          _tmp18_ = vala_binary_expression_get_operator (expr);
                                                                                          if (_tmp18_ == VALA_BINARY_OPERATOR_BITWISE_OR) {
                                                                                                op = VALA_CCODE_BINARY_OPERATOR_BITWISE_OR;
                                                                                          } else {
                                                                                                ValaBinaryOperator _tmp19_;
                                                                                                _tmp19_ = vala_binary_expression_get_operator (expr);
                                                                                                if (_tmp19_ == VALA_BINARY_OPERATOR_BITWISE_XOR) {
                                                                                                      op = VALA_CCODE_BINARY_OPERATOR_BITWISE_XOR;
                                                                                                } else {
                                                                                                      ValaBinaryOperator _tmp20_;
                                                                                                      _tmp20_ = vala_binary_expression_get_operator (expr);
                                                                                                      if (_tmp20_ == VALA_BINARY_OPERATOR_AND) {
                                                                                                            op = VALA_CCODE_BINARY_OPERATOR_AND;
                                                                                                      } else {
                                                                                                            ValaBinaryOperator _tmp21_;
                                                                                                            _tmp21_ = vala_binary_expression_get_operator (expr);
                                                                                                            if (_tmp21_ == VALA_BINARY_OPERATOR_OR) {
                                                                                                                  op = VALA_CCODE_BINARY_OPERATOR_OR;
                                                                                                            } else {
                                                                                                                  ValaBinaryOperator _tmp22_;
                                                                                                                  _tmp22_ = vala_binary_expression_get_operator (expr);
                                                                                                                  if (_tmp22_ == VALA_BINARY_OPERATOR_IN) {
                                                                                                                        ValaCCodeBinaryExpression* _tmp23_ = NULL;
                                                                                                                        ValaCCodeBinaryExpression* _tmp24_;
                                                                                                                        ValaCCodeBinaryExpression* _tmp25_ = NULL;
                                                                                                                        ValaCCodeBinaryExpression* _tmp26_;
                                                                                                                        _tmp23_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_BITWISE_AND, cright, cleft);
                                                                                                                        _tmp24_ = _tmp23_;
                                                                                                                        _tmp25_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp24_, cleft);
                                                                                                                        _tmp26_ = _tmp25_;
                                                                                                                        vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp26_);
                                                                                                                        _vala_ccode_node_unref0 (_tmp26_);
                                                                                                                        _vala_ccode_node_unref0 (_tmp24_);
                                                                                                                        _vala_ccode_node_unref0 (cright);
                                                                                                                        _vala_ccode_node_unref0 (cleft);
                                                                                                                        return;
                                                                                                                  } else {
                                                                                                                        g_assert_not_reached ();
                                                                                                                  }
                                                                                                            }
                                                                                                      }
                                                                                                }
                                                                                          }
                                                                                    }
                                                                              }
                                                                        }
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
      }
      _tmp28_ = vala_binary_expression_get_operator (expr);
      if (_tmp28_ == VALA_BINARY_OPERATOR_EQUALITY) {
            _tmp27_ = TRUE;
      } else {
            ValaBinaryOperator _tmp29_;
            _tmp29_ = vala_binary_expression_get_operator (expr);
            _tmp27_ = _tmp29_ == VALA_BINARY_OPERATOR_INEQUALITY;
      }
      if (_tmp27_) {
            ValaExpression* _tmp30_ = NULL;
            ValaDataType* _tmp31_ = NULL;
            ValaTypeSymbol* _tmp32_ = NULL;
            ValaTypeSymbol* _tmp33_;
            ValaStruct* _tmp34_;
            ValaStruct* left_type_as_struct;
            ValaExpression* _tmp35_ = NULL;
            ValaDataType* _tmp36_ = NULL;
            ValaTypeSymbol* _tmp37_ = NULL;
            ValaTypeSymbol* _tmp38_;
            ValaStruct* _tmp39_;
            ValaStruct* right_type_as_struct;
            gboolean _tmp40_ = FALSE;
            gboolean _tmp41_ = FALSE;
            gboolean _tmp42_ = FALSE;
            ValaExpression* _tmp43_ = NULL;
            ValaDataType* _tmp44_ = NULL;
            ValaTypeSymbol* _tmp45_ = NULL;
            _tmp30_ = vala_binary_expression_get_left (expr);
            _tmp31_ = vala_expression_get_value_type (_tmp30_);
            _tmp32_ = vala_data_type_get_data_type (_tmp31_);
            _tmp33_ = _tmp32_;
            _tmp34_ = _vala_code_node_ref0 (VALA_IS_STRUCT (_tmp33_) ? ((ValaStruct*) _tmp33_) : NULL);
            left_type_as_struct = _tmp34_;
            _tmp35_ = vala_binary_expression_get_right (expr);
            _tmp36_ = vala_expression_get_value_type (_tmp35_);
            _tmp37_ = vala_data_type_get_data_type (_tmp36_);
            _tmp38_ = _tmp37_;
            _tmp39_ = _vala_code_node_ref0 (VALA_IS_STRUCT (_tmp38_) ? ((ValaStruct*) _tmp38_) : NULL);
            right_type_as_struct = _tmp39_;
            _tmp43_ = vala_binary_expression_get_left (expr);
            _tmp44_ = vala_expression_get_value_type (_tmp43_);
            _tmp45_ = vala_data_type_get_data_type (_tmp44_);
            if (VALA_IS_CLASS (_tmp45_)) {
                  ValaExpression* _tmp46_ = NULL;
                  ValaDataType* _tmp47_ = NULL;
                  ValaTypeSymbol* _tmp48_ = NULL;
                  gboolean _tmp49_;
                  _tmp46_ = vala_binary_expression_get_left (expr);
                  _tmp47_ = vala_expression_get_value_type (_tmp46_);
                  _tmp48_ = vala_data_type_get_data_type (_tmp47_);
                  _tmp49_ = vala_class_get_is_compact (VALA_CLASS (_tmp48_));
                  _tmp42_ = !_tmp49_;
            } else {
                  _tmp42_ = FALSE;
            }
            if (_tmp42_) {
                  ValaExpression* _tmp50_ = NULL;
                  ValaDataType* _tmp51_ = NULL;
                  ValaTypeSymbol* _tmp52_ = NULL;
                  _tmp50_ = vala_binary_expression_get_right (expr);
                  _tmp51_ = vala_expression_get_value_type (_tmp50_);
                  _tmp52_ = vala_data_type_get_data_type (_tmp51_);
                  _tmp41_ = VALA_IS_CLASS (_tmp52_);
            } else {
                  _tmp41_ = FALSE;
            }
            if (_tmp41_) {
                  ValaExpression* _tmp53_ = NULL;
                  ValaDataType* _tmp54_ = NULL;
                  ValaTypeSymbol* _tmp55_ = NULL;
                  gboolean _tmp56_;
                  _tmp53_ = vala_binary_expression_get_right (expr);
                  _tmp54_ = vala_expression_get_value_type (_tmp53_);
                  _tmp55_ = vala_data_type_get_data_type (_tmp54_);
                  _tmp56_ = vala_class_get_is_compact (VALA_CLASS (_tmp55_));
                  _tmp40_ = !_tmp56_;
            } else {
                  _tmp40_ = FALSE;
            }
            if (_tmp40_) {
                  ValaExpression* _tmp57_ = NULL;
                  ValaDataType* _tmp58_ = NULL;
                  ValaTypeSymbol* _tmp59_ = NULL;
                  ValaClass* _tmp60_;
                  ValaClass* left_cl;
                  ValaExpression* _tmp61_ = NULL;
                  ValaDataType* _tmp62_ = NULL;
                  ValaTypeSymbol* _tmp63_ = NULL;
                  ValaClass* _tmp64_;
                  ValaClass* right_cl;
                  _tmp57_ = vala_binary_expression_get_left (expr);
                  _tmp58_ = vala_expression_get_value_type (_tmp57_);
                  _tmp59_ = vala_data_type_get_data_type (_tmp58_);
                  _tmp60_ = _vala_code_node_ref0 (VALA_CLASS (_tmp59_));
                  left_cl = _tmp60_;
                  _tmp61_ = vala_binary_expression_get_right (expr);
                  _tmp62_ = vala_expression_get_value_type (_tmp61_);
                  _tmp63_ = vala_data_type_get_data_type (_tmp62_);
                  _tmp64_ = _vala_code_node_ref0 (VALA_CLASS (_tmp63_));
                  right_cl = _tmp64_;
                  if (left_cl != right_cl) {
                        gboolean _tmp65_;
                        _tmp65_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) left_cl, (ValaTypeSymbol*) right_cl);
                        if (_tmp65_) {
                              ValaCCodeExpression* _tmp66_ = NULL;
                              _tmp66_ = vala_dova_base_module_generate_instance_cast (self, cleft, (ValaTypeSymbol*) right_cl);
                              _vala_ccode_node_unref0 (cleft);
                              cleft = _tmp66_;
                        } else {
                              gboolean _tmp67_;
                              _tmp67_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) right_cl, (ValaTypeSymbol*) left_cl);
                              if (_tmp67_) {
                                    ValaCCodeExpression* _tmp68_ = NULL;
                                    _tmp68_ = vala_dova_base_module_generate_instance_cast (self, cright, (ValaTypeSymbol*) left_cl);
                                    _vala_ccode_node_unref0 (cright);
                                    cright = _tmp68_;
                              }
                        }
                  }
                  _vala_code_node_unref0 (right_cl);
                  _vala_code_node_unref0 (left_cl);
            } else {
                  gboolean _tmp69_ = FALSE;
                  if (left_type_as_struct != NULL) {
                        _tmp69_ = right_type_as_struct != NULL;
                  } else {
                        _tmp69_ = FALSE;
                  }
                  if (_tmp69_) {
                        gboolean _tmp70_ = FALSE;
                        ValaExpression* _tmp71_ = NULL;
                        ValaDataType* _tmp72_ = NULL;
                        gboolean _tmp73_;
                        _tmp71_ = vala_binary_expression_get_left (expr);
                        _tmp72_ = vala_expression_get_value_type (_tmp71_);
                        _tmp73_ = vala_data_type_get_nullable (_tmp72_);
                        if (_tmp73_) {
                              ValaExpression* _tmp74_ = NULL;
                              ValaDataType* _tmp75_ = NULL;
                              gboolean _tmp76_;
                              _tmp74_ = vala_binary_expression_get_right (expr);
                              _tmp75_ = vala_expression_get_value_type (_tmp74_);
                              _tmp76_ = vala_data_type_get_nullable (_tmp75_);
                              _tmp70_ = _tmp76_;
                        } else {
                              _tmp70_ = FALSE;
                        }
                        if (_tmp70_) {
                        } else {
                              ValaExpression* _tmp77_ = NULL;
                              ValaDataType* _tmp78_ = NULL;
                              gboolean _tmp79_;
                              _tmp77_ = vala_binary_expression_get_left (expr);
                              _tmp78_ = vala_expression_get_value_type (_tmp77_);
                              _tmp79_ = vala_data_type_get_nullable (_tmp78_);
                              if (_tmp79_) {
                                    ValaCCodeUnaryExpression* _tmp80_ = NULL;
                                    _tmp80_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cleft);
                                    _vala_ccode_node_unref0 (cleft);
                                    cleft = (ValaCCodeExpression*) _tmp80_;
                              } else {
                                    ValaExpression* _tmp81_ = NULL;
                                    ValaDataType* _tmp82_ = NULL;
                                    gboolean _tmp83_;
                                    _tmp81_ = vala_binary_expression_get_right (expr);
                                    _tmp82_ = vala_expression_get_value_type (_tmp81_);
                                    _tmp83_ = vala_data_type_get_nullable (_tmp82_);
                                    if (_tmp83_) {
                                          ValaCCodeUnaryExpression* _tmp84_ = NULL;
                                          _tmp84_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, cright);
                                          _vala_ccode_node_unref0 (cright);
                                          cright = (ValaCCodeExpression*) _tmp84_;
                                    }
                              }
                        }
                  }
            }
            _vala_code_node_unref0 (right_type_as_struct);
            _vala_code_node_unref0 (left_type_as_struct);
      }
      _tmp85_ = vala_ccode_binary_expression_new (op, cleft, cright);
      _tmp86_ = _tmp85_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, (ValaCCodeExpression*) _tmp86_);
      _vala_ccode_node_unref0 (_tmp86_);
      _vala_ccode_node_unref0 (cright);
      _vala_ccode_node_unref0 (cleft);
}


static ValaCCodeExpression* vala_dova_base_module_create_type_check (ValaDovaBaseModule* self, ValaCCodeNode* ccodenode, ValaDataType* type) {
      ValaCCodeExpression* result = NULL;
      ValaCCodeIdentifier* _tmp0_ = NULL;
      ValaCCodeIdentifier* _tmp1_;
      ValaCCodeFunctionCall* _tmp2_ = NULL;
      ValaCCodeFunctionCall* _tmp3_;
      ValaCCodeFunctionCall* ccheck;
      ValaCCodeExpression* _tmp4_ = NULL;
      ValaCCodeExpression* _tmp5_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (ccodenode != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_ccode_identifier_new ("any_is_a");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp1_);
      _tmp3_ = _tmp2_;
      _vala_ccode_node_unref0 (_tmp1_);
      ccheck = _tmp3_;
      vala_ccode_function_call_add_argument (ccheck, VALA_CCODE_EXPRESSION (ccodenode));
      _tmp4_ = vala_dova_base_module_get_type_id_expression (self, type, FALSE);
      _tmp5_ = _tmp4_;
      vala_ccode_function_call_add_argument (ccheck, _tmp5_);
      _vala_ccode_node_unref0 (_tmp5_);
      result = (ValaCCodeExpression*) ccheck;
      return result;
}


static void vala_dova_base_module_real_visit_type_check (ValaCodeVisitor* base, ValaTypeCheck* expr) {
      ValaDovaBaseModule * self;
      ValaDataType* _tmp0_ = NULL;
      ValaExpression* _tmp1_ = NULL;
      ValaCCodeExpression* _tmp2_ = NULL;
      ValaCCodeExpression* _tmp3_;
      ValaDataType* _tmp4_ = NULL;
      ValaCCodeExpression* _tmp5_ = NULL;
      ValaCCodeExpression* _tmp6_;
      ValaCCodeExpression* _tmp7_ = NULL;
      ValaCCodeExpression* _tmp8_;
      gboolean _tmp9_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_typecheck_get_type_reference (expr);
      vala_dova_base_module_generate_type_declaration (self, _tmp0_, self->cfile);
      _tmp1_ = vala_typecheck_get_expression (expr);
      _tmp2_ = vala_dova_base_module_get_cvalue (self, _tmp1_);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_typecheck_get_type_reference (expr);
      _tmp5_ = vala_dova_base_module_create_type_check (self, (ValaCCodeNode*) _tmp3_, _tmp4_);
      _tmp6_ = _tmp5_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) expr, _tmp6_);
      _vala_ccode_node_unref0 (_tmp6_);
      _vala_ccode_node_unref0 (_tmp3_);
      _tmp7_ = vala_dova_base_module_get_cvalue (self, (ValaExpression*) expr);
      _tmp8_ = _tmp7_;
      _tmp9_ = VALA_IS_CCODE_INVALID_EXPRESSION (_tmp8_);
      _vala_ccode_node_unref0 (_tmp8_);
      if (_tmp9_) {
            ValaSourceReference* _tmp10_ = NULL;
            _tmp10_ = vala_code_node_get_source_reference ((ValaCodeNode*) expr);
            vala_report_error (_tmp10_, "type check expressions not supported for compact classes, structs, and" \
" enums");
      }
}


static void vala_dova_base_module_real_visit_lambda_expression (ValaCodeVisitor* base, ValaLambdaExpression* l) {
      ValaDovaBaseModule * self;
      ValaDataType* _tmp0_ = NULL;
      ValaDelegateType* _tmp1_;
      ValaDelegateType* dt;
      ValaMethod* _tmp2_ = NULL;
      ValaDelegate* _tmp3_ = NULL;
      gdouble _tmp4_;
      ValaMethod* _tmp5_ = NULL;
      gchar* _tmp6_ = NULL;
      gchar* _tmp7_;
      ValaCCodeIdentifier* _tmp8_ = NULL;
      ValaCCodeIdentifier* _tmp9_;
      self = (ValaDovaBaseModule*) base;
      g_return_if_fail (l != NULL);
      _tmp0_ = vala_expression_get_target_type ((ValaExpression*) l);
      _tmp1_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (_tmp0_));
      dt = _tmp1_;
      _tmp2_ = vala_lambda_expression_get_method (l);
      _tmp3_ = vala_delegate_type_get_delegate_symbol (dt);
      _tmp4_ = vala_delegate_get_cinstance_parameter_position (_tmp3_);
      vala_method_set_cinstance_parameter_position (_tmp2_, _tmp4_);
      vala_code_node_accept_children ((ValaCodeNode*) l, (ValaCodeVisitor*) self);
      _tmp5_ = vala_lambda_expression_get_method (l);
      _tmp6_ = vala_method_get_cname (_tmp5_);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_ccode_identifier_new (_tmp7_);
      _tmp9_ = _tmp8_;
      vala_dova_base_module_set_cvalue (self, (ValaExpression*) l, (ValaCCodeExpression*) _tmp9_);
      _vala_ccode_node_unref0 (_tmp9_);
      _g_free0 (_tmp7_);
      _vala_code_node_unref0 (dt);
}


ValaCCodeExpression* vala_dova_base_module_transform_expression (ValaDovaBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr) {
      ValaCCodeExpression* result = NULL;
      ValaCCodeExpression* _tmp0_;
      ValaCCodeExpression* cexpr;
      gboolean _tmp1_ = FALSE;
      gboolean _tmp2_;
      ValaCCodeExpression* _tmp16_ = NULL;
      gboolean _tmp17_ = FALSE;
      gboolean _tmp18_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (source_cexpr != NULL, NULL);
      _tmp0_ = _vala_ccode_node_ref0 (source_cexpr);
      cexpr = _tmp0_;
      if (expression_type == NULL) {
            result = cexpr;
            return result;
      }
      _tmp2_ = vala_data_type_get_value_owned (expression_type);
      if (_tmp2_) {
            gboolean _tmp3_ = FALSE;
            if (target_type == NULL) {
                  _tmp3_ = TRUE;
            } else {
                  gboolean _tmp4_;
                  _tmp4_ = vala_data_type_get_value_owned (target_type);
                  _tmp3_ = !_tmp4_;
            }
            _tmp1_ = _tmp3_;
      } else {
            _tmp1_ = FALSE;
      }
      if (_tmp1_) {
            ValaDataType* _tmp5_;
            ValaPointerType* _tmp6_;
            ValaPointerType* pointer_type;
            gboolean _tmp7_ = FALSE;
            _tmp5_ = target_type;
            _tmp6_ = _vala_code_node_ref0 (VALA_IS_POINTER_TYPE (_tmp5_) ? ((ValaPointerType*) _tmp5_) : NULL);
            pointer_type = _tmp6_;
            if (pointer_type != NULL) {
                  ValaDataType* _tmp8_ = NULL;
                  _tmp8_ = vala_pointer_type_get_base_type (pointer_type);
                  _tmp7_ = !VALA_IS_VOID_TYPE (_tmp8_);
            } else {
                  _tmp7_ = FALSE;
            }
            if (_tmp7_) {
            } else {
                  gboolean _tmp9_;
                  _tmp9_ = vala_dova_base_module_requires_destroy (self, expression_type);
                  if (_tmp9_) {
                        ValaLocalVariable* _tmp10_ = NULL;
                        ValaLocalVariable* decl;
                        ValaArrayList* _tmp11_ = NULL;
                        const gchar* _tmp12_ = NULL;
                        ValaCCodeExpression* _tmp13_ = NULL;
                        ValaCCodeExpression* _tmp14_;
                        ValaCCodeAssignment* _tmp15_ = NULL;
                        _tmp10_ = vala_dova_base_module_get_temp_variable (self, expression_type, TRUE, (ValaCodeNode*) expression_type);
                        decl = _tmp10_;
                        vala_dova_base_module_emit_temp_var (self, decl);
                        _tmp11_ = vala_dova_base_module_get_temp_ref_vars (self);
                        vala_list_insert ((ValaList*) _tmp11_, 0, decl);
                        _tmp12_ = vala_symbol_get_name ((ValaSymbol*) decl);
                        _tmp13_ = vala_dova_base_module_get_variable_cexpression (self, _tmp12_);
                        _tmp14_ = _tmp13_;
                        _tmp15_ = vala_ccode_assignment_new (_tmp14_, cexpr, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                        _vala_ccode_node_unref0 (cexpr);
                        cexpr = (ValaCCodeExpression*) _tmp15_;
                        _vala_ccode_node_unref0 (_tmp14_);
                        _vala_code_node_unref0 (decl);
                  }
            }
            _vala_code_node_unref0 (pointer_type);
      }
      if (target_type == NULL) {
            result = cexpr;
            return result;
      }
      _tmp16_ = vala_dova_base_module_get_implicit_cast_expression (self, cexpr, expression_type, target_type, expr);
      _vala_ccode_node_unref0 (cexpr);
      cexpr = _tmp16_;
      _tmp18_ = vala_data_type_get_value_owned (target_type);
      if (_tmp18_) {
            gboolean _tmp19_;
            _tmp19_ = vala_data_type_get_value_owned (expression_type);
            _tmp17_ = !_tmp19_;
      } else {
            _tmp17_ = FALSE;
      }
      if (_tmp17_) {
            gboolean _tmp20_ = FALSE;
            gboolean _tmp21_;
            _tmp21_ = vala_dova_base_module_requires_copy (self, target_type);
            if (_tmp21_) {
                  _tmp20_ = !VALA_IS_NULL_TYPE (expression_type);
            } else {
                  _tmp20_ = FALSE;
            }
            if (_tmp20_) {
                  ValaCodeNode* _tmp22_;
                  ValaCodeNode* node;
                  ValaCCodeExpression* _tmp24_ = NULL;
                  _tmp22_ = _vala_code_node_ref0 ((ValaCodeNode*) expr);
                  node = _tmp22_;
                  if (node == NULL) {
                        ValaCodeNode* _tmp23_;
                        _tmp23_ = _vala_code_node_ref0 ((ValaCodeNode*) expression_type);
                        _vala_code_node_unref0 (node);
                        node = _tmp23_;
                  }
                  _tmp24_ = vala_dova_base_module_get_ref_cexpression (self, target_type, cexpr, expr, node);
                  _vala_ccode_node_unref0 (cexpr);
                  cexpr = _tmp24_;
                  _vala_code_node_unref0 (node);
            }
      }
      result = cexpr;
      return result;
}


static ValaCCodeExpression* vala_dova_base_module_real_get_implicit_cast_expression (ValaDovaBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr) {
      ValaCCodeExpression* result = NULL;
      ValaCCodeExpression* _tmp0_;
      ValaCCodeExpression* cexpr;
      gboolean _tmp1_ = FALSE;
      ValaTypeSymbol* _tmp2_ = NULL;
      gboolean _tmp5_ = FALSE;
      ValaTypeSymbol* _tmp149_ = NULL;
      ValaTypeSymbol* _tmp150_;
      ValaClass* _tmp151_;
      ValaClass* cl;
      ValaTypeSymbol* _tmp152_ = NULL;
      ValaTypeSymbol* _tmp153_;
      ValaInterface* _tmp154_;
      ValaInterface* iface;
      gboolean _tmp155_ = FALSE;
      gboolean _tmp156_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (source_cexpr != NULL, NULL);
      _tmp0_ = _vala_ccode_node_ref0 (source_cexpr);
      cexpr = _tmp0_;
      _tmp2_ = vala_data_type_get_data_type (expression_type);
      if (_tmp2_ != NULL) {
            ValaTypeSymbol* _tmp3_ = NULL;
            ValaTypeSymbol* _tmp4_ = NULL;
            _tmp3_ = vala_data_type_get_data_type (expression_type);
            _tmp4_ = vala_data_type_get_data_type (target_type);
            _tmp1_ = _tmp3_ == _tmp4_;
      } else {
            _tmp1_ = FALSE;
      }
      if (_tmp1_) {
            result = cexpr;
            return result;
      }
      if (VALA_IS_NULL_TYPE (expression_type)) {
            result = cexpr;
            return result;
      }
      vala_dova_base_module_generate_type_declaration (self, target_type, self->cfile);
      if (VALA_IS_DELEGATE_TYPE (target_type)) {
            _tmp5_ = VALA_IS_METHOD_TYPE (expression_type);
      } else {
            _tmp5_ = FALSE;
      }
      if (_tmp5_) {
            ValaDelegateType* _tmp6_;
            ValaDelegateType* deleg_type;
            ValaMethodType* _tmp7_;
            ValaMethodType* method_type;
            ValaCCodeExpression* delegate_target = NULL;
            ValaDelegate* _tmp27_ = NULL;
            ValaDelegate* _tmp28_;
            ValaDelegate* d;
            gint _tmp29_;
            gchar* _tmp30_ = NULL;
            gchar* wrapper_name;
            ValaCCodeFunction* _tmp31_ = NULL;
            ValaCCodeFunction* wrapper;
            ValaCCodeFunctionCall* _tmp32_ = NULL;
            ValaCCodeFunctionCall* call;
            ValaMethod* _tmp33_ = NULL;
            ValaMemberBinding _tmp34_;
            ValaMethod* _tmp39_ = NULL;
            ValaList* _tmp40_ = NULL;
            ValaList* _tmp41_;
            ValaIterator* _tmp42_ = NULL;
            ValaIterator* _tmp43_;
            ValaIterator* method_param_iter;
            ValaCCodeBlock* _tmp76_ = NULL;
            ValaCCodeBlock* _tmp77_;
            ValaDataType* _tmp78_ = NULL;
            ValaDelegate* _tmp138_ = NULL;
            gchar* _tmp139_ = NULL;
            gchar* _tmp140_;
            gchar* _tmp141_ = NULL;
            gchar* _tmp142_;
            ValaCCodeIdentifier* _tmp143_ = NULL;
            ValaCCodeIdentifier* _tmp144_;
            ValaCCodeFunctionCall* _tmp145_ = NULL;
            ValaCCodeFunctionCall* _tmp146_;
            ValaCCodeFunctionCall* ccall;
            ValaCCodeIdentifier* _tmp147_ = NULL;
            ValaCCodeIdentifier* _tmp148_;
            _tmp6_ = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (target_type));
            deleg_type = _tmp6_;
            _tmp7_ = _vala_code_node_ref0 (VALA_METHOD_TYPE (expression_type));
            method_type = _tmp7_;
            if (VALA_IS_LAMBDA_EXPRESSION (expr)) {
                  ValaLambdaExpression* _tmp8_;
                  ValaLambdaExpression* lambda;
                  ValaMethod* _tmp9_ = NULL;
                  gboolean _tmp10_;
                  _tmp8_ = _vala_code_node_ref0 (VALA_LAMBDA_EXPRESSION (expr));
                  lambda = _tmp8_;
                  _tmp9_ = vala_lambda_expression_get_method (lambda);
                  _tmp10_ = vala_method_get_closure (_tmp9_);
                  if (_tmp10_) {
                        ValaBlock* _tmp11_ = NULL;
                        gint _tmp12_;
                        gint block_id;
                        gchar* _tmp13_ = NULL;
                        gchar* _tmp14_;
                        ValaCCodeExpression* _tmp15_ = NULL;
                        _tmp11_ = vala_dova_base_module_get_current_closure_block (self);
                        _tmp12_ = vala_dova_base_module_get_block_id (self, _tmp11_);
                        block_id = _tmp12_;
                        _tmp13_ = g_strdup_printf ("_data%d_", block_id);
                        _tmp14_ = _tmp13_;
                        _tmp15_ = vala_dova_base_module_get_variable_cexpression (self, _tmp14_);
                        _vala_ccode_node_unref0 (delegate_target);
                        delegate_target = _tmp15_;
                        _g_free0 (_tmp14_);
                  } else {
                        ValaDataType* _tmp16_ = NULL;
                        ValaDataType* _tmp17_;
                        gboolean _tmp18_;
                        _tmp16_ = vala_dova_base_module_get_this_type (self);
                        _tmp17_ = _tmp16_;
                        _tmp18_ = _tmp17_ != NULL;
                        _vala_code_node_unref0 (_tmp17_);
                        if (_tmp18_) {
                              ValaCCodeIdentifier* _tmp19_ = NULL;
                              _tmp19_ = vala_ccode_identifier_new ("this");
                              _vala_ccode_node_unref0 (delegate_target);
                              delegate_target = (ValaCCodeExpression*) _tmp19_;
                        } else {
                              ValaCCodeConstant* _tmp20_ = NULL;
                              _tmp20_ = vala_ccode_constant_new ("NULL");
                              _vala_ccode_node_unref0 (delegate_target);
                              delegate_target = (ValaCCodeExpression*) _tmp20_;
                        }
                  }
                  _vala_code_node_unref0 (lambda);
            } else {
                  ValaMethod* _tmp21_ = NULL;
                  ValaMemberBinding _tmp22_;
                  _tmp21_ = vala_method_type_get_method_symbol (method_type);
                  _tmp22_ = vala_method_get_binding (_tmp21_);
                  if (_tmp22_ == VALA_MEMBER_BINDING_INSTANCE) {
                        ValaMemberAccess* _tmp23_;
                        ValaMemberAccess* ma;
                        ValaExpression* _tmp24_ = NULL;
                        ValaCCodeExpression* _tmp25_ = NULL;
                        _tmp23_ = _vala_code_node_ref0 (VALA_MEMBER_ACCESS (expr));
                        ma = _tmp23_;
                        _tmp24_ = vala_member_access_get_inner (ma);
                        _tmp25_ = vala_dova_base_module_get_ccodenode (self, _tmp24_);
                        _vala_ccode_node_unref0 (delegate_target);
                        delegate_target = VALA_CCODE_EXPRESSION (_tmp25_);
                        _vala_code_node_unref0 (ma);
                  } else {
                        ValaCCodeConstant* _tmp26_ = NULL;
                        _tmp26_ = vala_ccode_constant_new ("NULL");
                        _vala_ccode_node_unref0 (delegate_target);
                        delegate_target = (ValaCCodeExpression*) _tmp26_;
                  }
            }
            _tmp27_ = vala_delegate_type_get_delegate_symbol (deleg_type);
            _tmp28_ = _vala_code_node_ref0 (_tmp27_);
            d = _tmp28_;
            _tmp29_ = self->next_wrapper_id;
            self->next_wrapper_id = _tmp29_ + 1;
            _tmp30_ = g_strdup_printf ("_wrapper%d_", _tmp29_);
            wrapper_name = _tmp30_;
            _tmp31_ = vala_ccode_function_new (wrapper_name, "void");
            wrapper = _tmp31_;
            vala_ccode_function_set_modifiers (wrapper, VALA_CCODE_MODIFIERS_STATIC);
            _tmp32_ = vala_ccode_function_call_new (source_cexpr);
            call = _tmp32_;
            _tmp33_ = vala_method_type_get_method_symbol (method_type);
            _tmp34_ = vala_method_get_binding (_tmp33_);
            if (_tmp34_ == VALA_MEMBER_BINDING_INSTANCE) {
                  ValaCCodeParameter* _tmp35_ = NULL;
                  ValaCCodeParameter* _tmp36_;
                  ValaCCodeIdentifier* _tmp37_ = NULL;
                  ValaCCodeIdentifier* _tmp38_;
                  _tmp35_ = vala_ccode_parameter_new ("this", "void *");
                  _tmp36_ = _tmp35_;
                  vala_ccode_function_add_parameter (wrapper, _tmp36_);
                  _vala_ccode_node_unref0 (_tmp36_);
                  _tmp37_ = vala_ccode_identifier_new ("this");
                  _tmp38_ = _tmp37_;
                  vala_ccode_function_call_add_argument (call, (ValaCCodeExpression*) _tmp38_);
                  _vala_ccode_node_unref0 (_tmp38_);
            }
            _tmp39_ = vala_method_type_get_method_symbol (method_type);
            _tmp40_ = vala_method_get_parameters (_tmp39_);
            _tmp41_ = _tmp40_;
            _tmp42_ = vala_iterable_iterator ((ValaIterable*) _tmp41_);
            _tmp43_ = _tmp42_;
            _vala_iterable_unref0 (_tmp41_);
            method_param_iter = _tmp43_;
            {
                  ValaList* _tmp44_ = NULL;
                  ValaList* _param_list;
                  gint _tmp45_;
                  gint _param_size;
                  gint _param_index;
                  _tmp44_ = vala_delegate_get_parameters (d);
                  _param_list = _tmp44_;
                  _tmp45_ = vala_collection_get_size ((ValaCollection*) _param_list);
                  _param_size = _tmp45_;
                  _param_index = -1;
                  while (TRUE) {
                        gpointer _tmp46_ = NULL;
                        ValaParameter* param;
                        gpointer _tmp47_ = NULL;
                        ValaParameter* method_param;
                        ValaDataType* _tmp48_ = NULL;
                        gchar* _tmp49_ = NULL;
                        gchar* ctype;
                        gboolean _tmp50_ = FALSE;
                        ValaDataType* _tmp51_ = NULL;
                        const gchar* _tmp73_ = NULL;
                        ValaCCodeParameter* _tmp74_ = NULL;
                        ValaCCodeParameter* _tmp75_;
                        _param_index = _param_index + 1;
                        if (!(_param_index < _param_size)) {
                              break;
                        }
                        _tmp46_ = vala_list_get (_param_list, _param_index);
                        param = (ValaParameter*) _tmp46_;
                        vala_iterator_next (method_param_iter);
                        _tmp47_ = vala_iterator_get (method_param_iter);
                        method_param = (ValaParameter*) _tmp47_;
                        _tmp48_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp49_ = vala_data_type_get_cname (_tmp48_);
                        ctype = _tmp49_;
                        _tmp51_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        if (VALA_IS_GENERIC_TYPE (_tmp51_)) {
                              ValaDataType* _tmp52_ = NULL;
                              _tmp52_ = vala_variable_get_variable_type ((ValaVariable*) method_param);
                              _tmp50_ = !VALA_IS_GENERIC_TYPE (_tmp52_);
                        } else {
                              _tmp50_ = FALSE;
                        }
                        if (_tmp50_) {
                              ValaDataType* _tmp53_ = NULL;
                              gchar* _tmp54_ = NULL;
                              gchar* _tmp55_;
                              gchar* _tmp56_;
                              const gchar* _tmp57_ = NULL;
                              ValaCCodeIdentifier* _tmp58_ = NULL;
                              ValaCCodeIdentifier* _tmp59_;
                              ValaCCodeUnaryExpression* _tmp60_ = NULL;
                              ValaCCodeUnaryExpression* _tmp61_;
                              _tmp53_ = vala_variable_get_variable_type ((ValaVariable*) method_param);
                              _tmp54_ = vala_data_type_get_cname (_tmp53_);
                              _tmp55_ = _tmp54_;
                              _tmp56_ = g_strconcat (_tmp55_, "*", NULL);
                              _g_free0 (ctype);
                              ctype = _tmp56_;
                              _g_free0 (_tmp55_);
                              _tmp57_ = vala_symbol_get_name ((ValaSymbol*) param);
                              _tmp58_ = vala_ccode_identifier_new (_tmp57_);
                              _tmp59_ = _tmp58_;
                              _tmp60_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp59_);
                              _tmp61_ = _tmp60_;
                              vala_ccode_function_call_add_argument (call, (ValaCCodeExpression*) _tmp61_);
                              _vala_ccode_node_unref0 (_tmp61_);
                              _vala_ccode_node_unref0 (_tmp59_);
                        } else {
                              gboolean _tmp62_ = FALSE;
                              ValaDataType* _tmp63_ = NULL;
                              _tmp63_ = vala_variable_get_variable_type ((ValaVariable*) param);
                              if (!VALA_IS_GENERIC_TYPE (_tmp63_)) {
                                    ValaDataType* _tmp64_ = NULL;
                                    _tmp64_ = vala_variable_get_variable_type ((ValaVariable*) method_param);
                                    _tmp62_ = VALA_IS_GENERIC_TYPE (_tmp64_);
                              } else {
                                    _tmp62_ = FALSE;
                              }
                              if (_tmp62_) {
                                    const gchar* _tmp65_ = NULL;
                                    ValaCCodeIdentifier* _tmp66_ = NULL;
                                    ValaCCodeIdentifier* _tmp67_;
                                    ValaCCodeUnaryExpression* _tmp68_ = NULL;
                                    ValaCCodeUnaryExpression* _tmp69_;
                                    _tmp65_ = vala_symbol_get_name ((ValaSymbol*) param);
                                    _tmp66_ = vala_ccode_identifier_new (_tmp65_);
                                    _tmp67_ = _tmp66_;
                                    _tmp68_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp67_);
                                    _tmp69_ = _tmp68_;
                                    vala_ccode_function_call_add_argument (call, (ValaCCodeExpression*) _tmp69_);
                                    _vala_ccode_node_unref0 (_tmp69_);
                                    _vala_ccode_node_unref0 (_tmp67_);
                              } else {
                                    const gchar* _tmp70_ = NULL;
                                    ValaCCodeIdentifier* _tmp71_ = NULL;
                                    ValaCCodeIdentifier* _tmp72_;
                                    _tmp70_ = vala_symbol_get_name ((ValaSymbol*) param);
                                    _tmp71_ = vala_ccode_identifier_new (_tmp70_);
                                    _tmp72_ = _tmp71_;
                                    vala_ccode_function_call_add_argument (call, (ValaCCodeExpression*) _tmp72_);
                                    _vala_ccode_node_unref0 (_tmp72_);
                              }
                        }
                        _tmp73_ = vala_symbol_get_name ((ValaSymbol*) param);
                        _tmp74_ = vala_ccode_parameter_new (_tmp73_, ctype);
                        _tmp75_ = _tmp74_;
                        vala_ccode_function_add_parameter (wrapper, _tmp75_);
                        _vala_ccode_node_unref0 (_tmp75_);
                        _g_free0 (ctype);
                        _vala_code_node_unref0 (method_param);
                        _vala_code_node_unref0 (param);
                  }
                  _vala_iterable_unref0 (_param_list);
            }
            _tmp76_ = vala_ccode_block_new ();
            _tmp77_ = _tmp76_;
            vala_ccode_function_set_block (wrapper, _tmp77_);
            _vala_ccode_node_unref0 (_tmp77_);
            _tmp78_ = vala_delegate_get_return_type (d);
            if (VALA_IS_VOID_TYPE (_tmp78_)) {
                  ValaCCodeBlock* _tmp79_ = NULL;
                  ValaCCodeExpressionStatement* _tmp80_ = NULL;
                  ValaCCodeExpressionStatement* _tmp81_;
                  _tmp79_ = vala_ccode_function_get_block (wrapper);
                  _tmp80_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) call);
                  _tmp81_ = _tmp80_;
                  vala_ccode_block_add_statement (_tmp79_, (ValaCCodeNode*) _tmp81_);
                  _vala_ccode_node_unref0 (_tmp81_);
            } else {
                  ValaMethod* _tmp82_ = NULL;
                  ValaDataType* _tmp83_ = NULL;
                  ValaDataType* _tmp84_;
                  ValaDataType* method_return_type;
                  gboolean _tmp85_ = FALSE;
                  ValaDataType* _tmp86_ = NULL;
                  _tmp82_ = vala_method_type_get_method_symbol (method_type);
                  _tmp83_ = vala_method_get_return_type (_tmp82_);
                  _tmp84_ = _vala_code_node_ref0 (_tmp83_);
                  method_return_type = _tmp84_;
                  _tmp86_ = vala_delegate_get_return_type (d);
                  if (VALA_IS_GENERIC_TYPE (_tmp86_)) {
                        _tmp85_ = !VALA_IS_GENERIC_TYPE (method_return_type);
                  } else {
                        _tmp85_ = FALSE;
                  }
                  if (_tmp85_) {
                        gchar* _tmp87_ = NULL;
                        gchar* _tmp88_;
                        gchar* _tmp89_;
                        gchar* _tmp90_;
                        ValaCCodeParameter* _tmp91_ = NULL;
                        ValaCCodeParameter* _tmp92_;
                        ValaCCodeBlock* _tmp93_ = NULL;
                        ValaCCodeIdentifier* _tmp94_ = NULL;
                        ValaCCodeIdentifier* _tmp95_;
                        ValaCCodeUnaryExpression* _tmp96_ = NULL;
                        ValaCCodeUnaryExpression* _tmp97_;
                        ValaCCodeAssignment* _tmp98_ = NULL;
                        ValaCCodeAssignment* _tmp99_;
                        ValaCCodeExpressionStatement* _tmp100_ = NULL;
                        ValaCCodeExpressionStatement* _tmp101_;
                        _tmp87_ = vala_data_type_get_cname (method_return_type);
                        _tmp88_ = _tmp87_;
                        _tmp89_ = g_strconcat (_tmp88_, "*", NULL);
                        _tmp90_ = _tmp89_;
                        _tmp91_ = vala_ccode_parameter_new ("result", _tmp90_);
                        _tmp92_ = _tmp91_;
                        vala_ccode_function_add_parameter (wrapper, _tmp92_);
                        _vala_ccode_node_unref0 (_tmp92_);
                        _g_free0 (_tmp90_);
                        _g_free0 (_tmp88_);
                        _tmp93_ = vala_ccode_function_get_block (wrapper);
                        _tmp94_ = vala_ccode_identifier_new ("result");
                        _tmp95_ = _tmp94_;
                        _tmp96_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp95_);
                        _tmp97_ = _tmp96_;
                        _tmp98_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp97_, (ValaCCodeExpression*) call, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE);
                        _tmp99_ = _tmp98_;
                        _tmp100_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp99_);
                        _tmp101_ = _tmp100_;
                        vala_ccode_block_add_statement (_tmp93_, (ValaCCodeNode*) _tmp101_);
                        _vala_ccode_node_unref0 (_tmp101_);
                        _vala_ccode_node_unref0 (_tmp99_);
                        _vala_ccode_node_unref0 (_tmp97_);
                        _vala_ccode_node_unref0 (_tmp95_);
                  } else {
                        gboolean _tmp102_ = FALSE;
                        ValaDataType* _tmp103_ = NULL;
                        _tmp103_ = vala_delegate_get_return_type (d);
                        if (!VALA_IS_GENERIC_TYPE (_tmp103_)) {
                              _tmp102_ = VALA_IS_GENERIC_TYPE (method_return_type);
                        } else {
                              _tmp102_ = FALSE;
                        }
                        if (_tmp102_) {
                              ValaDataType* _tmp104_ = NULL;
                              gchar* _tmp105_ = NULL;
                              gchar* _tmp106_;
                              ValaDataType* _tmp107_ = NULL;
                              gchar* _tmp108_ = NULL;
                              gchar* _tmp109_;
                              ValaCCodeDeclaration* _tmp110_ = NULL;
                              ValaCCodeDeclaration* _tmp111_;
                              ValaCCodeDeclaration* _cdecl_;
                              ValaCCodeVariableDeclarator* _tmp112_ = NULL;
                              ValaCCodeVariableDeclarator* _tmp113_;
                              ValaCCodeIdentifier* _tmp114_ = NULL;
                              ValaCCodeIdentifier* _tmp115_;
                              ValaCCodeUnaryExpression* _tmp116_ = NULL;
                              ValaCCodeUnaryExpression* _tmp117_;
                              ValaCCodeBlock* _tmp118_ = NULL;
                              ValaCCodeExpressionStatement* _tmp119_ = NULL;
                              ValaCCodeExpressionStatement* _tmp120_;
                              ValaCCodeBlock* _tmp121_ = NULL;
                              ValaCCodeIdentifier* _tmp122_ = NULL;
                              ValaCCodeIdentifier* _tmp123_;
                              ValaCCodeReturnStatement* _tmp124_ = NULL;
                              ValaCCodeReturnStatement* _tmp125_;
                              _tmp104_ = vala_delegate_get_return_type (d);
                              _tmp105_ = vala_data_type_get_cname (_tmp104_);
                              _tmp106_ = _tmp105_;
                              vala_ccode_function_set_return_type (wrapper, _tmp106_);
                              _g_free0 (_tmp106_);
                              _tmp107_ = vala_delegate_get_return_type (d);
                              _tmp108_ = vala_data_type_get_cname (_tmp107_);
                              _tmp109_ = _tmp108_;
                              _tmp110_ = vala_ccode_declaration_new (_tmp109_);
                              _tmp111_ = _tmp110_;
                              _g_free0 (_tmp109_);
                              _cdecl_ = _tmp111_;
                              _tmp112_ = vala_ccode_variable_declarator_new ("result", NULL, NULL);
                              _tmp113_ = _tmp112_;
                              vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) _tmp113_);
                              _vala_ccode_node_unref0 (_tmp113_);
                              _tmp114_ = vala_ccode_identifier_new ("result");
                              _tmp115_ = _tmp114_;
                              _tmp116_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp115_);
                              _tmp117_ = _tmp116_;
                              vala_ccode_function_call_add_argument (call, (ValaCCodeExpression*) _tmp117_);
                              _vala_ccode_node_unref0 (_tmp117_);
                              _vala_ccode_node_unref0 (_tmp115_);
                              _tmp118_ = vala_ccode_function_get_block (wrapper);
                              _tmp119_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) call);
                              _tmp120_ = _tmp119_;
                              vala_ccode_block_add_statement (_tmp118_, (ValaCCodeNode*) _tmp120_);
                              _vala_ccode_node_unref0 (_tmp120_);
                              _tmp121_ = vala_ccode_function_get_block (wrapper);
                              _tmp122_ = vala_ccode_identifier_new ("result");
                              _tmp123_ = _tmp122_;
                              _tmp124_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) _tmp123_);
                              _tmp125_ = _tmp124_;
                              vala_ccode_block_add_statement (_tmp121_, (ValaCCodeNode*) _tmp125_);
                              _vala_ccode_node_unref0 (_tmp125_);
                              _vala_ccode_node_unref0 (_tmp123_);
                              _vala_ccode_node_unref0 (_cdecl_);
                        } else {
                              ValaDataType* _tmp126_ = NULL;
                              _tmp126_ = vala_delegate_get_return_type (d);
                              if (VALA_IS_GENERIC_TYPE (_tmp126_)) {
                                    ValaCCodeParameter* _tmp127_ = NULL;
                                    ValaCCodeParameter* _tmp128_;
                                    ValaCCodeBlock* _tmp129_ = NULL;
                                    ValaCCodeExpressionStatement* _tmp130_ = NULL;
                                    ValaCCodeExpressionStatement* _tmp131_;
                                    _tmp127_ = vala_ccode_parameter_new ("result", "void *");
                                    _tmp128_ = _tmp127_;
                                    vala_ccode_function_add_parameter (wrapper, _tmp128_);
                                    _vala_ccode_node_unref0 (_tmp128_);
                                    _tmp129_ = vala_ccode_function_get_block (wrapper);
                                    _tmp130_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) call);
                                    _tmp131_ = _tmp130_;
                                    vala_ccode_block_add_statement (_tmp129_, (ValaCCodeNode*) _tmp131_);
                                    _vala_ccode_node_unref0 (_tmp131_);
                              } else {
                                    ValaDataType* _tmp132_ = NULL;
                                    gchar* _tmp133_ = NULL;
                                    gchar* _tmp134_;
                                    ValaCCodeBlock* _tmp135_ = NULL;
                                    ValaCCodeReturnStatement* _tmp136_ = NULL;
                                    ValaCCodeReturnStatement* _tmp137_;
                                    _tmp132_ = vala_delegate_get_return_type (d);
                                    _tmp133_ = vala_data_type_get_cname (_tmp132_);
                                    _tmp134_ = _tmp133_;
                                    vala_ccode_function_set_return_type (wrapper, _tmp134_);
                                    _g_free0 (_tmp134_);
                                    _tmp135_ = vala_ccode_function_get_block (wrapper);
                                    _tmp136_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) call);
                                    _tmp137_ = _tmp136_;
                                    vala_ccode_block_add_statement (_tmp135_, (ValaCCodeNode*) _tmp137_);
                                    _vala_ccode_node_unref0 (_tmp137_);
                              }
                        }
                  }
                  _vala_code_node_unref0 (method_return_type);
            }
            vala_ccode_file_add_function (self->cfile, wrapper);
            _tmp138_ = vala_delegate_type_get_delegate_symbol (deleg_type);
            _tmp139_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) _tmp138_, NULL);
            _tmp140_ = _tmp139_;
            _tmp141_ = g_strdup_printf ("%s_new", _tmp140_);
            _tmp142_ = _tmp141_;
            _tmp143_ = vala_ccode_identifier_new (_tmp142_);
            _tmp144_ = _tmp143_;
            _tmp145_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp144_);
            _tmp146_ = _tmp145_;
            _vala_ccode_node_unref0 (_tmp144_);
            _g_free0 (_tmp142_);
            _g_free0 (_tmp140_);
            ccall = _tmp146_;
            vala_ccode_function_call_add_argument (ccall, delegate_target);
            _tmp147_ = vala_ccode_identifier_new (wrapper_name);
            _tmp148_ = _tmp147_;
            vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp148_);
            _vala_ccode_node_unref0 (_tmp148_);
            result = (ValaCCodeExpression*) ccall;
            _vala_iterator_unref0 (method_param_iter);
            _vala_ccode_node_unref0 (call);
            _vala_ccode_node_unref0 (wrapper);
            _g_free0 (wrapper_name);
            _vala_code_node_unref0 (d);
            _vala_ccode_node_unref0 (delegate_target);
            _vala_code_node_unref0 (method_type);
            _vala_code_node_unref0 (deleg_type);
            _vala_ccode_node_unref0 (cexpr);
            return result;
      }
      _tmp149_ = vala_data_type_get_data_type (target_type);
      _tmp150_ = _tmp149_;
      _tmp151_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp150_) ? ((ValaClass*) _tmp150_) : NULL);
      cl = _tmp151_;
      _tmp152_ = vala_data_type_get_data_type (target_type);
      _tmp153_ = _tmp152_;
      _tmp154_ = _vala_code_node_ref0 (VALA_IS_INTERFACE (_tmp153_) ? ((ValaInterface*) _tmp153_) : NULL);
      iface = _tmp154_;
      _tmp156_ = vala_code_context_get_checking (self->priv->_context);
      if (_tmp156_) {
            gboolean _tmp157_ = FALSE;
            if (iface != NULL) {
                  _tmp157_ = TRUE;
            } else {
                  gboolean _tmp158_ = FALSE;
                  if (cl != NULL) {
                        gboolean _tmp159_;
                        _tmp159_ = vala_class_get_is_compact (cl);
                        _tmp158_ = !_tmp159_;
                  } else {
                        _tmp158_ = FALSE;
                  }
                  _tmp157_ = _tmp158_;
            }
            _tmp155_ = _tmp157_;
      } else {
            _tmp155_ = FALSE;
      }
      if (_tmp155_) {
            ValaTypeSymbol* _tmp160_ = NULL;
            ValaCCodeExpression* _tmp161_ = NULL;
            _tmp160_ = vala_data_type_get_data_type (target_type);
            _tmp161_ = vala_dova_base_module_generate_instance_cast (self, cexpr, _tmp160_);
            result = _tmp161_;
            _vala_code_node_unref0 (iface);
            _vala_code_node_unref0 (cl);
            _vala_ccode_node_unref0 (cexpr);
            return result;
      } else {
            gboolean _tmp162_ = FALSE;
            ValaTypeSymbol* _tmp163_ = NULL;
            _tmp163_ = vala_data_type_get_data_type (target_type);
            if (_tmp163_ != NULL) {
                  gchar* _tmp164_ = NULL;
                  gchar* _tmp165_;
                  gchar* _tmp166_ = NULL;
                  gchar* _tmp167_;
                  _tmp164_ = vala_data_type_get_cname (expression_type);
                  _tmp165_ = _tmp164_;
                  _tmp166_ = vala_data_type_get_cname (target_type);
                  _tmp167_ = _tmp166_;
                  _tmp162_ = g_strcmp0 (_tmp165_, _tmp167_) != 0;
                  _g_free0 (_tmp167_);
                  _g_free0 (_tmp165_);
            } else {
                  _tmp162_ = FALSE;
            }
            if (_tmp162_) {
                  ValaTypeSymbol* _tmp168_ = NULL;
                  ValaTypeSymbol* _tmp169_;
                  ValaStruct* _tmp170_;
                  ValaStruct* st;
                  gboolean _tmp171_ = FALSE;
                  ValaTypeSymbol* _tmp172_ = NULL;
                  gboolean _tmp173_;
                  _tmp168_ = vala_data_type_get_data_type (target_type);
                  _tmp169_ = _tmp168_;
                  _tmp170_ = _vala_code_node_ref0 (VALA_IS_STRUCT (_tmp169_) ? ((ValaStruct*) _tmp169_) : NULL);
                  st = _tmp170_;
                  _tmp172_ = vala_data_type_get_data_type (target_type);
                  _tmp173_ = vala_typesymbol_is_reference_type (_tmp172_);
                  if (_tmp173_) {
                        _tmp171_ = TRUE;
                  } else {
                        gboolean _tmp174_ = FALSE;
                        if (st != NULL) {
                              gboolean _tmp175_;
                              _tmp175_ = vala_struct_is_simple_type (st);
                              _tmp174_ = _tmp175_;
                        } else {
                              _tmp174_ = FALSE;
                        }
                        _tmp171_ = _tmp174_;
                  }
                  if (_tmp171_) {
                        gchar* _tmp176_ = NULL;
                        gchar* _tmp177_;
                        ValaCCodeCastExpression* _tmp178_ = NULL;
                        ValaCCodeExpression* _tmp179_;
                        _tmp176_ = vala_data_type_get_cname (target_type);
                        _tmp177_ = _tmp176_;
                        _tmp178_ = vala_ccode_cast_expression_new (cexpr, _tmp177_);
                        _tmp179_ = (ValaCCodeExpression*) _tmp178_;
                        _g_free0 (_tmp177_);
                        result = _tmp179_;
                        _vala_code_node_unref0 (st);
                        _vala_code_node_unref0 (iface);
                        _vala_code_node_unref0 (cl);
                        _vala_ccode_node_unref0 (cexpr);
                        return result;
                  } else {
                        result = cexpr;
                        _vala_code_node_unref0 (st);
                        _vala_code_node_unref0 (iface);
                        _vala_code_node_unref0 (cl);
                        return result;
                  }
                  _vala_code_node_unref0 (st);
            } else {
                  result = cexpr;
                  _vala_code_node_unref0 (iface);
                  _vala_code_node_unref0 (cl);
                  return result;
            }
      }
      _vala_code_node_unref0 (iface);
      _vala_code_node_unref0 (cl);
      _vala_ccode_node_unref0 (cexpr);
}


ValaCCodeExpression* vala_dova_base_module_get_implicit_cast_expression (ValaDovaBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr) {
      return VALA_DOVA_BASE_MODULE_GET_CLASS (self)->get_implicit_cast_expression (self, source_cexpr, expression_type, target_type, expr);
}


void vala_dova_base_module_store_property (ValaDovaBaseModule* self, ValaProperty* prop, ValaExpression* instance, ValaTargetValue* value) {
      gchar* set_func = NULL;
      ValaProperty* _tmp0_;
      ValaProperty* base_property;
      ValaProperty* _tmp1_ = NULL;
      ValaPropertyAccessor* _tmp7_ = NULL;
      ValaPropertyAccessor* _tmp8_ = NULL;
      gchar* _tmp9_ = NULL;
      gboolean _tmp10_ = FALSE;
      gboolean _tmp11_;
      ValaCCodeIdentifier* _tmp14_ = NULL;
      ValaCCodeIdentifier* _tmp15_;
      ValaCCodeFunctionCall* _tmp16_ = NULL;
      ValaCCodeFunctionCall* _tmp17_;
      ValaCCodeFunctionCall* ccall;
      ValaMemberBinding _tmp18_;
      ValaCCodeExpression* _tmp21_ = NULL;
      ValaCCodeExpression* _tmp22_;
      ValaCCodeFunction* _tmp23_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (prop != NULL);
      g_return_if_fail (value != NULL);
      _tmp0_ = _vala_code_node_ref0 (prop);
      base_property = _tmp0_;
      _tmp1_ = vala_property_get_base_property (prop);
      if (_tmp1_ != NULL) {
            ValaProperty* _tmp2_ = NULL;
            ValaProperty* _tmp3_;
            _tmp2_ = vala_property_get_base_property (prop);
            _tmp3_ = _vala_code_node_ref0 (_tmp2_);
            _vala_code_node_unref0 (base_property);
            base_property = _tmp3_;
      } else {
            ValaProperty* _tmp4_ = NULL;
            _tmp4_ = vala_property_get_base_interface_property (prop);
            if (_tmp4_ != NULL) {
                  ValaProperty* _tmp5_ = NULL;
                  ValaProperty* _tmp6_;
                  _tmp5_ = vala_property_get_base_interface_property (prop);
                  _tmp6_ = _vala_code_node_ref0 (_tmp5_);
                  _vala_code_node_unref0 (base_property);
                  base_property = _tmp6_;
            }
      }
      _tmp7_ = vala_property_get_set_accessor (base_property);
      vala_dova_base_module_generate_property_accessor_declaration (self, _tmp7_, self->cfile);
      _tmp8_ = vala_property_get_set_accessor (base_property);
      _tmp9_ = vala_property_accessor_get_cname (_tmp8_);
      _g_free0 (set_func);
      set_func = _tmp9_;
      _tmp11_ = vala_symbol_get_external ((ValaSymbol*) prop);
      if (!_tmp11_) {
            gboolean _tmp12_;
            _tmp12_ = vala_symbol_get_external_package ((ValaSymbol*) prop);
            _tmp10_ = _tmp12_;
      } else {
            _tmp10_ = FALSE;
      }
      if (_tmp10_) {
            gboolean _tmp13_;
            _tmp13_ = vala_dova_base_module_add_generated_external_symbol (self, (ValaSymbol*) prop);
            if (_tmp13_) {
                  vala_code_visitor_visit_property ((ValaCodeVisitor*) self, prop);
            }
      }
      _tmp14_ = vala_ccode_identifier_new (set_func);
      _tmp15_ = _tmp14_;
      _tmp16_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp15_);
      _tmp17_ = _tmp16_;
      _vala_ccode_node_unref0 (_tmp15_);
      ccall = _tmp17_;
      _tmp18_ = vala_property_get_binding (prop);
      if (_tmp18_ == VALA_MEMBER_BINDING_INSTANCE) {
            ValaCCodeExpression* _tmp19_ = NULL;
            ValaCCodeExpression* _tmp20_;
            _tmp19_ = vala_dova_base_module_get_ccodenode (self, instance);
            _tmp20_ = VALA_CCODE_EXPRESSION (_tmp19_);
            vala_ccode_function_call_add_argument (ccall, _tmp20_);
            _vala_ccode_node_unref0 (_tmp20_);
      }
      _tmp21_ = vala_dova_base_module_get_cvalue_ (self, value);
      _tmp22_ = _tmp21_;
      vala_ccode_function_call_add_argument (ccall, _tmp22_);
      _vala_ccode_node_unref0 (_tmp22_);
      _tmp23_ = vala_dova_base_module_get_ccode (self);
      vala_ccode_function_add_expression (_tmp23_, (ValaCCodeExpression*) ccall);
      _vala_ccode_node_unref0 (ccall);
      _vala_code_node_unref0 (base_property);
      _g_free0 (set_func);
}


gboolean vala_dova_base_module_add_generated_external_symbol (ValaDovaBaseModule* self, ValaSymbol* external_symbol) {
      gboolean result = FALSE;
      gboolean _tmp0_;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (external_symbol != NULL, FALSE);
      _tmp0_ = vala_collection_add ((ValaCollection*) self->priv->generated_external_symbols, external_symbol);
      result = _tmp0_;
      return result;
}


ValaDataType* vala_dova_base_module_get_data_type_for_symbol (ValaTypeSymbol* sym) {
      ValaDataType* result = NULL;
      ValaDataType* type;
      g_return_val_if_fail (sym != NULL, NULL);
      type = NULL;
      if (VALA_IS_CLASS (sym)) {
            ValaObjectType* _tmp0_ = NULL;
            _tmp0_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (sym));
            _vala_code_node_unref0 (type);
            type = (ValaDataType*) _tmp0_;
      } else {
            if (VALA_IS_INTERFACE (sym)) {
                  ValaObjectType* _tmp1_ = NULL;
                  _tmp1_ = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (sym));
                  _vala_code_node_unref0 (type);
                  type = (ValaDataType*) _tmp1_;
            } else {
                  if (VALA_IS_STRUCT (sym)) {
                        ValaStruct* _tmp2_;
                        ValaStruct* st;
                        gboolean _tmp3_;
                        _tmp2_ = _vala_code_node_ref0 (VALA_STRUCT (sym));
                        st = _tmp2_;
                        _tmp3_ = vala_struct_is_boolean_type (st);
                        if (_tmp3_) {
                              ValaBooleanType* _tmp4_ = NULL;
                              _tmp4_ = vala_boolean_type_new (st);
                              _vala_code_node_unref0 (type);
                              type = (ValaDataType*) _tmp4_;
                        } else {
                              gboolean _tmp5_;
                              _tmp5_ = vala_struct_is_integer_type (st);
                              if (_tmp5_) {
                                    ValaIntegerType* _tmp6_ = NULL;
                                    _tmp6_ = vala_integer_type_new (st, NULL, NULL);
                                    _vala_code_node_unref0 (type);
                                    type = (ValaDataType*) _tmp6_;
                              } else {
                                    gboolean _tmp7_;
                                    _tmp7_ = vala_struct_is_floating_type (st);
                                    if (_tmp7_) {
                                          ValaFloatingType* _tmp8_ = NULL;
                                          _tmp8_ = vala_floating_type_new (st);
                                          _vala_code_node_unref0 (type);
                                          type = (ValaDataType*) _tmp8_;
                                    } else {
                                          ValaStructValueType* _tmp9_ = NULL;
                                          _tmp9_ = vala_struct_value_type_new (st);
                                          _vala_code_node_unref0 (type);
                                          type = (ValaDataType*) _tmp9_;
                                    }
                              }
                        }
                        _vala_code_node_unref0 (st);
                  } else {
                        if (VALA_IS_ENUM (sym)) {
                              ValaEnumValueType* _tmp10_ = NULL;
                              _tmp10_ = vala_enum_value_type_new (VALA_ENUM (sym));
                              _vala_code_node_unref0 (type);
                              type = (ValaDataType*) _tmp10_;
                        } else {
                              gchar* _tmp11_ = NULL;
                              gchar* _tmp12_;
                              gchar* _tmp13_ = NULL;
                              gchar* _tmp14_;
                              ValaInvalidType* _tmp15_ = NULL;
                              _tmp11_ = vala_symbol_get_full_name ((ValaSymbol*) sym);
                              _tmp12_ = _tmp11_;
                              _tmp13_ = g_strdup_printf ("internal error: `%s' is not a supported type", _tmp12_);
                              _tmp14_ = _tmp13_;
                              vala_report_error (NULL, _tmp14_);
                              _g_free0 (_tmp14_);
                              _g_free0 (_tmp12_);
                              _tmp15_ = vala_invalid_type_new ();
                              result = (ValaDataType*) _tmp15_;
                              _vala_code_node_unref0 (type);
                              return result;
                        }
                  }
            }
      }
      result = type;
      return result;
}


ValaCCodeExpression* vala_dova_base_module_default_value_for_type (ValaDovaBaseModule* self, ValaDataType* type, gboolean initializer_expression) {
      ValaCCodeExpression* result = NULL;
      ValaTypeSymbol* _tmp0_ = NULL;
      ValaTypeSymbol* _tmp1_;
      ValaStruct* _tmp2_;
      ValaStruct* st;
      ValaDataType* _tmp3_;
      ValaArrayType* _tmp4_;
      ValaArrayType* array_type;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_data_type_get_data_type (type);
      _tmp1_ = _tmp0_;
      _tmp2_ = _vala_code_node_ref0 (VALA_IS_STRUCT (_tmp1_) ? ((ValaStruct*) _tmp1_) : NULL);
      st = _tmp2_;
      _tmp3_ = type;
      _tmp4_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp3_) ? ((ValaArrayType*) _tmp3_) : NULL);
      array_type = _tmp4_;
      if (VALA_IS_GENERIC_TYPE (type)) {
            ValaCCodeIdentifier* _tmp5_ = NULL;
            ValaCCodeIdentifier* _tmp6_;
            ValaCCodeFunctionCall* _tmp7_ = NULL;
            ValaCCodeFunctionCall* _tmp8_;
            ValaCCodeFunctionCall* value_size;
            ValaCCodeExpression* _tmp9_ = NULL;
            ValaCCodeExpression* _tmp10_;
            ValaCCodeIdentifier* _tmp11_ = NULL;
            ValaCCodeIdentifier* _tmp12_;
            ValaCCodeFunctionCall* _tmp13_ = NULL;
            ValaCCodeFunctionCall* _tmp14_;
            ValaCCodeFunctionCall* alloca_call;
            ValaCCodeIdentifier* _tmp15_ = NULL;
            ValaCCodeIdentifier* _tmp16_;
            ValaCCodeFunctionCall* _tmp17_ = NULL;
            ValaCCodeFunctionCall* _tmp18_;
            ValaCCodeFunctionCall* memset_call;
            ValaCCodeConstant* _tmp19_ = NULL;
            ValaCCodeConstant* _tmp20_;
            _tmp5_ = vala_ccode_identifier_new ("dova_type_get_value_size");
            _tmp6_ = _tmp5_;
            _tmp7_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp6_);
            _tmp8_ = _tmp7_;
            _vala_ccode_node_unref0 (_tmp6_);
            value_size = _tmp8_;
            _tmp9_ = vala_dova_base_module_get_type_id_expression (self, type, FALSE);
            _tmp10_ = _tmp9_;
            vala_ccode_function_call_add_argument (value_size, _tmp10_);
            _vala_ccode_node_unref0 (_tmp10_);
            _tmp11_ = vala_ccode_identifier_new ("alloca");
            _tmp12_ = _tmp11_;
            _tmp13_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp12_);
            _tmp14_ = _tmp13_;
            _vala_ccode_node_unref0 (_tmp12_);
            alloca_call = _tmp14_;
            vala_ccode_function_call_add_argument (alloca_call, (ValaCCodeExpression*) value_size);
            _tmp15_ = vala_ccode_identifier_new ("memset");
            _tmp16_ = _tmp15_;
            _tmp17_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp16_);
            _tmp18_ = _tmp17_;
            _vala_ccode_node_unref0 (_tmp16_);
            memset_call = _tmp18_;
            vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) alloca_call);
            _tmp19_ = vala_ccode_constant_new ("0");
            _tmp20_ = _tmp19_;
            vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) _tmp20_);
            _vala_ccode_node_unref0 (_tmp20_);
            vala_ccode_function_call_add_argument (memset_call, (ValaCCodeExpression*) value_size);
            result = (ValaCCodeExpression*) memset_call;
            _vala_ccode_node_unref0 (alloca_call);
            _vala_ccode_node_unref0 (value_size);
            _vala_code_node_unref0 (array_type);
            _vala_code_node_unref0 (st);
            return result;
      } else {
            gboolean _tmp21_ = FALSE;
            gboolean _tmp22_ = FALSE;
            if (initializer_expression) {
                  gboolean _tmp23_;
                  _tmp23_ = vala_data_type_get_nullable (type);
                  _tmp22_ = !_tmp23_;
            } else {
                  _tmp22_ = FALSE;
            }
            if (_tmp22_) {
                  gboolean _tmp24_ = FALSE;
                  gboolean _tmp25_ = FALSE;
                  if (st != NULL) {
                        ValaList* _tmp26_ = NULL;
                        ValaList* _tmp27_;
                        gint _tmp28_;
                        _tmp26_ = vala_struct_get_fields (st);
                        _tmp27_ = _tmp26_;
                        _tmp28_ = vala_collection_get_size ((ValaCollection*) _tmp27_);
                        _tmp25_ = _tmp28_ > 0;
                        _vala_iterable_unref0 (_tmp27_);
                  } else {
                        _tmp25_ = FALSE;
                  }
                  if (_tmp25_) {
                        _tmp24_ = TRUE;
                  } else {
                        gboolean _tmp29_ = FALSE;
                        if (array_type != NULL) {
                              gboolean _tmp30_;
                              _tmp30_ = vala_array_type_get_fixed_length (array_type);
                              _tmp29_ = _tmp30_;
                        } else {
                              _tmp29_ = FALSE;
                        }
                        _tmp24_ = _tmp29_;
                  }
                  _tmp21_ = _tmp24_;
            } else {
                  _tmp21_ = FALSE;
            }
            if (_tmp21_) {
                  ValaCCodeInitializerList* _tmp31_ = NULL;
                  ValaCCodeInitializerList* clist;
                  ValaCCodeConstant* _tmp32_ = NULL;
                  ValaCCodeConstant* _tmp33_;
                  _tmp31_ = vala_ccode_initializer_list_new ();
                  clist = _tmp31_;
                  _tmp32_ = vala_ccode_constant_new ("0");
                  _tmp33_ = _tmp32_;
                  vala_ccode_initializer_list_append (clist, (ValaCCodeExpression*) _tmp33_);
                  _vala_ccode_node_unref0 (_tmp33_);
                  result = (ValaCCodeExpression*) clist;
                  _vala_code_node_unref0 (array_type);
                  _vala_code_node_unref0 (st);
                  return result;
            } else {
                  gboolean _tmp34_ = FALSE;
                  gboolean _tmp35_ = FALSE;
                  gboolean _tmp36_ = FALSE;
                  gboolean _tmp37_ = FALSE;
                  gboolean _tmp38_ = FALSE;
                  ValaTypeSymbol* _tmp39_ = NULL;
                  _tmp39_ = vala_data_type_get_data_type (type);
                  if (_tmp39_ != NULL) {
                        ValaTypeSymbol* _tmp40_ = NULL;
                        gboolean _tmp41_;
                        _tmp40_ = vala_data_type_get_data_type (type);
                        _tmp41_ = vala_typesymbol_is_reference_type (_tmp40_);
                        _tmp38_ = _tmp41_;
                  } else {
                        _tmp38_ = FALSE;
                  }
                  if (_tmp38_) {
                        _tmp37_ = TRUE;
                  } else {
                        gboolean _tmp42_;
                        _tmp42_ = vala_data_type_get_nullable (type);
                        _tmp37_ = _tmp42_;
                  }
                  if (_tmp37_) {
                        _tmp36_ = TRUE;
                  } else {
                        _tmp36_ = VALA_IS_POINTER_TYPE (type);
                  }
                  if (_tmp36_) {
                        _tmp35_ = TRUE;
                  } else {
                        _tmp35_ = VALA_IS_DELEGATE_TYPE (type);
                  }
                  if (_tmp35_) {
                        _tmp34_ = TRUE;
                  } else {
                        gboolean _tmp43_ = FALSE;
                        if (array_type != NULL) {
                              gboolean _tmp44_;
                              _tmp44_ = vala_array_type_get_fixed_length (array_type);
                              _tmp43_ = !_tmp44_;
                        } else {
                              _tmp43_ = FALSE;
                        }
                        _tmp34_ = _tmp43_;
                  }
                  if (_tmp34_) {
                        ValaCCodeConstant* _tmp45_ = NULL;
                        _tmp45_ = vala_ccode_constant_new ("NULL");
                        result = (ValaCCodeExpression*) _tmp45_;
                        _vala_code_node_unref0 (array_type);
                        _vala_code_node_unref0 (st);
                        return result;
                  } else {
                        gboolean _tmp46_ = FALSE;
                        ValaTypeSymbol* _tmp47_ = NULL;
                        _tmp47_ = vala_data_type_get_data_type (type);
                        if (_tmp47_ != NULL) {
                              ValaTypeSymbol* _tmp48_ = NULL;
                              gchar* _tmp49_ = NULL;
                              gchar* _tmp50_;
                              _tmp48_ = vala_data_type_get_data_type (type);
                              _tmp49_ = vala_typesymbol_get_default_value (_tmp48_);
                              _tmp50_ = _tmp49_;
                              _tmp46_ = _tmp50_ != NULL;
                              _g_free0 (_tmp50_);
                        } else {
                              _tmp46_ = FALSE;
                        }
                        if (_tmp46_) {
                              ValaTypeSymbol* _tmp51_ = NULL;
                              gchar* _tmp52_ = NULL;
                              gchar* _tmp53_;
                              ValaCCodeConstant* _tmp54_ = NULL;
                              ValaCCodeExpression* _tmp55_;
                              _tmp51_ = vala_data_type_get_data_type (type);
                              _tmp52_ = vala_typesymbol_get_default_value (_tmp51_);
                              _tmp53_ = _tmp52_;
                              _tmp54_ = vala_ccode_constant_new (_tmp53_);
                              _tmp55_ = (ValaCCodeExpression*) _tmp54_;
                              _g_free0 (_tmp53_);
                              result = _tmp55_;
                              _vala_code_node_unref0 (array_type);
                              _vala_code_node_unref0 (st);
                              return result;
                        }
                  }
            }
      }
      result = NULL;
      _vala_code_node_unref0 (array_type);
      _vala_code_node_unref0 (st);
      return result;
}


ValaCCodeExpression* vala_dova_base_module_get_ccodenode (ValaDovaBaseModule* self, ValaExpression* node) {
      ValaCCodeExpression* result = NULL;
      ValaCCodeExpression* _tmp0_ = NULL;
      ValaCCodeExpression* _tmp1_;
      gboolean _tmp2_;
      ValaCCodeExpression* _tmp3_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (node != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_cvalue (self, node);
      _tmp1_ = _tmp0_;
      _tmp2_ = _tmp1_ == NULL;
      _vala_ccode_node_unref0 (_tmp1_);
      if (_tmp2_) {
            vala_code_node_emit ((ValaCodeNode*) node, (ValaCodeGenerator*) self);
      }
      _tmp3_ = vala_dova_base_module_get_cvalue (self, node);
      result = _tmp3_;
      return result;
}


ValaDataType* vala_dova_base_module_get_this_type (ValaDovaBaseModule* self) {
      ValaDataType* result = NULL;
      gboolean _tmp0_ = FALSE;
      ValaMethod* _tmp1_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp1_ = vala_dova_base_module_get_current_method (self);
      if (_tmp1_ != NULL) {
            ValaMethod* _tmp2_ = NULL;
            ValaMemberBinding _tmp3_;
            _tmp2_ = vala_dova_base_module_get_current_method (self);
            _tmp3_ = vala_method_get_binding (_tmp2_);
            _tmp0_ = _tmp3_ == VALA_MEMBER_BINDING_INSTANCE;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            ValaMethod* _tmp4_ = NULL;
            ValaParameter* _tmp5_ = NULL;
            ValaDataType* _tmp6_ = NULL;
            ValaDataType* _tmp7_;
            _tmp4_ = vala_dova_base_module_get_current_method (self);
            _tmp5_ = vala_method_get_this_parameter (_tmp4_);
            _tmp6_ = vala_variable_get_variable_type ((ValaVariable*) _tmp5_);
            _tmp7_ = _vala_code_node_ref0 (_tmp6_);
            result = _tmp7_;
            return result;
      } else {
            gboolean _tmp8_ = FALSE;
            ValaPropertyAccessor* _tmp9_ = NULL;
            _tmp9_ = vala_dova_base_module_get_current_property_accessor (self);
            if (_tmp9_ != NULL) {
                  ValaPropertyAccessor* _tmp10_ = NULL;
                  ValaProperty* _tmp11_ = NULL;
                  ValaMemberBinding _tmp12_;
                  _tmp10_ = vala_dova_base_module_get_current_property_accessor (self);
                  _tmp11_ = vala_property_accessor_get_prop (_tmp10_);
                  _tmp12_ = vala_property_get_binding (_tmp11_);
                  _tmp8_ = _tmp12_ == VALA_MEMBER_BINDING_INSTANCE;
            } else {
                  _tmp8_ = FALSE;
            }
            if (_tmp8_) {
                  ValaPropertyAccessor* _tmp13_ = NULL;
                  ValaProperty* _tmp14_ = NULL;
                  ValaParameter* _tmp15_ = NULL;
                  ValaDataType* _tmp16_ = NULL;
                  ValaDataType* _tmp17_;
                  _tmp13_ = vala_dova_base_module_get_current_property_accessor (self);
                  _tmp14_ = vala_property_accessor_get_prop (_tmp13_);
                  _tmp15_ = vala_property_get_this_parameter (_tmp14_);
                  _tmp16_ = vala_variable_get_variable_type ((ValaVariable*) _tmp15_);
                  _tmp17_ = _vala_code_node_ref0 (_tmp16_);
                  result = _tmp17_;
                  return result;
            }
      }
      result = NULL;
      return result;
}


ValaCCodeExpression* vala_dova_base_module_generate_instance_cast (ValaDovaBaseModule* self, ValaCCodeExpression* expr, ValaTypeSymbol* type) {
      ValaCCodeExpression* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_;
      gchar* _tmp3_;
      ValaCCodeCastExpression* _tmp4_ = NULL;
      ValaCCodeExpression* _tmp5_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (expr != NULL, NULL);
      g_return_val_if_fail (type != NULL, NULL);
      _tmp0_ = vala_typesymbol_get_cname (type, FALSE);
      _tmp1_ = _tmp0_;
      _tmp2_ = g_strconcat (_tmp1_, "*", NULL);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_ccode_cast_expression_new (expr, _tmp3_);
      _tmp5_ = (ValaCCodeExpression*) _tmp4_;
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      result = _tmp5_;
      return result;
}


static gchar* vala_dova_base_module_real_get_custom_creturn_type (ValaDovaBaseModule* self, ValaMethod* m) {
      gchar* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (m != NULL, NULL);
      result = NULL;
      return result;
}


gchar* vala_dova_base_module_get_custom_creturn_type (ValaDovaBaseModule* self, ValaMethod* m) {
      return VALA_DOVA_BASE_MODULE_GET_CLASS (self)->get_custom_creturn_type (self, m);
}


static gboolean vala_dova_base_module_real_method_has_wrapper (ValaDovaBaseModule* self, ValaMethod* method) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (method != NULL, FALSE);
      result = FALSE;
      return result;
}


gboolean vala_dova_base_module_method_has_wrapper (ValaDovaBaseModule* self, ValaMethod* method) {
      return VALA_DOVA_BASE_MODULE_GET_CLASS (self)->method_has_wrapper (self, method);
}


static void vala_dova_base_module_real_add_simple_check (ValaDovaBaseModule* self, ValaCodeNode* node, gboolean always_fails) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (node != NULL);
}


void vala_dova_base_module_add_simple_check (ValaDovaBaseModule* self, ValaCodeNode* node, gboolean always_fails) {
      VALA_DOVA_BASE_MODULE_GET_CLASS (self)->add_simple_check (self, node, always_fails);
}


static gpointer _vala_target_value_ref0 (gpointer self) {
      return self ? vala_target_value_ref (self) : NULL;
}


ValaCCodeExpression* vala_dova_base_module_get_cvalue (ValaDovaBaseModule* self, ValaExpression* expr) {
      ValaCCodeExpression* result = NULL;
      ValaTargetValue* _tmp0_ = NULL;
      ValaTargetValue* _tmp1_ = NULL;
      ValaDovaValue* _tmp2_;
      ValaDovaValue* dova_value;
      ValaCCodeExpression* _tmp3_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (expr != NULL, NULL);
      _tmp0_ = vala_expression_get_target_value (expr);
      if (_tmp0_ == NULL) {
            result = NULL;
            return result;
      }
      _tmp1_ = vala_expression_get_target_value (expr);
      _tmp2_ = _vala_target_value_ref0 (VALA_DOVA_VALUE (_tmp1_));
      dova_value = _tmp2_;
      _tmp3_ = _vala_ccode_node_ref0 (dova_value->cvalue);
      result = _tmp3_;
      _vala_target_value_unref0 (dova_value);
      return result;
}


ValaCCodeExpression* vala_dova_base_module_get_cvalue_ (ValaDovaBaseModule* self, ValaTargetValue* value) {
      ValaCCodeExpression* result = NULL;
      ValaDovaValue* _tmp0_;
      ValaDovaValue* dova_value;
      ValaCCodeExpression* _tmp1_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (value != NULL, NULL);
      _tmp0_ = _vala_target_value_ref0 (VALA_DOVA_VALUE (value));
      dova_value = _tmp0_;
      _tmp1_ = _vala_ccode_node_ref0 (dova_value->cvalue);
      result = _tmp1_;
      _vala_target_value_unref0 (dova_value);
      return result;
}


void vala_dova_base_module_set_cvalue (ValaDovaBaseModule* self, ValaExpression* expr, ValaCCodeExpression* cvalue) {
      ValaTargetValue* _tmp0_ = NULL;
      ValaDovaValue* _tmp1_;
      ValaDovaValue* dova_value;
      ValaCCodeExpression* _tmp4_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (expr != NULL);
      _tmp0_ = vala_expression_get_target_value (expr);
      _tmp1_ = _vala_target_value_ref0 (VALA_DOVA_VALUE (_tmp0_));
      dova_value = _tmp1_;
      if (dova_value == NULL) {
            ValaDataType* _tmp2_ = NULL;
            ValaDovaValue* _tmp3_ = NULL;
            _tmp2_ = vala_expression_get_value_type (expr);
            _tmp3_ = vala_dova_value_new (_tmp2_, NULL);
            _vala_target_value_unref0 (dova_value);
            dova_value = _tmp3_;
            vala_expression_set_target_value (expr, (ValaTargetValue*) dova_value);
      }
      _tmp4_ = _vala_ccode_node_ref0 (cvalue);
      _vala_ccode_node_unref0 (dova_value->cvalue);
      dova_value->cvalue = _tmp4_;
      _vala_target_value_unref0 (dova_value);
}


ValaCodeContext* vala_dova_base_module_get_context (ValaDovaBaseModule* self) {
      ValaCodeContext* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->priv->_context;
      return result;
}


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


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


ValaSymbol* vala_dova_base_module_get_current_symbol (ValaDovaBaseModule* self) {
      ValaSymbol* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->emit_context->current_symbol;
      return result;
}


ValaTryStatement* vala_dova_base_module_get_current_try (ValaDovaBaseModule* self) {
      ValaTryStatement* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->emit_context->current_try;
      return result;
}


void vala_dova_base_module_set_current_try (ValaDovaBaseModule* self, ValaTryStatement* value) {
      ValaTryStatement* _tmp0_;
      g_return_if_fail (self != NULL);
      _tmp0_ = _vala_code_node_ref0 (value);
      _vala_code_node_unref0 (self->emit_context->current_try);
      self->emit_context->current_try = _tmp0_;
}


ValaTypeSymbol* vala_dova_base_module_get_current_type_symbol (ValaDovaBaseModule* self) {
      ValaTypeSymbol* result;
      ValaSymbol* _tmp0_ = NULL;
      ValaSymbol* _tmp1_;
      ValaSymbol* sym;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_current_symbol (self);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      sym = _tmp1_;
      while (TRUE) {
            ValaSymbol* _tmp2_ = NULL;
            ValaSymbol* _tmp3_;
            if (!(sym != NULL)) {
                  break;
            }
            if (VALA_IS_TYPESYMBOL (sym)) {
                  result = VALA_TYPESYMBOL (sym);
                  _vala_code_node_unref0 (sym);
                  return result;
            }
            _tmp2_ = vala_symbol_get_parent_symbol (sym);
            _tmp3_ = _vala_code_node_ref0 (_tmp2_);
            _vala_code_node_unref0 (sym);
            sym = _tmp3_;
      }
      result = NULL;
      _vala_code_node_unref0 (sym);
      return result;
}


ValaClass* vala_dova_base_module_get_current_class (ValaDovaBaseModule* self) {
      ValaClass* result;
      ValaTypeSymbol* _tmp0_ = NULL;
      ValaTypeSymbol* _tmp1_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_current_type_symbol (self);
      _tmp1_ = _tmp0_;
      result = VALA_IS_CLASS (_tmp1_) ? ((ValaClass*) _tmp1_) : NULL;
      return result;
}


ValaMethod* vala_dova_base_module_get_current_method (ValaDovaBaseModule* self) {
      ValaMethod* result;
      ValaSymbol* _tmp0_ = NULL;
      ValaSymbol* _tmp1_;
      ValaSymbol* sym;
      ValaSymbol* _tmp4_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_current_symbol (self);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      sym = _tmp1_;
      while (TRUE) {
            ValaSymbol* _tmp2_ = NULL;
            ValaSymbol* _tmp3_;
            if (!VALA_IS_BLOCK (sym)) {
                  break;
            }
            _tmp2_ = vala_symbol_get_parent_symbol (sym);
            _tmp3_ = _vala_code_node_ref0 (_tmp2_);
            _vala_code_node_unref0 (sym);
            sym = _tmp3_;
      }
      _tmp4_ = sym;
      result = VALA_IS_METHOD (_tmp4_) ? ((ValaMethod*) _tmp4_) : NULL;
      _vala_code_node_unref0 (sym);
      return result;
}


ValaPropertyAccessor* vala_dova_base_module_get_current_property_accessor (ValaDovaBaseModule* self) {
      ValaPropertyAccessor* result;
      ValaSymbol* _tmp0_ = NULL;
      ValaSymbol* _tmp1_;
      ValaSymbol* sym;
      ValaSymbol* _tmp4_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_current_symbol (self);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      sym = _tmp1_;
      while (TRUE) {
            ValaSymbol* _tmp2_ = NULL;
            ValaSymbol* _tmp3_;
            if (!VALA_IS_BLOCK (sym)) {
                  break;
            }
            _tmp2_ = vala_symbol_get_parent_symbol (sym);
            _tmp3_ = _vala_code_node_ref0 (_tmp2_);
            _vala_code_node_unref0 (sym);
            sym = _tmp3_;
      }
      _tmp4_ = sym;
      result = VALA_IS_PROPERTY_ACCESSOR (_tmp4_) ? ((ValaPropertyAccessor*) _tmp4_) : NULL;
      _vala_code_node_unref0 (sym);
      return result;
}


ValaDataType* vala_dova_base_module_get_current_return_type (ValaDovaBaseModule* self) {
      ValaDataType* result;
      ValaMethod* _tmp0_ = NULL;
      ValaMethod* _tmp1_;
      ValaMethod* m;
      ValaPropertyAccessor* _tmp3_ = NULL;
      ValaPropertyAccessor* _tmp4_;
      ValaPropertyAccessor* acc;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_current_method (self);
      _tmp1_ = _vala_code_node_ref0 (_tmp0_);
      m = _tmp1_;
      if (m != NULL) {
            ValaDataType* _tmp2_ = NULL;
            _tmp2_ = vala_method_get_return_type (m);
            result = _tmp2_;
            _vala_code_node_unref0 (m);
            return result;
      }
      _tmp3_ = vala_dova_base_module_get_current_property_accessor (self);
      _tmp4_ = _vala_code_node_ref0 (_tmp3_);
      acc = _tmp4_;
      if (acc != NULL) {
            gboolean _tmp5_;
            _tmp5_ = vala_property_accessor_get_readable (acc);
            if (_tmp5_) {
                  ValaDataType* _tmp6_ = NULL;
                  _tmp6_ = vala_property_accessor_get_value_type (acc);
                  result = _tmp6_;
                  _vala_code_node_unref0 (acc);
                  _vala_code_node_unref0 (m);
                  return result;
            } else {
                  result = self->void_type;
                  _vala_code_node_unref0 (acc);
                  _vala_code_node_unref0 (m);
                  return result;
            }
      }
      result = NULL;
      _vala_code_node_unref0 (acc);
      _vala_code_node_unref0 (m);
      return result;
}


ValaBlock* vala_dova_base_module_get_current_closure_block (ValaDovaBaseModule* self) {
      ValaBlock* result;
      ValaSymbol* _tmp0_ = NULL;
      ValaBlock* _tmp1_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_dova_base_module_get_current_symbol (self);
      _tmp1_ = vala_dova_base_module_next_closure_block (self, _tmp0_);
      result = _tmp1_;
      return result;
}


ValaCCodeFunction* vala_dova_base_module_get_ccode (ValaDovaBaseModule* self) {
      ValaCCodeFunction* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->emit_context->ccode;
      return result;
}


ValaArrayList* vala_dova_base_module_get_temp_ref_vars (ValaDovaBaseModule* self) {
      ValaArrayList* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->emit_context->temp_ref_vars;
      return result;
}


gint vala_dova_base_module_get_next_temp_var_id (ValaDovaBaseModule* self) {
      gint result;
      g_return_val_if_fail (self != NULL, 0);
      result = self->emit_context->next_temp_var_id;
      return result;
}


void vala_dova_base_module_set_next_temp_var_id (ValaDovaBaseModule* self, gint value) {
      g_return_if_fail (self != NULL);
      self->emit_context->next_temp_var_id = value;
}


gboolean vala_dova_base_module_get_in_creation_method (ValaDovaBaseModule* self) {
      gboolean result;
      ValaMethod* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, FALSE);
      _tmp0_ = vala_dova_base_module_get_current_method (self);
      result = VALA_IS_CREATION_METHOD (_tmp0_);
      return result;
}


ValaMap* vala_dova_base_module_get_variable_name_map (ValaDovaBaseModule* self) {
      ValaMap* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->emit_context->variable_name_map;
      return result;
}


ValaDovaBaseModuleEmitContext* vala_dova_base_module_emit_context_construct (GType object_type, ValaSymbol* symbol) {
      ValaDovaBaseModuleEmitContext* self = NULL;
      ValaSymbol* _tmp0_;
      self = (ValaDovaBaseModuleEmitContext*) g_type_create_instance (object_type);
      _tmp0_ = _vala_code_node_ref0 (symbol);
      _vala_code_node_unref0 (self->current_symbol);
      self->current_symbol = _tmp0_;
      return self;
}


ValaDovaBaseModuleEmitContext* vala_dova_base_module_emit_context_new (ValaSymbol* symbol) {
      return vala_dova_base_module_emit_context_construct (VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT, symbol);
}


void vala_dova_base_module_emit_context_push_symbol (ValaDovaBaseModuleEmitContext* self, ValaSymbol* symbol) {
      ValaSymbol* _tmp0_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (symbol != NULL);
      vala_collection_add ((ValaCollection*) self->symbol_stack, self->current_symbol);
      _tmp0_ = _vala_code_node_ref0 (symbol);
      _vala_code_node_unref0 (self->current_symbol);
      self->current_symbol = _tmp0_;
}


void vala_dova_base_module_emit_context_pop_symbol (ValaDovaBaseModuleEmitContext* self) {
      gint _tmp0_;
      gpointer _tmp1_ = NULL;
      gint _tmp2_;
      g_return_if_fail (self != NULL);
      _tmp0_ = vala_collection_get_size ((ValaCollection*) self->symbol_stack);
      _tmp1_ = vala_list_get ((ValaList*) self->symbol_stack, _tmp0_ - 1);
      _vala_code_node_unref0 (self->current_symbol);
      self->current_symbol = (ValaSymbol*) _tmp1_;
      _tmp2_ = vala_collection_get_size ((ValaCollection*) self->symbol_stack);
      vala_list_remove_at ((ValaList*) self->symbol_stack, _tmp2_ - 1);
}


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


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


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


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


static gchar* vala_dova_base_module_value_emit_context_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaDovaBaseModuleEmitContext* 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_dova_base_module_emit_context_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_dova_base_module_value_emit_context_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaDovaBaseModuleEmitContext** 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_dova_base_module_emit_context_ref (value->data[0].v_pointer);
      }
      return NULL;
}


GParamSpec* vala_dova_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaDovaBaseModuleParamSpecEmitContext* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT), 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_dova_base_module_value_get_emit_context (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT), NULL);
      return value->data[0].v_pointer;
}


void vala_dova_base_module_value_set_emit_context (GValue* value, gpointer v_object) {
      ValaDovaBaseModuleEmitContext* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT));
            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_dova_base_module_emit_context_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_dova_base_module_emit_context_unref (old);
      }
}


void vala_dova_base_module_value_take_emit_context (GValue* value, gpointer v_object) {
      ValaDovaBaseModuleEmitContext* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT));
            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_dova_base_module_emit_context_unref (old);
      }
}


static void vala_dova_base_module_emit_context_class_init (ValaDovaBaseModuleEmitContextClass * klass) {
      vala_dova_base_module_emit_context_parent_class = g_type_class_peek_parent (klass);
      VALA_DOVA_BASE_MODULE_EMIT_CONTEXT_CLASS (klass)->finalize = vala_dova_base_module_emit_context_finalize;
}


static void vala_dova_base_module_emit_context_instance_init (ValaDovaBaseModuleEmitContext * self) {
      ValaArrayList* _tmp0_ = NULL;
      ValaArrayList* _tmp1_ = NULL;
      ValaArrayList* _tmp2_ = NULL;
      ValaHashMap* _tmp3_ = NULL;
      _tmp0_ = vala_array_list_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
      self->symbol_stack = _tmp0_;
      _tmp1_ = vala_array_list_new (VALA_TYPE_CCODE_FUNCTION, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_equal);
      self->ccode_stack = _tmp1_;
      _tmp2_ = vala_array_list_new (VALA_TYPE_LOCAL_VARIABLE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
      self->temp_ref_vars = _tmp2_;
      _tmp3_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal, g_direct_equal);
      self->variable_name_map = (ValaMap*) _tmp3_;
      self->ref_count = 1;
}


static void vala_dova_base_module_emit_context_finalize (ValaDovaBaseModuleEmitContext* obj) {
      ValaDovaBaseModuleEmitContext * self;
      self = VALA_DOVA_BASE_MODULE_EMIT_CONTEXT (obj);
      _vala_code_node_unref0 (self->current_symbol);
      _vala_iterable_unref0 (self->symbol_stack);
      _vala_code_node_unref0 (self->current_try);
      _vala_ccode_node_unref0 (self->ccode);
      _vala_iterable_unref0 (self->ccode_stack);
      _vala_iterable_unref0 (self->temp_ref_vars);
      _vala_map_unref0 (self->variable_name_map);
}


GType vala_dova_base_module_emit_context_get_type (void) {
      static volatile gsize vala_dova_base_module_emit_context_type_id__volatile = 0;
      if (g_once_init_enter (&vala_dova_base_module_emit_context_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_dova_base_module_value_emit_context_init, vala_dova_base_module_value_emit_context_free_value, vala_dova_base_module_value_emit_context_copy_value, vala_dova_base_module_value_emit_context_peek_pointer, "p", vala_dova_base_module_value_emit_context_collect_value, "p", vala_dova_base_module_value_emit_context_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaDovaBaseModuleEmitContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dova_base_module_emit_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDovaBaseModuleEmitContext), 0, (GInstanceInitFunc) vala_dova_base_module_emit_context_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_dova_base_module_emit_context_type_id;
            vala_dova_base_module_emit_context_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaDovaBaseModuleEmitContext", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_dova_base_module_emit_context_type_id__volatile, vala_dova_base_module_emit_context_type_id);
      }
      return vala_dova_base_module_emit_context_type_id__volatile;
}


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


void vala_dova_base_module_emit_context_unref (gpointer instance) {
      ValaDovaBaseModuleEmitContext* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_DOVA_BASE_MODULE_EMIT_CONTEXT_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static void vala_dova_base_module_class_init (ValaDovaBaseModuleClass * klass) {
      vala_dova_base_module_parent_class = g_type_class_peek_parent (klass);
      VALA_CODE_VISITOR_CLASS (klass)->finalize = vala_dova_base_module_finalize;
      g_type_class_add_private (klass, sizeof (ValaDovaBaseModulePrivate));
      VALA_CODE_GENERATOR_CLASS (klass)->emit = vala_dova_base_module_real_emit;
      VALA_CODE_VISITOR_CLASS (klass)->visit_source_file = vala_dova_base_module_real_visit_source_file;
      VALA_CODE_VISITOR_CLASS (klass)->visit_enum = vala_dova_base_module_real_visit_enum;
      VALA_CODE_VISITOR_CLASS (klass)->visit_constant = vala_dova_base_module_real_visit_constant;
      VALA_CODE_VISITOR_CLASS (klass)->visit_field = vala_dova_base_module_real_visit_field;
      VALA_CODE_VISITOR_CLASS (klass)->visit_formal_parameter = vala_dova_base_module_real_visit_formal_parameter;
      VALA_CODE_VISITOR_CLASS (klass)->visit_property = vala_dova_base_module_real_visit_property;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->generate_struct_declaration = vala_dova_base_module_real_generate_struct_declaration;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->generate_delegate_declaration = vala_dova_base_module_real_generate_delegate_declaration;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->generate_cparameters = vala_dova_base_module_real_generate_cparameters;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->generate_property_accessor_declaration = vala_dova_base_module_real_generate_property_accessor_declaration;
      VALA_CODE_VISITOR_CLASS (klass)->visit_block = vala_dova_base_module_real_visit_block;
      VALA_CODE_VISITOR_CLASS (klass)->visit_declaration_statement = vala_dova_base_module_real_visit_declaration_statement;
      VALA_CODE_VISITOR_CLASS (klass)->visit_local_variable = vala_dova_base_module_real_visit_local_variable;
      VALA_CODE_VISITOR_CLASS (klass)->visit_initializer_list = vala_dova_base_module_real_visit_initializer_list;
      VALA_CODE_GENERATOR_CLASS (klass)->create_local = vala_dova_base_module_real_create_local;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->get_dup_func_expression = vala_dova_base_module_real_get_dup_func_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_end_full_expression = vala_dova_base_module_real_visit_end_full_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_expression_statement = vala_dova_base_module_real_visit_expression_statement;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->append_local_free = vala_dova_base_module_real_append_local_free;
      VALA_CODE_VISITOR_CLASS (klass)->visit_return_statement = vala_dova_base_module_real_visit_return_statement;
      VALA_CODE_VISITOR_CLASS (klass)->visit_delete_statement = vala_dova_base_module_real_visit_delete_statement;
      VALA_CODE_VISITOR_CLASS (klass)->visit_expression = vala_dova_base_module_real_visit_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_boolean_literal = vala_dova_base_module_real_visit_boolean_literal;
      VALA_CODE_VISITOR_CLASS (klass)->visit_character_literal = vala_dova_base_module_real_visit_character_literal;
      VALA_CODE_VISITOR_CLASS (klass)->visit_integer_literal = vala_dova_base_module_real_visit_integer_literal;
      VALA_CODE_VISITOR_CLASS (klass)->visit_real_literal = vala_dova_base_module_real_visit_real_literal;
      VALA_CODE_VISITOR_CLASS (klass)->visit_string_literal = vala_dova_base_module_real_visit_string_literal;
      VALA_CODE_VISITOR_CLASS (klass)->visit_null_literal = vala_dova_base_module_real_visit_null_literal;
      VALA_CODE_VISITOR_CLASS (klass)->visit_base_access = vala_dova_base_module_real_visit_base_access;
      VALA_CODE_VISITOR_CLASS (klass)->visit_postfix_expression = vala_dova_base_module_real_visit_postfix_expression;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->get_ref_cexpression = vala_dova_base_module_real_get_ref_cexpression;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->generate_class_declaration = vala_dova_base_module_real_generate_class_declaration;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->generate_interface_declaration = vala_dova_base_module_real_generate_interface_declaration;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->generate_method_declaration = vala_dova_base_module_real_generate_method_declaration;
      VALA_CODE_VISITOR_CLASS (klass)->visit_object_creation_expression = vala_dova_base_module_real_visit_object_creation_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_sizeof_expression = vala_dova_base_module_real_visit_sizeof_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_typeof_expression = vala_dova_base_module_real_visit_typeof_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_unary_expression = vala_dova_base_module_real_visit_unary_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_cast_expression = vala_dova_base_module_real_visit_cast_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_pointer_indirection = vala_dova_base_module_real_visit_pointer_indirection;
      VALA_CODE_VISITOR_CLASS (klass)->visit_addressof_expression = vala_dova_base_module_real_visit_addressof_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_reference_transfer_expression = vala_dova_base_module_real_visit_reference_transfer_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_binary_expression = vala_dova_base_module_real_visit_binary_expression;
      VALA_CODE_VISITOR_CLASS (klass)->visit_type_check = vala_dova_base_module_real_visit_type_check;
      VALA_CODE_VISITOR_CLASS (klass)->visit_lambda_expression = vala_dova_base_module_real_visit_lambda_expression;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->get_implicit_cast_expression = vala_dova_base_module_real_get_implicit_cast_expression;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->get_custom_creturn_type = vala_dova_base_module_real_get_custom_creturn_type;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->method_has_wrapper = vala_dova_base_module_real_method_has_wrapper;
      VALA_DOVA_BASE_MODULE_CLASS (klass)->add_simple_check = vala_dova_base_module_real_add_simple_check;
}


static void vala_dova_base_module_instance_init (ValaDovaBaseModule * self) {
      ValaDovaBaseModuleEmitContext* _tmp0_ = NULL;
      ValaArrayList* _tmp1_ = NULL;
      ValaArrayList* _tmp2_ = NULL;
      ValaHashMap* _tmp3_ = NULL;
      ValaVoidType* _tmp4_ = NULL;
      self->priv = VALA_DOVA_BASE_MODULE_GET_PRIVATE (self);
      _tmp0_ = vala_dova_base_module_emit_context_new (NULL);
      self->emit_context = _tmp0_;
      _tmp1_ = vala_array_list_new (VALA_DOVA_BASE_MODULE_TYPE_EMIT_CONTEXT, (GBoxedCopyFunc) vala_dova_base_module_emit_context_ref, vala_dova_base_module_emit_context_unref, g_direct_equal);
      self->priv->emit_context_stack = (ValaList*) _tmp1_;
      _tmp2_ = vala_array_list_new (VALA_TYPE_FIELD, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
      self->static_fields = (ValaList*) _tmp2_;
      self->next_wrapper_id = 0;
      self->priv->next_block_id = 0;
      _tmp3_ = vala_hash_map_new (VALA_TYPE_BLOCK, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, G_TYPE_INT, NULL, NULL, g_direct_hash, g_direct_equal, g_direct_equal);
      self->priv->block_map = (ValaMap*) _tmp3_;
      _tmp4_ = vala_void_type_new (NULL);
      self->void_type = (ValaDataType*) _tmp4_;
}


static void vala_dova_base_module_finalize (ValaCodeVisitor* obj) {
      ValaDovaBaseModule * self;
      self = VALA_DOVA_BASE_MODULE (obj);
      _vala_code_context_unref0 (self->priv->_context);
      _vala_code_node_unref0 (self->root_symbol);
      _vala_dova_base_module_emit_context_unref0 (self->emit_context);
      _vala_iterable_unref0 (self->priv->emit_context_stack);
      _vala_ccode_file_unref0 (self->header_file);
      _vala_ccode_file_unref0 (self->cfile);
      _g_free0 (self->priv->csource_filename);
      _vala_iterable_unref0 (self->priv->reserved_identifiers);
      _vala_iterable_unref0 (self->static_fields);
      _vala_map_unref0 (self->priv->block_map);
      _vala_code_node_unref0 (self->void_type);
      _vala_code_node_unref0 (self->bool_type);
      _vala_code_node_unref0 (self->char_type);
      _vala_code_node_unref0 (self->int_type);
      _vala_code_node_unref0 (self->uint_type);
      _vala_code_node_unref0 (self->string_type);
      _vala_code_node_unref0 (self->float_type);
      _vala_code_node_unref0 (self->double_type);
      _vala_code_node_unref0 (self->object_class);
      _vala_code_node_unref0 (self->type_class);
      _vala_code_node_unref0 (self->value_class);
      _vala_code_node_unref0 (self->string_class);
      _vala_code_node_unref0 (self->array_class);
      _vala_code_node_unref0 (self->delegate_class);
      _vala_code_node_unref0 (self->error_class);
      _vala_iterable_unref0 (self->priv->generated_external_symbols);
      VALA_CODE_VISITOR_CLASS (vala_dova_base_module_parent_class)->finalize (obj);
}


/**
 * Code visitor generating C Code.
 */
GType vala_dova_base_module_get_type (void) {
      static volatile gsize vala_dova_base_module_type_id__volatile = 0;
      if (g_once_init_enter (&vala_dova_base_module_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (ValaDovaBaseModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dova_base_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDovaBaseModule), 0, (GInstanceInitFunc) vala_dova_base_module_instance_init, NULL };
            GType vala_dova_base_module_type_id;
            vala_dova_base_module_type_id = g_type_register_static (VALA_TYPE_CODE_GENERATOR, "ValaDovaBaseModule", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
            g_once_init_leave (&vala_dova_base_module_type_id__volatile, vala_dova_base_module_type_id);
      }
      return vala_dova_base_module_type_id__volatile;
}


ValaDovaValue* vala_dova_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue) {
      ValaDovaValue* self = NULL;
      ValaCCodeExpression* _tmp0_;
      self = (ValaDovaValue*) vala_target_value_construct (object_type, value_type);
      _tmp0_ = _vala_ccode_node_ref0 (cvalue);
      _vala_ccode_node_unref0 (self->cvalue);
      self->cvalue = _tmp0_;
      return self;
}


ValaDovaValue* vala_dova_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue) {
      return vala_dova_value_construct (VALA_TYPE_DOVA_VALUE, value_type, cvalue);
}


static void vala_dova_value_class_init (ValaDovaValueClass * klass) {
      vala_dova_value_parent_class = g_type_class_peek_parent (klass);
      VALA_TARGET_VALUE_CLASS (klass)->finalize = vala_dova_value_finalize;
}


static void vala_dova_value_instance_init (ValaDovaValue * self) {
}


static void vala_dova_value_finalize (ValaTargetValue* obj) {
      ValaDovaValue * self;
      self = VALA_DOVA_VALUE (obj);
      _vala_ccode_node_unref0 (self->cvalue);
      VALA_TARGET_VALUE_CLASS (vala_dova_value_parent_class)->finalize (obj);
}


GType vala_dova_value_get_type (void) {
      static volatile gsize vala_dova_value_type_id__volatile = 0;
      if (g_once_init_enter (&vala_dova_value_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (ValaDovaValueClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dova_value_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDovaValue), 0, (GInstanceInitFunc) vala_dova_value_instance_init, NULL };
            GType vala_dova_value_type_id;
            vala_dova_value_type_id = g_type_register_static (VALA_TYPE_TARGET_VALUE, "ValaDovaValue", &g_define_type_info, 0);
            g_once_init_leave (&vala_dova_value_type_id__volatile, vala_dova_value_type_id);
      }
      return vala_dova_value_type_id__volatile;
}




Generated by  Doxygen 1.6.0   Back to index