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

/* htmlrenderer.vala
 *
 * Copyright (C) 2008-2014 Florian Brosch, Didier Villevalois
 *
 * 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:
 * 	Didier 'Ptitjes Villevalois <ptitjes@free.fr>
 */

#include "valadoc.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>
#include <glib-object.h>

enum  {
	VALADOC_HTML_HTML_RENDERER_0_PROPERTY,
	VALADOC_HTML_HTML_RENDERER_NUM_PROPERTIES
};
static GParamSpec* valadoc_html_html_renderer_properties[VALADOC_HTML_HTML_RENDERER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef void (*ValadocHtmlHtmlRendererWrite) (gpointer user_data);
typedef void (*ValadocHtmlHtmlRendererTagletWrite) (ValadocContentTaglet* taglet, gpointer user_data);
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))

static gpointer valadoc_html_html_renderer_parent_class = NULL;

static void valadoc_html_html_renderer_real_render (ValadocContentContentRenderer* base,
                                             ValadocContentContentElement* element);
static void valadoc_html_html_renderer_real_render_children (ValadocContentContentRenderer* base,
                                                      ValadocContentContentElement* element);
static gchar* valadoc_html_html_renderer_get_url (ValadocHtmlHtmlRenderer* self,
                                           ValadocDocumentation* symbol);
static void valadoc_html_html_renderer_write_unresolved_symbol_link (ValadocHtmlHtmlRenderer* self,
                                                              const gchar* given_symbol_name,
                                                              ValadocContentInlineContent* label_owner);
static void valadoc_html_html_renderer_write_resolved_symbol_link (ValadocHtmlHtmlRenderer* self,
                                                            ValadocApiNode* symbol,
                                                            const gchar* given_symbol_name,
                                                            ValadocContentInlineContent* label_owner);
static void valadoc_html_html_renderer_write_taglets (ValadocHtmlHtmlRenderer* self,
                                               ValadocHtmlHtmlRendererWrite header,
                                               gpointer header_target,
                                               ValadocHtmlHtmlRendererWrite footer,
                                               gpointer footer_target,
                                               ValadocHtmlHtmlRendererWrite separator,
                                               gpointer separator_target,
                                               ValaList* taglets,
                                               ValadocHtmlHtmlRendererTagletWrite write,
                                               gpointer write_target);
static void valadoc_html_html_renderer_real_visit_comment (ValadocContentContentVisitor* base,
                                                    ValadocContentComment* element);
static void __lambda139_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda139__valadoc_html_html_renderer_write (gpointer self);
static void __lambda140_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda140__valadoc_html_html_renderer_write (gpointer self);
static void __lambda141_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda141__valadoc_html_html_renderer_write (gpointer self);
static void __lambda142_ (ValadocHtmlHtmlRenderer* self,
                   ValadocContentTaglet* taglet);
static void ___lambda142__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                            gpointer self);
static gint __lambda143_ (ValadocHtmlHtmlRenderer* self,
                   ValadocContentTaglet* _a,
                   ValadocContentTaglet* _b);
static gint ___lambda143__gcompare_data_func (gconstpointer a,
                                       gconstpointer b,
                                       gpointer self);
static void __lambda144_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda144__valadoc_html_html_renderer_write (gpointer self);
static void __lambda145_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda145__valadoc_html_html_renderer_write (gpointer self);
static void __lambda146_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda146__valadoc_html_html_renderer_write (gpointer self);
static void __lambda147_ (ValadocHtmlHtmlRenderer* self,
                   ValadocContentTaglet* taglet);
static void ___lambda147__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                            gpointer self);
static void __lambda148_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda148__valadoc_html_html_renderer_write (gpointer self);
static void __lambda149_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda149__valadoc_html_html_renderer_write (gpointer self);
static void __lambda150_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda150__valadoc_html_html_renderer_write (gpointer self);
static void __lambda151_ (ValadocHtmlHtmlRenderer* self,
                   ValadocContentTaglet* taglet);
static void ___lambda151__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                            gpointer self);
static void __lambda152_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda152__valadoc_html_html_renderer_write (gpointer self);
static void __lambda153_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda153__valadoc_html_html_renderer_write (gpointer self);
static void __lambda154_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda154__valadoc_html_html_renderer_write (gpointer self);
static void __lambda155_ (ValadocHtmlHtmlRenderer* self,
                   ValadocContentTaglet* taglet);
static void ___lambda155__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                            gpointer self);
static void __lambda156_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda156__valadoc_html_html_renderer_write (gpointer self);
static void __lambda157_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda157__valadoc_html_html_renderer_write (gpointer self);
static void __lambda158_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda158__valadoc_html_html_renderer_write (gpointer self);
static void __lambda159_ (ValadocHtmlHtmlRenderer* self,
                   ValadocContentTaglet* taglet);
static void ___lambda159__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                            gpointer self);
static void __lambda160_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda160__valadoc_html_html_renderer_write (gpointer self);
static void __lambda161_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda161__valadoc_html_html_renderer_write (gpointer self);
static void __lambda162_ (ValadocHtmlHtmlRenderer* self);
static void ___lambda162__valadoc_html_html_renderer_write (gpointer self);
static void __lambda163_ (ValadocHtmlHtmlRenderer* self,
                   ValadocContentTaglet* taglet);
static void ___lambda163__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                            gpointer self);
static void valadoc_html_html_renderer_real_visit_embedded (ValadocContentContentVisitor* base,
                                                     ValadocContentEmbedded* element);
static void valadoc_html_html_renderer_real_visit_headline (ValadocContentContentVisitor* base,
                                                     ValadocContentHeadline* element);
static void valadoc_html_html_renderer_real_visit_wiki_link (ValadocContentContentVisitor* base,
                                                      ValadocContentWikiLink* element);
static void valadoc_html_html_renderer_real_visit_link (ValadocContentContentVisitor* base,
                                                 ValadocContentLink* element);
static void valadoc_html_html_renderer_real_visit_symbol_link (ValadocContentContentVisitor* base,
                                                        ValadocContentSymbolLink* element);
static void valadoc_html_html_renderer_real_visit_list (ValadocContentContentVisitor* base,
                                                 ValadocContentList* element);
static void valadoc_html_html_renderer_real_visit_list_item (ValadocContentContentVisitor* base,
                                                      ValadocContentListItem* element);
static void valadoc_html_html_renderer_real_visit_page (ValadocContentContentVisitor* base,
                                                 ValadocContentPage* element);
static void valadoc_html_html_renderer_real_visit_paragraph (ValadocContentContentVisitor* base,
                                                      ValadocContentParagraph* element);
static void valadoc_html_html_renderer_visit_notification_block (ValadocHtmlHtmlRenderer* self,
                                                          ValadocContentBlockContent* element,
                                                          const gchar* headline);
static void valadoc_html_html_renderer_real_visit_warning (ValadocContentContentVisitor* base,
                                                    ValadocContentWarning* element);
static void valadoc_html_html_renderer_real_visit_note (ValadocContentContentVisitor* base,
                                                 ValadocContentNote* element);
static void valadoc_html_html_renderer_real_visit_run (ValadocContentContentVisitor* base,
                                                ValadocContentRun* element);
static void valadoc_html_html_renderer_real_visit_source_code (ValadocContentContentVisitor* base,
                                                        ValadocContentSourceCode* element);
static void valadoc_html_html_renderer_real_visit_table (ValadocContentContentVisitor* base,
                                                  ValadocContentTable* element);
static void valadoc_html_html_renderer_real_visit_table_cell (ValadocContentContentVisitor* base,
                                                       ValadocContentTableCell* element);
static void valadoc_html_html_renderer_real_visit_table_row (ValadocContentContentVisitor* base,
                                                      ValadocContentTableRow* element);
static void valadoc_html_html_renderer_real_visit_taglet (ValadocContentContentVisitor* base,
                                                   ValadocContentTaglet* element);
static void valadoc_html_html_renderer_real_visit_text (ValadocContentContentVisitor* base,
                                                 ValadocContentText* element);
static void valadoc_html_html_renderer_write_string (ValadocHtmlHtmlRenderer* self,
                                              const gchar* content);
static void valadoc_html_html_renderer_finalize (GObject * obj);
static GType valadoc_html_html_renderer_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

ValadocHtmlHtmlRenderer*
valadoc_html_html_renderer_construct (GType object_type,
                                      ValadocSettings* settings,
                                      ValadocHtmlLinkHelper* linker,
                                      ValadocHtmlCssClassResolver* cssresolver)
{
	ValadocHtmlHtmlRenderer * self = NULL;
	ValadocHtmlCssClassResolver* _tmp0_;
	ValadocSettings* _tmp1_;
	ValadocHtmlLinkHelper* _tmp2_;
	g_return_val_if_fail (settings != NULL, NULL);
	g_return_val_if_fail (linker != NULL, NULL);
	g_return_val_if_fail (cssresolver != NULL, NULL);
	self = (ValadocHtmlHtmlRenderer*) valadoc_content_content_renderer_construct (object_type);
	_tmp0_ = _g_object_ref0 (cssresolver);
	_g_object_unref0 (self->cssresolver);
	self->cssresolver = _tmp0_;
	_tmp1_ = _g_object_ref0 (settings);
	_g_object_unref0 (self->settings);
	self->settings = _tmp1_;
	_tmp2_ = _g_object_ref0 (linker);
	_g_object_unref0 (self->linker);
	self->linker = _tmp2_;
	return self;
}

ValadocHtmlHtmlRenderer*
valadoc_html_html_renderer_new (ValadocSettings* settings,
                                ValadocHtmlLinkHelper* linker,
                                ValadocHtmlCssClassResolver* cssresolver)
{
	return valadoc_html_html_renderer_construct (VALADOC_HTML_TYPE_HTML_RENDERER, settings, linker, cssresolver);
}

void
valadoc_html_html_renderer_set_container (ValadocHtmlHtmlRenderer* self,
                                          ValadocDocumentation* container)
{
	ValadocDocumentation* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (container);
	_g_object_unref0 (self->_container);
	self->_container = _tmp0_;
}

void
valadoc_html_html_renderer_set_owner (ValadocHtmlHtmlRenderer* self,
                                      ValadocDocumentation* owner)
{
	ValadocDocumentation* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (owner);
	_g_object_unref0 (self->_owner);
	self->_owner = _tmp0_;
}

void
valadoc_html_html_renderer_set_writer (ValadocHtmlHtmlRenderer* self,
                                       ValadocHtmlMarkupWriter* writer)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (writer != NULL);
	self->writer = writer;
}

static void
valadoc_html_html_renderer_real_render (ValadocContentContentRenderer* base,
                                        ValadocContentContentElement* element)
{
	ValadocHtmlHtmlRenderer * self;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	valadoc_content_content_element_accept (element, (ValadocContentContentVisitor*) self);
}

static void
valadoc_html_html_renderer_real_render_children (ValadocContentContentRenderer* base,
                                                 ValadocContentContentElement* element)
{
	ValadocHtmlHtmlRenderer * self;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	valadoc_content_content_element_accept_children (element, (ValadocContentContentVisitor*) self);
}

static gchar*
valadoc_html_html_renderer_get_url (ValadocHtmlHtmlRenderer* self,
                                    ValadocDocumentation* symbol)
{
	ValadocHtmlLinkHelper* _tmp0_;
	ValadocDocumentation* _tmp1_;
	ValadocSettings* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (symbol != NULL, NULL);
	_tmp0_ = self->linker;
	_tmp1_ = self->_container;
	_tmp2_ = self->settings;
	_tmp3_ = valadoc_html_link_helper_get_relative_link (_tmp0_, _tmp1_, symbol, _tmp2_);
	result = _tmp3_;
	return result;
}

static void
valadoc_html_html_renderer_write_unresolved_symbol_link (ValadocHtmlHtmlRenderer* self,
                                                         const gchar* given_symbol_name,
                                                         ValadocContentInlineContent* label_owner)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (given_symbol_name != NULL);
	if (label_owner == NULL) {
		_tmp0_ = TRUE;
	} else {
		ValaList* _tmp1_;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp1_ = valadoc_content_inline_content_get_content (label_owner);
		_tmp2_ = _tmp1_;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == 0;
	}
	if (_tmp0_) {
		ValadocHtmlMarkupWriter* _tmp5_;
		ValadocHtmlMarkupWriter* _tmp6_;
		ValadocHtmlMarkupWriter* _tmp7_;
		_tmp5_ = self->writer;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp5_, "code", NULL, (gint) 0);
		_tmp6_ = self->writer;
		valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp6_, given_symbol_name);
		_tmp7_ = self->writer;
		valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp7_, "code");
	} else {
		ValadocHtmlMarkupWriter* _tmp8_;
		ValadocHtmlMarkupWriter* _tmp9_;
		_tmp8_ = self->writer;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp8_, "i", NULL, (gint) 0);
		valadoc_content_content_element_accept_children ((ValadocContentContentElement*) label_owner, (ValadocContentContentVisitor*) self);
		_tmp9_ = self->writer;
		valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp9_, "i");
	}
}

static void
valadoc_html_html_renderer_write_resolved_symbol_link (ValadocHtmlHtmlRenderer* self,
                                                       ValadocApiNode* symbol,
                                                       const gchar* given_symbol_name,
                                                       ValadocContentInlineContent* label_owner)
{
	gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gchar* symbol_name = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	ValadocDocumentation* _tmp7_;
	gchar* href = NULL;
	gchar* _tmp10_;
	gchar* css_class = NULL;
	ValadocHtmlCssClassResolver* _tmp11_;
	gchar* _tmp12_;
	gchar* end_tag_name = NULL;
	const gchar* _tmp13_;
	gboolean _tmp31_ = FALSE;
	ValadocHtmlMarkupWriter* _tmp38_;
	const gchar* _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (symbol != NULL);
	if (given_symbol_name == NULL) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = g_strcmp0 (given_symbol_name, "") == 0;
	}
	if (_tmp1_) {
		gchar* _tmp2_;
		_tmp2_ = valadoc_api_node_get_full_name (symbol);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	} else {
		gchar* _tmp3_;
		_tmp3_ = g_strdup (given_symbol_name);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp3_;
	}
	_tmp4_ = g_strdup (_tmp0_);
	symbol_name = _tmp4_;
	_tmp7_ = self->_container;
	if (G_TYPE_CHECK_INSTANCE_CAST (symbol, VALADOC_TYPE_DOCUMENTATION, ValadocDocumentation) == _tmp7_) {
		_tmp6_ = TRUE;
	} else {
		ValadocDocumentation* _tmp8_;
		_tmp8_ = self->_owner;
		_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (symbol, VALADOC_TYPE_DOCUMENTATION, ValadocDocumentation) == _tmp8_;
	}
	if (_tmp6_) {
		_g_free0 (_tmp5_);
		_tmp5_ = NULL;
	} else {
		gchar* _tmp9_;
		_tmp9_ = valadoc_html_html_renderer_get_url (self, (ValadocDocumentation*) symbol);
		_g_free0 (_tmp5_);
		_tmp5_ = _tmp9_;
	}
	_tmp10_ = g_strdup (_tmp5_);
	href = _tmp10_;
	_tmp11_ = self->cssresolver;
	_tmp12_ = valadoc_html_css_class_resolver_resolve (_tmp11_, symbol);
	css_class = _tmp12_;
	_tmp13_ = href;
	if (_tmp13_ != NULL) {
		ValadocHtmlMarkupWriter* _tmp14_;
		gchar* _tmp15_;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		gchar** _tmp21_;
		gchar** _tmp22_;
		gint _tmp22__length1;
		gchar* _tmp23_;
		_tmp14_ = self->writer;
		_tmp15_ = g_strdup ("href");
		_tmp16_ = href;
		_tmp17_ = g_strdup (_tmp16_);
		_tmp18_ = g_strdup ("class");
		_tmp19_ = css_class;
		_tmp20_ = g_strdup (_tmp19_);
		_tmp21_ = g_new0 (gchar*, 4 + 1);
		_tmp21_[0] = _tmp15_;
		_tmp21_[1] = _tmp17_;
		_tmp21_[2] = _tmp18_;
		_tmp21_[3] = _tmp20_;
		_tmp22_ = _tmp21_;
		_tmp22__length1 = 4;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp14_, "a", _tmp22_, (gint) 4);
		_tmp22_ = (_vala_array_free (_tmp22_, _tmp22__length1, (GDestroyNotify) g_free), NULL);
		_tmp23_ = g_strdup ("a");
		_g_free0 (end_tag_name);
		end_tag_name = _tmp23_;
	} else {
		ValadocHtmlMarkupWriter* _tmp24_;
		gchar* _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		gchar** _tmp28_;
		gchar** _tmp29_;
		gint _tmp29__length1;
		gchar* _tmp30_;
		_tmp24_ = self->writer;
		_tmp25_ = g_strdup ("class");
		_tmp26_ = css_class;
		_tmp27_ = g_strdup (_tmp26_);
		_tmp28_ = g_new0 (gchar*, 2 + 1);
		_tmp28_[0] = _tmp25_;
		_tmp28_[1] = _tmp27_;
		_tmp29_ = _tmp28_;
		_tmp29__length1 = 2;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp24_, "span", _tmp29_, (gint) 2);
		_tmp29_ = (_vala_array_free (_tmp29_, _tmp29__length1, (GDestroyNotify) g_free), NULL);
		_tmp30_ = g_strdup ("span");
		_g_free0 (end_tag_name);
		end_tag_name = _tmp30_;
	}
	if (label_owner != NULL) {
		ValaList* _tmp32_;
		ValaList* _tmp33_;
		gint _tmp34_;
		gint _tmp35_;
		_tmp32_ = valadoc_content_inline_content_get_content (label_owner);
		_tmp33_ = _tmp32_;
		_tmp34_ = vala_collection_get_size ((ValaCollection*) _tmp33_);
		_tmp35_ = _tmp34_;
		_tmp31_ = _tmp35_ > 0;
	} else {
		_tmp31_ = FALSE;
	}
	if (_tmp31_) {
		valadoc_content_content_element_accept_children ((ValadocContentContentElement*) label_owner, (ValadocContentContentVisitor*) self);
	} else {
		ValadocHtmlMarkupWriter* _tmp36_;
		const gchar* _tmp37_;
		_tmp36_ = self->writer;
		_tmp37_ = symbol_name;
		valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp36_, _tmp37_);
	}
	_tmp38_ = self->writer;
	_tmp39_ = end_tag_name;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp38_, _tmp39_);
	_g_free0 (end_tag_name);
	_g_free0 (css_class);
	_g_free0 (href);
	_g_free0 (_tmp5_);
	_g_free0 (symbol_name);
	_g_free0 (_tmp0_);
}

static void
valadoc_html_html_renderer_write_taglets (ValadocHtmlHtmlRenderer* self,
                                          ValadocHtmlHtmlRendererWrite header,
                                          gpointer header_target,
                                          ValadocHtmlHtmlRendererWrite footer,
                                          gpointer footer_target,
                                          ValadocHtmlHtmlRendererWrite separator,
                                          gpointer separator_target,
                                          ValaList* taglets,
                                          ValadocHtmlHtmlRendererTagletWrite write,
                                          gpointer write_target)
{
	gint _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (taglets != NULL);
	_tmp0_ = vala_collection_get_size ((ValaCollection*) taglets);
	_tmp1_ = _tmp0_;
	if (_tmp1_ > 0) {
		gboolean first = FALSE;
		header (header_target);
		first = TRUE;
		{
			ValaList* _taglet_list = NULL;
			gint _taglet_size = 0;
			ValaList* _tmp2_;
			gint _tmp3_;
			gint _tmp4_;
			gint _taglet_index = 0;
			_taglet_list = taglets;
			_tmp2_ = _taglet_list;
			_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
			_tmp4_ = _tmp3_;
			_taglet_size = _tmp4_;
			_taglet_index = -1;
			while (TRUE) {
				gint _tmp5_;
				gint _tmp6_;
				ValadocContentTaglet* taglet = NULL;
				ValaList* _tmp7_;
				gpointer _tmp8_;
				ValadocContentTaglet* _tmp9_;
				_taglet_index = _taglet_index + 1;
				_tmp5_ = _taglet_index;
				_tmp6_ = _taglet_size;
				if (!(_tmp5_ < _tmp6_)) {
					break;
				}
				_tmp7_ = _taglet_list;
				_tmp8_ = vala_list_get (_tmp7_, _taglet_index);
				taglet = (ValadocContentTaglet*) _tmp8_;
				if (!first) {
					separator (separator_target);
				}
				_tmp9_ = taglet;
				write (_tmp9_, write_target);
				first = FALSE;
				_g_object_unref0 (taglet);
			}
		}
		footer (footer_target);
	}
}

static void
__lambda139_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocHtmlMarkupWriter* _tmp5_;
	ValadocMarkupWriter* _tmp6_;
	ValadocMarkupWriter* _tmp7_;
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_title");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "p", _tmp4_, (gint) 2);
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp5_ = self->writer;
	_tmp6_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp5_, "b", NULL, (gint) 0);
	_tmp7_ = valadoc_markup_writer_text (_tmp6_, "Deprecated: ");
	valadoc_markup_writer_end_tag (_tmp7_, "b");
}

static void
___lambda139__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda139_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda140_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	_tmp0_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp0_, "p");
}

static void
___lambda140__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda140_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda141_ (ValadocHtmlHtmlRenderer* self)
{
}

static void
___lambda141__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda141_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda142_ (ValadocHtmlHtmlRenderer* self,
              ValadocContentTaglet* taglet)
{
	ValadocTagletsDeprecated* deprecated = NULL;
	ValadocTagletsDeprecated* _tmp0_;
	g_return_if_fail (taglet != NULL);
	_tmp0_ = _g_object_ref0 (VALADOC_TAGLETS_IS_DEPRECATED (taglet) ? ((ValadocTagletsDeprecated*) taglet) : NULL);
	deprecated = _tmp0_;
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) deprecated, (ValadocContentContentVisitor*) self);
	_g_object_unref0 (deprecated);
}

static void
___lambda142__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                       gpointer self)
{
	__lambda142_ ((ValadocHtmlHtmlRenderer*) self, taglet);
}

static gint
__lambda143_ (ValadocHtmlHtmlRenderer* self,
              ValadocContentTaglet* _a,
              ValadocContentTaglet* _b)
{
	ValadocTagletsParam* a = NULL;
	ValadocTagletsParam* _tmp0_;
	ValadocTagletsParam* b = NULL;
	ValadocTagletsParam* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ValadocTagletsParam* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	ValadocTagletsParam* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	ValadocTagletsParam* _tmp24_;
	gint _tmp25_;
	gint _tmp26_;
	ValadocTagletsParam* _tmp27_;
	gint _tmp28_;
	gint _tmp29_;
	ValadocTagletsParam* _tmp30_;
	gint _tmp31_;
	gint _tmp32_;
	gint result;
	g_return_val_if_fail (_a != NULL, 0);
	g_return_val_if_fail (_b != NULL, 0);
	_tmp0_ = _g_object_ref0 (VALADOC_TAGLETS_IS_PARAM (_a) ? ((ValadocTagletsParam*) _a) : NULL);
	a = _tmp0_;
	_tmp1_ = _g_object_ref0 (VALADOC_TAGLETS_IS_PARAM (_b) ? ((ValadocTagletsParam*) _b) : NULL);
	b = _tmp1_;
	_tmp3_ = a;
	_tmp4_ = valadoc_taglets_param_get_position (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ < 0) {
		ValadocTagletsParam* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp6_ = b;
		_tmp7_ = valadoc_taglets_param_get_position (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = _tmp8_ < 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		gint cmp = 0;
		ValadocTagletsParam* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		ValadocTagletsParam* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		ValadocTagletsParam* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		ValadocTagletsParam* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		_tmp9_ = a;
		_tmp10_ = valadoc_taglets_param_get_parameter_name (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = b;
		_tmp13_ = valadoc_taglets_param_get_parameter_name (_tmp12_);
		_tmp14_ = _tmp13_;
		cmp = g_ascii_strcasecmp (_tmp11_, _tmp14_);
		if (cmp == 0) {
			result = 0;
			_g_object_unref0 (b);
			_g_object_unref0 (a);
			return result;
		}
		_tmp15_ = a;
		_tmp16_ = valadoc_taglets_param_get_parameter_name (_tmp15_);
		_tmp17_ = _tmp16_;
		if (g_strcmp0 (_tmp17_, "...") == 0) {
			result = 1;
			_g_object_unref0 (b);
			_g_object_unref0 (a);
			return result;
		}
		_tmp18_ = b;
		_tmp19_ = valadoc_taglets_param_get_parameter_name (_tmp18_);
		_tmp20_ = _tmp19_;
		if (g_strcmp0 (_tmp20_, "...") == 0) {
			result = -1;
			_g_object_unref0 (b);
			_g_object_unref0 (a);
			return result;
		}
		result = cmp;
		_g_object_unref0 (b);
		_g_object_unref0 (a);
		return result;
	}
	_tmp21_ = a;
	_tmp22_ = valadoc_taglets_param_get_position (_tmp21_);
	_tmp23_ = _tmp22_;
	if (_tmp23_ < 0) {
		result = 1;
		_g_object_unref0 (b);
		_g_object_unref0 (a);
		return result;
	}
	_tmp24_ = b;
	_tmp25_ = valadoc_taglets_param_get_position (_tmp24_);
	_tmp26_ = _tmp25_;
	if (_tmp26_ < 0) {
		result = -1;
		_g_object_unref0 (b);
		_g_object_unref0 (a);
		return result;
	}
	_tmp27_ = a;
	_tmp28_ = valadoc_taglets_param_get_position (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = b;
	_tmp31_ = valadoc_taglets_param_get_position (_tmp30_);
	_tmp32_ = _tmp31_;
	result = _tmp29_ - _tmp32_;
	_g_object_unref0 (b);
	_g_object_unref0 (a);
	return result;
}

static gint
___lambda143__gcompare_data_func (gconstpointer a,
                                  gconstpointer b,
                                  gpointer self)
{
	gint result;
	result = __lambda143_ ((ValadocHtmlHtmlRenderer*) self, (ValadocContentTaglet*) a, (ValadocContentTaglet*) b);
	return result;
}

static void
__lambda144_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocMarkupWriter* _tmp5_;
	ValadocMarkupWriter* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_title");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	_tmp5_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "h2", _tmp4_, (gint) 2);
	_tmp6_ = valadoc_markup_writer_text (_tmp5_, "Parameters:");
	valadoc_markup_writer_end_tag (_tmp6_, "h2");
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp7_ = self->writer;
	_tmp8_ = g_strdup ("class");
	_tmp9_ = g_strdup ("main_parameter_table");
	_tmp10_ = g_new0 (gchar*, 2 + 1);
	_tmp10_[0] = _tmp8_;
	_tmp10_[1] = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp11__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp7_, "table", _tmp11_, (gint) 2);
	_tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_free), NULL);
}

static void
___lambda144__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda144_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda145_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	_tmp0_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp0_, "table");
}

static void
___lambda145__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda145_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda146_ (ValadocHtmlHtmlRenderer* self)
{
}

static void
___lambda146__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda146_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda147_ (ValadocHtmlHtmlRenderer* self,
              ValadocContentTaglet* taglet)
{
	ValadocTagletsParam* param = NULL;
	ValadocTagletsParam* _tmp0_;
	gchar** unknown_parameter_css = NULL;
	gint unknown_parameter_css_length1;
	gint _unknown_parameter_css_size_;
	gboolean _tmp1_ = FALSE;
	ValadocTagletsParam* _tmp2_;
	ValadocApiSymbol* _tmp3_;
	ValadocApiSymbol* _tmp4_;
	ValadocHtmlMarkupWriter* _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	ValadocHtmlMarkupWriter* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar** _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	ValadocMarkupWriter* _tmp18_;
	ValadocTagletsParam* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	ValadocMarkupWriter* _tmp22_;
	ValadocHtmlMarkupWriter* _tmp23_;
	ValadocTagletsParam* _tmp24_;
	ValadocHtmlMarkupWriter* _tmp25_;
	ValadocHtmlMarkupWriter* _tmp26_;
	g_return_if_fail (taglet != NULL);
	_tmp0_ = _g_object_ref0 (VALADOC_TAGLETS_IS_PARAM (taglet) ? ((ValadocTagletsParam*) taglet) : NULL);
	param = _tmp0_;
	unknown_parameter_css = NULL;
	unknown_parameter_css_length1 = 0;
	_unknown_parameter_css_size_ = unknown_parameter_css_length1;
	_tmp2_ = param;
	_tmp3_ = valadoc_taglets_param_get_parameter (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == NULL) {
		ValadocTagletsParam* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = param;
		_tmp6_ = valadoc_taglets_param_get_is_this (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = !_tmp7_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar** _tmp10_;
		_tmp8_ = g_strdup ("class");
		_tmp9_ = g_strdup ("main_parameter_table_unknown_parameter");
		_tmp10_ = g_new0 (gchar*, 2 + 1);
		_tmp10_[0] = _tmp8_;
		_tmp10_[1] = _tmp9_;
		unknown_parameter_css = (_vala_array_free (unknown_parameter_css, unknown_parameter_css_length1, (GDestroyNotify) g_free), NULL);
		unknown_parameter_css = _tmp10_;
		unknown_parameter_css_length1 = 2;
		_unknown_parameter_css_size_ = unknown_parameter_css_length1;
	}
	_tmp11_ = self->writer;
	_tmp12_ = unknown_parameter_css;
	_tmp12__length1 = unknown_parameter_css_length1;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp11_, "tr", _tmp12_, (gint) _tmp12__length1);
	_tmp13_ = self->writer;
	_tmp14_ = g_strdup ("class");
	_tmp15_ = g_strdup ("main_parameter_table_name");
	_tmp16_ = g_new0 (gchar*, 2 + 1);
	_tmp16_[0] = _tmp14_;
	_tmp16_[1] = _tmp15_;
	_tmp17_ = _tmp16_;
	_tmp17__length1 = 2;
	_tmp18_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp13_, "td", _tmp17_, (gint) 2);
	_tmp19_ = param;
	_tmp20_ = valadoc_taglets_param_get_parameter_name (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = valadoc_markup_writer_text (_tmp18_, _tmp21_);
	valadoc_markup_writer_end_tag (_tmp22_, "td");
	_tmp17_ = (_vala_array_free (_tmp17_, _tmp17__length1, (GDestroyNotify) g_free), NULL);
	_tmp23_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp23_, "td", NULL, (gint) 0);
	_tmp24_ = param;
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) _tmp24_, (ValadocContentContentVisitor*) self);
	_tmp25_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp25_, "td");
	_tmp26_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp26_, "tr");
	unknown_parameter_css = (_vala_array_free (unknown_parameter_css, unknown_parameter_css_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (param);
}

static void
___lambda147__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                       gpointer self)
{
	__lambda147_ ((ValadocHtmlHtmlRenderer*) self, taglet);
}

static void
__lambda148_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocMarkupWriter* _tmp5_;
	ValadocMarkupWriter* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_title");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	_tmp5_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "h2", _tmp4_, (gint) 2);
	_tmp6_ = valadoc_markup_writer_text (_tmp5_, "Returns:");
	valadoc_markup_writer_end_tag (_tmp6_, "h2");
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp7_ = self->writer;
	_tmp8_ = g_strdup ("class");
	_tmp9_ = g_strdup ("main_parameter_table");
	_tmp10_ = g_new0 (gchar*, 2 + 1);
	_tmp10_[0] = _tmp8_;
	_tmp10_[1] = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp11__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp7_, "table", _tmp11_, (gint) 2);
	_tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_free), NULL);
}

static void
___lambda148__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda148_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda149_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	_tmp0_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp0_, "table");
}

static void
___lambda149__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda149_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda150_ (ValadocHtmlHtmlRenderer* self)
{
}

static void
___lambda150__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda150_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda151_ (ValadocHtmlHtmlRenderer* self,
              ValadocContentTaglet* taglet)
{
	ValadocTagletsReturn* param = NULL;
	ValadocTagletsReturn* _tmp0_;
	ValadocHtmlMarkupWriter* _tmp1_;
	ValadocHtmlMarkupWriter* _tmp2_;
	ValadocHtmlMarkupWriter* _tmp3_;
	ValadocHtmlMarkupWriter* _tmp4_;
	g_return_if_fail (taglet != NULL);
	_tmp0_ = _g_object_ref0 (VALADOC_TAGLETS_IS_RETURN (taglet) ? ((ValadocTagletsReturn*) taglet) : NULL);
	param = _tmp0_;
	_tmp1_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp1_, "tr", NULL, (gint) 0);
	_tmp2_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp2_, "td", NULL, (gint) 0);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) param, (ValadocContentContentVisitor*) self);
	_tmp3_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp3_, "td");
	_tmp4_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp4_, "tr");
	_g_object_unref0 (param);
}

static void
___lambda151__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                       gpointer self)
{
	__lambda151_ ((ValadocHtmlHtmlRenderer*) self, taglet);
}

static void
__lambda152_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocMarkupWriter* _tmp5_;
	ValadocMarkupWriter* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_title");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	_tmp5_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "h2", _tmp4_, (gint) 2);
	_tmp6_ = valadoc_markup_writer_text (_tmp5_, "Exceptions:");
	valadoc_markup_writer_end_tag (_tmp6_, "h2");
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp7_ = self->writer;
	_tmp8_ = g_strdup ("class");
	_tmp9_ = g_strdup ("main_parameter_table");
	_tmp10_ = g_new0 (gchar*, 2 + 1);
	_tmp10_[0] = _tmp8_;
	_tmp10_[1] = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp11__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp7_, "table", _tmp11_, (gint) 2);
	_tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_free), NULL);
}

static void
___lambda152__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda152_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda153_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	_tmp0_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp0_, "table");
}

static void
___lambda153__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda153_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda154_ (ValadocHtmlHtmlRenderer* self)
{
}

static void
___lambda154__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda154_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda155_ (ValadocHtmlHtmlRenderer* self,
              ValadocContentTaglet* taglet)
{
	ValadocTagletsThrows* exception = NULL;
	ValadocTagletsThrows* _tmp0_;
	ValadocHtmlMarkupWriter* _tmp1_;
	ValadocHtmlMarkupWriter* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	ValadocMarkupWriter* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	ValadocMarkupWriter* _tmp10_;
	ValadocHtmlMarkupWriter* _tmp11_;
	ValadocHtmlMarkupWriter* _tmp12_;
	ValadocHtmlMarkupWriter* _tmp13_;
	g_return_if_fail (taglet != NULL);
	_tmp0_ = _g_object_ref0 (VALADOC_TAGLETS_IS_THROWS (taglet) ? ((ValadocTagletsThrows*) taglet) : NULL);
	exception = _tmp0_;
	_tmp1_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp1_, "tr", NULL, (gint) 0);
	_tmp2_ = self->writer;
	_tmp3_ = g_strdup ("class");
	_tmp4_ = g_strdup ("main_parameter_table_name");
	_tmp5_ = g_new0 (gchar*, 2 + 1);
	_tmp5_[0] = _tmp3_;
	_tmp5_[1] = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp6__length1 = 2;
	_tmp7_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp2_, "td", _tmp6_, (gint) 2);
	_tmp8_ = valadoc_taglets_throws_get_error_domain_name (exception);
	_tmp9_ = _tmp8_;
	_tmp10_ = valadoc_markup_writer_text (_tmp7_, _tmp9_);
	valadoc_markup_writer_end_tag (_tmp10_, "td");
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
	_tmp11_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp11_, "td", NULL, (gint) 0);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) exception, (ValadocContentContentVisitor*) self);
	_tmp12_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp12_, "td");
	_tmp13_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp13_, "tr");
	_g_object_unref0 (exception);
}

static void
___lambda155__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                       gpointer self)
{
	__lambda155_ ((ValadocHtmlHtmlRenderer*) self, taglet);
}

static void
__lambda156_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocMarkupWriter* _tmp5_;
	ValadocMarkupWriter* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_title");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	_tmp5_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "h2", _tmp4_, (gint) 2);
	_tmp6_ = valadoc_markup_writer_text (_tmp5_, "Since:");
	valadoc_markup_writer_end_tag (_tmp6_, "h2");
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp7_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp7_, "p", NULL, (gint) 0);
}

static void
___lambda156__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda156_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda157_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	_tmp0_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp0_, "p");
}

static void
___lambda157__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda157_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda158_ (ValadocHtmlHtmlRenderer* self)
{
}

static void
___lambda158__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda158_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda159_ (ValadocHtmlHtmlRenderer* self,
              ValadocContentTaglet* taglet)
{
	ValadocTagletsSince* since = NULL;
	ValadocTagletsSince* _tmp0_;
	ValadocHtmlMarkupWriter* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (taglet != NULL);
	_tmp0_ = _g_object_ref0 (VALADOC_TAGLETS_IS_SINCE (taglet) ? ((ValadocTagletsSince*) taglet) : NULL);
	since = _tmp0_;
	_tmp1_ = self->writer;
	_tmp2_ = valadoc_taglets_since_get_version (since);
	_tmp3_ = _tmp2_;
	valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp1_, _tmp3_);
	_g_object_unref0 (since);
}

static void
___lambda159__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                       gpointer self)
{
	__lambda159_ ((ValadocHtmlHtmlRenderer*) self, taglet);
}

static void
__lambda160_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocMarkupWriter* _tmp5_;
	ValadocMarkupWriter* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_title");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	_tmp5_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "h2", _tmp4_, (gint) 2);
	_tmp6_ = valadoc_markup_writer_text (_tmp5_, "See also:");
	valadoc_markup_writer_end_tag (_tmp6_, "h2");
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp7_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp7_, "p", NULL, (gint) 0);
}

static void
___lambda160__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda160_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda161_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	_tmp0_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp0_, "p");
}

static void
___lambda161__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda161_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda162_ (ValadocHtmlHtmlRenderer* self)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	_tmp0_ = self->writer;
	valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp0_, ", ");
}

static void
___lambda162__valadoc_html_html_renderer_write (gpointer self)
{
	__lambda162_ ((ValadocHtmlHtmlRenderer*) self);
}

static void
__lambda163_ (ValadocHtmlHtmlRenderer* self,
              ValadocContentTaglet* taglet)
{
	ValadocTagletsSee* see = NULL;
	ValadocTagletsSee* _tmp0_;
	ValadocTagletsSee* _tmp1_;
	ValadocApiNode* _tmp2_;
	ValadocApiNode* _tmp3_;
	g_return_if_fail (taglet != NULL);
	_tmp0_ = _g_object_ref0 (VALADOC_TAGLETS_IS_SEE (taglet) ? ((ValadocTagletsSee*) taglet) : NULL);
	see = _tmp0_;
	_tmp1_ = see;
	_tmp2_ = valadoc_taglets_see_get_symbol (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == NULL) {
		ValadocTagletsSee* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp4_ = see;
		_tmp5_ = valadoc_taglets_see_get_symbol_name (_tmp4_);
		_tmp6_ = _tmp5_;
		valadoc_html_html_renderer_write_unresolved_symbol_link (self, _tmp6_, NULL);
	} else {
		ValadocTagletsSee* _tmp7_;
		ValadocApiNode* _tmp8_;
		ValadocApiNode* _tmp9_;
		ValadocTagletsSee* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp7_ = see;
		_tmp8_ = valadoc_taglets_see_get_symbol (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = see;
		_tmp11_ = valadoc_taglets_see_get_symbol_name (_tmp10_);
		_tmp12_ = _tmp11_;
		valadoc_html_html_renderer_write_resolved_symbol_link (self, _tmp9_, _tmp12_, NULL);
	}
	_g_object_unref0 (see);
}

static void
___lambda163__valadoc_html_html_renderer_taglet_write (ValadocContentTaglet* taglet,
                                                       gpointer self)
{
	__lambda163_ ((ValadocHtmlHtmlRenderer*) self, taglet);
}

static void
valadoc_html_html_renderer_real_visit_comment (ValadocContentContentVisitor* base,
                                               ValadocContentComment* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValaList* taglets = NULL;
	ValadocDocumentation* _tmp0_;
	ValaList* _tmp1_;
	ValaList* _tmp2_;
	ValadocDocumentation* _tmp3_;
	ValaList* _tmp4_;
	ValaList* _tmp5_;
	ValaList* _tmp6_;
	ValadocDocumentation* _tmp7_;
	ValaList* _tmp8_;
	ValaList* _tmp9_;
	ValadocDocumentation* _tmp10_;
	ValaList* _tmp11_;
	ValaList* _tmp12_;
	ValadocDocumentation* _tmp13_;
	ValaList* _tmp14_;
	ValaList* _tmp15_;
	ValadocDocumentation* _tmp16_;
	ValaList* _tmp17_;
	ValaList* _tmp18_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = self->_container;
	_tmp1_ = valadoc_content_comment_find_taglets (element, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, VALADOC_API_TYPE_NODE, ValadocApiNode), VALADOC_TAGLETS_TYPE_DEPRECATED);
	_vala_iterable_unref0 (taglets);
	taglets = _tmp1_;
	_tmp2_ = taglets;
	valadoc_html_html_renderer_write_taglets (self, ___lambda139__valadoc_html_html_renderer_write, self, ___lambda140__valadoc_html_html_renderer_write, self, ___lambda141__valadoc_html_html_renderer_write, self, _tmp2_, ___lambda142__valadoc_html_html_renderer_taglet_write, self);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp3_ = self->_container;
	_tmp4_ = valadoc_content_comment_find_taglets (element, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALADOC_API_TYPE_NODE, ValadocApiNode), VALADOC_TAGLETS_TYPE_PARAM);
	_vala_iterable_unref0 (taglets);
	taglets = _tmp4_;
	_tmp5_ = taglets;
	vala_list_sort (_tmp5_, ___lambda143__gcompare_data_func, g_object_ref (self), g_object_unref);
	_tmp6_ = taglets;
	valadoc_html_html_renderer_write_taglets (self, ___lambda144__valadoc_html_html_renderer_write, self, ___lambda145__valadoc_html_html_renderer_write, self, ___lambda146__valadoc_html_html_renderer_write, self, _tmp6_, ___lambda147__valadoc_html_html_renderer_taglet_write, self);
	_tmp7_ = self->_container;
	_tmp8_ = valadoc_content_comment_find_taglets (element, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, VALADOC_API_TYPE_NODE, ValadocApiNode), VALADOC_TAGLETS_TYPE_RETURN);
	_vala_iterable_unref0 (taglets);
	taglets = _tmp8_;
	_tmp9_ = taglets;
	valadoc_html_html_renderer_write_taglets (self, ___lambda148__valadoc_html_html_renderer_write, self, ___lambda149__valadoc_html_html_renderer_write, self, ___lambda150__valadoc_html_html_renderer_write, self, _tmp9_, ___lambda151__valadoc_html_html_renderer_taglet_write, self);
	_tmp10_ = self->_container;
	_tmp11_ = valadoc_content_comment_find_taglets (element, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, VALADOC_API_TYPE_NODE, ValadocApiNode), VALADOC_TAGLETS_TYPE_THROWS);
	_vala_iterable_unref0 (taglets);
	taglets = _tmp11_;
	_tmp12_ = taglets;
	valadoc_html_html_renderer_write_taglets (self, ___lambda152__valadoc_html_html_renderer_write, self, ___lambda153__valadoc_html_html_renderer_write, self, ___lambda154__valadoc_html_html_renderer_write, self, _tmp12_, ___lambda155__valadoc_html_html_renderer_taglet_write, self);
	_tmp13_ = self->_container;
	_tmp14_ = valadoc_content_comment_find_taglets (element, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, VALADOC_API_TYPE_NODE, ValadocApiNode), VALADOC_TAGLETS_TYPE_SINCE);
	_vala_iterable_unref0 (taglets);
	taglets = _tmp14_;
	_tmp15_ = taglets;
	valadoc_html_html_renderer_write_taglets (self, ___lambda156__valadoc_html_html_renderer_write, self, ___lambda157__valadoc_html_html_renderer_write, self, ___lambda158__valadoc_html_html_renderer_write, self, _tmp15_, ___lambda159__valadoc_html_html_renderer_taglet_write, self);
	_tmp16_ = self->_container;
	_tmp17_ = valadoc_content_comment_find_taglets (element, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, VALADOC_API_TYPE_NODE, ValadocApiNode), VALADOC_TAGLETS_TYPE_SEE);
	_vala_iterable_unref0 (taglets);
	taglets = _tmp17_;
	_tmp18_ = taglets;
	valadoc_html_html_renderer_write_taglets (self, ___lambda160__valadoc_html_html_renderer_write, self, ___lambda161__valadoc_html_html_renderer_write, self, ___lambda162__valadoc_html_html_renderer_write, self, _tmp18_, ___lambda163__valadoc_html_html_renderer_taglet_write, self);
	_vala_iterable_unref0 (taglets);
}

static void
valadoc_html_html_renderer_real_visit_embedded (ValadocContentContentVisitor* base,
                                                ValadocContentEmbedded* element)
{
	ValadocHtmlHtmlRenderer * self;
	gchar* caption = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* absolute_path = NULL;
	ValadocSettings* _tmp3_;
	const gchar* _tmp4_;
	ValadocApiPackage* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* relative_path = NULL;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_ = NULL;
	gboolean _tmp24_ = FALSE;
	const gchar* _tmp25_;
	ValadocHtmlMarkupWriter* _tmp28_;
	const gchar* _tmp29_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = valadoc_content_embedded_get_caption (element);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	caption = _tmp2_;
	_tmp3_ = self->settings;
	_tmp4_ = _tmp3_->path;
	_tmp5_ = element->package;
	_tmp6_ = valadoc_api_node_get_name ((ValadocApiNode*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = valadoc_content_embedded_get_url (element);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_path_get_basename (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_build_filename (_tmp4_, _tmp7_, "img", _tmp11_, NULL);
	_tmp13_ = _tmp12_;
	_g_free0 (_tmp11_);
	absolute_path = _tmp13_;
	_tmp14_ = valadoc_content_embedded_get_url (element);
	_tmp15_ = _tmp14_;
	_tmp16_ = g_path_get_basename (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_build_filename ("img", _tmp17_, NULL);
	_tmp19_ = _tmp18_;
	_g_free0 (_tmp17_);
	relative_path = _tmp19_;
	_tmp20_ = valadoc_content_embedded_get_url (element);
	_tmp21_ = _tmp20_;
	_tmp22_ = absolute_path;
	valadoc_copy_file (_tmp21_, _tmp22_);
	_tmp25_ = caption;
	if (_tmp25_ == NULL) {
		_tmp24_ = TRUE;
	} else {
		const gchar* _tmp26_;
		_tmp26_ = caption;
		_tmp24_ = g_strcmp0 (_tmp26_, "") == 0;
	}
	if (_tmp24_) {
		_tmp23_ = "";
	} else {
		const gchar* _tmp27_;
		_tmp27_ = caption;
		_tmp23_ = _tmp27_;
	}
	_tmp28_ = self->writer;
	_tmp29_ = relative_path;
	valadoc_html_markup_writer_image (_tmp28_, _tmp29_, _tmp23_, NULL);
	_g_free0 (relative_path);
	_g_free0 (absolute_path);
	_g_free0 (caption);
}

static void
valadoc_html_html_renderer_real_visit_headline (ValadocContentContentVisitor* base,
                                                ValadocContentHeadline* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocHtmlMarkupWriter* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	ValadocHtmlMarkupWriter* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = self->writer;
	_tmp1_ = valadoc_content_headline_get_level (element);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf ("h%d", _tmp2_);
	_tmp4_ = _tmp3_;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, _tmp4_, NULL, (gint) 0);
	_g_free0 (_tmp4_);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp5_ = self->writer;
	_tmp6_ = valadoc_content_headline_get_level (element);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf ("h%d", _tmp7_);
	_tmp9_ = _tmp8_;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp5_, _tmp9_);
	_g_free0 (_tmp9_);
}

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

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

static gint
string_last_index_of_char (const gchar* self,
                           gunichar c,
                           gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = g_utf8_strrchr (((gchar*) self) + start_index, (gssize) -1, c);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static void
valadoc_html_html_renderer_real_visit_wiki_link (ValadocContentContentVisitor* base,
                                                 ValadocContentWikiLink* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocWikiPage* _tmp0_;
	ValadocWikiPage* _tmp1_;
	ValaList* _tmp9_;
	ValaList* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	ValadocWikiPage* _tmp20_;
	ValadocWikiPage* _tmp21_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = valadoc_content_wiki_link_get_page (element);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		ValadocHtmlMarkupWriter* _tmp2_;
		gchar* _tmp3_;
		ValadocWikiPage* _tmp4_;
		ValadocWikiPage* _tmp5_;
		gchar* _tmp6_;
		gchar** _tmp7_;
		gchar** _tmp8_;
		gint _tmp8__length1;
		_tmp2_ = self->writer;
		_tmp3_ = g_strdup ("href");
		_tmp4_ = valadoc_content_wiki_link_get_page (element);
		_tmp5_ = _tmp4_;
		_tmp6_ = valadoc_html_html_renderer_get_url (self, (ValadocDocumentation*) _tmp5_);
		_tmp7_ = g_new0 (gchar*, 2 + 1);
		_tmp7_[0] = _tmp3_;
		_tmp7_[1] = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp8__length1 = 2;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp2_, "a", _tmp8_, (gint) 2);
		_tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp9_ = valadoc_content_inline_content_get_content ((ValadocContentInlineContent*) element);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_collection_get_size ((ValaCollection*) _tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ > 0) {
		valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	} else {
		ValadocHtmlMarkupWriter* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp13_ = self->writer;
		_tmp14_ = valadoc_content_wiki_link_get_name (element);
		_tmp15_ = _tmp14_;
		_tmp16_ = valadoc_content_wiki_link_get_name (element);
		_tmp17_ = _tmp16_;
		_tmp18_ = string_substring (_tmp15_, (glong) 0, (glong) string_last_index_of_char (_tmp17_, (gunichar) '.', 0));
		_tmp19_ = _tmp18_;
		valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp13_, _tmp19_);
		_g_free0 (_tmp19_);
	}
	_tmp20_ = valadoc_content_wiki_link_get_page (element);
	_tmp21_ = _tmp20_;
	if (_tmp21_ != NULL) {
		ValadocHtmlMarkupWriter* _tmp22_;
		_tmp22_ = self->writer;
		valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp22_, "a");
	}
}

static void
valadoc_html_html_renderer_real_visit_link (ValadocContentContentVisitor* base,
                                            ValadocContentLink* element)
{
	ValadocHtmlHtmlRenderer * self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	ValaList* _tmp21_;
	ValaList* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	ValadocHtmlMarkupWriter* _tmp28_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = valadoc_content_link_get_url (element);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_uri_parse_scheme (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ != NULL;
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		ValadocHtmlMarkupWriter* _tmp5_;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar** _tmp12_;
		gchar** _tmp13_;
		gint _tmp13__length1;
		_tmp5_ = self->writer;
		_tmp6_ = g_strdup ("href");
		_tmp7_ = valadoc_content_link_get_url (element);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strdup (_tmp8_);
		_tmp10_ = g_strdup ("target");
		_tmp11_ = g_strdup ("_blank");
		_tmp12_ = g_new0 (gchar*, 4 + 1);
		_tmp12_[0] = _tmp6_;
		_tmp12_[1] = _tmp9_;
		_tmp12_[2] = _tmp10_;
		_tmp12_[3] = _tmp11_;
		_tmp13_ = _tmp12_;
		_tmp13__length1 = 4;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp5_, "a", _tmp13_, (gint) 4);
		_tmp13_ = (_vala_array_free (_tmp13_, _tmp13__length1, (GDestroyNotify) g_free), NULL);
	} else {
		ValadocHtmlMarkupWriter* _tmp14_;
		gchar* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar** _tmp19_;
		gchar** _tmp20_;
		gint _tmp20__length1;
		_tmp14_ = self->writer;
		_tmp15_ = g_strdup ("href");
		_tmp16_ = valadoc_content_link_get_url (element);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_strdup (_tmp17_);
		_tmp19_ = g_new0 (gchar*, 2 + 1);
		_tmp19_[0] = _tmp15_;
		_tmp19_[1] = _tmp18_;
		_tmp20_ = _tmp19_;
		_tmp20__length1 = 2;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp14_, "a", _tmp20_, (gint) 2);
		_tmp20_ = (_vala_array_free (_tmp20_, _tmp20__length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp21_ = valadoc_content_inline_content_get_content ((ValadocContentInlineContent*) element);
	_tmp22_ = _tmp21_;
	_tmp23_ = vala_collection_get_size ((ValaCollection*) _tmp22_);
	_tmp24_ = _tmp23_;
	if (_tmp24_ > 0) {
		valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	} else {
		ValadocHtmlMarkupWriter* _tmp25_;
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		_tmp25_ = self->writer;
		_tmp26_ = valadoc_content_link_get_url (element);
		_tmp27_ = _tmp26_;
		valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp25_, _tmp27_);
	}
	_tmp28_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp28_, "a");
}

static void
valadoc_html_html_renderer_real_visit_symbol_link (ValadocContentContentVisitor* base,
                                                   ValadocContentSymbolLink* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocApiNode* _tmp0_;
	ValadocApiNode* _tmp1_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = valadoc_content_symbol_link_get_symbol (element);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp2_ = valadoc_content_symbol_link_get_given_symbol_name (element);
		_tmp3_ = _tmp2_;
		valadoc_html_html_renderer_write_unresolved_symbol_link (self, _tmp3_, (ValadocContentInlineContent*) element);
	} else {
		ValadocApiNode* _tmp4_;
		ValadocApiNode* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp4_ = valadoc_content_symbol_link_get_symbol (element);
		_tmp5_ = _tmp4_;
		_tmp6_ = valadoc_content_symbol_link_get_given_symbol_name (element);
		_tmp7_ = _tmp6_;
		valadoc_html_html_renderer_write_resolved_symbol_link (self, _tmp5_, _tmp7_, (ValadocContentInlineContent*) element);
	}
}

static void
valadoc_html_html_renderer_real_visit_list (ValadocContentContentVisitor* base,
                                            ValadocContentList* element)
{
	ValadocHtmlHtmlRenderer * self;
	gchar* list_type = NULL;
	gchar* bullet_type = NULL;
	gchar* css_class = NULL;
	ValadocContentListBullet _tmp0_;
	ValadocContentListBullet _tmp1_;
	ValadocHtmlMarkupWriter* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar** _tmp24_;
	gchar** _tmp25_;
	gint _tmp25__length1;
	ValadocHtmlMarkupWriter* _tmp26_;
	const gchar* _tmp27_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	list_type = NULL;
	bullet_type = NULL;
	css_class = NULL;
	_tmp0_ = valadoc_content_list_get_bullet (element);
	_tmp1_ = _tmp0_;
	switch (_tmp1_) {
		case VALADOC_CONTENT_LIST_BULLET_NONE:
		{
			gchar* _tmp2_;
			gchar* _tmp3_;
			_tmp2_ = g_strdup ("ul");
			_g_free0 (list_type);
			list_type = _tmp2_;
			_tmp3_ = g_strdup ("no_bullet");
			_g_free0 (css_class);
			css_class = _tmp3_;
			break;
		}
		case VALADOC_CONTENT_LIST_BULLET_UNORDERED:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("ul");
			_g_free0 (list_type);
			list_type = _tmp4_;
			break;
		}
		case VALADOC_CONTENT_LIST_BULLET_ORDERED:
		{
			gchar* _tmp5_;
			_tmp5_ = g_strdup ("ol");
			_g_free0 (list_type);
			list_type = _tmp5_;
			break;
		}
		case VALADOC_CONTENT_LIST_BULLET_ORDERED_NUMBER:
		{
			gchar* _tmp6_;
			gchar* _tmp7_;
			_tmp6_ = g_strdup ("ol");
			_g_free0 (list_type);
			list_type = _tmp6_;
			_tmp7_ = g_strdup ("1");
			_g_free0 (bullet_type);
			bullet_type = _tmp7_;
			break;
		}
		case VALADOC_CONTENT_LIST_BULLET_ORDERED_LOWER_CASE_ALPHA:
		{
			gchar* _tmp8_;
			gchar* _tmp9_;
			_tmp8_ = g_strdup ("ol");
			_g_free0 (list_type);
			list_type = _tmp8_;
			_tmp9_ = g_strdup ("a");
			_g_free0 (bullet_type);
			bullet_type = _tmp9_;
			break;
		}
		case VALADOC_CONTENT_LIST_BULLET_ORDERED_UPPER_CASE_ALPHA:
		{
			gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp10_ = g_strdup ("ol");
			_g_free0 (list_type);
			list_type = _tmp10_;
			_tmp11_ = g_strdup ("A");
			_g_free0 (bullet_type);
			bullet_type = _tmp11_;
			break;
		}
		case VALADOC_CONTENT_LIST_BULLET_ORDERED_LOWER_CASE_ROMAN:
		{
			gchar* _tmp12_;
			gchar* _tmp13_;
			_tmp12_ = g_strdup ("ol");
			_g_free0 (list_type);
			list_type = _tmp12_;
			_tmp13_ = g_strdup ("i");
			_g_free0 (bullet_type);
			bullet_type = _tmp13_;
			break;
		}
		case VALADOC_CONTENT_LIST_BULLET_ORDERED_UPPER_CASE_ROMAN:
		{
			gchar* _tmp14_;
			gchar* _tmp15_;
			_tmp14_ = g_strdup ("ol");
			_g_free0 (list_type);
			list_type = _tmp14_;
			_tmp15_ = g_strdup ("I");
			_g_free0 (bullet_type);
			bullet_type = _tmp15_;
			break;
		}
		default:
		break;
	}
	_tmp16_ = self->writer;
	_tmp17_ = list_type;
	_tmp18_ = g_strdup ("class");
	_tmp19_ = css_class;
	_tmp20_ = g_strdup (_tmp19_);
	_tmp21_ = g_strdup ("type");
	_tmp22_ = bullet_type;
	_tmp23_ = g_strdup (_tmp22_);
	_tmp24_ = g_new0 (gchar*, 4 + 1);
	_tmp24_[0] = _tmp18_;
	_tmp24_[1] = _tmp20_;
	_tmp24_[2] = _tmp21_;
	_tmp24_[3] = _tmp23_;
	_tmp25_ = _tmp24_;
	_tmp25__length1 = 4;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp16_, _tmp17_, _tmp25_, (gint) 4);
	_tmp25_ = (_vala_array_free (_tmp25_, _tmp25__length1, (GDestroyNotify) g_free), NULL);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp26_ = self->writer;
	_tmp27_ = list_type;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp26_, _tmp27_);
	_g_free0 (css_class);
	_g_free0 (bullet_type);
	_g_free0 (list_type);
}

static void
valadoc_html_html_renderer_real_visit_list_item (ValadocContentContentVisitor* base,
                                                 ValadocContentListItem* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocHtmlMarkupWriter* _tmp0_;
	ValadocContentParagraph* _tmp1_ = NULL;
	ValaList* _tmp2_;
	ValaList* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	ValadocContentParagraph* first_para = NULL;
	ValadocContentParagraph* _tmp11_;
	ValadocContentParagraph* _tmp12_;
	ValadocHtmlMarkupWriter* _tmp24_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "li", NULL, (gint) 0);
	_tmp2_ = valadoc_content_block_content_get_content ((ValadocContentBlockContent*) element);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ > 0) {
		ValaList* _tmp6_;
		ValaList* _tmp7_;
		gpointer _tmp8_;
		ValadocContentBlock* _tmp9_;
		ValadocContentParagraph* _tmp10_;
		_tmp6_ = valadoc_content_block_content_get_content ((ValadocContentBlockContent*) element);
		_tmp7_ = _tmp6_;
		_tmp8_ = vala_list_get (_tmp7_, 0);
		_tmp9_ = (ValadocContentBlock*) _tmp8_;
		_tmp10_ = VALADOC_CONTENT_IS_PARAGRAPH (_tmp9_) ? ((ValadocContentParagraph*) _tmp9_) : NULL;
		if (_tmp10_ == NULL) {
			_g_object_unref0 (_tmp9_);
		}
		_g_object_unref0 (_tmp1_);
		_tmp1_ = _tmp10_;
	} else {
		_g_object_unref0 (_tmp1_);
		_tmp1_ = NULL;
	}
	_tmp11_ = _g_object_ref0 (_tmp1_);
	first_para = _tmp11_;
	_tmp12_ = first_para;
	if (_tmp12_ != NULL) {
		ValadocContentParagraph* _tmp13_;
		gboolean first_entry = FALSE;
		_tmp13_ = first_para;
		valadoc_content_content_element_accept_children ((ValadocContentContentElement*) _tmp13_, (ValadocContentContentVisitor*) self);
		first_entry = TRUE;
		{
			ValaList* _item_list = NULL;
			ValaList* _tmp14_;
			ValaList* _tmp15_;
			gint _item_size = 0;
			ValaList* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			gint _item_index = 0;
			_tmp14_ = valadoc_content_block_content_get_content ((ValadocContentBlockContent*) element);
			_tmp15_ = _tmp14_;
			_item_list = _tmp15_;
			_tmp16_ = _item_list;
			_tmp17_ = vala_collection_get_size ((ValaCollection*) _tmp16_);
			_tmp18_ = _tmp17_;
			_item_size = _tmp18_;
			_item_index = -1;
			while (TRUE) {
				gint _tmp19_;
				gint _tmp20_;
				ValadocContentBlock* item = NULL;
				ValaList* _tmp21_;
				gpointer _tmp22_;
				_item_index = _item_index + 1;
				_tmp19_ = _item_index;
				_tmp20_ = _item_size;
				if (!(_tmp19_ < _tmp20_)) {
					break;
				}
				_tmp21_ = _item_list;
				_tmp22_ = vala_list_get (_tmp21_, _item_index);
				item = (ValadocContentBlock*) _tmp22_;
				if (!first_entry) {
					ValadocContentBlock* _tmp23_;
					_tmp23_ = item;
					valadoc_content_content_element_accept ((ValadocContentContentElement*) _tmp23_, (ValadocContentContentVisitor*) self);
				}
				first_entry = FALSE;
				_g_object_unref0 (item);
			}
		}
	} else {
		valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	}
	_tmp24_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp24_, "li");
	_g_object_unref0 (first_para);
	_g_object_unref0 (_tmp1_);
}

static void
valadoc_html_html_renderer_real_visit_page (ValadocContentContentVisitor* base,
                                            ValadocContentPage* element)
{
	ValadocHtmlHtmlRenderer * self;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
}

static void
valadoc_html_html_renderer_real_visit_paragraph (ValadocContentContentVisitor* base,
                                                 ValadocContentParagraph* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocContentHorizontalAlign _tmp0_;
	ValadocContentHorizontalAlign _tmp1_;
	ValadocHtmlMarkupWriter* _tmp13_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = valadoc_content_style_attributes_get_horizontal_align ((ValadocContentStyleAttributes*) element);
	_tmp1_ = _tmp0_;
	switch (_tmp1_) {
		case VALADOC_CONTENT_HORIZONTAL_ALIGN_CENTER:
		{
			ValadocHtmlMarkupWriter* _tmp2_;
			gchar* _tmp3_;
			gchar* _tmp4_;
			gchar** _tmp5_;
			gchar** _tmp6_;
			gint _tmp6__length1;
			_tmp2_ = self->writer;
			_tmp3_ = g_strdup ("style");
			_tmp4_ = g_strdup ("text-align: center;");
			_tmp5_ = g_new0 (gchar*, 2 + 1);
			_tmp5_[0] = _tmp3_;
			_tmp5_[1] = _tmp4_;
			_tmp6_ = _tmp5_;
			_tmp6__length1 = 2;
			valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp2_, "p", _tmp6_, (gint) 2);
			_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
			break;
		}
		case VALADOC_CONTENT_HORIZONTAL_ALIGN_RIGHT:
		{
			ValadocHtmlMarkupWriter* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			gchar** _tmp10_;
			gchar** _tmp11_;
			gint _tmp11__length1;
			_tmp7_ = self->writer;
			_tmp8_ = g_strdup ("style");
			_tmp9_ = g_strdup ("text-align: right;");
			_tmp10_ = g_new0 (gchar*, 2 + 1);
			_tmp10_[0] = _tmp8_;
			_tmp10_[1] = _tmp9_;
			_tmp11_ = _tmp10_;
			_tmp11__length1 = 2;
			valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp7_, "p", _tmp11_, (gint) 2);
			_tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_free), NULL);
			break;
		}
		default:
		{
			ValadocHtmlMarkupWriter* _tmp12_;
			_tmp12_ = self->writer;
			valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp12_, "p", NULL, (gint) 0);
			break;
		}
	}
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp13_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp13_, "p");
}

static void
valadoc_html_html_renderer_visit_notification_block (ValadocHtmlHtmlRenderer* self,
                                                     ValadocContentBlockContent* element,
                                                     const gchar* headline)
{
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocHtmlMarkupWriter* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar** _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
	ValadocMarkupWriter* _tmp10_;
	ValadocMarkupWriter* _tmp11_;
	ValadocMarkupWriter* _tmp12_;
	ValadocHtmlMarkupWriter* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar** _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	ValadocHtmlMarkupWriter* _tmp18_;
	ValadocHtmlMarkupWriter* _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element != NULL);
	g_return_if_fail (headline != NULL);
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_notification_block");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "div", _tmp4_, (gint) 2);
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp5_ = self->writer;
	_tmp6_ = g_strdup ("class");
	_tmp7_ = g_strdup ("main_block_headline");
	_tmp8_ = g_new0 (gchar*, 2 + 1);
	_tmp8_[0] = _tmp6_;
	_tmp8_[1] = _tmp7_;
	_tmp9_ = _tmp8_;
	_tmp9__length1 = 2;
	_tmp10_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp5_, "span", _tmp9_, (gint) 2);
	_tmp11_ = valadoc_markup_writer_text (_tmp10_, headline);
	_tmp12_ = valadoc_markup_writer_end_tag (_tmp11_, "span");
	valadoc_markup_writer_text (_tmp12_, " ");
	_tmp9_ = (_vala_array_free (_tmp9_, _tmp9__length1, (GDestroyNotify) g_free), NULL);
	_tmp13_ = self->writer;
	_tmp14_ = g_strdup ("class");
	_tmp15_ = g_strdup ("main_block_content");
	_tmp16_ = g_new0 (gchar*, 2 + 1);
	_tmp16_[0] = _tmp14_;
	_tmp16_[1] = _tmp15_;
	_tmp17_ = _tmp16_;
	_tmp17__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp13_, "div", _tmp17_, (gint) 2);
	_tmp17_ = (_vala_array_free (_tmp17_, _tmp17__length1, (GDestroyNotify) g_free), NULL);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp18_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp18_, "div");
	_tmp19_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp19_, "div");
}

static void
valadoc_html_html_renderer_real_visit_warning (ValadocContentContentVisitor* base,
                                               ValadocContentWarning* element)
{
	ValadocHtmlHtmlRenderer * self;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	valadoc_html_html_renderer_visit_notification_block (self, (ValadocContentBlockContent*) element, "Warning:");
}

static void
valadoc_html_html_renderer_real_visit_note (ValadocContentContentVisitor* base,
                                            ValadocContentNote* element)
{
	ValadocHtmlHtmlRenderer * self;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	valadoc_html_html_renderer_visit_notification_block (self, (ValadocContentBlockContent*) element, "Note:");
}

static void
valadoc_html_html_renderer_real_visit_run (ValadocContentContentVisitor* base,
                                           ValadocContentRun* element)
{
	ValadocHtmlHtmlRenderer * self;
	gchar* tag = NULL;
	gchar* css_type = NULL;
	ValadocContentRunStyle _tmp0_;
	ValadocContentRunStyle _tmp1_;
	const gchar* _tmp33_;
	const gchar* _tmp41_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	tag = NULL;
	css_type = NULL;
	_tmp0_ = valadoc_content_run_get_style (element);
	_tmp1_ = _tmp0_;
	switch (_tmp1_) {
		case VALADOC_CONTENT_RUN_STYLE_BOLD:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("b");
			_g_free0 (tag);
			tag = _tmp2_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_ITALIC:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("i");
			_g_free0 (tag);
			tag = _tmp3_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_UNDERLINED:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("u");
			_g_free0 (tag);
			tag = _tmp4_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_MONOSPACED:
		{
			gchar* _tmp5_;
			_tmp5_ = g_strdup ("code");
			_g_free0 (tag);
			tag = _tmp5_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_STROKE:
		{
			gchar* _tmp6_;
			_tmp6_ = g_strdup ("stroke");
			_g_free0 (tag);
			tag = _tmp6_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_KEYWORD:
		{
			gchar* _tmp7_;
			gchar* _tmp8_;
			_tmp7_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp7_;
			_tmp8_ = g_strdup ("main_keyword");
			_g_free0 (css_type);
			css_type = _tmp8_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_ESCAPE:
		{
			gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp9_;
			_tmp10_ = g_strdup ("main_escape");
			_g_free0 (css_type);
			css_type = _tmp10_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_LITERAL:
		{
			gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp11_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp11_;
			_tmp12_ = g_strdup ("main_literal");
			_g_free0 (css_type);
			css_type = _tmp12_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_BASIC_TYPE:
		{
			gchar* _tmp13_;
			gchar* _tmp14_;
			_tmp13_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp13_;
			_tmp14_ = g_strdup ("main_basic_type");
			_g_free0 (css_type);
			css_type = _tmp14_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_TYPE:
		{
			gchar* _tmp15_;
			gchar* _tmp16_;
			_tmp15_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp15_;
			_tmp16_ = g_strdup ("main_type");
			_g_free0 (css_type);
			css_type = _tmp16_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_COMMENT:
		{
			gchar* _tmp17_;
			gchar* _tmp18_;
			_tmp17_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp17_;
			_tmp18_ = g_strdup ("main_comment");
			_g_free0 (css_type);
			css_type = _tmp18_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_LANG_PREPROCESSOR:
		{
			gchar* _tmp19_;
			gchar* _tmp20_;
			_tmp19_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp19_;
			_tmp20_ = g_strdup ("main_preprocessor");
			_g_free0 (css_type);
			css_type = _tmp20_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ESCAPE:
		{
			gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp21_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp21_;
			_tmp22_ = g_strdup ("xml_escape");
			_g_free0 (css_type);
			css_type = _tmp22_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ELEMENT:
		{
			gchar* _tmp23_;
			gchar* _tmp24_;
			_tmp23_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp23_;
			_tmp24_ = g_strdup ("xml_element");
			_g_free0 (css_type);
			css_type = _tmp24_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE:
		{
			gchar* _tmp25_;
			gchar* _tmp26_;
			_tmp25_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp25_;
			_tmp26_ = g_strdup ("xml_attribute");
			_g_free0 (css_type);
			css_type = _tmp26_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_ATTRIBUTE_VALUE:
		{
			gchar* _tmp27_;
			gchar* _tmp28_;
			_tmp27_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp27_;
			_tmp28_ = g_strdup ("xml_attribute_value");
			_g_free0 (css_type);
			css_type = _tmp28_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_COMMENT:
		{
			gchar* _tmp29_;
			gchar* _tmp30_;
			_tmp29_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp29_;
			_tmp30_ = g_strdup ("xml_comment");
			_g_free0 (css_type);
			css_type = _tmp30_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_XML_CDATA:
		{
			gchar* _tmp31_;
			gchar* _tmp32_;
			_tmp31_ = g_strdup ("span");
			_g_free0 (tag);
			tag = _tmp31_;
			_tmp32_ = g_strdup ("xml_cdata");
			_g_free0 (css_type);
			css_type = _tmp32_;
			break;
		}
		case VALADOC_CONTENT_RUN_STYLE_NONE:
		{
			break;
		}
		default:
		break;
	}
	_tmp33_ = tag;
	if (_tmp33_ != NULL) {
		ValadocHtmlMarkupWriter* _tmp34_;
		const gchar* _tmp35_;
		gchar* _tmp36_;
		const gchar* _tmp37_;
		gchar* _tmp38_;
		gchar** _tmp39_;
		gchar** _tmp40_;
		gint _tmp40__length1;
		_tmp34_ = self->writer;
		_tmp35_ = tag;
		_tmp36_ = g_strdup ("class");
		_tmp37_ = css_type;
		_tmp38_ = g_strdup (_tmp37_);
		_tmp39_ = g_new0 (gchar*, 2 + 1);
		_tmp39_[0] = _tmp36_;
		_tmp39_[1] = _tmp38_;
		_tmp40_ = _tmp39_;
		_tmp40__length1 = 2;
		valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp34_, _tmp35_, _tmp40_, (gint) 2);
		_tmp40_ = (_vala_array_free (_tmp40_, _tmp40__length1, (GDestroyNotify) g_free), NULL);
	}
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp41_ = tag;
	if (_tmp41_ != NULL) {
		ValadocHtmlMarkupWriter* _tmp42_;
		const gchar* _tmp43_;
		_tmp42_ = self->writer;
		_tmp43_ = tag;
		valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp42_, _tmp43_);
	}
	_g_free0 (css_type);
	_g_free0 (tag);
}

static void
valadoc_html_html_renderer_real_visit_source_code (ValadocContentContentVisitor* base,
                                                   ValadocContentSourceCode* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocHtmlMarkupWriter* _tmp0_;
	ValadocHtmlMarkupWriter* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	ValadocHtmlMarkupWriter* _tmp6_;
	ValadocHtmlMarkupWriter* _tmp7_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = self->writer;
	valadoc_markup_writer_set_wrap ((ValadocMarkupWriter*) _tmp0_, FALSE);
	_tmp1_ = self->writer;
	_tmp2_ = g_strdup ("class");
	_tmp3_ = g_strdup ("main_source");
	_tmp4_ = g_new0 (gchar*, 2 + 1);
	_tmp4_[0] = _tmp2_;
	_tmp4_[1] = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp5__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp1_, "pre", _tmp5_, (gint) 2);
	_tmp5_ = (_vala_array_free (_tmp5_, _tmp5__length1, (GDestroyNotify) g_free), NULL);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp6_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp6_, "pre");
	_tmp7_ = self->writer;
	valadoc_markup_writer_set_wrap ((ValadocMarkupWriter*) _tmp7_, TRUE);
}

static void
valadoc_html_html_renderer_real_visit_table (ValadocContentContentVisitor* base,
                                             ValadocContentTable* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocHtmlMarkupWriter* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	ValadocHtmlMarkupWriter* _tmp5_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = self->writer;
	_tmp1_ = g_strdup ("class");
	_tmp2_ = g_strdup ("main_table");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 2;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "table", _tmp4_, (gint) 2);
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp5_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp5_, "table");
}

static void
valadoc_html_html_renderer_real_visit_table_cell (ValadocContentContentVisitor* base,
                                                  ValadocContentTableCell* element)
{
	ValadocHtmlHtmlRenderer * self;
	gchar* style = NULL;
	gchar* _tmp0_;
	ValadocContentHorizontalAlign _tmp1_;
	ValadocContentHorizontalAlign _tmp2_;
	ValadocContentVerticalAlign _tmp12_;
	ValadocContentVerticalAlign _tmp13_;
	ValadocHtmlMarkupWriter* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gint _tmp27_;
	gint _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gint _tmp31_;
	gint _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	const gchar* _tmp35_;
	gchar* _tmp36_;
	gchar** _tmp37_;
	gchar** _tmp38_;
	gint _tmp38__length1;
	ValadocHtmlMarkupWriter* _tmp39_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = g_strdup ("");
	style = _tmp0_;
	_tmp1_ = valadoc_content_style_attributes_get_horizontal_align ((ValadocContentStyleAttributes*) element);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != VALADOC_CONTENT_HORIZONTAL_ALIGN_NONE) {
		const gchar* _tmp3_;
		ValadocContentHorizontalAlign _tmp4_;
		ValadocContentHorizontalAlign _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp3_ = style;
		_tmp4_ = valadoc_content_style_attributes_get_horizontal_align ((ValadocContentStyleAttributes*) element);
		_tmp5_ = _tmp4_;
		_tmp6_ = valadoc_content_horizontal_align_to_string (_tmp5_);
		_tmp7_ = g_strconcat ("text-align: ", _tmp6_, NULL);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strconcat (_tmp8_, "; ", NULL);
		_tmp10_ = _tmp9_;
		_tmp11_ = g_strconcat (_tmp3_, _tmp10_, NULL);
		_g_free0 (style);
		style = _tmp11_;
		_g_free0 (_tmp10_);
		_g_free0 (_tmp8_);
	}
	_tmp12_ = valadoc_content_style_attributes_get_vertical_align ((ValadocContentStyleAttributes*) element);
	_tmp13_ = _tmp12_;
	if (_tmp13_ != VALADOC_CONTENT_VERTICAL_ALIGN_NONE) {
		const gchar* _tmp14_;
		ValadocContentVerticalAlign _tmp15_;
		ValadocContentVerticalAlign _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp14_ = style;
		_tmp15_ = valadoc_content_style_attributes_get_vertical_align ((ValadocContentStyleAttributes*) element);
		_tmp16_ = _tmp15_;
		_tmp17_ = valadoc_content_vertical_align_to_string (_tmp16_);
		_tmp18_ = g_strconcat ("vertical-align: ", _tmp17_, NULL);
		_tmp19_ = _tmp18_;
		_tmp20_ = g_strconcat (_tmp19_, "; ", NULL);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strconcat (_tmp14_, _tmp21_, NULL);
		_g_free0 (style);
		style = _tmp22_;
		_g_free0 (_tmp21_);
		_g_free0 (_tmp19_);
	}
	_tmp23_ = self->writer;
	_tmp24_ = g_strdup ("class");
	_tmp25_ = g_strdup ("main_table");
	_tmp26_ = g_strdup ("colspan");
	_tmp27_ = valadoc_content_table_cell_get_colspan (element);
	_tmp28_ = _tmp27_;
	_tmp29_ = g_strdup_printf ("%i", _tmp28_);
	_tmp30_ = g_strdup ("rowspan");
	_tmp31_ = valadoc_content_table_cell_get_rowspan (element);
	_tmp32_ = _tmp31_;
	_tmp33_ = g_strdup_printf ("%i", _tmp32_);
	_tmp34_ = g_strdup ("style");
	_tmp35_ = style;
	_tmp36_ = g_strdup (_tmp35_);
	_tmp37_ = g_new0 (gchar*, 8 + 1);
	_tmp37_[0] = _tmp24_;
	_tmp37_[1] = _tmp25_;
	_tmp37_[2] = _tmp26_;
	_tmp37_[3] = _tmp29_;
	_tmp37_[4] = _tmp30_;
	_tmp37_[5] = _tmp33_;
	_tmp37_[6] = _tmp34_;
	_tmp37_[7] = _tmp36_;
	_tmp38_ = _tmp37_;
	_tmp38__length1 = 8;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp23_, "td", _tmp38_, (gint) 8);
	_tmp38_ = (_vala_array_free (_tmp38_, _tmp38__length1, (GDestroyNotify) g_free), NULL);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp39_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp39_, "td");
	_g_free0 (style);
}

static void
valadoc_html_html_renderer_real_visit_table_row (ValadocContentContentVisitor* base,
                                                 ValadocContentTableRow* element)
{
	ValadocHtmlHtmlRenderer * self;
	ValadocHtmlMarkupWriter* _tmp0_;
	ValadocHtmlMarkupWriter* _tmp1_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = self->writer;
	valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) _tmp0_, "tr", NULL, (gint) 0);
	valadoc_content_content_element_accept_children ((ValadocContentContentElement*) element, (ValadocContentContentVisitor*) self);
	_tmp1_ = self->writer;
	valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) _tmp1_, "tr");
}

static void
valadoc_html_html_renderer_real_visit_taglet (ValadocContentContentVisitor* base,
                                              ValadocContentTaglet* element)
{
	ValadocHtmlHtmlRenderer * self;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
}

static void
valadoc_html_html_renderer_real_visit_text (ValadocContentContentVisitor* base,
                                            ValadocContentText* element)
{
	ValadocHtmlHtmlRenderer * self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	self = (ValadocHtmlHtmlRenderer*) base;
	g_return_if_fail (element != NULL);
	_tmp0_ = valadoc_content_text_get_content (element);
	_tmp1_ = _tmp0_;
	valadoc_html_html_renderer_write_string (self, _tmp1_);
}

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

static void
valadoc_html_html_renderer_write_string (ValadocHtmlHtmlRenderer* self,
                                         const gchar* content)
{
	gunichar chr = 0U;
	glong lpos = 0L;
	gint i = 0;
	ValadocHtmlMarkupWriter* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (content != NULL);
	chr = (gunichar) string_get (content, (glong) 0);
	lpos = (glong) 0;
	i = 0;
	{
		gboolean _tmp0_ = FALSE;
		i = 0;
		_tmp0_ = TRUE;
		while (TRUE) {
			if (!_tmp0_) {
				gint _tmp1_;
				_tmp1_ = i;
				i = _tmp1_ + 1;
				chr = (gunichar) string_get (content, (glong) i);
			}
			_tmp0_ = FALSE;
			if (!(chr != ((gunichar) '\0'))) {
				break;
			}
			switch (chr) {
				case '\n':
				{
					ValadocHtmlMarkupWriter* _tmp2_;
					gchar* _tmp3_;
					gchar* _tmp4_;
					ValadocHtmlMarkupWriter* _tmp5_;
					_tmp2_ = self->writer;
					_tmp3_ = string_substring (content, lpos, i - lpos);
					_tmp4_ = _tmp3_;
					valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp2_, _tmp4_);
					_g_free0 (_tmp4_);
					_tmp5_ = self->writer;
					valadoc_markup_writer_simple_tag ((ValadocMarkupWriter*) _tmp5_, "br", NULL, (gint) 0);
					lpos = (glong) (i + 1);
					break;
				}
				case '<':
				{
					ValadocHtmlMarkupWriter* _tmp6_;
					gchar* _tmp7_;
					gchar* _tmp8_;
					ValadocHtmlMarkupWriter* _tmp9_;
					_tmp6_ = self->writer;
					_tmp7_ = string_substring (content, lpos, i - lpos);
					_tmp8_ = _tmp7_;
					valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp6_, _tmp8_);
					_g_free0 (_tmp8_);
					_tmp9_ = self->writer;
					valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp9_, "&lt;");
					lpos = (glong) (i + 1);
					break;
				}
				case '>':
				{
					ValadocHtmlMarkupWriter* _tmp10_;
					gchar* _tmp11_;
					gchar* _tmp12_;
					ValadocHtmlMarkupWriter* _tmp13_;
					_tmp10_ = self->writer;
					_tmp11_ = string_substring (content, lpos, i - lpos);
					_tmp12_ = _tmp11_;
					valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp10_, _tmp12_);
					_g_free0 (_tmp12_);
					_tmp13_ = self->writer;
					valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp13_, "&gt;");
					lpos = (glong) (i + 1);
					break;
				}
				case '&':
				{
					ValadocHtmlMarkupWriter* _tmp14_;
					gchar* _tmp15_;
					gchar* _tmp16_;
					ValadocHtmlMarkupWriter* _tmp17_;
					_tmp14_ = self->writer;
					_tmp15_ = string_substring (content, lpos, i - lpos);
					_tmp16_ = _tmp15_;
					valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp14_, _tmp16_);
					_g_free0 (_tmp16_);
					_tmp17_ = self->writer;
					valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp17_, "&amp;");
					lpos = (glong) (i + 1);
					break;
				}
				default:
				break;
			}
		}
	}
	_tmp18_ = self->writer;
	_tmp19_ = string_substring (content, lpos, i - lpos);
	_tmp20_ = _tmp19_;
	valadoc_markup_writer_text ((ValadocMarkupWriter*) _tmp18_, _tmp20_);
	_g_free0 (_tmp20_);
}

static void
valadoc_html_html_renderer_class_init (ValadocHtmlHtmlRendererClass * klass,
                                       gpointer klass_data)
{
	valadoc_html_html_renderer_parent_class = g_type_class_peek_parent (klass);
	((ValadocContentContentRendererClass *) klass)->render = (void (*) (ValadocContentContentRenderer*, ValadocContentContentElement*)) valadoc_html_html_renderer_real_render;
	((ValadocContentContentRendererClass *) klass)->render_children = (void (*) (ValadocContentContentRenderer*, ValadocContentContentElement*)) valadoc_html_html_renderer_real_render_children;
	((ValadocContentContentVisitorClass *) klass)->visit_comment = (void (*) (ValadocContentContentVisitor*, ValadocContentComment*)) valadoc_html_html_renderer_real_visit_comment;
	((ValadocContentContentVisitorClass *) klass)->visit_embedded = (void (*) (ValadocContentContentVisitor*, ValadocContentEmbedded*)) valadoc_html_html_renderer_real_visit_embedded;
	((ValadocContentContentVisitorClass *) klass)->visit_headline = (void (*) (ValadocContentContentVisitor*, ValadocContentHeadline*)) valadoc_html_html_renderer_real_visit_headline;
	((ValadocContentContentVisitorClass *) klass)->visit_wiki_link = (void (*) (ValadocContentContentVisitor*, ValadocContentWikiLink*)) valadoc_html_html_renderer_real_visit_wiki_link;
	((ValadocContentContentVisitorClass *) klass)->visit_link = (void (*) (ValadocContentContentVisitor*, ValadocContentLink*)) valadoc_html_html_renderer_real_visit_link;
	((ValadocContentContentVisitorClass *) klass)->visit_symbol_link = (void (*) (ValadocContentContentVisitor*, ValadocContentSymbolLink*)) valadoc_html_html_renderer_real_visit_symbol_link;
	((ValadocContentContentVisitorClass *) klass)->visit_list = (void (*) (ValadocContentContentVisitor*, ValadocContentList*)) valadoc_html_html_renderer_real_visit_list;
	((ValadocContentContentVisitorClass *) klass)->visit_list_item = (void (*) (ValadocContentContentVisitor*, ValadocContentListItem*)) valadoc_html_html_renderer_real_visit_list_item;
	((ValadocContentContentVisitorClass *) klass)->visit_page = (void (*) (ValadocContentContentVisitor*, ValadocContentPage*)) valadoc_html_html_renderer_real_visit_page;
	((ValadocContentContentVisitorClass *) klass)->visit_paragraph = (void (*) (ValadocContentContentVisitor*, ValadocContentParagraph*)) valadoc_html_html_renderer_real_visit_paragraph;
	((ValadocContentContentVisitorClass *) klass)->visit_warning = (void (*) (ValadocContentContentVisitor*, ValadocContentWarning*)) valadoc_html_html_renderer_real_visit_warning;
	((ValadocContentContentVisitorClass *) klass)->visit_note = (void (*) (ValadocContentContentVisitor*, ValadocContentNote*)) valadoc_html_html_renderer_real_visit_note;
	((ValadocContentContentVisitorClass *) klass)->visit_run = (void (*) (ValadocContentContentVisitor*, ValadocContentRun*)) valadoc_html_html_renderer_real_visit_run;
	((ValadocContentContentVisitorClass *) klass)->visit_source_code = (void (*) (ValadocContentContentVisitor*, ValadocContentSourceCode*)) valadoc_html_html_renderer_real_visit_source_code;
	((ValadocContentContentVisitorClass *) klass)->visit_table = (void (*) (ValadocContentContentVisitor*, ValadocContentTable*)) valadoc_html_html_renderer_real_visit_table;
	((ValadocContentContentVisitorClass *) klass)->visit_table_cell = (void (*) (ValadocContentContentVisitor*, ValadocContentTableCell*)) valadoc_html_html_renderer_real_visit_table_cell;
	((ValadocContentContentVisitorClass *) klass)->visit_table_row = (void (*) (ValadocContentContentVisitor*, ValadocContentTableRow*)) valadoc_html_html_renderer_real_visit_table_row;
	((ValadocContentContentVisitorClass *) klass)->visit_taglet = (void (*) (ValadocContentContentVisitor*, ValadocContentTaglet*)) valadoc_html_html_renderer_real_visit_taglet;
	((ValadocContentContentVisitorClass *) klass)->visit_text = (void (*) (ValadocContentContentVisitor*, ValadocContentText*)) valadoc_html_html_renderer_real_visit_text;
	G_OBJECT_CLASS (klass)->finalize = valadoc_html_html_renderer_finalize;
}

static void
valadoc_html_html_renderer_instance_init (ValadocHtmlHtmlRenderer * self,
                                          gpointer klass)
{
}

static void
valadoc_html_html_renderer_finalize (GObject * obj)
{
	ValadocHtmlHtmlRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_HTML_TYPE_HTML_RENDERER, ValadocHtmlHtmlRenderer);
	_g_object_unref0 (self->_container);
	_g_object_unref0 (self->_owner);
	_g_object_unref0 (self->cssresolver);
	_g_object_unref0 (self->linker);
	_g_object_unref0 (self->settings);
	G_OBJECT_CLASS (valadoc_html_html_renderer_parent_class)->finalize (obj);
}

static GType
valadoc_html_html_renderer_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValadocHtmlHtmlRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_html_html_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocHtmlHtmlRenderer), 0, (GInstanceInitFunc) valadoc_html_html_renderer_instance_init, NULL };
	GType valadoc_html_html_renderer_type_id;
	valadoc_html_html_renderer_type_id = g_type_register_static (VALADOC_CONTENT_TYPE_CONTENT_RENDERER, "ValadocHtmlHtmlRenderer", &g_define_type_info, 0);
	return valadoc_html_html_renderer_type_id;
}

GType
valadoc_html_html_renderer_get_type (void)
{
	static volatile gsize valadoc_html_html_renderer_type_id__once = 0;
	if (g_once_init_enter (&valadoc_html_html_renderer_type_id__once)) {
		GType valadoc_html_html_renderer_type_id;
		valadoc_html_html_renderer_type_id = valadoc_html_html_renderer_get_type_once ();
		g_once_init_leave (&valadoc_html_html_renderer_type_id__once, valadoc_html_html_renderer_type_id);
	}
	return valadoc_html_html_renderer_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

