/* 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 tcell45133 tcell45133;
typedef struct TNimType TNimType;
typedef struct tcellseq45149 tcellseq45149;
typedef struct tgcheap47216 tgcheap47216;
typedef struct tcellset45145 tcellset45145;
typedef struct tpagedesc45141 tpagedesc45141;
typedef struct tmemregion27410 tmemregion27410;
typedef struct tsmallchunk26640 tsmallchunk26640;
typedef struct tllchunk27404 tllchunk27404;
typedef struct tbigchunk26642 tbigchunk26642;
typedef struct tintset26617 tintset26617;
typedef struct ttrunk26613 ttrunk26613;
typedef struct tavlnode27408 tavlnode27408;
typedef struct tgcstat47214 tgcstat47214;
typedef struct trstgenerator358016 trstgenerator358016;
typedef struct trstnode342011 trstnode342011;
typedef struct trstnodeseq342009 trstnodeseq342009;
typedef struct TNimObject TNimObject;
typedef struct TNimNode TNimNode;
typedef struct stringtableobj131012 stringtableobj131012;
typedef struct TY358034 TY358034;
typedef struct ttocentry358012 ttocentry358012;
typedef struct table358052 table358052;
typedef struct keyvaluepairseq358055 keyvaluepairseq358055;
typedef struct keyvaluepair358058 keyvaluepair358058;
typedef struct codeblockparams358020 codeblockparams358020;
typedef struct keyvaluepair131008 keyvaluepair131008;
typedef struct tgeneraltokenizer352023 tgeneraltokenizer352023;
typedef struct TY117804 TY117804;
typedef struct TY361801 TY361801;
typedef struct TY120008 TY120008;
typedef struct TY361804 TY361804;
typedef struct tindexentry359264 tindexentry359264;
typedef struct table359277 table359277;
typedef struct keyvaluepairseq359280 keyvaluepairseq359280;
typedef struct keyvaluepair359283 keyvaluepair359283;
typedef struct TY359879 TY359879;
typedef struct TY359880 TY359880;
typedef struct slice84375 slice84375;
typedef struct tbasechunk26638 tbasechunk26638;
typedef struct tfreecell26630 tfreecell26630;
typedef struct keyvaluepairseq131010 keyvaluepairseq131010;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tcell45133  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq45149  {
NI Len;
NI Cap;
tcell45133** D;
};
struct  tcellset45145  {
NI Counter;
NI Max;
tpagedesc45141* Head;
tpagedesc45141** Data;
};
typedef tsmallchunk26640* TY27422[512];
typedef ttrunk26613* ttrunkbuckets26615[256];
struct  tintset26617  {
ttrunkbuckets26615 Data;
};
struct  tmemregion27410  {
NI Minlargeobj;
NI Maxlargeobj;
TY27422 Freesmallchunks;
tllchunk27404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26642* Freechunkslist;
tintset26617 Chunkstarts;
tavlnode27408* Root;
tavlnode27408* Deleted;
tavlnode27408* Last;
tavlnode27408* Freeavlnodes;
};
struct  tgcstat47214  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47216  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq45149 Zct;
tcellseq45149 Decstack;
tcellset45145 Cycleroots;
tcellseq45149 Tempstack;
NI Recgclock;
tmemregion27410 Region;
tgcstat47214 Stat;
};
struct  trstnode342011  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq342009* 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  ttocentry358012  {
trstnode342011* N;
NimStringDesc* Refname;
NimStringDesc* Header;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler343023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler343021) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef NimStringDesc* TY358042[5];
struct keyvaluepair358058 {
NU8 Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  table358052  {
keyvaluepairseq358055* Data;
NI Counter;
};
struct  trstgenerator358016  {
  TNimObject Sup;
NU8 Target;
stringtableobj131012* Config;
NI Splitafter;
TY358034* Tocpart;
NIM_BOOL Hastoc;
NimStringDesc* Theindex;
NU8 Options;
tfindfilehandler343023 Findfile;
tmsghandler343021 Msghandler;
NimStringDesc* Filename;
TY358042 Meta;
NimStringDesc* Currentsection;
table358052 Seenindexterms;
};
typedef NimStringDesc* TY197620[4];
typedef NimStringDesc* TY197301[1];
typedef NimStringDesc* TY169969[2];
typedef NU8 TY211607[32];
struct  codeblockparams358020  {
NIM_BOOL Numberlines;
NI Startline;
NimStringDesc* Langstr;
NU8 Lang;
};
struct keyvaluepair131008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef NimStringDesc* TY260532[1];
struct  tgeneraltokenizer352023  {
  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* TY352082[33];
struct TY117804 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
struct  tindexentry359264  {
NimStringDesc* Keyword;
NimStringDesc* Link;
NimStringDesc* Linktitle;
NimStringDesc* Linkdesc;
};
struct keyvaluepair359283 {
NU8 Field0;
tindexentry359264 Field1;
TY361804* Field2;
};
struct  table359277  {
keyvaluepairseq359280* Data;
NI Counter;
};
struct TY361801 {
TY120008* Field0;
TY361804* Field1;
table359277 Field2;
};
typedef NIM_CHAR TY104554[256];
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (NimStringDesc* x_362565, NimStringDesc* y_362567, void* ClEnv);
void* ClEnv;
} TY362571;
typedef N_CLOSURE_PTR(NI, TMP4791) (NimStringDesc* x_362548, NimStringDesc* y_362550, void* ClEnv);
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tindexentry359264* x_360566, tindexentry359264* y_360568, void* ClEnv);
void* ClEnv;
} TY360572;
typedef N_CLOSURE_PTR(NI, TMP4795) (tindexentry359264* x_361592, tindexentry359264* y_361594, void* ClEnv);
typedef N_CLOSURE_PTR(NI, TMP4805) (tindexentry359264* x_360549, tindexentry359264* y_360551, void* ClEnv);
struct TY359880 {
NI Field0;
NimStringDesc* Field1;
};
struct  slice84375  {
NI A;
NI B;
};
typedef NimStringDesc* TY208063[3];
typedef NI TY26620[8];
struct  tpagedesc45141  {
tpagedesc45141* Next;
NI Key;
TY26620 Bits;
};
struct  tbasechunk26638  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26640  {
  tbasechunk26638 Sup;
tsmallchunk26640* Next;
tsmallchunk26640* Prev;
tfreecell26630* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27404  {
NI Size;
NI Acc;
tllchunk27404* Next;
};
struct  tbigchunk26642  {
  tbasechunk26638 Sup;
tbigchunk26642* Next;
tbigchunk26642* Prev;
NI Align;
NF Data;
};
struct  ttrunk26613  {
ttrunk26613* Next;
NI Key;
TY26620 Bits;
};
typedef tavlnode27408* TY27414[2];
struct  tavlnode27408  {
TY27414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  stringtableobj131012  {
  TNimObject Sup;
NI Counter;
keyvaluepairseq131010* Data;
NU8 Mode;
};
struct  tfreecell26630  {
tfreecell26630* Next;
NI Zerofield;
};
struct trstnodeseq342009 {
  TGenericSeq Sup;
  trstnode342011* data[SEQ_DECL_SIZE];
};
struct TY358034 {
  TGenericSeq Sup;
  ttocentry358012 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq358055 {
  TGenericSeq Sup;
  keyvaluepair358058 data[SEQ_DECL_SIZE];
};
struct TY120008 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct TY361804 {
  TGenericSeq Sup;
  tindexentry359264 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq359280 {
  TGenericSeq Sup;
  keyvaluepair359283 data[SEQ_DECL_SIZE];
};
struct TY359879 {
  TGenericSeq Sup;
  TY359880 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq131010 {
  TGenericSeq Sup;
  keyvaluepair131008 data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell45133*, usrtocell_48846)(void* usr);
static N_INLINE(void, rtladdzct_50404)(tcell45133* c);
N_NOINLINE(void, addzct_48817)(tcellseq45149* s, tcell45133* c);
N_NIMCALL(void, renderaux_358589)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(NI, len_342084)(trstnode342011* n);
N_NIMCALL(void, renderrsttoout_358579)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(void, renderheadline_364281)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(NimStringDesc*, rstnodetorefname_343061)(trstnode342011* n);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, dispa_358544)(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_358710)(trstgenerator358016* 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_358690)(NimStringDesc* text);
N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s, NimStringDesc* sub, NimStringDesc* by);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, insert_86001)(NimStringDesc** x, NimStringDesc* item, NI i);
N_NIMCALL(NimStringDesc*, striptochtml_364260)(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_364425)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(void, renderaux_358629)(trstgenerator358016* d, trstnode342011* n, NimStringDesc* frmta, NimStringDesc* frmtb, NimStringDesc** result);
N_NIMCALL(void, renderfield_366327)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, addnodes_343067)(trstnode342011* n);
N_NIMCALL(NimStringDesc*, esc_358407)(NU8 target, NimStringDesc* s, NI splitafter);
N_NIMCALL(NI, nextsplitpoint_358349)(NimStringDesc* s, NI start);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(void, escchar_358337)(NU8 target, NimStringDesc** dest, NIM_CHAR c);
N_NIMCALL(void, addxmlchar_358299)(NimStringDesc** dest, NIM_CHAR c);
N_NIMCALL(void, addtexchar_358321)(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_84957)(NimStringDesc* msg);
N_NIMCALL(NimStringDesc*, texcolumns_366289)(trstnode342011* n);
N_NIMCALL(trstnode342011*, lastson_342162)(trstnode342011* n);
N_NIMCALL(void, renderimage_364598)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, getfieldvalue_343073)(trstnode342011* n, NimStringDesc* fieldname);
N_NIMCALL(NIM_BOOL, allcharsinset_96479)(NimStringDesc* s, TY211607 theset);
N_NIMCALL(NimStringDesc*, dispf_358521)(NU8 target, NimStringDesc* xml, NimStringDesc* tex, NimStringDesc** args, NI argsLen0);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, getargument_343080)(trstnode342011* n);
N_NIMCALL(void, rendercodeblock_365840)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(void, parsecodeblockparams_365007)(trstgenerator358016* d, trstnode342011* n, codeblockparams358020* Result);
N_NIMCALL(void, init_358078)(codeblockparams358020* p);
N_NIMCALL(void, parsecodeblockfield_364991)(trstgenerator358016* d, trstnode342011* n, codeblockparams358020* params);
N_NIMCALL(NimStringDesc*, nsuToLowerStr)(NimStringDesc* s);
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start);
N_NIMCALL(NimStringDesc*, getfieldvalue_346823)(trstnode342011* n);
N_NIMCALL(NU8, getsourcelanguage_352093)(NimStringDesc* name);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, buildlineshtmltable_365635)(codeblockparams358020* params, NimStringDesc* code, keyvaluepair131008* Result);
N_NIMCALL(NI, nsuCountLines)(NimStringDesc* s);
N_NIMCALL(void, initgeneraltokenizer_352229)(tgeneraltokenizer352023* g, NimStringDesc* buf);
N_NIMCALL(void, getnexttoken_355166)(tgeneraltokenizer352023* g, NU8 lang);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_75028, NI last);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI first, NI last);
N_NIMCALL(void, deinitgeneraltokenizer_352240)(tgeneraltokenizer352023* g);
N_NIMCALL(void, rendercontainer_366266)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(void, renderindexterm_358871)(trstgenerator358016* d, trstnode342011* n_358874, NimStringDesc** result);
N_NIMCALL(NIM_BOOL, haskey_358880)(table358052 t_358887, NimStringDesc* key_358890);
N_NIMCALL(void, HEX5BHEX5DHEX3D_358974)(table358052* t_358983, NimStringDesc* key_358987, NI val_358989);
N_NIMCALL(NI, HEX5BHEX5D_358943)(table358052 t_358950, NimStringDesc* key_358953);
N_NIMCALL(void, rendersmiley_364975)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(NimStringDesc*, nstGet)(stringtableobj131012* t, NimStringDesc* key);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP4625)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, nossplitFile)(NimStringDesc* path, TY117804* Result);
N_NIMCALL(void, inittable_358120)(NI initialsize_358125, table358052* Result);
N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s);
N_NIMCALL(void, rendertocentry_364538)(trstgenerator358016* d, ttocentry358012* e, NimStringDesc** result);
N_NIMCALL(void, rendertocentries_364554)(trstgenerator358016* d, NI* j, NI lvl, NimStringDesc** result);
N_NIMCALL(void, writefile_13045)(NimStringDesc* filename, NimStringDesc* content);
N_NIMCALL(void, readindexdir_361798)(NimStringDesc* dir, TY361801* Result);
N_NIMCALL(void, inittable_361830)(NI initialsize_361835, table359277* Result);
N_NIMCALL(void, TMP4783)(void* p, NI op);
N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_NIMCALL(NimStringDesc*, HEX2F_117499)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s, NimStringDesc* suffix);
N_NIMCALL(FILE*, open_12817)(NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_13089)(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_359777)(NimStringDesc* hyperlink);
N_NIMCALL(TY120008*, nsuSplitChar)(NimStringDesc* s, NIM_CHAR sep);
N_NIMCALL(NimStringDesc*, unquoteindexcolumn_358700)(NimStringDesc* text);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NI, len_362285)(table359277 t_362292);
N_NIMCALL(void, HEX5BHEX5DHEX3D_362301)(table359277* t_362310, tindexentry359264* key_362314, TY361804* val_362316);
static N_INLINE(NI, HEX21HEX26_128025)(NI h, NI val);
N_NIMCALL(NI, hash_128839)(NimStringDesc* x);
static N_INLINE(NimStringDesc*, or_358568)(NimStringDesc* x, NimStringDesc* y);
static N_INLINE(NI, HEX21HEX24_128054)(NI h);
N_NIMCALL(void, sort_362552)(NimStringDesc** a_362560, NI a_362560Len0, TY362571 cmp_362570, NU8 order_362573);
N_NIMCALL(NI, cmp_4517)(NimStringDesc* x, NimStringDesc* y);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_79804, TNimType* mt);
N_NIMCALL(NimStringDesc*, generatedocumentationjumps_361423)(table359277 docs);
N_NIMCALL(void, sort_360553)(tindexentry359264* a_360561, NI a_360561Len0, TY360572 cmp_360571, NU8 order_360574);
N_NIMCALL(NI, cmp_359298)(tindexentry359264* a, tindexentry359264* b);
N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a, NI aLen0, NimStringDesc* sep);
N_NIMCALL(NimStringDesc*, generatemodulejumps_361718)(TY120008* modules);
N_NIMCALL(NimStringDesc*, generatedocumentationindex_360231)(table359277 docs);
N_NIMCALL(NimStringDesc*, generatedocumentationtoc_359873)(TY361804* entries);
N_NIMCALL(void, TMP4807)(void* p, NI op);
N_NIMCALL(void, striptoclevel_359788)(NimStringDesc* s, TY359880* Result);
static N_INLINE(NimStringDesc*, HEX5BHEX5D_84368)(NimStringDesc* s, slice84375 x);
static N_INLINE(slice84375, HEX2EHEX2E_92299)(NI a_92303, NI b_92305);
N_NIMCALL(NimStringDesc*, indenttolevel_359860)(NI* level, NI newlevel);
N_NIMCALL(NimStringDesc*, nsuRepeatStr)(NI count, NimStringDesc* s);
N_NIMCALL(TY361804*, HEX5BHEX5D_361298)(table359277 t_361305, tindexentry359264* key_361308);
N_NIMCALL(void, sortindex_359618)(tindexentry359264* a, NI aLen0);
N_NIMCALL(void, HEX3CHEX2D_359607)(tindexentry359264* a, tindexentry359264* b);
N_NIMCALL(NimStringDesc*, generatesymbolindex_359695)(TY361804* symbols);
STRING_LITERAL(TMP894, "<wbr />", 7);
STRING_LITERAL(TMP2109, "", 0);
STRING_LITERAL(TMP2111, "\012<h$1><a class=\"toc-backref\" id=\"$2\" href=\"#$2\">$3</a></h$1>", 60);
STRING_LITERAL(TMP2112, "\\rsth$4{$3}\\label{$2}\012", 22);
STRING_LITERAL(TMP2113, "\012<h$1 id=\"$2\">$3</h$1>", 22);
STRING_LITERAL(TMP2114, "html", 4);
STRING_LITERAL(TMP2115, "\\", 1);
STRING_LITERAL(TMP2116, "\\\\", 2);
STRING_LITERAL(TMP2117, "\012", 1);
STRING_LITERAL(TMP2118, "\\n", 2);
STRING_LITERAL(TMP2119, "\011", 1);
STRING_LITERAL(TMP2120, "\\t", 2);
STRING_LITERAL(TMP2121, "<h$1 id=\"$2\"><center>$3</center></h$1>", 38);
STRING_LITERAL(TMP2122, "\\rstov$4{$3}\\label{$2}\012", 23);
STRING_LITERAL(TMP2123, "<hr />\012", 7);
STRING_LITERAL(TMP2124, "\\hrule\012", 7);
STRING_LITERAL(TMP2125, "<p>$1</p>\012", 10);
STRING_LITERAL(TMP2126, "$1\012\012", 4);
STRING_LITERAL(TMP2127, "<ul class=\"simple\">$1</ul>\012", 27);
STRING_LITERAL(TMP2128, "\\begin{itemize}$1\\end{itemize}\012", 31);
STRING_LITERAL(TMP2129, "<li>$1</li>\012", 12);
STRING_LITERAL(TMP2130, "\\item $1\012", 9);
STRING_LITERAL(TMP2131, "<ol class=\"simple\">$1</ol>\012", 27);
STRING_LITERAL(TMP2132, "\\begin{enumerate}$1\\end{enumerate}\012", 35);
STRING_LITERAL(TMP2133, "<dl class=\"docutils\">$1</dl>\012", 29);
STRING_LITERAL(TMP2134, "\\begin{description}$1\\end{description}\012", 39);
STRING_LITERAL(TMP2135, "<dt>$1</dt>\012", 12);
STRING_LITERAL(TMP2136, "\\item[$1] ", 10);
STRING_LITERAL(TMP2137, "<dd>$1</dd>\012", 12);
STRING_LITERAL(TMP2138, "$1\012", 3);
STRING_LITERAL(TMP2139, "<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(TMP2140, " ", 1);
STRING_LITERAL(TMP2141, "&amp;", 5);
STRING_LITERAL(TMP2142, "&lt;", 4);
STRING_LITERAL(TMP2143, "&gt;", 4);
STRING_LITERAL(TMP2144, "&quot;", 6);
STRING_LITERAL(TMP2145, "\\_", 2);
STRING_LITERAL(TMP2146, "\\symbol{123}", 12);
STRING_LITERAL(TMP2147, "\\symbol{125}", 12);
STRING_LITERAL(TMP2148, "\\symbol{91}", 11);
STRING_LITERAL(TMP2149, "\\symbol{93}", 11);
STRING_LITERAL(TMP2150, "\\symbol{92}", 11);
STRING_LITERAL(TMP2151, "\\$", 2);
STRING_LITERAL(TMP2152, "\\&", 2);
STRING_LITERAL(TMP2153, "\\#", 2);
STRING_LITERAL(TMP2154, "\\%", 2);
STRING_LITERAL(TMP2155, "\\symbol{126}", 12);
STRING_LITERAL(TMP2156, "\\symbol{64}", 11);
STRING_LITERAL(TMP2157, "\\symbol{94}", 11);
STRING_LITERAL(TMP2158, "\\symbol{96}", 11);
STRING_LITERAL(TMP2159, "author", 6);
STRING_LITERAL(TMP2160, "authors", 7);
STRING_LITERAL(TMP2161, "version", 7);
STRING_LITERAL(TMP2162, "<tr>$1</tr>\012", 12);
STRING_LITERAL(TMP2163, "$1", 2);
STRING_LITERAL(TMP2164, "<th class=\"docinfo-name\">$1:</th>", 33);
STRING_LITERAL(TMP2165, "\\item[$1:]", 10);
STRING_LITERAL(TMP2166, "<td>$1</td>", 11);
STRING_LITERAL(TMP2167, " $1\012", 4);
STRING_LITERAL(TMP2168, "<table frame=\"void\">$1</table>", 30);
STRING_LITERAL(TMP2169, "\\begin{description}\012$1\\end{description}\012", 40);
STRING_LITERAL(TMP2170, "<th align=\"left\">$1</th>", 24);
STRING_LITERAL(TMP2171, "\\item[$1]", 9);
STRING_LITERAL(TMP2172, "<td align=\"left\">$1</td>\012", 25);
STRING_LITERAL(TMP2174, "false renderRstToOut", 20);
STRING_LITERAL(TMP2175, "<pre>$1</pre>\012", 14);
STRING_LITERAL(TMP2176, "\\begin{rstpre}\012$1\012\\end{rstpre}\012", 31);
STRING_LITERAL(TMP2177, "<p>$1</p>", 9);
STRING_LITERAL(TMP2178, "$1<br />", 8);
STRING_LITERAL(TMP2179, "$1\\\\\012", 5);
STRING_LITERAL(TMP2180, "<blockquote><p>$1</p></blockquote>\012", 35);
STRING_LITERAL(TMP2181, "\\begin{quote}$1\\end{quote}\012", 27);
STRING_LITERAL(TMP2182, "<table border=\"1\" class=\"docutils\">$1</table>", 45);
STRING_LITERAL(TMP2183, "\\begin{table}\\begin{rsttab}{", 28);
STRING_LITERAL(TMP2184, "|X", 2);
STRING_LITERAL(TMP2185, "|}\012\\hline\012$1\\end{rsttab}\\end{table}", 35);
STRING_LITERAL(TMP2186, " & ", 3);
STRING_LITERAL(TMP2187, "\\\\\012\\hline\012", 10);
STRING_LITERAL(TMP2188, "<tr>", 4);
STRING_LITERAL(TMP2189, "</tr>\012", 6);
STRING_LITERAL(TMP2190, "<th>$1</th>", 11);
STRING_LITERAL(TMP2191, "\\textbf{$1}", 11);
STRING_LITERAL(TMP2192, "<a class=\"reference external\" href=\"#$2\">$1</a>", 47);
STRING_LITERAL(TMP2193, "$1\\ref{$2}", 10);
STRING_LITERAL(TMP2194, "<a class=\"reference external\" href=\"$1\">$1</a>", 46);
STRING_LITERAL(TMP2195, "\\href{$1}{$1}", 13);
STRING_LITERAL(TMP2196, "<a class=\"reference external\" href=\"$2\">$1</a>", 46);
STRING_LITERAL(TMP2197, "\\href{$2}{$1}", 13);
STRING_LITERAL(TMP2199, "scale", 5);
static NIM_CONST TY211607 TMP2200 = {
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(TMP2201, " scale=\"$1\"", 11);
STRING_LITERAL(TMP2202, " scale=$1", 9);
STRING_LITERAL(TMP2203, "height", 6);
STRING_LITERAL(TMP2204, " height=\"$1\"", 12);
STRING_LITERAL(TMP2205, " height=$1", 10);
STRING_LITERAL(TMP2206, "width", 5);
STRING_LITERAL(TMP2207, " width=\"$1\"", 11);
STRING_LITERAL(TMP2208, " width=$1", 9);
STRING_LITERAL(TMP2209, "alt", 3);
STRING_LITERAL(TMP2210, " alt=\"$1\"", 9);
STRING_LITERAL(TMP2211, "align", 5);
STRING_LITERAL(TMP2212, " align=\"$1\"", 11);
STRING_LITERAL(TMP2213, "[$1]", 4);
STRING_LITERAL(TMP2214, "<img src=\"$1\"$2 />", 18);
STRING_LITERAL(TMP2215, "\\includegraphics$2{$1}", 22);
STRING_LITERAL(TMP2216, "number-lines", 12);
STRING_LITERAL(TMP2217, "file", 4);
STRING_LITERAL(TMP2218, "default-language", 16);
STRING_LITERAL(TMP2227, "<pre>", 5);
STRING_LITERAL(TMP2228, "</pre>", 6);
NIM_CONST keyvaluepair131008 TMP2226 = {((NimStringDesc*) &TMP2227),
((NimStringDesc*) &TMP2228)}
;
STRING_LITERAL(TMP2229, "<table class=\"line-nums-table\"><tbody><tr><td class=\"blob-line-"
"nums\"><pre>", 74);
STRING_LITERAL(TMP2230, "</pre></td><td><pre>", 20);
STRING_LITERAL(TMP2231, "</pre></td></tr></tbody></table>", 32);
STRING_LITERAL(TMP2232, "\\begin{rstpre}\012", 15);
STRING_LITERAL(TMP2393, "<span class=\"$2\">$1</span>", 26);
STRING_LITERAL(TMP2394, "\\span$2{$1}", 11);
extern NIM_CONST TY352082 tokenclasstostr_352081;
STRING_LITERAL(TMP2428, "\012\\end{rstpre}\012", 14);
STRING_LITERAL(TMP2429, "<div>$1</div>", 13);
STRING_LITERAL(TMP2430, "<div class=\"$1\">$2</div>", 24);
STRING_LITERAL(TMP2431, "$2", 2);
STRING_LITERAL(TMP2432, "|$1|", 4);
STRING_LITERAL(TMP2433, "<sub>$1</sub>", 13);
STRING_LITERAL(TMP2434, "\\rstsub{$1}", 11);
STRING_LITERAL(TMP2435, "<sup>$1</sup>", 13);
STRING_LITERAL(TMP2436, "\\rstsup{$1}", 11);
STRING_LITERAL(TMP2437, "<em>$1</em>", 11);
STRING_LITERAL(TMP2438, "\\emph{$1}", 9);
STRING_LITERAL(TMP2439, "<strong>$1</strong>", 19);
STRING_LITERAL(TMP2440, "<strong><em>$1</em></strong>", 28);
STRING_LITERAL(TMP2441, "\\textbf{emph{$1}}", 17);
STRING_LITERAL(TMP2442, "<cite>$1</cite>", 15);
STRING_LITERAL(TMP2445, "<span id=\"$1\">$2</span>", 23);
STRING_LITERAL(TMP2446, "$2\\label{$1}", 12);
STRING_LITERAL(TMP2447, "<tt class=\"docutils literal\"><span class=\"pre\">$1</span></tt>", 61);
STRING_LITERAL(TMP2448, "\\texttt{$1}", 11);
STRING_LITERAL(TMP2449, "<img src=\"$1\" width=\"15\" \012        height=\"17\" hspace=\"2\" vspace"
"=\"2\" class=\"smiley\" />", 85);
STRING_LITERAL(TMP2450, "\\includegraphics{$1}", 20);
STRING_LITERAL(TMP2451, "doc.smiley_format", 17);
STRING_LITERAL(TMP4629, ".nim", 4);
STRING_LITERAL(TMP4630, "Module ", 7);
STRING_LITERAL(TMP4631, "split.item.toc", 14);
STRING_LITERAL(TMP4704, "<li><a class=\"reference\" id=\"$1_toc\" href=\"#$1\">$2</a></li>\012", 60);
STRING_LITERAL(TMP4705, "\\item\\label{$1_toc} $2\\ref{$1}\012", 31);
STRING_LITERAL(TMP4706, "<ul class=\"simple\">$1</ul>", 26);
STRING_LITERAL(TMP4707, "\\begin{enumerate}$1\\end{enumerate}", 34);
STRING_LITERAL(TMP4785, ".", 1);
STRING_LITERAL(TMP4786, "..", 2);
STRING_LITERAL(TMP4787, ".idx", 4);
STRING_LITERAL(TMP4788, "doc_toc_", 8);
STRING_LITERAL(TMP4792, "Documents: ", 11);
STRING_LITERAL(TMP4796, "<a href=\"", 9);
STRING_LITERAL(TMP4797, "\">", 2);
STRING_LITERAL(TMP4798, "</a>", 4);
STRING_LITERAL(TMP4799, ", ", 2);
STRING_LITERAL(TMP4800, ".<br>", 5);
STRING_LITERAL(TMP4801, "<p />", 5);
STRING_LITERAL(TMP4802, "Modules: ", 9);
STRING_LITERAL(TMP4803, ".html\">", 7);
STRING_LITERAL(TMP4804, "<h2>Documentation files</h2>\012", 29);
STRING_LITERAL(TMP4808, "<ul>\012", 5);
STRING_LITERAL(TMP4809, "<ul>", 4);
STRING_LITERAL(TMP4810, "</ul>", 5);
STRING_LITERAL(TMP4811, "<li><a href=\"", 13);
STRING_LITERAL(TMP4812, "</a>\012", 5);
STRING_LITERAL(TMP4813, "</ul>\012", 6);
STRING_LITERAL(TMP4814, "<ul><li><a href=\"", 17);
STRING_LITERAL(TMP4815, "<h2>API symbols</h2>\012", 21);
STRING_LITERAL(TMP4816, "<dt><span>$1:</span></dt><ul class=\"simple\"><dd>\012", 49);
STRING_LITERAL(TMP4817, "<li><a class=\"reference external\"\012          title=\"$3\" href=\"$1"
"\">$2</a></li>\012          ", 87);
STRING_LITERAL(TMP4818, "<li><a class=\"reference external\" href=\"$1\">$2</a></li>\012       "
"   ", 66);
STRING_LITERAL(TMP4819, "</ul></dd>\012", 11);
NimStringDesc* splitter_358332;
extern tgcheap47216 gch_47244;
extern TNimType NTI352023; /* TGeneralTokenizer */
extern TNimType NTI3211; /* RootObj */
TNimType NTI358016; /* TRstGenerator */
TNimType NTI358010; /* TOutputTarget */
extern TNimType NTI131014; /* StringTableRef */
extern TNimType NTI108; /* int */
TNimType NTI358012; /* TTocEntry */
extern TNimType NTI342007; /* PRstNode */
extern TNimType NTI149; /* string */
TNimType NTI358034; /* seq[TTocEntry] */
extern TNimType NTI138; /* bool */
extern TNimType NTI343015; /* TRstParseOptions */
extern TNimType NTI343023; /* TFindFileHandler */
extern TNimType NTI343021; /* TMsgHandler */
TNimType NTI358042; /* array[TMetaEnum, string] */
extern TNimType NTI358052; /* Table */
extern TNimType NTI120008; /* seq[string] */
TNimType NTI359264; /* TIndexEntry */
TNimType NTI361804; /* seq[TIndexEntry] */
extern TNimType NTI359280; /* KeyValuePairSeq */
TNimType NTI359880; /* tuple[level: int, text: string] */
TNimType NTI359879; /* seq[tuple[level: int, text: string]] */

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

static N_INLINE(void, rtladdzct_50404)(tcell45133* c) {
	addzct_48817((&gch_47244.Zct), c);
}

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

N_NIMCALL(void, renderaux_358589)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	{
		NI i_358607;
		NI HEX3Atmp_358609;
		NI LOC2;
		NI res_358612;
		i_358607 = 0;
		HEX3Atmp_358609 = 0;
		LOC2 = 0;
		LOC2 = len_342084(n);
		HEX3Atmp_358609 = (NI64)(LOC2 - 1);
		res_358612 = 0;
		{
			while (1) {
				if (!(res_358612 <= HEX3Atmp_358609)) goto LA4;
				i_358607 = res_358612;
				renderrsttoout_358579(d, (*n).Sons->data[i_358607], result);
				res_358612 += 1;
			} LA4: ;
		}
	}
}

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

N_NIMCALL(void, dispa_358544)(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_358690)(NimStringDesc* text) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuReplaceStr(text, ((NimStringDesc*) &TMP2115), ((NimStringDesc*) &TMP2116));
	LOC2 = 0;
	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &TMP2117), ((NimStringDesc*) &TMP2118));
	result = nsuReplaceStr(LOC2, ((NimStringDesc*) &TMP2119), ((NimStringDesc*) &TMP2120));
	return result;
}

N_NIMCALL(void, setindexterm_358710)(trstgenerator358016* 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*) &TMP2114));
	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_358690(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_358690(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*) &TMP2117));
	{
		if (!istitle) goto LA19;
		insert_86001((&(*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_364260)(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_364281)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	NimStringDesc* tmp;
	NimStringDesc* refname;
	NimStringDesc* LOC14;
	NimStringDesc* LOC15;
	NimStringDesc* LOC16;
	tmp = copyString(((NimStringDesc*) &TMP2109));
	{
		NI i_364300;
		NI HEX3Atmp_364405;
		NI LOC2;
		NI res_364408;
		i_364300 = 0;
		HEX3Atmp_364405 = 0;
		LOC2 = 0;
		LOC2 = len_342084(n);
		HEX3Atmp_364405 = (NI64)(LOC2 - 1);
		res_364408 = 0;
		{
			while (1) {
				if (!(res_364408 <= HEX3Atmp_364405)) goto LA4;
				i_364300 = res_364408;
				renderrsttoout_358579(d, (*n).Sons->data[i_364300], (&tmp));
				res_364408 += 1;
			} LA4: ;
		}
	}
	unsureAsgnRef((void**) (&(*d).Currentsection), copyString(tmp));
	refname = rstnodetorefname_343061(n);
	{
		NI length;
		NimStringDesc* LOC9;
		NimStringDesc* LOC10;
		TY197620 LOC11;
		if (!(*d).Hastoc) goto LA7;
		length = (*d).Tocpart->Sup.len;
		(*d).Tocpart = (TY358034*) setLengthSeq(&((*d).Tocpart)->Sup, sizeof(ttocentry358012), (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_358544((*d).Target, result, ((NimStringDesc*) &TMP2111), ((NimStringDesc*) &TMP2112), LOC11, 4);
	}
	goto LA5;
	LA7: ;
	{
		TY197620 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_358544((*d).Target, result, ((NimStringDesc*) &TMP2113), ((NimStringDesc*) &TMP2112), LOC13, 4);
	}
	LA5: ;
	LOC14 = 0;
	LOC14 = striptochtml_364260(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_358710(d, refname, LOC14, LOC15, ((NimStringDesc*) &TMP2109));
}

N_NIMCALL(void, renderoverline_364425)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	{
		if (!((*d).Meta[(((NU8) 1))- 0]->Sup.len == 0)) goto LA3;
		{
			NI i_364443;
			NI HEX3Atmp_364488;
			NI LOC6;
			NI res_364491;
			i_364443 = 0;
			HEX3Atmp_364488 = 0;
			LOC6 = 0;
			LOC6 = len_342084(n);
			HEX3Atmp_364488 = (NI64)(LOC6 - 1);
			res_364491 = 0;
			{
				while (1) {
					if (!(res_364491 <= HEX3Atmp_364488)) goto LA8;
					i_364443 = res_364491;
					renderrsttoout_358579(d, (*n).Sons->data[i_364443], (&(*d).Meta[(((NU8) 1))- 0]));
					res_364491 += 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_364457;
			NI HEX3Atmp_364494;
			NI LOC13;
			NI res_364497;
			i_364457 = 0;
			HEX3Atmp_364494 = 0;
			LOC13 = 0;
			LOC13 = len_342084(n);
			HEX3Atmp_364494 = (NI64)(LOC13 - 1);
			res_364497 = 0;
			{
				while (1) {
					if (!(res_364497 <= HEX3Atmp_364494)) goto LA15;
					i_364457 = res_364497;
					renderrsttoout_358579(d, (*n).Sons->data[i_364457], (&(*d).Meta[(((NU8) 2))- 0]));
					res_364497 += 1;
				} LA15: ;
			}
		}
		unsureAsgnRef((void**) (&(*d).Currentsection), copyString((*d).Meta[(((NU8) 2))- 0]));
	}
	goto LA1;
	LA10: ;
	{
		NimStringDesc* tmp;
		TY197620 LOC21;
		tmp = copyString(((NimStringDesc*) &TMP2109));
		{
			NI i_364472;
			NI HEX3Atmp_364500;
			NI LOC18;
			NI res_364503;
			i_364472 = 0;
			HEX3Atmp_364500 = 0;
			LOC18 = 0;
			LOC18 = len_342084(n);
			HEX3Atmp_364500 = (NI64)(LOC18 - 1);
			res_364503 = 0;
			{
				while (1) {
					if (!(res_364503 <= HEX3Atmp_364500)) goto LA20;
					i_364472 = res_364503;
					renderrsttoout_358579(d, (*n).Sons->data[i_364472], (&tmp));
					res_364503 += 1;
				} LA20: ;
			}
		}
		unsureAsgnRef((void**) (&(*d).Currentsection), copyString(tmp));
		memset((void*)LOC21, 0, sizeof(LOC21));
		LOC21[0] = nimIntToStr((*n).Level);
		LOC21[1] = rstnodetorefname_343061(n);
		LOC21[2] = copyString(tmp);
		LOC21[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI64)((NI64)((*n).Level - 1) + 65))))));
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2121), ((NimStringDesc*) &TMP2122), LOC21, 4);
	}
	LA1: ;
}

N_NIMCALL(void, renderaux_358629)(trstgenerator358016* d, trstnode342011* n, NimStringDesc* frmta, NimStringDesc* frmtb, NimStringDesc** result) {
	NimStringDesc* tmp;
	tmp = copyString(((NimStringDesc*) &TMP2109));
	{
		NI i_358650;
		NI HEX3Atmp_358670;
		NI LOC2;
		NI res_358673;
		i_358650 = 0;
		HEX3Atmp_358670 = 0;
		LOC2 = 0;
		LOC2 = len_342084(n);
		HEX3Atmp_358670 = (NI64)(LOC2 - 1);
		res_358673 = 0;
		{
			while (1) {
				if (!(res_358673 <= HEX3Atmp_358670)) goto LA4;
				i_358650 = res_358673;
				renderrsttoout_358579(d, (*n).Sons->data[i_358650], (&tmp));
				res_358673 += 1;
			} LA4: ;
		}
	}
	{
		TY197301 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: ;
	{
		TY197301 LOC11;
		memset((void*)LOC11, 0, sizeof(LOC11));
		LOC11[0] = copyString(tmp);
		nsuAddf(result, frmtb, LOC11, 1);
	}
	LA5: ;
}

N_NIMCALL(NI, nextsplitpoint_358349)(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_358299)(NimStringDesc** dest, NIM_CHAR c) {
	switch (((NU8)(c))) {
	case 38:
	{
		(*dest) = resizeString((*dest), 5);
appendString((*dest), ((NimStringDesc*) &TMP2141));
	}
	break;
	case 60:
	{
		(*dest) = resizeString((*dest), 4);
appendString((*dest), ((NimStringDesc*) &TMP2142));
	}
	break;
	case 62:
	{
		(*dest) = resizeString((*dest), 4);
appendString((*dest), ((NimStringDesc*) &TMP2143));
	}
	break;
	case 34:
	{
		(*dest) = resizeString((*dest), 6);
appendString((*dest), ((NimStringDesc*) &TMP2144));
	}
	break;
	default:
	{
		(*dest) = addChar((*dest), c);
	}
	break;
	}
}

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

static N_INLINE(void, escchar_358337)(NU8 target, NimStringDesc** dest, NIM_CHAR c) {
	switch (target) {
	case ((NU8) 0):
	{
		addxmlchar_358299(dest, c);
	}
	break;
	case ((NU8) 1):
	{
		addtexchar_358321(dest, c);
	}
	break;
	}
}

N_NIMCALL(NimStringDesc*, esc_358407)(NU8 target, NimStringDesc* s, NI splitafter) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2109));
	{
		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_358349(s, j);
				{
					NIM_BOOL LOC9;
					LOC9 = 0;
					LOC9 = !(eqStrings(splitter_358332, ((NimStringDesc*) &TMP2140)));
					if (LOC9) goto LA10;
					LOC9 = (splitafter < (NI64)((NI64)((NI64)(partlen + k) - j) + 1));
					LA10: ;
					if (!LOC9) goto LA11;
					partlen = 0;
					result = resizeString(result, splitter_358332->Sup.len + 0);
appendString(result, splitter_358332);
				}
				LA11: ;
				{
					NI i_358430;
					NI res_358462;
					i_358430 = 0;
					res_358462 = j;
					{
						while (1) {
							if (!(res_358462 <= k)) goto LA15;
							i_358430 = res_358462;
							escchar_358337(target, (&result), s->data[i_358430]);
							res_358462 += 1;
						} LA15: ;
					}
				}
				partlen += (NI64)((NI64)(k - j) + 1);
				j = (NI64)(k + 1);
			} LA6: ;
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_358456;
			NI HEX3Atmp_358465;
			NI res_358468;
			i_358456 = 0;
			HEX3Atmp_358465 = 0;
			HEX3Atmp_358465 = (NI64)(s->Sup.len - 1);
			res_358468 = 0;
			{
				while (1) {
					if (!(res_358468 <= HEX3Atmp_358465)) goto LA19;
					i_358456 = res_358468;
					escchar_358337(target, (&result), s->data[i_358456]);
					res_358468 += 1;
				} LA19: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, renderfield_366327)(trstgenerator358016* d, trstnode342011* 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_343067((*n).Sons->data[0]);
		LOC5 = 0;
		LOC5 = addnodes_343067((*n).Sons->data[1]);
		LOC6 = 0;
		LOC6 = nsuStrip(LOC5, NIM_TRUE, NIM_TRUE);
		fieldval = esc_358407((*d).Target, LOC6, -1);
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC12;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = nsuCmpIgnoreStyle(fieldname, ((NimStringDesc*) &TMP2159));
			LOC9 = (LOC10 == 0);
			if (LOC9) goto LA11;
			LOC12 = 0;
			LOC12 = nsuCmpIgnoreStyle(fieldname, ((NimStringDesc*) &TMP2160));
			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*) &TMP2161));
			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_358629(d, n, ((NimStringDesc*) &TMP2162), ((NimStringDesc*) &TMP2163), result);
	}
	LA29: ;
}

N_NIMCALL(NimStringDesc*, texcolumns_366289)(trstnode342011* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2109));
	{
		NI i_366305;
		NI HEX3Atmp_366307;
		NI res_366310;
		i_366305 = 0;
		HEX3Atmp_366307 = 0;
		HEX3Atmp_366307 = len_342084(n);
		res_366310 = 1;
		{
			while (1) {
				if (!(res_366310 <= HEX3Atmp_366307)) goto LA3;
				i_366305 = res_366310;
				result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2184));
				res_366310 += 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(NimStringDesc*, dispf_358521)(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_364598)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	NimStringDesc* options;
	NimStringDesc* s;
	NimStringDesc* arg;
	options = copyString(((NimStringDesc*) &TMP2109));
	s = getfieldvalue_343073(n, ((NimStringDesc*) &TMP2199));
	{
		NIM_BOOL LOC3;
		TY197301 LOC7;
		LOC3 = 0;
		LOC3 = (0 < s->Sup.len);
		if (!(LOC3)) goto LA4;
		LOC3 = allcharsinset_96479(s, TMP2200);
		LA4: ;
		if (!LOC3) goto LA5;
		memset((void*)LOC7, 0, sizeof(LOC7));
		LOC7[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_358544((*d).Target, (&options), ((NimStringDesc*) &TMP2201), ((NimStringDesc*) &TMP2202), LOC7, 1);
	}
	LA5: ;
	s = getfieldvalue_343073(n, ((NimStringDesc*) &TMP2203));
	{
		NIM_BOOL LOC10;
		TY197301 LOC14;
		LOC10 = 0;
		LOC10 = (0 < s->Sup.len);
		if (!(LOC10)) goto LA11;
		LOC10 = allcharsinset_96479(s, TMP2200);
		LA11: ;
		if (!LOC10) goto LA12;
		memset((void*)LOC14, 0, sizeof(LOC14));
		LOC14[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_358544((*d).Target, (&options), ((NimStringDesc*) &TMP2204), ((NimStringDesc*) &TMP2205), LOC14, 1);
	}
	LA12: ;
	s = getfieldvalue_343073(n, ((NimStringDesc*) &TMP2206));
	{
		NIM_BOOL LOC17;
		TY197301 LOC21;
		LOC17 = 0;
		LOC17 = (0 < s->Sup.len);
		if (!(LOC17)) goto LA18;
		LOC17 = allcharsinset_96479(s, TMP2200);
		LA18: ;
		if (!LOC17) goto LA19;
		memset((void*)LOC21, 0, sizeof(LOC21));
		LOC21[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_358544((*d).Target, (&options), ((NimStringDesc*) &TMP2207), ((NimStringDesc*) &TMP2208), LOC21, 1);
	}
	LA19: ;
	s = getfieldvalue_343073(n, ((NimStringDesc*) &TMP2209));
	{
		NIM_BOOL LOC24;
		TY197301 LOC28;
		LOC24 = 0;
		LOC24 = (0 < s->Sup.len);
		if (!(LOC24)) goto LA25;
		LOC24 = allcharsinset_96479(s, TMP2200);
		LA25: ;
		if (!LOC24) goto LA26;
		memset((void*)LOC28, 0, sizeof(LOC28));
		LOC28[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_358544((*d).Target, (&options), ((NimStringDesc*) &TMP2210), ((NimStringDesc*) &TMP2109), LOC28, 1);
	}
	LA26: ;
	s = getfieldvalue_343073(n, ((NimStringDesc*) &TMP2211));
	{
		NIM_BOOL LOC31;
		TY197301 LOC35;
		LOC31 = 0;
		LOC31 = (0 < s->Sup.len);
		if (!(LOC31)) goto LA32;
		LOC31 = allcharsinset_96479(s, TMP2200);
		LA32: ;
		if (!LOC31) goto LA33;
		memset((void*)LOC35, 0, sizeof(LOC35));
		LOC35[0] = nsuStrip(s, NIM_TRUE, NIM_TRUE);
		dispa_358544((*d).Target, (&options), ((NimStringDesc*) &TMP2212), ((NimStringDesc*) &TMP2109), LOC35, 1);
	}
	LA33: ;
	{
		TY197301 LOC40;
		if (!(0 < options->Sup.len)) goto LA38;
		memset((void*)LOC40, 0, sizeof(LOC40));
		LOC40[0] = copyString(options);
		options = dispf_358521((*d).Target, ((NimStringDesc*) &TMP2163), ((NimStringDesc*) &TMP2213), LOC40, 1);
	}
	LA38: ;
	arg = getargument_343080(n);
	{
		NIM_BOOL LOC43;
		TY169969 LOC47;
		LOC43 = 0;
		LOC43 = (0 < arg->Sup.len);
		if (!(LOC43)) goto LA44;
		LOC43 = allcharsinset_96479(arg, TMP2200);
		LA44: ;
		if (!LOC43) goto LA45;
		memset((void*)LOC47, 0, sizeof(LOC47));
		LOC47[0] = copyString(arg);
		LOC47[1] = copyString(options);
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2214), ((NimStringDesc*) &TMP2215), LOC47, 2);
	}
	LA45: ;
	{
		NI LOC50;
		LOC50 = 0;
		LOC50 = len_342084(n);
		if (!(3 <= LOC50)) goto LA51;
		renderrsttoout_358579(d, (*n).Sons->data[2], result);
	}
	LA51: ;
}

N_NIMCALL(void, init_358078)(codeblockparams358020* p) {
	(*p).Startline = 1;
	(*p).Lang = ((NU8) 0);
	unsureAsgnRef((void**) (&(*p).Langstr), copyString(((NimStringDesc*) &TMP2109)));
}

N_NIMCALL(void, parsecodeblockfield_364991)(trstgenerator358016* d, trstnode342011* n, codeblockparams358020* params) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	LOC1 = 0;
	LOC1 = getargument_343080(n);
	LOC2 = 0;
	LOC2 = nsuToLowerStr(LOC1);
	if (eqStrings(LOC2, ((NimStringDesc*) &TMP2216))) goto LA3;
	if (eqStrings(LOC2, ((NimStringDesc*) &TMP2217))) goto LA4;
	if (eqStrings(LOC2, ((NimStringDesc*) &TMP2218))) goto LA5;
	goto LA6;
	LA3: ;
	{
		NI number;
		(*params).Numberlines = NIM_TRUE;
		number = 0;
		{
			NimStringDesc* LOC11;
			NI LOC12;
			LOC11 = 0;
			LOC11 = getfieldvalue_346823(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_346823(n);
		unsureAsgnRef((void**) (&(*params).Langstr), nsuStrip(LOC17, NIM_TRUE, NIM_TRUE));
		(*params).Lang = getsourcelanguage_352093((*params).Langstr);
	}
	goto LA7;
	LA6: ;
	{
		NimStringDesc* LOC19;
		LOC19 = 0;
		LOC19 = getargument_343080(n);
		(*d).Msghandler((*d).Filename, 1, 0, ((NU8) 9), LOC19);
	}
	LA7: ;
}

N_NIMCALL(void, parsecodeblockparams_365007)(trstgenerator358016* d, trstnode342011* n, codeblockparams358020* Result) {
	NimStringDesc* LOC12;
	init_358078(Result);
	{
		if (!n == 0) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((*n).Sons->data[1] == 0)) goto LA7;
		{
			trstnode342011* son_365611;
			trstnodeseq342009* HEX3Atmp_365614;
			NI i_365617;
			NI l_365619;
			son_365611 = 0;
			HEX3Atmp_365614 = 0;
			HEX3Atmp_365614 = (*(*n).Sons->data[1]).Sons;
			i_365617 = 0;
			l_365619 = HEX3Atmp_365614->Sup.len;
			{
				while (1) {
					if (!(i_365617 < l_365619)) goto LA11;
					son_365611 = HEX3Atmp_365614->data[i_365617];
					parsecodeblockfield_364991(d, son_365611, Result);
					i_365617 += 1;
				} LA11: ;
			}
		}
	}
	LA7: ;
	LOC12 = 0;
	LOC12 = getargument_343080(n);
	unsureAsgnRef((void**) (&(*Result).Langstr), nsuStrip(LOC12, NIM_TRUE, NIM_TRUE));
	{
		if (!!((((*Result).Langstr) && ((*Result).Langstr)->Sup.len == 0))) goto LA15;
		(*Result).Lang = getsourcelanguage_352093((*Result).Langstr);
	}
	LA15: ;
	BeforeRet: ;
}

N_NIMCALL(void, buildlineshtmltable_365635)(codeblockparams358020* params, NimStringDesc* code, keyvaluepair131008* Result) {
	NI codelines;
	NimStringDesc* LOC5;
	NI LOC6;
	NI line;
	{
		if (!!((*params).Numberlines)) goto LA3;
		unsureAsgnRef((void**) (&(*Result).Field0), copyString(TMP2226.Field0));
		unsureAsgnRef((void**) (&(*Result).Field1), copyString(TMP2226.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*) &TMP2229)));
	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*) &TMP2117));
			(*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*) &TMP2230));
	unsureAsgnRef((void**) (&(*Result).Field1), copyString(((NimStringDesc*) &TMP2231)));
	BeforeRet: ;
}

N_NIMCALL(void, rendercodeblock_365840)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	codeblockparams358020 params;
	trstnode342011* m;
	keyvaluepair131008 LOC5;
	NimStringDesc* blockstart;
	NimStringDesc* blockend;
	TY260532 LOC6;
	TY260532 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_365007(d, n, (&params));
	m = (*(*n).Sons->data[2]).Sons->data[0];
	memset((void*)(&LOC5), 0, sizeof(LOC5));
	buildlineshtmltable_365635((&params), (*m).Text, (&LOC5));
	blockstart = 0;
	blockstart = LOC5.Field0;
	blockend = 0;
	blockend = LOC5.Field1;
	memset((void*)LOC6, 0, sizeof(LOC6));
	dispa_358544((*d).Target, result, blockstart, ((NimStringDesc*) &TMP2232), 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_366220;
			NimStringDesc* HEX3Atmp_366237;
			NI i_366240;
			NI l_366242;
			letter_366220 = 0;
			HEX3Atmp_366237 = 0;
			HEX3Atmp_366237 = (*m).Text;
			i_366240 = 0;
			l_366242 = HEX3Atmp_366237->Sup.len;
			{
				while (1) {
					if (!(i_366240 < l_366242)) goto LA17;
					letter_366220 = HEX3Atmp_366237->data[i_366240];
					escchar_358337((*d).Target, result, letter_366220);
					i_366240 += 1;
				} LA17: ;
			}
		}
	}
	goto LA7;
	LA9: ;
	{
		tgeneraltokenizer352023 g;
		memset((void*)(&g), 0, sizeof(g));
		g.Sup.m_type = (&NTI352023);
		initgeneraltokenizer_352229((&g), (*m).Text);
		{
			while (1) {
				getnexttoken_355166((&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:
				{
					TY169969 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_358407((*d).Target, LOC26, -1);
					LOC25[1] = copyString(tokenclasstostr_352081[(g.Kind)- 0]);
					dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2393), ((NimStringDesc*) &TMP2394), LOC25, 2);
				}
				break;
				}
			}
		} LA19: ;
		deinitgeneraltokenizer_352240((&g));
	}
	LA7: ;
	memset((void*)LOC27, 0, sizeof(LOC27));
	dispa_358544((*d).Target, result, blockend, ((NimStringDesc*) &TMP2428), LOC27, 0);
	BeforeRet: ;
}

N_NIMCALL(void, rendercontainer_366266)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	NimStringDesc* tmp;
	NimStringDesc* arg;
	NimStringDesc* LOC1;
	tmp = copyString(((NimStringDesc*) &TMP2109));
	renderrsttoout_358579(d, (*n).Sons->data[2], (&tmp));
	LOC1 = 0;
	LOC1 = getargument_343080(n);
	arg = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE);
	{
		TY197301 LOC6;
		if (!((arg) && (arg)->Sup.len == 0)) goto LA4;
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = copyString(tmp);
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2429), ((NimStringDesc*) &TMP2163), LOC6, 1);
	}
	goto LA2;
	LA4: ;
	{
		TY169969 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(arg);
		LOC8[1] = copyString(tmp);
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2430), ((NimStringDesc*) &TMP2431), LOC8, 2);
	}
	LA2: ;
}

N_NIMCALL(void, renderindexterm_358871)(trstgenerator358016* d, trstnode342011* n_358874, NimStringDesc** result) {
	NimStringDesc* refname;
	NimStringDesc* id;
	NimStringDesc* LOC8;
	NI LOC9;
	NimStringDesc* LOC10;
	NimStringDesc* term;
	TY169969 LOC11;
	refname = rstnodetorefname_343061(n_358874);
	{
		NIM_BOOL LOC3;
		NI LOC6;
		LOC3 = 0;
		LOC3 = haskey_358880((*d).Seenindexterms, refname);
		if (!LOC3) goto LA4;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_358943((*d).Seenindexterms, refname);
		HEX5BHEX5DHEX3D_358974((&(*d).Seenindexterms), refname, (NI64)(LOC6 + 1));
	}
	goto LA1;
	LA4: ;
	{
		HEX5BHEX5DHEX3D_358974((&(*d).Seenindexterms), refname, 1);
	}
	LA1: ;
	LOC8 = 0;
	LOC9 = 0;
	LOC9 = HEX5BHEX5D_358943((*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*) &TMP2109));
	renderaux_358589(d, n_358874, (&term));
	setindexterm_358710(d, id, term, (*d).Currentsection, ((NimStringDesc*) &TMP2109));
	memset((void*)LOC11, 0, sizeof(LOC11));
	LOC11[0] = copyString(id);
	LOC11[1] = copyString(term);
	dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2445), ((NimStringDesc*) &TMP2446), LOC11, 2);
}

N_NIMCALL(void, rendersmiley_364975)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	TY197301 LOC1;
	NimStringDesc* LOC2;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC2 = 0;
	LOC2 = nstGet((*d).Config, ((NimStringDesc*) &TMP2451));
	LOC1[0] = nsuFormatSingleElem(LOC2, (*n).Text);
	dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2449), ((NimStringDesc*) &TMP2450), LOC1, 1);
}

N_NIMCALL(void, renderrsttoout_358579)(trstgenerator358016* d, trstnode342011* n, NimStringDesc** result) {
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 0):
	{
		renderaux_358589(d, n, result);
	}
	break;
	case ((NU8) 1):
	{
		renderheadline_364281(d, n, result);
	}
	break;
	case ((NU8) 2):
	{
		renderoverline_364425(d, n, result);
	}
	break;
	case ((NU8) 3):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2123), ((NimStringDesc*) &TMP2124), result);
	}
	break;
	case ((NU8) 4):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2125), ((NimStringDesc*) &TMP2126), result);
	}
	break;
	case ((NU8) 5):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2127), ((NimStringDesc*) &TMP2128), result);
	}
	break;
	case ((NU8) 6):
	case ((NU8) 8):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2129), ((NimStringDesc*) &TMP2130), result);
	}
	break;
	case ((NU8) 7):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2131), ((NimStringDesc*) &TMP2132), result);
	}
	break;
	case ((NU8) 9):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2133), ((NimStringDesc*) &TMP2134), result);
	}
	break;
	case ((NU8) 10):
	{
		renderaux_358589(d, n, result);
	}
	break;
	case ((NU8) 11):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2135), ((NimStringDesc*) &TMP2136), result);
	}
	break;
	case ((NU8) 12):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2137), ((NimStringDesc*) &TMP2138), result);
	}
	break;
	case ((NU8) 13):
	{
		NimStringDesc* tmp;
		tmp = copyString(((NimStringDesc*) &TMP2109));
		{
			NI i_366387;
			NI HEX3Atmp_366457;
			NI LOC19;
			NI res_366460;
			i_366387 = 0;
			HEX3Atmp_366457 = 0;
			LOC19 = 0;
			LOC19 = len_342084(n);
			HEX3Atmp_366457 = (NI64)(LOC19 - 1);
			res_366460 = 0;
			{
				while (1) {
					if (!(res_366460 <= HEX3Atmp_366457)) goto LA21;
					i_366387 = res_366460;
					renderrsttoout_358579(d, (*n).Sons->data[i_366387], (&tmp));
					res_366460 += 1;
				} LA21: ;
			}
		}
		{
			TY197301 LOC26;
			if (!!((tmp->Sup.len == 0))) goto LA24;
			memset((void*)LOC26, 0, sizeof(LOC26));
			LOC26[0] = copyString(tmp);
			dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2139), ((NimStringDesc*) &TMP2134), LOC26, 1);
		}
		LA24: ;
	}
	break;
	case ((NU8) 14):
	{
		renderfield_366327(d, n, result);
	}
	break;
	case ((NU8) 15):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2164), ((NimStringDesc*) &TMP2165), result);
	}
	break;
	case ((NU8) 16):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2166), ((NimStringDesc*) &TMP2167), result);
	}
	break;
	case ((NU8) 51):
	{
		renderrsttoout_358579(d, (*n).Sons->data[2], result);
	}
	break;
	case ((NU8) 17):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2168), ((NimStringDesc*) &TMP2169), result);
	}
	break;
	case ((NU8) 18):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2162), ((NimStringDesc*) &TMP2163), result);
	}
	break;
	case ((NU8) 19):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2170), ((NimStringDesc*) &TMP2171), result);
	}
	break;
	case ((NU8) 23):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2172), ((NimStringDesc*) &TMP2167), result);
	}
	break;
	case ((NU8) 20):
	case ((NU8) 21):
	case ((NU8) 22):
	{
		{
			if (!NIM_TRUE) goto LA38;
			raiseassert_84957(((NimStringDesc*) &TMP2174));
		}
		LA38: ;
	}
	break;
	case ((NU8) 24):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2175), ((NimStringDesc*) &TMP2176), result);
	}
	break;
	case ((NU8) 25):
	{
		{
			if (!NIM_TRUE) goto LA44;
			raiseassert_84957(((NimStringDesc*) &TMP2174));
		}
		LA44: ;
	}
	break;
	case ((NU8) 26):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2177), ((NimStringDesc*) &TMP2126), result);
	}
	break;
	case ((NU8) 27):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2178), ((NimStringDesc*) &TMP2179), result);
	}
	break;
	case ((NU8) 28):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2180), ((NimStringDesc*) &TMP2181), result);
	}
	break;
	case ((NU8) 29):
	case ((NU8) 30):
	{
		NimStringDesc* LOC50;
		NimStringDesc* LOC51;
		LOC50 = 0;
		LOC51 = 0;
		LOC51 = texcolumns_366289(n);
		LOC50 = rawNewString(LOC51->Sup.len + 63);
appendString(LOC50, ((NimStringDesc*) &TMP2183));
appendString(LOC50, LOC51);
appendString(LOC50, ((NimStringDesc*) &TMP2185));
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2182), LOC50, result);
	}
	break;
	case ((NU8) 31):
	{
		{
			NI LOC55;
			LOC55 = 0;
			LOC55 = len_342084(n);
			if (!(1 <= LOC55)) goto LA56;
			{
				if (!((*d).Target == ((NU8) 1))) goto LA60;
				renderrsttoout_358579(d, (*n).Sons->data[0], result);
				{
					NI i_366414;
					NI HEX3Atmp_366463;
					NI LOC63;
					NI res_366466;
					i_366414 = 0;
					HEX3Atmp_366463 = 0;
					LOC63 = 0;
					LOC63 = len_342084(n);
					HEX3Atmp_366463 = (NI64)(LOC63 - 1);
					res_366466 = 1;
					{
						while (1) {
							if (!(res_366466 <= HEX3Atmp_366463)) goto LA65;
							i_366414 = res_366466;
							(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP2186));
							renderrsttoout_358579(d, (*n).Sons->data[i_366414], result);
							res_366466 += 1;
						} LA65: ;
					}
				}
				(*result) = resizeString((*result), 10);
appendString((*result), ((NimStringDesc*) &TMP2187));
			}
			goto LA58;
			LA60: ;
			{
				(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TMP2188));
				renderaux_358589(d, n, result);
				(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TMP2189));
			}
			LA58: ;
		}
		LA56: ;
	}
	break;
	case ((NU8) 33):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2166), ((NimStringDesc*) &TMP2163), result);
	}
	break;
	case ((NU8) 32):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2190), ((NimStringDesc*) &TMP2191), result);
	}
	break;
	case ((NU8) 34):
	{
		{
			if (!NIM_TRUE) goto LA72;
			raiseassert_84957(((NimStringDesc*) &TMP2174));
		}
		LA72: ;
	}
	break;
	case ((NU8) 35):
	{
		{
			if (!NIM_TRUE) goto LA77;
			raiseassert_84957(((NimStringDesc*) &TMP2174));
		}
		LA77: ;
	}
	break;
	case ((NU8) 36):
	{
		{
			if (!NIM_TRUE) goto LA82;
			raiseassert_84957(((NimStringDesc*) &TMP2174));
		}
		LA82: ;
	}
	break;
	case ((NU8) 39):
	{
		NimStringDesc* tmp;
		TY169969 LOC85;
		tmp = copyString(((NimStringDesc*) &TMP2109));
		renderaux_358589(d, n, (&tmp));
		memset((void*)LOC85, 0, sizeof(LOC85));
		LOC85[0] = copyString(tmp);
		LOC85[1] = rstnodetorefname_343061(n);
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2192), ((NimStringDesc*) &TMP2193), LOC85, 2);
	}
	break;
	case ((NU8) 37):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2194), ((NimStringDesc*) &TMP2195), result);
	}
	break;
	case ((NU8) 38):
	{
		NimStringDesc* tmp0;
		NimStringDesc* tmp1;
		TY169969 LOC88;
		tmp0 = copyString(((NimStringDesc*) &TMP2109));
		tmp1 = copyString(((NimStringDesc*) &TMP2109));
		renderrsttoout_358579(d, (*n).Sons->data[0], (&tmp0));
		renderrsttoout_358579(d, (*n).Sons->data[1], (&tmp1));
		memset((void*)LOC88, 0, sizeof(LOC88));
		LOC88[0] = copyString(tmp0);
		LOC88[1] = copyString(tmp1);
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2196), ((NimStringDesc*) &TMP2197), LOC88, 2);
	}
	break;
	case ((NU8) 41):
	case ((NU8) 42):
	{
		renderaux_358589(d, n, result);
	}
	break;
	case ((NU8) 48):
	{
		{
			trstnode342011* LOC95;
			NimStringDesc* LOC96;
			if (!!(((*d).Target == ((NU8) 1)))) goto LA93;
			LOC95 = 0;
			LOC95 = lastson_342162(n);
			LOC96 = 0;
			LOC96 = addnodes_343067(LOC95);
			(*result) = resizeString((*result), LOC96->Sup.len + 0);
appendString((*result), LOC96);
		}
		LA93: ;
	}
	break;
	case ((NU8) 49):
	{
		{
			trstnode342011* LOC102;
			NimStringDesc* LOC103;
			if (!((*d).Target == ((NU8) 1))) goto LA100;
			LOC102 = 0;
			LOC102 = lastson_342162(n);
			LOC103 = 0;
			LOC103 = addnodes_343067(LOC102);
			(*result) = resizeString((*result), LOC103->Sup.len + 0);
appendString((*result), LOC103);
		}
		LA100: ;
	}
	break;
	case ((NU8) 45):
	case ((NU8) 46):
	{
		renderimage_364598(d, n, result);
	}
	break;
	case ((NU8) 47):
	{
		rendercodeblock_365840(d, n, result);
	}
	break;
	case ((NU8) 50):
	{
		rendercontainer_366266(d, n, result);
	}
	break;
	case ((NU8) 62):
	case ((NU8) 52):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2432), ((NimStringDesc*) &TMP2432), result);
	}
	break;
	case ((NU8) 40):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2109), ((NimStringDesc*) &TMP2109), result);
	}
	break;
	case ((NU8) 53):
	{
		NimStringDesc* tmp0;
		NimStringDesc* tmp1;
		TY169969 LOC110;
		tmp0 = copyString(((NimStringDesc*) &TMP2109));
		tmp1 = copyString(((NimStringDesc*) &TMP2109));
		renderrsttoout_358579(d, (*n).Sons->data[0], (&tmp0));
		renderrsttoout_358579(d, (*n).Sons->data[1], (&tmp1));
		memset((void*)LOC110, 0, sizeof(LOC110));
		LOC110[0] = copyString(tmp0);
		LOC110[1] = copyString(tmp1);
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP2393), ((NimStringDesc*) &TMP2394), LOC110, 2);
	}
	break;
	case ((NU8) 54):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2433), ((NimStringDesc*) &TMP2434), result);
	}
	break;
	case ((NU8) 55):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2435), ((NimStringDesc*) &TMP2436), result);
	}
	break;
	case ((NU8) 57):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2437), ((NimStringDesc*) &TMP2438), result);
	}
	break;
	case ((NU8) 58):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2439), ((NimStringDesc*) &TMP2191), result);
	}
	break;
	case ((NU8) 59):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2440), ((NimStringDesc*) &TMP2441), result);
	}
	break;
	case ((NU8) 60):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2442), ((NimStringDesc*) &TMP2438), result);
	}
	break;
	case ((NU8) 56):
	{
		renderindexterm_358871(d, n, result);
	}
	break;
	case ((NU8) 61):
	{
		renderaux_358629(d, n, ((NimStringDesc*) &TMP2447), ((NimStringDesc*) &TMP2448), result);
	}
	break;
	case ((NU8) 63):
	{
		rendersmiley_364975(d, n, result);
	}
	break;
	case ((NU8) 64):
	{
		NimStringDesc* LOC121;
		LOC121 = 0;
		LOC121 = esc_358407((*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*) &TMP2109)));
		renderrsttoout_358579(d, (*n).Sons->data[0], (&(*d).Meta[(((NU8) 1))- 0]));
	}
	break;
	}
	BeforeRet: ;
}
N_NIMCALL(void, TMP4625)(void* p, NI op) {
	TY358034* a;
	NI LOC1;
	a = (TY358034*)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_358088)(trstgenerator358016* g, NU8 target, stringtableobj131012* config, NimStringDesc* filename, NU8 options, tfindfilehandler343023 findfile, tmsghandler343021 msghandler) {
	TY117804 fileparts;
	NimStringDesc* s;
	unsureAsgnRef((void**) (&(*g).Config), config);
	(*g).Target = target;
	unsureAsgnRef((void**) (&(*g).Tocpart), (TY358034*) newSeq((&NTI358034), 0));
	unsureAsgnRef((void**) (&(*g).Filename), copyString(filename));
	(*g).Splitafter = 20;
	unsureAsgnRef((void**) (&(*g).Theindex), copyString(((NimStringDesc*) &TMP2109)));
	(*g).Options = options;
	(*g).Findfile = findfile;
	unsureAsgnRef((void**) (&(*g).Currentsection), copyString(((NimStringDesc*) &TMP2109)));
	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*) &TMP4629))) goto LA3;
		LOC5 = 0;
		LOC5 = rawNewString(fileparts.Field1->Sup.len + 7);
appendString(LOC5, ((NimStringDesc*) &TMP4630));
appendString(LOC5, fileparts.Field1);
		unsureAsgnRef((void**) (&(*g).Currentsection), LOC5);
	}
	LA3: ;
	inittable_358120(64, (&(*g).Seenindexterms));
	(*g).Msghandler = msghandler;
	s = nstGet(config, ((NimStringDesc*) &TMP4631));
	{
		if (!!(((s) && (s)->Sup.len == 0))) goto LA8;
		(*g).Splitafter = nsuParseInt(s);
	}
	LA8: ;
	{
		NU8 i_358266;
		NU8 res_358270;
		i_358266 = 0;
		res_358270 = ((NU8) 0);
		{
			while (1) {
				if (!(res_358270 <= ((NU8) 4))) goto LA12;
				i_358266 = res_358270;
				unsureAsgnRef((void**) (&(*g).Meta[(i_358266)- 0]), copyString(((NimStringDesc*) &TMP2109)));
				res_358270 += 1;
			} LA12: ;
		}
	}
}

N_NIMCALL(void, rendertocentry_364538)(trstgenerator358016* d, ttocentry358012* e, NimStringDesc** result) {
	TY169969 LOC1;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString((*e).Refname);
	LOC1[1] = copyString((*e).Header);
	dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP4704), ((NimStringDesc*) &TMP4705), LOC1, 2);
}

N_NIMCALL(void, rendertocentries_364554)(trstgenerator358016* d, NI* j, NI lvl, NimStringDesc** result) {
	NimStringDesc* tmp;
	tmp = copyString(((NimStringDesc*) &TMP2109));
	{
		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_364538(d, (&(*d).Tocpart->data[(*j)]), (&tmp));
				(*j) += 1;
			}
			goto LA3;
			LA5: ;
			{
				if (!(lvl < a)) goto LA8;
				rendertocentries_364554(d, j, a, (&tmp));
			}
			goto LA3;
			LA8: ;
			{
				goto LA1;
			}
			LA3: ;
		} LA2: ;
	} LA1: ;
	{
		TY197301 LOC15;
		if (!(1 < lvl)) goto LA13;
		memset((void*)LOC15, 0, sizeof(LOC15));
		LOC15[0] = copyString(tmp);
		dispa_358544((*d).Target, result, ((NimStringDesc*) &TMP4706), ((NimStringDesc*) &TMP4707), LOC15, 1);
	}
	goto LA11;
	LA13: ;
	{
		(*result) = resizeString((*result), tmp->Sup.len + 0);
appendString((*result), tmp);
	}
	LA11: ;
}

N_NIMCALL(void, writeindexfile_358287)(trstgenerator358016* g, NimStringDesc* outfile) {
	{
		if (!(0 < (*g).Theindex->Sup.len)) goto LA3;
		writefile_13045(outfile, (*g).Theindex);
	}
	LA3: ;
}
N_NIMCALL(void, TMP4783)(void* p, NI op) {
	TY361804* a;
	NI LOC1;
	a = (TY361804*)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_359777)(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_358700)(NimStringDesc* text) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuReplaceStr(text, ((NimStringDesc*) &TMP2120), ((NimStringDesc*) &TMP2119));
	LOC2 = 0;
	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &TMP2118), ((NimStringDesc*) &TMP2117));
	result = nsuReplaceStr(LOC2, ((NimStringDesc*) &TMP2116), ((NimStringDesc*) &TMP2115));
	return result;
}

static N_INLINE(NI, HEX21HEX26_128025)(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_358568)(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_128054)(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_359309)(tindexentry359264* x) {
	NI result;
	NI LOC1;
	NI LOC2;
	NimStringDesc* LOC3;
	NI LOC4;
	NimStringDesc* LOC5;
	NI LOC6;
	result = 0;
	LOC1 = 0;
	LOC1 = hash_128839((*x).Keyword);
	LOC2 = 0;
	LOC2 = hash_128839((*x).Link);
	result = HEX21HEX26_128025(LOC1, LOC2);
	LOC3 = 0;
	LOC3 = or_358568((*x).Linktitle, ((NimStringDesc*) &TMP2109));
	LOC4 = 0;
	LOC4 = hash_128839(LOC3);
	result = HEX21HEX26_128025(result, LOC4);
	LOC5 = 0;
	LOC5 = or_358568((*x).Linkdesc, ((NimStringDesc*) &TMP2109));
	LOC6 = 0;
	LOC6 = hash_128839(LOC5);
	result = HEX21HEX26_128025(result, LOC6);
	result = HEX21HEX24_128054(result);
	return result;
}

N_NIMCALL(void, readindexdir_361798)(NimStringDesc* dir, TY361801* Result) {
	NI l;
	TY362571 LOC90;
	unsureAsgnRef((void**) (&(*Result).Field0), (TY120008*) newSeq((&NTI120008), 0));
	inittable_361830(32, (&(*Result).Field2));
	unsureAsgnRef((void**) (&(*Result).Field1), (TY361804*) newSeq((&NTI361804), 15000));
	(*Result).Field1 = (TY361804*) setLengthSeq(&((*Result).Field1)->Sup, sizeof(tindexentry359264), 0);
	l = 0;
	{
		NU8 kind_362055;
		NimStringDesc* path_362056;
		DIR* d_364101;
		kind_362055 = 0;
		path_362056 = 0;
		d_364101 = opendir(dir->data);
		{
			int LOC89;
			if (!!((d_364101 == NIM_NIL))) goto LA4;
			{
				while (1) {
					struct dirent* x_364103;
					NimStringDesc* y_364105;
					x_364103 = readdir(d_364101);
					{
						if (!(x_364103 == NIM_NIL)) goto LA10;
						goto LA6;
					}
					LA10: ;
					y_364105 = cstrToNimstr(((NCSTRING) ((*x_364103).d_name)));
					{
						NIM_BOOL LOC14;
						struct stat s_364107;
						NU8 k_364109;
						LOC14 = 0;
						LOC14 = !(eqStrings(y_364105, ((NimStringDesc*) &TMP4785)));
						if (!(LOC14)) goto LA15;
						LOC14 = !(eqStrings(y_364105, ((NimStringDesc*) &TMP4786)));
						LA15: ;
						if (!LOC14) goto LA16;
						memset((void*)(&s_364107), 0, sizeof(s_364107));
						y_364105 = HEX2F_117499(dir, y_364105);
						{
							int LOC20;
							LOC20 = 0;
							LOC20 = lstat(y_364105->data, (&s_364107));
							if (!(LOC20 < ((NI32) 0))) goto LA21;
							goto LA6;
						}
						LA21: ;
						k_364109 = ((NU8) 0);
						{
							NIM_BOOL LOC25;
							LOC25 = 0;
							LOC25 = S_ISDIR(s_364107.st_mode);
							if (!LOC25) goto LA26;
							k_364109 = ((NU8) 2);
						}
						LA26: ;
						{
							NIM_BOOL LOC30;
							LOC30 = 0;
							LOC30 = S_ISLNK(s_364107.st_mode);
							if (!LOC30) goto LA31;
							k_364109 = (k_364109 + 1);
						}
						LA31: ;
						kind_362055 = k_364109;
						path_362056 = y_364105;
						{
							NIM_BOOL LOC35;
							TY361804* fileentries;
							tindexentry359264 title;
							NI f;
							LOC35 = 0;
							LOC35 = (kind_362055 == ((NU8) 0));
							if (!(LOC35)) goto LA36;
							LOC35 = nsuEndsWith(path_362056, ((NimStringDesc*) &TMP4787));
							LA36: ;
							if (!LOC35) goto LA37;
							fileentries = 0;
							memset((void*)(&title), 0, sizeof(title));
							f = 0;
							fileentries = (TY361804*) newSeq((&NTI361804), 500);
							fileentries = (TY361804*) setLengthSeq(&(fileentries)->Sup, sizeof(tindexentry359264), 0);
							{
								NimStringDesc* line_362103;
								FILE* f_364088;
								NimStringDesc* res_364090;
								line_362103 = 0;
								f_364088 = open_12817(path_362056, ((NU8) 0), 8000);
								res_364090 = rawNewString(80);
								{
									while (1) {
										NIM_BOOL LOC42;
										LOC42 = 0;
										LOC42 = readline_13089(f_364088, (&res_364090));
										if (!LOC42) goto LA41;
										line_362103 = res_364090;
										{
											NI s;
											s = nsuFindChar(line_362103, 9, 0);
											{
												if (!(s < 0)) goto LA46;
												goto LA43;
											}
											LA46: ;
											fileentries = (TY361804*) setLengthSeq(&(fileentries)->Sup, sizeof(tindexentry359264), (NI64)(f + 1));
											asgnRefNoCycle((void**) (&fileentries->data[f].Keyword), copyStrLast(line_362103, 0, (NI64)(s - 1)));
											asgnRefNoCycle((void**) (&fileentries->data[f].Link), copyStr(line_362103, (NI64)(s + 1)));
											{
												NIM_BOOL LOC50;
												LOC50 = 0;
												LOC50 = title.Keyword == 0;
												if (!(LOC50)) goto LA51;
												LOC50 = isdocumentationtitle_359777(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;
												TY120008* 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_358700(extracols->data[1]));
												asgnRefNoCycle((void**) (&fileentries->data[f].Linkdesc), unquoteindexcolumn_358700(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_364088);
							}
							{
								TY117804 LOC83;
								NimStringDesc* LOC84;
								if (!title.Keyword == 0) goto LA65;
								{
									NI i_362234;
									NI HEX3Atmp_364094;
									NI res_364097;
									i_362234 = 0;
									HEX3Atmp_364094 = 0;
									HEX3Atmp_364094 = (f - 1);
									res_364097 = 0;
									{
										while (1) {
											if (!(res_364097 <= HEX3Atmp_364094)) goto LA69;
											i_362234 = res_364097;
											{
												NimStringDesc* toc;
												NimStringDesc* LOC79;
												NimStringDesc* LOC80;
												NimStringDesc* LOC81;
												NimStringDesc* LOC82;
												toc = fileentries->data[i_362234].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 = (TY361804*) setLengthSeq(&((*Result).Field1)->Sup, sizeof(tindexentry359264), (NI64)(l + 1));
												LOC79 = 0;
												LOC79 = (*Result).Field1->data[l].Keyword; (*Result).Field1->data[l].Keyword = copyStringRC1(fileentries->data[i_362234].Keyword);
												if (LOC79) nimGCunrefNoCycle(LOC79);
												LOC80 = 0;
												LOC80 = (*Result).Field1->data[l].Link; (*Result).Field1->data[l].Link = copyStringRC1(fileentries->data[i_362234].Link);
												if (LOC80) nimGCunrefNoCycle(LOC80);
												LOC81 = 0;
												LOC81 = (*Result).Field1->data[l].Linktitle; (*Result).Field1->data[l].Linktitle = copyStringRC1(fileentries->data[i_362234].Linktitle);
												if (LOC81) nimGCunrefNoCycle(LOC81);
												LOC82 = 0;
												LOC82 = (*Result).Field1->data[l].Linkdesc; (*Result).Field1->data[l].Linkdesc = copyStringRC1(fileentries->data[i_362234].Linkdesc);
												if (LOC82) nimGCunrefNoCycle(LOC82);
												l += 1;
											} LA70: ;
											res_364097 += 1;
										} LA69: ;
									}
								}
								memset((void*)(&LOC83), 0, sizeof(LOC83));
								nossplitFile(path_362056, (&LOC83));
								(*Result).Field0 = (TY120008*) 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_362285((*Result).Field2);
								LOC88 = 0;
								LOC88 = nimIntToStr(LOC87);
								LOC86 = rawNewString(LOC88->Sup.len + 8);
appendString(LOC86, ((NimStringDesc*) &TMP4788));
appendString(LOC86, LOC88);
								title.Linktitle = LOC86;
								HEX5BHEX5DHEX3D_362301((&(*Result).Field2), (&title), fileentries);
							}
							LA63: ;
						}
						LA37: ;
					}
					LA16: ;
				}
			} LA6: ;
			LOC89 = 0;
			LOC89 = closedir(d_364101);
		}
		LA4: ;
	}
	memset((void*)(&LOC90), 0, sizeof(LOC90));
	LOC90.ClPrc = ((TMP4791) (cmp_4517)); LOC90.ClEnv = NIM_NIL;
	sort_362552((*Result).Field0->data, (*Result).Field0->Sup.len, LOC90, ((NU8) 1));
}

N_NIMCALL(void, HEX3CHEX2D_359607)(tindexentry359264* a, tindexentry359264* 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_359298)(tindexentry359264* a, tindexentry359264* 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_361423)(table359277 docs) {
	NimStringDesc* result_361426;
	TY361804* titles;
	TY361804* result_361428;
	TY360572 LOC13;
	TY120008* chunks;
	NimStringDesc* LOC19;
	NimStringDesc* LOC20;
	result_361426 = 0;
	result_361426 = copyString(((NimStringDesc*) &TMP4792));
	result_361428 = (TY361804*) newSeq((&NTI361804), 0);
	{
		tindexentry359264 x_361430;
		memset((void*)(&x_361430), 0, sizeof(x_361430));
		{
			NI h_361679;
			NI HEX3Atmp_361681;
			NI res_361683;
			h_361679 = 0;
			HEX3Atmp_361681 = 0;
			HEX3Atmp_361681 = (docs.Data->Sup.len-1);
			res_361683 = 0;
			{
				while (1) {
					if (!(res_361683 <= HEX3Atmp_361681)) goto LA4;
					h_361679 = res_361683;
					{
						NimStringDesc* LOC9;
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						NimStringDesc* LOC12;
						if (!(docs.Data->data[h_361679].Field0 == ((NU8) 1))) goto LA7;
						x_361430.Keyword = docs.Data->data[h_361679].Field1.Keyword;
						x_361430.Link = docs.Data->data[h_361679].Field1.Link;
						x_361430.Linktitle = docs.Data->data[h_361679].Field1.Linktitle;
						x_361430.Linkdesc = docs.Data->data[h_361679].Field1.Linkdesc;
						result_361428 = (TY361804*) incrSeq(&(result_361428)->Sup, sizeof(tindexentry359264));
						LOC9 = 0;
						LOC9 = result_361428->data[result_361428->Sup.len-1].Keyword; result_361428->data[result_361428->Sup.len-1].Keyword = copyStringRC1(x_361430.Keyword);
						if (LOC9) nimGCunrefNoCycle(LOC9);
						LOC10 = 0;
						LOC10 = result_361428->data[result_361428->Sup.len-1].Link; result_361428->data[result_361428->Sup.len-1].Link = copyStringRC1(x_361430.Link);
						if (LOC10) nimGCunrefNoCycle(LOC10);
						LOC11 = 0;
						LOC11 = result_361428->data[result_361428->Sup.len-1].Linktitle; result_361428->data[result_361428->Sup.len-1].Linktitle = copyStringRC1(x_361430.Linktitle);
						if (LOC11) nimGCunrefNoCycle(LOC11);
						LOC12 = 0;
						LOC12 = result_361428->data[result_361428->Sup.len-1].Linkdesc; result_361428->data[result_361428->Sup.len-1].Linkdesc = copyStringRC1(x_361430.Linkdesc);
						if (LOC12) nimGCunrefNoCycle(LOC12);
					}
					LA7: ;
					res_361683 += 1;
				} LA4: ;
			}
		}
	}
	genericSeqAssign((&titles), result_361428, (&NTI361804));
	memset((void*)(&LOC13), 0, sizeof(LOC13));
	LOC13.ClPrc = ((TMP4795) (cmp_359298)); LOC13.ClEnv = NIM_NIL;
	sort_360553(titles->data, titles->Sup.len, LOC13, ((NU8) 1));
	chunks = (TY120008*) newSeq((&NTI120008), 0);
	{
		tindexentry359264 title_361655;
		NI i_361688;
		NI l_361690;
		memset((void*)(&title_361655), 0, sizeof(title_361655));
		i_361688 = 0;
		l_361690 = titles->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC17;
				NimStringDesc* LOC18;
				if (!(i_361688 < l_361690)) goto LA16;
				title_361655.Keyword = titles->data[i_361688].Keyword;
				title_361655.Link = titles->data[i_361688].Link;
				title_361655.Linktitle = titles->data[i_361688].Linktitle;
				title_361655.Linkdesc = titles->data[i_361688].Linkdesc;
				LOC17 = 0;
				LOC17 = rawNewString(title_361655.Link->Sup.len + title_361655.Keyword->Sup.len + 15);
appendString(LOC17, ((NimStringDesc*) &TMP4796));
appendString(LOC17, title_361655.Link);
appendString(LOC17, ((NimStringDesc*) &TMP4797));
appendString(LOC17, title_361655.Keyword);
appendString(LOC17, ((NimStringDesc*) &TMP4798));
				chunks = (TY120008*) 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_361688 += 1;
			} LA16: ;
		}
	}
	LOC19 = 0;
	LOC20 = 0;
	LOC20 = nsuJoinSep(chunks->data, chunks->Sup.len, ((NimStringDesc*) &TMP4799));
	LOC19 = rawNewString(LOC20->Sup.len + 5);
appendString(LOC19, LOC20);
appendString(LOC19, ((NimStringDesc*) &TMP4800));
	result_361426 = resizeString(result_361426, LOC19->Sup.len + 0);
appendString(result_361426, LOC19);
	return result_361426;
}

N_NIMCALL(NimStringDesc*, generatemodulejumps_361718)(TY120008* modules) {
	NimStringDesc* result;
	TY120008* chunks;
	NimStringDesc* LOC6;
	NimStringDesc* LOC7;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP4802));
	chunks = (TY120008*) newSeq((&NTI120008), 0);
	{
		NimStringDesc* name_361757;
		NI i_361780;
		NI l_361782;
		name_361757 = 0;
		i_361780 = 0;
		l_361782 = modules->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC4;
				NimStringDesc* LOC5;
				if (!(i_361780 < l_361782)) goto LA3;
				name_361757 = modules->data[i_361780];
				LOC4 = 0;
				LOC4 = rawNewString(name_361757->Sup.len + name_361757->Sup.len + 20);
appendString(LOC4, ((NimStringDesc*) &TMP4796));
appendString(LOC4, name_361757);
appendString(LOC4, ((NimStringDesc*) &TMP4803));
appendString(LOC4, name_361757);
appendString(LOC4, ((NimStringDesc*) &TMP4798));
				chunks = (TY120008*) 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_361780 += 1;
			} LA3: ;
		}
	}
	LOC6 = 0;
	LOC7 = 0;
	LOC7 = nsuJoinSep(chunks->data, chunks->Sup.len, ((NimStringDesc*) &TMP4799));
	LOC6 = rawNewString(LOC7->Sup.len + 5);
appendString(LOC6, LOC7);
appendString(LOC6, ((NimStringDesc*) &TMP4800));
	result = resizeString(result, LOC6->Sup.len + 0);
appendString(result, LOC6);
	return result;
}
N_NIMCALL(void, TMP4807)(void* p, NI op) {
	TY359879* a;
	NI LOC1;
	a = (TY359879*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

static N_INLINE(NimStringDesc*, HEX5BHEX5D_84368)(NimStringDesc* s, slice84375 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(slice84375, HEX2EHEX2E_92299)(NI a_92303, NI b_92305) {
	slice84375 result;
	memset((void*)(&result), 0, sizeof(result));
	result.A = a_92303;
	result.B = b_92305;
	return result;
}

N_NIMCALL(void, striptoclevel_359788)(NimStringDesc* s, TY359880* Result) {
	slice84375 LOC8;
	{
		NI c_359816;
		NI HEX3Atmp_359840;
		NI res_359843;
		c_359816 = 0;
		HEX3Atmp_359840 = 0;
		HEX3Atmp_359840 = (s->Sup.len - 1);
		res_359843 = 0;
		{
			while (1) {
				if (!(res_359843 <= HEX3Atmp_359840)) goto LA3;
				c_359816 = res_359843;
				(*Result).Field0 = c_359816;
				{
					if (!!(((NU8)(s->data[c_359816]) == (NU8)(32)))) goto LA6;
					goto LA1;
				}
				LA6: ;
				res_359843 += 1;
			} LA3: ;
		}
	} LA1: ;
	LOC8 = HEX2EHEX2E_92299((*Result).Field0, (s->Sup.len - 1));
	unsureAsgnRef((void**) (&(*Result).Field1), HEX5BHEX5D_84368(s, LOC8));
}

N_NIMCALL(NimStringDesc*, indenttolevel_359860)(NI* level, NI newlevel) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2109));
	{
		if (!((*level) == newlevel)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!((*level) < newlevel)) goto LA7;
		result = nsuRepeatStr((NI64)(newlevel - (*level)), ((NimStringDesc*) &TMP4809));
	}
	goto LA5;
	LA7: ;
	{
		result = nsuRepeatStr((NI64)((*level) - newlevel), ((NimStringDesc*) &TMP4810));
	}
	LA5: ;
	(*level) = newlevel;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, generatedocumentationtoc_359873)(TY361804* entries) {
	NimStringDesc* result;
	NimStringDesc* titleref;
	TY359879* levels;
	NI l_359884;
	NI level;
	NimStringDesc* LOC23;
	NimStringDesc* LOC24;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2109));
	titleref = 0;
	levels = 0;
	l_359884 = 0;
	level = 1;
	levels = (TY359879*) newSeq((&NTI359879), entries->Sup.len);
	{
		tindexentry359264 entry_360011;
		NI i_360206;
		NI l_360208;
		memset((void*)(&entry_360011), 0, sizeof(entry_360011));
		i_360206 = 0;
		l_360208 = entries->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC4;
				TY359880 LOC5;
				NI rawlevel;
				NimStringDesc* rawtext;
				if (!(i_360206 < l_360208)) goto LA3;
				entry_360011.Keyword = entries->data[i_360206].Keyword;
				entry_360011.Link = entries->data[i_360206].Link;
				entry_360011.Linktitle = entries->data[i_360206].Linktitle;
				entry_360011.Linkdesc = entries->data[i_360206].Linkdesc;
				LOC4 = 0;
				LOC4 = or_358568(entry_360011.Linktitle, entry_360011.Keyword);
				memset((void*)(&LOC5), 0, sizeof(LOC5));
				striptoclevel_359788(LOC4, (&LOC5));
				rawlevel = 0;
				rawlevel = LOC5.Field0;
				rawtext = 0;
				rawtext = LOC5.Field1;
				{
					NimStringDesc* LOC10;
					if (!(rawlevel < 1)) goto LA8;
					levels->data[l_359884].Field0 = (NI64)(level + 1);
					LOC10 = 0;
					LOC10 = levels->data[l_359884].Field1; levels->data[l_359884].Field1 = copyStringRC1(entry_360011.Keyword);
					if (LOC10) nimGCunrefNoCycle(LOC10);
				}
				goto LA6;
				LA8: ;
				{
					NimStringDesc* LOC12;
					level = rawlevel;
					levels->data[l_359884].Field0 = rawlevel;
					LOC12 = 0;
					LOC12 = levels->data[l_359884].Field1; levels->data[l_359884].Field1 = copyStringRC1(rawtext);
					if (LOC12) nimGCunrefNoCycle(LOC12);
				}
				LA6: ;
				l_359884 += 1;
				i_360206 += 1;
			} LA3: ;
		}
	}
	result = copyString(((NimStringDesc*) &TMP4808));
	level = 1;
	l_359884 = 0;
	{
		while (1) {
			NimStringDesc* link;
			if (!(l_359884 < entries->Sup.len)) goto LA14;
			link = entries->data[l_359884].Link;
			{
				NIM_BOOL LOC17;
				LOC17 = 0;
				LOC17 = isdocumentationtitle_359777(link);
				if (!LOC17) goto LA18;
				titleref = copyString(link);
			}
			goto LA15;
			LA18: ;
			{
				NimStringDesc* LOC21;
				NimStringDesc* LOC22;
				LOC21 = 0;
				LOC21 = indenttolevel_359860((&level), levels->data[l_359884].Field0);
				result = resizeString(result, LOC21->Sup.len + 0);
appendString(result, LOC21);
				LOC22 = 0;
				LOC22 = rawNewString(link->Sup.len + levels->data[l_359884].Field1->Sup.len + 20);
appendString(LOC22, ((NimStringDesc*) &TMP4811));
appendString(LOC22, link);
appendString(LOC22, ((NimStringDesc*) &TMP4797));
appendString(LOC22, levels->data[l_359884].Field1);
appendString(LOC22, ((NimStringDesc*) &TMP4812));
				result = resizeString(result, LOC22->Sup.len + 0);
appendString(result, LOC22);
			}
			LA15: ;
			l_359884 += 1;
		} LA14: ;
	}
	LOC23 = 0;
	LOC24 = 0;
	LOC24 = indenttolevel_359860((&level), 1);
	LOC23 = rawNewString(LOC24->Sup.len + 6);
appendString(LOC23, LOC24);
appendString(LOC23, ((NimStringDesc*) &TMP4813));
	result = resizeString(result, LOC23->Sup.len + 0);
appendString(result, LOC23);
	return result;
}

N_NIMCALL(NimStringDesc*, generatedocumentationindex_360231)(table359277 docs) {
	NimStringDesc* result_360234;
	TY361804* titles;
	TY361804* result_360236;
	TY360572 LOC13;
	result_360234 = 0;
	result_360234 = copyString(((NimStringDesc*) &TMP2109));
	result_360236 = (TY361804*) newSeq((&NTI361804), 0);
	{
		tindexentry359264 x_360238;
		memset((void*)(&x_360238), 0, sizeof(x_360238));
		{
			NI h_361385;
			NI HEX3Atmp_361387;
			NI res_361389;
			h_361385 = 0;
			HEX3Atmp_361387 = 0;
			HEX3Atmp_361387 = (docs.Data->Sup.len-1);
			res_361389 = 0;
			{
				while (1) {
					if (!(res_361389 <= HEX3Atmp_361387)) goto LA4;
					h_361385 = res_361389;
					{
						NimStringDesc* LOC9;
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						NimStringDesc* LOC12;
						if (!(docs.Data->data[h_361385].Field0 == ((NU8) 1))) goto LA7;
						x_360238.Keyword = docs.Data->data[h_361385].Field1.Keyword;
						x_360238.Link = docs.Data->data[h_361385].Field1.Link;
						x_360238.Linktitle = docs.Data->data[h_361385].Field1.Linktitle;
						x_360238.Linkdesc = docs.Data->data[h_361385].Field1.Linkdesc;
						result_360236 = (TY361804*) incrSeq(&(result_360236)->Sup, sizeof(tindexentry359264));
						LOC9 = 0;
						LOC9 = result_360236->data[result_360236->Sup.len-1].Keyword; result_360236->data[result_360236->Sup.len-1].Keyword = copyStringRC1(x_360238.Keyword);
						if (LOC9) nimGCunrefNoCycle(LOC9);
						LOC10 = 0;
						LOC10 = result_360236->data[result_360236->Sup.len-1].Link; result_360236->data[result_360236->Sup.len-1].Link = copyStringRC1(x_360238.Link);
						if (LOC10) nimGCunrefNoCycle(LOC10);
						LOC11 = 0;
						LOC11 = result_360236->data[result_360236->Sup.len-1].Linktitle; result_360236->data[result_360236->Sup.len-1].Linktitle = copyStringRC1(x_360238.Linktitle);
						if (LOC11) nimGCunrefNoCycle(LOC11);
						LOC12 = 0;
						LOC12 = result_360236->data[result_360236->Sup.len-1].Linkdesc; result_360236->data[result_360236->Sup.len-1].Linkdesc = copyStringRC1(x_360238.Linkdesc);
						if (LOC12) nimGCunrefNoCycle(LOC12);
					}
					LA7: ;
					res_361389 += 1;
				} LA4: ;
			}
		}
	}
	genericSeqAssign((&titles), result_360236, (&NTI361804));
	memset((void*)(&LOC13), 0, sizeof(LOC13));
	LOC13.ClPrc = ((TMP4805) (cmp_359298)); LOC13.ClEnv = NIM_NIL;
	sort_360553(titles->data, titles->Sup.len, LOC13, ((NU8) 1));
	{
		tindexentry359264 title_361295;
		NI i_361393;
		NI l_361395;
		memset((void*)(&title_361295), 0, sizeof(title_361295));
		i_361393 = 0;
		l_361395 = titles->Sup.len;
		{
			while (1) {
				NimStringDesc* toclist;
				TY361804* LOC17;
				NimStringDesc* LOC18;
				if (!(i_361393 < l_361395)) goto LA16;
				title_361295.Keyword = titles->data[i_361393].Keyword;
				title_361295.Link = titles->data[i_361393].Link;
				title_361295.Linktitle = titles->data[i_361393].Linktitle;
				title_361295.Linkdesc = titles->data[i_361393].Linkdesc;
				LOC17 = 0;
				LOC17 = HEX5BHEX5D_361298(docs, (&title_361295));
				toclist = generatedocumentationtoc_359873(LOC17);
				LOC18 = 0;
				LOC18 = rawNewString(title_361295.Link->Sup.len + title_361295.Keyword->Sup.len + toclist->Sup.len + 30);
appendString(LOC18, ((NimStringDesc*) &TMP4814));
appendString(LOC18, title_361295.Link);
appendString(LOC18, ((NimStringDesc*) &TMP4797));
appendString(LOC18, title_361295.Keyword);
appendString(LOC18, ((NimStringDesc*) &TMP4812));
appendString(LOC18, toclist);
appendString(LOC18, ((NimStringDesc*) &TMP4813));
				result_360234 = resizeString(result_360234, LOC18->Sup.len + 0);
appendString(result_360234, LOC18);
				i_361393 += 1;
			} LA16: ;
		}
	}
	return result_360234;
}

N_NIMCALL(void, sortindex_359618)(tindexentry359264* 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_359645;
				NI HEX3Atmp_359657;
				NI res_359660;
				i_359645 = 0;
				HEX3Atmp_359657 = 0;
				HEX3Atmp_359657 = (NI64)(n - 1);
				res_359660 = h;
				{
					while (1) {
						tindexentry359264 v;
						NI j;
						if (!(res_359660 <= HEX3Atmp_359657)) goto LA11;
						i_359645 = res_359660;
						memset((void*)(&v), 0, sizeof(v));
						HEX3CHEX2D_359607((&v), (&a[i_359645]));
						j = i_359645;
						{
							while (1) {
								NI LOC14;
								LOC14 = 0;
								LOC14 = cmp_359298((&a[(NI64)(j - h)]), (&v));
								if (!(0 <= LOC14)) goto LA13;
								HEX3CHEX2D_359607((&a[j]), (&a[(NI64)(j - h)]));
								j = (NI64)(j - h);
								{
									if (!(j < h)) goto LA17;
									goto LA12;
								}
								LA17: ;
							} LA13: ;
						} LA12: ;
						HEX3CHEX2D_359607((&a[j]), (&v));
						res_359660 += 1;
					} LA11: ;
				}
			}
			{
				if (!(h == 1)) goto LA21;
				goto LA7;
			}
			LA21: ;
		}
	} LA7: ;
}

N_NIMCALL(NimStringDesc*, generatesymbolindex_359695)(TY361804* symbols) {
	NimStringDesc* result;
	NI i;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2109));
	i = 0;
	{
		while (1) {
			TY197301 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*) &TMP4816), 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*) &TMP2109));
					}
					LA13: ;
					{
						TY208063 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*) &TMP4817), LOC22, 3);
					}
					goto LA18;
					LA20: ;
					{
						TY169969 LOC24;
						memset((void*)LOC24, 0, sizeof(LOC24));
						LOC24[0] = copyString(url);
						LOC24[1] = copyString(text);
						nsuAddf((&result), ((NimStringDesc*) &TMP4818), LOC24, 2);
					}
					LA18: ;
					j += 1;
				} LA5: ;
			}
			result = resizeString(result, 11);
appendString(result, ((NimStringDesc*) &TMP4819));
			i = j;
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NimStringDesc*, mergeindexes_364149)(NimStringDesc* dir) {
	NimStringDesc* result;
	TY361801 LOC1;
	TY120008* modules;
	TY361804* symbols;
	table359277 docs;
	result = 0;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	readindexdir_361798(dir, (&LOC1));
	modules = 0;
	genericSeqAssign((&modules), LOC1.Field0, (&NTI120008));
	symbols = 0;
	genericSeqAssign((&symbols), LOC1.Field1, (&NTI361804));
	memset((void*)(&docs), 0, sizeof(docs));
	genericSeqAssign((&docs.Data), LOC1.Field2.Data, (&NTI359280));
	docs.Counter = LOC1.Field2.Counter;
	result = copyString(((NimStringDesc*) &TMP2109));
	{
		NI LOC4;
		NimStringDesc* LOC7;
		LOC4 = 0;
		LOC4 = len_362285(docs);
		if (!(0 < LOC4)) goto LA5;
		LOC7 = 0;
		LOC7 = generatedocumentationjumps_361423(docs);
		result = resizeString(result, LOC7->Sup.len + 0);
appendString(result, LOC7);
		result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TMP4801));
	}
	LA5: ;
	{
		NimStringDesc* LOC12;
		if (!(0 < modules->Sup.len)) goto LA10;
		LOC12 = 0;
		LOC12 = generatemodulejumps_361718(modules);
		result = resizeString(result, LOC12->Sup.len + 0);
appendString(result, LOC12);
		result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TMP4801));
	}
	LA10: ;
	{
		NI LOC15;
		NimStringDesc* LOC18;
		LOC15 = 0;
		LOC15 = len_362285(docs);
		if (!(0 < LOC15)) goto LA16;
		result = resizeString(result, 29);
appendString(result, ((NimStringDesc*) &TMP4804));
		LOC18 = 0;
		LOC18 = generatedocumentationindex_360231(docs);
		result = resizeString(result, LOC18->Sup.len + 0);
appendString(result, LOC18);
	}
	LA16: ;
	{
		NimStringDesc* LOC23;
		if (!(0 < symbols->Sup.len)) goto LA21;
		sortindex_359618(symbols->data, symbols->Sup.len);
		result = resizeString(result, 21);
appendString(result, ((NimStringDesc*) &TMP4815));
		LOC23 = 0;
		LOC23 = generatesymbolindex_359695(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_358332; splitter_358332 = copyStringRC1(((NimStringDesc*) &TMP894));
	if (LOC1) nimGCunrefNoCycle(LOC1);
}

NIM_EXTERNC N_NOINLINE(void, docutils_rstgenDatInit)(void) {
static TNimNode* TMP4620[13];
static TNimNode* TMP4621[2];
NI TMP4623;
static char* NIM_CONST TMP4622[2] = {
"outHtml", 
"outLatex"};
static TNimNode* TMP4624[3];
static TNimNode* TMP4782[4];
static TNimNode* TMP4806[2];
static TNimNode TMP886[29];
NTI358016.size = sizeof(trstgenerator358016);
NTI358016.kind = 17;
NTI358016.base = (&NTI3211);
TMP4620[0] = &TMP886[1];
NTI358010.size = sizeof(NU8);
NTI358010.kind = 14;
NTI358010.base = 0;
NTI358010.flags = 3;
for (TMP4623 = 0; TMP4623 < 2; TMP4623++) {
TMP886[TMP4623+2].kind = 1;
TMP886[TMP4623+2].offset = TMP4623;
TMP886[TMP4623+2].name = TMP4622[TMP4623];
TMP4621[TMP4623] = &TMP886[TMP4623+2];
}
TMP886[4].len = 2; TMP886[4].kind = 2; TMP886[4].sons = &TMP4621[0];
NTI358010.node = &TMP886[4];
TMP886[1].kind = 1;
TMP886[1].offset = offsetof(trstgenerator358016, Target);
TMP886[1].typ = (&NTI358010);
TMP886[1].name = "target";
TMP4620[1] = &TMP886[5];
TMP886[5].kind = 1;
TMP886[5].offset = offsetof(trstgenerator358016, Config);
TMP886[5].typ = (&NTI131014);
TMP886[5].name = "config";
TMP4620[2] = &TMP886[6];
TMP886[6].kind = 1;
TMP886[6].offset = offsetof(trstgenerator358016, Splitafter);
TMP886[6].typ = (&NTI108);
TMP886[6].name = "splitAfter";
TMP4620[3] = &TMP886[7];
NTI358012.size = sizeof(ttocentry358012);
NTI358012.kind = 18;
NTI358012.base = 0;
NTI358012.flags = 2;
TMP4624[0] = &TMP886[9];
TMP886[9].kind = 1;
TMP886[9].offset = offsetof(ttocentry358012, N);
TMP886[9].typ = (&NTI342007);
TMP886[9].name = "n";
TMP4624[1] = &TMP886[10];
TMP886[10].kind = 1;
TMP886[10].offset = offsetof(ttocentry358012, Refname);
TMP886[10].typ = (&NTI149);
TMP886[10].name = "refname";
TMP4624[2] = &TMP886[11];
TMP886[11].kind = 1;
TMP886[11].offset = offsetof(ttocentry358012, Header);
TMP886[11].typ = (&NTI149);
TMP886[11].name = "header";
TMP886[8].len = 3; TMP886[8].kind = 2; TMP886[8].sons = &TMP4624[0];
NTI358012.node = &TMP886[8];
NTI358034.size = sizeof(TY358034*);
NTI358034.kind = 24;
NTI358034.base = (&NTI358012);
NTI358034.flags = 2;
NTI358034.marker = TMP4625;
TMP886[7].kind = 1;
TMP886[7].offset = offsetof(trstgenerator358016, Tocpart);
TMP886[7].typ = (&NTI358034);
TMP886[7].name = "tocPart";
TMP4620[4] = &TMP886[12];
TMP886[12].kind = 1;
TMP886[12].offset = offsetof(trstgenerator358016, Hastoc);
TMP886[12].typ = (&NTI138);
TMP886[12].name = "hasToc";
TMP4620[5] = &TMP886[13];
TMP886[13].kind = 1;
TMP886[13].offset = offsetof(trstgenerator358016, Theindex);
TMP886[13].typ = (&NTI149);
TMP886[13].name = "theIndex";
TMP4620[6] = &TMP886[14];
TMP886[14].kind = 1;
TMP886[14].offset = offsetof(trstgenerator358016, Options);
TMP886[14].typ = (&NTI343015);
TMP886[14].name = "options";
TMP4620[7] = &TMP886[15];
TMP886[15].kind = 1;
TMP886[15].offset = offsetof(trstgenerator358016, Findfile);
TMP886[15].typ = (&NTI343023);
TMP886[15].name = "findFile";
TMP4620[8] = &TMP886[16];
TMP886[16].kind = 1;
TMP886[16].offset = offsetof(trstgenerator358016, Msghandler);
TMP886[16].typ = (&NTI343021);
TMP886[16].name = "msgHandler";
TMP4620[9] = &TMP886[17];
TMP886[17].kind = 1;
TMP886[17].offset = offsetof(trstgenerator358016, Filename);
TMP886[17].typ = (&NTI149);
TMP886[17].name = "filename";
TMP4620[10] = &TMP886[18];
NTI358042.size = sizeof(TY358042);
NTI358042.kind = 16;
NTI358042.base = (&NTI149);
NTI358042.flags = 2;
TMP886[18].kind = 1;
TMP886[18].offset = offsetof(trstgenerator358016, Meta);
TMP886[18].typ = (&NTI358042);
TMP886[18].name = "meta";
TMP4620[11] = &TMP886[19];
TMP886[19].kind = 1;
TMP886[19].offset = offsetof(trstgenerator358016, Currentsection);
TMP886[19].typ = (&NTI149);
TMP886[19].name = "currentSection";
TMP4620[12] = &TMP886[20];
TMP886[20].kind = 1;
TMP886[20].offset = offsetof(trstgenerator358016, Seenindexterms);
TMP886[20].typ = (&NTI358052);
TMP886[20].name = "seenIndexTerms";
TMP886[0].len = 13; TMP886[0].kind = 2; TMP886[0].sons = &TMP4620[0];
NTI358016.node = &TMP886[0];
NTI359264.size = sizeof(tindexentry359264);
NTI359264.kind = 18;
NTI359264.base = 0;
NTI359264.flags = 2;
TMP4782[0] = &TMP886[22];
TMP886[22].kind = 1;
TMP886[22].offset = offsetof(tindexentry359264, Keyword);
TMP886[22].typ = (&NTI149);
TMP886[22].name = "keyword";
TMP4782[1] = &TMP886[23];
TMP886[23].kind = 1;
TMP886[23].offset = offsetof(tindexentry359264, Link);
TMP886[23].typ = (&NTI149);
TMP886[23].name = "link";
TMP4782[2] = &TMP886[24];
TMP886[24].kind = 1;
TMP886[24].offset = offsetof(tindexentry359264, Linktitle);
TMP886[24].typ = (&NTI149);
TMP886[24].name = "linkTitle";
TMP4782[3] = &TMP886[25];
TMP886[25].kind = 1;
TMP886[25].offset = offsetof(tindexentry359264, Linkdesc);
TMP886[25].typ = (&NTI149);
TMP886[25].name = "linkDesc";
TMP886[21].len = 4; TMP886[21].kind = 2; TMP886[21].sons = &TMP4782[0];
NTI359264.node = &TMP886[21];
NTI361804.size = sizeof(TY361804*);
NTI361804.kind = 24;
NTI361804.base = (&NTI359264);
NTI361804.flags = 2;
NTI361804.marker = TMP4783;
NTI359880.size = sizeof(TY359880);
NTI359880.kind = 18;
NTI359880.base = 0;
NTI359880.flags = 2;
TMP4806[0] = &TMP886[27];
TMP886[27].kind = 1;
TMP886[27].offset = offsetof(TY359880, Field0);
TMP886[27].typ = (&NTI108);
TMP886[27].name = "Field0";
TMP4806[1] = &TMP886[28];
TMP886[28].kind = 1;
TMP886[28].offset = offsetof(TY359880, Field1);
TMP886[28].typ = (&NTI149);
TMP886[28].name = "Field1";
TMP886[26].len = 2; TMP886[26].kind = 2; TMP886[26].sons = &TMP4806[0];
NTI359880.node = &TMP886[26];
NTI359879.size = sizeof(TY359879*);
NTI359879.kind = 24;
NTI359879.base = (&NTI359880);
NTI359879.flags = 2;
NTI359879.marker = TMP4807;
}

