/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/docutils_rstgen.o compiler/nimcache/docutils_rstgen.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>

#include <dirent.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <sys/time.h>

#include <stdio.h>
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tcell41090 tcell41090;
typedef struct TNimType TNimType;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct trstgenerator309012 trstgenerator309012;
typedef struct trstnode297009 trstnode297009;
typedef struct trstnodeseq297007 trstnodeseq297007;
typedef struct TNimObject TNimObject;
typedef struct TNimNode TNimNode;
typedef struct tstringtable121810 tstringtable121810;
typedef struct TY309028 TY309028;
typedef struct ttocentry309008 ttocentry309008;
typedef struct tgeneraltokenizer305015 tgeneraltokenizer305015;
typedef struct TY309574 TY309574;
typedef struct tindexentry309505 tindexentry309505;
typedef struct TY110805 TY110805;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
typedef struct tkeyvaluepairseq121808 tkeyvaluepairseq121808;
typedef struct tkeyvaluepair121806 tkeyvaluepair121806;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  trstnode297009  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq297007* Sons;
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  ttocentry309008  {
trstnode297009* N;
NimStringDesc* Refname;
NimStringDesc* Header;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler298018) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler298016) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef NimStringDesc* TY309036[5];
struct  trstgenerator309012  {
  TNimObject Sup;
NU8 Target;
tstringtable121810* Config;
NI Splitafter;
TY309028* Tocpart;
NIM_BOOL Hastoc;
NimStringDesc* Theindex;
NU8 Options;
tfindfilehandler298018 Findfile;
tmsghandler298016 Msghandler;
NimStringDesc* Filename;
TY309036 Meta;
NimStringDesc* Currentsection;
};
typedef NimStringDesc* TY165283[4];
typedef NimStringDesc* TY165002[1];
typedef NimStringDesc* TY137892[2];
typedef NimStringDesc* TY523288[1];
struct  tgeneraltokenizer305015  {
  TNimObject Sup;
NU8 Kind;
NI Start;
NI Length;
NCSTRING Buf;
NI Pos;
NU8 State;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef NimStringDesc* TY305071[33];
struct  tindexentry309505  {
NimStringDesc* Keyword;
NimStringDesc* Link;
NimStringDesc* Linktitle;
NimStringDesc* Linkdesc;
};
typedef NIM_CHAR TY97549[256];
typedef NimStringDesc* TY173034[3];
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct tkeyvaluepair121806 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct  tstringtable121810  {
  TNimObject Sup;
NI Counter;
tkeyvaluepairseq121808* Data;
NU8 Mode;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct trstnodeseq297007 {
  TGenericSeq Sup;
  trstnode297009* data[SEQ_DECL_SIZE];
};
struct TY309028 {
  TGenericSeq Sup;
  ttocentry309008 data[SEQ_DECL_SIZE];
};
struct TY309574 {
  TGenericSeq Sup;
  tindexentry309505 data[SEQ_DECL_SIZE];
};
struct TY110805 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct tkeyvaluepairseq121808 {
  TGenericSeq Sup;
  tkeyvaluepair121806 data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
N_NIMCALL(void, renderaux_309347)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(NI, len_297080)(trstnode297009* n);
N_NIMCALL(void, renderrsttoout_309339)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(void, renderheadline_309882)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(NimStringDesc*, rstnodetorefname_298051)(trstnode297009* n);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, dispa_309319)(NU8 target, NimStringDesc** dest, NimStringDesc* xml, NimStringDesc* tex, NimStringDesc** args, NI argsLen0);
N_NIMCALL(void, nsuAddf)(NimStringDesc** s, NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, nimCharToStr)(NIM_CHAR x);
N_NIMCALL(void, renderoverline_309965)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(void, renderaux_309373)(trstgenerator309012* d, trstnode297009* n, NimStringDesc* frmta, NimStringDesc* frmtb, NimStringDesc** result);
N_NIMCALL(void, renderfield_310282)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, addnodes_298055)(trstnode297009* n);
N_NIMCALL(NimStringDesc*, esc_309216)(NU8 target, NimStringDesc* s, NI splitafter);
N_NIMCALL(NI, nextsplitpoint_309160)(NimStringDesc* s, NI start);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
static N_INLINE(void, escchar_309152)(NU8 target, NimStringDesc** dest, NIM_CHAR c);
N_NIMCALL(void, addxmlchar_309128)(NimStringDesc** dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, addtexchar_309142)(NimStringDesc** dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
N_NOINLINE(void, raiseassert_79492)(NimStringDesc* msg);
N_NIMCALL(NimStringDesc*, texcolumns_310258)(trstnode297009* n);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(trstnode297009*, lastson_297146)(trstnode297009* n);
N_NIMCALL(void, renderimage_310094)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, getfieldvalue_298059)(trstnode297009* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, dispf_309300)(NU8 target, NimStringDesc* xml, NimStringDesc* tex, NimStringDesc** args, NI argsLen0);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, getargument_298064)(trstnode297009* n);
N_NIMCALL(void, rendercodeblock_310150)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(NU8, getsourcelanguage_305080)(NimStringDesc* name);
N_NIMCALL(void, initgeneraltokenizer_305192)(tgeneraltokenizer305015* g, NimStringDesc* buf);
N_NIMCALL(void, getnexttoken_308067)(tgeneraltokenizer305015* g, NU8 lang);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_70624, NI last);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI first, NI last);
N_NIMCALL(void, deinitgeneraltokenizer_305199)(tgeneraltokenizer305015* g);
N_NIMCALL(void, rendercontainer_310239)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(void, renderindexterm_309489)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(NI, hash_309446)(trstnode297009* n);
N_NIMCALL(NI, hash_119827)(NimStringDesc* x);
static N_INLINE(NI, HEX21HEX26_119015)(NI h, NI val);
static N_INLINE(NI, HEX21HEX24_119040)(NI h);
N_NIMCALL(void, setindexterm_309433)(trstgenerator309012* d, NimStringDesc* id, NimStringDesc* term, NimStringDesc* linktitle, NimStringDesc* linkdesc);
N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, nosextractFilename)(NimStringDesc* path);
N_NIMCALL(NimStringDesc*, quoteindexcolumn_309421)(NimStringDesc* text);
N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s, NimStringDesc* sub, NimStringDesc* by);
N_NIMCALL(void, rendersmiley_310138)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP4332)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(NimStringDesc*, nstGet)(tstringtable121810* t, NimStringDesc* key);
N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s);
N_NIMCALL(void, rendertocentry_310044)(trstgenerator309012* d, ttocentry309008 e, NimStringDesc** result);
N_NIMCALL(void, rendertocentries_310056)(trstgenerator309012* d, NI* j, NI lvl, NimStringDesc** result);
N_NIMCALL(void, writefile_10443)(NimStringDesc* filename, NimStringDesc* content);
N_NIMCALL(void, TMP4486)(void* p, NI op);
N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_NIMCALL(NimStringDesc*, HEX2F_108477)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s, NimStringDesc* suffix);
N_NIMCALL(FILE*, open_10217)(NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_10487)(FILE* f, NimStringDesc** line);
N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s, NIM_CHAR sub, NI start);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI start);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI first);
N_NIMCALL(TY110805*, nsuSplitChar)(NimStringDesc* s, NIM_CHAR sep);
N_NIMCALL(NimStringDesc*, unquoteindexcolumn_309427)(NimStringDesc* text);
N_NIMCALL(void, sortindex_309525)(tindexentry309505* a, NI aLen0);
N_NIMCALL(void, HEX3CHEX2D_309518)(tindexentry309505* a, tindexentry309505 b);
N_NIMCALL(NI, cmp_309511)(tindexentry309505 a, tindexentry309505 b);
STRING_LITERAL(TMP876, "<wbr />", 7);
STRING_LITERAL(TMP1988, "", 0);
STRING_LITERAL(TMP1990, "\012<h$1><a class=\"toc-backref\" id=\"$2\" href=\"#$2_toc\">$3</a></h$1"
">", 64);
STRING_LITERAL(TMP1991, "\\rsth$4{$3}\\label{$2}\012", 22);
STRING_LITERAL(TMP1992, "\012<h$1 id=\"$2\">$3</h$1>", 22);
STRING_LITERAL(TMP1993, "<h$1 id=\"$2\"><center>$3</center></h$1>", 38);
STRING_LITERAL(TMP1994, "\\rstov$4{$3}\\label{$2}\012", 23);
STRING_LITERAL(TMP1995, "<hr />\012", 7);
STRING_LITERAL(TMP1996, "\\hrule\012", 7);
STRING_LITERAL(TMP1997, "<p>$1</p>\012", 10);
STRING_LITERAL(TMP1998, "$1\012\012", 4);
STRING_LITERAL(TMP1999, "<ul class=\"simple\">$1</ul>\012", 27);
STRING_LITERAL(TMP2000, "\\begin{itemize}$1\\end{itemize}\012", 31);
STRING_LITERAL(TMP2001, "<li>$1</li>\012", 12);
STRING_LITERAL(TMP2002, "\\item $1\012", 9);
STRING_LITERAL(TMP2003, "<ol class=\"simple\">$1</ol>\012", 27);
STRING_LITERAL(TMP2004, "\\begin{enumerate}$1\\end{enumerate}\012", 35);
STRING_LITERAL(TMP2005, "<dl class=\"docutils\">$1</dl>\012", 29);
STRING_LITERAL(TMP2006, "\\begin{description}$1\\end{description}\012", 39);
STRING_LITERAL(TMP2007, "<dt>$1</dt>\012", 12);
STRING_LITERAL(TMP2008, "\\item[$1] ", 10);
STRING_LITERAL(TMP2009, "<dd>$1</dd>\012", 12);
STRING_LITERAL(TMP2010, "$1\012", 3);
STRING_LITERAL(TMP2011, "<table class=\"docinfo\" frame=\"void\" rules=\"none\"><col class=\"do"
"cinfo-name\" /><col class=\"docinfo-content\" /><tbody valign=\"top\""
">$1</tbody></table>", 146);
STRING_LITERAL(TMP2012, " ", 1);
STRING_LITERAL(TMP2013, "&amp;", 5);
STRING_LITERAL(TMP2014, "&lt;", 4);
STRING_LITERAL(TMP2015, "&gt;", 4);
STRING_LITERAL(TMP2016, "&quot;", 6);
STRING_LITERAL(TMP2017, "\\_", 2);
STRING_LITERAL(TMP2018, "\\symbol{123}", 12);
STRING_LITERAL(TMP2019, "\\symbol{125}", 12);
STRING_LITERAL(TMP2020, "\\symbol{91}", 11);
STRING_LITERAL(TMP2021, "\\symbol{93}", 11);
STRING_LITERAL(TMP2022, "\\symbol{92}", 11);
STRING_LITERAL(TMP2023, "\\$", 2);
STRING_LITERAL(TMP2024, "\\&", 2);
STRING_LITERAL(TMP2025, "\\#", 2);
STRING_LITERAL(TMP2026, "\\%", 2);
STRING_LITERAL(TMP2027, "\\symbol{126}", 12);
STRING_LITERAL(TMP2028, "\\symbol{64}", 11);
STRING_LITERAL(TMP2029, "\\symbol{94}", 11);
STRING_LITERAL(TMP2030, "\\symbol{96}", 11);
STRING_LITERAL(TMP2031, "author", 6);
STRING_LITERAL(TMP2032, "authors", 7);
STRING_LITERAL(TMP2033, "version", 7);
STRING_LITERAL(TMP2034, "<tr>$1</tr>\012", 12);
STRING_LITERAL(TMP2035, "$1", 2);
STRING_LITERAL(TMP2036, "<th class=\"docinfo-name\">$1:</th>", 33);
STRING_LITERAL(TMP2037, "\\item[$1:]", 10);
STRING_LITERAL(TMP2038, "<td>$1</td>", 11);
STRING_LITERAL(TMP2039, " $1\012", 4);
STRING_LITERAL(TMP2040, "<table frame=\"void\">$1</table>", 30);
STRING_LITERAL(TMP2041, "\\begin{description}\012$1\\end{description}\012", 40);
STRING_LITERAL(TMP2042, "<th align=\"left\">$1</th>", 24);
STRING_LITERAL(TMP2043, "\\item[$1]", 9);
STRING_LITERAL(TMP2044, "<td align=\"left\">$1</td>\012", 25);
STRING_LITERAL(TMP2046, "false renderRstToOut", 20);
STRING_LITERAL(TMP2047, "<pre>$1</pre>\012", 14);
STRING_LITERAL(TMP2048, "\\begin{rstpre}\012$1\012\\end{rstpre}\012", 31);
STRING_LITERAL(TMP2049, "<p>$1</p>", 9);
STRING_LITERAL(TMP2050, "$1<br />", 8);
STRING_LITERAL(TMP2051, "$1\\\\\012", 5);
STRING_LITERAL(TMP2052, "<blockquote><p>$1</p></blockquote>\012", 35);
STRING_LITERAL(TMP2053, "\\begin{quote}$1\\end{quote}\012", 27);
STRING_LITERAL(TMP2054, "<table border=\"1\" class=\"docutils\">$1</table>", 45);
STRING_LITERAL(TMP2055, "\\begin{table}\\begin{rsttab}{", 28);
STRING_LITERAL(TMP2056, "|X", 2);
STRING_LITERAL(TMP2057, "|}\012\\hline\012$1\\end{rsttab}\\end{table}", 35);
STRING_LITERAL(TMP2058, " & ", 3);
STRING_LITERAL(TMP2059, "\\\\\012\\hline\012", 10);
STRING_LITERAL(TMP2060, "<tr>", 4);
STRING_LITERAL(TMP2061, "</tr>\012", 6);
STRING_LITERAL(TMP2062, "<th>$1</th>", 11);
STRING_LITERAL(TMP2063, "\\textbf{$1}", 11);
STRING_LITERAL(TMP2064, "<a class=\"reference external\" href=\"#$2\">$1</a>", 47);
STRING_LITERAL(TMP2065, "$1\\ref{$2}", 10);
STRING_LITERAL(TMP2066, "<a class=\"reference external\" href=\"$1\">$1</a>", 46);
STRING_LITERAL(TMP2067, "\\href{$1}{$1}", 13);
STRING_LITERAL(TMP2068, "<a class=\"reference external\" href=\"$2\">$1</a>", 46);
STRING_LITERAL(TMP2069, "\\href{$2}{$1}", 13);
STRING_LITERAL(TMP2071, "scale", 5);
STRING_LITERAL(TMP2072, " scale=\"$1\"", 11);
STRING_LITERAL(TMP2073, " scale=$1", 9);
STRING_LITERAL(TMP2074, "height", 6);
STRING_LITERAL(TMP2075, " height=\"$1\"", 12);
STRING_LITERAL(TMP2076, " height=$1", 10);
STRING_LITERAL(TMP2077, "width", 5);
STRING_LITERAL(TMP2078, " width=\"$1\"", 11);
STRING_LITERAL(TMP2079, " width=$1", 9);
STRING_LITERAL(TMP2080, "alt", 3);
STRING_LITERAL(TMP2081, " alt=\"$1\"", 9);
STRING_LITERAL(TMP2082, "align", 5);
STRING_LITERAL(TMP2083, " align=\"$1\"", 11);
STRING_LITERAL(TMP2084, "[$1]", 4);
STRING_LITERAL(TMP2085, "<img src=\"$1\"$2 />", 18);
STRING_LITERAL(TMP2086, "\\includegraphics$2{$1}", 22);
STRING_LITERAL(TMP2093, "<pre>", 5);
STRING_LITERAL(TMP2094, "\\begin{rstpre}\012", 15);
STRING_LITERAL(TMP2254, "<span class=\"$2\">$1</span>", 26);
STRING_LITERAL(TMP2255, "\\span$2{$1}", 11);
extern NIM_CONST TY305071 tokenclasstostr_305070;
STRING_LITERAL(TMP2289, "</pre>", 6);
STRING_LITERAL(TMP2290, "\012\\end{rstpre}\012", 14);
STRING_LITERAL(TMP2291, "<div>$1</div>", 13);
STRING_LITERAL(TMP2292, "<div class=\"$1\">$2</div>", 24);
STRING_LITERAL(TMP2293, "$2", 2);
STRING_LITERAL(TMP2294, "|$1|", 4);
STRING_LITERAL(TMP2295, "<sub>$1</sub>", 13);
STRING_LITERAL(TMP2296, "\\rstsub{$1}", 11);
STRING_LITERAL(TMP2297, "<sup>$1</sup>", 13);
STRING_LITERAL(TMP2298, "\\rstsup{$1}", 11);
STRING_LITERAL(TMP2299, "<em>$1</em>", 11);
STRING_LITERAL(TMP2300, "\\emph{$1}", 9);
STRING_LITERAL(TMP2301, "<strong>$1</strong>", 19);
STRING_LITERAL(TMP2302, "<strong><em>$1</em></strong>", 28);
STRING_LITERAL(TMP2303, "\\textbf{emph{$1}}", 17);
STRING_LITERAL(TMP2304, "<cite>$1</cite>", 15);
STRING_LITERAL(TMP2305, "html", 4);
STRING_LITERAL(TMP2306, "\\", 1);
STRING_LITERAL(TMP2307, "\\\\", 2);
STRING_LITERAL(TMP2308, "\012", 1);
STRING_LITERAL(TMP2309, "\\n", 2);
STRING_LITERAL(TMP2310, "\011", 1);
STRING_LITERAL(TMP2311, "\\t", 2);
STRING_LITERAL(TMP2312, "<span id=\"$1\">$2</span>", 23);
STRING_LITERAL(TMP2313, "$2\\label{$1}", 12);
STRING_LITERAL(TMP2314, "<tt class=\"docutils literal\"><span class=\"pre\">$1</span></tt>", 61);
STRING_LITERAL(TMP2315, "\\texttt{$1}", 11);
STRING_LITERAL(TMP2316, "<img src=\"/images/smilies/$1.gif\" width=\"15\" \012        height=\"1"
"7\" hspace=\"2\" vspace=\"2\" />", 90);
STRING_LITERAL(TMP2317, "\\includegraphics{$1}", 20);
STRING_LITERAL(TMP4335, "split.item.toc", 14);
STRING_LITERAL(TMP4406, "<li><a class=\"reference\" id=\"$1_toc\" href=\"#$1\">$2</a></li>\012", 60);
STRING_LITERAL(TMP4407, "\\item\\label{$1_toc} $2\\ref{$1}\012", 31);
STRING_LITERAL(TMP4408, "<ul class=\"simple\">$1</ul>", 26);
STRING_LITERAL(TMP4409, "\\begin{enumerate}$1\\end{enumerate}", 34);
STRING_LITERAL(TMP4487, ".", 1);
STRING_LITERAL(TMP4488, "..", 2);
STRING_LITERAL(TMP4489, ".idx", 4);
STRING_LITERAL(TMP4490, "<dt><span>$1</span></dt><ul class=\"simple\"><dd>\012", 48);
STRING_LITERAL(TMP4491, "<li><a class=\"reference external\"\012          title=\"$3\" href=\"$1"
"\">$2</a></li>\012          ", 87);
STRING_LITERAL(TMP4492, "<li><a class=\"reference external\" href=\"$1\">$2</a></li>\012       "
"   ", 66);
STRING_LITERAL(TMP4493, "</ul></dd>\012", 11);
NimStringDesc* splitter_309149;
extern tgcheap43016 gch_43044;
extern TNimType NTI305015; /* TGeneralTokenizer */
extern TNimType NTI2409; /* TObject */
TNimType NTI309012; /* TRstGenerator */
TNimType NTI309006; /* TOutputTarget */
extern TNimType NTI121812; /* PStringTable */
extern TNimType NTI106; /* int */
TNimType NTI309008; /* TTocEntry */
extern TNimType NTI297005; /* PRstNode */
extern TNimType NTI143; /* string */
TNimType NTI309028; /* seq[TTocEntry] */
extern TNimType NTI134; /* bool */
extern TNimType NTI298010; /* TRstParseOptions */
extern TNimType NTI298018; /* TFindFileHandler */
extern TNimType NTI298016; /* TMsgHandler */
TNimType NTI309036; /* array[TMetaEnum, string] */
TNimType NTI309505; /* TIndexEntry */
TNimType NTI309574; /* seq[TIndexEntry] */

static N_INLINE(tcell41090*, usrtocell_44443)(void* usr) {
	tcell41090* result;
	result = 0;
	result = ((tcell41090*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(tcell41090))))));
	return result;
}

static N_INLINE(void, rtladdzct_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41090* c;
	c = usrtocell_44443(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	LA3: ;
}

N_NIMCALL(void, renderaux_309347)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	NI i_309365;
	NI HEX3Atmp_309366;
	NI LOC1;
	NI res_309368;
	i_309365 = 0;
	HEX3Atmp_309366 = 0;
	LOC1 = 0;
	LOC1 = len_297080(n);
	HEX3Atmp_309366 = (NI32)(LOC1 - 1);
	res_309368 = 0;
	while (1) {
		if (!(res_309368 <= HEX3Atmp_309366)) goto LA2;
		i_309365 = res_309368;
		renderrsttoout_309339(d, (*n).Sons->data[i_309365], result);
		res_309368 += 1;
	} LA2: ;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell41090* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_44443(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell41090* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_44443((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			rtladdzct_46002(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, dispa_309319)(NU8 target, NimStringDesc** dest, NimStringDesc* xml, NimStringDesc* tex, NimStringDesc** args, NI argsLen0) {
	{
		if (!!((target == ((NU8) 1)))) goto LA3;
		nsuAddf(dest, xml, args, argsLen0);
	}
	goto LA1;
	LA3: ;
	{
		nsuAddf(dest, tex, args, argsLen0);
	}
	LA1: ;
}

N_NIMCALL(void, renderheadline_309882)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	NimStringDesc* tmp;
	NI i_309901;
	NI HEX3Atmp_309958;
	NI LOC1;
	NI res_309960;
	NimStringDesc* refname;
	tmp = copyString(((NimStringDesc*) &TMP1988));
	i_309901 = 0;
	HEX3Atmp_309958 = 0;
	LOC1 = 0;
	LOC1 = len_297080(n);
	HEX3Atmp_309958 = (NI32)(LOC1 - 1);
	res_309960 = 0;
	while (1) {
		if (!(res_309960 <= HEX3Atmp_309958)) goto LA2;
		i_309901 = res_309960;
		renderrsttoout_309339(d, (*n).Sons->data[i_309901], &tmp);
		res_309960 += 1;
	} LA2: ;
	unsureAsgnRef((void**) &(*d).Currentsection, copyString(tmp));
	refname = rstnodetorefname_298051(n);
	{
		NI length;
		NimStringDesc* LOC7;
		NimStringDesc* LOC8;
		TY165283 LOC9;
		if (!(*d).Hastoc) goto LA5;
		length = (*d).Tocpart->Sup.len;
		(*d).Tocpart = (TY309028*) setLengthSeq(&((*d).Tocpart)->Sup, sizeof(ttocentry309008), (NI32)(length + 1));
		LOC7 = 0;
		LOC7 = (*d).Tocpart->data[length].Refname; (*d).Tocpart->data[length].Refname = copyStringRC1(refname);
		if (LOC7) nimGCunrefNoCycle(LOC7);
		asgnRefNoCycle((void**) &(*d).Tocpart->data[length].N, n);
		LOC8 = 0;
		LOC8 = (*d).Tocpart->data[length].Header; (*d).Tocpart->data[length].Header = copyStringRC1(tmp);
		if (LOC8) nimGCunrefNoCycle(LOC8);
		memset((void*)LOC9, 0, sizeof(LOC9));
		LOC9[0] = nimIntToStr((*n).Level);
		LOC9[1] = copyString((*d).Tocpart->data[length].Refname);
		LOC9[2] = copyString(tmp);
		LOC9[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI32)((NI32)((*n).Level - 1) + 65))))));
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP1990), ((NimStringDesc*) &TMP1991), LOC9, 4);
	}
	goto LA3;
	LA5: ;
	{
		TY165283 LOC11;
		memset((void*)LOC11, 0, sizeof(LOC11));
		LOC11[0] = nimIntToStr((*n).Level);
		LOC11[1] = copyString(refname);
		LOC11[2] = copyString(tmp);
		LOC11[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI32)((NI32)((*n).Level - 1) + 65))))));
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP1992), ((NimStringDesc*) &TMP1991), LOC11, 4);
	}
	LA3: ;
}

N_NIMCALL(void, renderoverline_309965)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	{
		NI i_309983;
		NI HEX3Atmp_310027;
		NI LOC5;
		NI res_310029;
		if (!((*d).Meta[(((NU8) 1))- 0]->Sup.len == 0)) goto LA3;
		unsureAsgnRef((void**) &(*d).Currentsection, copyString((*d).Meta[(((NU8) 1))- 0]));
		i_309983 = 0;
		HEX3Atmp_310027 = 0;
		LOC5 = 0;
		LOC5 = len_297080(n);
		HEX3Atmp_310027 = (NI32)(LOC5 - 1);
		res_310029 = 0;
		while (1) {
			if (!(res_310029 <= HEX3Atmp_310027)) goto LA6;
			i_309983 = res_310029;
			renderrsttoout_309339(d, (*n).Sons->data[i_309983], &(*d).Meta[(((NU8) 1))- 0]);
			res_310029 += 1;
		} LA6: ;
	}
	goto LA1;
	LA3: ;
	{
		NI i_309997;
		NI HEX3Atmp_310031;
		NI LOC10;
		NI res_310033;
		if (!((*d).Meta[(((NU8) 2))- 0]->Sup.len == 0)) goto LA8;
		unsureAsgnRef((void**) &(*d).Currentsection, copyString((*d).Meta[(((NU8) 2))- 0]));
		i_309997 = 0;
		HEX3Atmp_310031 = 0;
		LOC10 = 0;
		LOC10 = len_297080(n);
		HEX3Atmp_310031 = (NI32)(LOC10 - 1);
		res_310033 = 0;
		while (1) {
			if (!(res_310033 <= HEX3Atmp_310031)) goto LA11;
			i_309997 = res_310033;
			renderrsttoout_309339(d, (*n).Sons->data[i_309997], &(*d).Meta[(((NU8) 2))- 0]);
			res_310033 += 1;
		} LA11: ;
	}
	goto LA1;
	LA8: ;
	{
		NimStringDesc* tmp;
		NI i_310012;
		NI HEX3Atmp_310035;
		NI LOC13;
		NI res_310037;
		TY165283 LOC15;
		tmp = copyString(((NimStringDesc*) &TMP1988));
		i_310012 = 0;
		HEX3Atmp_310035 = 0;
		LOC13 = 0;
		LOC13 = len_297080(n);
		HEX3Atmp_310035 = (NI32)(LOC13 - 1);
		res_310037 = 0;
		while (1) {
			if (!(res_310037 <= HEX3Atmp_310035)) goto LA14;
			i_310012 = res_310037;
			renderrsttoout_309339(d, (*n).Sons->data[i_310012], &tmp);
			res_310037 += 1;
		} LA14: ;
		unsureAsgnRef((void**) &(*d).Currentsection, copyString(tmp));
		memset((void*)LOC15, 0, sizeof(LOC15));
		LOC15[0] = nimIntToStr((*n).Level);
		LOC15[1] = rstnodetorefname_298051(n);
		LOC15[2] = copyString(tmp);
		LOC15[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI32)((NI32)((*n).Level - 1) + 65))))));
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP1993), ((NimStringDesc*) &TMP1994), LOC15, 4);
	}
	LA1: ;
}

N_NIMCALL(void, renderaux_309373)(trstgenerator309012* d, trstnode297009* n, NimStringDesc* frmta, NimStringDesc* frmtb, NimStringDesc** result) {
	NimStringDesc* tmp;
	NI i_309394;
	NI HEX3Atmp_309413;
	NI LOC1;
	NI res_309415;
	tmp = copyString(((NimStringDesc*) &TMP1988));
	i_309394 = 0;
	HEX3Atmp_309413 = 0;
	LOC1 = 0;
	LOC1 = len_297080(n);
	HEX3Atmp_309413 = (NI32)(LOC1 - 1);
	res_309415 = 0;
	while (1) {
		if (!(res_309415 <= HEX3Atmp_309413)) goto LA2;
		i_309394 = res_309415;
		renderrsttoout_309339(d, (*n).Sons->data[i_309394], &tmp);
		res_309415 += 1;
	} LA2: ;
	{
		TY165002 LOC7;
		if (!!(((*d).Target == ((NU8) 1)))) goto LA5;
		memset((void*)LOC7, 0, sizeof(LOC7));
		LOC7[0] = copyString(tmp);
		nsuAddf(result, frmta, LOC7, 1);
	}
	goto LA3;
	LA5: ;
	{
		TY165002 LOC9;
		memset((void*)LOC9, 0, sizeof(LOC9));
		LOC9[0] = copyString(tmp);
		nsuAddf(result, frmtb, LOC9, 1);
	}
	LA3: ;
}

N_NIMCALL(NI, nextsplitpoint_309160)(NimStringDesc* s, NI start) {
	NI result;
	result = 0;
	result = start;
	while (1) {
		if (!(result < (NI32)(s->Sup.len + 0))) goto LA1;
		switch (((NU8)(s->data[result]))) {
		case 95:
		{
			goto BeforeRet;
		}
		break;
		case 97 ... 122:
		{
			{
				if (!((NI32)(result + 1) < (NI32)(s->Sup.len + 0))) goto LA6;
				{
					if (!(((NU8)(s->data[(NI32)(result + 1)])) >= ((NU8)(65)) && ((NU8)(s->data[(NI32)(result + 1)])) <= ((NU8)(90)))) goto LA10;
					goto BeforeRet;
				}
				LA10: ;
			}
			LA6: ;
		}
		break;
		default:
		{
		}
		break;
		}
		result += 1;
	} LA1: ;
	result -= 1;
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NIM_BOOL LOC11;
	int LOC13;
	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == NIM_NIL);
		if (LOC7) goto LA8;
		LOC7 = (b == NIM_NIL);
		LA8: ;
		if (!LOC7) goto LA9;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA9: ;
	LOC11 = 0;
	LOC11 = ((*a).Sup.len == (*b).Sup.len);
	if (!(LOC11)) goto LA12;
	LOC13 = 0;
	LOC13 = memcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)), (NI32)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	memcpy(((NCSTRING) (&(*dest).data[((*dest).Sup.len)- 0])), ((NCSTRING) ((*src).data)), (NI32)((*src).Sup.len + 1));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(void, addxmlchar_309128)(NimStringDesc** dest, NIM_CHAR c) {
	switch (((NU8)(c))) {
	case 38:
	{
		(*dest) = resizeString((*dest), 5);
appendString((*dest), ((NimStringDesc*) &TMP2013));
	}
	break;
	case 60:
	{
		(*dest) = resizeString((*dest), 4);
appendString((*dest), ((NimStringDesc*) &TMP2014));
	}
	break;
	case 62:
	{
		(*dest) = resizeString((*dest), 4);
appendString((*dest), ((NimStringDesc*) &TMP2015));
	}
	break;
	case 34:
	{
		(*dest) = resizeString((*dest), 6);
appendString((*dest), ((NimStringDesc*) &TMP2016));
	}
	break;
	default:
	{
		(*dest) = addChar((*dest), c);
	}
	break;
	}
}

N_NIMCALL(void, addtexchar_309142)(NimStringDesc** dest, NIM_CHAR c) {
	switch (((NU8)(c))) {
	case 95:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2017));
	}
	break;
	case 123:
	{
		(*dest) = resizeString((*dest), 12);
appendString((*dest), ((NimStringDesc*) &TMP2018));
	}
	break;
	case 125:
	{
		(*dest) = resizeString((*dest), 12);
appendString((*dest), ((NimStringDesc*) &TMP2019));
	}
	break;
	case 91:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2020));
	}
	break;
	case 93:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2021));
	}
	break;
	case 92:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2022));
	}
	break;
	case 36:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2023));
	}
	break;
	case 38:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2024));
	}
	break;
	case 35:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2025));
	}
	break;
	case 37:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2026));
	}
	break;
	case 126:
	{
		(*dest) = resizeString((*dest), 12);
appendString((*dest), ((NimStringDesc*) &TMP2027));
	}
	break;
	case 64:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2028));
	}
	break;
	case 94:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2029));
	}
	break;
	case 96:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2030));
	}
	break;
	default:
	{
		(*dest) = addChar((*dest), c);
	}
	break;
	}
}

static N_INLINE(void, escchar_309152)(NU8 target, NimStringDesc** dest, NIM_CHAR c) {
	switch (target) {
	case ((NU8) 0):
	{
		addxmlchar_309128(dest, c);
	}
	break;
	case ((NU8) 1):
	{
		addtexchar_309142(dest, c);
	}
	break;
	}
}

N_NIMCALL(NimStringDesc*, esc_309216)(NU8 target, NimStringDesc* s, NI splitafter) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1988));
	{
		NI partlen;
		NI j;
		if (!(0 <= splitafter)) goto LA3;
		partlen = 0;
		j = 0;
		while (1) {
			NI k;
			NI i_309239;
			NI res_309272;
			if (!(j < s->Sup.len)) goto LA5;
			k = nextsplitpoint_309160(s, j);
			{
				NIM_BOOL LOC8;
				LOC8 = 0;
				LOC8 = !(eqStrings(splitter_309149, ((NimStringDesc*) &TMP2012)));
				if (LOC8) goto LA9;
				LOC8 = (splitafter < (NI32)((NI32)((NI32)(partlen + k) - j) + 1));
				LA9: ;
				if (!LOC8) goto LA10;
				partlen = 0;
				result = resizeString(result, splitter_309149->Sup.len + 0);
appendString(result, splitter_309149);
			}
			LA10: ;
			i_309239 = 0;
			res_309272 = j;
			while (1) {
				if (!(res_309272 <= k)) goto LA12;
				i_309239 = res_309272;
				escchar_309152(target, &result, s->data[i_309239]);
				res_309272 += 1;
			} LA12: ;
			partlen += (NI32)((NI32)(k - j) + 1);
			j = (NI32)(k + 1);
		} LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NI i_309269;
		NI HEX3Atmp_309274;
		NI res_309276;
		i_309269 = 0;
		HEX3Atmp_309274 = 0;
		HEX3Atmp_309274 = (NI32)(s->Sup.len - 1);
		res_309276 = 0;
		while (1) {
			if (!(res_309276 <= HEX3Atmp_309274)) goto LA14;
			i_309269 = res_309276;
			escchar_309152(target, &result, s->data[i_309269]);
			res_309276 += 1;
		} LA14: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, renderfield_310282)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	NIM_BOOL b;
	b = NIM_FALSE;
	{
		NimStringDesc* fieldname;
		NimStringDesc* fieldval;
		NimStringDesc* LOC5;
		NimStringDesc* LOC6;
		if (!((*d).Target == ((NU8) 1))) goto LA3;
		fieldname = addnodes_298055((*n).Sons->data[0]);
		LOC5 = 0;
		LOC5 = addnodes_298055((*n).Sons->data[1]);
		LOC6 = 0;
		LOC6 = nsuStrip(LOC5, NIM_TRUE, NIM_TRUE);
		fieldval = esc_309216((*d).Target, LOC6, -1);
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC12;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = nsuCmpIgnoreStyle(fieldname, ((NimStringDesc*) &TMP2031));
			LOC9 = (LOC10 == 0);
			if (LOC9) goto LA11;
			LOC12 = 0;
			LOC12 = nsuCmpIgnoreStyle(fieldname, ((NimStringDesc*) &TMP2032));
			LOC9 = (LOC12 == 0);
			LA11: ;
			if (!LOC9) goto LA13;
			{
				if (!((*d).Meta[(((NU8) 3))- 0]->Sup.len == 0)) goto LA17;
				unsureAsgnRef((void**) &(*d).Meta[(((NU8) 3))- 0], copyString(fieldval));
				b = NIM_TRUE;
			}
			LA17: ;
		}
		goto LA7;
		LA13: ;
		{
			NI LOC20;
			LOC20 = 0;
			LOC20 = nsuCmpIgnoreStyle(fieldname, ((NimStringDesc*) &TMP2033));
			if (!(LOC20 == 0)) goto LA21;
			{
				if (!((*d).Meta[(((NU8) 4))- 0]->Sup.len == 0)) goto LA25;
				unsureAsgnRef((void**) &(*d).Meta[(((NU8) 4))- 0], copyString(fieldval));
				b = NIM_TRUE;
			}
			LA25: ;
		}
		goto LA7;
		LA21: ;
		LA7: ;
	}
	LA3: ;
	{
		if (!!(b)) goto LA29;
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2034), ((NimStringDesc*) &TMP2035), result);
	}
	LA29: ;
}

N_NIMCALL(NimStringDesc*, texcolumns_310258)(trstnode297009* n) {
	NimStringDesc* result;
	NI i_310274;
	NI HEX3Atmp_310275;
	NI res_310277;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1988));
	i_310274 = 0;
	HEX3Atmp_310275 = 0;
	HEX3Atmp_310275 = len_297080(n);
	res_310277 = 1;
	while (1) {
		if (!(res_310277 <= HEX3Atmp_310275)) goto LA1;
		i_310274 = res_310277;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2056));
		res_310277 += 1;
	} LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, dispf_309300)(NU8 target, NimStringDesc* xml, NimStringDesc* tex, NimStringDesc** args, NI argsLen0) {
	NimStringDesc* result;
	result = 0;
	{
		if (!!((target == ((NU8) 1)))) goto LA3;
		result = nsuFormatOpenArray(xml, args, argsLen0);
	}
	goto LA1;
	LA3: ;
	{
		result = nsuFormatOpenArray(tex, args, argsLen0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, renderimage_310094)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	NimStringDesc* options;
	NimStringDesc* s;
	TY137892 LOC31;
	options = copyString(((NimStringDesc*) &TMP1988));
	s = getfieldvalue_298059(n, ((NimStringDesc*) &TMP2071));
	{
		TY165002 LOC5;
		if (!!(((s) && (s)->Sup.len == 0))) goto LA3;
		memset((void*)LOC5, 0, sizeof(LOC5));
		LOC5[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_309319((*d).Target, &options, ((NimStringDesc*) &TMP2072), ((NimStringDesc*) &TMP2073), LOC5, 1);
	}
	LA3: ;
	s = getfieldvalue_298059(n, ((NimStringDesc*) &TMP2074));
	{
		TY165002 LOC10;
		if (!!(((s) && (s)->Sup.len == 0))) goto LA8;
		memset((void*)LOC10, 0, sizeof(LOC10));
		LOC10[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_309319((*d).Target, &options, ((NimStringDesc*) &TMP2075), ((NimStringDesc*) &TMP2076), LOC10, 1);
	}
	LA8: ;
	s = getfieldvalue_298059(n, ((NimStringDesc*) &TMP2077));
	{
		TY165002 LOC15;
		if (!!(((s) && (s)->Sup.len == 0))) goto LA13;
		memset((void*)LOC15, 0, sizeof(LOC15));
		LOC15[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_309319((*d).Target, &options, ((NimStringDesc*) &TMP2078), ((NimStringDesc*) &TMP2079), LOC15, 1);
	}
	LA13: ;
	s = getfieldvalue_298059(n, ((NimStringDesc*) &TMP2080));
	{
		TY165002 LOC20;
		if (!!(((s) && (s)->Sup.len == 0))) goto LA18;
		memset((void*)LOC20, 0, sizeof(LOC20));
		LOC20[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_309319((*d).Target, &options, ((NimStringDesc*) &TMP2081), ((NimStringDesc*) &TMP1988), LOC20, 1);
	}
	LA18: ;
	s = getfieldvalue_298059(n, ((NimStringDesc*) &TMP2082));
	{
		TY165002 LOC25;
		if (!!(((s) && (s)->Sup.len == 0))) goto LA23;
		memset((void*)LOC25, 0, sizeof(LOC25));
		LOC25[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_309319((*d).Target, &options, ((NimStringDesc*) &TMP2083), ((NimStringDesc*) &TMP1988), LOC25, 1);
	}
	LA23: ;
	{
		TY165002 LOC30;
		if (!(0 < options->Sup.len)) goto LA28;
		memset((void*)LOC30, 0, sizeof(LOC30));
		LOC30[0] = copyString(options);
		options = dispf_309300((*d).Target, ((NimStringDesc*) &TMP2035), ((NimStringDesc*) &TMP2084), LOC30, 1);
	}
	LA28: ;
	memset((void*)LOC31, 0, sizeof(LOC31));
	LOC31[0] = getargument_298064(n);
	LOC31[1] = copyString(options);
	dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2085), ((NimStringDesc*) &TMP2086), LOC31, 2);
	{
		NI LOC34;
		LOC34 = 0;
		LOC34 = len_297080(n);
		if (!(3 <= LOC34)) goto LA35;
		renderrsttoout_309339(d, (*n).Sons->data[2], result);
	}
	LA35: ;
}

N_NIMCALL(void, rendercodeblock_310150)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	trstnode297009* m;
	NimStringDesc* langstr;
	NimStringDesc* LOC5;
	NU8 lang;
	TY523288 LOC11;
	TY523288 LOC24;
	{
		if (!((*n).Sons->data[2] == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	m = (*(*n).Sons->data[2]).Sons->data[0];
	LOC5 = 0;
	LOC5 = getargument_298064(n);
	langstr = nsuStrip(LOC5, NIM_TRUE, NIM_TRUE);
	lang = 0;
	{
		if (!((langstr) && (langstr)->Sup.len == 0)) goto LA8;
		lang = ((NU8) 1);
	}
	goto LA6;
	LA8: ;
	{
		lang = getsourcelanguage_305080(langstr);
	}
	LA6: ;
	memset((void*)LOC11, 0, sizeof(LOC11));
	dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2093), ((NimStringDesc*) &TMP2094), LOC11, 0);
	{
		if (!(lang == ((NU8) 0))) goto LA14;
		(*d).Msghandler((*d).Filename, 1, 0, ((NU8) 8), langstr);
		(*result) = resizeString((*result), (*m).Text->Sup.len + 0);
appendString((*result), (*m).Text);
	}
	goto LA12;
	LA14: ;
	{
		tgeneraltokenizer305015 g;
		memset((void*)&g, 0, sizeof(g));
		g.Sup.m_type = (&NTI305015);
		initgeneraltokenizer_305192(&g, (*m).Text);
		while (1) {
			getnexttoken_308067(&g, lang);
			switch (g.Kind) {
			case ((NU8) 0):
			{
				goto LA17;
			}
			break;
			case ((NU8) 1):
			case ((NU8) 2):
			{
				NimStringDesc* LOC20;
				LOC20 = 0;
				LOC20 = copyStrLast((*m).Text, g.Start, (NI32)((NI32)(g.Length + g.Start) - 1));
				(*result) = resizeString((*result), LOC20->Sup.len + 0);
appendString((*result), LOC20);
			}
			break;
			default:
			{
				TY137892 LOC22;
				NimStringDesc* LOC23;
				memset((void*)LOC22, 0, sizeof(LOC22));
				LOC23 = 0;
				LOC23 = copyStrLast((*m).Text, g.Start, (NI32)((NI32)(g.Length + g.Start) - 1));
				LOC22[0] = esc_309216((*d).Target, LOC23, -1);
				LOC22[1] = copyString(tokenclasstostr_305070[(g.Kind)- 0]);
				dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2254), ((NimStringDesc*) &TMP2255), LOC22, 2);
			}
			break;
			}
		} LA17: ;
		deinitgeneraltokenizer_305199(&g);
	}
	LA12: ;
	memset((void*)LOC24, 0, sizeof(LOC24));
	dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2289), ((NimStringDesc*) &TMP2290), LOC24, 0);
	BeforeRet: ;
}

N_NIMCALL(void, rendercontainer_310239)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	NimStringDesc* tmp;
	NimStringDesc* arg;
	NimStringDesc* LOC1;
	tmp = copyString(((NimStringDesc*) &TMP1988));
	renderrsttoout_309339(d, (*n).Sons->data[2], &tmp);
	LOC1 = 0;
	LOC1 = getargument_298064(n);
	arg = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	{
		TY165002 LOC6;
		if (!((arg) && (arg)->Sup.len == 0)) goto LA4;
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = copyString(tmp);
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2291), ((NimStringDesc*) &TMP2035), LOC6, 1);
	}
	goto LA2;
	LA4: ;
	{
		TY137892 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(arg);
		LOC8[1] = copyString(tmp);
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2292), ((NimStringDesc*) &TMP2293), LOC8, 2);
	}
	LA2: ;
}

static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c) {
	(*dest).data[((*dest).Sup.len)- 0] = c;
	(*dest).data[((NI32)((*dest).Sup.len + 1))- 0] = 0;
	(*dest).Sup.len += 1;
}

static N_INLINE(NI, HEX21HEX26_119015)(NI h, NI val) {
	NI result;
	result = 0;
	result = (NI)((NU32)(h) + (NU32)(val));
	result = (NI)((NU32)(result) + (NU32)((NI)((NU32)(result) << (NU32)(10))));
	result = (NI)(result ^ (NI)((NU32)(result) >> (NU32)(6)));
	return result;
}

static N_INLINE(NI, HEX21HEX24_119040)(NI h) {
	NI result;
	result = 0;
	result = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(3))));
	result = (NI)(result ^ (NI)((NU32)(result) >> (NU32)(11)));
	result = (NI)((NU32)(result) + (NU32)((NI)((NU32)(result) << (NU32)(15))));
	return result;
}

N_NIMCALL(NI, hash_309446)(trstnode297009* n) {
	NI result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 64))) goto LA3;
		result = hash_119827((*n).Text);
	}
	goto LA1;
	LA3: ;
	{
		NI LOC6;
		NI i_309481;
		NI HEX3Atmp_309482;
		NI LOC9;
		NI res_309484;
		LOC6 = 0;
		LOC6 = len_297080(n);
		if (!(0 < LOC6)) goto LA7;
		result = hash_309446((*n).Sons->data[0]);
		i_309481 = 0;
		HEX3Atmp_309482 = 0;
		LOC9 = 0;
		LOC9 = len_297080(n);
		HEX3Atmp_309482 = LOC9 - 1;
		res_309484 = 1;
		while (1) {
			NI LOC11;
			if (!(res_309484 <= HEX3Atmp_309482)) goto LA10;
			i_309481 = res_309484;
			LOC11 = 0;
			LOC11 = hash_309446((*n).Sons->data[i_309481]);
			result = HEX21HEX26_119015(result, LOC11);
			res_309484 += 1;
		} LA10: ;
		result = HEX21HEX24_119040(result);
	}
	goto LA1;
	LA7: ;
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, quoteindexcolumn_309421)(NimStringDesc* text) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuReplaceStr(text, ((NimStringDesc*) &TMP2306), ((NimStringDesc*) &TMP2307));
	LOC2 = 0;
	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &TMP2308), ((NimStringDesc*) &TMP2309));
	result = nsuReplaceStr(LOC2, ((NimStringDesc*) &TMP2310), ((NimStringDesc*) &TMP2311));
	return result;
}

N_NIMCALL(void, setindexterm_309433)(trstgenerator309012* d, NimStringDesc* id, NimStringDesc* term, NimStringDesc* linktitle, NimStringDesc* linkdesc) {
	NimStringDesc* htmlfile;
	NimStringDesc* LOC1;
	(*d).Theindex = resizeString((*d).Theindex, term->Sup.len + 0);
appendString((*d).Theindex, term);
	(*d).Theindex = addChar((*d).Theindex, 9);
	LOC1 = 0;
	LOC1 = nosextractFilename((*d).Filename);
	htmlfile = noschangeFileExt(LOC1, ((NimStringDesc*) &TMP2305));
	(*d).Theindex = resizeString((*d).Theindex, htmlfile->Sup.len + 0);
appendString((*d).Theindex, htmlfile);
	(*d).Theindex = addChar((*d).Theindex, 35);
	(*d).Theindex = resizeString((*d).Theindex, id->Sup.len + 0);
appendString((*d).Theindex, id);
	{
		NIM_BOOL LOC4;
		NimStringDesc* LOC8;
		NimStringDesc* LOC9;
		NimStringDesc* LOC10;
		NimStringDesc* LOC11;
		LOC4 = 0;
		LOC4 = (0 < linktitle->Sup.len);
		if (LOC4) goto LA5;
		LOC4 = (0 < linkdesc->Sup.len);
		LA5: ;
		if (!LOC4) goto LA6;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = quoteindexcolumn_309421(linktitle);
		LOC8 = rawNewString(LOC9->Sup.len + 1);
appendChar(LOC8, 9);
appendString(LOC8, LOC9);
		(*d).Theindex = resizeString((*d).Theindex, LOC8->Sup.len + 0);
appendString((*d).Theindex, LOC8);
		LOC10 = 0;
		LOC11 = 0;
		LOC11 = quoteindexcolumn_309421(linkdesc);
		LOC10 = rawNewString(LOC11->Sup.len + 1);
appendChar(LOC10, 9);
appendString(LOC10, LOC11);
		(*d).Theindex = resizeString((*d).Theindex, LOC10->Sup.len + 0);
appendString((*d).Theindex, LOC10);
	}
	LA6: ;
	(*d).Theindex = resizeString((*d).Theindex, 1);
appendString((*d).Theindex, ((NimStringDesc*) &TMP2308));
}

N_NIMCALL(void, renderindexterm_309489)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	NimStringDesc* id;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	NI LOC3;
	NimStringDesc* LOC4;
	NimStringDesc* term;
	TY137892 LOC5;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = rstnodetorefname_298051(n);
	LOC3 = 0;
	LOC3 = hash_309446(n);
	LOC4 = 0;
	LOC4 = nimIntToStr((NI32)abs(LOC3));
	LOC1 = rawNewString(LOC2->Sup.len + LOC4->Sup.len + 1);
appendString(LOC1, LOC2);
appendChar(LOC1, 95);
appendString(LOC1, LOC4);
	id = LOC1;
	term = copyString(((NimStringDesc*) &TMP1988));
	renderaux_309347(d, n, &term);
	setindexterm_309433(d, id, term, (*d).Currentsection, ((NimStringDesc*) &TMP1988));
	memset((void*)LOC5, 0, sizeof(LOC5));
	LOC5[0] = copyString(id);
	LOC5[1] = copyString(term);
	dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2312), ((NimStringDesc*) &TMP2313), LOC5, 2);
}

N_NIMCALL(void, rendersmiley_310138)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	TY165002 LOC1;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString((*n).Text);
	dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2316), ((NimStringDesc*) &TMP2317), LOC1, 1);
}

N_NIMCALL(void, renderrsttoout_309339)(trstgenerator309012* d, trstnode297009* n, NimStringDesc** result) {
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 0):
	{
		renderaux_309347(d, n, result);
	}
	break;
	case ((NU8) 1):
	{
		renderheadline_309882(d, n, result);
	}
	break;
	case ((NU8) 2):
	{
		renderoverline_309965(d, n, result);
	}
	break;
	case ((NU8) 3):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP1995), ((NimStringDesc*) &TMP1996), result);
	}
	break;
	case ((NU8) 4):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP1997), ((NimStringDesc*) &TMP1998), result);
	}
	break;
	case ((NU8) 5):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP1999), ((NimStringDesc*) &TMP2000), result);
	}
	break;
	case ((NU8) 6):
	case ((NU8) 8):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2001), ((NimStringDesc*) &TMP2002), result);
	}
	break;
	case ((NU8) 7):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2003), ((NimStringDesc*) &TMP2004), result);
	}
	break;
	case ((NU8) 9):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2005), ((NimStringDesc*) &TMP2006), result);
	}
	break;
	case ((NU8) 10):
	{
		renderaux_309347(d, n, result);
	}
	break;
	case ((NU8) 11):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2007), ((NimStringDesc*) &TMP2008), result);
	}
	break;
	case ((NU8) 12):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2009), ((NimStringDesc*) &TMP2010), result);
	}
	break;
	case ((NU8) 13):
	{
		NimStringDesc* tmp;
		NI i_310338;
		NI HEX3Atmp_310407;
		NI LOC18;
		NI res_310409;
		tmp = copyString(((NimStringDesc*) &TMP1988));
		i_310338 = 0;
		HEX3Atmp_310407 = 0;
		LOC18 = 0;
		LOC18 = len_297080(n);
		HEX3Atmp_310407 = (NI32)(LOC18 - 1);
		res_310409 = 0;
		while (1) {
			if (!(res_310409 <= HEX3Atmp_310407)) goto LA19;
			i_310338 = res_310409;
			renderrsttoout_309339(d, (*n).Sons->data[i_310338], &tmp);
			res_310409 += 1;
		} LA19: ;
		{
			TY165002 LOC24;
			if (!!((tmp->Sup.len == 0))) goto LA22;
			memset((void*)LOC24, 0, sizeof(LOC24));
			LOC24[0] = copyString(tmp);
			dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2011), ((NimStringDesc*) &TMP2006), LOC24, 1);
		}
		LA22: ;
	}
	break;
	case ((NU8) 14):
	{
		renderfield_310282(d, n, result);
	}
	break;
	case ((NU8) 15):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2036), ((NimStringDesc*) &TMP2037), result);
	}
	break;
	case ((NU8) 16):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2038), ((NimStringDesc*) &TMP2039), result);
	}
	break;
	case ((NU8) 51):
	{
		renderrsttoout_309339(d, (*n).Sons->data[2], result);
	}
	break;
	case ((NU8) 17):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2040), ((NimStringDesc*) &TMP2041), result);
	}
	break;
	case ((NU8) 18):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2034), ((NimStringDesc*) &TMP2035), result);
	}
	break;
	case ((NU8) 19):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2042), ((NimStringDesc*) &TMP2043), result);
	}
	break;
	case ((NU8) 23):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2044), ((NimStringDesc*) &TMP2039), result);
	}
	break;
	case ((NU8) 20):
	case ((NU8) 21):
	case ((NU8) 22):
	{
		{
			if (!NIM_TRUE) goto LA36;
			raiseassert_79492(((NimStringDesc*) &TMP2046));
		}
		LA36: ;
	}
	break;
	case ((NU8) 24):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2047), ((NimStringDesc*) &TMP2048), result);
	}
	break;
	case ((NU8) 25):
	{
		{
			if (!NIM_TRUE) goto LA42;
			raiseassert_79492(((NimStringDesc*) &TMP2046));
		}
		LA42: ;
	}
	break;
	case ((NU8) 26):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2049), ((NimStringDesc*) &TMP1998), result);
	}
	break;
	case ((NU8) 27):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2050), ((NimStringDesc*) &TMP2051), result);
	}
	break;
	case ((NU8) 28):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2052), ((NimStringDesc*) &TMP2053), result);
	}
	break;
	case ((NU8) 29):
	case ((NU8) 30):
	{
		NimStringDesc* LOC48;
		NimStringDesc* LOC49;
		LOC48 = 0;
		LOC49 = 0;
		LOC49 = texcolumns_310258(n);
		LOC48 = rawNewString(LOC49->Sup.len + 63);
appendString(LOC48, ((NimStringDesc*) &TMP2055));
appendString(LOC48, LOC49);
appendString(LOC48, ((NimStringDesc*) &TMP2057));
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2054), LOC48, result);
	}
	break;
	case ((NU8) 31):
	{
		{
			NI LOC53;
			LOC53 = 0;
			LOC53 = len_297080(n);
			if (!(1 <= LOC53)) goto LA54;
			{
				NI i_310365;
				NI HEX3Atmp_310411;
				NI LOC60;
				NI res_310413;
				if (!((*d).Target == ((NU8) 1))) goto LA58;
				renderrsttoout_309339(d, (*n).Sons->data[0], result);
				i_310365 = 0;
				HEX3Atmp_310411 = 0;
				LOC60 = 0;
				LOC60 = len_297080(n);
				HEX3Atmp_310411 = (NI32)(LOC60 - 1);
				res_310413 = 1;
				while (1) {
					if (!(res_310413 <= HEX3Atmp_310411)) goto LA61;
					i_310365 = res_310413;
					(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP2058));
					renderrsttoout_309339(d, (*n).Sons->data[i_310365], result);
					res_310413 += 1;
				} LA61: ;
				(*result) = resizeString((*result), 10);
appendString((*result), ((NimStringDesc*) &TMP2059));
			}
			goto LA56;
			LA58: ;
			{
				(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TMP2060));
				renderaux_309347(d, n, result);
				(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TMP2061));
			}
			LA56: ;
		}
		LA54: ;
	}
	break;
	case ((NU8) 33):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2038), ((NimStringDesc*) &TMP2035), result);
	}
	break;
	case ((NU8) 32):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2062), ((NimStringDesc*) &TMP2063), result);
	}
	break;
	case ((NU8) 34):
	{
		{
			if (!NIM_TRUE) goto LA68;
			raiseassert_79492(((NimStringDesc*) &TMP2046));
		}
		LA68: ;
	}
	break;
	case ((NU8) 35):
	{
		{
			if (!NIM_TRUE) goto LA73;
			raiseassert_79492(((NimStringDesc*) &TMP2046));
		}
		LA73: ;
	}
	break;
	case ((NU8) 36):
	{
		{
			if (!NIM_TRUE) goto LA78;
			raiseassert_79492(((NimStringDesc*) &TMP2046));
		}
		LA78: ;
	}
	break;
	case ((NU8) 39):
	{
		NimStringDesc* tmp;
		TY137892 LOC81;
		tmp = copyString(((NimStringDesc*) &TMP1988));
		renderaux_309347(d, n, &tmp);
		memset((void*)LOC81, 0, sizeof(LOC81));
		LOC81[0] = copyString(tmp);
		LOC81[1] = rstnodetorefname_298051(n);
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2064), ((NimStringDesc*) &TMP2065), LOC81, 2);
	}
	break;
	case ((NU8) 37):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2066), ((NimStringDesc*) &TMP2067), result);
	}
	break;
	case ((NU8) 38):
	{
		NimStringDesc* tmp0;
		NimStringDesc* tmp1;
		TY137892 LOC84;
		tmp0 = copyString(((NimStringDesc*) &TMP1988));
		tmp1 = copyString(((NimStringDesc*) &TMP1988));
		renderrsttoout_309339(d, (*n).Sons->data[0], &tmp0);
		renderrsttoout_309339(d, (*n).Sons->data[1], &tmp1);
		memset((void*)LOC84, 0, sizeof(LOC84));
		LOC84[0] = copyString(tmp0);
		LOC84[1] = copyString(tmp1);
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2068), ((NimStringDesc*) &TMP2069), LOC84, 2);
	}
	break;
	case ((NU8) 41):
	case ((NU8) 42):
	{
		renderaux_309347(d, n, result);
	}
	break;
	case ((NU8) 48):
	{
		{
			trstnode297009* LOC91;
			NimStringDesc* LOC92;
			if (!!(((*d).Target == ((NU8) 1)))) goto LA89;
			LOC91 = 0;
			LOC91 = lastson_297146(n);
			LOC92 = 0;
			LOC92 = addnodes_298055(LOC91);
			(*result) = resizeString((*result), LOC92->Sup.len + 0);
appendString((*result), LOC92);
		}
		LA89: ;
	}
	break;
	case ((NU8) 49):
	{
		{
			trstnode297009* LOC98;
			NimStringDesc* LOC99;
			if (!((*d).Target == ((NU8) 1))) goto LA96;
			LOC98 = 0;
			LOC98 = lastson_297146(n);
			LOC99 = 0;
			LOC99 = addnodes_298055(LOC98);
			(*result) = resizeString((*result), LOC99->Sup.len + 0);
appendString((*result), LOC99);
		}
		LA96: ;
	}
	break;
	case ((NU8) 45):
	case ((NU8) 46):
	{
		renderimage_310094(d, n, result);
	}
	break;
	case ((NU8) 47):
	{
		rendercodeblock_310150(d, n, result);
	}
	break;
	case ((NU8) 50):
	{
		rendercontainer_310239(d, n, result);
	}
	break;
	case ((NU8) 62):
	case ((NU8) 52):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2294), ((NimStringDesc*) &TMP2294), result);
	}
	break;
	case ((NU8) 40):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP1988), ((NimStringDesc*) &TMP1988), result);
	}
	break;
	case ((NU8) 53):
	{
		NimStringDesc* tmp0;
		NimStringDesc* tmp1;
		TY137892 LOC106;
		tmp0 = copyString(((NimStringDesc*) &TMP1988));
		tmp1 = copyString(((NimStringDesc*) &TMP1988));
		renderrsttoout_309339(d, (*n).Sons->data[0], &tmp0);
		renderrsttoout_309339(d, (*n).Sons->data[1], &tmp1);
		memset((void*)LOC106, 0, sizeof(LOC106));
		LOC106[0] = copyString(tmp0);
		LOC106[1] = copyString(tmp1);
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP2254), ((NimStringDesc*) &TMP2255), LOC106, 2);
	}
	break;
	case ((NU8) 54):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2295), ((NimStringDesc*) &TMP2296), result);
	}
	break;
	case ((NU8) 55):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2297), ((NimStringDesc*) &TMP2298), result);
	}
	break;
	case ((NU8) 57):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2299), ((NimStringDesc*) &TMP2300), result);
	}
	break;
	case ((NU8) 58):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2301), ((NimStringDesc*) &TMP2063), result);
	}
	break;
	case ((NU8) 59):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2302), ((NimStringDesc*) &TMP2303), result);
	}
	break;
	case ((NU8) 60):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2304), ((NimStringDesc*) &TMP2300), result);
	}
	break;
	case ((NU8) 56):
	{
		renderindexterm_309489(d, n, result);
	}
	break;
	case ((NU8) 61):
	{
		renderaux_309373(d, n, ((NimStringDesc*) &TMP2314), ((NimStringDesc*) &TMP2315), result);
	}
	break;
	case ((NU8) 63):
	{
		rendersmiley_310138(d, n, result);
	}
	break;
	case ((NU8) 64):
	{
		NimStringDesc* LOC117;
		LOC117 = 0;
		LOC117 = esc_309216((*d).Target, (*n).Text, -1);
		(*result) = resizeString((*result), LOC117->Sup.len + 0);
appendString((*result), LOC117);
	}
	break;
	case ((NU8) 44):
	{
		(*d).Hastoc = NIM_TRUE;
	}
	break;
	case ((NU8) 43):
	{
		unsureAsgnRef((void**) &(*d).Meta[(((NU8) 1))- 0], copyString(((NimStringDesc*) &TMP1988)));
		renderrsttoout_309339(d, (*n).Sons->data[0], &(*d).Meta[(((NU8) 1))- 0]);
	}
	break;
	}
	BeforeRet: ;
}
N_NIMCALL(void, TMP4332)(void* p, NI op) {
	TY309028* a;
	NI LOC1;
	a = (TY309028*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].N, op);
	nimGCvisit((void*)a->data[LOC1].Refname, op);
	nimGCvisit((void*)a->data[LOC1].Header, op);
	}
}

N_NIMCALL(void, initrstgenerator_309042)(trstgenerator309012* g, NU8 target, tstringtable121810* config, NimStringDesc* filename, NU8 options, tfindfilehandler298018 findfile, tmsghandler298016 msghandler) {
	NimStringDesc* s;
	NU8 i_309113;
	NU8 res_309115;
	unsureAsgnRef((void**) &(*g).Config, config);
	(*g).Target = target;
	unsureAsgnRef((void**) &(*g).Tocpart, (TY309028*) newSeq((&NTI309028), 0));
	unsureAsgnRef((void**) &(*g).Filename, copyString(filename));
	(*g).Splitafter = 20;
	unsureAsgnRef((void**) &(*g).Theindex, copyString(((NimStringDesc*) &TMP1988)));
	(*g).Options = options;
	(*g).Findfile = findfile;
	unsureAsgnRef((void**) &(*g).Currentsection, copyString(((NimStringDesc*) &TMP1988)));
	(*g).Msghandler = msghandler;
	s = nstGet(config, ((NimStringDesc*) &TMP4335));
	{
		if (!!(((s) && (s)->Sup.len == 0))) goto LA3;
		(*g).Splitafter = nsuParseInt(s);
	}
	LA3: ;
	i_309113 = 0;
	res_309115 = ((NU8) 0);
	while (1) {
		if (!(res_309115 <= ((NU8) 4))) goto LA5;
		i_309113 = res_309115;
		unsureAsgnRef((void**) &(*g).Meta[(i_309113)- 0], copyString(((NimStringDesc*) &TMP1988)));
		res_309115 += 1;
	} LA5: ;
}

N_NIMCALL(void, rendertocentry_310044)(trstgenerator309012* d, ttocentry309008 e, NimStringDesc** result) {
	TY137892 LOC1;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString(e.Refname);
	LOC1[1] = copyString(e.Header);
	dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP4406), ((NimStringDesc*) &TMP4407), LOC1, 2);
}

N_NIMCALL(void, rendertocentries_310056)(trstgenerator309012* d, NI* j, NI lvl, NimStringDesc** result) {
	NimStringDesc* tmp;
	tmp = copyString(((NimStringDesc*) &TMP1988));
	while (1) {
		NI a;
		if (!((*j) <= ((*d).Tocpart->Sup.len-1))) goto LA1;
		a = (NI32)abs((*(*d).Tocpart->data[(*j)].N).Level);
		{
			if (!(a == lvl)) goto LA4;
			rendertocentry_310044(d, (*d).Tocpart->data[(*j)], &tmp);
			(*j) += 1;
		}
		goto LA2;
		LA4: ;
		{
			if (!(lvl < a)) goto LA7;
			rendertocentries_310056(d, j, a, &tmp);
		}
		goto LA2;
		LA7: ;
		{
			goto LA1;
		}
		LA2: ;
	} LA1: ;
	{
		TY165002 LOC14;
		if (!(1 < lvl)) goto LA12;
		memset((void*)LOC14, 0, sizeof(LOC14));
		LOC14[0] = copyString(tmp);
		dispa_309319((*d).Target, result, ((NimStringDesc*) &TMP4408), ((NimStringDesc*) &TMP4409), LOC14, 1);
	}
	goto LA10;
	LA12: ;
	{
		(*result) = resizeString((*result), tmp->Sup.len + 0);
appendString((*result), tmp);
	}
	LA10: ;
}

N_NIMCALL(void, writeindexfile_309120)(trstgenerator309012* g, NimStringDesc* outfile) {
	{
		if (!(0 < (*g).Theindex->Sup.len)) goto LA3;
		writefile_10443(outfile, (*g).Theindex);
	}
	LA3: ;
}
N_NIMCALL(void, TMP4486)(void* p, NI op) {
	TY309574* a;
	NI LOC1;
	a = (TY309574*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Keyword, op);
	nimGCvisit((void*)a->data[LOC1].Link, op);
	nimGCvisit((void*)a->data[LOC1].Linktitle, op);
	nimGCvisit((void*)a->data[LOC1].Linkdesc, op);
	}
}

N_NIMCALL(NimStringDesc*, unquoteindexcolumn_309427)(NimStringDesc* text) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuReplaceStr(text, ((NimStringDesc*) &TMP2311), ((NimStringDesc*) &TMP2310));
	LOC2 = 0;
	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &TMP2309), ((NimStringDesc*) &TMP2308));
	result = nsuReplaceStr(LOC2, ((NimStringDesc*) &TMP2307), ((NimStringDesc*) &TMP2306));
	return result;
}

N_NIMCALL(void, HEX3CHEX2D_309518)(tindexentry309505* a, tindexentry309505 b) {
	unsureAsgnRef((void**) &(*a).Keyword, b.Keyword);
	unsureAsgnRef((void**) &(*a).Link, b.Link);
	{
		if (!b.Linktitle == 0) goto LA3;
		unsureAsgnRef((void**) &(*a).Linktitle, copyString(NIM_NIL));
	}
	goto LA1;
	LA3: ;
	{
		unsureAsgnRef((void**) &(*a).Linktitle, b.Linktitle);
	}
	LA1: ;
	{
		if (!b.Linkdesc == 0) goto LA8;
		unsureAsgnRef((void**) &(*a).Linkdesc, copyString(NIM_NIL));
	}
	goto LA6;
	LA8: ;
	{
		unsureAsgnRef((void**) &(*a).Linkdesc, b.Linkdesc);
	}
	LA6: ;
}

N_NIMCALL(NI, cmp_309511)(tindexentry309505 a, tindexentry309505 b) {
	NI result;
	result = 0;
	result = nsuCmpIgnoreStyle(a.Keyword, b.Keyword);
	{
		if (!(result == 0)) goto LA3;
		result = nsuCmpIgnoreStyle(a.Link, b.Link);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, sortindex_309525)(tindexentry309505* a, NI aLen0) {
	NI n;
	NI h;
	n = aLen0;
	h = 1;
	while (1) {
		h = (NI32)((NI32)(3 * h) + 1);
		{
			if (!(n < h)) goto LA4;
			goto LA1;
		}
		LA4: ;
	} LA1: ;
	while (1) {
		NI i_309552;
		NI HEX3Atmp_309560;
		NI res_309562;
		h = (NI32)(h / 3);
		i_309552 = 0;
		HEX3Atmp_309560 = 0;
		HEX3Atmp_309560 = (NI32)(n - 1);
		res_309562 = h;
		while (1) {
			tindexentry309505 v;
			NI j;
			if (!(res_309562 <= HEX3Atmp_309560)) goto LA7;
			i_309552 = res_309562;
			memset((void*)&v, 0, sizeof(v));
			HEX3CHEX2D_309518(&v, a[i_309552]);
			j = i_309552;
			while (1) {
				NI LOC9;
				LOC9 = 0;
				LOC9 = cmp_309511(a[(NI32)(j - h)], v);
				if (!(0 <= LOC9)) goto LA8;
				HEX3CHEX2D_309518(&a[j], a[(NI32)(j - h)]);
				j = (NI32)(j - h);
				{
					if (!(j < h)) goto LA12;
					goto LA8;
				}
				LA12: ;
			} LA8: ;
			HEX3CHEX2D_309518(&a[j], v);
			res_309562 += 1;
		} LA7: ;
		{
			if (!(h == 1)) goto LA16;
			goto LA6;
		}
		LA16: ;
	} LA6: ;
}

N_NIMCALL(NimStringDesc*, mergeindexes_309570)(NimStringDesc* dir) {
	NimStringDesc* result;
	TY309574* a;
	NI l;
	NU8 kind_309610;
	NimStringDesc* path_309611;
	DIR* d_309865;
	NI i;
	result = 0;
	a = 0;
	a = (TY309574*) newSeq((&NTI309574), 15000);
	a = (TY309574*) setLengthSeq(&(a)->Sup, sizeof(tindexentry309505), 0);
	l = 0;
	kind_309610 = 0;
	path_309611 = 0;
	d_309865 = opendir(dir->data);
	{
		int LOC53;
		if (!!((d_309865 == NIM_NIL))) goto LA3;
		while (1) {
			struct dirent* x_309867;
			NimStringDesc* y_309869;
			x_309867 = readdir(d_309865);
			{
				if (!(x_309867 == NIM_NIL)) goto LA8;
				goto LA5;
			}
			LA8: ;
			y_309869 = cstrToNimstr(((NCSTRING) ((*x_309867).d_name)));
			{
				NIM_BOOL LOC12;
				struct stat s_309871;
				NU8 k_309873;
				LOC12 = 0;
				LOC12 = !(eqStrings(y_309869, ((NimStringDesc*) &TMP4487)));
				if (!(LOC12)) goto LA13;
				LOC12 = !(eqStrings(y_309869, ((NimStringDesc*) &TMP4488)));
				LA13: ;
				if (!LOC12) goto LA14;
				memset((void*)&s_309871, 0, sizeof(s_309871));
				y_309869 = HEX2F_108477(dir, y_309869);
				{
					int LOC18;
					LOC18 = 0;
					LOC18 = lstat(y_309869->data, &s_309871);
					if (!(LOC18 < ((NI32) 0))) goto LA19;
					goto LA5;
				}
				LA19: ;
				k_309873 = ((NU8) 0);
				{
					NIM_BOOL LOC23;
					LOC23 = 0;
					LOC23 = S_ISDIR(s_309871.st_mode);
					if (!LOC23) goto LA24;
					k_309873 = ((NU8) 2);
				}
				LA24: ;
				{
					NIM_BOOL LOC28;
					LOC28 = 0;
					LOC28 = S_ISLNK(s_309871.st_mode);
					if (!LOC28) goto LA29;
					k_309873 = k_309873 + 1;
				}
				LA29: ;
				kind_309610 = k_309873;
				path_309611 = y_309869;
				{
					NIM_BOOL LOC33;
					NimStringDesc* line_309621;
					FILE* f_309860;
					NimStringDesc* res_309862;
					LOC33 = 0;
					LOC33 = (kind_309610 == ((NU8) 0));
					if (!(LOC33)) goto LA34;
					LOC33 = nsuEndsWith(path_309611, ((NimStringDesc*) &TMP4489));
					LA34: ;
					if (!LOC33) goto LA35;
					line_309621 = 0;
					f_309860 = open_10217(path_309611, ((NU8) 0), 8000);
					res_309862 = rawNewString(80);
					while (1) {
						NIM_BOOL LOC38;
						LOC38 = 0;
						LOC38 = readline_10487(f_309860, &res_309862);
						if (!LOC38) goto LA37;
						line_309621 = res_309862;
						{
							NI s;
							s = nsuFindChar(line_309621, 9, 0);
							{
								if (!(s < 0)) goto LA42;
								goto LA39;
							}
							LA42: ;
							a = (TY309574*) setLengthSeq(&(a)->Sup, sizeof(tindexentry309505), (NI32)(l + 1));
							asgnRefNoCycle((void**) &a->data[l].Keyword, copyStrLast(line_309621, 0, (NI32)(s - 1)));
							asgnRefNoCycle((void**) &a->data[l].Link, copyStr(line_309621, (NI32)(s + 1)));
							{
								NI LOC46;
								TY110805* extracols;
								NimStringDesc* LOC49;
								LOC46 = 0;
								LOC46 = nsuFindChar(a->data[l].Link, 9, 0);
								if (!(0 < LOC46)) goto LA47;
								extracols = nsuSplitChar(a->data[l].Link, 9);
								LOC49 = 0;
								LOC49 = a->data[l].Link; a->data[l].Link = copyStringRC1(extracols->data[0]);
								if (LOC49) nimGCunrefNoCycle(LOC49);
								asgnRefNoCycle((void**) &a->data[l].Linktitle, unquoteindexcolumn_309427(extracols->data[1]));
								asgnRefNoCycle((void**) &a->data[l].Linkdesc, unquoteindexcolumn_309427(extracols->data[2]));
							}
							goto LA44;
							LA47: ;
							{
								NimStringDesc* LOC51;
								NimStringDesc* LOC52;
								LOC51 = 0;
								LOC51 = a->data[l].Linktitle; a->data[l].Linktitle = copyStringRC1(NIM_NIL);
								if (LOC51) nimGCunrefNoCycle(LOC51);
								LOC52 = 0;
								LOC52 = a->data[l].Linkdesc; a->data[l].Linkdesc = copyStringRC1(NIM_NIL);
								if (LOC52) nimGCunrefNoCycle(LOC52);
							}
							LA44: ;
							l += 1;
						} LA39: ;
					} LA37: ;
					fclose(f_309860);
				}
				LA35: ;
			}
			LA14: ;
		} LA5: ;
		LOC53 = 0;
		LOC53 = closedir(d_309865);
	}
	LA3: ;
	sortindex_309525(a->data, a->Sup.len);
	result = copyString(((NimStringDesc*) &TMP1988));
	i = 0;
	while (1) {
		TY165002 LOC55;
		NI j;
		if (!(i < l)) goto LA54;
		memset((void*)LOC55, 0, sizeof(LOC55));
		LOC55[0] = copyString(a->data[i].Keyword);
		nsuAddf(&result, ((NimStringDesc*) &TMP4490), LOC55, 1);
		j = i;
		while (1) {
			NIM_BOOL LOC57;
			NimStringDesc* url;
			NimStringDesc* text;
			NimStringDesc* desc;
			LOC57 = 0;
			LOC57 = (j < l);
			if (!(LOC57)) goto LA58;
			LOC57 = eqStrings(a->data[i].Keyword, a->data[j].Keyword);
			LA58: ;
			if (!LOC57) goto LA56;
			url = a->data[j].Link;
			{
				if (!!(a->data[j].Linktitle == 0)) goto LA61;
				text = a->data[j].Linktitle;
			}
			goto LA59;
			LA61: ;
			{
				text = url;
			}
			LA59: ;
			{
				if (!!(a->data[j].Linkdesc == 0)) goto LA66;
				desc = a->data[j].Linkdesc;
			}
			goto LA64;
			LA66: ;
			{
				desc = copyString(((NimStringDesc*) &TMP1988));
			}
			LA64: ;
			{
				TY173034 LOC73;
				if (!(0 < desc->Sup.len)) goto LA71;
				memset((void*)LOC73, 0, sizeof(LOC73));
				LOC73[0] = copyString(url);
				LOC73[1] = copyString(text);
				LOC73[2] = copyString(desc);
				nsuAddf(&result, ((NimStringDesc*) &TMP4491), LOC73, 3);
			}
			goto LA69;
			LA71: ;
			{
				TY137892 LOC75;
				memset((void*)LOC75, 0, sizeof(LOC75));
				LOC75[0] = copyString(url);
				LOC75[1] = copyString(text);
				nsuAddf(&result, ((NimStringDesc*) &TMP4492), LOC75, 2);
			}
			LA69: ;
			j += 1;
		} LA56: ;
		result = resizeString(result, 11);
appendString(result, ((NimStringDesc*) &TMP4493));
		i = j;
	} LA54: ;
	return result;
}
N_NOINLINE(void, docutilsrstgenInit)(void) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = splitter_309149; splitter_309149 = copyStringRC1(((NimStringDesc*) &TMP876));
	if (LOC1) nimGCunrefNoCycle(LOC1);
}

N_NOINLINE(void, docutilsrstgenDatInit)(void) {
static TNimNode* TMP4327[12];
static TNimNode* TMP4328[2];
NI TMP4330;
static char* NIM_CONST TMP4329[2] = {
"outHtml", 
"outLatex"};
static TNimNode* TMP4331[3];
static TNimNode* TMP4485[4];
static TNimNode TMP872[25];
NTI309012.size = sizeof(trstgenerator309012);
NTI309012.kind = 17;
NTI309012.base = (&NTI2409);
TMP4327[0] = &TMP872[1];
NTI309006.size = sizeof(NU8);
NTI309006.kind = 14;
NTI309006.base = 0;
NTI309006.flags = 3;
for (TMP4330 = 0; TMP4330 < 2; TMP4330++) {
TMP872[TMP4330+2].kind = 1;
TMP872[TMP4330+2].offset = TMP4330;
TMP872[TMP4330+2].name = TMP4329[TMP4330];
TMP4328[TMP4330] = &TMP872[TMP4330+2];
}
TMP872[4].len = 2; TMP872[4].kind = 2; TMP872[4].sons = &TMP4328[0];
NTI309006.node = &TMP872[4];
TMP872[1].kind = 1;
TMP872[1].offset = offsetof(trstgenerator309012, Target);
TMP872[1].typ = (&NTI309006);
TMP872[1].name = "target";
TMP4327[1] = &TMP872[5];
TMP872[5].kind = 1;
TMP872[5].offset = offsetof(trstgenerator309012, Config);
TMP872[5].typ = (&NTI121812);
TMP872[5].name = "config";
TMP4327[2] = &TMP872[6];
TMP872[6].kind = 1;
TMP872[6].offset = offsetof(trstgenerator309012, Splitafter);
TMP872[6].typ = (&NTI106);
TMP872[6].name = "splitAfter";
TMP4327[3] = &TMP872[7];
NTI309008.size = sizeof(ttocentry309008);
NTI309008.kind = 18;
NTI309008.base = 0;
NTI309008.flags = 2;
TMP4331[0] = &TMP872[9];
TMP872[9].kind = 1;
TMP872[9].offset = offsetof(ttocentry309008, N);
TMP872[9].typ = (&NTI297005);
TMP872[9].name = "n";
TMP4331[1] = &TMP872[10];
TMP872[10].kind = 1;
TMP872[10].offset = offsetof(ttocentry309008, Refname);
TMP872[10].typ = (&NTI143);
TMP872[10].name = "refname";
TMP4331[2] = &TMP872[11];
TMP872[11].kind = 1;
TMP872[11].offset = offsetof(ttocentry309008, Header);
TMP872[11].typ = (&NTI143);
TMP872[11].name = "header";
TMP872[8].len = 3; TMP872[8].kind = 2; TMP872[8].sons = &TMP4331[0];
NTI309008.node = &TMP872[8];
NTI309028.size = sizeof(TY309028*);
NTI309028.kind = 24;
NTI309028.base = (&NTI309008);
NTI309028.flags = 2;
NTI309028.marker = TMP4332;
TMP872[7].kind = 1;
TMP872[7].offset = offsetof(trstgenerator309012, Tocpart);
TMP872[7].typ = (&NTI309028);
TMP872[7].name = "tocPart";
TMP4327[4] = &TMP872[12];
TMP872[12].kind = 1;
TMP872[12].offset = offsetof(trstgenerator309012, Hastoc);
TMP872[12].typ = (&NTI134);
TMP872[12].name = "hasToc";
TMP4327[5] = &TMP872[13];
TMP872[13].kind = 1;
TMP872[13].offset = offsetof(trstgenerator309012, Theindex);
TMP872[13].typ = (&NTI143);
TMP872[13].name = "theIndex";
TMP4327[6] = &TMP872[14];
TMP872[14].kind = 1;
TMP872[14].offset = offsetof(trstgenerator309012, Options);
TMP872[14].typ = (&NTI298010);
TMP872[14].name = "options";
TMP4327[7] = &TMP872[15];
TMP872[15].kind = 1;
TMP872[15].offset = offsetof(trstgenerator309012, Findfile);
TMP872[15].typ = (&NTI298018);
TMP872[15].name = "findFile";
TMP4327[8] = &TMP872[16];
TMP872[16].kind = 1;
TMP872[16].offset = offsetof(trstgenerator309012, Msghandler);
TMP872[16].typ = (&NTI298016);
TMP872[16].name = "msgHandler";
TMP4327[9] = &TMP872[17];
TMP872[17].kind = 1;
TMP872[17].offset = offsetof(trstgenerator309012, Filename);
TMP872[17].typ = (&NTI143);
TMP872[17].name = "filename";
TMP4327[10] = &TMP872[18];
NTI309036.size = sizeof(TY309036);
NTI309036.kind = 16;
NTI309036.base = (&NTI143);
NTI309036.flags = 2;
TMP872[18].kind = 1;
TMP872[18].offset = offsetof(trstgenerator309012, Meta);
TMP872[18].typ = (&NTI309036);
TMP872[18].name = "meta";
TMP4327[11] = &TMP872[19];
TMP872[19].kind = 1;
TMP872[19].offset = offsetof(trstgenerator309012, Currentsection);
TMP872[19].typ = (&NTI143);
TMP872[19].name = "currentSection";
TMP872[0].len = 12; TMP872[0].kind = 2; TMP872[0].sons = &TMP4327[0];
NTI309012.node = &TMP872[0];
NTI309505.size = sizeof(tindexentry309505);
NTI309505.kind = 18;
NTI309505.base = 0;
NTI309505.flags = 2;
TMP4485[0] = &TMP872[21];
TMP872[21].kind = 1;
TMP872[21].offset = offsetof(tindexentry309505, Keyword);
TMP872[21].typ = (&NTI143);
TMP872[21].name = "keyword";
TMP4485[1] = &TMP872[22];
TMP872[22].kind = 1;
TMP872[22].offset = offsetof(tindexentry309505, Link);
TMP872[22].typ = (&NTI143);
TMP872[22].name = "link";
TMP4485[2] = &TMP872[23];
TMP872[23].kind = 1;
TMP872[23].offset = offsetof(tindexentry309505, Linktitle);
TMP872[23].typ = (&NTI143);
TMP872[23].name = "linkTitle";
TMP4485[3] = &TMP872[24];
TMP872[24].kind = 1;
TMP872[24].offset = offsetof(tindexentry309505, Linkdesc);
TMP872[24].typ = (&NTI143);
TMP872[24].name = "linkDesc";
TMP872[20].len = 4; TMP872[20].kind = 2; TMP872[20].sons = &TMP4485[0];
NTI309505.node = &TMP872[20];
NTI309574.size = sizeof(TY309574*);
NTI309574.kind = 24;
NTI309574.base = (&NTI309505);
NTI309574.flags = 2;
NTI309574.marker = TMP4486;
}

