/* Generated by Nim Compiler v0.10.2 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64
#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 tcell44935 tcell44935;
typedef struct TNimType TNimType;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcstat47014 tgcstat47014;
typedef struct trstgenerator357016 trstgenerator357016;
typedef struct trstnode341011 trstnode341011;
typedef struct trstnodeseq341009 trstnodeseq341009;
typedef struct TNimObject TNimObject;
typedef struct TNimNode TNimNode;
typedef struct stringtableobj130012 stringtableobj130012;
typedef struct TY357034 TY357034;
typedef struct ttocentry357012 ttocentry357012;
typedef struct table357052 table357052;
typedef struct keyvaluepairseq357055 keyvaluepairseq357055;
typedef struct keyvaluepair357058 keyvaluepair357058;
typedef struct codeblockparams357020 codeblockparams357020;
typedef struct keyvaluepair130008 keyvaluepair130008;
typedef struct tgeneraltokenizer351023 tgeneraltokenizer351023;
typedef struct TY116604 TY116604;
typedef struct TY360801 TY360801;
typedef struct TY118808 TY118808;
typedef struct TY360804 TY360804;
typedef struct tindexentry358264 tindexentry358264;
typedef struct table358277 table358277;
typedef struct keyvaluepairseq358280 keyvaluepairseq358280;
typedef struct keyvaluepair358283 keyvaluepair358283;
typedef struct TY358879 TY358879;
typedef struct TY358880 TY358880;
typedef struct slice84173 slice84173;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
typedef struct keyvaluepairseq130010 keyvaluepairseq130010;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  trstnode341011  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq341009* Sons;
};
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  ttocentry357012  {
trstnode341011* N;
NimStringDesc* Refname;
NimStringDesc* Header;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler342023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler342021) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef NimStringDesc* TY357042[5];
struct keyvaluepair357058 {
NU8 Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  table357052  {
keyvaluepairseq357055* Data;
NI Counter;
};
struct  trstgenerator357016  {
  TNimObject Sup;
NU8 Target;
stringtableobj130012* Config;
NI Splitafter;
TY357034* Tocpart;
NIM_BOOL Hastoc;
NimStringDesc* Theindex;
NU8 Options;
tfindfilehandler342023 Findfile;
tmsghandler342021 Msghandler;
NimStringDesc* Filename;
TY357042 Meta;
NimStringDesc* Currentsection;
table357052 Seenindexterms;
};
typedef NimStringDesc* TY196620[4];
typedef NimStringDesc* TY196301[1];
typedef NimStringDesc* TY168969[2];
typedef NU8 TY210607[32];
struct  codeblockparams357020  {
NIM_BOOL Numberlines;
NI Startline;
NimStringDesc* Langstr;
NU8 Lang;
};
struct keyvaluepair130008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef NimStringDesc* TY259532[1];
struct  tgeneraltokenizer351023  {
  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* TY351082[33];
struct TY116604 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
struct  tindexentry358264  {
NimStringDesc* Keyword;
NimStringDesc* Link;
NimStringDesc* Linktitle;
NimStringDesc* Linkdesc;
};
struct keyvaluepair358283 {
NU8 Field0;
tindexentry358264 Field1;
TY360804* Field2;
};
struct  table358277  {
keyvaluepairseq358280* Data;
NI Counter;
};
struct TY360801 {
TY118808* Field0;
TY360804* Field1;
table358277 Field2;
};
typedef NIM_CHAR TY104554[256];
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (NimStringDesc* x_361565, NimStringDesc* y_361567, void* ClEnv);
void* ClEnv;
} TY361571;
typedef N_CLOSURE_PTR(NI, TMP4794) (NimStringDesc* x_361548, NimStringDesc* y_361550, void* ClEnv);
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tindexentry358264* x_359566, tindexentry358264* y_359568, void* ClEnv);
void* ClEnv;
} TY359572;
typedef N_CLOSURE_PTR(NI, TMP4798) (tindexentry358264* x_360592, tindexentry358264* y_360594, void* ClEnv);
typedef N_CLOSURE_PTR(NI, TMP4808) (tindexentry358264* x_359549, tindexentry358264* y_359551, void* ClEnv);
struct TY358880 {
NI Field0;
NimStringDesc* Field1;
};
struct  slice84173  {
NI A;
NI B;
};
typedef NimStringDesc* TY207063[3];
typedef NI TY26420[8];
struct  tpagedesc44943  {
tpagedesc44943* Next;
NI Key;
TY26420 Bits;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  stringtableobj130012  {
  TNimObject Sup;
NI Counter;
keyvaluepairseq130010* Data;
NU8 Mode;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct trstnodeseq341009 {
  TGenericSeq Sup;
  trstnode341011* data[SEQ_DECL_SIZE];
};
struct TY357034 {
  TGenericSeq Sup;
  ttocentry357012 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq357055 {
  TGenericSeq Sup;
  keyvaluepair357058 data[SEQ_DECL_SIZE];
};
struct TY118808 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct TY360804 {
  TGenericSeq Sup;
  tindexentry358264 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq358280 {
  TGenericSeq Sup;
  keyvaluepair358283 data[SEQ_DECL_SIZE];
};
struct TY358879 {
  TGenericSeq Sup;
  TY358880 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq130010 {
  TGenericSeq Sup;
  keyvaluepair130008 data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
N_NIMCALL(void, renderaux_357589)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(NI, len_341084)(trstnode341011* n);
N_NIMCALL(void, renderrsttoout_357579)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(void, renderheadline_363281)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(NimStringDesc*, rstnodetorefname_342061)(trstnode341011* n);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, dispa_357544)(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, setindexterm_357710)(trstgenerator357016* d, NimStringDesc* id, NimStringDesc* term, NimStringDesc* linktitle, NimStringDesc* linkdesc);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, nosextractFilename)(NimStringDesc* path);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, quoteindexcolumn_357690)(NimStringDesc* text);
N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s, NimStringDesc* sub, NimStringDesc* by);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, insert_85801)(NimStringDesc** x, NimStringDesc* item, NI i);
N_NIMCALL(NimStringDesc*, striptochtml_363260)(NimStringDesc* s);
N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s, NIM_CHAR sub, NI start);
N_NIMCALL(void, nsuDelete)(NimStringDesc** s, NI first, NI last);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NI count, NIM_CHAR c);
N_NIMCALL(void, renderoverline_363425)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(void, renderaux_357629)(trstgenerator357016* d, trstnode341011* n, NimStringDesc* frmta, NimStringDesc* frmtb, NimStringDesc** result);
N_NIMCALL(void, renderfield_365327)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, addnodes_342067)(trstnode341011* n);
N_NIMCALL(NimStringDesc*, esc_357407)(NU8 target, NimStringDesc* s, NI splitafter);
N_NIMCALL(NI, nextsplitpoint_357349)(NimStringDesc* s, NI start);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(void, escchar_357337)(NU8 target, NimStringDesc** dest, NIM_CHAR c);
N_NIMCALL(void, addxmlchar_357299)(NimStringDesc** dest, NIM_CHAR c);
N_NIMCALL(void, addtexchar_357321)(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_84757)(NimStringDesc* msg);
N_NIMCALL(NimStringDesc*, texcolumns_365289)(trstnode341011* n);
N_NIMCALL(trstnode341011*, lastson_341162)(trstnode341011* n);
N_NIMCALL(void, renderimage_363598)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, getfieldvalue_342073)(trstnode341011* n, NimStringDesc* fieldname);
N_NIMCALL(NIM_BOOL, allcharsinset_96479)(NimStringDesc* s, TY210607 theset);
N_NIMCALL(NimStringDesc*, dispf_357521)(NU8 target, NimStringDesc* xml, NimStringDesc* tex, NimStringDesc** args, NI argsLen0);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, getargument_342080)(trstnode341011* n);
N_NIMCALL(void, rendercodeblock_364840)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(void, parsecodeblockparams_364007)(trstgenerator357016* d, trstnode341011* n, codeblockparams357020* Result);
N_NIMCALL(void, init_357078)(codeblockparams357020* p);
N_NIMCALL(void, parsecodeblockfield_363991)(trstgenerator357016* d, trstnode341011* n, codeblockparams357020* params);
N_NIMCALL(NimStringDesc*, nsuToLowerStr)(NimStringDesc* s);
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start);
N_NIMCALL(NimStringDesc*, getfieldvalue_345823)(trstnode341011* n);
N_NIMCALL(NU8, getsourcelanguage_351093)(NimStringDesc* name);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, buildlineshtmltable_364635)(codeblockparams357020* params, NimStringDesc* code, keyvaluepair130008* Result);
N_NIMCALL(NI, nsuCountLines)(NimStringDesc* s);
N_NIMCALL(void, initgeneraltokenizer_351229)(tgeneraltokenizer351023* g, NimStringDesc* buf);
N_NIMCALL(void, getnexttoken_354166)(tgeneraltokenizer351023* g, NU8 lang);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_74828, NI last);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI first, NI last);
N_NIMCALL(void, deinitgeneraltokenizer_351240)(tgeneraltokenizer351023* g);
N_NIMCALL(void, rendercontainer_365266)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(void, renderindexterm_357871)(trstgenerator357016* d, trstnode341011* n_357874, NimStringDesc** result);
N_NIMCALL(NIM_BOOL, haskey_357880)(table357052 t_357887, NimStringDesc* key_357890);
N_NIMCALL(void, HEX5BHEX5DHEX3D_357974)(table357052* t_357983, NimStringDesc* key_357987, NI val_357989);
N_NIMCALL(NI, HEX5BHEX5D_357943)(table357052 t_357950, NimStringDesc* key_357953);
N_NIMCALL(void, rendersmiley_363975)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(NimStringDesc*, nstGet)(stringtableobj130012* t, NimStringDesc* key);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP4628)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, nossplitFile)(NimStringDesc* path, TY116604* Result);
N_NIMCALL(void, inittable_357120)(NI initialsize_357125, table357052* Result);
N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s);
N_NIMCALL(void, rendertocentry_363538)(trstgenerator357016* d, ttocentry357012* e, NimStringDesc** result);
N_NIMCALL(void, rendertocentries_363554)(trstgenerator357016* d, NI* j, NI lvl, NimStringDesc** result);
N_NIMCALL(void, writefile_12845)(NimStringDesc* filename, NimStringDesc* content);
N_NIMCALL(void, readindexdir_360798)(NimStringDesc* dir, TY360801* Result);
N_NIMCALL(void, inittable_360830)(NI initialsize_360835, table358277* Result);
N_NIMCALL(void, TMP4786)(void* p, NI op);
N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_NIMCALL(NimStringDesc*, HEX2F_116299)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s, NimStringDesc* suffix);
N_NIMCALL(FILE*, open_12617)(NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_12889)(FILE* f, NimStringDesc** line);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI start);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI first);
N_NIMCALL(NIM_BOOL, isdocumentationtitle_358777)(NimStringDesc* hyperlink);
N_NIMCALL(TY118808*, nsuSplitChar)(NimStringDesc* s, NIM_CHAR sep);
N_NIMCALL(NimStringDesc*, unquoteindexcolumn_357700)(NimStringDesc* text);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NI, len_361285)(table358277 t_361292);
N_NIMCALL(void, HEX5BHEX5DHEX3D_361301)(table358277* t_361310, tindexentry358264* key_361314, TY360804* val_361316);
static N_INLINE(NI, HEX21HEX26_127025)(NI h, NI val);
N_NIMCALL(NI, hash_127839)(NimStringDesc* x);
static N_INLINE(NimStringDesc*, or_357568)(NimStringDesc* x, NimStringDesc* y);
static N_INLINE(NI, HEX21HEX24_127054)(NI h);
N_NIMCALL(void, sort_361552)(NimStringDesc** a_361560, NI a_361560Len0, TY361571 cmp_361570, NU8 order_361573);
N_NIMCALL(NI, cmp_4517)(NimStringDesc* x, NimStringDesc* y);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_79604, TNimType* mt);
N_NIMCALL(NimStringDesc*, generatedocumentationjumps_360423)(table358277 docs);
N_NIMCALL(void, sort_359553)(tindexentry358264* a_359561, NI a_359561Len0, TY359572 cmp_359571, NU8 order_359574);
N_NIMCALL(NI, cmp_358298)(tindexentry358264* a, tindexentry358264* b);
N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a, NI aLen0, NimStringDesc* sep);
N_NIMCALL(NimStringDesc*, generatemodulejumps_360718)(TY118808* modules);
N_NIMCALL(NimStringDesc*, generatedocumentationindex_359231)(table358277 docs);
N_NIMCALL(NimStringDesc*, generatedocumentationtoc_358873)(TY360804* entries);
N_NIMCALL(void, TMP4810)(void* p, NI op);
N_NIMCALL(void, striptoclevel_358788)(NimStringDesc* s, TY358880* Result);
static N_INLINE(NimStringDesc*, HEX5BHEX5D_84166)(NimStringDesc* s, slice84173 x);
static N_INLINE(slice84173, HEX2EHEX2E_92299)(NI a_92303, NI b_92305);
N_NIMCALL(NimStringDesc*, indenttolevel_358860)(NI* level, NI newlevel);
N_NIMCALL(NimStringDesc*, nsuRepeatStr)(NI count, NimStringDesc* s);
N_NIMCALL(TY360804*, HEX5BHEX5D_360298)(table358277 t_360305, tindexentry358264* key_360308);
N_NIMCALL(void, sortindex_358618)(tindexentry358264* a, NI aLen0);
N_NIMCALL(void, HEX3CHEX2D_358607)(tindexentry358264* a, tindexentry358264* b);
N_NIMCALL(NimStringDesc*, generatesymbolindex_358695)(TY360804* symbols);
STRING_LITERAL(TMP894, "<wbr />", 7);
STRING_LITERAL(TMP2111, "", 0);
STRING_LITERAL(TMP2113, "\012<h$1><a class=\"toc-backref\" id=\"$2\" href=\"#$2\">$3</a></h$1>", 60);
STRING_LITERAL(TMP2114, "\\rsth$4{$3}\\label{$2}\012", 22);
STRING_LITERAL(TMP2115, "\012<h$1 id=\"$2\">$3</h$1>", 22);
STRING_LITERAL(TMP2116, "html", 4);
STRING_LITERAL(TMP2117, "\\", 1);
STRING_LITERAL(TMP2118, "\\\\", 2);
STRING_LITERAL(TMP2119, "\012", 1);
STRING_LITERAL(TMP2120, "\\n", 2);
STRING_LITERAL(TMP2121, "\011", 1);
STRING_LITERAL(TMP2122, "\\t", 2);
STRING_LITERAL(TMP2123, "<h$1 id=\"$2\"><center>$3</center></h$1>", 38);
STRING_LITERAL(TMP2124, "\\rstov$4{$3}\\label{$2}\012", 23);
STRING_LITERAL(TMP2125, "<hr />\012", 7);
STRING_LITERAL(TMP2126, "\\hrule\012", 7);
STRING_LITERAL(TMP2127, "<p>$1</p>\012", 10);
STRING_LITERAL(TMP2128, "$1\012\012", 4);
STRING_LITERAL(TMP2129, "<ul class=\"simple\">$1</ul>\012", 27);
STRING_LITERAL(TMP2130, "\\begin{itemize}$1\\end{itemize}\012", 31);
STRING_LITERAL(TMP2131, "<li>$1</li>\012", 12);
STRING_LITERAL(TMP2132, "\\item $1\012", 9);
STRING_LITERAL(TMP2133, "<ol class=\"simple\">$1</ol>\012", 27);
STRING_LITERAL(TMP2134, "\\begin{enumerate}$1\\end{enumerate}\012", 35);
STRING_LITERAL(TMP2135, "<dl class=\"docutils\">$1</dl>\012", 29);
STRING_LITERAL(TMP2136, "\\begin{description}$1\\end{description}\012", 39);
STRING_LITERAL(TMP2137, "<dt>$1</dt>\012", 12);
STRING_LITERAL(TMP2138, "\\item[$1] ", 10);
STRING_LITERAL(TMP2139, "<dd>$1</dd>\012", 12);
STRING_LITERAL(TMP2140, "$1\012", 3);
STRING_LITERAL(TMP2141, "<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(TMP2142, " ", 1);
STRING_LITERAL(TMP2143, "&amp;", 5);
STRING_LITERAL(TMP2144, "&lt;", 4);
STRING_LITERAL(TMP2145, "&gt;", 4);
STRING_LITERAL(TMP2146, "&quot;", 6);
STRING_LITERAL(TMP2147, "\\_", 2);
STRING_LITERAL(TMP2148, "\\symbol{123}", 12);
STRING_LITERAL(TMP2149, "\\symbol{125}", 12);
STRING_LITERAL(TMP2150, "\\symbol{91}", 11);
STRING_LITERAL(TMP2151, "\\symbol{93}", 11);
STRING_LITERAL(TMP2152, "\\symbol{92}", 11);
STRING_LITERAL(TMP2153, "\\$", 2);
STRING_LITERAL(TMP2154, "\\&", 2);
STRING_LITERAL(TMP2155, "\\#", 2);
STRING_LITERAL(TMP2156, "\\%", 2);
STRING_LITERAL(TMP2157, "\\symbol{126}", 12);
STRING_LITERAL(TMP2158, "\\symbol{64}", 11);
STRING_LITERAL(TMP2159, "\\symbol{94}", 11);
STRING_LITERAL(TMP2160, "\\symbol{96}", 11);
STRING_LITERAL(TMP2161, "author", 6);
STRING_LITERAL(TMP2162, "authors", 7);
STRING_LITERAL(TMP2163, "version", 7);
STRING_LITERAL(TMP2164, "<tr>$1</tr>\012", 12);
STRING_LITERAL(TMP2165, "$1", 2);
STRING_LITERAL(TMP2166, "<th class=\"docinfo-name\">$1:</th>", 33);
STRING_LITERAL(TMP2167, "\\item[$1:]", 10);
STRING_LITERAL(TMP2168, "<td>$1</td>", 11);
STRING_LITERAL(TMP2169, " $1\012", 4);
STRING_LITERAL(TMP2170, "<table frame=\"void\">$1</table>", 30);
STRING_LITERAL(TMP2171, "\\begin{description}\012$1\\end{description}\012", 40);
STRING_LITERAL(TMP2172, "<th align=\"left\">$1</th>", 24);
STRING_LITERAL(TMP2173, "\\item[$1]", 9);
STRING_LITERAL(TMP2174, "<td align=\"left\">$1</td>\012", 25);
STRING_LITERAL(TMP2176, "false renderRstToOut", 20);
STRING_LITERAL(TMP2177, "<pre>$1</pre>\012", 14);
STRING_LITERAL(TMP2178, "\\begin{rstpre}\012$1\012\\end{rstpre}\012", 31);
STRING_LITERAL(TMP2179, "<p>$1</p>", 9);
STRING_LITERAL(TMP2180, "$1<br />", 8);
STRING_LITERAL(TMP2181, "$1\\\\\012", 5);
STRING_LITERAL(TMP2182, "<blockquote><p>$1</p></blockquote>\012", 35);
STRING_LITERAL(TMP2183, "\\begin{quote}$1\\end{quote}\012", 27);
STRING_LITERAL(TMP2184, "<table border=\"1\" class=\"docutils\">$1</table>", 45);
STRING_LITERAL(TMP2185, "\\begin{table}\\begin{rsttab}{", 28);
STRING_LITERAL(TMP2186, "|X", 2);
STRING_LITERAL(TMP2187, "|}\012\\hline\012$1\\end{rsttab}\\end{table}", 35);
STRING_LITERAL(TMP2188, " & ", 3);
STRING_LITERAL(TMP2189, "\\\\\012\\hline\012", 10);
STRING_LITERAL(TMP2190, "<tr>", 4);
STRING_LITERAL(TMP2191, "</tr>\012", 6);
STRING_LITERAL(TMP2192, "<th>$1</th>", 11);
STRING_LITERAL(TMP2193, "\\textbf{$1}", 11);
STRING_LITERAL(TMP2194, "<a class=\"reference external\" href=\"#$2\">$1</a>", 47);
STRING_LITERAL(TMP2195, "$1\\ref{$2}", 10);
STRING_LITERAL(TMP2196, "<a class=\"reference external\" href=\"$1\">$1</a>", 46);
STRING_LITERAL(TMP2197, "\\href{$1}{$1}", 13);
STRING_LITERAL(TMP2198, "<a class=\"reference external\" href=\"$2\">$1</a>", 46);
STRING_LITERAL(TMP2199, "\\href{$2}{$1}", 13);
STRING_LITERAL(TMP2201, "scale", 5);
static NIM_CONST TY210607 TMP2202 = {
0x00, 0x3E, 0x00, 0x00, 0x21, 0x80, 0xFF, 0x07,
0xFE, 0xFF, 0xFF, 0x97, 0xFE, 0xFF, 0xFF, 0x07,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
;
STRING_LITERAL(TMP2203, " scale=\"$1\"", 11);
STRING_LITERAL(TMP2204, " scale=$1", 9);
STRING_LITERAL(TMP2205, "height", 6);
STRING_LITERAL(TMP2206, " height=\"$1\"", 12);
STRING_LITERAL(TMP2207, " height=$1", 10);
STRING_LITERAL(TMP2208, "width", 5);
STRING_LITERAL(TMP2209, " width=\"$1\"", 11);
STRING_LITERAL(TMP2210, " width=$1", 9);
STRING_LITERAL(TMP2211, "alt", 3);
STRING_LITERAL(TMP2212, " alt=\"$1\"", 9);
STRING_LITERAL(TMP2213, "align", 5);
STRING_LITERAL(TMP2214, " align=\"$1\"", 11);
STRING_LITERAL(TMP2215, "[$1]", 4);
STRING_LITERAL(TMP2216, "<img src=\"$1\"$2 />", 18);
STRING_LITERAL(TMP2217, "\\includegraphics$2{$1}", 22);
STRING_LITERAL(TMP2218, "number-lines", 12);
STRING_LITERAL(TMP2219, "file", 4);
STRING_LITERAL(TMP2220, "default-language", 16);
STRING_LITERAL(TMP2229, "<pre>", 5);
STRING_LITERAL(TMP2230, "</pre>", 6);
NIM_CONST keyvaluepair130008 TMP2228 = {((NimStringDesc*) &TMP2229),
((NimStringDesc*) &TMP2230)}
;
STRING_LITERAL(TMP2231, "<table class=\"line-nums-table\"><tbody><tr><td class=\"blob-line-"
"nums\"><pre>", 74);
STRING_LITERAL(TMP2232, "</pre></td><td><pre>", 20);
STRING_LITERAL(TMP2233, "</pre></td></tr></tbody></table>", 32);
STRING_LITERAL(TMP2234, "\\begin{rstpre}\012", 15);
STRING_LITERAL(TMP2395, "<span class=\"$2\">$1</span>", 26);
STRING_LITERAL(TMP2396, "\\span$2{$1}", 11);
extern NIM_CONST TY351082 tokenclasstostr_351081;
STRING_LITERAL(TMP2430, "\012\\end{rstpre}\012", 14);
STRING_LITERAL(TMP2431, "<div>$1</div>", 13);
STRING_LITERAL(TMP2432, "<div class=\"$1\">$2</div>", 24);
STRING_LITERAL(TMP2433, "$2", 2);
STRING_LITERAL(TMP2434, "|$1|", 4);
STRING_LITERAL(TMP2435, "<sub>$1</sub>", 13);
STRING_LITERAL(TMP2436, "\\rstsub{$1}", 11);
STRING_LITERAL(TMP2437, "<sup>$1</sup>", 13);
STRING_LITERAL(TMP2438, "\\rstsup{$1}", 11);
STRING_LITERAL(TMP2439, "<em>$1</em>", 11);
STRING_LITERAL(TMP2440, "\\emph{$1}", 9);
STRING_LITERAL(TMP2441, "<strong>$1</strong>", 19);
STRING_LITERAL(TMP2442, "<strong><em>$1</em></strong>", 28);
STRING_LITERAL(TMP2443, "\\textbf{emph{$1}}", 17);
STRING_LITERAL(TMP2444, "<cite>$1</cite>", 15);
STRING_LITERAL(TMP2447, "<span id=\"$1\">$2</span>", 23);
STRING_LITERAL(TMP2448, "$2\\label{$1}", 12);
STRING_LITERAL(TMP2449, "<tt class=\"docutils literal\"><span class=\"pre\">$1</span></tt>", 61);
STRING_LITERAL(TMP2450, "\\texttt{$1}", 11);
STRING_LITERAL(TMP2451, "<img src=\"$1\" width=\"15\" \012        height=\"17\" hspace=\"2\" vspace"
"=\"2\" class=\"smiley\" />", 85);
STRING_LITERAL(TMP2452, "\\includegraphics{$1}", 20);
STRING_LITERAL(TMP2453, "doc.smiley_format", 17);
STRING_LITERAL(TMP4632, ".nim", 4);
STRING_LITERAL(TMP4633, "Module ", 7);
STRING_LITERAL(TMP4634, "split.item.toc", 14);
STRING_LITERAL(TMP4707, "<li><a class=\"reference\" id=\"$1_toc\" href=\"#$1\">$2</a></li>\012", 60);
STRING_LITERAL(TMP4708, "\\item\\label{$1_toc} $2\\ref{$1}\012", 31);
STRING_LITERAL(TMP4709, "<ul class=\"simple\">$1</ul>", 26);
STRING_LITERAL(TMP4710, "\\begin{enumerate}$1\\end{enumerate}", 34);
STRING_LITERAL(TMP4788, ".", 1);
STRING_LITERAL(TMP4789, "..", 2);
STRING_LITERAL(TMP4790, ".idx", 4);
STRING_LITERAL(TMP4791, "doc_toc_", 8);
STRING_LITERAL(TMP4795, "Documents: ", 11);
STRING_LITERAL(TMP4799, "<a href=\"", 9);
STRING_LITERAL(TMP4800, "\">", 2);
STRING_LITERAL(TMP4801, "</a>", 4);
STRING_LITERAL(TMP4802, ", ", 2);
STRING_LITERAL(TMP4803, ".<br>", 5);
STRING_LITERAL(TMP4804, "<p />", 5);
STRING_LITERAL(TMP4805, "Modules: ", 9);
STRING_LITERAL(TMP4806, ".html\">", 7);
STRING_LITERAL(TMP4807, "<h2>Documentation files</h2>\012", 29);
STRING_LITERAL(TMP4811, "<ul>\012", 5);
STRING_LITERAL(TMP4812, "<ul>", 4);
STRING_LITERAL(TMP4813, "</ul>", 5);
STRING_LITERAL(TMP4814, "<li><a href=\"", 13);
STRING_LITERAL(TMP4815, "</a>\012", 5);
STRING_LITERAL(TMP4816, "</ul>\012", 6);
STRING_LITERAL(TMP4817, "<ul><li><a href=\"", 17);
STRING_LITERAL(TMP4818, "<h2>API symbols</h2>\012", 21);
STRING_LITERAL(TMP4819, "<dt><span>$1:</span></dt><ul class=\"simple\"><dd>\012", 49);
STRING_LITERAL(TMP4820, "<li><a class=\"reference external\"\012          title=\"$3\" href=\"$1"
"\">$2</a></li>\012          ", 87);
STRING_LITERAL(TMP4821, "<li><a class=\"reference external\" href=\"$1\">$2</a></li>\012       "
"   ", 66);
STRING_LITERAL(TMP4822, "</ul></dd>\012", 11);
NimStringDesc* splitter_357332;
extern tgcheap47016 gch_47044;
extern TNimType NTI351023; /* TGeneralTokenizer */
extern TNimType NTI3211; /* RootObj */
TNimType NTI357016; /* TRstGenerator */
TNimType NTI357010; /* TOutputTarget */
extern TNimType NTI130014; /* StringTableRef */
extern TNimType NTI108; /* int */
TNimType NTI357012; /* TTocEntry */
extern TNimType NTI341007; /* PRstNode */
extern TNimType NTI149; /* string */
TNimType NTI357034; /* seq[TTocEntry] */
extern TNimType NTI138; /* bool */
extern TNimType NTI342015; /* TRstParseOptions */
extern TNimType NTI342023; /* TFindFileHandler */
extern TNimType NTI342021; /* TMsgHandler */
TNimType NTI357042; /* array[TMetaEnum, string] */
extern TNimType NTI357052; /* Table */
extern TNimType NTI118808; /* seq[string] */
TNimType NTI358264; /* TIndexEntry */
TNimType NTI360804; /* seq[TIndexEntry] */
extern TNimType NTI358280; /* KeyValuePairSeq */
TNimType NTI358880; /* tuple[level: int, text: string] */
TNimType NTI358879; /* seq[tuple[level: int, text: string]] */

static N_INLINE(tcell44935*, usrtocell_48646)(void* usr) {
	tcell44935* result;
	result = 0;
	result = ((tcell44935*) ((NI)((NU64)(((NI) (usr))) - (NU64)(((NI)sizeof(tcell44935))))));
	return result;
}

static N_INLINE(void, rtladdzct_50204)(tcell44935* c) {
	addzct_48617((&gch_47044.Zct), c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell44935* c;
	c = usrtocell_48646(p);
	{
		(*c).Refcount -= 8;
		if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA3;
		rtladdzct_50204(c);
	}
	LA3: ;
}

N_NIMCALL(void, renderaux_357589)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	{
		NI i_357607;
		NI HEX3Atmp_357609;
		NI LOC2;
		NI res_357612;
		i_357607 = 0;
		HEX3Atmp_357609 = 0;
		LOC2 = 0;
		LOC2 = len_341084(n);
		HEX3Atmp_357609 = (NI64)(LOC2 - 1);
		res_357612 = 0;
		{
			while (1) {
				if (!(res_357612 <= HEX3Atmp_357609)) goto LA4;
				i_357607 = res_357612;
				renderrsttoout_357579(d, (*n).Sons->data[i_357607], result);
				res_357612 += 1;
			} LA4: ;
		}
	}
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell44935* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_48646(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell44935* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_48646((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA11;
			rtladdzct_50204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, dispa_357544)(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: ;
}

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

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

N_NIMCALL(NimStringDesc*, quoteindexcolumn_357690)(NimStringDesc* text) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuReplaceStr(text, ((NimStringDesc*) &TMP2117), ((NimStringDesc*) &TMP2118));
	LOC2 = 0;
	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &TMP2119), ((NimStringDesc*) &TMP2120));
	result = nsuReplaceStr(LOC2, ((NimStringDesc*) &TMP2121), ((NimStringDesc*) &TMP2122));
	return result;
}

N_NIMCALL(void, setindexterm_357710)(trstgenerator357016* d, NimStringDesc* id, NimStringDesc* term, NimStringDesc* linktitle, NimStringDesc* linkdesc) {
	NimStringDesc* entry;
	NIM_BOOL istitle;
	NimStringDesc* htmlfile;
	NimStringDesc* LOC1;
	entry = copyString(term);
	istitle = NIM_FALSE;
	entry = addChar(entry, 9);
	LOC1 = 0;
	LOC1 = nosextractFilename((*d).Filename);
	htmlfile = noschangeFileExt(LOC1, ((NimStringDesc*) &TMP2116));
	entry = resizeString(entry, htmlfile->Sup.len + 0);
appendString(entry, htmlfile);
	{
		if (!(0 < id->Sup.len)) goto LA4;
		entry = addChar(entry, 35);
		entry = resizeString(entry, id->Sup.len + 0);
appendString(entry, id);
	}
	goto LA2;
	LA4: ;
	{
		istitle = NIM_TRUE;
	}
	LA2: ;
	{
		NIM_BOOL LOC9;
		NimStringDesc* LOC13;
		NimStringDesc* LOC14;
		NimStringDesc* LOC15;
		NimStringDesc* LOC16;
		LOC9 = 0;
		LOC9 = (0 < linktitle->Sup.len);
		if (LOC9) goto LA10;
		LOC9 = (0 < linkdesc->Sup.len);
		LA10: ;
		if (!LOC9) goto LA11;
		LOC13 = 0;
		LOC14 = 0;
		LOC14 = quoteindexcolumn_357690(linktitle);
		LOC13 = rawNewString(LOC14->Sup.len + 1);
appendChar(LOC13, 9);
appendString(LOC13, LOC14);
		entry = resizeString(entry, LOC13->Sup.len + 0);
appendString(entry, LOC13);
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = quoteindexcolumn_357690(linkdesc);
		LOC15 = rawNewString(LOC16->Sup.len + 1);
appendChar(LOC15, 9);
appendString(LOC15, LOC16);
		entry = resizeString(entry, LOC15->Sup.len + 0);
appendString(entry, LOC15);
	}
	LA11: ;
	entry = resizeString(entry, 1);
appendString(entry, ((NimStringDesc*) &TMP2119));
	{
		if (!istitle) goto LA19;
		insert_85801((&(*d).Theindex), entry, 0);
	}
	goto LA17;
	LA19: ;
	{
		(*d).Theindex = resizeString((*d).Theindex, entry->Sup.len + 0);
appendString((*d).Theindex, entry);
	}
	LA17: ;
}

N_NIMCALL(NimStringDesc*, striptochtml_363260)(NimStringDesc* s) {
	NimStringDesc* result;
	NI first;
	result = 0;
	result = copyString(s);
	first = nsuFindChar(result, 60, 0);
	{
		while (1) {
			NI last;
			if (!(0 <= first)) goto LA2;
			last = nsuFindChar(result, 62, first);
			{
				if (!(last < 0)) goto LA5;
				goto BeforeRet;
			}
			LA5: ;
			nsuDelete((&result), first, last);
			first = nsuFindChar(result, 60, first);
		} LA2: ;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, renderheadline_363281)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	NimStringDesc* tmp;
	NimStringDesc* refname;
	NimStringDesc* LOC14;
	NimStringDesc* LOC15;
	NimStringDesc* LOC16;
	tmp = copyString(((NimStringDesc*) &TMP2111));
	{
		NI i_363300;
		NI HEX3Atmp_363405;
		NI LOC2;
		NI res_363408;
		i_363300 = 0;
		HEX3Atmp_363405 = 0;
		LOC2 = 0;
		LOC2 = len_341084(n);
		HEX3Atmp_363405 = (NI64)(LOC2 - 1);
		res_363408 = 0;
		{
			while (1) {
				if (!(res_363408 <= HEX3Atmp_363405)) goto LA4;
				i_363300 = res_363408;
				renderrsttoout_357579(d, (*n).Sons->data[i_363300], (&tmp));
				res_363408 += 1;
			} LA4: ;
		}
	}
	unsureAsgnRef((void**) (&(*d).Currentsection), copyString(tmp));
	refname = rstnodetorefname_342061(n);
	{
		NI length;
		NimStringDesc* LOC9;
		NimStringDesc* LOC10;
		TY196620 LOC11;
		if (!(*d).Hastoc) goto LA7;
		length = (*d).Tocpart->Sup.len;
		(*d).Tocpart = (TY357034*) setLengthSeq(&((*d).Tocpart)->Sup, sizeof(ttocentry357012), (NI64)(length + 1));
		LOC9 = 0;
		LOC9 = (*d).Tocpart->data[length].Refname; (*d).Tocpart->data[length].Refname = copyStringRC1(refname);
		if (LOC9) nimGCunrefNoCycle(LOC9);
		asgnRefNoCycle((void**) (&(*d).Tocpart->data[length].N), n);
		LOC10 = 0;
		LOC10 = (*d).Tocpart->data[length].Header; (*d).Tocpart->data[length].Header = copyStringRC1(tmp);
		if (LOC10) nimGCunrefNoCycle(LOC10);
		memset((void*)LOC11, 0, sizeof(LOC11));
		LOC11[0] = nimIntToStr((*n).Level);
		LOC11[1] = copyString((*d).Tocpart->data[length].Refname);
		LOC11[2] = copyString(tmp);
		LOC11[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI64)((NI64)((*n).Level - 1) + 65))))));
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2113), ((NimStringDesc*) &TMP2114), LOC11, 4);
	}
	goto LA5;
	LA7: ;
	{
		TY196620 LOC13;
		memset((void*)LOC13, 0, sizeof(LOC13));
		LOC13[0] = nimIntToStr((*n).Level);
		LOC13[1] = copyString(refname);
		LOC13[2] = copyString(tmp);
		LOC13[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI64)((NI64)((*n).Level - 1) + 65))))));
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2115), ((NimStringDesc*) &TMP2114), LOC13, 4);
	}
	LA5: ;
	LOC14 = 0;
	LOC14 = striptochtml_363260(tmp);
	LOC15 = 0;
	LOC16 = 0;
	LOC16 = nsuRepeatChar(((0 >= (*n).Level) ? 0 : (*n).Level), 32);
	LOC15 = rawNewString(LOC16->Sup.len + tmp->Sup.len + 0);
appendString(LOC15, LOC16);
appendString(LOC15, tmp);
	setindexterm_357710(d, refname, LOC14, LOC15, ((NimStringDesc*) &TMP2111));
}

N_NIMCALL(void, renderoverline_363425)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	{
		if (!((*d).Meta[(((NU8) 1))- 0]->Sup.len == 0)) goto LA3;
		{
			NI i_363443;
			NI HEX3Atmp_363488;
			NI LOC6;
			NI res_363491;
			i_363443 = 0;
			HEX3Atmp_363488 = 0;
			LOC6 = 0;
			LOC6 = len_341084(n);
			HEX3Atmp_363488 = (NI64)(LOC6 - 1);
			res_363491 = 0;
			{
				while (1) {
					if (!(res_363491 <= HEX3Atmp_363488)) goto LA8;
					i_363443 = res_363491;
					renderrsttoout_357579(d, (*n).Sons->data[i_363443], (&(*d).Meta[(((NU8) 1))- 0]));
					res_363491 += 1;
				} LA8: ;
			}
		}
		unsureAsgnRef((void**) (&(*d).Currentsection), copyString((*d).Meta[(((NU8) 1))- 0]));
	}
	goto LA1;
	LA3: ;
	{
		if (!((*d).Meta[(((NU8) 2))- 0]->Sup.len == 0)) goto LA10;
		{
			NI i_363457;
			NI HEX3Atmp_363494;
			NI LOC13;
			NI res_363497;
			i_363457 = 0;
			HEX3Atmp_363494 = 0;
			LOC13 = 0;
			LOC13 = len_341084(n);
			HEX3Atmp_363494 = (NI64)(LOC13 - 1);
			res_363497 = 0;
			{
				while (1) {
					if (!(res_363497 <= HEX3Atmp_363494)) goto LA15;
					i_363457 = res_363497;
					renderrsttoout_357579(d, (*n).Sons->data[i_363457], (&(*d).Meta[(((NU8) 2))- 0]));
					res_363497 += 1;
				} LA15: ;
			}
		}
		unsureAsgnRef((void**) (&(*d).Currentsection), copyString((*d).Meta[(((NU8) 2))- 0]));
	}
	goto LA1;
	LA10: ;
	{
		NimStringDesc* tmp;
		TY196620 LOC21;
		tmp = copyString(((NimStringDesc*) &TMP2111));
		{
			NI i_363472;
			NI HEX3Atmp_363500;
			NI LOC18;
			NI res_363503;
			i_363472 = 0;
			HEX3Atmp_363500 = 0;
			LOC18 = 0;
			LOC18 = len_341084(n);
			HEX3Atmp_363500 = (NI64)(LOC18 - 1);
			res_363503 = 0;
			{
				while (1) {
					if (!(res_363503 <= HEX3Atmp_363500)) goto LA20;
					i_363472 = res_363503;
					renderrsttoout_357579(d, (*n).Sons->data[i_363472], (&tmp));
					res_363503 += 1;
				} LA20: ;
			}
		}
		unsureAsgnRef((void**) (&(*d).Currentsection), copyString(tmp));
		memset((void*)LOC21, 0, sizeof(LOC21));
		LOC21[0] = nimIntToStr((*n).Level);
		LOC21[1] = rstnodetorefname_342061(n);
		LOC21[2] = copyString(tmp);
		LOC21[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI64)((NI64)((*n).Level - 1) + 65))))));
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2123), ((NimStringDesc*) &TMP2124), LOC21, 4);
	}
	LA1: ;
}

N_NIMCALL(void, renderaux_357629)(trstgenerator357016* d, trstnode341011* n, NimStringDesc* frmta, NimStringDesc* frmtb, NimStringDesc** result) {
	NimStringDesc* tmp;
	tmp = copyString(((NimStringDesc*) &TMP2111));
	{
		NI i_357650;
		NI HEX3Atmp_357670;
		NI LOC2;
		NI res_357673;
		i_357650 = 0;
		HEX3Atmp_357670 = 0;
		LOC2 = 0;
		LOC2 = len_341084(n);
		HEX3Atmp_357670 = (NI64)(LOC2 - 1);
		res_357673 = 0;
		{
			while (1) {
				if (!(res_357673 <= HEX3Atmp_357670)) goto LA4;
				i_357650 = res_357673;
				renderrsttoout_357579(d, (*n).Sons->data[i_357650], (&tmp));
				res_357673 += 1;
			} LA4: ;
		}
	}
	{
		TY196301 LOC9;
		if (!!(((*d).Target == ((NU8) 1)))) goto LA7;
		memset((void*)LOC9, 0, sizeof(LOC9));
		LOC9[0] = copyString(tmp);
		nsuAddf(result, frmta, LOC9, 1);
	}
	goto LA5;
	LA7: ;
	{
		TY196301 LOC11;
		memset((void*)LOC11, 0, sizeof(LOC11));
		LOC11[0] = copyString(tmp);
		nsuAddf(result, frmtb, LOC11, 1);
	}
	LA5: ;
}

N_NIMCALL(NI, nextsplitpoint_357349)(NimStringDesc* s, NI start) {
	NI result;
	result = 0;
	result = start;
	{
		while (1) {
			if (!(result < (NI64)(s->Sup.len + 0))) goto LA2;
			switch (((NU8)(s->data[result]))) {
			case 95:
			{
				goto BeforeRet;
			}
			break;
			case 97 ... 122:
			{
				{
					if (!((NI64)(result + 1) < (NI64)(s->Sup.len + 0))) goto LA7;
					{
						if (!(((NU8)(s->data[(NI64)(result + 1)])) >= ((NU8)(65)) && ((NU8)(s->data[(NI64)(result + 1)])) <= ((NU8)(90)))) goto LA11;
						goto BeforeRet;
					}
					LA11: ;
				}
				LA7: ;
			}
			break;
			default:
			{
			}
			break;
			}
			result += 1;
		} LA2: ;
	}
	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)), (NI64)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, addxmlchar_357299)(NimStringDesc** dest, NIM_CHAR c) {
	switch (((NU8)(c))) {
	case 38:
	{
		(*dest) = resizeString((*dest), 5);
appendString((*dest), ((NimStringDesc*) &TMP2143));
	}
	break;
	case 60:
	{
		(*dest) = resizeString((*dest), 4);
appendString((*dest), ((NimStringDesc*) &TMP2144));
	}
	break;
	case 62:
	{
		(*dest) = resizeString((*dest), 4);
appendString((*dest), ((NimStringDesc*) &TMP2145));
	}
	break;
	case 34:
	{
		(*dest) = resizeString((*dest), 6);
appendString((*dest), ((NimStringDesc*) &TMP2146));
	}
	break;
	default:
	{
		(*dest) = addChar((*dest), c);
	}
	break;
	}
}

N_NIMCALL(void, addtexchar_357321)(NimStringDesc** dest, NIM_CHAR c) {
	switch (((NU8)(c))) {
	case 95:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2147));
	}
	break;
	case 123:
	{
		(*dest) = resizeString((*dest), 12);
appendString((*dest), ((NimStringDesc*) &TMP2148));
	}
	break;
	case 125:
	{
		(*dest) = resizeString((*dest), 12);
appendString((*dest), ((NimStringDesc*) &TMP2149));
	}
	break;
	case 91:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2150));
	}
	break;
	case 93:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2151));
	}
	break;
	case 92:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2152));
	}
	break;
	case 36:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2153));
	}
	break;
	case 38:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2154));
	}
	break;
	case 35:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2155));
	}
	break;
	case 37:
	{
		(*dest) = resizeString((*dest), 2);
appendString((*dest), ((NimStringDesc*) &TMP2156));
	}
	break;
	case 126:
	{
		(*dest) = resizeString((*dest), 12);
appendString((*dest), ((NimStringDesc*) &TMP2157));
	}
	break;
	case 64:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2158));
	}
	break;
	case 94:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2159));
	}
	break;
	case 96:
	{
		(*dest) = resizeString((*dest), 11);
appendString((*dest), ((NimStringDesc*) &TMP2160));
	}
	break;
	default:
	{
		(*dest) = addChar((*dest), c);
	}
	break;
	}
}

static N_INLINE(void, escchar_357337)(NU8 target, NimStringDesc** dest, NIM_CHAR c) {
	switch (target) {
	case ((NU8) 0):
	{
		addxmlchar_357299(dest, c);
	}
	break;
	case ((NU8) 1):
	{
		addtexchar_357321(dest, c);
	}
	break;
	}
}

N_NIMCALL(NimStringDesc*, esc_357407)(NU8 target, NimStringDesc* s, NI splitafter) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2111));
	{
		NI partlen;
		NI j;
		if (!(0 <= splitafter)) goto LA3;
		partlen = 0;
		j = 0;
		{
			while (1) {
				NI k;
				if (!(j < s->Sup.len)) goto LA6;
				k = nextsplitpoint_357349(s, j);
				{
					NIM_BOOL LOC9;
					LOC9 = 0;
					LOC9 = !(eqStrings(splitter_357332, ((NimStringDesc*) &TMP2142)));
					if (LOC9) goto LA10;
					LOC9 = (splitafter < (NI64)((NI64)((NI64)(partlen + k) - j) + 1));
					LA10: ;
					if (!LOC9) goto LA11;
					partlen = 0;
					result = resizeString(result, splitter_357332->Sup.len + 0);
appendString(result, splitter_357332);
				}
				LA11: ;
				{
					NI i_357430;
					NI res_357462;
					i_357430 = 0;
					res_357462 = j;
					{
						while (1) {
							if (!(res_357462 <= k)) goto LA15;
							i_357430 = res_357462;
							escchar_357337(target, (&result), s->data[i_357430]);
							res_357462 += 1;
						} LA15: ;
					}
				}
				partlen += (NI64)((NI64)(k - j) + 1);
				j = (NI64)(k + 1);
			} LA6: ;
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_357456;
			NI HEX3Atmp_357465;
			NI res_357468;
			i_357456 = 0;
			HEX3Atmp_357465 = 0;
			HEX3Atmp_357465 = (NI64)(s->Sup.len - 1);
			res_357468 = 0;
			{
				while (1) {
					if (!(res_357468 <= HEX3Atmp_357465)) goto LA19;
					i_357456 = res_357468;
					escchar_357337(target, (&result), s->data[i_357456]);
					res_357468 += 1;
				} LA19: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, renderfield_365327)(trstgenerator357016* d, trstnode341011* 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_342067((*n).Sons->data[0]);
		LOC5 = 0;
		LOC5 = addnodes_342067((*n).Sons->data[1]);
		LOC6 = 0;
		LOC6 = nsuStrip(LOC5, NIM_TRUE, NIM_TRUE);
		fieldval = esc_357407((*d).Target, LOC6, -1);
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC12;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = nsuCmpIgnoreStyle(fieldname, ((NimStringDesc*) &TMP2161));
			LOC9 = (LOC10 == 0);
			if (LOC9) goto LA11;
			LOC12 = 0;
			LOC12 = nsuCmpIgnoreStyle(fieldname, ((NimStringDesc*) &TMP2162));
			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*) &TMP2163));
			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_357629(d, n, ((NimStringDesc*) &TMP2164), ((NimStringDesc*) &TMP2165), result);
	}
	LA29: ;
}

N_NIMCALL(NimStringDesc*, texcolumns_365289)(trstnode341011* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2111));
	{
		NI i_365305;
		NI HEX3Atmp_365307;
		NI res_365310;
		i_365305 = 0;
		HEX3Atmp_365307 = 0;
		HEX3Atmp_365307 = len_341084(n);
		res_365310 = 1;
		{
			while (1) {
				if (!(res_365310 <= HEX3Atmp_365307)) goto LA3;
				i_365305 = res_365310;
				result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2186));
				res_365310 += 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(NimStringDesc*, dispf_357521)(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_363598)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	NimStringDesc* options;
	NimStringDesc* s;
	NimStringDesc* arg;
	options = copyString(((NimStringDesc*) &TMP2111));
	s = getfieldvalue_342073(n, ((NimStringDesc*) &TMP2201));
	{
		NIM_BOOL LOC3;
		TY196301 LOC7;
		LOC3 = 0;
		LOC3 = (0 < s->Sup.len);
		if (!(LOC3)) goto LA4;
		LOC3 = allcharsinset_96479(s, TMP2202);
		LA4: ;
		if (!LOC3) goto LA5;
		memset((void*)LOC7, 0, sizeof(LOC7));
		LOC7[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_357544((*d).Target, (&options), ((NimStringDesc*) &TMP2203), ((NimStringDesc*) &TMP2204), LOC7, 1);
	}
	LA5: ;
	s = getfieldvalue_342073(n, ((NimStringDesc*) &TMP2205));
	{
		NIM_BOOL LOC10;
		TY196301 LOC14;
		LOC10 = 0;
		LOC10 = (0 < s->Sup.len);
		if (!(LOC10)) goto LA11;
		LOC10 = allcharsinset_96479(s, TMP2202);
		LA11: ;
		if (!LOC10) goto LA12;
		memset((void*)LOC14, 0, sizeof(LOC14));
		LOC14[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_357544((*d).Target, (&options), ((NimStringDesc*) &TMP2206), ((NimStringDesc*) &TMP2207), LOC14, 1);
	}
	LA12: ;
	s = getfieldvalue_342073(n, ((NimStringDesc*) &TMP2208));
	{
		NIM_BOOL LOC17;
		TY196301 LOC21;
		LOC17 = 0;
		LOC17 = (0 < s->Sup.len);
		if (!(LOC17)) goto LA18;
		LOC17 = allcharsinset_96479(s, TMP2202);
		LA18: ;
		if (!LOC17) goto LA19;
		memset((void*)LOC21, 0, sizeof(LOC21));
		LOC21[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_357544((*d).Target, (&options), ((NimStringDesc*) &TMP2209), ((NimStringDesc*) &TMP2210), LOC21, 1);
	}
	LA19: ;
	s = getfieldvalue_342073(n, ((NimStringDesc*) &TMP2211));
	{
		NIM_BOOL LOC24;
		TY196301 LOC28;
		LOC24 = 0;
		LOC24 = (0 < s->Sup.len);
		if (!(LOC24)) goto LA25;
		LOC24 = allcharsinset_96479(s, TMP2202);
		LA25: ;
		if (!LOC24) goto LA26;
		memset((void*)LOC28, 0, sizeof(LOC28));
		LOC28[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_357544((*d).Target, (&options), ((NimStringDesc*) &TMP2212), ((NimStringDesc*) &TMP2111), LOC28, 1);
	}
	LA26: ;
	s = getfieldvalue_342073(n, ((NimStringDesc*) &TMP2213));
	{
		NIM_BOOL LOC31;
		TY196301 LOC35;
		LOC31 = 0;
		LOC31 = (0 < s->Sup.len);
		if (!(LOC31)) goto LA32;
		LOC31 = allcharsinset_96479(s, TMP2202);
		LA32: ;
		if (!LOC31) goto LA33;
		memset((void*)LOC35, 0, sizeof(LOC35));
		LOC35[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_357544((*d).Target, (&options), ((NimStringDesc*) &TMP2214), ((NimStringDesc*) &TMP2111), LOC35, 1);
	}
	LA33: ;
	{
		TY196301 LOC40;
		if (!(0 < options->Sup.len)) goto LA38;
		memset((void*)LOC40, 0, sizeof(LOC40));
		LOC40[0] = copyString(options);
		options = dispf_357521((*d).Target, ((NimStringDesc*) &TMP2165), ((NimStringDesc*) &TMP2215), LOC40, 1);
	}
	LA38: ;
	arg = getargument_342080(n);
	{
		NIM_BOOL LOC43;
		TY168969 LOC47;
		LOC43 = 0;
		LOC43 = (0 < arg->Sup.len);
		if (!(LOC43)) goto LA44;
		LOC43 = allcharsinset_96479(arg, TMP2202);
		LA44: ;
		if (!LOC43) goto LA45;
		memset((void*)LOC47, 0, sizeof(LOC47));
		LOC47[0] = copyString(arg);
		LOC47[1] = copyString(options);
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2216), ((NimStringDesc*) &TMP2217), LOC47, 2);
	}
	LA45: ;
	{
		NI LOC50;
		LOC50 = 0;
		LOC50 = len_341084(n);
		if (!(3 <= LOC50)) goto LA51;
		renderrsttoout_357579(d, (*n).Sons->data[2], result);
	}
	LA51: ;
}

N_NIMCALL(void, init_357078)(codeblockparams357020* p) {
	(*p).Startline = 1;
	(*p).Lang = ((NU8) 0);
	unsureAsgnRef((void**) (&(*p).Langstr), copyString(((NimStringDesc*) &TMP2111)));
}

N_NIMCALL(void, parsecodeblockfield_363991)(trstgenerator357016* d, trstnode341011* n, codeblockparams357020* params) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	LOC1 = 0;
	LOC1 = getargument_342080(n);
	LOC2 = 0;
	LOC2 = nsuToLowerStr(LOC1);
	if (eqStrings(LOC2, ((NimStringDesc*) &TMP2218))) goto LA3;
	if (eqStrings(LOC2, ((NimStringDesc*) &TMP2219))) goto LA4;
	if (eqStrings(LOC2, ((NimStringDesc*) &TMP2220))) goto LA5;
	goto LA6;
	LA3: ;
	{
		NI number;
		(*params).Numberlines = NIM_TRUE;
		number = 0;
		{
			NimStringDesc* LOC11;
			NI LOC12;
			LOC11 = 0;
			LOC11 = getfieldvalue_345823(n);
			LOC12 = 0;
			LOC12 = npuParseInt(LOC11, (&number), 0);
			if (!(0 < LOC12)) goto LA13;
			(*params).Startline = number;
		}
		LA13: ;
	}
	goto LA7;
	LA4: ;
	{
	}
	goto LA7;
	LA5: ;
	{
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = getfieldvalue_345823(n);
		unsureAsgnRef((void**) (&(*params).Langstr), nsuStrip(LOC17, NIM_TRUE, NIM_TRUE));
		(*params).Lang = getsourcelanguage_351093((*params).Langstr);
	}
	goto LA7;
	LA6: ;
	{
		NimStringDesc* LOC19;
		LOC19 = 0;
		LOC19 = getargument_342080(n);
		(*d).Msghandler((*d).Filename, 1, 0, ((NU8) 9), LOC19);
	}
	LA7: ;
}

N_NIMCALL(void, parsecodeblockparams_364007)(trstgenerator357016* d, trstnode341011* n, codeblockparams357020* Result) {
	NimStringDesc* LOC12;
	init_357078(Result);
	{
		if (!n == 0) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((*n).Sons->data[1] == 0)) goto LA7;
		{
			trstnode341011* son_364611;
			trstnodeseq341009* HEX3Atmp_364614;
			NI i_364617;
			NI l_364619;
			son_364611 = 0;
			HEX3Atmp_364614 = 0;
			HEX3Atmp_364614 = (*(*n).Sons->data[1]).Sons;
			i_364617 = 0;
			l_364619 = HEX3Atmp_364614->Sup.len;
			{
				while (1) {
					if (!(i_364617 < l_364619)) goto LA11;
					son_364611 = HEX3Atmp_364614->data[i_364617];
					parsecodeblockfield_363991(d, son_364611, Result);
					i_364617 += 1;
				} LA11: ;
			}
		}
	}
	LA7: ;
	LOC12 = 0;
	LOC12 = getargument_342080(n);
	unsureAsgnRef((void**) (&(*Result).Langstr), nsuStrip(LOC12, NIM_TRUE, NIM_TRUE));
	{
		if (!!((((*Result).Langstr) && ((*Result).Langstr)->Sup.len == 0))) goto LA15;
		(*Result).Lang = getsourcelanguage_351093((*Result).Langstr);
	}
	LA15: ;
	BeforeRet: ;
}

N_NIMCALL(void, buildlineshtmltable_364635)(codeblockparams357020* params, NimStringDesc* code, keyvaluepair130008* Result) {
	NI codelines;
	NimStringDesc* LOC5;
	NI LOC6;
	NI line;
	{
		if (!!((*params).Numberlines)) goto LA3;
		unsureAsgnRef((void**) (&(*Result).Field0), copyString(TMP2228.Field0));
		unsureAsgnRef((void**) (&(*Result).Field1), copyString(TMP2228.Field1));
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = nsuStrip(code, NIM_TRUE, NIM_TRUE);
	LOC6 = 0;
	LOC6 = nsuCountLines(LOC5);
	codelines = (NI64)(1 + LOC6);
	unsureAsgnRef((void**) (&(*Result).Field0), copyString(((NimStringDesc*) &TMP2231)));
	line = (*params).Startline;
	{
		while (1) {
			NimStringDesc* LOC9;
			NimStringDesc* LOC10;
			if (!(0 < codelines)) goto LA8;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = nimIntToStr(line);
			LOC9 = rawNewString(LOC10->Sup.len + 1);
appendString(LOC9, LOC10);
appendString(LOC9, ((NimStringDesc*) &TMP2119));
			(*Result).Field0 = resizeString((*Result).Field0, LOC9->Sup.len + 0);
appendString((*Result).Field0, LOC9);
			line += 1;
			codelines -= 1;
		} LA8: ;
	}
	(*Result).Field0 = resizeString((*Result).Field0, 20);
appendString((*Result).Field0, ((NimStringDesc*) &TMP2232));
	unsureAsgnRef((void**) (&(*Result).Field1), copyString(((NimStringDesc*) &TMP2233)));
	BeforeRet: ;
}

N_NIMCALL(void, rendercodeblock_364840)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	codeblockparams357020 params;
	trstnode341011* m;
	keyvaluepair130008 LOC5;
	NimStringDesc* blockstart;
	NimStringDesc* blockend;
	TY259532 LOC6;
	TY259532 LOC27;
	{
		if (!((*n).Sons->data[2] == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	memset((void*)(&params), 0, sizeof(params));
	chckNil((void*)(&params));
	memset((void*)(&params), 0, sizeof(params));
	parsecodeblockparams_364007(d, n, (&params));
	m = (*(*n).Sons->data[2]).Sons->data[0];
	memset((void*)(&LOC5), 0, sizeof(LOC5));
	buildlineshtmltable_364635((&params), (*m).Text, (&LOC5));
	blockstart = 0;
	blockstart = LOC5.Field0;
	blockend = 0;
	blockend = LOC5.Field1;
	memset((void*)LOC6, 0, sizeof(LOC6));
	dispa_357544((*d).Target, result, blockstart, ((NimStringDesc*) &TMP2234), LOC6, 0);
	{
		if (!(params.Lang == ((NU8) 0))) goto LA9;
		{
			if (!(0 < params.Langstr->Sup.len)) goto LA13;
			(*d).Msghandler((*d).Filename, 1, 0, ((NU8) 8), params.Langstr);
		}
		LA13: ;
		{
			NIM_CHAR letter_365220;
			NimStringDesc* HEX3Atmp_365237;
			NI i_365240;
			NI l_365242;
			letter_365220 = 0;
			HEX3Atmp_365237 = 0;
			HEX3Atmp_365237 = (*m).Text;
			i_365240 = 0;
			l_365242 = HEX3Atmp_365237->Sup.len;
			{
				while (1) {
					if (!(i_365240 < l_365242)) goto LA17;
					letter_365220 = HEX3Atmp_365237->data[i_365240];
					escchar_357337((*d).Target, result, letter_365220);
					i_365240 += 1;
				} LA17: ;
			}
		}
	}
	goto LA7;
	LA9: ;
	{
		tgeneraltokenizer351023 g;
		memset((void*)(&g), 0, sizeof(g));
		g.Sup.m_type = (&NTI351023);
		initgeneraltokenizer_351229((&g), (*m).Text);
		{
			while (1) {
				getnexttoken_354166((&g), params.Lang);
				switch (g.Kind) {
				case ((NU8) 0):
				{
					goto LA19;
				}
				break;
				case ((NU8) 1):
				case ((NU8) 2):
				{
					NimStringDesc* LOC23;
					LOC23 = 0;
					LOC23 = copyStrLast((*m).Text, g.Start, (NI64)((NI64)(g.Length + g.Start) - 1));
					(*result) = resizeString((*result), LOC23->Sup.len + 0);
appendString((*result), LOC23);
				}
				break;
				default:
				{
					TY168969 LOC25;
					NimStringDesc* LOC26;
					memset((void*)LOC25, 0, sizeof(LOC25));
					LOC26 = 0;
					LOC26 = copyStrLast((*m).Text, g.Start, (NI64)((NI64)(g.Length + g.Start) - 1));
					LOC25[0] = esc_357407((*d).Target, LOC26, -1);
					LOC25[1] = copyString(tokenclasstostr_351081[(g.Kind)- 0]);
					dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2395), ((NimStringDesc*) &TMP2396), LOC25, 2);
				}
				break;
				}
			}
		} LA19: ;
		deinitgeneraltokenizer_351240((&g));
	}
	LA7: ;
	memset((void*)LOC27, 0, sizeof(LOC27));
	dispa_357544((*d).Target, result, blockend, ((NimStringDesc*) &TMP2430), LOC27, 0);
	BeforeRet: ;
}

N_NIMCALL(void, rendercontainer_365266)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	NimStringDesc* tmp;
	NimStringDesc* arg;
	NimStringDesc* LOC1;
	tmp = copyString(((NimStringDesc*) &TMP2111));
	renderrsttoout_357579(d, (*n).Sons->data[2], (&tmp));
	LOC1 = 0;
	LOC1 = getargument_342080(n);
	arg = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	{
		TY196301 LOC6;
		if (!((arg) && (arg)->Sup.len == 0)) goto LA4;
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = copyString(tmp);
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2431), ((NimStringDesc*) &TMP2165), LOC6, 1);
	}
	goto LA2;
	LA4: ;
	{
		TY168969 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(arg);
		LOC8[1] = copyString(tmp);
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2432), ((NimStringDesc*) &TMP2433), LOC8, 2);
	}
	LA2: ;
}

N_NIMCALL(void, renderindexterm_357871)(trstgenerator357016* d, trstnode341011* n_357874, NimStringDesc** result) {
	NimStringDesc* refname;
	NimStringDesc* id;
	NimStringDesc* LOC8;
	NI LOC9;
	NimStringDesc* LOC10;
	NimStringDesc* term;
	TY168969 LOC11;
	refname = rstnodetorefname_342061(n_357874);
	{
		NIM_BOOL LOC3;
		NI LOC6;
		LOC3 = 0;
		LOC3 = haskey_357880((*d).Seenindexterms, refname);
		if (!LOC3) goto LA4;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_357943((*d).Seenindexterms, refname);
		HEX5BHEX5DHEX3D_357974((&(*d).Seenindexterms), refname, (NI64)(LOC6 + 1));
	}
	goto LA1;
	LA4: ;
	{
		HEX5BHEX5DHEX3D_357974((&(*d).Seenindexterms), refname, 1);
	}
	LA1: ;
	LOC8 = 0;
	LOC9 = 0;
	LOC9 = HEX5BHEX5D_357943((*d).Seenindexterms, refname);
	LOC10 = 0;
	LOC10 = nimIntToStr(LOC9);
	LOC8 = rawNewString(refname->Sup.len + LOC10->Sup.len + 1);
appendString(LOC8, refname);
appendChar(LOC8, 95);
appendString(LOC8, LOC10);
	id = LOC8;
	term = copyString(((NimStringDesc*) &TMP2111));
	renderaux_357589(d, n_357874, (&term));
	setindexterm_357710(d, id, term, (*d).Currentsection, ((NimStringDesc*) &TMP2111));
	memset((void*)LOC11, 0, sizeof(LOC11));
	LOC11[0] = copyString(id);
	LOC11[1] = copyString(term);
	dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2447), ((NimStringDesc*) &TMP2448), LOC11, 2);
}

N_NIMCALL(void, rendersmiley_363975)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	TY196301 LOC1;
	NimStringDesc* LOC2;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC2 = 0;
	LOC2 = nstGet((*d).Config, ((NimStringDesc*) &TMP2453));
	LOC1[0] = nsuFormatSingleElem(LOC2, (*n).Text);
	dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2451), ((NimStringDesc*) &TMP2452), LOC1, 1);
}

N_NIMCALL(void, renderrsttoout_357579)(trstgenerator357016* d, trstnode341011* n, NimStringDesc** result) {
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 0):
	{
		renderaux_357589(d, n, result);
	}
	break;
	case ((NU8) 1):
	{
		renderheadline_363281(d, n, result);
	}
	break;
	case ((NU8) 2):
	{
		renderoverline_363425(d, n, result);
	}
	break;
	case ((NU8) 3):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2125), ((NimStringDesc*) &TMP2126), result);
	}
	break;
	case ((NU8) 4):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2127), ((NimStringDesc*) &TMP2128), result);
	}
	break;
	case ((NU8) 5):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2129), ((NimStringDesc*) &TMP2130), result);
	}
	break;
	case ((NU8) 6):
	case ((NU8) 8):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2131), ((NimStringDesc*) &TMP2132), result);
	}
	break;
	case ((NU8) 7):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2133), ((NimStringDesc*) &TMP2134), result);
	}
	break;
	case ((NU8) 9):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2135), ((NimStringDesc*) &TMP2136), result);
	}
	break;
	case ((NU8) 10):
	{
		renderaux_357589(d, n, result);
	}
	break;
	case ((NU8) 11):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2137), ((NimStringDesc*) &TMP2138), result);
	}
	break;
	case ((NU8) 12):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2139), ((NimStringDesc*) &TMP2140), result);
	}
	break;
	case ((NU8) 13):
	{
		NimStringDesc* tmp;
		tmp = copyString(((NimStringDesc*) &TMP2111));
		{
			NI i_365387;
			NI HEX3Atmp_365457;
			NI LOC19;
			NI res_365460;
			i_365387 = 0;
			HEX3Atmp_365457 = 0;
			LOC19 = 0;
			LOC19 = len_341084(n);
			HEX3Atmp_365457 = (NI64)(LOC19 - 1);
			res_365460 = 0;
			{
				while (1) {
					if (!(res_365460 <= HEX3Atmp_365457)) goto LA21;
					i_365387 = res_365460;
					renderrsttoout_357579(d, (*n).Sons->data[i_365387], (&tmp));
					res_365460 += 1;
				} LA21: ;
			}
		}
		{
			TY196301 LOC26;
			if (!!((tmp->Sup.len == 0))) goto LA24;
			memset((void*)LOC26, 0, sizeof(LOC26));
			LOC26[0] = copyString(tmp);
			dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2141), ((NimStringDesc*) &TMP2136), LOC26, 1);
		}
		LA24: ;
	}
	break;
	case ((NU8) 14):
	{
		renderfield_365327(d, n, result);
	}
	break;
	case ((NU8) 15):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2166), ((NimStringDesc*) &TMP2167), result);
	}
	break;
	case ((NU8) 16):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2168), ((NimStringDesc*) &TMP2169), result);
	}
	break;
	case ((NU8) 51):
	{
		renderrsttoout_357579(d, (*n).Sons->data[2], result);
	}
	break;
	case ((NU8) 17):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2170), ((NimStringDesc*) &TMP2171), result);
	}
	break;
	case ((NU8) 18):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2164), ((NimStringDesc*) &TMP2165), result);
	}
	break;
	case ((NU8) 19):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2172), ((NimStringDesc*) &TMP2173), result);
	}
	break;
	case ((NU8) 23):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2174), ((NimStringDesc*) &TMP2169), result);
	}
	break;
	case ((NU8) 20):
	case ((NU8) 21):
	case ((NU8) 22):
	{
		{
			if (!NIM_TRUE) goto LA38;
			raiseassert_84757(((NimStringDesc*) &TMP2176));
		}
		LA38: ;
	}
	break;
	case ((NU8) 24):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2177), ((NimStringDesc*) &TMP2178), result);
	}
	break;
	case ((NU8) 25):
	{
		{
			if (!NIM_TRUE) goto LA44;
			raiseassert_84757(((NimStringDesc*) &TMP2176));
		}
		LA44: ;
	}
	break;
	case ((NU8) 26):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2179), ((NimStringDesc*) &TMP2128), result);
	}
	break;
	case ((NU8) 27):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2180), ((NimStringDesc*) &TMP2181), result);
	}
	break;
	case ((NU8) 28):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2182), ((NimStringDesc*) &TMP2183), result);
	}
	break;
	case ((NU8) 29):
	case ((NU8) 30):
	{
		NimStringDesc* LOC50;
		NimStringDesc* LOC51;
		LOC50 = 0;
		LOC51 = 0;
		LOC51 = texcolumns_365289(n);
		LOC50 = rawNewString(LOC51->Sup.len + 63);
appendString(LOC50, ((NimStringDesc*) &TMP2185));
appendString(LOC50, LOC51);
appendString(LOC50, ((NimStringDesc*) &TMP2187));
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2184), LOC50, result);
	}
	break;
	case ((NU8) 31):
	{
		{
			NI LOC55;
			LOC55 = 0;
			LOC55 = len_341084(n);
			if (!(1 <= LOC55)) goto LA56;
			{
				if (!((*d).Target == ((NU8) 1))) goto LA60;
				renderrsttoout_357579(d, (*n).Sons->data[0], result);
				{
					NI i_365414;
					NI HEX3Atmp_365463;
					NI LOC63;
					NI res_365466;
					i_365414 = 0;
					HEX3Atmp_365463 = 0;
					LOC63 = 0;
					LOC63 = len_341084(n);
					HEX3Atmp_365463 = (NI64)(LOC63 - 1);
					res_365466 = 1;
					{
						while (1) {
							if (!(res_365466 <= HEX3Atmp_365463)) goto LA65;
							i_365414 = res_365466;
							(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP2188));
							renderrsttoout_357579(d, (*n).Sons->data[i_365414], result);
							res_365466 += 1;
						} LA65: ;
					}
				}
				(*result) = resizeString((*result), 10);
appendString((*result), ((NimStringDesc*) &TMP2189));
			}
			goto LA58;
			LA60: ;
			{
				(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TMP2190));
				renderaux_357589(d, n, result);
				(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TMP2191));
			}
			LA58: ;
		}
		LA56: ;
	}
	break;
	case ((NU8) 33):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2168), ((NimStringDesc*) &TMP2165), result);
	}
	break;
	case ((NU8) 32):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2192), ((NimStringDesc*) &TMP2193), result);
	}
	break;
	case ((NU8) 34):
	{
		{
			if (!NIM_TRUE) goto LA72;
			raiseassert_84757(((NimStringDesc*) &TMP2176));
		}
		LA72: ;
	}
	break;
	case ((NU8) 35):
	{
		{
			if (!NIM_TRUE) goto LA77;
			raiseassert_84757(((NimStringDesc*) &TMP2176));
		}
		LA77: ;
	}
	break;
	case ((NU8) 36):
	{
		{
			if (!NIM_TRUE) goto LA82;
			raiseassert_84757(((NimStringDesc*) &TMP2176));
		}
		LA82: ;
	}
	break;
	case ((NU8) 39):
	{
		NimStringDesc* tmp;
		TY168969 LOC85;
		tmp = copyString(((NimStringDesc*) &TMP2111));
		renderaux_357589(d, n, (&tmp));
		memset((void*)LOC85, 0, sizeof(LOC85));
		LOC85[0] = copyString(tmp);
		LOC85[1] = rstnodetorefname_342061(n);
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2194), ((NimStringDesc*) &TMP2195), LOC85, 2);
	}
	break;
	case ((NU8) 37):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2196), ((NimStringDesc*) &TMP2197), result);
	}
	break;
	case ((NU8) 38):
	{
		NimStringDesc* tmp0;
		NimStringDesc* tmp1;
		TY168969 LOC88;
		tmp0 = copyString(((NimStringDesc*) &TMP2111));
		tmp1 = copyString(((NimStringDesc*) &TMP2111));
		renderrsttoout_357579(d, (*n).Sons->data[0], (&tmp0));
		renderrsttoout_357579(d, (*n).Sons->data[1], (&tmp1));
		memset((void*)LOC88, 0, sizeof(LOC88));
		LOC88[0] = copyString(tmp0);
		LOC88[1] = copyString(tmp1);
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2198), ((NimStringDesc*) &TMP2199), LOC88, 2);
	}
	break;
	case ((NU8) 41):
	case ((NU8) 42):
	{
		renderaux_357589(d, n, result);
	}
	break;
	case ((NU8) 48):
	{
		{
			trstnode341011* LOC95;
			NimStringDesc* LOC96;
			if (!!(((*d).Target == ((NU8) 1)))) goto LA93;
			LOC95 = 0;
			LOC95 = lastson_341162(n);
			LOC96 = 0;
			LOC96 = addnodes_342067(LOC95);
			(*result) = resizeString((*result), LOC96->Sup.len + 0);
appendString((*result), LOC96);
		}
		LA93: ;
	}
	break;
	case ((NU8) 49):
	{
		{
			trstnode341011* LOC102;
			NimStringDesc* LOC103;
			if (!((*d).Target == ((NU8) 1))) goto LA100;
			LOC102 = 0;
			LOC102 = lastson_341162(n);
			LOC103 = 0;
			LOC103 = addnodes_342067(LOC102);
			(*result) = resizeString((*result), LOC103->Sup.len + 0);
appendString((*result), LOC103);
		}
		LA100: ;
	}
	break;
	case ((NU8) 45):
	case ((NU8) 46):
	{
		renderimage_363598(d, n, result);
	}
	break;
	case ((NU8) 47):
	{
		rendercodeblock_364840(d, n, result);
	}
	break;
	case ((NU8) 50):
	{
		rendercontainer_365266(d, n, result);
	}
	break;
	case ((NU8) 62):
	case ((NU8) 52):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2434), ((NimStringDesc*) &TMP2434), result);
	}
	break;
	case ((NU8) 40):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2111), ((NimStringDesc*) &TMP2111), result);
	}
	break;
	case ((NU8) 53):
	{
		NimStringDesc* tmp0;
		NimStringDesc* tmp1;
		TY168969 LOC110;
		tmp0 = copyString(((NimStringDesc*) &TMP2111));
		tmp1 = copyString(((NimStringDesc*) &TMP2111));
		renderrsttoout_357579(d, (*n).Sons->data[0], (&tmp0));
		renderrsttoout_357579(d, (*n).Sons->data[1], (&tmp1));
		memset((void*)LOC110, 0, sizeof(LOC110));
		LOC110[0] = copyString(tmp0);
		LOC110[1] = copyString(tmp1);
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP2395), ((NimStringDesc*) &TMP2396), LOC110, 2);
	}
	break;
	case ((NU8) 54):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2435), ((NimStringDesc*) &TMP2436), result);
	}
	break;
	case ((NU8) 55):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2437), ((NimStringDesc*) &TMP2438), result);
	}
	break;
	case ((NU8) 57):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2439), ((NimStringDesc*) &TMP2440), result);
	}
	break;
	case ((NU8) 58):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2441), ((NimStringDesc*) &TMP2193), result);
	}
	break;
	case ((NU8) 59):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2442), ((NimStringDesc*) &TMP2443), result);
	}
	break;
	case ((NU8) 60):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2444), ((NimStringDesc*) &TMP2440), result);
	}
	break;
	case ((NU8) 56):
	{
		renderindexterm_357871(d, n, result);
	}
	break;
	case ((NU8) 61):
	{
		renderaux_357629(d, n, ((NimStringDesc*) &TMP2449), ((NimStringDesc*) &TMP2450), result);
	}
	break;
	case ((NU8) 63):
	{
		rendersmiley_363975(d, n, result);
	}
	break;
	case ((NU8) 64):
	{
		NimStringDesc* LOC121;
		LOC121 = 0;
		LOC121 = esc_357407((*d).Target, (*n).Text, -1);
		(*result) = resizeString((*result), LOC121->Sup.len + 0);
appendString((*result), LOC121);
	}
	break;
	case ((NU8) 44):
	{
		(*d).Hastoc = NIM_TRUE;
	}
	break;
	case ((NU8) 43):
	{
		unsureAsgnRef((void**) (&(*d).Meta[(((NU8) 1))- 0]), copyString(((NimStringDesc*) &TMP2111)));
		renderrsttoout_357579(d, (*n).Sons->data[0], (&(*d).Meta[(((NU8) 1))- 0]));
	}
	break;
	}
	BeforeRet: ;
}
N_NIMCALL(void, TMP4628)(void* p, NI op) {
	TY357034* a;
	NI LOC1;
	a = (TY357034*)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_357088)(trstgenerator357016* g, NU8 target, stringtableobj130012* config, NimStringDesc* filename, NU8 options, tfindfilehandler342023 findfile, tmsghandler342021 msghandler) {
	TY116604 fileparts;
	NimStringDesc* s;
	unsureAsgnRef((void**) (&(*g).Config), config);
	(*g).Target = target;
	unsureAsgnRef((void**) (&(*g).Tocpart), (TY357034*) newSeq((&NTI357034), 0));
	unsureAsgnRef((void**) (&(*g).Filename), copyString(filename));
	(*g).Splitafter = 20;
	unsureAsgnRef((void**) (&(*g).Theindex), copyString(((NimStringDesc*) &TMP2111)));
	(*g).Options = options;
	(*g).Findfile = findfile;
	unsureAsgnRef((void**) (&(*g).Currentsection), copyString(((NimStringDesc*) &TMP2111)));
	memset((void*)(&fileparts), 0, sizeof(fileparts));
	chckNil((void*)(&fileparts));
	memset((void*)(&fileparts), 0, sizeof(fileparts));
	nossplitFile(filename, (&fileparts));
	{
		NimStringDesc* LOC5;
		if (!eqStrings(fileparts.Field2, ((NimStringDesc*) &TMP4632))) goto LA3;
		LOC5 = 0;
		LOC5 = rawNewString(fileparts.Field1->Sup.len + 7);
appendString(LOC5, ((NimStringDesc*) &TMP4633));
appendString(LOC5, fileparts.Field1);
		unsureAsgnRef((void**) (&(*g).Currentsection), LOC5);
	}
	LA3: ;
	inittable_357120(64, (&(*g).Seenindexterms));
	(*g).Msghandler = msghandler;
	s = nstGet(config, ((NimStringDesc*) &TMP4634));
	{
		if (!!(((s) && (s)->Sup.len == 0))) goto LA8;
		(*g).Splitafter = nsuParseInt(s);
	}
	LA8: ;
	{
		NU8 i_357266;
		NU8 res_357270;
		i_357266 = 0;
		res_357270 = ((NU8) 0);
		{
			while (1) {
				if (!(res_357270 <= ((NU8) 4))) goto LA12;
				i_357266 = res_357270;
				unsureAsgnRef((void**) (&(*g).Meta[(i_357266)- 0]), copyString(((NimStringDesc*) &TMP2111)));
				res_357270 += 1;
			} LA12: ;
		}
	}
}

N_NIMCALL(void, rendertocentry_363538)(trstgenerator357016* d, ttocentry357012* e, NimStringDesc** result) {
	TY168969 LOC1;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString((*e).Refname);
	LOC1[1] = copyString((*e).Header);
	dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP4707), ((NimStringDesc*) &TMP4708), LOC1, 2);
}

N_NIMCALL(void, rendertocentries_363554)(trstgenerator357016* d, NI* j, NI lvl, NimStringDesc** result) {
	NimStringDesc* tmp;
	tmp = copyString(((NimStringDesc*) &TMP2111));
	{
		while (1) {
			NI a;
			if (!((*j) <= ((*d).Tocpart->Sup.len-1))) goto LA2;
			a = ((*(*d).Tocpart->data[(*j)].N).Level > 0? ((*(*d).Tocpart->data[(*j)].N).Level) : -((*(*d).Tocpart->data[(*j)].N).Level));
			{
				if (!(a == lvl)) goto LA5;
				rendertocentry_363538(d, (&(*d).Tocpart->data[(*j)]), (&tmp));
				(*j) += 1;
			}
			goto LA3;
			LA5: ;
			{
				if (!(lvl < a)) goto LA8;
				rendertocentries_363554(d, j, a, (&tmp));
			}
			goto LA3;
			LA8: ;
			{
				goto LA1;
			}
			LA3: ;
		} LA2: ;
	} LA1: ;
	{
		TY196301 LOC15;
		if (!(1 < lvl)) goto LA13;
		memset((void*)LOC15, 0, sizeof(LOC15));
		LOC15[0] = copyString(tmp);
		dispa_357544((*d).Target, result, ((NimStringDesc*) &TMP4709), ((NimStringDesc*) &TMP4710), LOC15, 1);
	}
	goto LA11;
	LA13: ;
	{
		(*result) = resizeString((*result), tmp->Sup.len + 0);
appendString((*result), tmp);
	}
	LA11: ;
}

N_NIMCALL(void, writeindexfile_357287)(trstgenerator357016* g, NimStringDesc* outfile) {
	{
		if (!(0 < (*g).Theindex->Sup.len)) goto LA3;
		writefile_12845(outfile, (*g).Theindex);
	}
	LA3: ;
}
N_NIMCALL(void, TMP4786)(void* p, NI op) {
	TY360804* a;
	NI LOC1;
	a = (TY360804*)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(NIM_BOOL, isdocumentationtitle_358777)(NimStringDesc* hyperlink) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuFindChar(hyperlink, 35, 0);
	result = (LOC1 < 0);
	return result;
}

N_NIMCALL(NimStringDesc*, unquoteindexcolumn_357700)(NimStringDesc* text) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuReplaceStr(text, ((NimStringDesc*) &TMP2122), ((NimStringDesc*) &TMP2121));
	LOC2 = 0;
	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &TMP2120), ((NimStringDesc*) &TMP2119));
	result = nsuReplaceStr(LOC2, ((NimStringDesc*) &TMP2118), ((NimStringDesc*) &TMP2117));
	return result;
}

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

static N_INLINE(NimStringDesc*, or_357568)(NimStringDesc* x, NimStringDesc* y) {
	NimStringDesc* result;
	result = 0;
	{
		if (!x == 0) goto LA3;
		result = copyString(y);
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(x);
	}
	LA1: ;
	return result;
}

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

N_NIMCALL(NI, hash_358309)(tindexentry358264* x) {
	NI result;
	NI LOC1;
	NI LOC2;
	NimStringDesc* LOC3;
	NI LOC4;
	NimStringDesc* LOC5;
	NI LOC6;
	result = 0;
	LOC1 = 0;
	LOC1 = hash_127839((*x).Keyword);
	LOC2 = 0;
	LOC2 = hash_127839((*x).Link);
	result = HEX21HEX26_127025(LOC1, LOC2);
	LOC3 = 0;
	LOC3 = or_357568((*x).Linktitle, ((NimStringDesc*) &TMP2111));
	LOC4 = 0;
	LOC4 = hash_127839(LOC3);
	result = HEX21HEX26_127025(result, LOC4);
	LOC5 = 0;
	LOC5 = or_357568((*x).Linkdesc, ((NimStringDesc*) &TMP2111));
	LOC6 = 0;
	LOC6 = hash_127839(LOC5);
	result = HEX21HEX26_127025(result, LOC6);
	result = HEX21HEX24_127054(result);
	return result;
}

N_NIMCALL(void, readindexdir_360798)(NimStringDesc* dir, TY360801* Result) {
	NI l;
	TY361571 LOC90;
	unsureAsgnRef((void**) (&(*Result).Field0), (TY118808*) newSeq((&NTI118808), 0));
	inittable_360830(32, (&(*Result).Field2));
	unsureAsgnRef((void**) (&(*Result).Field1), (TY360804*) newSeq((&NTI360804), 15000));
	(*Result).Field1 = (TY360804*) setLengthSeq(&((*Result).Field1)->Sup, sizeof(tindexentry358264), 0);
	l = 0;
	{
		NU8 kind_361055;
		NimStringDesc* path_361056;
		DIR* d_363101;
		kind_361055 = 0;
		path_361056 = 0;
		d_363101 = opendir(dir->data);
		{
			int LOC89;
			if (!!((d_363101 == NIM_NIL))) goto LA4;
			{
				while (1) {
					struct dirent* x_363103;
					NimStringDesc* y_363105;
					x_363103 = readdir(d_363101);
					{
						if (!(x_363103 == NIM_NIL)) goto LA10;
						goto LA6;
					}
					LA10: ;
					y_363105 = cstrToNimstr(((NCSTRING) ((*x_363103).d_name)));
					{
						NIM_BOOL LOC14;
						struct stat s_363107;
						NU8 k_363109;
						LOC14 = 0;
						LOC14 = !(eqStrings(y_363105, ((NimStringDesc*) &TMP4788)));
						if (!(LOC14)) goto LA15;
						LOC14 = !(eqStrings(y_363105, ((NimStringDesc*) &TMP4789)));
						LA15: ;
						if (!LOC14) goto LA16;
						memset((void*)(&s_363107), 0, sizeof(s_363107));
						y_363105 = HEX2F_116299(dir, y_363105);
						{
							int LOC20;
							LOC20 = 0;
							LOC20 = lstat(y_363105->data, (&s_363107));
							if (!(LOC20 < ((NI32) 0))) goto LA21;
							goto LA6;
						}
						LA21: ;
						k_363109 = ((NU8) 0);
						{
							NIM_BOOL LOC25;
							LOC25 = 0;
							LOC25 = S_ISDIR(s_363107.st_mode);
							if (!LOC25) goto LA26;
							k_363109 = ((NU8) 2);
						}
						LA26: ;
						{
							NIM_BOOL LOC30;
							LOC30 = 0;
							LOC30 = S_ISLNK(s_363107.st_mode);
							if (!LOC30) goto LA31;
							k_363109 = (k_363109 + 1);
						}
						LA31: ;
						kind_361055 = k_363109;
						path_361056 = y_363105;
						{
							NIM_BOOL LOC35;
							TY360804* fileentries;
							tindexentry358264 title;
							NI f;
							LOC35 = 0;
							LOC35 = (kind_361055 == ((NU8) 0));
							if (!(LOC35)) goto LA36;
							LOC35 = nsuEndsWith(path_361056, ((NimStringDesc*) &TMP4790));
							LA36: ;
							if (!LOC35) goto LA37;
							fileentries = 0;
							memset((void*)(&title), 0, sizeof(title));
							f = 0;
							fileentries = (TY360804*) newSeq((&NTI360804), 500);
							fileentries = (TY360804*) setLengthSeq(&(fileentries)->Sup, sizeof(tindexentry358264), 0);
							{
								NimStringDesc* line_361103;
								FILE* f_363088;
								NimStringDesc* res_363090;
								line_361103 = 0;
								f_363088 = open_12617(path_361056, ((NU8) 0), 8000);
								res_363090 = rawNewString(80);
								{
									while (1) {
										NIM_BOOL LOC42;
										LOC42 = 0;
										LOC42 = readline_12889(f_363088, (&res_363090));
										if (!LOC42) goto LA41;
										line_361103 = res_363090;
										{
											NI s;
											s = nsuFindChar(line_361103, 9, 0);
											{
												if (!(s < 0)) goto LA46;
												goto LA43;
											}
											LA46: ;
											fileentries = (TY360804*) setLengthSeq(&(fileentries)->Sup, sizeof(tindexentry358264), (NI64)(f + 1));
											asgnRefNoCycle((void**) (&fileentries->data[f].Keyword), copyStrLast(line_361103, 0, (NI64)(s - 1)));
											asgnRefNoCycle((void**) (&fileentries->data[f].Link), copyStr(line_361103, (NI64)(s + 1)));
											{
												NIM_BOOL LOC50;
												LOC50 = 0;
												LOC50 = title.Keyword == 0;
												if (!(LOC50)) goto LA51;
												LOC50 = isdocumentationtitle_358777(fileentries->data[f].Link);
												LA51: ;
												if (!LOC50) goto LA52;
												title.Keyword = copyString(fileentries->data[f].Keyword);
												title.Link = copyString(fileentries->data[f].Link);
											}
											LA52: ;
											{
												NI LOC56;
												TY118808* extracols;
												NimStringDesc* LOC59;
												LOC56 = 0;
												LOC56 = nsuFindChar(fileentries->data[f].Link, 9, 0);
												if (!(0 < LOC56)) goto LA57;
												extracols = nsuSplitChar(fileentries->data[f].Link, 9);
												LOC59 = 0;
												LOC59 = fileentries->data[f].Link; fileentries->data[f].Link = copyStringRC1(extracols->data[0]);
												if (LOC59) nimGCunrefNoCycle(LOC59);
												asgnRefNoCycle((void**) (&fileentries->data[f].Linktitle), unquoteindexcolumn_357700(extracols->data[1]));
												asgnRefNoCycle((void**) (&fileentries->data[f].Linkdesc), unquoteindexcolumn_357700(extracols->data[2]));
											}
											goto LA54;
											LA57: ;
											{
												NimStringDesc* LOC61;
												NimStringDesc* LOC62;
												LOC61 = 0;
												LOC61 = fileentries->data[f].Linktitle; fileentries->data[f].Linktitle = copyStringRC1(NIM_NIL);
												if (LOC61) nimGCunrefNoCycle(LOC61);
												LOC62 = 0;
												LOC62 = fileentries->data[f].Linkdesc; fileentries->data[f].Linkdesc = copyStringRC1(NIM_NIL);
												if (LOC62) nimGCunrefNoCycle(LOC62);
											}
											LA54: ;
											f += 1;
										} LA43: ;
									} LA41: ;
								}
								fclose(f_363088);
							}
							{
								TY116604 LOC83;
								NimStringDesc* LOC84;
								if (!title.Keyword == 0) goto LA65;
								{
									NI i_361234;
									NI HEX3Atmp_363094;
									NI res_363097;
									i_361234 = 0;
									HEX3Atmp_363094 = 0;
									HEX3Atmp_363094 = (f - 1);
									res_363097 = 0;
									{
										while (1) {
											if (!(res_363097 <= HEX3Atmp_363094)) goto LA69;
											i_361234 = res_363097;
											{
												NimStringDesc* toc;
												NimStringDesc* LOC79;
												NimStringDesc* LOC80;
												NimStringDesc* LOC81;
												NimStringDesc* LOC82;
												toc = fileentries->data[i_361234].Linktitle;
												{
													NIM_BOOL LOC73;
													NIM_BOOL LOC74;
													LOC73 = 0;
													LOC74 = 0;
													LOC74 = !(toc == 0);
													if (!(LOC74)) goto LA75;
													LOC74 = (0 < toc->Sup.len);
													LA75: ;
													LOC73 = LOC74;
													if (!(LOC73)) goto LA76;
													LOC73 = ((NU8)(toc->data[0]) == (NU8)(32));
													LA76: ;
													if (!LOC73) goto LA77;
													goto LA70;
												}
												LA77: ;
												(*Result).Field1 = (TY360804*) setLengthSeq(&((*Result).Field1)->Sup, sizeof(tindexentry358264), (NI64)(l + 1));
												LOC79 = 0;
												LOC79 = (*Result).Field1->data[l].Keyword; (*Result).Field1->data[l].Keyword = copyStringRC1(fileentries->data[i_361234].Keyword);
												if (LOC79) nimGCunrefNoCycle(LOC79);
												LOC80 = 0;
												LOC80 = (*Result).Field1->data[l].Link; (*Result).Field1->data[l].Link = copyStringRC1(fileentries->data[i_361234].Link);
												if (LOC80) nimGCunrefNoCycle(LOC80);
												LOC81 = 0;
												LOC81 = (*Result).Field1->data[l].Linktitle; (*Result).Field1->data[l].Linktitle = copyStringRC1(fileentries->data[i_361234].Linktitle);
												if (LOC81) nimGCunrefNoCycle(LOC81);
												LOC82 = 0;
												LOC82 = (*Result).Field1->data[l].Linkdesc; (*Result).Field1->data[l].Linkdesc = copyStringRC1(fileentries->data[i_361234].Linkdesc);
												if (LOC82) nimGCunrefNoCycle(LOC82);
												l += 1;
											} LA70: ;
											res_363097 += 1;
										} LA69: ;
									}
								}
								memset((void*)(&LOC83), 0, sizeof(LOC83));
								nossplitFile(path_361056, (&LOC83));
								(*Result).Field0 = (TY118808*) incrSeq(&((*Result).Field0)->Sup, sizeof(NimStringDesc*));
								LOC84 = 0;
								LOC84 = (*Result).Field0->data[(*Result).Field0->Sup.len-1]; (*Result).Field0->data[(*Result).Field0->Sup.len-1] = copyStringRC1(LOC83.Field1);
								if (LOC84) nimGCunrefNoCycle(LOC84);
							}
							goto LA63;
							LA65: ;
							{
								NimStringDesc* LOC86;
								NI LOC87;
								NimStringDesc* LOC88;
								LOC86 = 0;
								LOC87 = 0;
								LOC87 = len_361285((*Result).Field2);
								LOC88 = 0;
								LOC88 = nimIntToStr(LOC87);
								LOC86 = rawNewString(LOC88->Sup.len + 8);
appendString(LOC86, ((NimStringDesc*) &TMP4791));
appendString(LOC86, LOC88);
								title.Linktitle = LOC86;
								HEX5BHEX5DHEX3D_361301((&(*Result).Field2), (&title), fileentries);
							}
							LA63: ;
						}
						LA37: ;
					}
					LA16: ;
				}
			} LA6: ;
			LOC89 = 0;
			LOC89 = closedir(d_363101);
		}
		LA4: ;
	}
	memset((void*)(&LOC90), 0, sizeof(LOC90));
	LOC90.ClPrc = ((TMP4794) (cmp_4517)); LOC90.ClEnv = NIM_NIL;
	sort_361552((*Result).Field0->data, (*Result).Field0->Sup.len, LOC90, ((NU8) 1));
}

N_NIMCALL(void, HEX3CHEX2D_358607)(tindexentry358264* a, tindexentry358264* 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_358298)(tindexentry358264* a, tindexentry358264* 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(NimStringDesc*, generatedocumentationjumps_360423)(table358277 docs) {
	NimStringDesc* result_360426;
	TY360804* titles;
	TY360804* result_360428;
	TY359572 LOC13;
	TY118808* chunks;
	NimStringDesc* LOC19;
	NimStringDesc* LOC20;
	result_360426 = 0;
	result_360426 = copyString(((NimStringDesc*) &TMP4795));
	result_360428 = (TY360804*) newSeq((&NTI360804), 0);
	{
		tindexentry358264 x_360430;
		memset((void*)(&x_360430), 0, sizeof(x_360430));
		{
			NI h_360679;
			NI HEX3Atmp_360681;
			NI res_360683;
			h_360679 = 0;
			HEX3Atmp_360681 = 0;
			HEX3Atmp_360681 = (docs.Data->Sup.len-1);
			res_360683 = 0;
			{
				while (1) {
					if (!(res_360683 <= HEX3Atmp_360681)) goto LA4;
					h_360679 = res_360683;
					{
						NimStringDesc* LOC9;
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						NimStringDesc* LOC12;
						if (!(docs.Data->data[h_360679].Field0 == ((NU8) 1))) goto LA7;
						x_360430.Keyword = docs.Data->data[h_360679].Field1.Keyword;
						x_360430.Link = docs.Data->data[h_360679].Field1.Link;
						x_360430.Linktitle = docs.Data->data[h_360679].Field1.Linktitle;
						x_360430.Linkdesc = docs.Data->data[h_360679].Field1.Linkdesc;
						result_360428 = (TY360804*) incrSeq(&(result_360428)->Sup, sizeof(tindexentry358264));
						LOC9 = 0;
						LOC9 = result_360428->data[result_360428->Sup.len-1].Keyword; result_360428->data[result_360428->Sup.len-1].Keyword = copyStringRC1(x_360430.Keyword);
						if (LOC9) nimGCunrefNoCycle(LOC9);
						LOC10 = 0;
						LOC10 = result_360428->data[result_360428->Sup.len-1].Link; result_360428->data[result_360428->Sup.len-1].Link = copyStringRC1(x_360430.Link);
						if (LOC10) nimGCunrefNoCycle(LOC10);
						LOC11 = 0;
						LOC11 = result_360428->data[result_360428->Sup.len-1].Linktitle; result_360428->data[result_360428->Sup.len-1].Linktitle = copyStringRC1(x_360430.Linktitle);
						if (LOC11) nimGCunrefNoCycle(LOC11);
						LOC12 = 0;
						LOC12 = result_360428->data[result_360428->Sup.len-1].Linkdesc; result_360428->data[result_360428->Sup.len-1].Linkdesc = copyStringRC1(x_360430.Linkdesc);
						if (LOC12) nimGCunrefNoCycle(LOC12);
					}
					LA7: ;
					res_360683 += 1;
				} LA4: ;
			}
		}
	}
	genericSeqAssign((&titles), result_360428, (&NTI360804));
	memset((void*)(&LOC13), 0, sizeof(LOC13));
	LOC13.ClPrc = ((TMP4798) (cmp_358298)); LOC13.ClEnv = NIM_NIL;
	sort_359553(titles->data, titles->Sup.len, LOC13, ((NU8) 1));
	chunks = (TY118808*) newSeq((&NTI118808), 0);
	{
		tindexentry358264 title_360655;
		NI i_360688;
		NI l_360690;
		memset((void*)(&title_360655), 0, sizeof(title_360655));
		i_360688 = 0;
		l_360690 = titles->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC17;
				NimStringDesc* LOC18;
				if (!(i_360688 < l_360690)) goto LA16;
				title_360655.Keyword = titles->data[i_360688].Keyword;
				title_360655.Link = titles->data[i_360688].Link;
				title_360655.Linktitle = titles->data[i_360688].Linktitle;
				title_360655.Linkdesc = titles->data[i_360688].Linkdesc;
				LOC17 = 0;
				LOC17 = rawNewString(title_360655.Link->Sup.len + title_360655.Keyword->Sup.len + 15);
appendString(LOC17, ((NimStringDesc*) &TMP4799));
appendString(LOC17, title_360655.Link);
appendString(LOC17, ((NimStringDesc*) &TMP4800));
appendString(LOC17, title_360655.Keyword);
appendString(LOC17, ((NimStringDesc*) &TMP4801));
				chunks = (TY118808*) incrSeq(&(chunks)->Sup, sizeof(NimStringDesc*));
				LOC18 = 0;
				LOC18 = chunks->data[chunks->Sup.len-1]; chunks->data[chunks->Sup.len-1] = copyStringRC1(LOC17);
				if (LOC18) nimGCunrefNoCycle(LOC18);
				i_360688 += 1;
			} LA16: ;
		}
	}
	LOC19 = 0;
	LOC20 = 0;
	LOC20 = nsuJoinSep(chunks->data, chunks->Sup.len, ((NimStringDesc*) &TMP4802));
	LOC19 = rawNewString(LOC20->Sup.len + 5);
appendString(LOC19, LOC20);
appendString(LOC19, ((NimStringDesc*) &TMP4803));
	result_360426 = resizeString(result_360426, LOC19->Sup.len + 0);
appendString(result_360426, LOC19);
	return result_360426;
}

N_NIMCALL(NimStringDesc*, generatemodulejumps_360718)(TY118808* modules) {
	NimStringDesc* result;
	TY118808* chunks;
	NimStringDesc* LOC6;
	NimStringDesc* LOC7;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP4805));
	chunks = (TY118808*) newSeq((&NTI118808), 0);
	{
		NimStringDesc* name_360757;
		NI i_360780;
		NI l_360782;
		name_360757 = 0;
		i_360780 = 0;
		l_360782 = modules->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC4;
				NimStringDesc* LOC5;
				if (!(i_360780 < l_360782)) goto LA3;
				name_360757 = modules->data[i_360780];
				LOC4 = 0;
				LOC4 = rawNewString(name_360757->Sup.len + name_360757->Sup.len + 20);
appendString(LOC4, ((NimStringDesc*) &TMP4799));
appendString(LOC4, name_360757);
appendString(LOC4, ((NimStringDesc*) &TMP4806));
appendString(LOC4, name_360757);
appendString(LOC4, ((NimStringDesc*) &TMP4801));
				chunks = (TY118808*) incrSeq(&(chunks)->Sup, sizeof(NimStringDesc*));
				LOC5 = 0;
				LOC5 = chunks->data[chunks->Sup.len-1]; chunks->data[chunks->Sup.len-1] = copyStringRC1(LOC4);
				if (LOC5) nimGCunrefNoCycle(LOC5);
				i_360780 += 1;
			} LA3: ;
		}
	}
	LOC6 = 0;
	LOC7 = 0;
	LOC7 = nsuJoinSep(chunks->data, chunks->Sup.len, ((NimStringDesc*) &TMP4802));
	LOC6 = rawNewString(LOC7->Sup.len + 5);
appendString(LOC6, LOC7);
appendString(LOC6, ((NimStringDesc*) &TMP4803));
	result = resizeString(result, LOC6->Sup.len + 0);
appendString(result, LOC6);
	return result;
}
N_NIMCALL(void, TMP4810)(void* p, NI op) {
	TY358879* a;
	NI LOC1;
	a = (TY358879*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

static N_INLINE(NimStringDesc*, HEX5BHEX5D_84166)(NimStringDesc* s, slice84173 x) {
	NimStringDesc* result;
	NI LOC1;
	NI LOC7;
	result = 0;
	LOC1 = 0;
	{
		if (!(0 <= x.A)) goto LA4;
		LOC1 = x.A;
	}
	goto LA2;
	LA4: ;
	{
		LOC1 = (NI64)(s->Sup.len + x.A);
	}
	LA2: ;
	LOC7 = 0;
	{
		if (!(0 <= x.B)) goto LA10;
		LOC7 = x.B;
	}
	goto LA8;
	LA10: ;
	{
		LOC7 = (NI64)(s->Sup.len + x.B);
	}
	LA8: ;
	result = copyStrLast(s, LOC1, LOC7);
	return result;
}

static N_INLINE(slice84173, HEX2EHEX2E_92299)(NI a_92303, NI b_92305) {
	slice84173 result;
	memset((void*)(&result), 0, sizeof(result));
	result.A = a_92303;
	result.B = b_92305;
	return result;
}

N_NIMCALL(void, striptoclevel_358788)(NimStringDesc* s, TY358880* Result) {
	slice84173 LOC8;
	{
		NI c_358816;
		NI HEX3Atmp_358840;
		NI res_358843;
		c_358816 = 0;
		HEX3Atmp_358840 = 0;
		HEX3Atmp_358840 = (s->Sup.len - 1);
		res_358843 = 0;
		{
			while (1) {
				if (!(res_358843 <= HEX3Atmp_358840)) goto LA3;
				c_358816 = res_358843;
				(*Result).Field0 = c_358816;
				{
					if (!!(((NU8)(s->data[c_358816]) == (NU8)(32)))) goto LA6;
					goto LA1;
				}
				LA6: ;
				res_358843 += 1;
			} LA3: ;
		}
	} LA1: ;
	LOC8 = HEX2EHEX2E_92299((*Result).Field0, (s->Sup.len - 1));
	unsureAsgnRef((void**) (&(*Result).Field1), HEX5BHEX5D_84166(s, LOC8));
}

N_NIMCALL(NimStringDesc*, indenttolevel_358860)(NI* level, NI newlevel) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2111));
	{
		if (!((*level) == newlevel)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!((*level) < newlevel)) goto LA7;
		result = nsuRepeatStr((NI64)(newlevel - (*level)), ((NimStringDesc*) &TMP4812));
	}
	goto LA5;
	LA7: ;
	{
		result = nsuRepeatStr((NI64)((*level) - newlevel), ((NimStringDesc*) &TMP4813));
	}
	LA5: ;
	(*level) = newlevel;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, generatedocumentationtoc_358873)(TY360804* entries) {
	NimStringDesc* result;
	NimStringDesc* titleref;
	TY358879* levels;
	NI l_358884;
	NI level;
	NimStringDesc* LOC23;
	NimStringDesc* LOC24;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2111));
	titleref = 0;
	levels = 0;
	l_358884 = 0;
	level = 1;
	levels = (TY358879*) newSeq((&NTI358879), entries->Sup.len);
	{
		tindexentry358264 entry_359011;
		NI i_359206;
		NI l_359208;
		memset((void*)(&entry_359011), 0, sizeof(entry_359011));
		i_359206 = 0;
		l_359208 = entries->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC4;
				TY358880 LOC5;
				NI rawlevel;
				NimStringDesc* rawtext;
				if (!(i_359206 < l_359208)) goto LA3;
				entry_359011.Keyword = entries->data[i_359206].Keyword;
				entry_359011.Link = entries->data[i_359206].Link;
				entry_359011.Linktitle = entries->data[i_359206].Linktitle;
				entry_359011.Linkdesc = entries->data[i_359206].Linkdesc;
				LOC4 = 0;
				LOC4 = or_357568(entry_359011.Linktitle, entry_359011.Keyword);
				memset((void*)(&LOC5), 0, sizeof(LOC5));
				striptoclevel_358788(LOC4, (&LOC5));
				rawlevel = 0;
				rawlevel = LOC5.Field0;
				rawtext = 0;
				rawtext = LOC5.Field1;
				{
					NimStringDesc* LOC10;
					if (!(rawlevel < 1)) goto LA8;
					levels->data[l_358884].Field0 = (NI64)(level + 1);
					LOC10 = 0;
					LOC10 = levels->data[l_358884].Field1; levels->data[l_358884].Field1 = copyStringRC1(entry_359011.Keyword);
					if (LOC10) nimGCunrefNoCycle(LOC10);
				}
				goto LA6;
				LA8: ;
				{
					NimStringDesc* LOC12;
					level = rawlevel;
					levels->data[l_358884].Field0 = rawlevel;
					LOC12 = 0;
					LOC12 = levels->data[l_358884].Field1; levels->data[l_358884].Field1 = copyStringRC1(rawtext);
					if (LOC12) nimGCunrefNoCycle(LOC12);
				}
				LA6: ;
				l_358884 += 1;
				i_359206 += 1;
			} LA3: ;
		}
	}
	result = copyString(((NimStringDesc*) &TMP4811));
	level = 1;
	l_358884 = 0;
	{
		while (1) {
			NimStringDesc* link;
			if (!(l_358884 < entries->Sup.len)) goto LA14;
			link = entries->data[l_358884].Link;
			{
				NIM_BOOL LOC17;
				LOC17 = 0;
				LOC17 = isdocumentationtitle_358777(link);
				if (!LOC17) goto LA18;
				titleref = copyString(link);
			}
			goto LA15;
			LA18: ;
			{
				NimStringDesc* LOC21;
				NimStringDesc* LOC22;
				LOC21 = 0;
				LOC21 = indenttolevel_358860((&level), levels->data[l_358884].Field0);
				result = resizeString(result, LOC21->Sup.len + 0);
appendString(result, LOC21);
				LOC22 = 0;
				LOC22 = rawNewString(link->Sup.len + levels->data[l_358884].Field1->Sup.len + 20);
appendString(LOC22, ((NimStringDesc*) &TMP4814));
appendString(LOC22, link);
appendString(LOC22, ((NimStringDesc*) &TMP4800));
appendString(LOC22, levels->data[l_358884].Field1);
appendString(LOC22, ((NimStringDesc*) &TMP4815));
				result = resizeString(result, LOC22->Sup.len + 0);
appendString(result, LOC22);
			}
			LA15: ;
			l_358884 += 1;
		} LA14: ;
	}
	LOC23 = 0;
	LOC24 = 0;
	LOC24 = indenttolevel_358860((&level), 1);
	LOC23 = rawNewString(LOC24->Sup.len + 6);
appendString(LOC23, LOC24);
appendString(LOC23, ((NimStringDesc*) &TMP4816));
	result = resizeString(result, LOC23->Sup.len + 0);
appendString(result, LOC23);
	return result;
}

N_NIMCALL(NimStringDesc*, generatedocumentationindex_359231)(table358277 docs) {
	NimStringDesc* result_359234;
	TY360804* titles;
	TY360804* result_359236;
	TY359572 LOC13;
	result_359234 = 0;
	result_359234 = copyString(((NimStringDesc*) &TMP2111));
	result_359236 = (TY360804*) newSeq((&NTI360804), 0);
	{
		tindexentry358264 x_359238;
		memset((void*)(&x_359238), 0, sizeof(x_359238));
		{
			NI h_360385;
			NI HEX3Atmp_360387;
			NI res_360389;
			h_360385 = 0;
			HEX3Atmp_360387 = 0;
			HEX3Atmp_360387 = (docs.Data->Sup.len-1);
			res_360389 = 0;
			{
				while (1) {
					if (!(res_360389 <= HEX3Atmp_360387)) goto LA4;
					h_360385 = res_360389;
					{
						NimStringDesc* LOC9;
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						NimStringDesc* LOC12;
						if (!(docs.Data->data[h_360385].Field0 == ((NU8) 1))) goto LA7;
						x_359238.Keyword = docs.Data->data[h_360385].Field1.Keyword;
						x_359238.Link = docs.Data->data[h_360385].Field1.Link;
						x_359238.Linktitle = docs.Data->data[h_360385].Field1.Linktitle;
						x_359238.Linkdesc = docs.Data->data[h_360385].Field1.Linkdesc;
						result_359236 = (TY360804*) incrSeq(&(result_359236)->Sup, sizeof(tindexentry358264));
						LOC9 = 0;
						LOC9 = result_359236->data[result_359236->Sup.len-1].Keyword; result_359236->data[result_359236->Sup.len-1].Keyword = copyStringRC1(x_359238.Keyword);
						if (LOC9) nimGCunrefNoCycle(LOC9);
						LOC10 = 0;
						LOC10 = result_359236->data[result_359236->Sup.len-1].Link; result_359236->data[result_359236->Sup.len-1].Link = copyStringRC1(x_359238.Link);
						if (LOC10) nimGCunrefNoCycle(LOC10);
						LOC11 = 0;
						LOC11 = result_359236->data[result_359236->Sup.len-1].Linktitle; result_359236->data[result_359236->Sup.len-1].Linktitle = copyStringRC1(x_359238.Linktitle);
						if (LOC11) nimGCunrefNoCycle(LOC11);
						LOC12 = 0;
						LOC12 = result_359236->data[result_359236->Sup.len-1].Linkdesc; result_359236->data[result_359236->Sup.len-1].Linkdesc = copyStringRC1(x_359238.Linkdesc);
						if (LOC12) nimGCunrefNoCycle(LOC12);
					}
					LA7: ;
					res_360389 += 1;
				} LA4: ;
			}
		}
	}
	genericSeqAssign((&titles), result_359236, (&NTI360804));
	memset((void*)(&LOC13), 0, sizeof(LOC13));
	LOC13.ClPrc = ((TMP4808) (cmp_358298)); LOC13.ClEnv = NIM_NIL;
	sort_359553(titles->data, titles->Sup.len, LOC13, ((NU8) 1));
	{
		tindexentry358264 title_360295;
		NI i_360393;
		NI l_360395;
		memset((void*)(&title_360295), 0, sizeof(title_360295));
		i_360393 = 0;
		l_360395 = titles->Sup.len;
		{
			while (1) {
				NimStringDesc* toclist;
				TY360804* LOC17;
				NimStringDesc* LOC18;
				if (!(i_360393 < l_360395)) goto LA16;
				title_360295.Keyword = titles->data[i_360393].Keyword;
				title_360295.Link = titles->data[i_360393].Link;
				title_360295.Linktitle = titles->data[i_360393].Linktitle;
				title_360295.Linkdesc = titles->data[i_360393].Linkdesc;
				LOC17 = 0;
				LOC17 = HEX5BHEX5D_360298(docs, (&title_360295));
				toclist = generatedocumentationtoc_358873(LOC17);
				LOC18 = 0;
				LOC18 = rawNewString(title_360295.Link->Sup.len + title_360295.Keyword->Sup.len + toclist->Sup.len + 30);
appendString(LOC18, ((NimStringDesc*) &TMP4817));
appendString(LOC18, title_360295.Link);
appendString(LOC18, ((NimStringDesc*) &TMP4800));
appendString(LOC18, title_360295.Keyword);
appendString(LOC18, ((NimStringDesc*) &TMP4815));
appendString(LOC18, toclist);
appendString(LOC18, ((NimStringDesc*) &TMP4816));
				result_359234 = resizeString(result_359234, LOC18->Sup.len + 0);
appendString(result_359234, LOC18);
				i_360393 += 1;
			} LA16: ;
		}
	}
	return result_359234;
}

N_NIMCALL(void, sortindex_358618)(tindexentry358264* a, NI aLen0) {
	NI n;
	NI h;
	n = aLen0;
	h = 1;
	{
		while (1) {
			h = (NI64)((NI64)(3 * h) + 1);
			{
				if (!(n < h)) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	{
		while (1) {
			h = (NI64)(h / 3);
			{
				NI i_358645;
				NI HEX3Atmp_358657;
				NI res_358660;
				i_358645 = 0;
				HEX3Atmp_358657 = 0;
				HEX3Atmp_358657 = (NI64)(n - 1);
				res_358660 = h;
				{
					while (1) {
						tindexentry358264 v;
						NI j;
						if (!(res_358660 <= HEX3Atmp_358657)) goto LA11;
						i_358645 = res_358660;
						memset((void*)(&v), 0, sizeof(v));
						HEX3CHEX2D_358607((&v), (&a[i_358645]));
						j = i_358645;
						{
							while (1) {
								NI LOC14;
								LOC14 = 0;
								LOC14 = cmp_358298((&a[(NI64)(j - h)]), (&v));
								if (!(0 <= LOC14)) goto LA13;
								HEX3CHEX2D_358607((&a[j]), (&a[(NI64)(j - h)]));
								j = (NI64)(j - h);
								{
									if (!(j < h)) goto LA17;
									goto LA12;
								}
								LA17: ;
							} LA13: ;
						} LA12: ;
						HEX3CHEX2D_358607((&a[j]), (&v));
						res_358660 += 1;
					} LA11: ;
				}
			}
			{
				if (!(h == 1)) goto LA21;
				goto LA7;
			}
			LA21: ;
		}
	} LA7: ;
}

N_NIMCALL(NimStringDesc*, generatesymbolindex_358695)(TY360804* symbols) {
	NimStringDesc* result;
	NI i;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2111));
	i = 0;
	{
		while (1) {
			TY196301 LOC3;
			NI j;
			if (!(i < symbols->Sup.len)) goto LA2;
			memset((void*)LOC3, 0, sizeof(LOC3));
			LOC3[0] = copyString(symbols->data[i].Keyword);
			nsuAddf((&result), ((NimStringDesc*) &TMP4819), LOC3, 1);
			j = i;
			{
				while (1) {
					NIM_BOOL LOC6;
					NimStringDesc* url;
					NimStringDesc* text;
					NimStringDesc* desc;
					LOC6 = 0;
					LOC6 = (j < symbols->Sup.len);
					if (!(LOC6)) goto LA7;
					LOC6 = eqStrings(symbols->data[i].Keyword, symbols->data[j].Keyword);
					LA7: ;
					if (!LOC6) goto LA5;
					url = symbols->data[j].Link;
					{
						if (!!(symbols->data[j].Linktitle == 0)) goto LA10;
						text = symbols->data[j].Linktitle;
					}
					goto LA8;
					LA10: ;
					{
						text = url;
					}
					LA8: ;
					{
						if (!!(symbols->data[j].Linkdesc == 0)) goto LA15;
						desc = symbols->data[j].Linkdesc;
					}
					goto LA13;
					LA15: ;
					{
						desc = copyString(((NimStringDesc*) &TMP2111));
					}
					LA13: ;
					{
						TY207063 LOC22;
						if (!(0 < desc->Sup.len)) goto LA20;
						memset((void*)LOC22, 0, sizeof(LOC22));
						LOC22[0] = copyString(url);
						LOC22[1] = copyString(text);
						LOC22[2] = copyString(desc);
						nsuAddf((&result), ((NimStringDesc*) &TMP4820), LOC22, 3);
					}
					goto LA18;
					LA20: ;
					{
						TY168969 LOC24;
						memset((void*)LOC24, 0, sizeof(LOC24));
						LOC24[0] = copyString(url);
						LOC24[1] = copyString(text);
						nsuAddf((&result), ((NimStringDesc*) &TMP4821), LOC24, 2);
					}
					LA18: ;
					j += 1;
				} LA5: ;
			}
			result = resizeString(result, 11);
appendString(result, ((NimStringDesc*) &TMP4822));
			i = j;
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NimStringDesc*, mergeindexes_363149)(NimStringDesc* dir) {
	NimStringDesc* result;
	TY360801 LOC1;
	TY118808* modules;
	TY360804* symbols;
	table358277 docs;
	result = 0;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	readindexdir_360798(dir, (&LOC1));
	modules = 0;
	genericSeqAssign((&modules), LOC1.Field0, (&NTI118808));
	symbols = 0;
	genericSeqAssign((&symbols), LOC1.Field1, (&NTI360804));
	memset((void*)(&docs), 0, sizeof(docs));
	genericSeqAssign((&docs.Data), LOC1.Field2.Data, (&NTI358280));
	docs.Counter = LOC1.Field2.Counter;
	result = copyString(((NimStringDesc*) &TMP2111));
	{
		NI LOC4;
		NimStringDesc* LOC7;
		LOC4 = 0;
		LOC4 = len_361285(docs);
		if (!(0 < LOC4)) goto LA5;
		LOC7 = 0;
		LOC7 = generatedocumentationjumps_360423(docs);
		result = resizeString(result, LOC7->Sup.len + 0);
appendString(result, LOC7);
		result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TMP4804));
	}
	LA5: ;
	{
		NimStringDesc* LOC12;
		if (!(0 < modules->Sup.len)) goto LA10;
		LOC12 = 0;
		LOC12 = generatemodulejumps_360718(modules);
		result = resizeString(result, LOC12->Sup.len + 0);
appendString(result, LOC12);
		result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TMP4804));
	}
	LA10: ;
	{
		NI LOC15;
		NimStringDesc* LOC18;
		LOC15 = 0;
		LOC15 = len_361285(docs);
		if (!(0 < LOC15)) goto LA16;
		result = resizeString(result, 29);
appendString(result, ((NimStringDesc*) &TMP4807));
		LOC18 = 0;
		LOC18 = generatedocumentationindex_359231(docs);
		result = resizeString(result, LOC18->Sup.len + 0);
appendString(result, LOC18);
	}
	LA16: ;
	{
		NimStringDesc* LOC23;
		if (!(0 < symbols->Sup.len)) goto LA21;
		sortindex_358618(symbols->data, symbols->Sup.len);
		result = resizeString(result, 21);
appendString(result, ((NimStringDesc*) &TMP4818));
		LOC23 = 0;
		LOC23 = generatesymbolindex_358695(symbols);
		result = resizeString(result, LOC23->Sup.len + 0);
appendString(result, LOC23);
	}
	LA21: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, docutils_rstgenInit)(void) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = splitter_357332; splitter_357332 = copyStringRC1(((NimStringDesc*) &TMP894));
	if (LOC1) nimGCunrefNoCycle(LOC1);
}

NIM_EXTERNC N_NOINLINE(void, docutils_rstgenDatInit)(void) {
static TNimNode* TMP4623[13];
static TNimNode* TMP4624[2];
NI TMP4626;
static char* NIM_CONST TMP4625[2] = {
"outHtml", 
"outLatex"};
static TNimNode* TMP4627[3];
static TNimNode* TMP4785[4];
static TNimNode* TMP4809[2];
static TNimNode TMP886[29];
NTI357016.size = sizeof(trstgenerator357016);
NTI357016.kind = 17;
NTI357016.base = (&NTI3211);
TMP4623[0] = &TMP886[1];
NTI357010.size = sizeof(NU8);
NTI357010.kind = 14;
NTI357010.base = 0;
NTI357010.flags = 3;
for (TMP4626 = 0; TMP4626 < 2; TMP4626++) {
TMP886[TMP4626+2].kind = 1;
TMP886[TMP4626+2].offset = TMP4626;
TMP886[TMP4626+2].name = TMP4625[TMP4626];
TMP4624[TMP4626] = &TMP886[TMP4626+2];
}
TMP886[4].len = 2; TMP886[4].kind = 2; TMP886[4].sons = &TMP4624[0];
NTI357010.node = &TMP886[4];
TMP886[1].kind = 1;
TMP886[1].offset = offsetof(trstgenerator357016, Target);
TMP886[1].typ = (&NTI357010);
TMP886[1].name = "target";
TMP4623[1] = &TMP886[5];
TMP886[5].kind = 1;
TMP886[5].offset = offsetof(trstgenerator357016, Config);
TMP886[5].typ = (&NTI130014);
TMP886[5].name = "config";
TMP4623[2] = &TMP886[6];
TMP886[6].kind = 1;
TMP886[6].offset = offsetof(trstgenerator357016, Splitafter);
TMP886[6].typ = (&NTI108);
TMP886[6].name = "splitAfter";
TMP4623[3] = &TMP886[7];
NTI357012.size = sizeof(ttocentry357012);
NTI357012.kind = 18;
NTI357012.base = 0;
NTI357012.flags = 2;
TMP4627[0] = &TMP886[9];
TMP886[9].kind = 1;
TMP886[9].offset = offsetof(ttocentry357012, N);
TMP886[9].typ = (&NTI341007);
TMP886[9].name = "n";
TMP4627[1] = &TMP886[10];
TMP886[10].kind = 1;
TMP886[10].offset = offsetof(ttocentry357012, Refname);
TMP886[10].typ = (&NTI149);
TMP886[10].name = "refname";
TMP4627[2] = &TMP886[11];
TMP886[11].kind = 1;
TMP886[11].offset = offsetof(ttocentry357012, Header);
TMP886[11].typ = (&NTI149);
TMP886[11].name = "header";
TMP886[8].len = 3; TMP886[8].kind = 2; TMP886[8].sons = &TMP4627[0];
NTI357012.node = &TMP886[8];
NTI357034.size = sizeof(TY357034*);
NTI357034.kind = 24;
NTI357034.base = (&NTI357012);
NTI357034.flags = 2;
NTI357034.marker = TMP4628;
TMP886[7].kind = 1;
TMP886[7].offset = offsetof(trstgenerator357016, Tocpart);
TMP886[7].typ = (&NTI357034);
TMP886[7].name = "tocPart";
TMP4623[4] = &TMP886[12];
TMP886[12].kind = 1;
TMP886[12].offset = offsetof(trstgenerator357016, Hastoc);
TMP886[12].typ = (&NTI138);
TMP886[12].name = "hasToc";
TMP4623[5] = &TMP886[13];
TMP886[13].kind = 1;
TMP886[13].offset = offsetof(trstgenerator357016, Theindex);
TMP886[13].typ = (&NTI149);
TMP886[13].name = "theIndex";
TMP4623[6] = &TMP886[14];
TMP886[14].kind = 1;
TMP886[14].offset = offsetof(trstgenerator357016, Options);
TMP886[14].typ = (&NTI342015);
TMP886[14].name = "options";
TMP4623[7] = &TMP886[15];
TMP886[15].kind = 1;
TMP886[15].offset = offsetof(trstgenerator357016, Findfile);
TMP886[15].typ = (&NTI342023);
TMP886[15].name = "findFile";
TMP4623[8] = &TMP886[16];
TMP886[16].kind = 1;
TMP886[16].offset = offsetof(trstgenerator357016, Msghandler);
TMP886[16].typ = (&NTI342021);
TMP886[16].name = "msgHandler";
TMP4623[9] = &TMP886[17];
TMP886[17].kind = 1;
TMP886[17].offset = offsetof(trstgenerator357016, Filename);
TMP886[17].typ = (&NTI149);
TMP886[17].name = "filename";
TMP4623[10] = &TMP886[18];
NTI357042.size = sizeof(TY357042);
NTI357042.kind = 16;
NTI357042.base = (&NTI149);
NTI357042.flags = 2;
TMP886[18].kind = 1;
TMP886[18].offset = offsetof(trstgenerator357016, Meta);
TMP886[18].typ = (&NTI357042);
TMP886[18].name = "meta";
TMP4623[11] = &TMP886[19];
TMP886[19].kind = 1;
TMP886[19].offset = offsetof(trstgenerator357016, Currentsection);
TMP886[19].typ = (&NTI149);
TMP886[19].name = "currentSection";
TMP4623[12] = &TMP886[20];
TMP886[20].kind = 1;
TMP886[20].offset = offsetof(trstgenerator357016, Seenindexterms);
TMP886[20].typ = (&NTI357052);
TMP886[20].name = "seenIndexTerms";
TMP886[0].len = 13; TMP886[0].kind = 2; TMP886[0].sons = &TMP4623[0];
NTI357016.node = &TMP886[0];
NTI358264.size = sizeof(tindexentry358264);
NTI358264.kind = 18;
NTI358264.base = 0;
NTI358264.flags = 2;
TMP4785[0] = &TMP886[22];
TMP886[22].kind = 1;
TMP886[22].offset = offsetof(tindexentry358264, Keyword);
TMP886[22].typ = (&NTI149);
TMP886[22].name = "keyword";
TMP4785[1] = &TMP886[23];
TMP886[23].kind = 1;
TMP886[23].offset = offsetof(tindexentry358264, Link);
TMP886[23].typ = (&NTI149);
TMP886[23].name = "link";
TMP4785[2] = &TMP886[24];
TMP886[24].kind = 1;
TMP886[24].offset = offsetof(tindexentry358264, Linktitle);
TMP886[24].typ = (&NTI149);
TMP886[24].name = "linkTitle";
TMP4785[3] = &TMP886[25];
TMP886[25].kind = 1;
TMP886[25].offset = offsetof(tindexentry358264, Linkdesc);
TMP886[25].typ = (&NTI149);
TMP886[25].name = "linkDesc";
TMP886[21].len = 4; TMP886[21].kind = 2; TMP886[21].sons = &TMP4785[0];
NTI358264.node = &TMP886[21];
NTI360804.size = sizeof(TY360804*);
NTI360804.kind = 24;
NTI360804.base = (&NTI358264);
NTI360804.flags = 2;
NTI360804.marker = TMP4786;
NTI358880.size = sizeof(TY358880);
NTI358880.kind = 18;
NTI358880.base = 0;
NTI358880.flags = 2;
TMP4809[0] = &TMP886[27];
TMP886[27].kind = 1;
TMP886[27].offset = offsetof(TY358880, Field0);
TMP886[27].typ = (&NTI108);
TMP886[27].name = "Field0";
TMP4809[1] = &TMP886[28];
TMP886[28].kind = 1;
TMP886[28].offset = offsetof(TY358880, Field1);
TMP886[28].typ = (&NTI149);
TMP886[28].name = "Field1";
TMP886[26].len = 2; TMP886[26].kind = 2; TMP886[26].sons = &TMP4809[0];
NTI358880.node = &TMP886[26];
NTI358879.size = sizeof(TY358879*);
NTI358879.kind = 24;
NTI358879.base = (&NTI358880);
NTI358879.flags = 2;
NTI358879.marker = TMP4810;
}

