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

/* valacodewriter.vala
 *
 * Copyright (C) 2006-2014  Jürg Billeter
 * Copyright (C) 2006-2008  Raffaele Sandrini
 * Copyright (C) 2014       Richard Wiedenhöft
 *
 * 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <version.h>
#include <valagee.h>

#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
#define _vala_scope_unref0(var) ((var == NULL) ? NULL : (var = (vala_scope_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_mapped_file_unref0(var) ((var == NULL) ? NULL : (var = (g_mapped_file_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define __g_list_free__vala_code_node_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__vala_code_node_unref0_ (var), NULL)))
#define _vala_source_reference_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_reference_unref (var), NULL)))
#define _vala_comment_unref0(var) ((var == NULL) ? NULL : (var = (vala_comment_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))
#define _g_sequence_free0(var) ((var == NULL) ? NULL : (var = (g_sequence_free (var), NULL)))

struct _ValaCodeWriterPrivate {
	ValaCodeContext* context;
	FILE* stream;
	gint indent;
	gboolean bol;
	ValaScope* current_scope;
	ValaCodeWriterType type;
	gchar* override_header;
	gchar* header_to_override;
};


static gpointer vala_code_writer_parent_class = NULL;
static GRegex* vala_code_writer_fix_indent_regex;
static GRegex* vala_code_writer_fix_indent_regex = NULL;

#define VALA_CODE_WRITER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_CODE_WRITER, ValaCodeWriterPrivate))
static void vala_code_writer_write_string (ValaCodeWriter* self, const gchar* s);
static void vala_code_writer_write_newline (ValaCodeWriter* self);
static void vala_code_writer_real_visit_using_directive (ValaCodeVisitor* base, ValaUsingDirective* ns);
static void _vala_code_node_unref0_ (gpointer var);
static inline void _g_list_free__vala_code_node_unref0_ (GList* self);
static void vala_code_writer_real_visit_namespace (ValaCodeVisitor* base, ValaNamespace* ns);
static void vala_code_writer_write_comment (ValaCodeWriter* self, ValaComment* comment);
static void vala_code_writer_write_attributes (ValaCodeWriter* self, ValaCodeNode* node);
static void vala_code_writer_write_indent (ValaCodeWriter* self);
static void vala_code_writer_write_identifier (ValaCodeWriter* self, const gchar* s);
static void vala_code_writer_write_begin_block (ValaCodeWriter* self);
static void vala_code_writer_visit_sorted (ValaCodeWriter* self, ValaList* symbols);
static void vala_code_writer_write_end_block (ValaCodeWriter* self);
static gchar* vala_code_writer_get_cheaders (ValaCodeWriter* self, ValaSymbol* sym);
static void vala_code_writer_real_visit_class (ValaCodeVisitor* base, ValaClass* cl);
static gboolean vala_code_writer_check_accessibility (ValaCodeWriter* self, ValaSymbol* sym);
static void vala_code_writer_write_accessibility (ValaCodeWriter* self, ValaSymbol* sym);
static void vala_code_writer_write_type_parameters (ValaCodeWriter* self, ValaList* type_params);
static void vala_code_writer_write_type (ValaCodeWriter* self, ValaDataType* type);
static void vala_code_writer_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st);
static void vala_code_writer_real_visit_interface (ValaCodeVisitor* base, ValaInterface* iface);
static void vala_code_writer_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en);
static void vala_code_writer_real_visit_error_domain (ValaCodeVisitor* base, ValaErrorDomain* edomain);
static void vala_code_writer_real_visit_constant (ValaCodeVisitor* base, ValaConstant* c);
static void vala_code_writer_write_type_suffix (ValaCodeWriter* self, ValaDataType* type);
static void vala_code_writer_real_visit_field (ValaCodeVisitor* base, ValaField* f);
static void vala_code_writer_write_error_domains (ValaCodeWriter* self, ValaList* error_domains);
static void vala_code_writer_write_params (ValaCodeWriter* self, ValaList* params);
static void vala_code_writer_real_visit_delegate (ValaCodeVisitor* base, ValaDelegate* cb);
static void vala_code_writer_write_return_type (ValaCodeWriter* self, ValaDataType* type);
static void vala_code_writer_real_visit_constructor (ValaCodeVisitor* base, ValaConstructor* c);
static void vala_code_writer_write_code_block (ValaCodeWriter* self, ValaBlock* block);
static void vala_code_writer_real_visit_method (ValaCodeVisitor* base, ValaMethod* m);
static void vala_code_writer_real_visit_creation_method (ValaCodeVisitor* base, ValaCreationMethod* m);
static void vala_code_writer_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop);
static void vala_code_writer_write_property_accessor_accessibility (ValaCodeWriter* self, ValaSymbol* sym);
static void vala_code_writer_real_visit_signal (ValaCodeVisitor* base, ValaSignal* sig);
static void vala_code_writer_real_visit_block (ValaCodeVisitor* base, ValaBlock* b);
static void vala_code_writer_real_visit_empty_statement (ValaCodeVisitor* base, ValaEmptyStatement* stmt);
static void vala_code_writer_real_visit_declaration_statement (ValaCodeVisitor* base, ValaDeclarationStatement* stmt);
static void vala_code_writer_real_visit_local_variable (ValaCodeVisitor* base, ValaLocalVariable* local);
static void vala_code_writer_real_visit_initializer_list (ValaCodeVisitor* base, ValaInitializerList* list);
static void vala_code_writer_real_visit_expression_statement (ValaCodeVisitor* base, ValaExpressionStatement* stmt);
static void vala_code_writer_real_visit_if_statement (ValaCodeVisitor* base, ValaIfStatement* stmt);
static void vala_code_writer_real_visit_switch_statement (ValaCodeVisitor* base, ValaSwitchStatement* stmt);
static void vala_code_writer_real_visit_switch_section (ValaCodeVisitor* base, ValaSwitchSection* section);
static void vala_code_writer_real_visit_switch_label (ValaCodeVisitor* base, ValaSwitchLabel* label);
static void vala_code_writer_real_visit_loop (ValaCodeVisitor* base, ValaLoop* stmt);
static void vala_code_writer_real_visit_while_statement (ValaCodeVisitor* base, ValaWhileStatement* stmt);
static void vala_code_writer_real_visit_do_statement (ValaCodeVisitor* base, ValaDoStatement* stmt);
static void vala_code_writer_real_visit_for_statement (ValaCodeVisitor* base, ValaForStatement* stmt);
static void vala_code_writer_real_visit_foreach_statement (ValaCodeVisitor* base, ValaForeachStatement* stmt);
static void vala_code_writer_real_visit_break_statement (ValaCodeVisitor* base, ValaBreakStatement* stmt);
static void vala_code_writer_real_visit_continue_statement (ValaCodeVisitor* base, ValaContinueStatement* stmt);
static void vala_code_writer_real_visit_return_statement (ValaCodeVisitor* base, ValaReturnStatement* stmt);
static void vala_code_writer_real_visit_yield_statement (ValaCodeVisitor* base, ValaYieldStatement* y);
static void vala_code_writer_real_visit_throw_statement (ValaCodeVisitor* base, ValaThrowStatement* stmt);
static void vala_code_writer_real_visit_try_statement (ValaCodeVisitor* base, ValaTryStatement* stmt);
static void vala_code_writer_real_visit_catch_clause (ValaCodeVisitor* base, ValaCatchClause* clause);
static void vala_code_writer_real_visit_lock_statement (ValaCodeVisitor* base, ValaLockStatement* stmt);
static void vala_code_writer_real_visit_delete_statement (ValaCodeVisitor* base, ValaDeleteStatement* stmt);
static void vala_code_writer_real_visit_array_creation_expression (ValaCodeVisitor* base, ValaArrayCreationExpression* expr);
static void vala_code_writer_real_visit_boolean_literal (ValaCodeVisitor* base, ValaBooleanLiteral* lit);
static void vala_code_writer_real_visit_character_literal (ValaCodeVisitor* base, ValaCharacterLiteral* lit);
static void vala_code_writer_real_visit_integer_literal (ValaCodeVisitor* base, ValaIntegerLiteral* lit);
static void vala_code_writer_real_visit_real_literal (ValaCodeVisitor* base, ValaRealLiteral* lit);
static void vala_code_writer_real_visit_string_literal (ValaCodeVisitor* base, ValaStringLiteral* lit);
static void vala_code_writer_real_visit_null_literal (ValaCodeVisitor* base, ValaNullLiteral* lit);
static void vala_code_writer_real_visit_member_access (ValaCodeVisitor* base, ValaMemberAccess* expr);
static void vala_code_writer_real_visit_method_call (ValaCodeVisitor* base, ValaMethodCall* expr);
static void vala_code_writer_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr);
static void vala_code_writer_real_visit_slice_expression (ValaCodeVisitor* base, ValaSliceExpression* expr);
static void vala_code_writer_real_visit_base_access (ValaCodeVisitor* base, ValaBaseAccess* expr);
static void vala_code_writer_real_visit_postfix_expression (ValaCodeVisitor* base, ValaPostfixExpression* expr);
static void vala_code_writer_real_visit_object_creation_expression (ValaCodeVisitor* base, ValaObjectCreationExpression* expr);
static void vala_code_writer_real_visit_sizeof_expression (ValaCodeVisitor* base, ValaSizeofExpression* expr);
static void vala_code_writer_real_visit_typeof_expression (ValaCodeVisitor* base, ValaTypeofExpression* expr);
static void vala_code_writer_real_visit_unary_expression (ValaCodeVisitor* base, ValaUnaryExpression* expr);
static void vala_code_writer_real_visit_cast_expression (ValaCodeVisitor* base, ValaCastExpression* expr);
static void vala_code_writer_real_visit_pointer_indirection (ValaCodeVisitor* base, ValaPointerIndirection* expr);
static void vala_code_writer_real_visit_addressof_expression (ValaCodeVisitor* base, ValaAddressofExpression* expr);
static void vala_code_writer_real_visit_reference_transfer_expression (ValaCodeVisitor* base, ValaReferenceTransferExpression* expr);
static void vala_code_writer_real_visit_binary_expression (ValaCodeVisitor* base, ValaBinaryExpression* expr);
static void vala_code_writer_real_visit_type_check (ValaCodeVisitor* base, ValaTypeCheck* expr);
static void vala_code_writer_real_visit_conditional_expression (ValaCodeVisitor* base, ValaConditionalExpression* expr);
static void vala_code_writer_real_visit_lambda_expression (ValaCodeVisitor* base, ValaLambdaExpression* expr);
static void vala_code_writer_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* a);
static gboolean vala_code_writer_skip_since_tag_check (ValaCodeWriter* self, ValaSymbol* sym, const gchar* since_val);
static gint ____lambda4_ (ValaCodeWriter* self, ValaAttribute* a, ValaAttribute* b);
static gint _____lambda4__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
static gint ___lambda5_ (ValaCodeWriter* self, ValaAttribute* a, ValaAttribute* b);
static gint ____lambda5__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
static void _g_free0_ (gpointer var);
static void vala_code_writer_finalize (ValaCodeVisitor * obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


ValaCodeWriter* vala_code_writer_construct (GType object_type, ValaCodeWriterType type) {
	ValaCodeWriter* self = NULL;
	ValaCodeWriterType _tmp0_;
	self = (ValaCodeWriter*) vala_code_visitor_construct (object_type);
	_tmp0_ = type;
	self->priv->type = _tmp0_;
	return self;
}


ValaCodeWriter* vala_code_writer_new (ValaCodeWriterType type) {
	return vala_code_writer_construct (VALA_TYPE_CODE_WRITER, type);
}


/**
 * Allows overriding of a specific cheader in the output
 * @param original orignal cheader to override
 * @param replacement cheader to replace original with
 */
void vala_code_writer_set_cheader_override (ValaCodeWriter* self, const gchar* original, const gchar* replacement) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (original != NULL);
	g_return_if_fail (replacement != NULL);
	_tmp0_ = original;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->header_to_override);
	self->priv->header_to_override = _tmp1_;
	_tmp2_ = replacement;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->priv->override_header);
	self->priv->override_header = _tmp3_;
}


/**
 * Writes the public interface of the specified code context into the
 * specified file.
 *
 * @param context  a code context
 * @param filename a relative or absolute filename
 */
static gpointer _vala_code_context_ref0 (gpointer self) {
	return self ? vala_code_context_ref (self) : NULL;
}


static gpointer _vala_scope_ref0 (gpointer self) {
	return self ? vala_scope_ref (self) : NULL;
}


void vala_code_writer_write_file (ValaCodeWriter* self, ValaCodeContext* context, const gchar* filename) {
	gboolean file_exists = FALSE;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	gchar* temp_filename = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	ValaCodeContext* _tmp4_;
	ValaCodeContext* _tmp5_;
	gboolean _tmp6_;
	FILE* _tmp11_;
	gchar* _tmp15_ = NULL;
	ValaCodeContext* _tmp16_;
	gboolean _tmp17_;
	gboolean _tmp18_;
	gchar* header = NULL;
	gchar* _tmp29_;
	const gchar* _tmp30_;
	ValaCodeContext* _tmp31_;
	ValaNamespace* _tmp32_;
	ValaNamespace* _tmp33_;
	ValaScope* _tmp34_;
	ValaScope* _tmp35_;
	ValaScope* _tmp36_;
	ValaCodeContext* _tmp37_;
	gboolean _tmp38_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (filename != NULL);
	_tmp0_ = filename;
	_tmp1_ = g_file_test (_tmp0_, G_FILE_TEST_EXISTS);
	file_exists = _tmp1_;
	_tmp2_ = filename;
	_tmp3_ = g_strdup_printf ("%s.valatmp", _tmp2_);
	temp_filename = _tmp3_;
	_tmp4_ = context;
	_tmp5_ = _vala_code_context_ref0 (_tmp4_);
	_vala_code_context_unref0 (self->priv->context);
	self->priv->context = _tmp5_;
	_tmp6_ = file_exists;
	if (_tmp6_) {
		const gchar* _tmp7_;
		FILE* _tmp8_;
		_tmp7_ = temp_filename;
		_tmp8_ = g_fopen (_tmp7_, "w");
		_fclose0 (self->priv->stream);
		self->priv->stream = _tmp8_;
	} else {
		const gchar* _tmp9_;
		FILE* _tmp10_;
		_tmp9_ = filename;
		_tmp10_ = g_fopen (_tmp9_, "w");
		_fclose0 (self->priv->stream);
		self->priv->stream = _tmp10_;
	}
	_tmp11_ = self->priv->stream;
	if (_tmp11_ == NULL) {
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp12_ = filename;
		_tmp13_ = g_strdup_printf ("unable to open `%s' for writing", _tmp12_);
		_tmp14_ = _tmp13_;
		vala_report_error (NULL, _tmp14_);
		_g_free0 (_tmp14_);
		_g_free0 (temp_filename);
		return;
	}
	_tmp16_ = context;
	_tmp17_ = vala_code_context_get_version_header (_tmp16_);
	_tmp18_ = _tmp17_;
	if (_tmp18_) {
		const gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		const gchar* _tmp22_;
		gchar* _tmp23_;
		_tmp19_ = filename;
		_tmp20_ = g_path_get_basename (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_get_prgname ();
		_tmp23_ = g_strdup_printf ("/* %s generated by %s %s, do not modify. */", _tmp21_, _tmp22_, BUILD_VERSION);
		_g_free0 (_tmp15_);
		_tmp15_ = _tmp23_;
		_g_free0 (_tmp21_);
	} else {
		const gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		const gchar* _tmp27_;
		gchar* _tmp28_;
		_tmp24_ = filename;
		_tmp25_ = g_path_get_basename (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = g_get_prgname ();
		_tmp28_ = g_strdup_printf ("/* %s generated by %s, do not modify. */", _tmp26_, _tmp27_);
		_g_free0 (_tmp15_);
		_tmp15_ = _tmp28_;
		_g_free0 (_tmp26_);
	}
	_tmp29_ = g_strdup (_tmp15_);
	header = _tmp29_;
	_tmp30_ = header;
	vala_code_writer_write_string (self, _tmp30_);
	vala_code_writer_write_newline (self);
	vala_code_writer_write_newline (self);
	_tmp31_ = context;
	_tmp32_ = vala_code_context_get_root (_tmp31_);
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_symbol_get_scope ((ValaSymbol*) _tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = _vala_scope_ref0 (_tmp35_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp36_;
	_tmp37_ = context;
	vala_code_context_accept (_tmp37_, (ValaCodeVisitor*) self);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = NULL;
	_fclose0 (self->priv->stream);
	self->priv->stream = NULL;
	_tmp38_ = file_exists;
	if (_tmp38_) {
		gboolean changed = FALSE;
		gboolean _tmp54_;
		changed = TRUE;
		{
			GMappedFile* old_file = NULL;
			const gchar* _tmp39_;
			GMappedFile* _tmp40_;
			GMappedFile* new_file = NULL;
			const gchar* _tmp41_;
			GMappedFile* _tmp42_;
			gsize len = 0UL;
			GMappedFile* _tmp43_;
			gsize _tmp44_;
			gsize _tmp45_;
			GMappedFile* _tmp46_;
			gsize _tmp47_;
			_tmp39_ = filename;
			_tmp40_ = g_mapped_file_new (_tmp39_, FALSE, &_inner_error_);
			old_file = _tmp40_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				if (_inner_error_->domain == G_FILE_ERROR) {
					goto __catch1_g_file_error;
				}
				_g_free0 (header);
				_g_free0 (_tmp15_);
				_g_free0 (temp_filename);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
			_tmp41_ = temp_filename;
			_tmp42_ = g_mapped_file_new (_tmp41_, FALSE, &_inner_error_);
			new_file = _tmp42_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_mapped_file_unref0 (old_file);
				if (_inner_error_->domain == G_FILE_ERROR) {
					goto __catch1_g_file_error;
				}
				_g_mapped_file_unref0 (old_file);
				_g_free0 (header);
				_g_free0 (_tmp15_);
				_g_free0 (temp_filename);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
			_tmp43_ = old_file;
			_tmp44_ = g_mapped_file_get_length (_tmp43_);
			len = _tmp44_;
			_tmp45_ = len;
			_tmp46_ = new_file;
			_tmp47_ = g_mapped_file_get_length (_tmp46_);
			if (_tmp45_ == _tmp47_) {
				GMappedFile* _tmp48_;
				gchar* _tmp49_;
				GMappedFile* _tmp50_;
				gchar* _tmp51_;
				gsize _tmp52_;
				gint _tmp53_;
				_tmp48_ = old_file;
				_tmp49_ = g_mapped_file_get_contents (_tmp48_);
				_tmp50_ = new_file;
				_tmp51_ = g_mapped_file_get_contents (_tmp50_);
				_tmp52_ = len;
				_tmp53_ = memcmp (_tmp49_, _tmp51_, _tmp52_);
				if (_tmp53_ == 0) {
					changed = FALSE;
				}
			}
			_g_mapped_file_unref0 (old_file);
			old_file = NULL;
			_g_mapped_file_unref0 (new_file);
			new_file = NULL;
			_g_mapped_file_unref0 (new_file);
			_g_mapped_file_unref0 (old_file);
		}
		goto __finally1;
		__catch1_g_file_error:
		{
			GError* e = NULL;
			e = _inner_error_;
			_inner_error_ = NULL;
			_g_error_free0 (e);
		}
		__finally1:
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_free0 (header);
			_g_free0 (_tmp15_);
			_g_free0 (temp_filename);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp54_ = changed;
		if (_tmp54_) {
			const gchar* _tmp55_;
			const gchar* _tmp56_;
			_tmp55_ = temp_filename;
			_tmp56_ = filename;
			g_rename (_tmp55_, _tmp56_);
		} else {
			const gchar* _tmp57_;
			_tmp57_ = temp_filename;
			g_unlink (_tmp57_);
		}
	}
	_g_free0 (header);
	_g_free0 (_tmp15_);
	_g_free0 (temp_filename);
}


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


static void _vala_code_node_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL));
}


static inline void _g_list_free__vala_code_node_unref0_ (GList* self) {
	g_list_free_full (self, (GDestroyNotify) _vala_code_node_unref0_);
}


static void vala_code_writer_real_visit_using_directive (ValaCodeVisitor* base, ValaUsingDirective* ns) {
	ValaCodeWriter * self;
	ValaCodeWriterType _tmp0_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (ns != NULL);
	_tmp0_ = self->priv->type;
	if (_tmp0_ == VALA_CODE_WRITER_TYPE_FAST) {
		GList* symbols = NULL;
		ValaUnresolvedSymbol* sym = NULL;
		ValaUsingDirective* _tmp1_;
		ValaSymbol* _tmp2_;
		ValaSymbol* _tmp3_;
		ValaUnresolvedSymbol* _tmp4_;
		ValaUnresolvedSymbol* _tmp5_;
		ValaUnresolvedSymbol* _tmp6_;
		GList* _tmp14_;
		gconstpointer _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		vala_code_writer_write_string (self, "using ");
		symbols = NULL;
		_tmp1_ = ns;
		_tmp2_ = vala_using_directive_get_namespace_symbol (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALA_TYPE_UNRESOLVED_SYMBOL, ValaUnresolvedSymbol));
		sym = _tmp4_;
		_tmp5_ = sym;
		_tmp6_ = _vala_code_node_ref0 (_tmp5_);
		symbols = g_list_prepend (symbols, _tmp6_);
		while (TRUE) {
			ValaUnresolvedSymbol* _tmp7_;
			ValaUnresolvedSymbol* _tmp8_;
			ValaUnresolvedSymbol* _tmp9_;
			ValaUnresolvedSymbol* _tmp10_;
			ValaUnresolvedSymbol* _tmp11_;
			ValaUnresolvedSymbol* _tmp12_;
			ValaUnresolvedSymbol* _tmp13_;
			_tmp7_ = sym;
			_tmp8_ = vala_unresolved_symbol_get_inner (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = _vala_code_node_ref0 (_tmp9_);
			_vala_code_node_unref0 (sym);
			sym = _tmp10_;
			_tmp11_ = sym;
			if (!(_tmp11_ != NULL)) {
				break;
			}
			_tmp12_ = sym;
			_tmp13_ = _vala_code_node_ref0 (_tmp12_);
			symbols = g_list_prepend (symbols, _tmp13_);
		}
		_tmp14_ = symbols;
		_tmp15_ = g_list_nth_data (_tmp14_, (guint) 0);
		_tmp16_ = vala_symbol_get_name ((ValaSymbol*) ((ValaUnresolvedSymbol*) _tmp15_));
		_tmp17_ = _tmp16_;
		vala_code_writer_write_string (self, _tmp17_);
		{
			gint i = 0;
			i = 1;
			{
				gboolean _tmp18_ = FALSE;
				_tmp18_ = TRUE;
				while (TRUE) {
					gint _tmp20_;
					GList* _tmp21_;
					guint _tmp22_;
					GList* _tmp23_;
					gint _tmp24_;
					gconstpointer _tmp25_;
					const gchar* _tmp26_;
					const gchar* _tmp27_;
					if (!_tmp18_) {
						gint _tmp19_;
						_tmp19_ = i;
						i = _tmp19_ + 1;
					}
					_tmp18_ = FALSE;
					_tmp20_ = i;
					_tmp21_ = symbols;
					_tmp22_ = g_list_length (_tmp21_);
					if (!(((guint) _tmp20_) < _tmp22_)) {
						break;
					}
					vala_code_writer_write_string (self, ".");
					_tmp23_ = symbols;
					_tmp24_ = i;
					_tmp25_ = g_list_nth_data (_tmp23_, (guint) _tmp24_);
					_tmp26_ = vala_symbol_get_name ((ValaSymbol*) ((ValaUnresolvedSymbol*) _tmp25_));
					_tmp27_ = _tmp26_;
					vala_code_writer_write_string (self, _tmp27_);
				}
			}
		}
		vala_code_writer_write_string (self, ";\n");
		_vala_code_node_unref0 (sym);
		__g_list_free__vala_code_node_unref0_0 (symbols);
	}
}


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


static gpointer _vala_source_reference_ref0 (gpointer self) {
	return self ? vala_source_reference_ref (self) : NULL;
}


static void vala_code_writer_real_visit_namespace (ValaCodeVisitor* base, ValaNamespace* ns) {
	ValaCodeWriter * self;
	ValaNamespace* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaNamespace* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	ValaList* comments = NULL;
	ValaNamespace* _tmp7_;
	ValaList* _tmp8_;
	gboolean _tmp9_ = FALSE;
	ValaCodeContext* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	ValaNamespace* _tmp44_;
	ValaNamespace* _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	ValaNamespace* _tmp48_;
	ValaScope* _tmp49_;
	ValaScope* _tmp50_;
	ValaScope* _tmp51_;
	ValaNamespace* _tmp52_;
	ValaList* _tmp53_;
	ValaList* _tmp54_;
	ValaNamespace* _tmp55_;
	ValaList* _tmp56_;
	ValaList* _tmp57_;
	ValaNamespace* _tmp58_;
	ValaList* _tmp59_;
	ValaList* _tmp60_;
	ValaNamespace* _tmp61_;
	ValaList* _tmp62_;
	ValaList* _tmp63_;
	ValaNamespace* _tmp64_;
	ValaList* _tmp65_;
	ValaList* _tmp66_;
	ValaNamespace* _tmp67_;
	ValaList* _tmp68_;
	ValaList* _tmp69_;
	ValaNamespace* _tmp70_;
	ValaList* _tmp71_;
	ValaList* _tmp72_;
	ValaNamespace* _tmp73_;
	ValaList* _tmp74_;
	ValaList* _tmp75_;
	ValaNamespace* _tmp76_;
	ValaList* _tmp77_;
	ValaList* _tmp78_;
	ValaNamespace* _tmp79_;
	ValaList* _tmp80_;
	ValaList* _tmp81_;
	ValaScope* _tmp82_;
	ValaScope* _tmp83_;
	ValaScope* _tmp84_;
	ValaScope* _tmp85_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (ns != NULL);
	_tmp0_ = ns;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = ns;
	_tmp4_ = vala_symbol_get_name ((ValaSymbol*) _tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == NULL) {
		ValaNamespace* _tmp6_;
		_tmp6_ = ns;
		vala_code_node_accept_children ((ValaCodeNode*) _tmp6_, (ValaCodeVisitor*) self);
		return;
	}
	_tmp7_ = ns;
	_tmp8_ = vala_namespace_get_comments (_tmp7_);
	comments = _tmp8_;
	_tmp10_ = self->priv->context;
	_tmp11_ = vala_code_context_get_vapi_comments (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_) {
		ValaList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		_tmp13_ = comments;
		_tmp14_ = vala_collection_get_size ((ValaCollection*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp9_ = _tmp15_ > 0;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		gboolean first = FALSE;
		ValaSourceReference* first_reference = NULL;
		first = TRUE;
		first_reference = NULL;
		{
			ValaList* _comment_list = NULL;
			ValaList* _tmp16_;
			ValaList* _tmp17_;
			gint _comment_size = 0;
			ValaList* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gint _comment_index = 0;
			_tmp16_ = comments;
			_tmp17_ = _vala_iterable_ref0 (_tmp16_);
			_comment_list = _tmp17_;
			_tmp18_ = _comment_list;
			_tmp19_ = vala_collection_get_size ((ValaCollection*) _tmp18_);
			_tmp20_ = _tmp19_;
			_comment_size = _tmp20_;
			_comment_index = -1;
			while (TRUE) {
				gint _tmp21_;
				gint _tmp22_;
				gint _tmp23_;
				ValaComment* comment = NULL;
				ValaList* _tmp24_;
				gint _tmp25_;
				gpointer _tmp26_;
				ValaComment* _tmp27_;
				ValaSourceReference* _tmp28_;
				ValaSourceReference* _tmp29_;
				ValaSourceFile* _tmp30_;
				ValaSourceFile* _tmp31_;
				ValaSourceFileType _tmp32_;
				ValaSourceFileType _tmp33_;
				_tmp21_ = _comment_index;
				_comment_index = _tmp21_ + 1;
				_tmp22_ = _comment_index;
				_tmp23_ = _comment_size;
				if (!(_tmp22_ < _tmp23_)) {
					break;
				}
				_tmp24_ = _comment_list;
				_tmp25_ = _comment_index;
				_tmp26_ = vala_list_get (_tmp24_, _tmp25_);
				comment = (ValaComment*) _tmp26_;
				_tmp27_ = comment;
				_tmp28_ = vala_comment_get_source_reference (_tmp27_);
				_tmp29_ = _tmp28_;
				_tmp30_ = vala_source_reference_get_file (_tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = vala_source_file_get_file_type (_tmp31_);
				_tmp33_ = _tmp32_;
				if (_tmp33_ == VALA_SOURCE_FILE_TYPE_SOURCE) {
					gboolean _tmp34_;
					_tmp34_ = first;
					if (_tmp34_) {
						ValaComment* _tmp35_;
						ValaComment* _tmp36_;
						ValaSourceReference* _tmp37_;
						ValaSourceReference* _tmp38_;
						ValaSourceReference* _tmp39_;
						_tmp35_ = comment;
						vala_code_writer_write_comment (self, _tmp35_);
						first = FALSE;
						_tmp36_ = comment;
						_tmp37_ = vala_comment_get_source_reference (_tmp36_);
						_tmp38_ = _tmp37_;
						_tmp39_ = _vala_source_reference_ref0 (_tmp38_);
						_vala_source_reference_unref0 (first_reference);
						first_reference = _tmp39_;
					} else {
						ValaComment* _tmp40_;
						ValaSourceReference* _tmp41_;
						ValaSourceReference* _tmp42_;
						ValaSourceReference* _tmp43_;
						_tmp40_ = comment;
						_tmp41_ = vala_comment_get_source_reference (_tmp40_);
						_tmp42_ = _tmp41_;
						vala_report_warning (_tmp42_, "Comment describes namespace, that was already described by another com" \
"ment.");
						_tmp43_ = first_reference;
						vala_report_notice (_tmp43_, "Previous comment was here.");
					}
				}
				_vala_comment_unref0 (comment);
			}
			_vala_iterable_unref0 (_comment_list);
		}
		_vala_source_reference_unref0 (first_reference);
	}
	_tmp44_ = ns;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp44_);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "namespace ");
	_tmp45_ = ns;
	_tmp46_ = vala_symbol_get_name ((ValaSymbol*) _tmp45_);
	_tmp47_ = _tmp46_;
	vala_code_writer_write_identifier (self, _tmp47_);
	vala_code_writer_write_begin_block (self);
	_tmp48_ = ns;
	_tmp49_ = vala_symbol_get_scope ((ValaSymbol*) _tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = _vala_scope_ref0 (_tmp50_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp51_;
	_tmp52_ = ns;
	_tmp53_ = vala_namespace_get_namespaces (_tmp52_);
	_tmp54_ = _tmp53_;
	vala_code_writer_visit_sorted (self, _tmp54_);
	_vala_iterable_unref0 (_tmp54_);
	_tmp55_ = ns;
	_tmp56_ = vala_namespace_get_classes (_tmp55_);
	_tmp57_ = _tmp56_;
	vala_code_writer_visit_sorted (self, _tmp57_);
	_vala_iterable_unref0 (_tmp57_);
	_tmp58_ = ns;
	_tmp59_ = vala_namespace_get_interfaces (_tmp58_);
	_tmp60_ = _tmp59_;
	vala_code_writer_visit_sorted (self, _tmp60_);
	_vala_iterable_unref0 (_tmp60_);
	_tmp61_ = ns;
	_tmp62_ = vala_namespace_get_structs (_tmp61_);
	_tmp63_ = _tmp62_;
	vala_code_writer_visit_sorted (self, _tmp63_);
	_vala_iterable_unref0 (_tmp63_);
	_tmp64_ = ns;
	_tmp65_ = vala_namespace_get_enums (_tmp64_);
	_tmp66_ = _tmp65_;
	vala_code_writer_visit_sorted (self, _tmp66_);
	_vala_iterable_unref0 (_tmp66_);
	_tmp67_ = ns;
	_tmp68_ = vala_namespace_get_error_domains (_tmp67_);
	_tmp69_ = _tmp68_;
	vala_code_writer_visit_sorted (self, _tmp69_);
	_vala_iterable_unref0 (_tmp69_);
	_tmp70_ = ns;
	_tmp71_ = vala_namespace_get_delegates (_tmp70_);
	_tmp72_ = _tmp71_;
	vala_code_writer_visit_sorted (self, _tmp72_);
	_vala_iterable_unref0 (_tmp72_);
	_tmp73_ = ns;
	_tmp74_ = vala_namespace_get_fields (_tmp73_);
	_tmp75_ = _tmp74_;
	vala_code_writer_visit_sorted (self, _tmp75_);
	_vala_iterable_unref0 (_tmp75_);
	_tmp76_ = ns;
	_tmp77_ = vala_namespace_get_constants (_tmp76_);
	_tmp78_ = _tmp77_;
	vala_code_writer_visit_sorted (self, _tmp78_);
	_vala_iterable_unref0 (_tmp78_);
	_tmp79_ = ns;
	_tmp80_ = vala_namespace_get_methods (_tmp79_);
	_tmp81_ = _tmp80_;
	vala_code_writer_visit_sorted (self, _tmp81_);
	_vala_iterable_unref0 (_tmp81_);
	_tmp82_ = self->priv->current_scope;
	_tmp83_ = vala_scope_get_parent_scope (_tmp82_);
	_tmp84_ = _tmp83_;
	_tmp85_ = _vala_scope_ref0 (_tmp84_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp85_;
	vala_code_writer_write_end_block (self);
	vala_code_writer_write_newline (self);
	_vala_iterable_unref0 (comments);
}


static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gchar** _tmp2_;
	gint _tmp2__length1;
	_tmp0_ = separator;
	if (_tmp0_ == NULL) {
		separator = "";
	}
	_tmp2_ = str_array;
	_tmp2__length1 = str_array_length1;
	if (_tmp2_ != NULL) {
		gboolean _tmp3_ = FALSE;
		gchar** _tmp4_;
		gint _tmp4__length1;
		_tmp4_ = str_array;
		_tmp4__length1 = str_array_length1;
		if (_tmp4__length1 > 0) {
			_tmp3_ = TRUE;
		} else {
			gboolean _tmp5_ = FALSE;
			gchar** _tmp6_;
			gint _tmp6__length1;
			_tmp6_ = str_array;
			_tmp6__length1 = str_array_length1;
			if (_tmp6__length1 == -1) {
				gchar** _tmp7_;
				gint _tmp7__length1;
				const gchar* _tmp8_;
				_tmp7_ = str_array;
				_tmp7__length1 = str_array_length1;
				_tmp8_ = _tmp7_[0];
				_tmp5_ = _tmp8_ != NULL;
			} else {
				_tmp5_ = FALSE;
			}
			_tmp3_ = _tmp5_;
		}
		_tmp1_ = _tmp3_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp31_;
		gint _tmp33_;
		gint _tmp34_;
		gsize _tmp35_;
		const gchar* _tmp36_;
		gint _tmp37_;
		gint _tmp38_;
		gint _tmp39_;
		const gchar* res = NULL;
		gsize _tmp40_;
		void* _tmp41_;
		void* ptr = NULL;
		const gchar* _tmp42_;
		gchar** _tmp43_;
		gint _tmp43__length1;
		const gchar* _tmp44_;
		void* _tmp45_;
		const gchar* _tmp62_;
		len = (gsize) 1;
		{
			gboolean _tmp9_ = FALSE;
			i = 0;
			_tmp9_ = TRUE;
			while (TRUE) {
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar** _tmp13_;
				gint _tmp13__length1;
				gint _tmp21_ = 0;
				gchar** _tmp22_;
				gint _tmp22__length1;
				gint _tmp23_;
				const gchar* _tmp24_;
				gsize _tmp30_;
				if (!_tmp9_) {
					gint _tmp10_;
					_tmp10_ = i;
					i = _tmp10_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp13_ = str_array;
				_tmp13__length1 = str_array_length1;
				if (_tmp13__length1 != -1) {
					gint _tmp14_;
					gchar** _tmp15_;
					gint _tmp15__length1;
					_tmp14_ = i;
					_tmp15_ = str_array;
					_tmp15__length1 = str_array_length1;
					_tmp12_ = _tmp14_ < _tmp15__length1;
				} else {
					_tmp12_ = FALSE;
				}
				if (_tmp12_) {
					_tmp11_ = TRUE;
				} else {
					gboolean _tmp16_ = FALSE;
					gchar** _tmp17_;
					gint _tmp17__length1;
					_tmp17_ = str_array;
					_tmp17__length1 = str_array_length1;
					if (_tmp17__length1 == -1) {
						gchar** _tmp18_;
						gint _tmp18__length1;
						gint _tmp19_;
						const gchar* _tmp20_;
						_tmp18_ = str_array;
						_tmp18__length1 = str_array_length1;
						_tmp19_ = i;
						_tmp20_ = _tmp18_[_tmp19_];
						_tmp16_ = _tmp20_ != NULL;
					} else {
						_tmp16_ = FALSE;
					}
					_tmp11_ = _tmp16_;
				}
				if (!_tmp11_) {
					break;
				}
				_tmp22_ = str_array;
				_tmp22__length1 = str_array_length1;
				_tmp23_ = i;
				_tmp24_ = _tmp22_[_tmp23_];
				if (_tmp24_ != NULL) {
					gchar** _tmp25_;
					gint _tmp25__length1;
					gint _tmp26_;
					const gchar* _tmp27_;
					gint _tmp28_;
					gint _tmp29_;
					_tmp25_ = str_array;
					_tmp25__length1 = str_array_length1;
					_tmp26_ = i;
					_tmp27_ = _tmp25_[_tmp26_];
					_tmp28_ = strlen ((const gchar*) _tmp27_);
					_tmp29_ = _tmp28_;
					_tmp21_ = _tmp29_;
				} else {
					_tmp21_ = 0;
				}
				_tmp30_ = len;
				len = _tmp30_ + _tmp21_;
			}
		}
		_tmp31_ = i;
		if (_tmp31_ == 0) {
			gchar* _tmp32_;
			_tmp32_ = g_strdup ("");
			result = _tmp32_;
			return result;
		}
		_tmp33_ = i;
		str_array_length1 = _tmp33_;
		_tmp34_ = str_array_length1;
		_tmp35_ = len;
		_tmp36_ = separator;
		_tmp37_ = strlen ((const gchar*) _tmp36_);
		_tmp38_ = _tmp37_;
		_tmp39_ = i;
		len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1));
		_tmp40_ = len;
		_tmp41_ = g_malloc (_tmp40_);
		res = _tmp41_;
		_tmp42_ = res;
		_tmp43_ = str_array;
		_tmp43__length1 = str_array_length1;
		_tmp44_ = _tmp43_[0];
		_tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_);
		ptr = _tmp45_;
		{
			gboolean _tmp46_ = FALSE;
			i = 1;
			_tmp46_ = TRUE;
			while (TRUE) {
				gint _tmp48_;
				gchar** _tmp49_;
				gint _tmp49__length1;
				void* _tmp50_;
				const gchar* _tmp51_;
				void* _tmp52_;
				const gchar* _tmp53_ = NULL;
				gchar** _tmp54_;
				gint _tmp54__length1;
				gint _tmp55_;
				const gchar* _tmp56_;
				void* _tmp60_;
				void* _tmp61_;
				if (!_tmp46_) {
					gint _tmp47_;
					_tmp47_ = i;
					i = _tmp47_ + 1;
				}
				_tmp46_ = FALSE;
				_tmp48_ = i;
				_tmp49_ = str_array;
				_tmp49__length1 = str_array_length1;
				if (!(_tmp48_ < _tmp49__length1)) {
					break;
				}
				_tmp50_ = ptr;
				_tmp51_ = separator;
				_tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_);
				ptr = _tmp52_;
				_tmp54_ = str_array;
				_tmp54__length1 = str_array_length1;
				_tmp55_ = i;
				_tmp56_ = _tmp54_[_tmp55_];
				if (_tmp56_ != NULL) {
					gchar** _tmp57_;
					gint _tmp57__length1;
					gint _tmp58_;
					const gchar* _tmp59_;
					_tmp57_ = str_array;
					_tmp57__length1 = str_array_length1;
					_tmp58_ = i;
					_tmp59_ = _tmp57_[_tmp58_];
					_tmp53_ = (const gchar*) _tmp59_;
				} else {
					_tmp53_ = "";
				}
				_tmp60_ = ptr;
				_tmp61_ = g_stpcpy (_tmp60_, _tmp53_);
				ptr = _tmp61_;
			}
		}
		_tmp62_ = res;
		res = NULL;
		result = (gchar*) _tmp62_;
		return result;
	} else {
		gchar* _tmp63_;
		_tmp63_ = g_strdup ("");
		result = _tmp63_;
		return result;
	}
}


static gchar* vala_code_writer_get_cheaders (ValaCodeWriter* self, ValaSymbol* sym) {
	gchar* result = NULL;
	gchar* cheaders = NULL;
	gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	ValaCodeWriterType _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (sym != NULL, NULL);
	_tmp0_ = g_strdup ("");
	cheaders = _tmp0_;
	_tmp2_ = self->priv->type;
	if (_tmp2_ != VALA_CODE_WRITER_TYPE_FAST) {
		ValaSymbol* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp3_ = sym;
		_tmp4_ = vala_symbol_get_external_package (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = !_tmp5_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gchar* _tmp6_ = NULL;
		ValaSymbol* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp10_;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
		const gchar* _tmp13_;
		gboolean _tmp27_ = FALSE;
		gboolean _tmp28_ = FALSE;
		const gchar* _tmp29_;
		const gchar* _tmp42_;
		_tmp7_ = sym;
		_tmp8_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp7_, "CCode", "cheader_filename", NULL);
		_tmp6_ = _tmp8_;
		if (_tmp6_ == NULL) {
			gchar* _tmp9_;
			_tmp9_ = g_strdup ("");
			_g_free0 (_tmp6_);
			_tmp6_ = _tmp9_;
		}
		_tmp10_ = _tmp6_;
		_tmp6_ = NULL;
		_g_free0 (cheaders);
		cheaders = _tmp10_;
		_tmp13_ = cheaders;
		if (g_strcmp0 (_tmp13_, "") == 0) {
			ValaSymbol* _tmp14_;
			ValaSymbol* _tmp15_;
			ValaSymbol* _tmp16_;
			_tmp14_ = sym;
			_tmp15_ = vala_symbol_get_parent_symbol (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp12_ = _tmp16_ != NULL;
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			ValaSymbol* _tmp17_;
			ValaSymbol* _tmp18_;
			ValaSymbol* _tmp19_;
			ValaCodeContext* _tmp20_;
			ValaNamespace* _tmp21_;
			ValaNamespace* _tmp22_;
			_tmp17_ = sym;
			_tmp18_ = vala_symbol_get_parent_symbol (_tmp17_);
			_tmp19_ = _tmp18_;
			_tmp20_ = self->priv->context;
			_tmp21_ = vala_code_context_get_root (_tmp20_);
			_tmp22_ = _tmp21_;
			_tmp11_ = _tmp19_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, VALA_TYPE_SYMBOL, ValaSymbol);
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			ValaSymbol* _tmp23_;
			ValaSymbol* _tmp24_;
			ValaSymbol* _tmp25_;
			gchar* _tmp26_;
			_tmp23_ = sym;
			_tmp24_ = vala_symbol_get_parent_symbol (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = vala_code_writer_get_cheaders (self, _tmp25_);
			_g_free0 (cheaders);
			cheaders = _tmp26_;
		}
		_tmp29_ = cheaders;
		if (g_strcmp0 (_tmp29_, "") == 0) {
			ValaSymbol* _tmp30_;
			ValaSourceReference* _tmp31_;
			ValaSourceReference* _tmp32_;
			_tmp30_ = sym;
			_tmp31_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp30_);
			_tmp32_ = _tmp31_;
			_tmp28_ = _tmp32_ != NULL;
		} else {
			_tmp28_ = FALSE;
		}
		if (_tmp28_) {
			ValaSymbol* _tmp33_;
			gboolean _tmp34_;
			gboolean _tmp35_;
			_tmp33_ = sym;
			_tmp34_ = vala_symbol_get_external_package (_tmp33_);
			_tmp35_ = _tmp34_;
			_tmp27_ = !_tmp35_;
		} else {
			_tmp27_ = FALSE;
		}
		if (_tmp27_) {
			ValaSymbol* _tmp36_;
			ValaSourceReference* _tmp37_;
			ValaSourceReference* _tmp38_;
			ValaSourceFile* _tmp39_;
			ValaSourceFile* _tmp40_;
			gchar* _tmp41_;
			_tmp36_ = sym;
			_tmp37_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp36_);
			_tmp38_ = _tmp37_;
			_tmp39_ = vala_source_reference_get_file (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp41_ = vala_source_file_get_cinclude_filename (_tmp40_);
			_g_free0 (cheaders);
			cheaders = _tmp41_;
		}
		_tmp42_ = self->priv->header_to_override;
		if (_tmp42_ != NULL) {
			gchar** cheaders_array = NULL;
			const gchar* _tmp43_;
			gchar** _tmp44_;
			gchar** _tmp45_;
			gint cheaders_array_length1;
			gint _cheaders_array_size_;
			gchar** _tmp59_;
			gint _tmp59__length1;
			gchar* _tmp60_;
			_tmp43_ = cheaders;
			_tmp45_ = _tmp44_ = g_strsplit (_tmp43_, ",", 0);
			cheaders_array = _tmp45_;
			cheaders_array_length1 = _vala_array_length (_tmp44_);
			_cheaders_array_size_ = cheaders_array_length1;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp46_ = FALSE;
					_tmp46_ = TRUE;
					while (TRUE) {
						gint _tmp48_;
						gchar** _tmp49_;
						gint _tmp49__length1;
						gchar** _tmp50_;
						gint _tmp50__length1;
						gint _tmp51_;
						const gchar* _tmp52_;
						const gchar* _tmp53_;
						if (!_tmp46_) {
							gint _tmp47_;
							_tmp47_ = i;
							i = _tmp47_ + 1;
						}
						_tmp46_ = FALSE;
						_tmp48_ = i;
						_tmp49_ = cheaders_array;
						_tmp49__length1 = cheaders_array_length1;
						if (!(_tmp48_ < _tmp49__length1)) {
							break;
						}
						_tmp50_ = cheaders_array;
						_tmp50__length1 = cheaders_array_length1;
						_tmp51_ = i;
						_tmp52_ = _tmp50_[_tmp51_];
						_tmp53_ = self->priv->header_to_override;
						if (g_strcmp0 (_tmp52_, _tmp53_) == 0) {
							gchar** _tmp54_;
							gint _tmp54__length1;
							gint _tmp55_;
							const gchar* _tmp56_;
							gchar* _tmp57_;
							gchar* _tmp58_;
							_tmp54_ = cheaders_array;
							_tmp54__length1 = cheaders_array_length1;
							_tmp55_ = i;
							_tmp56_ = self->priv->override_header;
							_tmp57_ = g_strdup (_tmp56_);
							_g_free0 (_tmp54_[_tmp55_]);
							_tmp54_[_tmp55_] = _tmp57_;
							_tmp58_ = _tmp54_[_tmp55_];
						}
					}
				}
			}
			_tmp59_ = cheaders_array;
			_tmp59__length1 = cheaders_array_length1;
			_tmp60_ = _vala_g_strjoinv (",", _tmp59_, _tmp59__length1);
			_g_free0 (cheaders);
			cheaders = _tmp60_;
			cheaders_array = (_vala_array_free (cheaders_array, cheaders_array_length1, (GDestroyNotify) g_free), NULL);
		}
		_g_free0 (_tmp6_);
	}
	result = cheaders;
	return result;
}


static void vala_code_writer_real_visit_class (ValaCodeVisitor* base, ValaClass* cl) {
	ValaCodeWriter * self;
	ValaClass* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaClass* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaClass* _tmp15_;
	ValaClass* _tmp16_;
	ValaClass* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	ValaClass* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	ValaClass* _tmp23_;
	ValaList* _tmp24_;
	ValaList* _tmp25_;
	ValaList* base_types = NULL;
	ValaClass* _tmp26_;
	ValaList* _tmp27_;
	ValaList* _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	ValaClass* _tmp44_;
	ValaScope* _tmp45_;
	ValaScope* _tmp46_;
	ValaScope* _tmp47_;
	ValaClass* _tmp48_;
	ValaList* _tmp49_;
	ValaList* _tmp50_;
	ValaClass* _tmp51_;
	ValaList* _tmp52_;
	ValaList* _tmp53_;
	ValaClass* _tmp54_;
	ValaList* _tmp55_;
	ValaList* _tmp56_;
	ValaClass* _tmp57_;
	ValaList* _tmp58_;
	ValaList* _tmp59_;
	ValaClass* _tmp60_;
	ValaList* _tmp61_;
	ValaList* _tmp62_;
	ValaClass* _tmp63_;
	ValaList* _tmp64_;
	ValaList* _tmp65_;
	ValaClass* _tmp66_;
	ValaList* _tmp67_;
	ValaList* _tmp68_;
	ValaClass* _tmp69_;
	ValaList* _tmp70_;
	ValaList* _tmp71_;
	ValaClass* _tmp72_;
	ValaList* _tmp73_;
	ValaList* _tmp74_;
	ValaClass* _tmp75_;
	ValaConstructor* _tmp76_;
	ValaConstructor* _tmp77_;
	ValaScope* _tmp81_;
	ValaScope* _tmp82_;
	ValaScope* _tmp83_;
	ValaScope* _tmp84_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (cl != NULL);
	_tmp0_ = cl;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = cl;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaClass* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = cl;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaClass* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = cl;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = cl;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = cl;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	_tmp17_ = cl;
	_tmp18_ = vala_class_get_is_abstract (_tmp17_);
	_tmp19_ = _tmp18_;
	if (_tmp19_) {
		vala_code_writer_write_string (self, "abstract ");
	}
	vala_code_writer_write_string (self, "class ");
	_tmp20_ = cl;
	_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
	_tmp22_ = _tmp21_;
	vala_code_writer_write_identifier (self, _tmp22_);
	_tmp23_ = cl;
	_tmp24_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) _tmp23_);
	_tmp25_ = _tmp24_;
	vala_code_writer_write_type_parameters (self, _tmp25_);
	_vala_iterable_unref0 (_tmp25_);
	_tmp26_ = cl;
	_tmp27_ = vala_class_get_base_types (_tmp26_);
	base_types = _tmp27_;
	_tmp28_ = base_types;
	_tmp29_ = vala_collection_get_size ((ValaCollection*) _tmp28_);
	_tmp30_ = _tmp29_;
	if (_tmp30_ > 0) {
		gboolean first = FALSE;
		vala_code_writer_write_string (self, " : ");
		first = TRUE;
		{
			ValaList* _base_type_list = NULL;
			ValaList* _tmp31_;
			ValaList* _tmp32_;
			gint _base_type_size = 0;
			ValaList* _tmp33_;
			gint _tmp34_;
			gint _tmp35_;
			gint _base_type_index = 0;
			_tmp31_ = base_types;
			_tmp32_ = _vala_iterable_ref0 (_tmp31_);
			_base_type_list = _tmp32_;
			_tmp33_ = _base_type_list;
			_tmp34_ = vala_collection_get_size ((ValaCollection*) _tmp33_);
			_tmp35_ = _tmp34_;
			_base_type_size = _tmp35_;
			_base_type_index = -1;
			while (TRUE) {
				gint _tmp36_;
				gint _tmp37_;
				gint _tmp38_;
				ValaDataType* base_type = NULL;
				ValaList* _tmp39_;
				gint _tmp40_;
				gpointer _tmp41_;
				gboolean _tmp42_;
				ValaDataType* _tmp43_;
				_tmp36_ = _base_type_index;
				_base_type_index = _tmp36_ + 1;
				_tmp37_ = _base_type_index;
				_tmp38_ = _base_type_size;
				if (!(_tmp37_ < _tmp38_)) {
					break;
				}
				_tmp39_ = _base_type_list;
				_tmp40_ = _base_type_index;
				_tmp41_ = vala_list_get (_tmp39_, _tmp40_);
				base_type = (ValaDataType*) _tmp41_;
				_tmp42_ = first;
				if (!_tmp42_) {
					vala_code_writer_write_string (self, ", ");
				} else {
					first = FALSE;
				}
				_tmp43_ = base_type;
				vala_code_writer_write_type (self, _tmp43_);
				_vala_code_node_unref0 (base_type);
			}
			_vala_iterable_unref0 (_base_type_list);
		}
	}
	vala_code_writer_write_begin_block (self);
	_tmp44_ = cl;
	_tmp45_ = vala_symbol_get_scope ((ValaSymbol*) _tmp44_);
	_tmp46_ = _tmp45_;
	_tmp47_ = _vala_scope_ref0 (_tmp46_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp47_;
	_tmp48_ = cl;
	_tmp49_ = vala_class_get_classes (_tmp48_);
	_tmp50_ = _tmp49_;
	vala_code_writer_visit_sorted (self, _tmp50_);
	_vala_iterable_unref0 (_tmp50_);
	_tmp51_ = cl;
	_tmp52_ = vala_class_get_structs (_tmp51_);
	_tmp53_ = _tmp52_;
	vala_code_writer_visit_sorted (self, _tmp53_);
	_vala_iterable_unref0 (_tmp53_);
	_tmp54_ = cl;
	_tmp55_ = vala_class_get_enums (_tmp54_);
	_tmp56_ = _tmp55_;
	vala_code_writer_visit_sorted (self, _tmp56_);
	_vala_iterable_unref0 (_tmp56_);
	_tmp57_ = cl;
	_tmp58_ = vala_class_get_delegates (_tmp57_);
	_tmp59_ = _tmp58_;
	vala_code_writer_visit_sorted (self, _tmp59_);
	_vala_iterable_unref0 (_tmp59_);
	_tmp60_ = cl;
	_tmp61_ = vala_class_get_fields (_tmp60_);
	_tmp62_ = _tmp61_;
	vala_code_writer_visit_sorted (self, _tmp62_);
	_vala_iterable_unref0 (_tmp62_);
	_tmp63_ = cl;
	_tmp64_ = vala_class_get_constants (_tmp63_);
	_tmp65_ = _tmp64_;
	vala_code_writer_visit_sorted (self, _tmp65_);
	_vala_iterable_unref0 (_tmp65_);
	_tmp66_ = cl;
	_tmp67_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) _tmp66_);
	_tmp68_ = _tmp67_;
	vala_code_writer_visit_sorted (self, _tmp68_);
	_vala_iterable_unref0 (_tmp68_);
	_tmp69_ = cl;
	_tmp70_ = vala_object_type_symbol_get_properties ((ValaObjectTypeSymbol*) _tmp69_);
	_tmp71_ = _tmp70_;
	vala_code_writer_visit_sorted (self, _tmp71_);
	_vala_iterable_unref0 (_tmp71_);
	_tmp72_ = cl;
	_tmp73_ = vala_object_type_symbol_get_signals ((ValaObjectTypeSymbol*) _tmp72_);
	_tmp74_ = _tmp73_;
	vala_code_writer_visit_sorted (self, _tmp74_);
	_vala_iterable_unref0 (_tmp74_);
	_tmp75_ = cl;
	_tmp76_ = vala_class_get_constructor (_tmp75_);
	_tmp77_ = _tmp76_;
	if (_tmp77_ != NULL) {
		ValaClass* _tmp78_;
		ValaConstructor* _tmp79_;
		ValaConstructor* _tmp80_;
		_tmp78_ = cl;
		_tmp79_ = vala_class_get_constructor (_tmp78_);
		_tmp80_ = _tmp79_;
		vala_code_node_accept ((ValaCodeNode*) _tmp80_, (ValaCodeVisitor*) self);
	}
	_tmp81_ = self->priv->current_scope;
	_tmp82_ = vala_scope_get_parent_scope (_tmp81_);
	_tmp83_ = _tmp82_;
	_tmp84_ = _vala_scope_ref0 (_tmp83_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp84_;
	vala_code_writer_write_end_block (self);
	vala_code_writer_write_newline (self);
	_vala_iterable_unref0 (base_types);
}


static void vala_code_writer_visit_sorted (ValaCodeWriter* self, ValaList* symbols) {
	ValaCodeWriterType _tmp0_;
	ValaArrayList* sorted_symbols = NULL;
	GEqualFunc _tmp13_;
	ValaArrayList* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (symbols != NULL);
	_tmp0_ = self->priv->type;
	if (_tmp0_ != VALA_CODE_WRITER_TYPE_EXTERNAL) {
		{
			ValaList* _sym_list = NULL;
			ValaList* _tmp1_;
			ValaList* _tmp2_;
			gint _sym_size = 0;
			ValaList* _tmp3_;
			gint _tmp4_;
			gint _tmp5_;
			gint _sym_index = 0;
			_tmp1_ = symbols;
			_tmp2_ = _vala_iterable_ref0 (_tmp1_);
			_sym_list = _tmp2_;
			_tmp3_ = _sym_list;
			_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
			_tmp5_ = _tmp4_;
			_sym_size = _tmp5_;
			_sym_index = -1;
			while (TRUE) {
				gint _tmp6_;
				gint _tmp7_;
				gint _tmp8_;
				ValaSymbol* sym = NULL;
				ValaList* _tmp9_;
				gint _tmp10_;
				gpointer _tmp11_;
				ValaSymbol* _tmp12_;
				_tmp6_ = _sym_index;
				_sym_index = _tmp6_ + 1;
				_tmp7_ = _sym_index;
				_tmp8_ = _sym_size;
				if (!(_tmp7_ < _tmp8_)) {
					break;
				}
				_tmp9_ = _sym_list;
				_tmp10_ = _sym_index;
				_tmp11_ = vala_list_get (_tmp9_, _tmp10_);
				sym = (ValaSymbol*) _tmp11_;
				_tmp12_ = sym;
				vala_code_node_accept ((ValaCodeNode*) _tmp12_, (ValaCodeVisitor*) self);
				_vala_code_node_unref0 (sym);
			}
			_vala_iterable_unref0 (_sym_list);
		}
		return;
	}
	_tmp13_ = g_direct_equal;
	_tmp14_ = vala_array_list_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp13_);
	sorted_symbols = _tmp14_;
	{
		ValaList* _sym_list = NULL;
		ValaList* _tmp15_;
		ValaList* _tmp16_;
		gint _sym_size = 0;
		ValaList* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gint _sym_index = 0;
		_tmp15_ = symbols;
		_tmp16_ = _vala_iterable_ref0 (_tmp15_);
		_sym_list = _tmp16_;
		_tmp17_ = _sym_list;
		_tmp18_ = vala_collection_get_size ((ValaCollection*) _tmp17_);
		_tmp19_ = _tmp18_;
		_sym_size = _tmp19_;
		_sym_index = -1;
		while (TRUE) {
			gint _tmp20_;
			gint _tmp21_;
			gint _tmp22_;
			ValaSymbol* sym = NULL;
			ValaList* _tmp23_;
			gint _tmp24_;
			gpointer _tmp25_;
			gint left = 0;
			gint right = 0;
			ValaArrayList* _tmp26_;
			gint _tmp27_;
			gint _tmp28_;
			gboolean _tmp29_ = FALSE;
			gint _tmp30_;
			gint _tmp31_;
			_tmp20_ = _sym_index;
			_sym_index = _tmp20_ + 1;
			_tmp21_ = _sym_index;
			_tmp22_ = _sym_size;
			if (!(_tmp21_ < _tmp22_)) {
				break;
			}
			_tmp23_ = _sym_list;
			_tmp24_ = _sym_index;
			_tmp25_ = vala_list_get (_tmp23_, _tmp24_);
			sym = (ValaSymbol*) _tmp25_;
			left = 0;
			_tmp26_ = sorted_symbols;
			_tmp27_ = vala_collection_get_size ((ValaCollection*) _tmp26_);
			_tmp28_ = _tmp27_;
			right = _tmp28_ - 1;
			_tmp30_ = left;
			_tmp31_ = right;
			if (_tmp30_ > _tmp31_) {
				_tmp29_ = TRUE;
			} else {
				ValaSymbol* _tmp32_;
				const gchar* _tmp33_;
				const gchar* _tmp34_;
				ValaArrayList* _tmp35_;
				gint _tmp36_;
				gpointer _tmp37_;
				ValaSymbol* _tmp38_;
				const gchar* _tmp39_;
				const gchar* _tmp40_;
				_tmp32_ = sym;
				_tmp33_ = vala_symbol_get_name (_tmp32_);
				_tmp34_ = _tmp33_;
				_tmp35_ = sorted_symbols;
				_tmp36_ = left;
				_tmp37_ = vala_list_get ((ValaList*) _tmp35_, _tmp36_);
				_tmp38_ = (ValaSymbol*) _tmp37_;
				_tmp39_ = vala_symbol_get_name (_tmp38_);
				_tmp40_ = _tmp39_;
				_tmp29_ = g_strcmp0 (_tmp34_, _tmp40_) < 0;
				_vala_code_node_unref0 (_tmp38_);
			}
			if (_tmp29_) {
				ValaArrayList* _tmp41_;
				ValaSymbol* _tmp42_;
				_tmp41_ = sorted_symbols;
				_tmp42_ = sym;
				vala_list_insert ((ValaList*) _tmp41_, 0, _tmp42_);
			} else {
				ValaSymbol* _tmp43_;
				const gchar* _tmp44_;
				const gchar* _tmp45_;
				ValaArrayList* _tmp46_;
				gint _tmp47_;
				gpointer _tmp48_;
				ValaSymbol* _tmp49_;
				const gchar* _tmp50_;
				const gchar* _tmp51_;
				gboolean _tmp52_;
				_tmp43_ = sym;
				_tmp44_ = vala_symbol_get_name (_tmp43_);
				_tmp45_ = _tmp44_;
				_tmp46_ = sorted_symbols;
				_tmp47_ = right;
				_tmp48_ = vala_list_get ((ValaList*) _tmp46_, _tmp47_);
				_tmp49_ = (ValaSymbol*) _tmp48_;
				_tmp50_ = vala_symbol_get_name (_tmp49_);
				_tmp51_ = _tmp50_;
				_tmp52_ = g_strcmp0 (_tmp45_, _tmp51_) > 0;
				_vala_code_node_unref0 (_tmp49_);
				if (_tmp52_) {
					ValaArrayList* _tmp53_;
					ValaSymbol* _tmp54_;
					_tmp53_ = sorted_symbols;
					_tmp54_ = sym;
					vala_collection_add ((ValaCollection*) _tmp53_, _tmp54_);
				} else {
					ValaArrayList* _tmp71_;
					gint _tmp72_;
					ValaSymbol* _tmp73_;
					while (TRUE) {
						gint _tmp55_;
						gint _tmp56_;
						gint i = 0;
						gint _tmp57_;
						gint _tmp58_;
						ValaSymbol* _tmp59_;
						const gchar* _tmp60_;
						const gchar* _tmp61_;
						ValaArrayList* _tmp62_;
						gint _tmp63_;
						gpointer _tmp64_;
						ValaSymbol* _tmp65_;
						const gchar* _tmp66_;
						const gchar* _tmp67_;
						gboolean _tmp68_;
						_tmp55_ = right;
						_tmp56_ = left;
						if (!((_tmp55_ - _tmp56_) > 1)) {
							break;
						}
						_tmp57_ = right;
						_tmp58_ = left;
						i = (_tmp57_ + _tmp58_) / 2;
						_tmp59_ = sym;
						_tmp60_ = vala_symbol_get_name (_tmp59_);
						_tmp61_ = _tmp60_;
						_tmp62_ = sorted_symbols;
						_tmp63_ = i;
						_tmp64_ = vala_list_get ((ValaList*) _tmp62_, _tmp63_);
						_tmp65_ = (ValaSymbol*) _tmp64_;
						_tmp66_ = vala_symbol_get_name (_tmp65_);
						_tmp67_ = _tmp66_;
						_tmp68_ = g_strcmp0 (_tmp61_, _tmp67_) > 0;
						_vala_code_node_unref0 (_tmp65_);
						if (_tmp68_) {
							gint _tmp69_;
							_tmp69_ = i;
							left = _tmp69_;
						} else {
							gint _tmp70_;
							_tmp70_ = i;
							right = _tmp70_;
						}
					}
					_tmp71_ = sorted_symbols;
					_tmp72_ = left;
					_tmp73_ = sym;
					vala_list_insert ((ValaList*) _tmp71_, _tmp72_ + 1, _tmp73_);
				}
			}
			_vala_code_node_unref0 (sym);
		}
		_vala_iterable_unref0 (_sym_list);
	}
	{
		ValaArrayList* _sym_list = NULL;
		ValaArrayList* _tmp74_;
		ValaArrayList* _tmp75_;
		gint _sym_size = 0;
		ValaArrayList* _tmp76_;
		gint _tmp77_;
		gint _tmp78_;
		gint _sym_index = 0;
		_tmp74_ = sorted_symbols;
		_tmp75_ = _vala_iterable_ref0 (_tmp74_);
		_sym_list = _tmp75_;
		_tmp76_ = _sym_list;
		_tmp77_ = vala_collection_get_size ((ValaCollection*) _tmp76_);
		_tmp78_ = _tmp77_;
		_sym_size = _tmp78_;
		_sym_index = -1;
		while (TRUE) {
			gint _tmp79_;
			gint _tmp80_;
			gint _tmp81_;
			ValaSymbol* sym = NULL;
			ValaArrayList* _tmp82_;
			gint _tmp83_;
			gpointer _tmp84_;
			ValaSymbol* _tmp85_;
			_tmp79_ = _sym_index;
			_sym_index = _tmp79_ + 1;
			_tmp80_ = _sym_index;
			_tmp81_ = _sym_size;
			if (!(_tmp80_ < _tmp81_)) {
				break;
			}
			_tmp82_ = _sym_list;
			_tmp83_ = _sym_index;
			_tmp84_ = vala_list_get ((ValaList*) _tmp82_, _tmp83_);
			sym = (ValaSymbol*) _tmp84_;
			_tmp85_ = sym;
			vala_code_node_accept ((ValaCodeNode*) _tmp85_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (sym);
		}
		_vala_iterable_unref0 (_sym_list);
	}
	_vala_iterable_unref0 (sorted_symbols);
}


static void vala_code_writer_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st) {
	ValaCodeWriter * self;
	ValaStruct* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaStruct* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaStruct* _tmp15_;
	ValaStruct* _tmp16_;
	ValaStruct* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	ValaStruct* _tmp20_;
	ValaList* _tmp21_;
	ValaList* _tmp22_;
	ValaStruct* _tmp23_;
	ValaDataType* _tmp24_;
	ValaDataType* _tmp25_;
	ValaStruct* _tmp29_;
	ValaScope* _tmp30_;
	ValaScope* _tmp31_;
	ValaScope* _tmp32_;
	ValaStruct* _tmp45_;
	ValaList* _tmp46_;
	ValaList* _tmp47_;
	ValaStruct* _tmp48_;
	ValaList* _tmp49_;
	ValaList* _tmp50_;
	ValaStruct* _tmp51_;
	ValaList* _tmp52_;
	ValaList* _tmp53_;
	ValaScope* _tmp54_;
	ValaScope* _tmp55_;
	ValaScope* _tmp56_;
	ValaScope* _tmp57_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (st != NULL);
	_tmp0_ = st;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = st;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaStruct* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = st;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaStruct* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = st;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = st;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = st;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	vala_code_writer_write_string (self, "struct ");
	_tmp17_ = st;
	_tmp18_ = vala_symbol_get_name ((ValaSymbol*) _tmp17_);
	_tmp19_ = _tmp18_;
	vala_code_writer_write_identifier (self, _tmp19_);
	_tmp20_ = st;
	_tmp21_ = vala_struct_get_type_parameters (_tmp20_);
	_tmp22_ = _tmp21_;
	vala_code_writer_write_type_parameters (self, _tmp22_);
	_vala_iterable_unref0 (_tmp22_);
	_tmp23_ = st;
	_tmp24_ = vala_struct_get_base_type (_tmp23_);
	_tmp25_ = _tmp24_;
	if (_tmp25_ != NULL) {
		ValaStruct* _tmp26_;
		ValaDataType* _tmp27_;
		ValaDataType* _tmp28_;
		vala_code_writer_write_string (self, " : ");
		_tmp26_ = st;
		_tmp27_ = vala_struct_get_base_type (_tmp26_);
		_tmp28_ = _tmp27_;
		vala_code_writer_write_type (self, _tmp28_);
	}
	vala_code_writer_write_begin_block (self);
	_tmp29_ = st;
	_tmp30_ = vala_symbol_get_scope ((ValaSymbol*) _tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = _vala_scope_ref0 (_tmp31_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp32_;
	{
		ValaList* _field_list = NULL;
		ValaStruct* _tmp33_;
		ValaList* _tmp34_;
		gint _field_size = 0;
		ValaList* _tmp35_;
		gint _tmp36_;
		gint _tmp37_;
		gint _field_index = 0;
		_tmp33_ = st;
		_tmp34_ = vala_struct_get_fields (_tmp33_);
		_field_list = _tmp34_;
		_tmp35_ = _field_list;
		_tmp36_ = vala_collection_get_size ((ValaCollection*) _tmp35_);
		_tmp37_ = _tmp36_;
		_field_size = _tmp37_;
		_field_index = -1;
		while (TRUE) {
			gint _tmp38_;
			gint _tmp39_;
			gint _tmp40_;
			ValaField* field = NULL;
			ValaList* _tmp41_;
			gint _tmp42_;
			gpointer _tmp43_;
			ValaField* _tmp44_;
			_tmp38_ = _field_index;
			_field_index = _tmp38_ + 1;
			_tmp39_ = _field_index;
			_tmp40_ = _field_size;
			if (!(_tmp39_ < _tmp40_)) {
				break;
			}
			_tmp41_ = _field_list;
			_tmp42_ = _field_index;
			_tmp43_ = vala_list_get (_tmp41_, _tmp42_);
			field = (ValaField*) _tmp43_;
			_tmp44_ = field;
			vala_code_node_accept ((ValaCodeNode*) _tmp44_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (field);
		}
		_vala_iterable_unref0 (_field_list);
	}
	_tmp45_ = st;
	_tmp46_ = vala_struct_get_constants (_tmp45_);
	_tmp47_ = _tmp46_;
	vala_code_writer_visit_sorted (self, _tmp47_);
	_vala_iterable_unref0 (_tmp47_);
	_tmp48_ = st;
	_tmp49_ = vala_struct_get_methods (_tmp48_);
	_tmp50_ = _tmp49_;
	vala_code_writer_visit_sorted (self, _tmp50_);
	_vala_iterable_unref0 (_tmp50_);
	_tmp51_ = st;
	_tmp52_ = vala_struct_get_properties (_tmp51_);
	_tmp53_ = _tmp52_;
	vala_code_writer_visit_sorted (self, _tmp53_);
	_vala_iterable_unref0 (_tmp53_);
	_tmp54_ = self->priv->current_scope;
	_tmp55_ = vala_scope_get_parent_scope (_tmp54_);
	_tmp56_ = _tmp55_;
	_tmp57_ = _vala_scope_ref0 (_tmp56_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp57_;
	vala_code_writer_write_end_block (self);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_interface (ValaCodeVisitor* base, ValaInterface* iface) {
	ValaCodeWriter * self;
	ValaInterface* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaInterface* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaInterface* _tmp15_;
	ValaInterface* _tmp16_;
	ValaInterface* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	ValaInterface* _tmp20_;
	ValaList* _tmp21_;
	ValaList* _tmp22_;
	ValaList* prerequisites = NULL;
	ValaInterface* _tmp23_;
	ValaList* _tmp24_;
	ValaList* _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	ValaInterface* _tmp41_;
	ValaScope* _tmp42_;
	ValaScope* _tmp43_;
	ValaScope* _tmp44_;
	ValaInterface* _tmp45_;
	ValaList* _tmp46_;
	ValaList* _tmp47_;
	ValaInterface* _tmp48_;
	ValaList* _tmp49_;
	ValaList* _tmp50_;
	ValaInterface* _tmp51_;
	ValaList* _tmp52_;
	ValaList* _tmp53_;
	ValaInterface* _tmp54_;
	ValaList* _tmp55_;
	ValaList* _tmp56_;
	ValaInterface* _tmp57_;
	ValaList* _tmp58_;
	ValaList* _tmp59_;
	ValaInterface* _tmp60_;
	ValaList* _tmp61_;
	ValaList* _tmp62_;
	ValaInterface* _tmp63_;
	ValaList* _tmp64_;
	ValaList* _tmp65_;
	ValaInterface* _tmp66_;
	ValaList* _tmp67_;
	ValaList* _tmp68_;
	ValaInterface* _tmp69_;
	ValaList* _tmp70_;
	ValaList* _tmp71_;
	ValaScope* _tmp72_;
	ValaScope* _tmp73_;
	ValaScope* _tmp74_;
	ValaScope* _tmp75_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (iface != NULL);
	_tmp0_ = iface;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = iface;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaInterface* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = iface;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaInterface* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = iface;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = iface;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = iface;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	vala_code_writer_write_string (self, "interface ");
	_tmp17_ = iface;
	_tmp18_ = vala_symbol_get_name ((ValaSymbol*) _tmp17_);
	_tmp19_ = _tmp18_;
	vala_code_writer_write_identifier (self, _tmp19_);
	_tmp20_ = iface;
	_tmp21_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) _tmp20_);
	_tmp22_ = _tmp21_;
	vala_code_writer_write_type_parameters (self, _tmp22_);
	_vala_iterable_unref0 (_tmp22_);
	_tmp23_ = iface;
	_tmp24_ = vala_interface_get_prerequisites (_tmp23_);
	prerequisites = _tmp24_;
	_tmp25_ = prerequisites;
	_tmp26_ = vala_collection_get_size ((ValaCollection*) _tmp25_);
	_tmp27_ = _tmp26_;
	if (_tmp27_ > 0) {
		gboolean first = FALSE;
		vala_code_writer_write_string (self, " : ");
		first = TRUE;
		{
			ValaList* _prerequisite_list = NULL;
			ValaList* _tmp28_;
			ValaList* _tmp29_;
			gint _prerequisite_size = 0;
			ValaList* _tmp30_;
			gint _tmp31_;
			gint _tmp32_;
			gint _prerequisite_index = 0;
			_tmp28_ = prerequisites;
			_tmp29_ = _vala_iterable_ref0 (_tmp28_);
			_prerequisite_list = _tmp29_;
			_tmp30_ = _prerequisite_list;
			_tmp31_ = vala_collection_get_size ((ValaCollection*) _tmp30_);
			_tmp32_ = _tmp31_;
			_prerequisite_size = _tmp32_;
			_prerequisite_index = -1;
			while (TRUE) {
				gint _tmp33_;
				gint _tmp34_;
				gint _tmp35_;
				ValaDataType* prerequisite = NULL;
				ValaList* _tmp36_;
				gint _tmp37_;
				gpointer _tmp38_;
				gboolean _tmp39_;
				ValaDataType* _tmp40_;
				_tmp33_ = _prerequisite_index;
				_prerequisite_index = _tmp33_ + 1;
				_tmp34_ = _prerequisite_index;
				_tmp35_ = _prerequisite_size;
				if (!(_tmp34_ < _tmp35_)) {
					break;
				}
				_tmp36_ = _prerequisite_list;
				_tmp37_ = _prerequisite_index;
				_tmp38_ = vala_list_get (_tmp36_, _tmp37_);
				prerequisite = (ValaDataType*) _tmp38_;
				_tmp39_ = first;
				if (!_tmp39_) {
					vala_code_writer_write_string (self, ", ");
				} else {
					first = FALSE;
				}
				_tmp40_ = prerequisite;
				vala_code_writer_write_type (self, _tmp40_);
				_vala_code_node_unref0 (prerequisite);
			}
			_vala_iterable_unref0 (_prerequisite_list);
		}
	}
	vala_code_writer_write_begin_block (self);
	_tmp41_ = iface;
	_tmp42_ = vala_symbol_get_scope ((ValaSymbol*) _tmp41_);
	_tmp43_ = _tmp42_;
	_tmp44_ = _vala_scope_ref0 (_tmp43_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp44_;
	_tmp45_ = iface;
	_tmp46_ = vala_interface_get_classes (_tmp45_);
	_tmp47_ = _tmp46_;
	vala_code_writer_visit_sorted (self, _tmp47_);
	_vala_iterable_unref0 (_tmp47_);
	_tmp48_ = iface;
	_tmp49_ = vala_interface_get_structs (_tmp48_);
	_tmp50_ = _tmp49_;
	vala_code_writer_visit_sorted (self, _tmp50_);
	_vala_iterable_unref0 (_tmp50_);
	_tmp51_ = iface;
	_tmp52_ = vala_interface_get_enums (_tmp51_);
	_tmp53_ = _tmp52_;
	vala_code_writer_visit_sorted (self, _tmp53_);
	_vala_iterable_unref0 (_tmp53_);
	_tmp54_ = iface;
	_tmp55_ = vala_interface_get_delegates (_tmp54_);
	_tmp56_ = _tmp55_;
	vala_code_writer_visit_sorted (self, _tmp56_);
	_vala_iterable_unref0 (_tmp56_);
	_tmp57_ = iface;
	_tmp58_ = vala_interface_get_fields (_tmp57_);
	_tmp59_ = _tmp58_;
	vala_code_writer_visit_sorted (self, _tmp59_);
	_vala_iterable_unref0 (_tmp59_);
	_tmp60_ = iface;
	_tmp61_ = vala_interface_get_constants (_tmp60_);
	_tmp62_ = _tmp61_;
	vala_code_writer_visit_sorted (self, _tmp62_);
	_vala_iterable_unref0 (_tmp62_);
	_tmp63_ = iface;
	_tmp64_ = vala_object_type_symbol_get_methods ((ValaObjectTypeSymbol*) _tmp63_);
	_tmp65_ = _tmp64_;
	vala_code_writer_visit_sorted (self, _tmp65_);
	_vala_iterable_unref0 (_tmp65_);
	_tmp66_ = iface;
	_tmp67_ = vala_object_type_symbol_get_properties ((ValaObjectTypeSymbol*) _tmp66_);
	_tmp68_ = _tmp67_;
	vala_code_writer_visit_sorted (self, _tmp68_);
	_vala_iterable_unref0 (_tmp68_);
	_tmp69_ = iface;
	_tmp70_ = vala_object_type_symbol_get_signals ((ValaObjectTypeSymbol*) _tmp69_);
	_tmp71_ = _tmp70_;
	vala_code_writer_visit_sorted (self, _tmp71_);
	_vala_iterable_unref0 (_tmp71_);
	_tmp72_ = self->priv->current_scope;
	_tmp73_ = vala_scope_get_parent_scope (_tmp72_);
	_tmp74_ = _tmp73_;
	_tmp75_ = _vala_scope_ref0 (_tmp74_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp75_;
	vala_code_writer_write_end_block (self);
	vala_code_writer_write_newline (self);
	_vala_iterable_unref0 (prerequisites);
}


static void vala_code_writer_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en) {
	ValaCodeWriter * self;
	ValaEnum* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaEnum* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaEnum* _tmp15_;
	ValaEnum* _tmp16_;
	ValaEnum* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gboolean first = FALSE;
	gboolean _tmp54_;
	ValaEnum* _tmp67_;
	ValaScope* _tmp68_;
	ValaScope* _tmp69_;
	ValaScope* _tmp70_;
	ValaScope* _tmp95_;
	ValaScope* _tmp96_;
	ValaScope* _tmp97_;
	ValaScope* _tmp98_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (en != NULL);
	_tmp0_ = en;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = en;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaEnum* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = en;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaEnum* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = en;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = en;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = en;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	vala_code_writer_write_string (self, "enum ");
	_tmp17_ = en;
	_tmp18_ = vala_symbol_get_name ((ValaSymbol*) _tmp17_);
	_tmp19_ = _tmp18_;
	vala_code_writer_write_identifier (self, _tmp19_);
	vala_code_writer_write_begin_block (self);
	first = TRUE;
	{
		ValaList* _ev_list = NULL;
		ValaEnum* _tmp20_;
		ValaList* _tmp21_;
		gint _ev_size = 0;
		ValaList* _tmp22_;
		gint _tmp23_;
		gint _tmp24_;
		gint _ev_index = 0;
		_tmp20_ = en;
		_tmp21_ = vala_enum_get_values (_tmp20_);
		_ev_list = _tmp21_;
		_tmp22_ = _ev_list;
		_tmp23_ = vala_collection_get_size ((ValaCollection*) _tmp22_);
		_tmp24_ = _tmp23_;
		_ev_size = _tmp24_;
		_ev_index = -1;
		while (TRUE) {
			gint _tmp25_;
			gint _tmp26_;
			gint _tmp27_;
			ValaEnumValue* ev = NULL;
			ValaList* _tmp28_;
			gint _tmp29_;
			gpointer _tmp30_;
			gboolean _tmp31_;
			gboolean _tmp32_ = FALSE;
			ValaCodeContext* _tmp33_;
			gboolean _tmp34_;
			gboolean _tmp35_;
			ValaEnumValue* _tmp42_;
			ValaEnumValue* _tmp43_;
			const gchar* _tmp44_;
			const gchar* _tmp45_;
			gboolean _tmp46_ = FALSE;
			ValaCodeWriterType _tmp47_;
			_tmp25_ = _ev_index;
			_ev_index = _tmp25_ + 1;
			_tmp26_ = _ev_index;
			_tmp27_ = _ev_size;
			if (!(_tmp26_ < _tmp27_)) {
				break;
			}
			_tmp28_ = _ev_list;
			_tmp29_ = _ev_index;
			_tmp30_ = vala_list_get (_tmp28_, _tmp29_);
			ev = (ValaEnumValue*) _tmp30_;
			_tmp31_ = first;
			if (_tmp31_) {
				first = FALSE;
			} else {
				vala_code_writer_write_string (self, ",");
				vala_code_writer_write_newline (self);
			}
			_tmp33_ = self->priv->context;
			_tmp34_ = vala_code_context_get_vapi_comments (_tmp33_);
			_tmp35_ = _tmp34_;
			if (_tmp35_) {
				ValaEnumValue* _tmp36_;
				ValaComment* _tmp37_;
				ValaComment* _tmp38_;
				_tmp36_ = ev;
				_tmp37_ = vala_symbol_get_comment ((ValaSymbol*) _tmp36_);
				_tmp38_ = _tmp37_;
				_tmp32_ = _tmp38_ != NULL;
			} else {
				_tmp32_ = FALSE;
			}
			if (_tmp32_) {
				ValaEnumValue* _tmp39_;
				ValaComment* _tmp40_;
				ValaComment* _tmp41_;
				_tmp39_ = ev;
				_tmp40_ = vala_symbol_get_comment ((ValaSymbol*) _tmp39_);
				_tmp41_ = _tmp40_;
				vala_code_writer_write_comment (self, _tmp41_);
			}
			_tmp42_ = ev;
			vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp42_);
			vala_code_writer_write_indent (self);
			_tmp43_ = ev;
			_tmp44_ = vala_symbol_get_name ((ValaSymbol*) _tmp43_);
			_tmp45_ = _tmp44_;
			vala_code_writer_write_identifier (self, _tmp45_);
			_tmp47_ = self->priv->type;
			if (_tmp47_ == VALA_CODE_WRITER_TYPE_FAST) {
				ValaEnumValue* _tmp48_;
				ValaExpression* _tmp49_;
				ValaExpression* _tmp50_;
				_tmp48_ = ev;
				_tmp49_ = vala_constant_get_value ((ValaConstant*) _tmp48_);
				_tmp50_ = _tmp49_;
				_tmp46_ = _tmp50_ != NULL;
			} else {
				_tmp46_ = FALSE;
			}
			if (_tmp46_) {
				ValaEnumValue* _tmp51_;
				ValaExpression* _tmp52_;
				ValaExpression* _tmp53_;
				vala_code_writer_write_string (self, " = ");
				_tmp51_ = ev;
				_tmp52_ = vala_constant_get_value ((ValaConstant*) _tmp51_);
				_tmp53_ = _tmp52_;
				vala_code_node_accept ((ValaCodeNode*) _tmp53_, (ValaCodeVisitor*) self);
			}
			_vala_code_node_unref0 (ev);
		}
		_vala_iterable_unref0 (_ev_list);
	}
	_tmp54_ = first;
	if (!_tmp54_) {
		gboolean _tmp55_ = FALSE;
		ValaEnum* _tmp56_;
		ValaList* _tmp57_;
		ValaList* _tmp58_;
		gint _tmp59_;
		gint _tmp60_;
		gboolean _tmp61_;
		_tmp56_ = en;
		_tmp57_ = vala_enum_get_methods (_tmp56_);
		_tmp58_ = _tmp57_;
		_tmp59_ = vala_collection_get_size ((ValaCollection*) _tmp58_);
		_tmp60_ = _tmp59_;
		_tmp61_ = _tmp60_ > 0;
		_vala_iterable_unref0 (_tmp58_);
		if (_tmp61_) {
			_tmp55_ = TRUE;
		} else {
			ValaEnum* _tmp62_;
			ValaList* _tmp63_;
			ValaList* _tmp64_;
			gint _tmp65_;
			gint _tmp66_;
			_tmp62_ = en;
			_tmp63_ = vala_enum_get_constants (_tmp62_);
			_tmp64_ = _tmp63_;
			_tmp65_ = vala_collection_get_size ((ValaCollection*) _tmp64_);
			_tmp66_ = _tmp65_;
			_tmp55_ = _tmp66_ > 0;
			_vala_iterable_unref0 (_tmp64_);
		}
		if (_tmp55_) {
			vala_code_writer_write_string (self, ";");
		}
		vala_code_writer_write_newline (self);
	}
	_tmp67_ = en;
	_tmp68_ = vala_symbol_get_scope ((ValaSymbol*) _tmp67_);
	_tmp69_ = _tmp68_;
	_tmp70_ = _vala_scope_ref0 (_tmp69_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp70_;
	{
		ValaList* _m_list = NULL;
		ValaEnum* _tmp71_;
		ValaList* _tmp72_;
		gint _m_size = 0;
		ValaList* _tmp73_;
		gint _tmp74_;
		gint _tmp75_;
		gint _m_index = 0;
		_tmp71_ = en;
		_tmp72_ = vala_enum_get_methods (_tmp71_);
		_m_list = _tmp72_;
		_tmp73_ = _m_list;
		_tmp74_ = vala_collection_get_size ((ValaCollection*) _tmp73_);
		_tmp75_ = _tmp74_;
		_m_size = _tmp75_;
		_m_index = -1;
		while (TRUE) {
			gint _tmp76_;
			gint _tmp77_;
			gint _tmp78_;
			ValaMethod* m = NULL;
			ValaList* _tmp79_;
			gint _tmp80_;
			gpointer _tmp81_;
			ValaMethod* _tmp82_;
			_tmp76_ = _m_index;
			_m_index = _tmp76_ + 1;
			_tmp77_ = _m_index;
			_tmp78_ = _m_size;
			if (!(_tmp77_ < _tmp78_)) {
				break;
			}
			_tmp79_ = _m_list;
			_tmp80_ = _m_index;
			_tmp81_ = vala_list_get (_tmp79_, _tmp80_);
			m = (ValaMethod*) _tmp81_;
			_tmp82_ = m;
			vala_code_node_accept ((ValaCodeNode*) _tmp82_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (m);
		}
		_vala_iterable_unref0 (_m_list);
	}
	{
		ValaList* _c_list = NULL;
		ValaEnum* _tmp83_;
		ValaList* _tmp84_;
		gint _c_size = 0;
		ValaList* _tmp85_;
		gint _tmp86_;
		gint _tmp87_;
		gint _c_index = 0;
		_tmp83_ = en;
		_tmp84_ = vala_enum_get_constants (_tmp83_);
		_c_list = _tmp84_;
		_tmp85_ = _c_list;
		_tmp86_ = vala_collection_get_size ((ValaCollection*) _tmp85_);
		_tmp87_ = _tmp86_;
		_c_size = _tmp87_;
		_c_index = -1;
		while (TRUE) {
			gint _tmp88_;
			gint _tmp89_;
			gint _tmp90_;
			ValaConstant* c = NULL;
			ValaList* _tmp91_;
			gint _tmp92_;
			gpointer _tmp93_;
			ValaConstant* _tmp94_;
			_tmp88_ = _c_index;
			_c_index = _tmp88_ + 1;
			_tmp89_ = _c_index;
			_tmp90_ = _c_size;
			if (!(_tmp89_ < _tmp90_)) {
				break;
			}
			_tmp91_ = _c_list;
			_tmp92_ = _c_index;
			_tmp93_ = vala_list_get (_tmp91_, _tmp92_);
			c = (ValaConstant*) _tmp93_;
			_tmp94_ = c;
			vala_code_node_accept ((ValaCodeNode*) _tmp94_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (c);
		}
		_vala_iterable_unref0 (_c_list);
	}
	_tmp95_ = self->priv->current_scope;
	_tmp96_ = vala_scope_get_parent_scope (_tmp95_);
	_tmp97_ = _tmp96_;
	_tmp98_ = _vala_scope_ref0 (_tmp97_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp98_;
	vala_code_writer_write_end_block (self);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_error_domain (ValaCodeVisitor* base, ValaErrorDomain* edomain) {
	ValaCodeWriter * self;
	ValaErrorDomain* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaErrorDomain* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaErrorDomain* _tmp15_;
	ValaErrorDomain* _tmp16_;
	ValaErrorDomain* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gboolean first = FALSE;
	gboolean _tmp46_;
	ValaErrorDomain* _tmp53_;
	ValaScope* _tmp54_;
	ValaScope* _tmp55_;
	ValaScope* _tmp56_;
	ValaScope* _tmp69_;
	ValaScope* _tmp70_;
	ValaScope* _tmp71_;
	ValaScope* _tmp72_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (edomain != NULL);
	_tmp0_ = edomain;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = edomain;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaErrorDomain* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = edomain;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaErrorDomain* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = edomain;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = edomain;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = edomain;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	vala_code_writer_write_string (self, "errordomain ");
	_tmp17_ = edomain;
	_tmp18_ = vala_symbol_get_name ((ValaSymbol*) _tmp17_);
	_tmp19_ = _tmp18_;
	vala_code_writer_write_identifier (self, _tmp19_);
	vala_code_writer_write_begin_block (self);
	first = TRUE;
	{
		ValaList* _ecode_list = NULL;
		ValaErrorDomain* _tmp20_;
		ValaList* _tmp21_;
		gint _ecode_size = 0;
		ValaList* _tmp22_;
		gint _tmp23_;
		gint _tmp24_;
		gint _ecode_index = 0;
		_tmp20_ = edomain;
		_tmp21_ = vala_error_domain_get_codes (_tmp20_);
		_ecode_list = _tmp21_;
		_tmp22_ = _ecode_list;
		_tmp23_ = vala_collection_get_size ((ValaCollection*) _tmp22_);
		_tmp24_ = _tmp23_;
		_ecode_size = _tmp24_;
		_ecode_index = -1;
		while (TRUE) {
			gint _tmp25_;
			gint _tmp26_;
			gint _tmp27_;
			ValaErrorCode* ecode = NULL;
			ValaList* _tmp28_;
			gint _tmp29_;
			gpointer _tmp30_;
			gboolean _tmp31_;
			gboolean _tmp32_ = FALSE;
			ValaCodeContext* _tmp33_;
			gboolean _tmp34_;
			gboolean _tmp35_;
			ValaErrorCode* _tmp42_;
			ValaErrorCode* _tmp43_;
			const gchar* _tmp44_;
			const gchar* _tmp45_;
			_tmp25_ = _ecode_index;
			_ecode_index = _tmp25_ + 1;
			_tmp26_ = _ecode_index;
			_tmp27_ = _ecode_size;
			if (!(_tmp26_ < _tmp27_)) {
				break;
			}
			_tmp28_ = _ecode_list;
			_tmp29_ = _ecode_index;
			_tmp30_ = vala_list_get (_tmp28_, _tmp29_);
			ecode = (ValaErrorCode*) _tmp30_;
			_tmp31_ = first;
			if (_tmp31_) {
				first = FALSE;
			} else {
				vala_code_writer_write_string (self, ",");
				vala_code_writer_write_newline (self);
			}
			_tmp33_ = self->priv->context;
			_tmp34_ = vala_code_context_get_vapi_comments (_tmp33_);
			_tmp35_ = _tmp34_;
			if (_tmp35_) {
				ValaErrorCode* _tmp36_;
				ValaComment* _tmp37_;
				ValaComment* _tmp38_;
				_tmp36_ = ecode;
				_tmp37_ = vala_symbol_get_comment ((ValaSymbol*) _tmp36_);
				_tmp38_ = _tmp37_;
				_tmp32_ = _tmp38_ != NULL;
			} else {
				_tmp32_ = FALSE;
			}
			if (_tmp32_) {
				ValaErrorCode* _tmp39_;
				ValaComment* _tmp40_;
				ValaComment* _tmp41_;
				_tmp39_ = ecode;
				_tmp40_ = vala_symbol_get_comment ((ValaSymbol*) _tmp39_);
				_tmp41_ = _tmp40_;
				vala_code_writer_write_comment (self, _tmp41_);
			}
			_tmp42_ = ecode;
			vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp42_);
			vala_code_writer_write_indent (self);
			_tmp43_ = ecode;
			_tmp44_ = vala_symbol_get_name ((ValaSymbol*) _tmp43_);
			_tmp45_ = _tmp44_;
			vala_code_writer_write_identifier (self, _tmp45_);
			_vala_code_node_unref0 (ecode);
		}
		_vala_iterable_unref0 (_ecode_list);
	}
	_tmp46_ = first;
	if (!_tmp46_) {
		ValaErrorDomain* _tmp47_;
		ValaList* _tmp48_;
		ValaList* _tmp49_;
		gint _tmp50_;
		gint _tmp51_;
		gboolean _tmp52_;
		_tmp47_ = edomain;
		_tmp48_ = vala_error_domain_get_methods (_tmp47_);
		_tmp49_ = _tmp48_;
		_tmp50_ = vala_collection_get_size ((ValaCollection*) _tmp49_);
		_tmp51_ = _tmp50_;
		_tmp52_ = _tmp51_ > 0;
		_vala_iterable_unref0 (_tmp49_);
		if (_tmp52_) {
			vala_code_writer_write_string (self, ";");
		}
		vala_code_writer_write_newline (self);
	}
	_tmp53_ = edomain;
	_tmp54_ = vala_symbol_get_scope ((ValaSymbol*) _tmp53_);
	_tmp55_ = _tmp54_;
	_tmp56_ = _vala_scope_ref0 (_tmp55_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp56_;
	{
		ValaList* _m_list = NULL;
		ValaErrorDomain* _tmp57_;
		ValaList* _tmp58_;
		gint _m_size = 0;
		ValaList* _tmp59_;
		gint _tmp60_;
		gint _tmp61_;
		gint _m_index = 0;
		_tmp57_ = edomain;
		_tmp58_ = vala_error_domain_get_methods (_tmp57_);
		_m_list = _tmp58_;
		_tmp59_ = _m_list;
		_tmp60_ = vala_collection_get_size ((ValaCollection*) _tmp59_);
		_tmp61_ = _tmp60_;
		_m_size = _tmp61_;
		_m_index = -1;
		while (TRUE) {
			gint _tmp62_;
			gint _tmp63_;
			gint _tmp64_;
			ValaMethod* m = NULL;
			ValaList* _tmp65_;
			gint _tmp66_;
			gpointer _tmp67_;
			ValaMethod* _tmp68_;
			_tmp62_ = _m_index;
			_m_index = _tmp62_ + 1;
			_tmp63_ = _m_index;
			_tmp64_ = _m_size;
			if (!(_tmp63_ < _tmp64_)) {
				break;
			}
			_tmp65_ = _m_list;
			_tmp66_ = _m_index;
			_tmp67_ = vala_list_get (_tmp65_, _tmp66_);
			m = (ValaMethod*) _tmp67_;
			_tmp68_ = m;
			vala_code_node_accept ((ValaCodeNode*) _tmp68_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (m);
		}
		_vala_iterable_unref0 (_m_list);
	}
	_tmp69_ = self->priv->current_scope;
	_tmp70_ = vala_scope_get_parent_scope (_tmp69_);
	_tmp71_ = _tmp70_;
	_tmp72_ = _vala_scope_ref0 (_tmp71_);
	_vala_scope_unref0 (self->priv->current_scope);
	self->priv->current_scope = _tmp72_;
	vala_code_writer_write_end_block (self);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_constant (ValaCodeVisitor* base, ValaConstant* c) {
	ValaCodeWriter * self;
	ValaConstant* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaConstant* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaConstant* _tmp15_;
	ValaConstant* _tmp16_;
	ValaConstant* _tmp17_;
	ValaDataType* _tmp18_;
	ValaDataType* _tmp19_;
	ValaConstant* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	ValaConstant* _tmp23_;
	ValaDataType* _tmp24_;
	ValaDataType* _tmp25_;
	gboolean _tmp26_ = FALSE;
	ValaCodeWriterType _tmp27_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (c != NULL);
	_tmp0_ = c;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = c;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaConstant* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = c;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaConstant* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = c;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = c;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = c;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	vala_code_writer_write_string (self, "const ");
	_tmp17_ = c;
	_tmp18_ = vala_constant_get_type_reference (_tmp17_);
	_tmp19_ = _tmp18_;
	vala_code_writer_write_type (self, _tmp19_);
	vala_code_writer_write_string (self, " ");
	_tmp20_ = c;
	_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
	_tmp22_ = _tmp21_;
	vala_code_writer_write_identifier (self, _tmp22_);
	_tmp23_ = c;
	_tmp24_ = vala_constant_get_type_reference (_tmp23_);
	_tmp25_ = _tmp24_;
	vala_code_writer_write_type_suffix (self, _tmp25_);
	_tmp27_ = self->priv->type;
	if (_tmp27_ == VALA_CODE_WRITER_TYPE_FAST) {
		ValaConstant* _tmp28_;
		ValaExpression* _tmp29_;
		ValaExpression* _tmp30_;
		_tmp28_ = c;
		_tmp29_ = vala_constant_get_value (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp26_ = _tmp30_ != NULL;
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		ValaConstant* _tmp31_;
		ValaExpression* _tmp32_;
		ValaExpression* _tmp33_;
		vala_code_writer_write_string (self, " = ");
		_tmp31_ = c;
		_tmp32_ = vala_constant_get_value (_tmp31_);
		_tmp33_ = _tmp32_;
		vala_code_node_accept ((ValaCodeNode*) _tmp33_, (ValaCodeVisitor*) self);
	}
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_field (ValaCodeVisitor* base, ValaField* f) {
	ValaCodeWriter * self;
	ValaField* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaField* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaField* _tmp15_;
	ValaField* _tmp16_;
	ValaField* _tmp17_;
	ValaMemberBinding _tmp18_;
	ValaMemberBinding _tmp19_;
	ValaField* _tmp23_;
	ValaDataType* _tmp24_;
	ValaDataType* _tmp25_;
	gboolean _tmp26_;
	ValaField* _tmp27_;
	ValaDataType* _tmp28_;
	ValaDataType* _tmp29_;
	ValaField* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	ValaField* _tmp33_;
	ValaDataType* _tmp34_;
	ValaDataType* _tmp35_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (f != NULL);
	_tmp0_ = f;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = f;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaField* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = f;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaField* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = f;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = f;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = f;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	_tmp17_ = f;
	_tmp18_ = vala_field_get_binding (_tmp17_);
	_tmp19_ = _tmp18_;
	if (_tmp19_ == VALA_MEMBER_BINDING_STATIC) {
		vala_code_writer_write_string (self, "static ");
	} else {
		ValaField* _tmp20_;
		ValaMemberBinding _tmp21_;
		ValaMemberBinding _tmp22_;
		_tmp20_ = f;
		_tmp21_ = vala_field_get_binding (_tmp20_);
		_tmp22_ = _tmp21_;
		if (_tmp22_ == VALA_MEMBER_BINDING_CLASS) {
			vala_code_writer_write_string (self, "class ");
		}
	}
	_tmp23_ = f;
	_tmp24_ = vala_variable_get_variable_type ((ValaVariable*) _tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_data_type_is_weak (_tmp25_);
	if (_tmp26_) {
		vala_code_writer_write_string (self, "weak ");
	}
	_tmp27_ = f;
	_tmp28_ = vala_variable_get_variable_type ((ValaVariable*) _tmp27_);
	_tmp29_ = _tmp28_;
	vala_code_writer_write_type (self, _tmp29_);
	vala_code_writer_write_string (self, " ");
	_tmp30_ = f;
	_tmp31_ = vala_symbol_get_name ((ValaSymbol*) _tmp30_);
	_tmp32_ = _tmp31_;
	vala_code_writer_write_identifier (self, _tmp32_);
	_tmp33_ = f;
	_tmp34_ = vala_variable_get_variable_type ((ValaVariable*) _tmp33_);
	_tmp35_ = _tmp34_;
	vala_code_writer_write_type_suffix (self, _tmp35_);
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_write_error_domains (ValaCodeWriter* self, ValaList* error_domains) {
	ValaList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (error_domains != NULL);
	_tmp0_ = error_domains;
	_tmp1_ = vala_collection_get_size ((ValaCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		gboolean first = FALSE;
		vala_code_writer_write_string (self, " throws ");
		first = TRUE;
		{
			ValaList* _type_list = NULL;
			ValaList* _tmp3_;
			ValaList* _tmp4_;
			gint _type_size = 0;
			ValaList* _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			gint _type_index = 0;
			_tmp3_ = error_domains;
			_tmp4_ = _vala_iterable_ref0 (_tmp3_);
			_type_list = _tmp4_;
			_tmp5_ = _type_list;
			_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
			_tmp7_ = _tmp6_;
			_type_size = _tmp7_;
			_type_index = -1;
			while (TRUE) {
				gint _tmp8_;
				gint _tmp9_;
				gint _tmp10_;
				ValaDataType* type = NULL;
				ValaList* _tmp11_;
				gint _tmp12_;
				gpointer _tmp13_;
				gboolean _tmp14_;
				ValaDataType* _tmp15_;
				_tmp8_ = _type_index;
				_type_index = _tmp8_ + 1;
				_tmp9_ = _type_index;
				_tmp10_ = _type_size;
				if (!(_tmp9_ < _tmp10_)) {
					break;
				}
				_tmp11_ = _type_list;
				_tmp12_ = _type_index;
				_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
				type = (ValaDataType*) _tmp13_;
				_tmp14_ = first;
				if (!_tmp14_) {
					vala_code_writer_write_string (self, ", ");
				} else {
					first = FALSE;
				}
				_tmp15_ = type;
				vala_code_writer_write_type (self, _tmp15_);
				_vala_code_node_unref0 (type);
			}
			_vala_iterable_unref0 (_type_list);
		}
	}
}


static void vala_code_writer_write_params (ValaCodeWriter* self, ValaList* params) {
	gint i = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (params != NULL);
	vala_code_writer_write_string (self, "(");
	i = 1;
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp0_;
		ValaList* _tmp1_;
		gint _param_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _param_index = 0;
		_tmp0_ = params;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_param_list = _tmp1_;
		_tmp2_ = _param_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_param_size = _tmp4_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaParameter* param = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			gint _tmp11_;
			ValaParameter* _tmp12_;
			gboolean _tmp13_;
			gboolean _tmp14_;
			ValaParameter* _tmp15_;
			ValaParameter* _tmp16_;
			gboolean _tmp17_;
			gboolean _tmp18_;
			ValaParameter* _tmp19_;
			ValaParameterDirection _tmp20_;
			ValaParameterDirection _tmp21_;
			ValaParameter* _tmp37_;
			ValaDataType* _tmp38_;
			ValaDataType* _tmp39_;
			ValaParameter* _tmp40_;
			const gchar* _tmp41_;
			const gchar* _tmp42_;
			ValaParameter* _tmp43_;
			ValaDataType* _tmp44_;
			ValaDataType* _tmp45_;
			ValaParameter* _tmp46_;
			ValaExpression* _tmp47_;
			ValaExpression* _tmp48_;
			gint _tmp52_;
			_tmp5_ = _param_index;
			_param_index = _tmp5_ + 1;
			_tmp6_ = _param_index;
			_tmp7_ = _param_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _param_list;
			_tmp9_ = _param_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			param = (ValaParameter*) _tmp10_;
			_tmp11_ = i;
			if (_tmp11_ > 1) {
				vala_code_writer_write_string (self, ", ");
			}
			_tmp12_ = param;
			_tmp13_ = vala_parameter_get_ellipsis (_tmp12_);
			_tmp14_ = _tmp13_;
			if (_tmp14_) {
				vala_code_writer_write_string (self, "...");
				_vala_code_node_unref0 (param);
				continue;
			}
			_tmp15_ = param;
			vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
			_tmp16_ = param;
			_tmp17_ = vala_parameter_get_params_array (_tmp16_);
			_tmp18_ = _tmp17_;
			if (_tmp18_) {
				vala_code_writer_write_string (self, "params ");
			}
			_tmp19_ = param;
			_tmp20_ = vala_parameter_get_direction (_tmp19_);
			_tmp21_ = _tmp20_;
			if (_tmp21_ == VALA_PARAMETER_DIRECTION_IN) {
				ValaParameter* _tmp22_;
				ValaDataType* _tmp23_;
				ValaDataType* _tmp24_;
				gboolean _tmp25_;
				gboolean _tmp26_;
				_tmp22_ = param;
				_tmp23_ = vala_variable_get_variable_type ((ValaVariable*) _tmp22_);
				_tmp24_ = _tmp23_;
				_tmp25_ = vala_data_type_get_value_owned (_tmp24_);
				_tmp26_ = _tmp25_;
				if (_tmp26_) {
					vala_code_writer_write_string (self, "owned ");
				}
			} else {
				ValaParameter* _tmp27_;
				ValaParameterDirection _tmp28_;
				ValaParameterDirection _tmp29_;
				ValaParameter* _tmp33_;
				ValaDataType* _tmp34_;
				ValaDataType* _tmp35_;
				gboolean _tmp36_;
				_tmp27_ = param;
				_tmp28_ = vala_parameter_get_direction (_tmp27_);
				_tmp29_ = _tmp28_;
				if (_tmp29_ == VALA_PARAMETER_DIRECTION_REF) {
					vala_code_writer_write_string (self, "ref ");
				} else {
					ValaParameter* _tmp30_;
					ValaParameterDirection _tmp31_;
					ValaParameterDirection _tmp32_;
					_tmp30_ = param;
					_tmp31_ = vala_parameter_get_direction (_tmp30_);
					_tmp32_ = _tmp31_;
					if (_tmp32_ == VALA_PARAMETER_DIRECTION_OUT) {
						vala_code_writer_write_string (self, "out ");
					}
				}
				_tmp33_ = param;
				_tmp34_ = vala_variable_get_variable_type ((ValaVariable*) _tmp33_);
				_tmp35_ = _tmp34_;
				_tmp36_ = vala_data_type_is_weak (_tmp35_);
				if (_tmp36_) {
					vala_code_writer_write_string (self, "unowned ");
				}
			}
			_tmp37_ = param;
			_tmp38_ = vala_variable_get_variable_type ((ValaVariable*) _tmp37_);
			_tmp39_ = _tmp38_;
			vala_code_writer_write_type (self, _tmp39_);
			vala_code_writer_write_string (self, " ");
			_tmp40_ = param;
			_tmp41_ = vala_symbol_get_name ((ValaSymbol*) _tmp40_);
			_tmp42_ = _tmp41_;
			vala_code_writer_write_identifier (self, _tmp42_);
			_tmp43_ = param;
			_tmp44_ = vala_variable_get_variable_type ((ValaVariable*) _tmp43_);
			_tmp45_ = _tmp44_;
			vala_code_writer_write_type_suffix (self, _tmp45_);
			_tmp46_ = param;
			_tmp47_ = vala_variable_get_initializer ((ValaVariable*) _tmp46_);
			_tmp48_ = _tmp47_;
			if (_tmp48_ != NULL) {
				ValaParameter* _tmp49_;
				ValaExpression* _tmp50_;
				ValaExpression* _tmp51_;
				vala_code_writer_write_string (self, " = ");
				_tmp49_ = param;
				_tmp50_ = vala_variable_get_initializer ((ValaVariable*) _tmp49_);
				_tmp51_ = _tmp50_;
				vala_code_node_accept ((ValaCodeNode*) _tmp51_, (ValaCodeVisitor*) self);
			}
			_tmp52_ = i;
			i = _tmp52_ + 1;
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	vala_code_writer_write_string (self, ")");
}


static void vala_code_writer_real_visit_delegate (ValaCodeVisitor* base, ValaDelegate* cb) {
	ValaCodeWriter * self;
	ValaDelegate* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaDelegate* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaDelegate* _tmp15_;
	ValaDelegate* _tmp16_;
	ValaDelegate* _tmp17_;
	ValaDataType* _tmp18_;
	ValaDataType* _tmp19_;
	ValaDelegate* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	ValaDelegate* _tmp23_;
	ValaList* _tmp24_;
	ValaList* _tmp25_;
	ValaDelegate* _tmp26_;
	ValaList* _tmp27_;
	ValaList* _tmp28_;
	ValaDelegate* _tmp29_;
	ValaList* _tmp30_;
	ValaList* _tmp31_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (cb != NULL);
	_tmp0_ = cb;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp3_ = cb;
	_tmp4_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp3_);
	if (!_tmp4_) {
		return;
	}
	_tmp6_ = self->priv->context;
	_tmp7_ = vala_code_context_get_vapi_comments (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_) {
		ValaDelegate* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = cb;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ValaDelegate* _tmp12_;
		ValaComment* _tmp13_;
		ValaComment* _tmp14_;
		_tmp12_ = cb;
		_tmp13_ = vala_symbol_get_comment ((ValaSymbol*) _tmp12_);
		_tmp14_ = _tmp13_;
		vala_code_writer_write_comment (self, _tmp14_);
	}
	_tmp15_ = cb;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp15_);
	vala_code_writer_write_indent (self);
	_tmp16_ = cb;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp16_);
	vala_code_writer_write_string (self, "delegate ");
	_tmp17_ = cb;
	_tmp18_ = vala_callable_get_return_type ((ValaCallable*) _tmp17_);
	_tmp19_ = _tmp18_;
	vala_code_writer_write_return_type (self, _tmp19_);
	vala_code_writer_write_string (self, " ");
	_tmp20_ = cb;
	_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
	_tmp22_ = _tmp21_;
	vala_code_writer_write_identifier (self, _tmp22_);
	_tmp23_ = cb;
	_tmp24_ = vala_delegate_get_type_parameters (_tmp23_);
	_tmp25_ = _tmp24_;
	vala_code_writer_write_type_parameters (self, _tmp25_);
	_vala_iterable_unref0 (_tmp25_);
	vala_code_writer_write_string (self, " ");
	_tmp26_ = cb;
	_tmp27_ = vala_callable_get_parameters ((ValaCallable*) _tmp26_);
	_tmp28_ = _tmp27_;
	vala_code_writer_write_params (self, _tmp28_);
	_vala_iterable_unref0 (_tmp28_);
	_tmp29_ = cb;
	_tmp30_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp29_);
	_tmp31_ = _tmp30_;
	vala_code_writer_write_error_domains (self, _tmp31_);
	_vala_iterable_unref0 (_tmp31_);
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_constructor (ValaCodeVisitor* base, ValaConstructor* c) {
	ValaCodeWriter * self;
	ValaCodeWriterType _tmp0_;
	gboolean _tmp1_ = FALSE;
	ValaCodeContext* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	ValaConstructor* _tmp11_;
	ValaBlock* _tmp12_;
	ValaBlock* _tmp13_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (c != NULL);
	_tmp0_ = self->priv->type;
	if (_tmp0_ != VALA_CODE_WRITER_TYPE_DUMP) {
		return;
	}
	_tmp2_ = self->priv->context;
	_tmp3_ = vala_code_context_get_vapi_comments (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		ValaConstructor* _tmp5_;
		ValaComment* _tmp6_;
		ValaComment* _tmp7_;
		_tmp5_ = c;
		_tmp6_ = vala_symbol_get_comment ((ValaSymbol*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		ValaConstructor* _tmp8_;
		ValaComment* _tmp9_;
		ValaComment* _tmp10_;
		_tmp8_ = c;
		_tmp9_ = vala_symbol_get_comment ((ValaSymbol*) _tmp8_);
		_tmp10_ = _tmp9_;
		vala_code_writer_write_comment (self, _tmp10_);
	}
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "construct");
	_tmp11_ = c;
	_tmp12_ = vala_subroutine_get_body ((ValaSubroutine*) _tmp11_);
	_tmp13_ = _tmp12_;
	vala_code_writer_write_code_block (self, _tmp13_);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_method (ValaCodeVisitor* base, ValaMethod* m) {
	ValaCodeWriter * self;
	ValaMethod* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValaMethod* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp18_ = FALSE;
	ValaCodeContext* _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	ValaMethod* _tmp28_;
	ValaMethod* _tmp29_;
	ValaMethod* _tmp30_;
	ValaMethod* _tmp77_;
	ValaList* _tmp78_;
	ValaList* _tmp79_;
	ValaMethod* _tmp80_;
	ValaList* _tmp81_;
	ValaList* _tmp82_;
	ValaMethod* _tmp83_;
	ValaBlock* _tmp84_;
	ValaBlock* _tmp85_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (m != NULL);
	_tmp0_ = m;
	_tmp1_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		return;
	}
	_tmp4_ = m;
	_tmp5_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp4_);
	if (!_tmp5_) {
		_tmp3_ = TRUE;
	} else {
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		ValaMethod* _tmp8_;
		ValaMethod* _tmp9_;
		ValaMethod* _tmp10_;
		_tmp8_ = m;
		_tmp9_ = vala_method_get_base_interface_method (_tmp8_);
		_tmp10_ = _tmp9_;
		if (_tmp10_ != NULL) {
			ValaMethod* _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp11_ = m;
			_tmp12_ = vala_method_get_is_abstract (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp7_ = !_tmp13_;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			ValaMethod* _tmp14_;
			gboolean _tmp15_;
			gboolean _tmp16_;
			_tmp14_ = m;
			_tmp15_ = vala_method_get_is_virtual (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp6_ = !_tmp16_;
		} else {
			_tmp6_ = FALSE;
		}
		_tmp3_ = _tmp6_;
	}
	if (_tmp3_) {
		ValaCodeWriterType _tmp17_;
		_tmp17_ = self->priv->type;
		if (_tmp17_ != VALA_CODE_WRITER_TYPE_DUMP) {
			return;
		}
	}
	_tmp19_ = self->priv->context;
	_tmp20_ = vala_code_context_get_vapi_comments (_tmp19_);
	_tmp21_ = _tmp20_;
	if (_tmp21_) {
		ValaMethod* _tmp22_;
		ValaComment* _tmp23_;
		ValaComment* _tmp24_;
		_tmp22_ = m;
		_tmp23_ = vala_symbol_get_comment ((ValaSymbol*) _tmp22_);
		_tmp24_ = _tmp23_;
		_tmp18_ = _tmp24_ != NULL;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		ValaMethod* _tmp25_;
		ValaComment* _tmp26_;
		ValaComment* _tmp27_;
		_tmp25_ = m;
		_tmp26_ = vala_symbol_get_comment ((ValaSymbol*) _tmp25_);
		_tmp27_ = _tmp26_;
		vala_code_writer_write_comment (self, _tmp27_);
	}
	_tmp28_ = m;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp28_);
	vala_code_writer_write_indent (self);
	_tmp29_ = m;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp29_);
	_tmp30_ = m;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp30_, VALA_TYPE_CREATION_METHOD)) {
		ValaMethod* _tmp31_;
		gboolean _tmp32_;
		gboolean _tmp33_;
		ValaTypeSymbol* datatype = NULL;
		ValaMethod* _tmp34_;
		ValaSymbol* _tmp35_;
		ValaSymbol* _tmp36_;
		ValaTypeSymbol* _tmp37_;
		ValaTypeSymbol* _tmp38_;
		const gchar* _tmp39_;
		const gchar* _tmp40_;
		ValaMethod* _tmp41_;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		_tmp31_ = m;
		_tmp32_ = vala_method_get_coroutine (_tmp31_);
		_tmp33_ = _tmp32_;
		if (_tmp33_) {
			vala_code_writer_write_string (self, "async ");
		}
		_tmp34_ = m;
		_tmp35_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp34_);
		_tmp36_ = _tmp35_;
		_tmp37_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol));
		datatype = _tmp37_;
		_tmp38_ = datatype;
		_tmp39_ = vala_symbol_get_name ((ValaSymbol*) _tmp38_);
		_tmp40_ = _tmp39_;
		vala_code_writer_write_identifier (self, _tmp40_);
		_tmp41_ = m;
		_tmp42_ = vala_symbol_get_name ((ValaSymbol*) _tmp41_);
		_tmp43_ = _tmp42_;
		if (g_strcmp0 (_tmp43_, ".new") != 0) {
			ValaMethod* _tmp44_;
			const gchar* _tmp45_;
			const gchar* _tmp46_;
			vala_code_writer_write_string (self, ".");
			_tmp44_ = m;
			_tmp45_ = vala_symbol_get_name ((ValaSymbol*) _tmp44_);
			_tmp46_ = _tmp45_;
			vala_code_writer_write_identifier (self, _tmp46_);
		}
		vala_code_writer_write_string (self, " ");
		_vala_code_node_unref0 (datatype);
	} else {
		ValaMethod* _tmp47_;
		ValaMemberBinding _tmp48_;
		ValaMemberBinding _tmp49_;
		ValaMethod* _tmp62_;
		gboolean _tmp63_;
		gboolean _tmp64_;
		ValaMethod* _tmp65_;
		gboolean _tmp66_;
		gboolean _tmp67_;
		ValaMethod* _tmp68_;
		ValaDataType* _tmp69_;
		ValaDataType* _tmp70_;
		ValaMethod* _tmp71_;
		const gchar* _tmp72_;
		const gchar* _tmp73_;
		ValaMethod* _tmp74_;
		ValaList* _tmp75_;
		ValaList* _tmp76_;
		_tmp47_ = m;
		_tmp48_ = vala_method_get_binding (_tmp47_);
		_tmp49_ = _tmp48_;
		if (_tmp49_ == VALA_MEMBER_BINDING_STATIC) {
			vala_code_writer_write_string (self, "static ");
		} else {
			ValaMethod* _tmp50_;
			ValaMemberBinding _tmp51_;
			ValaMemberBinding _tmp52_;
			_tmp50_ = m;
			_tmp51_ = vala_method_get_binding (_tmp50_);
			_tmp52_ = _tmp51_;
			if (_tmp52_ == VALA_MEMBER_BINDING_CLASS) {
				vala_code_writer_write_string (self, "class ");
			} else {
				ValaMethod* _tmp53_;
				gboolean _tmp54_;
				gboolean _tmp55_;
				_tmp53_ = m;
				_tmp54_ = vala_method_get_is_abstract (_tmp53_);
				_tmp55_ = _tmp54_;
				if (_tmp55_) {
					vala_code_writer_write_string (self, "abstract ");
				} else {
					ValaMethod* _tmp56_;
					gboolean _tmp57_;
					gboolean _tmp58_;
					_tmp56_ = m;
					_tmp57_ = vala_method_get_is_virtual (_tmp56_);
					_tmp58_ = _tmp57_;
					if (_tmp58_) {
						vala_code_writer_write_string (self, "virtual ");
					} else {
						ValaMethod* _tmp59_;
						gboolean _tmp60_;
						gboolean _tmp61_;
						_tmp59_ = m;
						_tmp60_ = vala_method_get_overrides (_tmp59_);
						_tmp61_ = _tmp60_;
						if (_tmp61_) {
							vala_code_writer_write_string (self, "override ");
						}
					}
				}
			}
		}
		_tmp62_ = m;
		_tmp63_ = vala_symbol_get_hides ((ValaSymbol*) _tmp62_);
		_tmp64_ = _tmp63_;
		if (_tmp64_) {
			vala_code_writer_write_string (self, "new ");
		}
		_tmp65_ = m;
		_tmp66_ = vala_method_get_coroutine (_tmp65_);
		_tmp67_ = _tmp66_;
		if (_tmp67_) {
			vala_code_writer_write_string (self, "async ");
		}
		_tmp68_ = m;
		_tmp69_ = vala_callable_get_return_type ((ValaCallable*) _tmp68_);
		_tmp70_ = _tmp69_;
		vala_code_writer_write_return_type (self, _tmp70_);
		vala_code_writer_write_string (self, " ");
		_tmp71_ = m;
		_tmp72_ = vala_symbol_get_name ((ValaSymbol*) _tmp71_);
		_tmp73_ = _tmp72_;
		vala_code_writer_write_identifier (self, _tmp73_);
		_tmp74_ = m;
		_tmp75_ = vala_method_get_type_parameters (_tmp74_);
		_tmp76_ = _tmp75_;
		vala_code_writer_write_type_parameters (self, _tmp76_);
		_vala_iterable_unref0 (_tmp76_);
		vala_code_writer_write_string (self, " ");
	}
	_tmp77_ = m;
	_tmp78_ = vala_callable_get_parameters ((ValaCallable*) _tmp77_);
	_tmp79_ = _tmp78_;
	vala_code_writer_write_params (self, _tmp79_);
	_vala_iterable_unref0 (_tmp79_);
	_tmp80_ = m;
	_tmp81_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp80_);
	_tmp82_ = _tmp81_;
	vala_code_writer_write_error_domains (self, _tmp82_);
	_vala_iterable_unref0 (_tmp82_);
	_tmp83_ = m;
	_tmp84_ = vala_subroutine_get_body ((ValaSubroutine*) _tmp83_);
	_tmp85_ = _tmp84_;
	vala_code_writer_write_code_block (self, _tmp85_);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_creation_method (ValaCodeVisitor* base, ValaCreationMethod* m) {
	ValaCodeWriter * self;
	ValaCreationMethod* _tmp0_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (m != NULL);
	_tmp0_ = m;
	vala_code_visitor_visit_method ((ValaCodeVisitor*) self, (ValaMethod*) _tmp0_);
}


static void vala_code_writer_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop) {
	ValaCodeWriter * self;
	gboolean _tmp0_ = FALSE;
	ValaProperty* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp14_ = FALSE;
	ValaCodeContext* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	ValaProperty* _tmp24_;
	ValaProperty* _tmp25_;
	ValaProperty* _tmp26_;
	ValaMemberBinding _tmp27_;
	ValaMemberBinding _tmp28_;
	ValaProperty* _tmp38_;
	ValaDataType* _tmp39_;
	ValaDataType* _tmp40_;
	ValaProperty* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	ValaProperty* _tmp44_;
	ValaPropertyAccessor* _tmp45_;
	ValaPropertyAccessor* _tmp46_;
	ValaProperty* _tmp64_;
	ValaPropertyAccessor* _tmp65_;
	ValaPropertyAccessor* _tmp66_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (prop != NULL);
	_tmp1_ = prop;
	_tmp2_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp1_);
	if (!_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		ValaProperty* _tmp5_;
		ValaProperty* _tmp6_;
		ValaProperty* _tmp7_;
		_tmp5_ = prop;
		_tmp6_ = vala_property_get_base_interface_property (_tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ != NULL) {
			ValaProperty* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_tmp8_ = prop;
			_tmp9_ = vala_property_get_is_abstract (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp4_ = !_tmp10_;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			ValaProperty* _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp11_ = prop;
			_tmp12_ = vala_property_get_is_virtual (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp3_ = !_tmp13_;
		} else {
			_tmp3_ = FALSE;
		}
		_tmp0_ = _tmp3_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp15_ = self->priv->context;
	_tmp16_ = vala_code_context_get_vapi_comments (_tmp15_);
	_tmp17_ = _tmp16_;
	if (_tmp17_) {
		ValaProperty* _tmp18_;
		ValaComment* _tmp19_;
		ValaComment* _tmp20_;
		_tmp18_ = prop;
		_tmp19_ = vala_symbol_get_comment ((ValaSymbol*) _tmp18_);
		_tmp20_ = _tmp19_;
		_tmp14_ = _tmp20_ != NULL;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		ValaProperty* _tmp21_;
		ValaComment* _tmp22_;
		ValaComment* _tmp23_;
		_tmp21_ = prop;
		_tmp22_ = vala_symbol_get_comment ((ValaSymbol*) _tmp21_);
		_tmp23_ = _tmp22_;
		vala_code_writer_write_comment (self, _tmp23_);
	}
	_tmp24_ = prop;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp24_);
	vala_code_writer_write_indent (self);
	_tmp25_ = prop;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp25_);
	_tmp26_ = prop;
	_tmp27_ = vala_property_get_binding (_tmp26_);
	_tmp28_ = _tmp27_;
	if (_tmp28_ == VALA_MEMBER_BINDING_STATIC) {
		vala_code_writer_write_string (self, "static ");
	} else {
		ValaProperty* _tmp29_;
		gboolean _tmp30_;
		gboolean _tmp31_;
		_tmp29_ = prop;
		_tmp30_ = vala_property_get_is_abstract (_tmp29_);
		_tmp31_ = _tmp30_;
		if (_tmp31_) {
			vala_code_writer_write_string (self, "abstract ");
		} else {
			ValaProperty* _tmp32_;
			gboolean _tmp33_;
			gboolean _tmp34_;
			_tmp32_ = prop;
			_tmp33_ = vala_property_get_is_virtual (_tmp32_);
			_tmp34_ = _tmp33_;
			if (_tmp34_) {
				vala_code_writer_write_string (self, "virtual ");
			} else {
				ValaProperty* _tmp35_;
				gboolean _tmp36_;
				gboolean _tmp37_;
				_tmp35_ = prop;
				_tmp36_ = vala_property_get_overrides (_tmp35_);
				_tmp37_ = _tmp36_;
				if (_tmp37_) {
					vala_code_writer_write_string (self, "override ");
				}
			}
		}
	}
	_tmp38_ = prop;
	_tmp39_ = vala_property_get_property_type (_tmp38_);
	_tmp40_ = _tmp39_;
	vala_code_writer_write_type (self, _tmp40_);
	vala_code_writer_write_string (self, " ");
	_tmp41_ = prop;
	_tmp42_ = vala_symbol_get_name ((ValaSymbol*) _tmp41_);
	_tmp43_ = _tmp42_;
	vala_code_writer_write_identifier (self, _tmp43_);
	vala_code_writer_write_string (self, " {");
	_tmp44_ = prop;
	_tmp45_ = vala_property_get_get_accessor (_tmp44_);
	_tmp46_ = _tmp45_;
	if (_tmp46_ != NULL) {
		ValaProperty* _tmp47_;
		ValaPropertyAccessor* _tmp48_;
		ValaPropertyAccessor* _tmp49_;
		ValaProperty* _tmp50_;
		ValaPropertyAccessor* _tmp51_;
		ValaPropertyAccessor* _tmp52_;
		ValaProperty* _tmp53_;
		ValaPropertyAccessor* _tmp54_;
		ValaPropertyAccessor* _tmp55_;
		ValaDataType* _tmp56_;
		ValaDataType* _tmp57_;
		gboolean _tmp58_;
		ValaProperty* _tmp59_;
		ValaPropertyAccessor* _tmp60_;
		ValaPropertyAccessor* _tmp61_;
		ValaBlock* _tmp62_;
		ValaBlock* _tmp63_;
		_tmp47_ = prop;
		_tmp48_ = vala_property_get_get_accessor (_tmp47_);
		_tmp49_ = _tmp48_;
		vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp49_);
		_tmp50_ = prop;
		_tmp51_ = vala_property_get_get_accessor (_tmp50_);
		_tmp52_ = _tmp51_;
		vala_code_writer_write_property_accessor_accessibility (self, (ValaSymbol*) _tmp52_);
		_tmp53_ = prop;
		_tmp54_ = vala_property_get_get_accessor (_tmp53_);
		_tmp55_ = _tmp54_;
		_tmp56_ = vala_property_accessor_get_value_type (_tmp55_);
		_tmp57_ = _tmp56_;
		_tmp58_ = vala_data_type_is_disposable (_tmp57_);
		if (_tmp58_) {
			vala_code_writer_write_string (self, " owned");
		}
		vala_code_writer_write_string (self, " get");
		_tmp59_ = prop;
		_tmp60_ = vala_property_get_get_accessor (_tmp59_);
		_tmp61_ = _tmp60_;
		_tmp62_ = vala_subroutine_get_body ((ValaSubroutine*) _tmp61_);
		_tmp63_ = _tmp62_;
		vala_code_writer_write_code_block (self, _tmp63_);
	}
	_tmp64_ = prop;
	_tmp65_ = vala_property_get_set_accessor (_tmp64_);
	_tmp66_ = _tmp65_;
	if (_tmp66_ != NULL) {
		ValaProperty* _tmp67_;
		ValaPropertyAccessor* _tmp68_;
		ValaPropertyAccessor* _tmp69_;
		ValaProperty* _tmp70_;
		ValaPropertyAccessor* _tmp71_;
		ValaPropertyAccessor* _tmp72_;
		ValaProperty* _tmp73_;
		ValaPropertyAccessor* _tmp74_;
		ValaPropertyAccessor* _tmp75_;
		ValaDataType* _tmp76_;
		ValaDataType* _tmp77_;
		gboolean _tmp78_;
		gboolean _tmp79_;
		ValaProperty* _tmp80_;
		ValaPropertyAccessor* _tmp81_;
		ValaPropertyAccessor* _tmp82_;
		gboolean _tmp83_;
		gboolean _tmp84_;
		ValaProperty* _tmp85_;
		ValaPropertyAccessor* _tmp86_;
		ValaPropertyAccessor* _tmp87_;
		gboolean _tmp88_;
		gboolean _tmp89_;
		ValaProperty* _tmp90_;
		ValaPropertyAccessor* _tmp91_;
		ValaPropertyAccessor* _tmp92_;
		ValaBlock* _tmp93_;
		ValaBlock* _tmp94_;
		_tmp67_ = prop;
		_tmp68_ = vala_property_get_set_accessor (_tmp67_);
		_tmp69_ = _tmp68_;
		vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp69_);
		_tmp70_ = prop;
		_tmp71_ = vala_property_get_set_accessor (_tmp70_);
		_tmp72_ = _tmp71_;
		vala_code_writer_write_property_accessor_accessibility (self, (ValaSymbol*) _tmp72_);
		_tmp73_ = prop;
		_tmp74_ = vala_property_get_set_accessor (_tmp73_);
		_tmp75_ = _tmp74_;
		_tmp76_ = vala_property_accessor_get_value_type (_tmp75_);
		_tmp77_ = _tmp76_;
		_tmp78_ = vala_data_type_get_value_owned (_tmp77_);
		_tmp79_ = _tmp78_;
		if (_tmp79_) {
			vala_code_writer_write_string (self, " owned");
		}
		_tmp80_ = prop;
		_tmp81_ = vala_property_get_set_accessor (_tmp80_);
		_tmp82_ = _tmp81_;
		_tmp83_ = vala_property_accessor_get_writable (_tmp82_);
		_tmp84_ = _tmp83_;
		if (_tmp84_) {
			vala_code_writer_write_string (self, " set");
		}
		_tmp85_ = prop;
		_tmp86_ = vala_property_get_set_accessor (_tmp85_);
		_tmp87_ = _tmp86_;
		_tmp88_ = vala_property_accessor_get_construction (_tmp87_);
		_tmp89_ = _tmp88_;
		if (_tmp89_) {
			vala_code_writer_write_string (self, " construct");
		}
		_tmp90_ = prop;
		_tmp91_ = vala_property_get_set_accessor (_tmp90_);
		_tmp92_ = _tmp91_;
		_tmp93_ = vala_subroutine_get_body ((ValaSubroutine*) _tmp92_);
		_tmp94_ = _tmp93_;
		vala_code_writer_write_code_block (self, _tmp94_);
	}
	vala_code_writer_write_string (self, " }");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_signal (ValaCodeVisitor* base, ValaSignal* sig) {
	ValaCodeWriter * self;
	ValaSignal* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_ = FALSE;
	ValaCodeContext* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	ValaSignal* _tmp12_;
	ValaSignal* _tmp13_;
	ValaSignal* _tmp14_;
	gboolean _tmp15_;
	gboolean _tmp16_;
	ValaSignal* _tmp17_;
	ValaDataType* _tmp18_;
	ValaDataType* _tmp19_;
	ValaSignal* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	ValaSignal* _tmp23_;
	ValaList* _tmp24_;
	ValaList* _tmp25_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (sig != NULL);
	_tmp0_ = sig;
	_tmp1_ = vala_code_writer_check_accessibility (self, (ValaSymbol*) _tmp0_);
	if (!_tmp1_) {
		return;
	}
	_tmp3_ = self->priv->context;
	_tmp4_ = vala_code_context_get_vapi_comments (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		ValaSignal* _tmp6_;
		ValaComment* _tmp7_;
		ValaComment* _tmp8_;
		_tmp6_ = sig;
		_tmp7_ = vala_symbol_get_comment ((ValaSymbol*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_ != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		ValaSignal* _tmp9_;
		ValaComment* _tmp10_;
		ValaComment* _tmp11_;
		_tmp9_ = sig;
		_tmp10_ = vala_symbol_get_comment ((ValaSymbol*) _tmp9_);
		_tmp11_ = _tmp10_;
		vala_code_writer_write_comment (self, _tmp11_);
	}
	_tmp12_ = sig;
	vala_code_writer_write_attributes (self, (ValaCodeNode*) _tmp12_);
	vala_code_writer_write_indent (self);
	_tmp13_ = sig;
	vala_code_writer_write_accessibility (self, (ValaSymbol*) _tmp13_);
	_tmp14_ = sig;
	_tmp15_ = vala_signal_get_is_virtual (_tmp14_);
	_tmp16_ = _tmp15_;
	if (_tmp16_) {
		vala_code_writer_write_string (self, "virtual ");
	}
	vala_code_writer_write_string (self, "signal ");
	_tmp17_ = sig;
	_tmp18_ = vala_callable_get_return_type ((ValaCallable*) _tmp17_);
	_tmp19_ = _tmp18_;
	vala_code_writer_write_return_type (self, _tmp19_);
	vala_code_writer_write_string (self, " ");
	_tmp20_ = sig;
	_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
	_tmp22_ = _tmp21_;
	vala_code_writer_write_identifier (self, _tmp22_);
	vala_code_writer_write_string (self, " ");
	_tmp23_ = sig;
	_tmp24_ = vala_callable_get_parameters ((ValaCallable*) _tmp23_);
	_tmp25_ = _tmp24_;
	vala_code_writer_write_params (self, _tmp25_);
	_vala_iterable_unref0 (_tmp25_);
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_block (ValaCodeVisitor* base, ValaBlock* b) {
	ValaCodeWriter * self;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (b != NULL);
	vala_code_writer_write_begin_block (self);
	{
		ValaList* _stmt_list = NULL;
		ValaBlock* _tmp0_;
		ValaList* _tmp1_;
		gint _stmt_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _stmt_index = 0;
		_tmp0_ = b;
		_tmp1_ = vala_block_get_statements (_tmp0_);
		_stmt_list = _tmp1_;
		_tmp2_ = _stmt_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_stmt_size = _tmp4_;
		_stmt_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaStatement* stmt = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaStatement* _tmp11_;
			_tmp5_ = _stmt_index;
			_stmt_index = _tmp5_ + 1;
			_tmp6_ = _stmt_index;
			_tmp7_ = _stmt_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _stmt_list;
			_tmp9_ = _stmt_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			stmt = (ValaStatement*) _tmp10_;
			_tmp11_ = stmt;
			vala_code_node_accept ((ValaCodeNode*) _tmp11_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (stmt);
		}
		_vala_iterable_unref0 (_stmt_list);
	}
	vala_code_writer_write_end_block (self);
}


static void vala_code_writer_real_visit_empty_statement (ValaCodeVisitor* base, ValaEmptyStatement* stmt) {
	ValaCodeWriter * self;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
}


static void vala_code_writer_real_visit_declaration_statement (ValaCodeVisitor* base, ValaDeclarationStatement* stmt) {
	ValaCodeWriter * self;
	ValaDeclarationStatement* _tmp0_;
	ValaSymbol* _tmp1_;
	ValaSymbol* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	_tmp0_ = stmt;
	_tmp1_ = vala_declaration_statement_get_declaration (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_local_variable (ValaCodeVisitor* base, ValaLocalVariable* local) {
	ValaCodeWriter * self;
	ValaLocalVariable* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	gboolean _tmp3_;
	ValaLocalVariable* _tmp4_;
	ValaDataType* _tmp5_;
	ValaDataType* _tmp6_;
	ValaLocalVariable* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	ValaLocalVariable* _tmp10_;
	ValaDataType* _tmp11_;
	ValaDataType* _tmp12_;
	ValaLocalVariable* _tmp13_;
	ValaExpression* _tmp14_;
	ValaExpression* _tmp15_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (local != NULL);
	_tmp0_ = local;
	_tmp1_ = vala_variable_get_variable_type ((ValaVariable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_data_type_is_weak (_tmp2_);
	if (_tmp3_) {
		vala_code_writer_write_string (self, "unowned ");
	}
	_tmp4_ = local;
	_tmp5_ = vala_variable_get_variable_type ((ValaVariable*) _tmp4_);
	_tmp6_ = _tmp5_;
	vala_code_writer_write_type (self, _tmp6_);
	vala_code_writer_write_string (self, " ");
	_tmp7_ = local;
	_tmp8_ = vala_symbol_get_name ((ValaSymbol*) _tmp7_);
	_tmp9_ = _tmp8_;
	vala_code_writer_write_identifier (self, _tmp9_);
	_tmp10_ = local;
	_tmp11_ = vala_variable_get_variable_type ((ValaVariable*) _tmp10_);
	_tmp12_ = _tmp11_;
	vala_code_writer_write_type_suffix (self, _tmp12_);
	_tmp13_ = local;
	_tmp14_ = vala_variable_get_initializer ((ValaVariable*) _tmp13_);
	_tmp15_ = _tmp14_;
	if (_tmp15_ != NULL) {
		ValaLocalVariable* _tmp16_;
		ValaExpression* _tmp17_;
		ValaExpression* _tmp18_;
		vala_code_writer_write_string (self, " = ");
		_tmp16_ = local;
		_tmp17_ = vala_variable_get_initializer ((ValaVariable*) _tmp16_);
		_tmp18_ = _tmp17_;
		vala_code_node_accept ((ValaCodeNode*) _tmp18_, (ValaCodeVisitor*) self);
	}
}


static void vala_code_writer_real_visit_initializer_list (ValaCodeVisitor* base, ValaInitializerList* list) {
	ValaCodeWriter * self;
	gboolean first = FALSE;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (list != NULL);
	vala_code_writer_write_string (self, "{");
	first = TRUE;
	{
		ValaList* _initializer_list = NULL;
		ValaInitializerList* _tmp0_;
		ValaList* _tmp1_;
		gint _initializer_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _initializer_index = 0;
		_tmp0_ = list;
		_tmp1_ = vala_initializer_list_get_initializers (_tmp0_);
		_initializer_list = _tmp1_;
		_tmp2_ = _initializer_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_initializer_size = _tmp4_;
		_initializer_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaExpression* initializer = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			gboolean _tmp11_;
			ValaExpression* _tmp12_;
			_tmp5_ = _initializer_index;
			_initializer_index = _tmp5_ + 1;
			_tmp6_ = _initializer_index;
			_tmp7_ = _initializer_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _initializer_list;
			_tmp9_ = _initializer_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			initializer = (ValaExpression*) _tmp10_;
			_tmp11_ = first;
			if (!_tmp11_) {
				vala_code_writer_write_string (self, ", ");
			} else {
				vala_code_writer_write_string (self, " ");
			}
			first = FALSE;
			_tmp12_ = initializer;
			vala_code_node_accept ((ValaCodeNode*) _tmp12_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (initializer);
		}
		_vala_iterable_unref0 (_initializer_list);
	}
	vala_code_writer_write_string (self, " }");
}


static void vala_code_writer_real_visit_expression_statement (ValaCodeVisitor* base, ValaExpressionStatement* stmt) {
	ValaCodeWriter * self;
	ValaExpressionStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	_tmp0_ = stmt;
	_tmp1_ = vala_expression_statement_get_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_if_statement (ValaCodeVisitor* base, ValaIfStatement* stmt) {
	ValaCodeWriter * self;
	ValaIfStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaIfStatement* _tmp3_;
	ValaBlock* _tmp4_;
	ValaBlock* _tmp5_;
	ValaIfStatement* _tmp6_;
	ValaBlock* _tmp7_;
	ValaBlock* _tmp8_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "if (");
	_tmp0_ = stmt;
	_tmp1_ = vala_if_statement_get_condition (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ")");
	_tmp3_ = stmt;
	_tmp4_ = vala_if_statement_get_true_statement (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	_tmp6_ = stmt;
	_tmp7_ = vala_if_statement_get_false_statement (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_ != NULL) {
		ValaIfStatement* _tmp9_;
		ValaBlock* _tmp10_;
		ValaBlock* _tmp11_;
		vala_code_writer_write_string (self, " else");
		_tmp9_ = stmt;
		_tmp10_ = vala_if_statement_get_false_statement (_tmp9_);
		_tmp11_ = _tmp10_;
		vala_code_node_accept ((ValaCodeNode*) _tmp11_, (ValaCodeVisitor*) self);
	}
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_switch_statement (ValaCodeVisitor* base, ValaSwitchStatement* stmt) {
	ValaCodeWriter * self;
	ValaSwitchStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "switch (");
	_tmp0_ = stmt;
	_tmp1_ = vala_switch_statement_get_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ") {");
	vala_code_writer_write_newline (self);
	{
		ValaList* _section_list = NULL;
		ValaSwitchStatement* _tmp3_;
		ValaList* _tmp4_;
		gint _section_size = 0;
		ValaList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _section_index = 0;
		_tmp3_ = stmt;
		_tmp4_ = vala_switch_statement_get_sections (_tmp3_);
		_section_list = _tmp4_;
		_tmp5_ = _section_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_section_size = _tmp7_;
		_section_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			ValaSwitchSection* section = NULL;
			ValaList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_;
			ValaSwitchSection* _tmp14_;
			_tmp8_ = _section_index;
			_section_index = _tmp8_ + 1;
			_tmp9_ = _section_index;
			_tmp10_ = _section_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _section_list;
			_tmp12_ = _section_index;
			_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
			section = (ValaSwitchSection*) _tmp13_;
			_tmp14_ = section;
			vala_code_node_accept ((ValaCodeNode*) _tmp14_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (section);
		}
		_vala_iterable_unref0 (_section_list);
	}
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "}");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_switch_section (ValaCodeVisitor* base, ValaSwitchSection* section) {
	ValaCodeWriter * self;
	ValaSwitchSection* _tmp12_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (section != NULL);
	{
		ValaList* _label_list = NULL;
		ValaSwitchSection* _tmp0_;
		ValaList* _tmp1_;
		gint _label_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _label_index = 0;
		_tmp0_ = section;
		_tmp1_ = vala_switch_section_get_labels (_tmp0_);
		_label_list = _tmp1_;
		_tmp2_ = _label_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_label_size = _tmp4_;
		_label_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaSwitchLabel* label = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaSwitchLabel* _tmp11_;
			_tmp5_ = _label_index;
			_label_index = _tmp5_ + 1;
			_tmp6_ = _label_index;
			_tmp7_ = _label_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _label_list;
			_tmp9_ = _label_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			label = (ValaSwitchLabel*) _tmp10_;
			_tmp11_ = label;
			vala_code_node_accept ((ValaCodeNode*) _tmp11_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (label);
		}
		_vala_iterable_unref0 (_label_list);
	}
	_tmp12_ = section;
	vala_code_visitor_visit_block ((ValaCodeVisitor*) self, (ValaBlock*) _tmp12_);
}


static void vala_code_writer_real_visit_switch_label (ValaCodeVisitor* base, ValaSwitchLabel* label) {
	ValaCodeWriter * self;
	ValaSwitchLabel* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (label != NULL);
	_tmp0_ = label;
	_tmp1_ = vala_switch_label_get_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		ValaSwitchLabel* _tmp3_;
		ValaExpression* _tmp4_;
		ValaExpression* _tmp5_;
		vala_code_writer_write_indent (self);
		vala_code_writer_write_string (self, "case ");
		_tmp3_ = label;
		_tmp4_ = vala_switch_label_get_expression (_tmp3_);
		_tmp5_ = _tmp4_;
		vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
		vala_code_writer_write_string (self, ":");
		vala_code_writer_write_newline (self);
	} else {
		vala_code_writer_write_indent (self);
		vala_code_writer_write_string (self, "default:");
		vala_code_writer_write_newline (self);
	}
}


static void vala_code_writer_real_visit_loop (ValaCodeVisitor* base, ValaLoop* stmt) {
	ValaCodeWriter * self;
	ValaLoop* _tmp0_;
	ValaBlock* _tmp1_;
	ValaBlock* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "loop");
	_tmp0_ = stmt;
	_tmp1_ = vala_loop_get_body (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_while_statement (ValaCodeVisitor* base, ValaWhileStatement* stmt) {
	ValaCodeWriter * self;
	ValaWhileStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaWhileStatement* _tmp3_;
	ValaBlock* _tmp4_;
	ValaBlock* _tmp5_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "while (");
	_tmp0_ = stmt;
	_tmp1_ = vala_while_statement_get_condition (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ")");
	_tmp3_ = stmt;
	_tmp4_ = vala_while_statement_get_body (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_do_statement (ValaCodeVisitor* base, ValaDoStatement* stmt) {
	ValaCodeWriter * self;
	ValaDoStatement* _tmp0_;
	ValaBlock* _tmp1_;
	ValaBlock* _tmp2_;
	ValaDoStatement* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "do");
	_tmp0_ = stmt;
	_tmp1_ = vala_do_statement_get_body (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, "while (");
	_tmp3_ = stmt;
	_tmp4_ = vala_do_statement_get_condition (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ");");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_for_statement (ValaCodeVisitor* base, ValaForStatement* stmt) {
	ValaCodeWriter * self;
	gboolean first = FALSE;
	ValaForStatement* _tmp13_;
	ValaExpression* _tmp14_;
	ValaExpression* _tmp15_;
	ValaForStatement* _tmp29_;
	ValaBlock* _tmp30_;
	ValaBlock* _tmp31_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "for (");
	first = TRUE;
	{
		ValaList* _initializer_list = NULL;
		ValaForStatement* _tmp0_;
		ValaList* _tmp1_;
		gint _initializer_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _initializer_index = 0;
		_tmp0_ = stmt;
		_tmp1_ = vala_for_statement_get_initializer (_tmp0_);
		_initializer_list = _tmp1_;
		_tmp2_ = _initializer_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_initializer_size = _tmp4_;
		_initializer_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaExpression* initializer = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			gboolean _tmp11_;
			ValaExpression* _tmp12_;
			_tmp5_ = _initializer_index;
			_initializer_index = _tmp5_ + 1;
			_tmp6_ = _initializer_index;
			_tmp7_ = _initializer_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _initializer_list;
			_tmp9_ = _initializer_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			initializer = (ValaExpression*) _tmp10_;
			_tmp11_ = first;
			if (!_tmp11_) {
				vala_code_writer_write_string (self, ", ");
			}
			first = FALSE;
			_tmp12_ = initializer;
			vala_code_node_accept ((ValaCodeNode*) _tmp12_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (initializer);
		}
		_vala_iterable_unref0 (_initializer_list);
	}
	vala_code_writer_write_string (self, "; ");
	_tmp13_ = stmt;
	_tmp14_ = vala_for_statement_get_condition (_tmp13_);
	_tmp15_ = _tmp14_;
	vala_code_node_accept ((ValaCodeNode*) _tmp15_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, "; ");
	first = TRUE;
	{
		ValaList* _iterator_list = NULL;
		ValaForStatement* _tmp16_;
		ValaList* _tmp17_;
		gint _iterator_size = 0;
		ValaList* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		gint _iterator_index = 0;
		_tmp16_ = stmt;
		_tmp17_ = vala_for_statement_get_iterator (_tmp16_);
		_iterator_list = _tmp17_;
		_tmp18_ = _iterator_list;
		_tmp19_ = vala_collection_get_size ((ValaCollection*) _tmp18_);
		_tmp20_ = _tmp19_;
		_iterator_size = _tmp20_;
		_iterator_index = -1;
		while (TRUE) {
			gint _tmp21_;
			gint _tmp22_;
			gint _tmp23_;
			ValaExpression* iterator = NULL;
			ValaList* _tmp24_;
			gint _tmp25_;
			gpointer _tmp26_;
			gboolean _tmp27_;
			ValaExpression* _tmp28_;
			_tmp21_ = _iterator_index;
			_iterator_index = _tmp21_ + 1;
			_tmp22_ = _iterator_index;
			_tmp23_ = _iterator_size;
			if (!(_tmp22_ < _tmp23_)) {
				break;
			}
			_tmp24_ = _iterator_list;
			_tmp25_ = _iterator_index;
			_tmp26_ = vala_list_get (_tmp24_, _tmp25_);
			iterator = (ValaExpression*) _tmp26_;
			_tmp27_ = first;
			if (!_tmp27_) {
				vala_code_writer_write_string (self, ", ");
			}
			first = FALSE;
			_tmp28_ = iterator;
			vala_code_node_accept ((ValaCodeNode*) _tmp28_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (iterator);
		}
		_vala_iterable_unref0 (_iterator_list);
	}
	vala_code_writer_write_string (self, ")");
	_tmp29_ = stmt;
	_tmp30_ = vala_for_statement_get_body (_tmp29_);
	_tmp31_ = _tmp30_;
	vala_code_node_accept ((ValaCodeNode*) _tmp31_, (ValaCodeVisitor*) self);
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_foreach_statement (ValaCodeVisitor* base, ValaForeachStatement* stmt) {
	ValaCodeWriter * self;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
}


static void vala_code_writer_real_visit_break_statement (ValaCodeVisitor* base, ValaBreakStatement* stmt) {
	ValaCodeWriter * self;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "break;");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_continue_statement (ValaCodeVisitor* base, ValaContinueStatement* stmt) {
	ValaCodeWriter * self;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "continue;");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_return_statement (ValaCodeVisitor* base, ValaReturnStatement* stmt) {
	ValaCodeWriter * self;
	ValaReturnStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "return");
	_tmp0_ = stmt;
	_tmp1_ = vala_return_statement_get_return_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		ValaReturnStatement* _tmp3_;
		ValaExpression* _tmp4_;
		ValaExpression* _tmp5_;
		vala_code_writer_write_string (self, " ");
		_tmp3_ = stmt;
		_tmp4_ = vala_return_statement_get_return_expression (_tmp3_);
		_tmp5_ = _tmp4_;
		vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	}
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_yield_statement (ValaCodeVisitor* base, ValaYieldStatement* y) {
	ValaCodeWriter * self;
	ValaYieldStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (y != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "yield");
	_tmp0_ = y;
	_tmp1_ = vala_yield_statement_get_yield_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		ValaYieldStatement* _tmp3_;
		ValaExpression* _tmp4_;
		ValaExpression* _tmp5_;
		vala_code_writer_write_string (self, " ");
		_tmp3_ = y;
		_tmp4_ = vala_yield_statement_get_yield_expression (_tmp3_);
		_tmp5_ = _tmp4_;
		vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	}
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_throw_statement (ValaCodeVisitor* base, ValaThrowStatement* stmt) {
	ValaCodeWriter * self;
	ValaThrowStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "throw");
	_tmp0_ = stmt;
	_tmp1_ = vala_throw_statement_get_error_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		ValaThrowStatement* _tmp3_;
		ValaExpression* _tmp4_;
		ValaExpression* _tmp5_;
		vala_code_writer_write_string (self, " ");
		_tmp3_ = stmt;
		_tmp4_ = vala_throw_statement_get_error_expression (_tmp3_);
		_tmp5_ = _tmp4_;
		vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	}
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_try_statement (ValaCodeVisitor* base, ValaTryStatement* stmt) {
	ValaCodeWriter * self;
	ValaTryStatement* _tmp0_;
	ValaBlock* _tmp1_;
	ValaBlock* _tmp2_;
	ValaTryStatement* _tmp15_;
	ValaBlock* _tmp16_;
	ValaBlock* _tmp17_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "try");
	_tmp0_ = stmt;
	_tmp1_ = vala_try_statement_get_body (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	{
		ValaList* _clause_list = NULL;
		ValaTryStatement* _tmp3_;
		ValaList* _tmp4_;
		gint _clause_size = 0;
		ValaList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _clause_index = 0;
		_tmp3_ = stmt;
		_tmp4_ = vala_try_statement_get_catch_clauses (_tmp3_);
		_clause_list = _tmp4_;
		_tmp5_ = _clause_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_clause_size = _tmp7_;
		_clause_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			ValaCatchClause* clause = NULL;
			ValaList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_;
			ValaCatchClause* _tmp14_;
			_tmp8_ = _clause_index;
			_clause_index = _tmp8_ + 1;
			_tmp9_ = _clause_index;
			_tmp10_ = _clause_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _clause_list;
			_tmp12_ = _clause_index;
			_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
			clause = (ValaCatchClause*) _tmp13_;
			_tmp14_ = clause;
			vala_code_node_accept ((ValaCodeNode*) _tmp14_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (clause);
		}
		_vala_iterable_unref0 (_clause_list);
	}
	_tmp15_ = stmt;
	_tmp16_ = vala_try_statement_get_finally_body (_tmp15_);
	_tmp17_ = _tmp16_;
	if (_tmp17_ != NULL) {
		ValaTryStatement* _tmp18_;
		ValaBlock* _tmp19_;
		ValaBlock* _tmp20_;
		vala_code_writer_write_string (self, " finally");
		_tmp18_ = stmt;
		_tmp19_ = vala_try_statement_get_finally_body (_tmp18_);
		_tmp20_ = _tmp19_;
		vala_code_node_accept ((ValaCodeNode*) _tmp20_, (ValaCodeVisitor*) self);
	}
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_catch_clause (ValaCodeVisitor* base, ValaCatchClause* clause) {
	ValaCodeWriter * self;
	gchar* _tmp0_ = NULL;
	ValaCatchClause* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	gchar* type_name = NULL;
	gchar* _tmp9_;
	const gchar* _tmp10_ = NULL;
	ValaCatchClause* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* var_name = NULL;
	gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	ValaCatchClause* _tmp21_;
	ValaBlock* _tmp22_;
	ValaBlock* _tmp23_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (clause != NULL);
	_tmp1_ = clause;
	_tmp2_ = vala_catch_clause_get_error_type (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == NULL) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("GLib.Error");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp4_;
	} else {
		ValaCatchClause* _tmp5_;
		ValaDataType* _tmp6_;
		ValaDataType* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = clause;
		_tmp6_ = vala_catch_clause_get_error_type (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = vala_code_node_to_string ((ValaCodeNode*) _tmp7_);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp8_;
	}
	_tmp9_ = g_strdup (_tmp0_);
	type_name = _tmp9_;
	_tmp11_ = clause;
	_tmp12_ = vala_catch_clause_get_variable_name (_tmp11_);
	_tmp13_ = _tmp12_;
	if (_tmp13_ == NULL) {
		_tmp10_ = "_";
	} else {
		ValaCatchClause* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		_tmp14_ = clause;
		_tmp15_ = vala_catch_clause_get_variable_name (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp10_ = _tmp16_;
	}
	_tmp17_ = g_strdup (_tmp10_);
	var_name = _tmp17_;
	_tmp18_ = type_name;
	_tmp19_ = g_strdup_printf (" catch (%s %s)", _tmp18_, var_name);
	_tmp20_ = _tmp19_;
	vala_code_writer_write_string (self, _tmp20_);
	_g_free0 (_tmp20_);
	_tmp21_ = clause;
	_tmp22_ = vala_catch_clause_get_body (_tmp21_);
	_tmp23_ = _tmp22_;
	vala_code_node_accept ((ValaCodeNode*) _tmp23_, (ValaCodeVisitor*) self);
	_g_free0 (var_name);
	_g_free0 (type_name);
	_g_free0 (_tmp0_);
}


static void vala_code_writer_real_visit_lock_statement (ValaCodeVisitor* base, ValaLockStatement* stmt) {
	ValaCodeWriter * self;
	ValaLockStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaLockStatement* _tmp3_;
	ValaBlock* _tmp4_;
	ValaBlock* _tmp5_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "lock (");
	_tmp0_ = stmt;
	_tmp1_ = vala_lock_statement_get_resource (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ")");
	_tmp3_ = stmt;
	_tmp4_ = vala_lock_statement_get_body (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == NULL) {
		vala_code_writer_write_string (self, ";");
	} else {
		ValaLockStatement* _tmp6_;
		ValaBlock* _tmp7_;
		ValaBlock* _tmp8_;
		_tmp6_ = stmt;
		_tmp7_ = vala_lock_statement_get_body (_tmp6_);
		_tmp8_ = _tmp7_;
		vala_code_node_accept ((ValaCodeNode*) _tmp8_, (ValaCodeVisitor*) self);
	}
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_delete_statement (ValaCodeVisitor* base, ValaDeleteStatement* stmt) {
	ValaCodeWriter * self;
	ValaDeleteStatement* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (stmt != NULL);
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "delete ");
	_tmp0_ = stmt;
	_tmp1_ = vala_delete_statement_get_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ";");
	vala_code_writer_write_newline (self);
}


static void vala_code_writer_real_visit_array_creation_expression (ValaCodeVisitor* base, ValaArrayCreationExpression* expr) {
	ValaCodeWriter * self;
	ValaArrayCreationExpression* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	gboolean first = FALSE;
	ValaArrayCreationExpression* _tmp16_;
	ValaInitializerList* _tmp17_;
	ValaInitializerList* _tmp18_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "new ");
	_tmp0_ = expr;
	_tmp1_ = vala_array_creation_expression_get_element_type (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_writer_write_type (self, _tmp2_);
	vala_code_writer_write_string (self, "[");
	first = TRUE;
	{
		ValaList* _size_list = NULL;
		ValaArrayCreationExpression* _tmp3_;
		ValaList* _tmp4_;
		gint _size_size = 0;
		ValaList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _size_index = 0;
		_tmp3_ = expr;
		_tmp4_ = vala_array_creation_expression_get_sizes (_tmp3_);
		_size_list = _tmp4_;
		_tmp5_ = _size_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_size_size = _tmp7_;
		_size_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			ValaExpression* size = NULL;
			ValaList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_;
			gboolean _tmp14_;
			ValaExpression* _tmp15_;
			_tmp8_ = _size_index;
			_size_index = _tmp8_ + 1;
			_tmp9_ = _size_index;
			_tmp10_ = _size_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _size_list;
			_tmp12_ = _size_index;
			_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
			size = (ValaExpression*) _tmp13_;
			_tmp14_ = first;
			if (!_tmp14_) {
				vala_code_writer_write_string (self, ", ");
			}
			first = FALSE;
			_tmp15_ = size;
			vala_code_node_accept ((ValaCodeNode*) _tmp15_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (size);
		}
		_vala_iterable_unref0 (_size_list);
	}
	vala_code_writer_write_string (self, "]");
	_tmp16_ = expr;
	_tmp17_ = vala_array_creation_expression_get_initializer_list (_tmp16_);
	_tmp18_ = _tmp17_;
	if (_tmp18_ != NULL) {
		ValaArrayCreationExpression* _tmp19_;
		ValaInitializerList* _tmp20_;
		ValaInitializerList* _tmp21_;
		vala_code_writer_write_string (self, " ");
		_tmp19_ = expr;
		_tmp20_ = vala_array_creation_expression_get_initializer_list (_tmp19_);
		_tmp21_ = _tmp20_;
		vala_code_node_accept ((ValaCodeNode*) _tmp21_, (ValaCodeVisitor*) self);
	}
}


static gchar* bool_to_string (gboolean self) {
	gchar* result = NULL;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}


static void vala_code_writer_real_visit_boolean_literal (ValaCodeVisitor* base, ValaBooleanLiteral* lit) {
	ValaCodeWriter * self;
	ValaBooleanLiteral* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (lit != NULL);
	_tmp0_ = lit;
	_tmp1_ = vala_boolean_literal_get_value (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = bool_to_string (_tmp2_);
	_tmp4_ = _tmp3_;
	vala_code_writer_write_string (self, _tmp4_);
	_g_free0 (_tmp4_);
}


static void vala_code_writer_real_visit_character_literal (ValaCodeVisitor* base, ValaCharacterLiteral* lit) {
	ValaCodeWriter * self;
	ValaCharacterLiteral* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (lit != NULL);
	_tmp0_ = lit;
	_tmp1_ = vala_character_literal_get_value (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_writer_write_string (self, _tmp2_);
}


static void vala_code_writer_real_visit_integer_literal (ValaCodeVisitor* base, ValaIntegerLiteral* lit) {
	ValaCodeWriter * self;
	ValaIntegerLiteral* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (lit != NULL);
	_tmp0_ = lit;
	_tmp1_ = vala_integer_literal_get_value (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_writer_write_string (self, _tmp2_);
}


static void vala_code_writer_real_visit_real_literal (ValaCodeVisitor* base, ValaRealLiteral* lit) {
	ValaCodeWriter * self;
	ValaRealLiteral* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (lit != NULL);
	_tmp0_ = lit;
	_tmp1_ = vala_real_literal_get_value (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_writer_write_string (self, _tmp2_);
}


static void vala_code_writer_real_visit_string_literal (ValaCodeVisitor* base, ValaStringLiteral* lit) {
	ValaCodeWriter * self;
	ValaStringLiteral* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (lit != NULL);
	_tmp0_ = lit;
	_tmp1_ = vala_string_literal_get_value (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_writer_write_string (self, _tmp2_);
}


static void vala_code_writer_real_visit_null_literal (ValaCodeVisitor* base, ValaNullLiteral* lit) {
	ValaCodeWriter * self;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (lit != NULL);
	vala_code_writer_write_string (self, "null");
}


static void vala_code_writer_real_visit_member_access (ValaCodeVisitor* base, ValaMemberAccess* expr) {
	ValaCodeWriter * self;
	ValaMemberAccess* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaMemberAccess* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_member_access_get_inner (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		ValaMemberAccess* _tmp3_;
		ValaExpression* _tmp4_;
		ValaExpression* _tmp5_;
		_tmp3_ = expr;
		_tmp4_ = vala_member_access_get_inner (_tmp3_);
		_tmp5_ = _tmp4_;
		vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
		vala_code_writer_write_string (self, ".");
	}
	_tmp6_ = expr;
	_tmp7_ = vala_member_access_get_member_name (_tmp6_);
	_tmp8_ = _tmp7_;
	vala_code_writer_write_identifier (self, _tmp8_);
}


static void vala_code_writer_real_visit_method_call (ValaCodeVisitor* base, ValaMethodCall* expr) {
	ValaCodeWriter * self;
	ValaMethodCall* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	gboolean first = FALSE;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_method_call_get_call (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, " (");
	first = TRUE;
	{
		ValaList* _arg_list = NULL;
		ValaMethodCall* _tmp3_;
		ValaList* _tmp4_;
		gint _arg_size = 0;
		ValaList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _arg_index = 0;
		_tmp3_ = expr;
		_tmp4_ = vala_method_call_get_argument_list (_tmp3_);
		_arg_list = _tmp4_;
		_tmp5_ = _arg_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_arg_size = _tmp7_;
		_arg_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			ValaExpression* arg = NULL;
			ValaList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_;
			gboolean _tmp14_;
			ValaExpression* _tmp15_;
			_tmp8_ = _arg_index;
			_arg_index = _tmp8_ + 1;
			_tmp9_ = _arg_index;
			_tmp10_ = _arg_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _arg_list;
			_tmp12_ = _arg_index;
			_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
			arg = (ValaExpression*) _tmp13_;
			_tmp14_ = first;
			if (!_tmp14_) {
				vala_code_writer_write_string (self, ", ");
			}
			first = FALSE;
			_tmp15_ = arg;
			vala_code_node_accept ((ValaCodeNode*) _tmp15_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (arg);
		}
		_vala_iterable_unref0 (_arg_list);
	}
	vala_code_writer_write_string (self, ")");
}


static void vala_code_writer_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr) {
	ValaCodeWriter * self;
	ValaElementAccess* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	gboolean first = FALSE;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_element_access_get_container (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, "[");
	first = TRUE;
	{
		ValaList* _index_list = NULL;
		ValaElementAccess* _tmp3_;
		ValaList* _tmp4_;
		gint _index_size = 0;
		ValaList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _index_index = 0;
		_tmp3_ = expr;
		_tmp4_ = vala_element_access_get_indices (_tmp3_);
		_index_list = _tmp4_;
		_tmp5_ = _index_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_index_size = _tmp7_;
		_index_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			ValaExpression* index = NULL;
			ValaList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_;
			gboolean _tmp14_;
			ValaExpression* _tmp15_;
			_tmp8_ = _index_index;
			_index_index = _tmp8_ + 1;
			_tmp9_ = _index_index;
			_tmp10_ = _index_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _index_list;
			_tmp12_ = _index_index;
			_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
			index = (ValaExpression*) _tmp13_;
			_tmp14_ = first;
			if (!_tmp14_) {
				vala_code_writer_write_string (self, ", ");
			}
			first = FALSE;
			_tmp15_ = index;
			vala_code_node_accept ((ValaCodeNode*) _tmp15_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (index);
		}
		_vala_iterable_unref0 (_index_list);
	}
	vala_code_writer_write_string (self, "]");
}


static void vala_code_writer_real_visit_slice_expression (ValaCodeVisitor* base, ValaSliceExpression* expr) {
	ValaCodeWriter * self;
	ValaSliceExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaSliceExpression* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaSliceExpression* _tmp6_;
	ValaExpression* _tmp7_;
	ValaExpression* _tmp8_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_slice_expression_get_container (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, "[");
	_tmp3_ = expr;
	_tmp4_ = vala_slice_expression_get_start (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ":");
	_tmp6_ = expr;
	_tmp7_ = vala_slice_expression_get_stop (_tmp6_);
	_tmp8_ = _tmp7_;
	vala_code_node_accept ((ValaCodeNode*) _tmp8_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, "]");
}


static void vala_code_writer_real_visit_base_access (ValaCodeVisitor* base, ValaBaseAccess* expr) {
	ValaCodeWriter * self;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "base");
}


static void vala_code_writer_real_visit_postfix_expression (ValaCodeVisitor* base, ValaPostfixExpression* expr) {
	ValaCodeWriter * self;
	ValaPostfixExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaPostfixExpression* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_postfix_expression_get_inner (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	_tmp3_ = expr;
	_tmp4_ = vala_postfix_expression_get_increment (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		vala_code_writer_write_string (self, "++");
	} else {
		vala_code_writer_write_string (self, "--");
	}
}


static void vala_code_writer_real_visit_object_creation_expression (ValaCodeVisitor* base, ValaObjectCreationExpression* expr) {
	ValaCodeWriter * self;
	ValaObjectCreationExpression* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaObjectCreationExpression* _tmp3_;
	ValaDataType* _tmp4_;
	ValaDataType* _tmp5_;
	ValaObjectCreationExpression* _tmp6_;
	ValaSymbol* _tmp7_;
	ValaSymbol* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gboolean first = FALSE;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_object_creation_expression_get_struct_creation (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		vala_code_writer_write_string (self, "new ");
	}
	_tmp3_ = expr;
	_tmp4_ = vala_object_creation_expression_get_type_reference (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_writer_write_type (self, _tmp5_);
	_tmp6_ = expr;
	_tmp7_ = vala_expression_get_symbol_reference ((ValaExpression*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_symbol_get_name (_tmp8_);
	_tmp10_ = _tmp9_;
	if (g_strcmp0 (_tmp10_, ".new") != 0) {
		ValaObjectCreationExpression* _tmp11_;
		ValaSymbol* _tmp12_;
		ValaSymbol* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		vala_code_writer_write_string (self, ".");
		_tmp11_ = expr;
		_tmp12_ = vala_expression_get_symbol_reference ((ValaExpression*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = vala_symbol_get_name (_tmp13_);
		_tmp15_ = _tmp14_;
		vala_code_writer_write_string (self, _tmp15_);
	}
	vala_code_writer_write_string (self, " (");
	first = TRUE;
	{
		ValaList* _arg_list = NULL;
		ValaObjectCreationExpression* _tmp16_;
		ValaList* _tmp17_;
		gint _arg_size = 0;
		ValaList* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		gint _arg_index = 0;
		_tmp16_ = expr;
		_tmp17_ = vala_object_creation_expression_get_argument_list (_tmp16_);
		_arg_list = _tmp17_;
		_tmp18_ = _arg_list;
		_tmp19_ = vala_collection_get_size ((ValaCollection*) _tmp18_);
		_tmp20_ = _tmp19_;
		_arg_size = _tmp20_;
		_arg_index = -1;
		while (TRUE) {
			gint _tmp21_;
			gint _tmp22_;
			gint _tmp23_;
			ValaExpression* arg = NULL;
			ValaList* _tmp24_;
			gint _tmp25_;
			gpointer _tmp26_;
			gboolean _tmp27_;
			ValaExpression* _tmp28_;
			_tmp21_ = _arg_index;
			_arg_index = _tmp21_ + 1;
			_tmp22_ = _arg_index;
			_tmp23_ = _arg_size;
			if (!(_tmp22_ < _tmp23_)) {
				break;
			}
			_tmp24_ = _arg_list;
			_tmp25_ = _arg_index;
			_tmp26_ = vala_list_get (_tmp24_, _tmp25_);
			arg = (ValaExpression*) _tmp26_;
			_tmp27_ = first;
			if (!_tmp27_) {
				vala_code_writer_write_string (self, ", ");
			}
			first = FALSE;
			_tmp28_ = arg;
			vala_code_node_accept ((ValaCodeNode*) _tmp28_, (ValaCodeVisitor*) self);
			_vala_code_node_unref0 (arg);
		}
		_vala_iterable_unref0 (_arg_list);
	}
	vala_code_writer_write_string (self, ")");
}


static void vala_code_writer_real_visit_sizeof_expression (ValaCodeVisitor* base, ValaSizeofExpression* expr) {
	ValaCodeWriter * self;
	ValaSizeofExpression* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "sizeof (");
	_tmp0_ = expr;
	_tmp1_ = vala_sizeof_expression_get_type_reference (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_writer_write_type (self, _tmp2_);
	vala_code_writer_write_string (self, ")");
}


static void vala_code_writer_real_visit_typeof_expression (ValaCodeVisitor* base, ValaTypeofExpression* expr) {
	ValaCodeWriter * self;
	ValaTypeofExpression* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "typeof (");
	_tmp0_ = expr;
	_tmp1_ = vala_typeof_expression_get_type_reference (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_writer_write_type (self, _tmp2_);
	vala_code_writer_write_string (self, ")");
}


static void vala_code_writer_real_visit_unary_expression (ValaCodeVisitor* base, ValaUnaryExpression* expr) {
	ValaCodeWriter * self;
	ValaUnaryExpression* _tmp0_;
	ValaUnaryOperator _tmp1_;
	ValaUnaryOperator _tmp2_;
	ValaUnaryExpression* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_unary_expression_get_operator (_tmp0_);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case VALA_UNARY_OPERATOR_PLUS:
		{
			vala_code_writer_write_string (self, "+");
			break;
		}
		case VALA_UNARY_OPERATOR_MINUS:
		{
			vala_code_writer_write_string (self, "-");
			break;
		}
		case VALA_UNARY_OPERATOR_LOGICAL_NEGATION:
		{
			vala_code_writer_write_string (self, "!");
			break;
		}
		case VALA_UNARY_OPERATOR_BITWISE_COMPLEMENT:
		{
			vala_code_writer_write_string (self, "~");
			break;
		}
		case VALA_UNARY_OPERATOR_INCREMENT:
		{
			vala_code_writer_write_string (self, "++");
			break;
		}
		case VALA_UNARY_OPERATOR_DECREMENT:
		{
			vala_code_writer_write_string (self, "--");
			break;
		}
		case VALA_UNARY_OPERATOR_REF:
		{
			vala_code_writer_write_string (self, "ref ");
			break;
		}
		case VALA_UNARY_OPERATOR_OUT:
		{
			vala_code_writer_write_string (self, "out ");
			break;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
	_tmp3_ = expr;
	_tmp4_ = vala_unary_expression_get_inner (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_real_visit_cast_expression (ValaCodeVisitor* base, ValaCastExpression* expr) {
	ValaCodeWriter * self;
	ValaCastExpression* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ValaCastExpression* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ValaCastExpression* _tmp12_;
	ValaExpression* _tmp13_;
	ValaExpression* _tmp14_;
	ValaCastExpression* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_cast_expression_get_is_non_null_cast (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		ValaCastExpression* _tmp3_;
		ValaExpression* _tmp4_;
		ValaExpression* _tmp5_;
		vala_code_writer_write_string (self, "(!) ");
		_tmp3_ = expr;
		_tmp4_ = vala_cast_expression_get_inner (_tmp3_);
		_tmp5_ = _tmp4_;
		vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
		return;
	}
	_tmp6_ = expr;
	_tmp7_ = vala_cast_expression_get_is_silent_cast (_tmp6_);
	_tmp8_ = _tmp7_;
	if (!_tmp8_) {
		ValaCastExpression* _tmp9_;
		ValaDataType* _tmp10_;
		ValaDataType* _tmp11_;
		vala_code_writer_write_string (self, "(");
		_tmp9_ = expr;
		_tmp10_ = vala_cast_expression_get_type_reference (_tmp9_);
		_tmp11_ = _tmp10_;
		vala_code_writer_write_type (self, _tmp11_);
		vala_code_writer_write_string (self, ") ");
	}
	_tmp12_ = expr;
	_tmp13_ = vala_cast_expression_get_inner (_tmp12_);
	_tmp14_ = _tmp13_;
	vala_code_node_accept ((ValaCodeNode*) _tmp14_, (ValaCodeVisitor*) self);
	_tmp15_ = expr;
	_tmp16_ = vala_cast_expression_get_is_silent_cast (_tmp15_);
	_tmp17_ = _tmp16_;
	if (_tmp17_) {
		ValaCastExpression* _tmp18_;
		ValaDataType* _tmp19_;
		ValaDataType* _tmp20_;
		vala_code_writer_write_string (self, " as ");
		_tmp18_ = expr;
		_tmp19_ = vala_cast_expression_get_type_reference (_tmp18_);
		_tmp20_ = _tmp19_;
		vala_code_writer_write_type (self, _tmp20_);
	}
}


static void vala_code_writer_real_visit_pointer_indirection (ValaCodeVisitor* base, ValaPointerIndirection* expr) {
	ValaCodeWriter * self;
	ValaPointerIndirection* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "*");
	_tmp0_ = expr;
	_tmp1_ = vala_pointer_indirection_get_inner (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_real_visit_addressof_expression (ValaCodeVisitor* base, ValaAddressofExpression* expr) {
	ValaCodeWriter * self;
	ValaAddressofExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "&");
	_tmp0_ = expr;
	_tmp1_ = vala_addressof_expression_get_inner (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_real_visit_reference_transfer_expression (ValaCodeVisitor* base, ValaReferenceTransferExpression* expr) {
	ValaCodeWriter * self;
	ValaReferenceTransferExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "(owned) ");
	_tmp0_ = expr;
	_tmp1_ = vala_reference_transfer_expression_get_inner (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_real_visit_binary_expression (ValaCodeVisitor* base, ValaBinaryExpression* expr) {
	ValaCodeWriter * self;
	ValaBinaryExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaBinaryExpression* _tmp3_;
	ValaBinaryOperator _tmp4_;
	ValaBinaryOperator _tmp5_;
	ValaBinaryExpression* _tmp6_;
	ValaExpression* _tmp7_;
	ValaExpression* _tmp8_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_binary_expression_get_left (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	_tmp3_ = expr;
	_tmp4_ = vala_binary_expression_get_operator (_tmp3_);
	_tmp5_ = _tmp4_;
	switch (_tmp5_) {
		case VALA_BINARY_OPERATOR_PLUS:
		{
			vala_code_writer_write_string (self, " + ");
			break;
		}
		case VALA_BINARY_OPERATOR_MINUS:
		{
			vala_code_writer_write_string (self, " - ");
			break;
		}
		case VALA_BINARY_OPERATOR_MUL:
		{
			vala_code_writer_write_string (self, " * ");
			break;
		}
		case VALA_BINARY_OPERATOR_DIV:
		{
			vala_code_writer_write_string (self, " / ");
			break;
		}
		case VALA_BINARY_OPERATOR_MOD:
		{
			vala_code_writer_write_string (self, " % ");
			break;
		}
		case VALA_BINARY_OPERATOR_SHIFT_LEFT:
		{
			vala_code_writer_write_string (self, " << ");
			break;
		}
		case VALA_BINARY_OPERATOR_SHIFT_RIGHT:
		{
			vala_code_writer_write_string (self, " >> ");
			break;
		}
		case VALA_BINARY_OPERATOR_LESS_THAN:
		{
			vala_code_writer_write_string (self, " < ");
			break;
		}
		case VALA_BINARY_OPERATOR_GREATER_THAN:
		{
			vala_code_writer_write_string (self, " > ");
			break;
		}
		case VALA_BINARY_OPERATOR_LESS_THAN_OR_EQUAL:
		{
			vala_code_writer_write_string (self, " <= ");
			break;
		}
		case VALA_BINARY_OPERATOR_GREATER_THAN_OR_EQUAL:
		{
			vala_code_writer_write_string (self, " >= ");
			break;
		}
		case VALA_BINARY_OPERATOR_EQUALITY:
		{
			vala_code_writer_write_string (self, " == ");
			break;
		}
		case VALA_BINARY_OPERATOR_INEQUALITY:
		{
			vala_code_writer_write_string (self, " != ");
			break;
		}
		case VALA_BINARY_OPERATOR_BITWISE_AND:
		{
			vala_code_writer_write_string (self, " & ");
			break;
		}
		case VALA_BINARY_OPERATOR_BITWISE_OR:
		{
			vala_code_writer_write_string (self, " | ");
			break;
		}
		case VALA_BINARY_OPERATOR_BITWISE_XOR:
		{
			vala_code_writer_write_string (self, " ^ ");
			break;
		}
		case VALA_BINARY_OPERATOR_AND:
		{
			vala_code_writer_write_string (self, " && ");
			break;
		}
		case VALA_BINARY_OPERATOR_OR:
		{
			vala_code_writer_write_string (self, " || ");
			break;
		}
		case VALA_BINARY_OPERATOR_IN:
		{
			vala_code_writer_write_string (self, " in ");
			break;
		}
		case VALA_BINARY_OPERATOR_COALESCE:
		{
			vala_code_writer_write_string (self, " ?? ");
			break;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
	_tmp6_ = expr;
	_tmp7_ = vala_binary_expression_get_right (_tmp6_);
	_tmp8_ = _tmp7_;
	vala_code_node_accept ((ValaCodeNode*) _tmp8_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_real_visit_type_check (ValaCodeVisitor* base, ValaTypeCheck* expr) {
	ValaCodeWriter * self;
	ValaTypeCheck* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaTypeCheck* _tmp3_;
	ValaDataType* _tmp4_;
	ValaDataType* _tmp5_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_typecheck_get_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, " is ");
	_tmp3_ = expr;
	_tmp4_ = vala_typecheck_get_type_reference (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_writer_write_type (self, _tmp5_);
}


static void vala_code_writer_real_visit_conditional_expression (ValaCodeVisitor* base, ValaConditionalExpression* expr) {
	ValaCodeWriter * self;
	ValaConditionalExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaConditionalExpression* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaConditionalExpression* _tmp6_;
	ValaExpression* _tmp7_;
	ValaExpression* _tmp8_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_conditional_expression_get_condition (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, "?");
	_tmp3_ = expr;
	_tmp4_ = vala_conditional_expression_get_true_expression (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, ":");
	_tmp6_ = expr;
	_tmp7_ = vala_conditional_expression_get_false_expression (_tmp6_);
	_tmp8_ = _tmp7_;
	vala_code_node_accept ((ValaCodeNode*) _tmp8_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_real_visit_lambda_expression (ValaCodeVisitor* base, ValaLambdaExpression* expr) {
	ValaCodeWriter * self;
	ValaList* params = NULL;
	ValaLambdaExpression* _tmp0_;
	ValaList* _tmp1_;
	gint i = 0;
	ValaLambdaExpression* _tmp24_;
	ValaBlock* _tmp25_;
	ValaBlock* _tmp26_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (expr != NULL);
	vala_code_writer_write_string (self, "(");
	_tmp0_ = expr;
	_tmp1_ = vala_lambda_expression_get_parameters (_tmp0_);
	params = _tmp1_;
	i = 1;
	{
		ValaList* _param_list = NULL;
		ValaList* _tmp2_;
		ValaList* _tmp3_;
		gint _param_size = 0;
		ValaList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _param_index = 0;
		_tmp2_ = params;
		_tmp3_ = _vala_iterable_ref0 (_tmp2_);
		_param_list = _tmp3_;
		_tmp4_ = _param_list;
		_tmp5_ = vala_collection_get_size ((ValaCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_param_size = _tmp6_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			gint _tmp9_;
			ValaParameter* param = NULL;
			ValaList* _tmp10_;
			gint _tmp11_;
			gpointer _tmp12_;
			gint _tmp13_;
			ValaParameter* _tmp14_;
			ValaParameterDirection _tmp15_;
			ValaParameterDirection _tmp16_;
			ValaParameter* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			gint _tmp23_;
			_tmp7_ = _param_index;
			_param_index = _tmp7_ + 1;
			_tmp8_ = _param_index;
			_tmp9_ = _param_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _param_list;
			_tmp11_ = _param_index;
			_tmp12_ = vala_list_get (_tmp10_, _tmp11_);
			param = (ValaParameter*) _tmp12_;
			_tmp13_ = i;
			if (_tmp13_ > 1) {
				vala_code_writer_write_string (self, ", ");
			}
			_tmp14_ = param;
			_tmp15_ = vala_parameter_get_direction (_tmp14_);
			_tmp16_ = _tmp15_;
			if (_tmp16_ == VALA_PARAMETER_DIRECTION_REF) {
				vala_code_writer_write_string (self, "ref ");
			} else {
				ValaParameter* _tmp17_;
				ValaParameterDirection _tmp18_;
				ValaParameterDirection _tmp19_;
				_tmp17_ = param;
				_tmp18_ = vala_parameter_get_direction (_tmp17_);
				_tmp19_ = _tmp18_;
				if (_tmp19_ == VALA_PARAMETER_DIRECTION_OUT) {
					vala_code_writer_write_string (self, "out ");
				}
			}
			_tmp20_ = param;
			_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
			_tmp22_ = _tmp21_;
			vala_code_writer_write_identifier (self, _tmp22_);
			_tmp23_ = i;
			i = _tmp23_ + 1;
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	vala_code_writer_write_string (self, ") =>");
	_tmp24_ = expr;
	_tmp25_ = vala_lambda_expression_get_statement_body (_tmp24_);
	_tmp26_ = _tmp25_;
	if (_tmp26_ != NULL) {
		ValaLambdaExpression* _tmp27_;
		ValaBlock* _tmp28_;
		ValaBlock* _tmp29_;
		_tmp27_ = expr;
		_tmp28_ = vala_lambda_expression_get_statement_body (_tmp27_);
		_tmp29_ = _tmp28_;
		vala_code_node_accept ((ValaCodeNode*) _tmp29_, (ValaCodeVisitor*) self);
	} else {
		ValaLambdaExpression* _tmp30_;
		ValaExpression* _tmp31_;
		ValaExpression* _tmp32_;
		_tmp30_ = expr;
		_tmp31_ = vala_lambda_expression_get_expression_body (_tmp30_);
		_tmp32_ = _tmp31_;
		if (_tmp32_ != NULL) {
			ValaLambdaExpression* _tmp33_;
			ValaExpression* _tmp34_;
			ValaExpression* _tmp35_;
			_tmp33_ = expr;
			_tmp34_ = vala_lambda_expression_get_expression_body (_tmp33_);
			_tmp35_ = _tmp34_;
			vala_code_node_accept ((ValaCodeNode*) _tmp35_, (ValaCodeVisitor*) self);
		}
	}
	_vala_iterable_unref0 (params);
}


static void vala_code_writer_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* a) {
	ValaCodeWriter * self;
	ValaAssignment* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaAssignment* _tmp3_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	self = (ValaCodeWriter*) base;
	g_return_if_fail (a != NULL);
	_tmp0_ = a;
	_tmp1_ = vala_assignment_get_left (_tmp0_);
	_tmp2_ = _tmp1_;
	vala_code_node_accept ((ValaCodeNode*) _tmp2_, (ValaCodeVisitor*) self);
	vala_code_writer_write_string (self, " = ");
	_tmp3_ = a;
	_tmp4_ = vala_assignment_get_right (_tmp3_);
	_tmp5_ = _tmp4_;
	vala_code_node_accept ((ValaCodeNode*) _tmp5_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_write_indent (ValaCodeWriter* self) {
	gboolean _tmp0_;
	FILE* _tmp2_;
	gint _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->bol;
	if (!_tmp0_) {
		FILE* _tmp1_;
		_tmp1_ = self->priv->stream;
		fputc ('\n', _tmp1_);
	}
	_tmp2_ = self->priv->stream;
	_tmp3_ = self->priv->indent;
	_tmp4_ = g_strnfill ((gsize) _tmp3_, '\t');
	_tmp5_ = _tmp4_;
	fputs (_tmp5_, _tmp2_);
	_g_free0 (_tmp5_);
	self->priv->bol = FALSE;
}


static void vala_code_writer_write_comment (ValaCodeWriter* self, ValaComment* comment) {
	gchar* replacement = NULL;
	gint _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* fixed_content = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (comment != NULL);
	{
		GRegex* _tmp0_;
		_tmp0_ = vala_code_writer_fix_indent_regex;
		if (_tmp0_ == NULL) {
			GRegex* _tmp1_ = NULL;
			GRegex* _tmp2_;
			GRegex* _tmp3_;
			_tmp2_ = g_regex_new ("\\n[\\t ]*", 0, 0, &_inner_error_);
			_tmp1_ = _tmp2_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				goto __catch2_g_error;
			}
			_tmp3_ = _tmp1_;
			_tmp1_ = NULL;
			_g_regex_unref0 (vala_code_writer_fix_indent_regex);
			vala_code_writer_fix_indent_regex = _tmp3_;
			_g_regex_unref0 (_tmp1_);
		}
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally2:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp4_ = self->priv->indent;
	_tmp5_ = g_strnfill ((gsize) _tmp4_, '\t');
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup_printf ("\n%s ", _tmp6_);
	_tmp8_ = _tmp7_;
	_g_free0 (_tmp6_);
	replacement = _tmp8_;
	{
		gchar* _tmp9_ = NULL;
		GRegex* _tmp10_;
		ValaComment* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		ValaComment* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		_tmp10_ = vala_code_writer_fix_indent_regex;
		_tmp11_ = comment;
		_tmp12_ = vala_comment_get_content (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = comment;
		_tmp15_ = vala_comment_get_content (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = strlen (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = g_regex_replace (_tmp10_, _tmp13_, (gssize) _tmp18_, 0, replacement, 0, &_inner_error_);
		_tmp9_ = _tmp19_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch3_g_error;
		}
		_tmp20_ = _tmp9_;
		_tmp9_ = NULL;
		_g_free0 (fixed_content);
		fixed_content = _tmp20_;
		_g_free0 (_tmp9_);
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally3:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_free0 (fixed_content);
		_g_free0 (replacement);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	vala_code_writer_write_indent (self);
	vala_code_writer_write_string (self, "/*");
	vala_code_writer_write_string (self, fixed_content);
	vala_code_writer_write_string (self, "*/");
	_g_free0 (fixed_content);
	_g_free0 (replacement);
}


static gunichar string_get_char (const gchar* self, glong index) {
	gunichar result = 0U;
	glong _tmp0_;
	gunichar _tmp1_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = index;
	_tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
	result = _tmp1_;
	return result;
}


static void vala_code_writer_write_identifier (ValaCodeWriter* self, const gchar* s) {
	gchar* id = NULL;
	const gchar* _tmp0_;
	gint id_length = 0;
	const gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gboolean _tmp4_ = FALSE;
	gchar* _tmp5_;
	gint _tmp6_;
	ValaTokenType _tmp7_;
	const gchar* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (s != NULL);
	_tmp0_ = s;
	id = (gchar*) _tmp0_;
	_tmp1_ = s;
	_tmp2_ = strlen (_tmp1_);
	_tmp3_ = _tmp2_;
	id_length = (gint) _tmp3_;
	_tmp5_ = id;
	_tmp6_ = id_length;
	_tmp7_ = vala_scanner_get_identifier_or_keyword (_tmp5_, _tmp6_);
	if (_tmp7_ != VALA_TOKEN_TYPE_IDENTIFIER) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp8_;
		gunichar _tmp9_;
		gboolean _tmp10_;
		_tmp8_ = s;
		_tmp9_ = string_get_char (_tmp8_, (glong) 0);
		_tmp10_ = g_unichar_isdigit (_tmp9_);
		_tmp4_ = _tmp10_;
	}
	if (_tmp4_) {
		FILE* _tmp11_;
		_tmp11_ = self->priv->stream;
		fputc ('@', _tmp11_);
	}
	_tmp12_ = s;
	vala_code_writer_write_string (self, _tmp12_);
}


static void vala_code_writer_write_return_type (ValaCodeWriter* self, ValaDataType* type) {
	ValaDataType* _tmp0_;
	gboolean _tmp1_;
	ValaDataType* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type != NULL);
	_tmp0_ = type;
	_tmp1_ = vala_data_type_is_weak (_tmp0_);
	if (_tmp1_) {
		vala_code_writer_write_string (self, "unowned ");
	}
	_tmp2_ = type;
	vala_code_writer_write_type (self, _tmp2_);
}


static void vala_code_writer_write_type (ValaCodeWriter* self, ValaDataType* type) {
	ValaDataType* _tmp0_;
	ValaScope* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type != NULL);
	_tmp0_ = type;
	_tmp1_ = self->priv->current_scope;
	_tmp2_ = vala_data_type_to_qualified_string (_tmp0_, _tmp1_);
	_tmp3_ = _tmp2_;
	vala_code_writer_write_string (self, _tmp3_);
	_g_free0 (_tmp3_);
}


static void vala_code_writer_write_type_suffix (ValaCodeWriter* self, ValaDataType* type) {
	ValaArrayType* array_type = NULL;
	ValaDataType* _tmp0_;
	ValaArrayType* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ValaArrayType* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type != NULL);
	_tmp0_ = type;
	_tmp1_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp0_) : NULL);
	array_type = _tmp1_;
	_tmp3_ = array_type;
	if (_tmp3_ != NULL) {
		ValaArrayType* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = array_type;
		_tmp5_ = vala_array_type_get_fixed_length (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp2_ = _tmp6_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		ValaArrayType* _tmp7_;
		ValaExpression* _tmp8_;
		ValaExpression* _tmp9_;
		vala_code_writer_write_string (self, "[");
		_tmp7_ = array_type;
		_tmp8_ = vala_array_type_get_length (_tmp7_);
		_tmp9_ = _tmp8_;
		vala_code_node_accept ((ValaCodeNode*) _tmp9_, (ValaCodeVisitor*) self);
		vala_code_writer_write_string (self, "]");
	}
	_vala_code_node_unref0 (array_type);
}


static void vala_code_writer_write_string (ValaCodeWriter* self, const gchar* s) {
	FILE* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (s != NULL);
	_tmp0_ = self->priv->stream;
	_tmp1_ = s;
	fputs (_tmp1_, _tmp0_);
	self->priv->bol = FALSE;
}


static void vala_code_writer_write_newline (ValaCodeWriter* self) {
	FILE* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stream;
	fputc ('\n', _tmp0_);
	self->priv->bol = TRUE;
}


static void vala_code_writer_write_code_block (ValaCodeWriter* self, ValaBlock* block) {
	gboolean _tmp0_ = FALSE;
	ValaBlock* _tmp1_;
	ValaBlock* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = block;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		ValaCodeWriterType _tmp2_;
		_tmp2_ = self->priv->type;
		_tmp0_ = _tmp2_ != VALA_CODE_WRITER_TYPE_DUMP;
	}
	if (_tmp0_) {
		vala_code_writer_write_string (self, ";");
		return;
	}
	_tmp3_ = block;
	vala_code_node_accept ((ValaCodeNode*) _tmp3_, (ValaCodeVisitor*) self);
}


static void vala_code_writer_write_begin_block (ValaCodeWriter* self) {
	gboolean _tmp0_;
	FILE* _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->bol;
	if (!_tmp0_) {
		FILE* _tmp1_;
		_tmp1_ = self->priv->stream;
		fputc (' ', _tmp1_);
	} else {
		vala_code_writer_write_indent (self);
	}
	_tmp2_ = self->priv->stream;
	fputc ('{', _tmp2_);
	vala_code_writer_write_newline (self);
	_tmp3_ = self->priv->indent;
	self->priv->indent = _tmp3_ + 1;
}


static void vala_code_writer_write_end_block (ValaCodeWriter* self) {
	gint _tmp0_;
	FILE* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->indent;
	self->priv->indent = _tmp0_ - 1;
	vala_code_writer_write_indent (self);
	_tmp1_ = self->priv->stream;
	fputc ('}', _tmp1_);
}


static gboolean vala_code_writer_check_accessibility (ValaCodeWriter* self, ValaSymbol* sym) {
	gboolean result = FALSE;
	ValaCodeWriterType _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (sym != NULL, FALSE);
	_tmp0_ = self->priv->type;
	switch (_tmp0_) {
		case VALA_CODE_WRITER_TYPE_EXTERNAL:
		{
			gboolean _tmp1_ = FALSE;
			ValaSymbol* _tmp2_;
			ValaSymbolAccessibility _tmp3_;
			ValaSymbolAccessibility _tmp4_;
			_tmp2_ = sym;
			_tmp3_ = vala_symbol_get_access (_tmp2_);
			_tmp4_ = _tmp3_;
			if (_tmp4_ == VALA_SYMBOL_ACCESSIBILITY_PUBLIC) {
				_tmp1_ = TRUE;
			} else {
				ValaSymbol* _tmp5_;
				ValaSymbolAccessibility _tmp6_;
				ValaSymbolAccessibility _tmp7_;
				_tmp5_ = sym;
				_tmp6_ = vala_symbol_get_access (_tmp5_);
				_tmp7_ = _tmp6_;
				_tmp1_ = _tmp7_ == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
			}
			result = _tmp1_;
			return result;
		}
		case VALA_CODE_WRITER_TYPE_INTERNAL:
		case VALA_CODE_WRITER_TYPE_FAST:
		{
			gboolean _tmp8_ = FALSE;
			gboolean _tmp9_ = FALSE;
			ValaSymbol* _tmp10_;
			ValaSymbolAccessibility _tmp11_;
			ValaSymbolAccessibility _tmp12_;
			_tmp10_ = sym;
			_tmp11_ = vala_symbol_get_access (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_ == VALA_SYMBOL_ACCESSIBILITY_INTERNAL) {
				_tmp9_ = TRUE;
			} else {
				ValaSymbol* _tmp13_;
				ValaSymbolAccessibility _tmp14_;
				ValaSymbolAccessibility _tmp15_;
				_tmp13_ = sym;
				_tmp14_ = vala_symbol_get_access (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp9_ = _tmp15_ == VALA_SYMBOL_ACCESSIBILITY_PUBLIC;
			}
			if (_tmp9_) {
				_tmp8_ = TRUE;
			} else {
				ValaSymbol* _tmp16_;
				ValaSymbolAccessibility _tmp17_;
				ValaSymbolAccessibility _tmp18_;
				_tmp16_ = sym;
				_tmp17_ = vala_symbol_get_access (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp8_ = _tmp18_ == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
			}
			result = _tmp8_;
			return result;
		}
		case VALA_CODE_WRITER_TYPE_DUMP:
		{
			result = TRUE;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


static gboolean vala_code_writer_skip_since_tag_check (ValaCodeWriter* self, ValaSymbol* sym, const gchar* since_val) {
	gboolean result = FALSE;
	ValaSymbol* parent_symbol = NULL;
	ValaSymbol* _tmp0_;
	ValaSymbol* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (sym != NULL, FALSE);
	g_return_val_if_fail (since_val != NULL, FALSE);
	_tmp0_ = sym;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	parent_symbol = _tmp1_;
	while (TRUE) {
		ValaSymbol* _tmp2_;
		ValaSymbol* _tmp3_;
		ValaSymbol* _tmp4_;
		ValaSymbol* _tmp5_;
		ValaSymbol* _tmp6_;
		ValaSymbol* _tmp7_;
		ValaSymbol* _tmp8_;
		ValaSymbol* _tmp9_;
		ValaVersionAttribute* _tmp10_;
		ValaVersionAttribute* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		const gchar* _tmp15_;
		gboolean _tmp16_;
		_tmp2_ = parent_symbol;
		_tmp3_ = vala_symbol_get_parent_symbol (_tmp2_);
		_tmp4_ = _tmp3_;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp5_ = parent_symbol;
		_tmp6_ = vala_symbol_get_parent_symbol (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _vala_code_node_ref0 (_tmp7_);
		_vala_code_node_unref0 (parent_symbol);
		parent_symbol = _tmp8_;
		_tmp9_ = parent_symbol;
		_tmp10_ = vala_symbol_get_version (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = vala_version_attribute_get_since (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = _tmp13_;
		_tmp15_ = since_val;
		_tmp16_ = g_strcmp0 (_tmp14_, _tmp15_) == 0;
		_g_free0 (_tmp14_);
		if (_tmp16_) {
			result = TRUE;
			_vala_code_node_unref0 (parent_symbol);
			return result;
		}
	}
	result = FALSE;
	_vala_code_node_unref0 (parent_symbol);
	return result;
}


static gint ____lambda4_ (ValaCodeWriter* self, ValaAttribute* a, ValaAttribute* b) {
	gint result = 0;
	GCompareFunc _tmp0_;
	ValaAttribute* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	ValaAttribute* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = g_strcmp0;
	_tmp1_ = a;
	_tmp2_ = vala_attribute_get_name (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = b;
	_tmp5_ = vala_attribute_get_name (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp0_ (_tmp3_, _tmp6_);
	result = _tmp7_;
	return result;
}


static gint _____lambda4__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = ____lambda4_ ((ValaCodeWriter*) self, (ValaAttribute*) a, (ValaAttribute*) b);
	return result;
}


static gint ___lambda5_ (ValaCodeWriter* self, ValaAttribute* a, ValaAttribute* b) {
	gint result = 0;
	GCompareFunc _tmp0_;
	ValaAttribute* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	ValaAttribute* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = g_strcmp0;
	_tmp1_ = a;
	_tmp2_ = vala_attribute_get_name (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = b;
	_tmp5_ = vala_attribute_get_name (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp0_ (_tmp3_, _tmp6_);
	result = _tmp7_;
	return result;
}


static gint ____lambda5__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = ___lambda5_ ((ValaCodeWriter*) self, (ValaAttribute*) a, (ValaAttribute*) b);
	return result;
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void vala_code_writer_write_attributes (ValaCodeWriter* self, ValaCodeNode* node) {
	ValaSymbol* sym = NULL;
	ValaCodeNode* _tmp0_;
	ValaSymbol* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	ValaCodeWriterType _tmp5_;
	gboolean need_cheaders = FALSE;
	GSequence* attributes = NULL;
	GSequence* _tmp11_;
	ValaCodeNode* _tmp12_;
	GList* _tmp13_;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp20_;
	GSequenceIter* iter = NULL;
	GSequence* _tmp27_;
	GSequenceIter* _tmp28_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = node;
	_tmp1_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALA_TYPE_SYMBOL) ? ((ValaSymbol*) _tmp0_) : NULL);
	sym = _tmp1_;
	_tmp5_ = self->priv->type;
	if (_tmp5_ != VALA_CODE_WRITER_TYPE_FAST) {
		ValaSymbol* _tmp6_;
		_tmp6_ = sym;
		_tmp4_ = _tmp6_ != NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaSymbol* _tmp7_;
		_tmp7_ = sym;
		_tmp3_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, VALA_TYPE_NAMESPACE);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaSymbol* _tmp8_;
		ValaSymbol* _tmp9_;
		ValaSymbol* _tmp10_;
		_tmp8_ = sym;
		_tmp9_ = vala_symbol_get_parent_symbol (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, VALA_TYPE_NAMESPACE);
	} else {
		_tmp2_ = FALSE;
	}
	need_cheaders = _tmp2_;
	_tmp11_ = g_sequence_new (_vala_code_node_unref0_);
	attributes = _tmp11_;
	_tmp12_ = node;
	_tmp13_ = _tmp12_->attributes;
	{
		GList* attr_collection = NULL;
		GList* attr_it = NULL;
		attr_collection = _tmp13_;
		for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
			ValaAttribute* _tmp14_;
			ValaAttribute* attr = NULL;
			_tmp14_ = _vala_code_node_ref0 ((ValaAttribute*) attr_it->data);
			attr = _tmp14_;
			{
				GSequence* _tmp15_;
				ValaAttribute* _tmp16_;
				ValaAttribute* _tmp17_;
				GSequenceIter* _tmp18_;
				_tmp15_ = attributes;
				_tmp16_ = attr;
				_tmp17_ = _vala_code_node_ref0 (_tmp16_);
				_tmp18_ = g_sequence_insert_sorted (_tmp15_, _tmp17_, _____lambda4__gcompare_data_func, self);
				_vala_code_node_unref0 (attr);
			}
		}
	}
	_tmp20_ = need_cheaders;
	if (_tmp20_) {
		ValaCodeNode* _tmp21_;
		ValaAttribute* _tmp22_;
		ValaAttribute* _tmp23_;
		_tmp21_ = node;
		_tmp22_ = vala_code_node_get_attribute (_tmp21_, "CCode");
		_tmp23_ = _tmp22_;
		_tmp19_ = _tmp23_ == NULL;
		_vala_code_node_unref0 (_tmp23_);
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		GSequence* _tmp24_;
		ValaAttribute* _tmp25_;
		GSequenceIter* _tmp26_;
		_tmp24_ = attributes;
		_tmp25_ = vala_attribute_new ("CCode", NULL);
		_tmp26_ = g_sequence_insert_sorted (_tmp24_, _tmp25_, ____lambda5__gcompare_data_func, self);
	}
	_tmp27_ = attributes;
	_tmp28_ = g_sequence_get_begin_iter (_tmp27_);
	iter = _tmp28_;
	while (TRUE) {
		GSequenceIter* _tmp29_;
		gboolean _tmp30_;
		ValaAttribute* attr = NULL;
		GSequenceIter* _tmp31_;
		gconstpointer _tmp32_;
		GSequenceIter* _tmp33_;
		GSequenceIter* _tmp34_;
		GSequence* keys = NULL;
		GSequence* _tmp35_;
		gboolean _tmp54_ = FALSE;
		gboolean _tmp55_ = FALSE;
		gboolean _tmp56_;
		gboolean _tmp66_ = FALSE;
		ValaAttribute* _tmp67_;
		const gchar* _tmp68_;
		const gchar* _tmp69_;
		gboolean _tmp72_ = FALSE;
		gboolean _tmp73_ = FALSE;
		ValaSymbol* _tmp74_;
		gboolean _tmp89_ = FALSE;
		ValaCodeNode* _tmp90_;
		FILE* _tmp92_;
		ValaAttribute* _tmp93_;
		const gchar* _tmp94_;
		const gchar* _tmp95_;
		GSequence* _tmp96_;
		gint _tmp97_;
		FILE* _tmp122_;
		gboolean _tmp123_ = FALSE;
		ValaCodeNode* _tmp124_;
		_tmp29_ = iter;
		_tmp30_ = g_sequence_iter_is_end (_tmp29_);
		if (!(!_tmp30_)) {
			break;
		}
		_tmp31_ = iter;
		_tmp32_ = g_sequence_get (_tmp31_);
		attr = (ValaAttribute*) _tmp32_;
		_tmp33_ = iter;
		_tmp34_ = g_sequence_iter_next (_tmp33_);
		iter = _tmp34_;
		_tmp35_ = g_sequence_new (_g_free0_);
		keys = _tmp35_;
		{
			ValaIterator* _key_it = NULL;
			ValaAttribute* _tmp36_;
			ValaMap* _tmp37_;
			ValaSet* _tmp38_;
			ValaSet* _tmp39_;
			ValaIterator* _tmp40_;
			ValaIterator* _tmp41_;
			_tmp36_ = attr;
			_tmp37_ = _tmp36_->args;
			_tmp38_ = vala_map_get_keys (_tmp37_);
			_tmp39_ = _tmp38_;
			_tmp40_ = vala_iterable_iterator ((ValaIterable*) _tmp39_);
			_tmp41_ = _tmp40_;
			_vala_iterable_unref0 (_tmp39_);
			_key_it = _tmp41_;
			while (TRUE) {
				ValaIterator* _tmp42_;
				gboolean _tmp43_;
				gchar* key = NULL;
				ValaIterator* _tmp44_;
				gpointer _tmp45_;
				gboolean _tmp46_ = FALSE;
				const gchar* _tmp47_;
				GSequence* _tmp49_;
				const gchar* _tmp50_;
				gchar* _tmp51_;
				GCompareFunc _tmp52_;
				GSequenceIter* _tmp53_;
				_tmp42_ = _key_it;
				_tmp43_ = vala_iterator_next (_tmp42_);
				if (!_tmp43_) {
					break;
				}
				_tmp44_ = _key_it;
				_tmp45_ = vala_iterator_get (_tmp44_);
				key = (gchar*) _tmp45_;
				_tmp47_ = key;
				if (g_strcmp0 (_tmp47_, "cheader_filename") == 0) {
					ValaSymbol* _tmp48_;
					_tmp48_ = sym;
					_tmp46_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp48_, VALA_TYPE_NAMESPACE);
				} else {
					_tmp46_ = FALSE;
				}
				if (_tmp46_) {
					_g_free0 (key);
					continue;
				}
				_tmp49_ = keys;
				_tmp50_ = key;
				_tmp51_ = g_strdup (_tmp50_);
				_tmp52_ = g_strcmp0;
				_tmp53_ = g_sequence_insert_sorted (_tmp49_, _tmp51_, (GCompareDataFunc) _tmp52_, NULL);
				_g_free0 (key);
			}
			_vala_iterator_unref0 (_key_it);
		}
		_tmp56_ = need_cheaders;
		if (_tmp56_) {
			ValaAttribute* _tmp57_;
			const gchar* _tmp58_;
			const gchar* _tmp59_;
			_tmp57_ = attr;
			_tmp58_ = vala_attribute_get_name (_tmp57_);
			_tmp59_ = _tmp58_;
			_tmp55_ = g_strcmp0 (_tmp59_, "CCode") == 0;
		} else {
			_tmp55_ = FALSE;
		}
		if (_tmp55_) {
			ValaAttribute* _tmp60_;
			gboolean _tmp61_;
			_tmp60_ = attr;
			_tmp61_ = vala_attribute_has_argument (_tmp60_, "cheader_filename");
			_tmp54_ = !_tmp61_;
		} else {
			_tmp54_ = FALSE;
		}
		if (_tmp54_) {
			GSequence* _tmp62_;
			gchar* _tmp63_;
			GCompareFunc _tmp64_;
			GSequenceIter* _tmp65_;
			_tmp62_ = keys;
			_tmp63_ = g_strdup ("cheader_filename");
			_tmp64_ = g_strcmp0;
			_tmp65_ = g_sequence_insert_sorted (_tmp62_, _tmp63_, (GCompareDataFunc) _tmp64_, NULL);
		}
		_tmp67_ = attr;
		_tmp68_ = vala_attribute_get_name (_tmp67_);
		_tmp69_ = _tmp68_;
		if (g_strcmp0 (_tmp69_, "CCode") == 0) {
			GSequence* _tmp70_;
			gint _tmp71_;
			_tmp70_ = keys;
			_tmp71_ = g_sequence_get_length (_tmp70_);
			_tmp66_ = _tmp71_ == 0;
		} else {
			_tmp66_ = FALSE;
		}
		if (_tmp66_) {
			_g_sequence_free0 (keys);
			continue;
		}
		_tmp74_ = sym;
		if (_tmp74_ != NULL) {
			ValaAttribute* _tmp75_;
			ValaMap* _tmp76_;
			gint _tmp77_;
			gint _tmp78_;
			_tmp75_ = attr;
			_tmp76_ = _tmp75_->args;
			_tmp77_ = vala_map_get_size (_tmp76_);
			_tmp78_ = _tmp77_;
			_tmp73_ = _tmp78_ == 1;
		} else {
			_tmp73_ = FALSE;
		}
		if (_tmp73_) {
			ValaAttribute* _tmp79_;
			const gchar* _tmp80_;
			const gchar* _tmp81_;
			_tmp79_ = attr;
			_tmp80_ = vala_attribute_get_name (_tmp79_);
			_tmp81_ = _tmp80_;
			_tmp72_ = g_strcmp0 (_tmp81_, "Version") == 0;
		} else {
			_tmp72_ = FALSE;
		}
		if (_tmp72_) {
			gchar* since_val = NULL;
			ValaAttribute* _tmp82_;
			gchar* _tmp83_;
			gboolean _tmp84_ = FALSE;
			const gchar* _tmp85_;
			_tmp82_ = attr;
			_tmp83_ = vala_attribute_get_string (_tmp82_, "since", NULL);
			since_val = _tmp83_;
			_tmp85_ = since_val;
			if (_tmp85_ != NULL) {
				ValaSymbol* _tmp86_;
				const gchar* _tmp87_;
				gboolean _tmp88_;
				_tmp86_ = sym;
				_tmp87_ = since_val;
				_tmp88_ = vala_code_writer_skip_since_tag_check (self, _tmp86_, _tmp87_);
				_tmp84_ = _tmp88_;
			} else {
				_tmp84_ = FALSE;
			}
			if (_tmp84_) {
				_g_free0 (since_val);
				_g_sequence_free0 (keys);
				continue;
			}
			_g_free0 (since_val);
		}
		_tmp90_ = node;
		if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp90_, VALA_TYPE_PARAMETER)) {
			ValaCodeNode* _tmp91_;
			_tmp91_ = node;
			_tmp89_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp91_, VALA_TYPE_PROPERTY_ACCESSOR);
		} else {
			_tmp89_ = FALSE;
		}
		if (_tmp89_) {
			vala_code_writer_write_indent (self);
		}
		_tmp92_ = self->priv->stream;
		_tmp93_ = attr;
		_tmp94_ = vala_attribute_get_name (_tmp93_);
		_tmp95_ = _tmp94_;
		fprintf (_tmp92_, "[%s", _tmp95_);
		_tmp96_ = keys;
		_tmp97_ = g_sequence_get_length (_tmp96_);
		if (_tmp97_ > 0) {
			FILE* _tmp98_;
			const gchar* separator = NULL;
			GSequenceIter* arg_iter = NULL;
			GSequence* _tmp99_;
			GSequenceIter* _tmp100_;
			FILE* _tmp121_;
			_tmp98_ = self->priv->stream;
			fputs (" (", _tmp98_);
			separator = "";
			_tmp99_ = keys;
			_tmp100_ = g_sequence_get_begin_iter (_tmp99_);
			arg_iter = _tmp100_;
			while (TRUE) {
				GSequenceIter* _tmp101_;
				gboolean _tmp102_;
				const gchar* arg_name = NULL;
				GSequenceIter* _tmp103_;
				gconstpointer _tmp104_;
				GSequenceIter* _tmp105_;
				GSequenceIter* _tmp106_;
				const gchar* _tmp107_;
				_tmp101_ = arg_iter;
				_tmp102_ = g_sequence_iter_is_end (_tmp101_);
				if (!(!_tmp102_)) {
					break;
				}
				_tmp103_ = arg_iter;
				_tmp104_ = g_sequence_get (_tmp103_);
				arg_name = (const gchar*) _tmp104_;
				_tmp105_ = arg_iter;
				_tmp106_ = g_sequence_iter_next (_tmp105_);
				arg_iter = _tmp106_;
				_tmp107_ = arg_name;
				if (g_strcmp0 (_tmp107_, "cheader_filename") == 0) {
					FILE* _tmp108_;
					const gchar* _tmp109_;
					ValaSymbol* _tmp110_;
					gchar* _tmp111_;
					gchar* _tmp112_;
					_tmp108_ = self->priv->stream;
					_tmp109_ = separator;
					_tmp110_ = sym;
					_tmp111_ = vala_code_writer_get_cheaders (self, _tmp110_);
					_tmp112_ = _tmp111_;
					fprintf (_tmp108_, "%scheader_filename = \"%s\"", _tmp109_, _tmp112_);
					_g_free0 (_tmp112_);
				} else {
					FILE* _tmp113_;
					const gchar* _tmp114_;
					const gchar* _tmp115_;
					ValaAttribute* _tmp116_;
					ValaMap* _tmp117_;
					const gchar* _tmp118_;
					gpointer _tmp119_;
					gchar* _tmp120_;
					_tmp113_ = self->priv->stream;
					_tmp114_ = separator;
					_tmp115_ = arg_name;
					_tmp116_ = attr;
					_tmp117_ = _tmp116_->args;
					_tmp118_ = arg_name;
					_tmp119_ = vala_map_get (_tmp117_, _tmp118_);
					_tmp120_ = (gchar*) _tmp119_;
					fprintf (_tmp113_, "%s%s = %s", _tmp114_, _tmp115_, _tmp120_);
					_g_free0 (_tmp120_);
				}
				separator = ", ";
			}
			_tmp121_ = self->priv->stream;
			fputs (")", _tmp121_);
		}
		_tmp122_ = self->priv->stream;
		fputs ("]", _tmp122_);
		_tmp124_ = node;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp124_, VALA_TYPE_PARAMETER)) {
			_tmp123_ = TRUE;
		} else {
			ValaCodeNode* _tmp125_;
			_tmp125_ = node;
			_tmp123_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp125_, VALA_TYPE_PROPERTY_ACCESSOR);
		}
		if (_tmp123_) {
			vala_code_writer_write_string (self, " ");
		} else {
			vala_code_writer_write_newline (self);
		}
		_g_sequence_free0 (keys);
	}
	_g_sequence_free0 (attributes);
	_vala_code_node_unref0 (sym);
}


static void vala_code_writer_write_accessibility (ValaCodeWriter* self, ValaSymbol* sym) {
	ValaSymbol* _tmp0_;
	ValaSymbolAccessibility _tmp1_;
	ValaSymbolAccessibility _tmp2_;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	ValaCodeWriterType _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sym != NULL);
	_tmp0_ = sym;
	_tmp1_ = vala_symbol_get_access (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == VALA_SYMBOL_ACCESSIBILITY_PUBLIC) {
		vala_code_writer_write_string (self, "public ");
	} else {
		ValaSymbol* _tmp3_;
		ValaSymbolAccessibility _tmp4_;
		ValaSymbolAccessibility _tmp5_;
		_tmp3_ = sym;
		_tmp4_ = vala_symbol_get_access (_tmp3_);
		_tmp5_ = _tmp4_;
		if (_tmp5_ == VALA_SYMBOL_ACCESSIBILITY_PROTECTED) {
			vala_code_writer_write_string (self, "protected ");
		} else {
			ValaSymbol* _tmp6_;
			ValaSymbolAccessibility _tmp7_;
			ValaSymbolAccessibility _tmp8_;
			_tmp6_ = sym;
			_tmp7_ = vala_symbol_get_access (_tmp6_);
			_tmp8_ = _tmp7_;
			if (_tmp8_ == VALA_SYMBOL_ACCESSIBILITY_INTERNAL) {
				vala_code_writer_write_string (self, "internal ");
			} else {
				ValaSymbol* _tmp9_;
				ValaSymbolAccessibility _tmp10_;
				ValaSymbolAccessibility _tmp11_;
				_tmp9_ = sym;
				_tmp10_ = vala_symbol_get_access (_tmp9_);
				_tmp11_ = _tmp10_;
				if (_tmp11_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
					vala_code_writer_write_string (self, "private ");
				}
			}
		}
	}
	_tmp14_ = self->priv->type;
	if (_tmp14_ != VALA_CODE_WRITER_TYPE_EXTERNAL) {
		ValaSymbol* _tmp15_;
		gboolean _tmp16_;
		gboolean _tmp17_;
		_tmp15_ = sym;
		_tmp16_ = vala_symbol_get_external (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp13_ = _tmp17_;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		ValaSymbol* _tmp18_;
		gboolean _tmp19_;
		gboolean _tmp20_;
		_tmp18_ = sym;
		_tmp19_ = vala_symbol_get_external_package (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp12_ = !_tmp20_;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		vala_code_writer_write_string (self, "extern ");
	}
}


static void vala_code_writer_write_property_accessor_accessibility (ValaCodeWriter* self, ValaSymbol* sym) {
	ValaSymbol* _tmp0_;
	ValaSymbolAccessibility _tmp1_;
	ValaSymbolAccessibility _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sym != NULL);
	_tmp0_ = sym;
	_tmp1_ = vala_symbol_get_access (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == VALA_SYMBOL_ACCESSIBILITY_PROTECTED) {
		vala_code_writer_write_string (self, " protected");
	} else {
		ValaSymbol* _tmp3_;
		ValaSymbolAccessibility _tmp4_;
		ValaSymbolAccessibility _tmp5_;
		_tmp3_ = sym;
		_tmp4_ = vala_symbol_get_access (_tmp3_);
		_tmp5_ = _tmp4_;
		if (_tmp5_ == VALA_SYMBOL_ACCESSIBILITY_INTERNAL) {
			vala_code_writer_write_string (self, " internal");
		} else {
			ValaSymbol* _tmp6_;
			ValaSymbolAccessibility _tmp7_;
			ValaSymbolAccessibility _tmp8_;
			_tmp6_ = sym;
			_tmp7_ = vala_symbol_get_access (_tmp6_);
			_tmp8_ = _tmp7_;
			if (_tmp8_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
				vala_code_writer_write_string (self, " private");
			}
		}
	}
}


static void vala_code_writer_write_type_parameters (ValaCodeWriter* self, ValaList* type_params) {
	ValaList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type_params != NULL);
	_tmp0_ = type_params;
	_tmp1_ = vala_collection_get_size ((ValaCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		gboolean first = FALSE;
		vala_code_writer_write_string (self, "<");
		first = TRUE;
		{
			ValaList* _type_param_list = NULL;
			ValaList* _tmp3_;
			ValaList* _tmp4_;
			gint _type_param_size = 0;
			ValaList* _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			gint _type_param_index = 0;
			_tmp3_ = type_params;
			_tmp4_ = _vala_iterable_ref0 (_tmp3_);
			_type_param_list = _tmp4_;
			_tmp5_ = _type_param_list;
			_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
			_tmp7_ = _tmp6_;
			_type_param_size = _tmp7_;
			_type_param_index = -1;
			while (TRUE) {
				gint _tmp8_;
				gint _tmp9_;
				gint _tmp10_;
				ValaTypeParameter* type_param = NULL;
				ValaList* _tmp11_;
				gint _tmp12_;
				gpointer _tmp13_;
				gboolean _tmp14_;
				ValaTypeParameter* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				_tmp8_ = _type_param_index;
				_type_param_index = _tmp8_ + 1;
				_tmp9_ = _type_param_index;
				_tmp10_ = _type_param_size;
				if (!(_tmp9_ < _tmp10_)) {
					break;
				}
				_tmp11_ = _type_param_list;
				_tmp12_ = _type_param_index;
				_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
				type_param = (ValaTypeParameter*) _tmp13_;
				_tmp14_ = first;
				if (_tmp14_) {
					first = FALSE;
				} else {
					vala_code_writer_write_string (self, ",");
				}
				_tmp15_ = type_param;
				_tmp16_ = vala_symbol_get_name ((ValaSymbol*) _tmp15_);
				_tmp17_ = _tmp16_;
				vala_code_writer_write_identifier (self, _tmp17_);
				_vala_code_node_unref0 (type_param);
			}
			_vala_iterable_unref0 (_type_param_list);
		}
		vala_code_writer_write_string (self, ">");
	}
}


static void vala_code_writer_class_init (ValaCodeWriterClass * klass) {
	vala_code_writer_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeVisitorClass *) klass)->finalize = vala_code_writer_finalize;
	g_type_class_add_private (klass, sizeof (ValaCodeWriterPrivate));
	((ValaCodeVisitorClass *) klass)->visit_using_directive = (void (*) (ValaCodeVisitor *, ValaUsingDirective*)) vala_code_writer_real_visit_using_directive;
	((ValaCodeVisitorClass *) klass)->visit_namespace = (void (*) (ValaCodeVisitor *, ValaNamespace*)) vala_code_writer_real_visit_namespace;
	((ValaCodeVisitorClass *) klass)->visit_class = (void (*) (ValaCodeVisitor *, ValaClass*)) vala_code_writer_real_visit_class;
	((ValaCodeVisitorClass *) klass)->visit_struct = (void (*) (ValaCodeVisitor *, ValaStruct*)) vala_code_writer_real_visit_struct;
	((ValaCodeVisitorClass *) klass)->visit_interface = (void (*) (ValaCodeVisitor *, ValaInterface*)) vala_code_writer_real_visit_interface;
	((ValaCodeVisitorClass *) klass)->visit_enum = (void (*) (ValaCodeVisitor *, ValaEnum*)) vala_code_writer_real_visit_enum;
	((ValaCodeVisitorClass *) klass)->visit_error_domain = (void (*) (ValaCodeVisitor *, ValaErrorDomain*)) vala_code_writer_real_visit_error_domain;
	((ValaCodeVisitorClass *) klass)->visit_constant = (void (*) (ValaCodeVisitor *, ValaConstant*)) vala_code_writer_real_visit_constant;
	((ValaCodeVisitorClass *) klass)->visit_field = (void (*) (ValaCodeVisitor *, ValaField*)) vala_code_writer_real_visit_field;
	((ValaCodeVisitorClass *) klass)->visit_delegate = (void (*) (ValaCodeVisitor *, ValaDelegate*)) vala_code_writer_real_visit_delegate;
	((ValaCodeVisitorClass *) klass)->visit_constructor = (void (*) (ValaCodeVisitor *, ValaConstructor*)) vala_code_writer_real_visit_constructor;
	((ValaCodeVisitorClass *) klass)->visit_method = (void (*) (ValaCodeVisitor *, ValaMethod*)) vala_code_writer_real_visit_method;
	((ValaCodeVisitorClass *) klass)->visit_creation_method = (void (*) (ValaCodeVisitor *, ValaCreationMethod*)) vala_code_writer_real_visit_creation_method;
	((ValaCodeVisitorClass *) klass)->visit_property = (void (*) (ValaCodeVisitor *, ValaProperty*)) vala_code_writer_real_visit_property;
	((ValaCodeVisitorClass *) klass)->visit_signal = (void (*) (ValaCodeVisitor *, ValaSignal*)) vala_code_writer_real_visit_signal;
	((ValaCodeVisitorClass *) klass)->visit_block = (void (*) (ValaCodeVisitor *, ValaBlock*)) vala_code_writer_real_visit_block;
	((ValaCodeVisitorClass *) klass)->visit_empty_statement = (void (*) (ValaCodeVisitor *, ValaEmptyStatement*)) vala_code_writer_real_visit_empty_statement;
	((ValaCodeVisitorClass *) klass)->visit_declaration_statement = (void (*) (ValaCodeVisitor *, ValaDeclarationStatement*)) vala_code_writer_real_visit_declaration_statement;
	((ValaCodeVisitorClass *) klass)->visit_local_variable = (void (*) (ValaCodeVisitor *, ValaLocalVariable*)) vala_code_writer_real_visit_local_variable;
	((ValaCodeVisitorClass *) klass)->visit_initializer_list = (void (*) (ValaCodeVisitor *, ValaInitializerList*)) vala_code_writer_real_visit_initializer_list;
	((ValaCodeVisitorClass *) klass)->visit_expression_statement = (void (*) (ValaCodeVisitor *, ValaExpressionStatement*)) vala_code_writer_real_visit_expression_statement;
	((ValaCodeVisitorClass *) klass)->visit_if_statement = (void (*) (ValaCodeVisitor *, ValaIfStatement*)) vala_code_writer_real_visit_if_statement;
	((ValaCodeVisitorClass *) klass)->visit_switch_statement = (void (*) (ValaCodeVisitor *, ValaSwitchStatement*)) vala_code_writer_real_visit_switch_statement;
	((ValaCodeVisitorClass *) klass)->visit_switch_section = (void (*) (ValaCodeVisitor *, ValaSwitchSection*)) vala_code_writer_real_visit_switch_section;
	((ValaCodeVisitorClass *) klass)->visit_switch_label = (void (*) (ValaCodeVisitor *, ValaSwitchLabel*)) vala_code_writer_real_visit_switch_label;
	((ValaCodeVisitorClass *) klass)->visit_loop = (void (*) (ValaCodeVisitor *, ValaLoop*)) vala_code_writer_real_visit_loop;
	((ValaCodeVisitorClass *) klass)->visit_while_statement = (void (*) (ValaCodeVisitor *, ValaWhileStatement*)) vala_code_writer_real_visit_while_statement;
	((ValaCodeVisitorClass *) klass)->visit_do_statement = (void (*) (ValaCodeVisitor *, ValaDoStatement*)) vala_code_writer_real_visit_do_statement;
	((ValaCodeVisitorClass *) klass)->visit_for_statement = (void (*) (ValaCodeVisitor *, ValaForStatement*)) vala_code_writer_real_visit_for_statement;
	((ValaCodeVisitorClass *) klass)->visit_foreach_statement = (void (*) (ValaCodeVisitor *, ValaForeachStatement*)) vala_code_writer_real_visit_foreach_statement;
	((ValaCodeVisitorClass *) klass)->visit_break_statement = (void (*) (ValaCodeVisitor *, ValaBreakStatement*)) vala_code_writer_real_visit_break_statement;
	((ValaCodeVisitorClass *) klass)->visit_continue_statement = (void (*) (ValaCodeVisitor *, ValaContinueStatement*)) vala_code_writer_real_visit_continue_statement;
	((ValaCodeVisitorClass *) klass)->visit_return_statement = (void (*) (ValaCodeVisitor *, ValaReturnStatement*)) vala_code_writer_real_visit_return_statement;
	((ValaCodeVisitorClass *) klass)->visit_yield_statement = (void (*) (ValaCodeVisitor *, ValaYieldStatement*)) vala_code_writer_real_visit_yield_statement;
	((ValaCodeVisitorClass *) klass)->visit_throw_statement = (void (*) (ValaCodeVisitor *, ValaThrowStatement*)) vala_code_writer_real_visit_throw_statement;
	((ValaCodeVisitorClass *) klass)->visit_try_statement = (void (*) (ValaCodeVisitor *, ValaTryStatement*)) vala_code_writer_real_visit_try_statement;
	((ValaCodeVisitorClass *) klass)->visit_catch_clause = (void (*) (ValaCodeVisitor *, ValaCatchClause*)) vala_code_writer_real_visit_catch_clause;
	((ValaCodeVisitorClass *) klass)->visit_lock_statement = (void (*) (ValaCodeVisitor *, ValaLockStatement*)) vala_code_writer_real_visit_lock_statement;
	((ValaCodeVisitorClass *) klass)->visit_delete_statement = (void (*) (ValaCodeVisitor *, ValaDeleteStatement*)) vala_code_writer_real_visit_delete_statement;
	((ValaCodeVisitorClass *) klass)->visit_array_creation_expression = (void (*) (ValaCodeVisitor *, ValaArrayCreationExpression*)) vala_code_writer_real_visit_array_creation_expression;
	((ValaCodeVisitorClass *) klass)->visit_boolean_literal = (void (*) (ValaCodeVisitor *, ValaBooleanLiteral*)) vala_code_writer_real_visit_boolean_literal;
	((ValaCodeVisitorClass *) klass)->visit_character_literal = (void (*) (ValaCodeVisitor *, ValaCharacterLiteral*)) vala_code_writer_real_visit_character_literal;
	((ValaCodeVisitorClass *) klass)->visit_integer_literal = (void (*) (ValaCodeVisitor *, ValaIntegerLiteral*)) vala_code_writer_real_visit_integer_literal;
	((ValaCodeVisitorClass *) klass)->visit_real_literal = (void (*) (ValaCodeVisitor *, ValaRealLiteral*)) vala_code_writer_real_visit_real_literal;
	((ValaCodeVisitorClass *) klass)->visit_string_literal = (void (*) (ValaCodeVisitor *, ValaStringLiteral*)) vala_code_writer_real_visit_string_literal;
	((ValaCodeVisitorClass *) klass)->visit_null_literal = (void (*) (ValaCodeVisitor *, ValaNullLiteral*)) vala_code_writer_real_visit_null_literal;
	((ValaCodeVisitorClass *) klass)->visit_member_access = (void (*) (ValaCodeVisitor *, ValaMemberAccess*)) vala_code_writer_real_visit_member_access;
	((ValaCodeVisitorClass *) klass)->visit_method_call = (void (*) (ValaCodeVisitor *, ValaMethodCall*)) vala_code_writer_real_visit_method_call;
	((ValaCodeVisitorClass *) klass)->visit_element_access = (void (*) (ValaCodeVisitor *, ValaElementAccess*)) vala_code_writer_real_visit_element_access;
	((ValaCodeVisitorClass *) klass)->visit_slice_expression = (void (*) (ValaCodeVisitor *, ValaSliceExpression*)) vala_code_writer_real_visit_slice_expression;
	((ValaCodeVisitorClass *) klass)->visit_base_access = (void (*) (ValaCodeVisitor *, ValaBaseAccess*)) vala_code_writer_real_visit_base_access;
	((ValaCodeVisitorClass *) klass)->visit_postfix_expression = (void (*) (ValaCodeVisitor *, ValaPostfixExpression*)) vala_code_writer_real_visit_postfix_expression;
	((ValaCodeVisitorClass *) klass)->visit_object_creation_expression = (void (*) (ValaCodeVisitor *, ValaObjectCreationExpression*)) vala_code_writer_real_visit_object_creation_expression;
	((ValaCodeVisitorClass *) klass)->visit_sizeof_expression = (void (*) (ValaCodeVisitor *, ValaSizeofExpression*)) vala_code_writer_real_visit_sizeof_expression;
	((ValaCodeVisitorClass *) klass)->visit_typeof_expression = (void (*) (ValaCodeVisitor *, ValaTypeofExpression*)) vala_code_writer_real_visit_typeof_expression;
	((ValaCodeVisitorClass *) klass)->visit_unary_expression = (void (*) (ValaCodeVisitor *, ValaUnaryExpression*)) vala_code_writer_real_visit_unary_expression;
	((ValaCodeVisitorClass *) klass)->visit_cast_expression = (void (*) (ValaCodeVisitor *, ValaCastExpression*)) vala_code_writer_real_visit_cast_expression;
	((ValaCodeVisitorClass *) klass)->visit_pointer_indirection = (void (*) (ValaCodeVisitor *, ValaPointerIndirection*)) vala_code_writer_real_visit_pointer_indirection;
	((ValaCodeVisitorClass *) klass)->visit_addressof_expression = (void (*) (ValaCodeVisitor *, ValaAddressofExpression*)) vala_code_writer_real_visit_addressof_expression;
	((ValaCodeVisitorClass *) klass)->visit_reference_transfer_expression = (void (*) (ValaCodeVisitor *, ValaReferenceTransferExpression*)) vala_code_writer_real_visit_reference_transfer_expression;
	((ValaCodeVisitorClass *) klass)->visit_binary_expression = (void (*) (ValaCodeVisitor *, ValaBinaryExpression*)) vala_code_writer_real_visit_binary_expression;
	((ValaCodeVisitorClass *) klass)->visit_type_check = (void (*) (ValaCodeVisitor *, ValaTypeCheck*)) vala_code_writer_real_visit_type_check;
	((ValaCodeVisitorClass *) klass)->visit_conditional_expression = (void (*) (ValaCodeVisitor *, ValaConditionalExpression*)) vala_code_writer_real_visit_conditional_expression;
	((ValaCodeVisitorClass *) klass)->visit_lambda_expression = (void (*) (ValaCodeVisitor *, ValaLambdaExpression*)) vala_code_writer_real_visit_lambda_expression;
	((ValaCodeVisitorClass *) klass)->visit_assignment = (void (*) (ValaCodeVisitor *, ValaAssignment*)) vala_code_writer_real_visit_assignment;
}


static void vala_code_writer_instance_init (ValaCodeWriter * self) {
	self->priv = VALA_CODE_WRITER_GET_PRIVATE (self);
	self->priv->bol = TRUE;
	self->priv->override_header = NULL;
	self->priv->header_to_override = NULL;
}


static void vala_code_writer_finalize (ValaCodeVisitor * obj) {
	ValaCodeWriter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_CODE_WRITER, ValaCodeWriter);
	_vala_code_context_unref0 (self->priv->context);
	_fclose0 (self->priv->stream);
	_vala_scope_unref0 (self->priv->current_scope);
	_g_free0 (self->priv->override_header);
	_g_free0 (self->priv->header_to_override);
	VALA_CODE_VISITOR_CLASS (vala_code_writer_parent_class)->finalize (obj);
}


/**
 * Code visitor generating Vala API file for the public interface.
 */
GType vala_code_writer_get_type (void) {
	static volatile gsize vala_code_writer_type_id__volatile = 0;
	if (g_once_init_enter (&vala_code_writer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaCodeWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_code_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCodeWriter), 0, (GInstanceInitFunc) vala_code_writer_instance_init, NULL };
		GType vala_code_writer_type_id;
		vala_code_writer_type_id = g_type_register_static (VALA_TYPE_CODE_VISITOR, "ValaCodeWriter", &g_define_type_info, 0);
		g_once_init_leave (&vala_code_writer_type_id__volatile, vala_code_writer_type_id);
	}
	return vala_code_writer_type_id__volatile;
}


GType vala_code_writer_type_get_type (void) {
	static volatile gsize vala_code_writer_type_type_id__volatile = 0;
	if (g_once_init_enter (&vala_code_writer_type_type_id__volatile)) {
		static const GEnumValue values[] = {{VALA_CODE_WRITER_TYPE_EXTERNAL, "VALA_CODE_WRITER_TYPE_EXTERNAL", "external"}, {VALA_CODE_WRITER_TYPE_INTERNAL, "VALA_CODE_WRITER_TYPE_INTERNAL", "internal"}, {VALA_CODE_WRITER_TYPE_FAST, "VALA_CODE_WRITER_TYPE_FAST", "fast"}, {VALA_CODE_WRITER_TYPE_DUMP, "VALA_CODE_WRITER_TYPE_DUMP", "dump"}, {0, NULL, NULL}};
		GType vala_code_writer_type_type_id;
		vala_code_writer_type_type_id = g_enum_register_static ("ValaCodeWriterType", values);
		g_once_init_leave (&vala_code_writer_type_type_id__volatile, vala_code_writer_type_type_id);
	}
	return vala_code_writer_type_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



