/* Generated by Nim Compiler v0.13.0 */
/*   (c) 2015 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64

#include "nimbase.h"
#include <string.h>
#include <stdio.h>
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tsym213822 Tsym213822;
typedef struct Tdocumentor358004 Tdocumentor358004;
typedef struct Tnode213790 Tnode213790;
typedef struct Ttype213828 Ttype213828;
typedef struct Tlineinfo181337 Tlineinfo181337;
typedef struct Tident188012 Tident188012;
typedef struct Tnodeseq213784 Tnodeseq213784;
typedef struct Tidobj188006 Tidobj188006;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Ttypeseq213824 Ttypeseq213824;
typedef struct Tscope213816 Tscope213816;
typedef struct TY213925 TY213925;
typedef struct Tstrtable213794 Tstrtable213794;
typedef struct Tsymseq213792 Tsymseq213792;
typedef struct Tloc213804 Tloc213804;
typedef struct Ropeobj168006 Ropeobj168006;
typedef struct Tlib213808 Tlib213808;
typedef struct Rstgenerator325010 Rstgenerator325010;
typedef struct Rstnode312008 Rstnode312008;
typedef struct Stringtableobj140209 Stringtableobj140209;
typedef struct TY325029 TY325029;
typedef struct Table325047 Table325047;
typedef struct Keyvaluepairseq325050 Keyvaluepairseq325050;
typedef struct Cell47704 Cell47704;
typedef struct Cellseq47720 Cellseq47720;
typedef struct Gcheap50018 Gcheap50018;
typedef struct Gcstack50016 Gcstack50016;
typedef struct Cellset47716 Cellset47716;
typedef struct Pagedesc47712 Pagedesc47712;
typedef struct Memregion29888 Memregion29888;
typedef struct Smallchunk29840 Smallchunk29840;
typedef struct Llchunk29882 Llchunk29882;
typedef struct Bigchunk29842 Bigchunk29842;
typedef struct Intset29814 Intset29814;
typedef struct Trunk29810 Trunk29810;
typedef struct Avlnode29886 Avlnode29886;
typedef struct Gcstat50014 Gcstat50014;
typedef struct Tsrcgen232014 Tsrcgen232014;
typedef struct Trendertokseq232012 Trendertokseq232012;
typedef struct TY118906 TY118906;
typedef struct Jsonnodeobj305633 Jsonnodeobj305633;
typedef struct TY306043 TY306043;
typedef struct TY305648 TY305648;
typedef struct TY305653 TY305653;
typedef struct Tinstantiation213812 Tinstantiation213812;
typedef struct Tlistentry135010 Tlistentry135010;
typedef struct Rstnodeseq312006 Rstnodeseq312006;
typedef struct Keyvaluepairseq140207 Keyvaluepairseq140207;
typedef struct Tocentry325006 Tocentry325006;
typedef struct Keyvaluepair325053 Keyvaluepair325053;
typedef struct Basechunk29838 Basechunk29838;
typedef struct Freecell29830 Freecell29830;
typedef struct Trendertok232010 Trendertok232010;
typedef struct TY213913 TY213913;
typedef struct Keyvaluepair140205 Keyvaluepair140205;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tlineinfo181337  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tnode213790  {
Ttype213828* typ;
Tlineinfo181337 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym213822* sym;
} S4;
struct {Tident188012* ident;
} S5;
struct {Tnodeseq213784* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
typedef N_NIMCALL_PTR(void, TY3489) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3494) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3489 marker;
TY3494 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tidobj188006  {
  TNimObject Sup;
NI id;
};
struct  Tstrtable213794  {
NI counter;
Tsymseq213792* data;
};
struct  Tloc213804  {
NU8 k;
NU8 s;
NU16 flags;
Ttype213828* t;
Ropeobj168006* r;
Ropeobj168006* heaproot;
};
struct  Tsym213822  {
  Tidobj188006 Sup;
NU8 kind;
union{
struct {Ttypeseq213824* typeinstcache;
Tscope213816* typscope;
} S1;
struct {TY213925* procinstcache;
Tsym213822* gcunsafetyreason;
} S2;
struct {TY213925* usedgenerics;
Tstrtable213794 tab;
} S3;
struct {Tsym213822* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype213828* typ;
Tident188012* name;
Tlineinfo181337 info;
Tsym213822* owner;
NU32 flags;
Tnode213790* ast;
NU32 options;
NI position;
NI offset;
Tloc213804 loc;
Tlib213808* annex;
Tnode213790* constraint;
};
typedef N_NIMCALL_PTR(NimStringDesc*, Findfilehandler313014) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, Msghandler313012) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef NimStringDesc* TY325039[5];
struct  Table325047  {
Keyvaluepairseq325050* data;
NI counter;
};
struct  Rstgenerator325010  {
  TNimObject Sup;
NU8 target;
Stringtableobj140209* config;
NI splitafter;
NI listingcounter;
TY325029* tocpart;
NIM_BOOL hastoc;
NimStringDesc* theindex;
NU8 options;
Findfilehandler313014 findfile;
Msghandler313012 msghandler;
NimStringDesc* filename;
TY325039 meta;
NimStringDesc* currentsection;
Table325047 seenindexterms;
};
typedef Ropeobj168006* Tsections358002[25];
struct  Tdocumentor358004  {
  Rstgenerator325010 Sup;
Ropeobj168006* moddesc;
NI id;
Tsections358002 toc;
Tsections358002 section;
NimStringDesc* indexvalfilename;
NimStringDesc* analytics;
Stringtableobj140209* seensymbols;
};
typedef NU8 TY201404[32];
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef NimStringDesc* TY182752[1];
struct  Cell47704  {
NI refcount;
TNimType* typ;
};
struct  Cellseq47720  {
NI len;
NI cap;
Cell47704** d;
};
struct  Cellset47716  {
NI counter;
NI max;
Pagedesc47712* head;
Pagedesc47712** data;
};
typedef Smallchunk29840* TY29903[512];
typedef Trunk29810* Trunkbuckets29812[256];
struct  Intset29814  {
Trunkbuckets29812 data;
};
struct  Memregion29888  {
NI minlargeobj;
NI maxlargeobj;
TY29903 freesmallchunks;
Llchunk29882* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk29842* freechunkslist;
Intset29814 chunkstarts;
Avlnode29886* root;
Avlnode29886* deleted;
Avlnode29886* last;
Avlnode29886* freeavlnodes;
};
struct  Gcstat50014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap50018  {
Gcstack50016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq47720 zct;
Cellseq47720 decstack;
Cellset47716 cycleroots;
Cellseq47720 tempstack;
NI recgclock;
Memregion29888 region;
Gcstat50014 stat;
};
struct  Tident188012  {
  Tidobj188006 Sup;
NimStringDesc* s;
Tident188012* next;
NI h;
};
struct  Tsrcgen232014  {
NI indent;
NI linelen;
NI pos;
NI idx;
Trendertokseq232012* tokens;
NimStringDesc* buf;
NI pendingnl;
NI pendingwhitespace;
Tnodeseq213784* comstack;
NU8 flags;
NIM_BOOL checkanon;
NI inpragma;
};
typedef Ropeobj168006* TY168507[1];
typedef NimStringDesc* TY183169[2];
typedef Ropeobj168006* TY500232[2];
typedef NimStringDesc* TY183156[3];
typedef Ropeobj168006* TY473656[3];
typedef NimStringDesc* TY358900[10];
typedef Ropeobj168006* TY358902[10];
typedef NimStringDesc* TY358905[9];
typedef Ropeobj168006* TY358907[9];
typedef NimStringDesc* TY360498[12];
typedef NimStringDesc* TY184781[4];
typedef Ropeobj168006* TY473653[4];
typedef NimStringDesc* TY418660[6];
typedef Ropeobj168006* TY475247[6];
struct TY118906 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
struct TY306043 {
NimStringDesc* Field0;
Jsonnodeobj305633* Field1;
};
typedef TY306043 TY359717[1];
typedef TY306043 TY358929[2];
struct  Jsonnodeobj305633  {
NU8 kind;
union{
struct {NimStringDesc* str;
} S1;
struct {NI64 num;
} S2;
struct {NF fnum;
} S3;
struct {NIM_BOOL bval;
} S4;
struct {TY305648* fields;
} S6;
struct {TY305653* elems;
} S7;
} kindU;
};
struct  Ttype213828  {
  Tidobj188006 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq213824* sons;
Tnode213790* n;
Tsym213822* owner;
Tsym213822* sym;
Tsym213822* destructor;
Tsym213822* deepcopy;
Tsym213822* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc213804 loc;
};
struct  Tscope213816  {
NI depthlevel;
Tstrtable213794 symbols;
Tnodeseq213784* usingsyms;
Tscope213816* parent;
};
struct  Ropeobj168006  {
  TNimObject Sup;
Ropeobj168006* left;
Ropeobj168006* right;
NI length;
NimStringDesc* data;
};
struct  Tlistentry135010  {
  TNimObject Sup;
Tlistentry135010* prev;
Tlistentry135010* next;
};
struct  Tlib213808  {
  Tlistentry135010 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj168006* name;
Tnode213790* path;
};
struct  Rstnode312008  {
NU8 kind;
NimStringDesc* text;
NI level;
Rstnodeseq312006* sons;
};
struct  Stringtableobj140209  {
  TNimObject Sup;
NI counter;
Keyvaluepairseq140207* data;
NU8 mode;
};
struct  Tocentry325006  {
Rstnode312008* n;
NimStringDesc* refname;
NimStringDesc* header;
};
struct Keyvaluepair325053 {
NI Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  Gcstack50016  {
Gcstack50016* prev;
Gcstack50016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY29819[8];
struct  Pagedesc47712  {
Pagedesc47712* next;
NI key;
TY29819 bits;
};
struct  Basechunk29838  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk29840  {
  Basechunk29838 Sup;
Smallchunk29840* next;
Smallchunk29840* prev;
Freecell29830* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk29882  {
NI size;
NI acc;
Llchunk29882* next;
};
struct  Bigchunk29842  {
  Basechunk29838 Sup;
Bigchunk29842* next;
Bigchunk29842* prev;
NI align;
NF data;
};
struct  Trunk29810  {
Trunk29810* next;
NI key;
TY29819 bits;
};
typedef Avlnode29886* TY29893[2];
struct  Avlnode29886  {
TY29893 link;
NI key;
NI upperbound;
NI level;
};
struct  Trendertok232010  {
NU8 kind;
NI16 length;
};
struct  Tinstantiation213812  {
Tsym213822* sym;
Ttypeseq213824* concretetypes;
TY213913* usedby;
NI compilesid;
};
struct Keyvaluepair140205 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct  Freecell29830  {
Freecell29830* next;
NI zerofield;
};
struct TY305648 {
  TGenericSeq Sup;
  TY306043 data[SEQ_DECL_SIZE];
};
struct Tnodeseq213784 {
  TGenericSeq Sup;
  Tnode213790* data[SEQ_DECL_SIZE];
};
struct Ttypeseq213824 {
  TGenericSeq Sup;
  Ttype213828* data[SEQ_DECL_SIZE];
};
struct TY213925 {
  TGenericSeq Sup;
  Tinstantiation213812* data[SEQ_DECL_SIZE];
};
struct Tsymseq213792 {
  TGenericSeq Sup;
  Tsym213822* data[SEQ_DECL_SIZE];
};
struct TY325029 {
  TGenericSeq Sup;
  Tocentry325006 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq325050 {
  TGenericSeq Sup;
  Keyvaluepair325053 data[SEQ_DECL_SIZE];
};
struct Trendertokseq232012 {
  TGenericSeq Sup;
  Trendertok232010 data[SEQ_DECL_SIZE];
};
struct TY305653 {
  TGenericSeq Sup;
  Jsonnodeobj305633* data[SEQ_DECL_SIZE];
};
struct Rstnodeseq312006 {
  TGenericSeq Sup;
  Rstnode312008* data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq140207 {
  TGenericSeq Sup;
  Keyvaluepair140205 data[SEQ_DECL_SIZE];
};
struct TY213913 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(Tnode213790*, finddoccomment_358402)(Tnode213790* n);
N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringDesc* s, NimStringDesc* prefix);
static N_INLINE(NI, safelen_214081)(Tnode213790* n);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, renderrsttoout_325599)(Rstgenerator325010* d, Rstnode312008* n, NimStringDesc** result);
N_NIMCALL(Rstnode312008*, parserst_358031)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 rstoptions);
N_NIMCALL(Rstnode312008*, rstparse_319250)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, Findfilehandler313014 findfile, Msghandler313012 msghandler);
N_NIMCALL(NimStringDesc*, docgenfindfile_358027)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, findfile_160480)(NimStringDesc* f);
N_NIMCALL(NimStringDesc*, HEX2F_118665)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NimStringDesc*, nosgetCurrentDir)(void);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(void, compilermsghandler_358017)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(void, globalerror_186071)(Tlineinfo181337 info, NU16 msg, NimStringDesc* arg);
static N_INLINE(Tlineinfo181337, newlineinfo_182029)(NimStringDesc* filename, NI line, NI col);
N_NIMCALL(Tlineinfo181337, newlineinfo_182023)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI32, fileinfoidx_182016)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, tofilename_182262)(NI32 fileidx);
static N_INLINE(NI, tolinenumber_182415)(Tlineinfo181337 info);
static N_INLINE(NI, tocolumn_182419)(Tlineinfo181337 info);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing, TY201404 chars);
N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s, NimStringDesc* sub, NimStringDesc* by);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI start);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI first);
N_NIMCALL(Tnode213790*, parsefile_237029)(NI32 fileidx);
N_NIMCALL(Tdocumentor358004*, newdocumentor_358041)(NimStringDesc* filename, Stringtableobj140209* config);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP5034)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, initrstgenerator_325078)(Rstgenerator325010* g, NU8 target, Stringtableobj140209* config, NimStringDesc* filename, NU8 options, Findfilehandler313014 findfile, Msghandler313012 msghandler);
N_NIMCALL(NIM_BOOL, nsthasKey)(Stringtableobj140209* t, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, getordefault_140814)(Stringtableobj140209* t, NimStringDesc* key);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(Cell47704*, usrtocell_51640)(void* usr);
static N_INLINE(void, rtladdzct_53201)(Cell47704* c);
N_NOINLINE(void, addzct_51617)(Cellseq47720* s, Cell47704* c);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(Stringtableobj140209*, nstnewStringTable)(NU8 mode);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_54019)(Cell47704* c);
static N_INLINE(NIM_BOOL, canbecycleroot_51658)(Cell47704* c);
static N_INLINE(void, rtladdcycleroot_52420)(Cell47704* c);
N_NOINLINE(void, incl_48447)(Cellset47716* s, Cell47704* cell);
static N_INLINE(void, decref_53601)(Cell47704* c);
N_NIMCALL(void, generatedoc_358976)(Tdocumentor358004* d, Tnode213790* n);
N_NIMCALL(void, add_168487)(Ropeobj168006** a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, gencomment_358266)(Tdocumentor358004* d, Tnode213790* n);
N_NIMCALL(void, documentraises_343610)(Tnode213790* n);
N_NIMCALL(void, genitem_358806)(Tdocumentor358004* d, Tnode213790* n, Tnode213790* namenode, NU8 k);
N_NIMCALL(NIM_BOOL, isvisible_358496)(Tnode213790* n);
static N_INLINE(NI, len_214059)(Tnode213790* n);
N_NIMCALL(NimStringDesc*, getname_358587)(Tdocumentor358004* d, Tnode213790* n, NI splitafter);
N_NIMCALL(NimStringDesc*, esc_325484)(NU8 target, NimStringDesc* s, NI splitafter);
N_NIMCALL(NimStringDesc*, renderdefinitionname_232113)(Tsym213822* s, NIM_BOOL noquotes);
static N_INLINE(Tnode213790*, HEX5BHEX5D_214238)(Tnode213790* n, NI i);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(void, internalerror_186100)(Tlineinfo181337 info, NimStringDesc* errmsg);
N_NIMCALL(Ropeobj168006*, rope_168277)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, getplaindocstring_358351)(Tnode213790* n);
N_NIMCALL(Ropeobj168006*, genreccomment_358277)(Tdocumentor358004* d, Tnode213790* n);
N_NIMCALL(void, inittokrender_232050)(Tsrcgen232014* r, Tnode213790* n, NU8 renderflags);
N_NIMCALL(void, getnexttok_232058)(Tsrcgen232014* r, NU8* kind, NimStringDesc** literal);
N_NIMCALL(void, dispa_358067)(Ropeobj168006** dest, NimStringDesc* xml, NimStringDesc* tex, Ropeobj168006** args, NI argsLen0);
N_NIMCALL(void, addf_169205)(Ropeobj168006** c, NimStringDesc* frmt, Ropeobj168006** args, NI argsLen0);
N_NIMCALL(NimStringDesc*, escape_351034)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, renderplainsymbolname_355004)(Tnode213790* n);
N_NIMCALL(NimStringDesc*, complexname_358678)(NU8 k, Tnode213790* n, NimStringDesc* basename);
N_NIMCALL(NimStringDesc*, renderparamtypes_357634)(Tnode213790* n, NimStringDesc* sep);
N_NIMCALL(NimStringDesc*, encodeurl_354001)(NimStringDesc* s);
N_NIMCALL(Ropeobj168006*, rope_168401)(NI64 i);
N_NIMCALL(NimStringDesc*, newuniqueplainsymbol_358662)(Tdocumentor358004* d, NimStringDesc* original);
N_NIMCALL(void, nstPut)(Stringtableobj140209* t, NimStringDesc* key, NimStringDesc* val);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, getconfigvar_159282)(NimStringDesc* key);
N_NIMCALL(Ropeobj168006*, ropeformatnamedvars_358110)(NimStringDesc* frmt, NimStringDesc** varnames, NI varnamesLen0, Ropeobj168006** varvalues, NI varvaluesLen0);
N_NIMCALL(void, add_168482)(Ropeobj168006** a, Ropeobj168006* b);
N_NIMCALL(void, internalerror_186113)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, getvaridx_358084)(NimStringDesc** varnames, NI varnamesLen0, NimStringDesc* id);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, rawmessage_184612)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_80010, NI last);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI first, NI last);
N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, nosextractFilename)(NimStringDesc* path);
N_NIMCALL(NIM_BOOL, iscallable_358693)(Tnode213790* n);
N_NIMCALL(void, setindexterm_325683)(Rstgenerator325010* d, NimStringDesc* id, NimStringDesc* term, NimStringDesc* linktitle, NimStringDesc* linkdesc);
N_NIMCALL(NimStringDesc*, docstringsummary_358697)(NimStringDesc* rsttext);
N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s, NIM_CHAR sub, NI start);
N_NIMCALL(void, nsuDelete)(NimStringDesc** s, NI first, NI last);
N_NIMCALL(NI, nsuFindCharSet)(NimStringDesc* s, TY201404 chars, NI start);
N_NIMCALL(NI, sonslen_216351)(Tnode213790* n);
N_NIMCALL(NIM_BOOL, checkforfalse_358941)(Tnode213790* n);
N_NIMCALL(NIM_BOOL, identeq_188450)(Tident188012* id, NimStringDesc* name);
N_NIMCALL(Tnode213790*, lastson_216364)(Tnode213790* n);
N_NIMCALL(void, tracedeps_358955)(Tdocumentor358004* d, Tnode213790* n);
N_NIMCALL(NimStringDesc*, getmodulename_270009)(Tnode213790* n);
N_NIMCALL(void, writeoutput_360697)(Tdocumentor358004* d, NimStringDesc* filename, NimStringDesc* outext, NIM_BOOL usewarning);
N_NIMCALL(Ropeobj168006*, genoutfile_360556)(Tdocumentor358004* d);
N_NIMCALL(void, rendertocentries_331310)(Rstgenerator325010* d, NI* j, NI lvl, NimStringDesc** result);
N_NIMCALL(void, gensection_360492)(Tdocumentor358004* d, NU8 kind);
N_NIMCALL(NimStringDesc*, ntgetDateStr)(void);
N_NIMCALL(NimStringDesc*, ntgetClockStr)(void);
N_NIMCALL(void, writerope_168822)(FILE* f, Ropeobj168006* r);
N_NIMCALL(void, writerope_168836)(Ropeobj168006* head, NimStringDesc* filename, NIM_BOOL usewarning);
N_NIMCALL(NimStringDesc*, getoutfile_159290)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(void, generateindex_360684)(Tdocumentor358004* d);
N_NIMCALL(void, writeindexfile_325421)(Rstgenerator325010* g, NimStringDesc* outfile);
N_NIMCALL(void, nossplitFile)(NimStringDesc* path, TY118906* Result);
N_NIMCALL(void, commandrstaux_360730)(NimStringDesc* filename, NimStringDesc* outext);
N_NIMCALL(NimStringDesc*, nosaddFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, readfile_15666)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(Jsonnodeobj305633*, generatejson_359707)(Tdocumentor358004* d, Tnode213790* n, Jsonnodeobj305633* jarray);
N_NIMCALL(Jsonnodeobj305633*, HEX25_306040)(TY306043* keyvals, NI keyvalsLen0);
N_NIMCALL(Jsonnodeobj305633*, HEX25_305988)(NimStringDesc* s);
N_NIMCALL(Jsonnodeobj305633*, genjsonitem_358917)(Tdocumentor358004* d, Tnode213790* n, Tnode213790* namenode, NU8 k);
N_NIMCALL(NimStringDesc*, HEX24_168856)(Ropeobj168006* r);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_85209, TNimType* typ);
static N_INLINE(void, HEX5BHEX5DHEX3D_308413)(Jsonnodeobj305633* obj, NimStringDesc* key, Jsonnodeobj305633* val);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_306431)(Jsonnodeobj305633* a, Jsonnodeobj305633* b);
N_NIMCALL(Jsonnodeobj305633*, newjarray_305781)(void);
N_NIMCALL(void, add_308025)(Jsonnodeobj305633* father, Jsonnodeobj305633* child);
N_NIMCALL(NimStringDesc*, pretty_309754)(Jsonnodeobj305633* node, NI indent);
N_NIMCALL(NimStringDesc*, mergeindexes_330929)(NimStringDesc* dir);
STRING_LITERAL(TMP2240, "##", 2);
STRING_LITERAL(TMP2241, "", 0);
STRING_LITERAL(TMP2763, "\012##", 3);
STRING_LITERAL(TMP2764, "\012", 1);
static NIM_CONST TY201404 TMP2765 = {
0x00, 0x3E, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP5038, "doc.googleAnalytics", 19);
STRING_LITERAL(TMP5039, "<script>\012  (function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']="
"r;i[r]=i[r]||function(){\012  (i[r].q=i[r].q||[]).push(arguments)},"
"i[r].l=1*new Date();a=s.createElement(o),\012  m=s.getElementsByTag"
"Name(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\012  })"
"(window,document,\'script\',\'//www.google-analytics.com/analytics."
"js\',\'ga\');\012\012  ga(\'create\', \'$1\', \'auto\');\012  ga(\'send\', \'pageview"
"\');\012\012</script>\012    ", 402);
STRING_LITERAL(TMP5040, "doc.googleAnalytics", 19);
STRING_LITERAL(TMP5045, "`", 1);
STRING_LITERAL(TMP5046, "getName()", 9);
STRING_LITERAL(TMP5047, "<span class=\"Comment\">$1</span>", 31);
STRING_LITERAL(TMP5048, "\\spanComment{$1}", 16);
STRING_LITERAL(TMP5049, "<span class=\"Keyword\">$1</span>", 31);
STRING_LITERAL(TMP5050, "\\spanKeyword{$1}", 16);
STRING_LITERAL(TMP5051, "<span class=\"Operator\">$1</span>", 32);
STRING_LITERAL(TMP5052, "\\spanOperator{$1}", 17);
STRING_LITERAL(TMP5053, "<span class=\"StringLit\">$1</span>", 33);
STRING_LITERAL(TMP5054, "\\spanStringLit{$1}", 18);
STRING_LITERAL(TMP5055, "<span class=\"CharLit\">$1</span>", 31);
STRING_LITERAL(TMP5056, "\\spanCharLit{$1}", 16);
STRING_LITERAL(TMP5057, "<span class=\"DecNumber\">$1</span>", 33);
STRING_LITERAL(TMP5058, "\\spanDecNumber{$1}", 18);
STRING_LITERAL(TMP5059, "<span class=\"FloatNumber\">$1</span>", 35);
STRING_LITERAL(TMP5060, "\\spanFloatNumber{$1}", 20);
STRING_LITERAL(TMP5061, "<span class=\"Identifier\">$1</span>", 34);
STRING_LITERAL(TMP5062, "\\spanIdentifier{$1}", 19);
STRING_LITERAL(TMP5063, "<span class=\"Other\">$1</span>", 29);
STRING_LITERAL(TMP5064, "\\spanOther{$1}", 14);
STRING_LITERAL(TMP5074, ",", 1);
STRING_LITERAL(TMP5075, ".m,", 3);
STRING_LITERAL(TMP5076, ".e,", 3);
STRING_LITERAL(TMP5077, ".i,", 3);
STRING_LITERAL(TMP5078, ".t,", 3);
STRING_LITERAL(TMP5079, ".c,", 3);
STRING_LITERAL(TMP5085, "_", 1);
STRING_LITERAL(TMP5086, "doc.item.seesrc", 15);
STRING_LITERAL(TMP5087, "$", 1);
STRING_LITERAL(TMP5088, "ropeFormatNamedVars", 19);
STRING_LITERAL(TMP5089, "}", 1);
STRING_LITERAL(TMP5091, "path", 4);
STRING_LITERAL(TMP5092, "line", 4);
NIM_CONST TY183169 TMP5090 = {((NimStringDesc*) &TMP5091),
((NimStringDesc*) &TMP5092)}
;
STRING_LITERAL(TMP5093, "$1", 2);
STRING_LITERAL(TMP5095, "url", 3);
NIM_CONST TY183156 TMP5094 = {((NimStringDesc*) &TMP5091),
((NimStringDesc*) &TMP5092),
((NimStringDesc*) &TMP5095)}
;
STRING_LITERAL(TMP5096, "doc.item", 8);
STRING_LITERAL(TMP5098, "name", 4);
STRING_LITERAL(TMP5099, "header", 6);
STRING_LITERAL(TMP5100, "desc", 4);
STRING_LITERAL(TMP5101, "itemID", 6);
STRING_LITERAL(TMP5102, "header_plain", 12);
STRING_LITERAL(TMP5103, "itemSym", 7);
STRING_LITERAL(TMP5104, "itemSymOrID", 11);
STRING_LITERAL(TMP5105, "itemSymEnc", 10);
STRING_LITERAL(TMP5106, "itemSymOrIDEnc", 14);
STRING_LITERAL(TMP5107, "seeSrc", 6);
NIM_CONST TY358900 TMP5097 = {((NimStringDesc*) &TMP5098),
((NimStringDesc*) &TMP5099),
((NimStringDesc*) &TMP5100),
((NimStringDesc*) &TMP5101),
((NimStringDesc*) &TMP5102),
((NimStringDesc*) &TMP5103),
((NimStringDesc*) &TMP5104),
((NimStringDesc*) &TMP5105),
((NimStringDesc*) &TMP5106),
((NimStringDesc*) &TMP5107)}
;
STRING_LITERAL(TMP5108, "doc.item.toc", 12);
NIM_CONST TY358905 TMP5109 = {((NimStringDesc*) &TMP5098),
((NimStringDesc*) &TMP5099),
((NimStringDesc*) &TMP5100),
((NimStringDesc*) &TMP5101),
((NimStringDesc*) &TMP5102),
((NimStringDesc*) &TMP5103),
((NimStringDesc*) &TMP5104),
((NimStringDesc*) &TMP5105),
((NimStringDesc*) &TMP5106)}
;
STRING_LITERAL(TMP5110, " : ", 3);
STRING_LITERAL(TMP5111, "\342\200\246", 3);
static NIM_CONST TY201404 TMP5112 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP5113, "false", 5);
STRING_LITERAL(TMP5114, ", ", 2);
STRING_LITERAL(TMP5115, "<a class=\"reference external\" href=\"$1.html\">$1</a>", 51);
STRING_LITERAL(TMP5120, "Imports", 7);
STRING_LITERAL(TMP5121, "Types", 5);
STRING_LITERAL(TMP5122, "Vars", 4);
STRING_LITERAL(TMP5123, "Lets", 4);
STRING_LITERAL(TMP5124, "Consts", 6);
STRING_LITERAL(TMP5125, "Procs", 5);
STRING_LITERAL(TMP5126, "Methods", 7);
STRING_LITERAL(TMP5127, "Iterators", 9);
STRING_LITERAL(TMP5128, "Converters", 10);
STRING_LITERAL(TMP5129, "Macros", 6);
STRING_LITERAL(TMP5130, "Templates", 9);
NIM_CONST TY360498 sectionnames_360496 = {((NimStringDesc*) &TMP5120),
((NimStringDesc*) &TMP5121),
((NimStringDesc*) &TMP5122),
((NimStringDesc*) &TMP5123),
((NimStringDesc*) &TMP5124),
((NimStringDesc*) &TMP5122),
((NimStringDesc*) &TMP5125),
((NimStringDesc*) &TMP5126),
((NimStringDesc*) &TMP5127),
((NimStringDesc*) &TMP5128),
((NimStringDesc*) &TMP5129),
((NimStringDesc*) &TMP5130)}
;
STRING_LITERAL(TMP5131, "doc.section", 11);
STRING_LITERAL(TMP5133, "sectionid", 9);
STRING_LITERAL(TMP5134, "sectionTitle", 12);
STRING_LITERAL(TMP5135, "sectionTitleID", 14);
STRING_LITERAL(TMP5136, "content", 7);
NIM_CONST TY184781 TMP5132 = {((NimStringDesc*) &TMP5133),
((NimStringDesc*) &TMP5134),
((NimStringDesc*) &TMP5135),
((NimStringDesc*) &TMP5136)}
;
STRING_LITERAL(TMP5137, "doc.section.toc", 15);
STRING_LITERAL(TMP5138, "doc.toc", 7);
NIM_CONST TY182752 TMP5139 = {((NimStringDesc*) &TMP5136)}
;
STRING_LITERAL(TMP5140, "Module ", 7);
STRING_LITERAL(TMP5141, "doc.body_toc", 12);
STRING_LITERAL(TMP5142, "doc.body_no_toc", 15);
STRING_LITERAL(TMP5144, "title", 5);
STRING_LITERAL(TMP5145, "tableofcontents", 15);
STRING_LITERAL(TMP5146, "moduledesc", 10);
STRING_LITERAL(TMP5147, "date", 4);
STRING_LITERAL(TMP5148, "time", 4);
NIM_CONST TY418660 TMP5143 = {((NimStringDesc*) &TMP5144),
((NimStringDesc*) &TMP5145),
((NimStringDesc*) &TMP5146),
((NimStringDesc*) &TMP5147),
((NimStringDesc*) &TMP5148),
((NimStringDesc*) &TMP5136)}
;
STRING_LITERAL(TMP5149, "doc.file", 8);
STRING_LITERAL(TMP5151, "author", 6);
STRING_LITERAL(TMP5152, "version", 7);
STRING_LITERAL(TMP5153, "analytics", 9);
NIM_CONST TY358905 TMP5150 = {((NimStringDesc*) &TMP5144),
((NimStringDesc*) &TMP5145),
((NimStringDesc*) &TMP5146),
((NimStringDesc*) &TMP5147),
((NimStringDesc*) &TMP5148),
((NimStringDesc*) &TMP5136),
((NimStringDesc*) &TMP5151),
((NimStringDesc*) &TMP5152),
((NimStringDesc*) &TMP5153)}
;
STRING_LITERAL(TMP5154, "html", 4);
STRING_LITERAL(TMP5155, ".idx", 4);
STRING_LITERAL(TMP5161, "txt", 3);
STRING_LITERAL(TMP5163, "\\-", 2);
STRING_LITERAL(TMP5164, "tex", 3);
STRING_LITERAL(TMP5172, "comment", 7);
STRING_LITERAL(TMP5173, "type", 4);
STRING_LITERAL(TMP5174, "description", 11);
STRING_LITERAL(TMP5175, "code", 4);
STRING_LITERAL(TMP5185, "json", 4);
STRING_LITERAL(TMP5225, "Index", 5);
STRING_LITERAL(TMP5226, "theindex", 8);
extern NI32 gprojectmainidx_159203;
extern TNimType NTI325010; /* RstGenerator */
TNimType NTI358004; /* TDocumentor */
extern TNimType NTI168004; /* Rope */
extern TNimType NTI104; /* int */
TNimType NTI358002; /* TSections */
extern TNimType NTI138; /* string */
extern TNimType NTI140211; /* StringTableRef */
TNimType NTI358006; /* PDoc */
extern NU8 gcmd_159123;
extern Stringtableobj140209* gconfigvars_159195;
extern Gcheap50018 gch_50059;
extern NimStringDesc* gprojectfull_159201;
extern NimStringDesc* docseesrcurl_159128;
extern NU32 gglobaloptions_159121;
extern NimStringDesc* outfile_159127;
extern NimStringDesc* splitter_325441;
extern TNimType NTI213435; /* TSymKind */

static N_INLINE(NI, safelen_214081)(Tnode213790* n) {
	NI result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*n).kind >= ((NU8) 0) && (*n).kind <= ((NU8) 23));
		if (LOC3) goto LA4;
		LOC3 = (*n).kindU.S6.sons == 0;
		LA4: ;
		if (!LOC3) goto LA5;
		result = ((NI) 0);
	}
	goto LA1;
	LA5: ;
	{
		result = ((*n).kindU.S6.sons ? (*n).kindU.S6.sons->Sup.len : 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tnode213790*, finddoccomment_358402)(Tnode213790* n) {
	Tnode213790* result;
{	result = 0;
	{
		if (!(n == NIM_NIL)) goto LA3;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = !((*n).comment == 0);
		if (!(LOC7)) goto LA8;
		LOC7 = nsuStartsWith((*n).comment, ((NimStringDesc*) &TMP2240));
		LA8: ;
		if (!LOC7) goto LA9;
		result = n;
		goto BeforeRet;
	}
	LA9: ;
	{
		NI i_358431;
		NI HEX3Atmp_358446;
		NI LOC12;
		NI res_358449;
		i_358431 = 0;
		HEX3Atmp_358446 = 0;
		LOC12 = 0;
		LOC12 = safelen_214081(n);
		HEX3Atmp_358446 = (NI)(LOC12 - ((NI) 1));
		res_358449 = ((NI) 0);
		{
			while (1) {
				if (!(res_358449 <= HEX3Atmp_358446)) goto LA14;
				i_358431 = res_358449;
				result = finddoccomment_358402((*n).kindU.S6.sons->data[i_358431]);
				{
					if (!!((result == NIM_NIL))) goto LA17;
					goto BeforeRet;
				}
				LA17: ;
				res_358449 += ((NI) 1);
			} LA14: ;
		}
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, docgenfindfile_358027)(NimStringDesc* s) {
	NimStringDesc* result;
	result = 0;
	result = findfile_160480(s);
	{
		NimStringDesc* LOC5;
		if (!((result ? result->Sup.len : 0) == ((NI) 0))) goto LA3;
		LOC5 = 0;
		LOC5 = nosgetCurrentDir();
		result = HEX2F_118665(LOC5, s);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = nosexistsFile(result);
			if (!!(LOC8)) goto LA9;
			result = copyString(((NimStringDesc*) &TMP2241));
		}
		LA9: ;
	}
	LA3: ;
	return result;
}

static N_INLINE(Tlineinfo181337, newlineinfo_182029)(NimStringDesc* filename, NI line, NI col) {
	Tlineinfo181337 result;
	NI32 LOC1;
	memset((void*)(&result), 0, sizeof(result));
	LOC1 = 0;
	LOC1 = fileinfoidx_182016(filename);
	result = newlineinfo_182023(LOC1, line, col);
	return result;
}

N_NIMCALL(void, compilermsghandler_358017)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU16 k;
	Tlineinfo181337 LOC11;
	k = 0;
	switch (msgkind) {
	case ((NU8) 0):
	{
		k = ((NU16) 3);
	}
	break;
	case ((NU8) 1):
	{
		k = ((NU16) 193);
	}
	break;
	case ((NU8) 2):
	{
		k = ((NU16) 196);
	}
	break;
	case ((NU8) 3):
	{
		k = ((NU16) 198);
	}
	break;
	case ((NU8) 4):
	{
		k = ((NU16) 197);
	}
	break;
	case ((NU8) 5):
	{
		k = ((NU16) 31);
	}
	break;
	case ((NU8) 6):
	{
		k = ((NU16) 245);
	}
	break;
	case ((NU8) 7):
	{
		k = ((NU16) 246);
	}
	break;
	case ((NU8) 8):
	{
		k = ((NU16) 247);
	}
	break;
	case ((NU8) 9):
	{
		k = ((NU16) 248);
	}
	break;
	}
	LOC11 = newlineinfo_182029(filename, line, col);
	globalerror_186071(LOC11, k, arg);
}

N_NIMCALL(Rstnode312008*, parserst_358031)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 rstoptions) {
	Rstnode312008* result;
	result = 0;
	result = rstparse_319250(text, filename, line, column, hastoc, rstoptions, docgenfindfile_358027, compilermsghandler_358017);
	return result;
}

static N_INLINE(NI, tolinenumber_182415)(Tlineinfo181337 info) {
	NI result;
	result = 0;
	result = ((NI) (info.line));
	return result;
}

static N_INLINE(NI, tocolumn_182419)(Tlineinfo181337 info) {
	NI result;
	result = 0;
	result = ((NI) (info.col));
	return result;
}

N_NIMCALL(NimStringDesc*, extractdoccomment_358453)(Tsym213822* s, Tdocumentor358004* d) {
	NimStringDesc* result;
	Tnode213790* n;
	result = 0;
	n = finddoccomment_358402((*s).ast);
	result = copyString(((NimStringDesc*) &TMP2241));
	{
		if (!!(n == 0)) goto LA3;
		{
			NIM_BOOL dummyhastoc;
			Rstgenerator325010* LOC9;
			NimStringDesc* LOC10;
			NI LOC11;
			NI LOC12;
			Rstnode312008* LOC13;
			if (!!(d == 0)) goto LA7;
			dummyhastoc = 0;
			LOC9 = 0;
			LOC9 = &d->Sup;
			LOC10 = 0;
			LOC10 = tofilename_182262((*n).info.fileindex);
			LOC11 = 0;
			LOC11 = tolinenumber_182415((*n).info);
			LOC12 = 0;
			LOC12 = tocolumn_182419((*n).info);
			LOC13 = 0;
			LOC13 = parserst_358031((*n).comment, LOC10, LOC11, LOC12, (&dummyhastoc), ((*d).Sup.options | 1));
			renderrsttoout_325599(LOC9, LOC13, (&result));
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			LOC15 = 0;
			LOC15 = copyStr((*n).comment, ((NI) 2));
			LOC16 = 0;
			LOC16 = nsuReplaceStr(LOC15, ((NimStringDesc*) &TMP2763), ((NimStringDesc*) &TMP2764));
			result = nsuStrip(LOC16, NIM_TRUE, NIM_TRUE, TMP2765);
		}
		LA5: ;
	}
	LA3: ;
	return result;
}
N_NIMCALL(void, TMP5034)(void* p, NI op) {
	Tdocumentor358004* a;
	NI LOC1;
	NI LOC2;
	NI LOC3;
	a = (Tdocumentor358004*)p;
	nimGCvisit((void*)(*a).Sup.config, op);
	nimGCvisit((void*)(*a).Sup.tocpart, op);
	nimGCvisit((void*)(*a).Sup.theindex, op);
	nimGCvisit((void*)(*a).Sup.filename, op);
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < 5; LOC1++) {
	nimGCvisit((void*)(*a).Sup.meta[LOC1], op);
	}
	nimGCvisit((void*)(*a).Sup.currentsection, op);
	nimGCvisit((void*)(*a).Sup.seenindexterms.data, op);
	nimGCvisit((void*)(*a).moddesc, op);
	LOC2 = 0;
	for (LOC2 = 0; LOC2 < 25; LOC2++) {
	nimGCvisit((void*)(*a).toc[LOC2], op);
	}
	LOC3 = 0;
	for (LOC3 = 0; LOC3 < 25; LOC3++) {
	nimGCvisit((void*)(*a).section[LOC3], op);
	}
	nimGCvisit((void*)(*a).indexvalfilename, op);
	nimGCvisit((void*)(*a).analytics, op);
	nimGCvisit((void*)(*a).seensymbols, op);
}

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

static N_INLINE(void, rtladdzct_53201)(Cell47704* c) {
	addzct_51617((&gch_50059.zct), c);
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Cell47704* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_51640(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Cell47704* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_51640((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA11;
			rtladdzct_53201(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Cell47704* c;
	c = usrtocell_51640(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_53201(c);
	}
	LA3: ;
}

static N_INLINE(NIM_BOOL, canbecycleroot_51658)(Cell47704* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).typ).flags &(1U<<((NU)(((NU8) 1))&7U)))!=0));
	return result;
}

static N_INLINE(void, rtladdcycleroot_52420)(Cell47704* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_48447((&gch_50059.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, incref_54019)(Cell47704* c) {
	(*c).refcount = (NI)((NU64)((*c).refcount) + (NU64)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_51658(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_52420(c);
	}
	LA4: ;
}

static N_INLINE(void, decref_53601)(Cell47704* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_53201(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_51658(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_52420(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Cell47704* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_51640(src);
		incref_54019(LOC5);
	}
	LA3: ;
	{
		Cell47704* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_51640((*dest));
		decref_53601(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

N_NIMCALL(Tdocumentor358004*, newdocumentor_358041)(NimStringDesc* filename, Stringtableobj140209* config) {
	Tdocumentor358004* result;
	Rstgenerator325010* LOC1;
	NU8 LOC2;
	result = 0;
	result = (Tdocumentor358004*) newObj((&NTI358006), sizeof(Tdocumentor358004));
	(*result).Sup.Sup.m_type = (&NTI358004);
	LOC1 = 0;
	LOC1 = &result->Sup;
	LOC2 = 0;
	{
		if (!!((gcmd_159123 == ((NU8) 17)))) goto LA5;
		LOC2 = ((NU8) 0);
	}
	goto LA3;
	LA5: ;
	{
		LOC2 = ((NU8) 1);
	}
	LA3: ;
	initrstgenerator_325078(LOC1, LOC2, gconfigvars_159195, filename, 4, docgenfindfile_358027, compilermsghandler_358017);
	{
		NIM_BOOL LOC10;
		TY182752 LOC13;
		LOC10 = 0;
		LOC10 = nsthasKey(config, ((NimStringDesc*) &TMP5038));
		if (!LOC10) goto LA11;
		memset((void*)LOC13, 0, sizeof(LOC13));
		LOC13[0] = getordefault_140814(config, ((NimStringDesc*) &TMP5040));
		asgnRefNoCycle((void**) (&(*result).analytics), nsuFormatOpenArray(((NimStringDesc*) &TMP5039), LOC13, 1));
	}
	goto LA8;
	LA11: ;
	{
		NimStringDesc* LOC15;
		LOC15 = 0;
		LOC15 = (*result).analytics; (*result).analytics = copyStringRC1(((NimStringDesc*) &TMP2241));
		if (LOC15) nimGCunrefNoCycle(LOC15);
	}
	LA8: ;
	asgnRef((void**) (&(*result).seensymbols), nstnewStringTable(((NU8) 1)));
	(*result).id = ((NI) 100);
	return result;
}

N_NIMCALL(NimStringDesc*, gencomment_358266)(Tdocumentor358004* d, Tnode213790* n) {
	NimStringDesc* result;
	NIM_BOOL dummyhastoc;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2241));
	dummyhastoc = 0;
	{
		Rstgenerator325010* LOC5;
		NimStringDesc* LOC6;
		NI LOC7;
		NI LOC8;
		Rstnode312008* LOC9;
		if (!!(((*n).comment == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = &d->Sup;
		LOC6 = 0;
		LOC6 = tofilename_182262((*n).info.fileindex);
		LOC7 = 0;
		LOC7 = tolinenumber_182415((*n).info);
		LOC8 = 0;
		LOC8 = tocolumn_182419((*n).info);
		LOC9 = 0;
		LOC9 = parserst_358031((*n).comment, LOC6, LOC7, LOC8, (&dummyhastoc), (*d).Sup.options);
		renderrsttoout_325599(LOC5, LOC9, (&result));
	}
	LA3: ;
	return result;
}

static N_INLINE(NI, len_214059)(Tnode213790* n) {
	NI result;
	result = 0;
	{
		if (!(*n).kindU.S6.sons == 0) goto LA3;
		result = ((NI) 0);
	}
	goto LA1;
	LA3: ;
	{
		result = ((*n).kindU.S6.sons ? (*n).kindU.S6.sons->Sup.len : 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isvisible_358496)(Tnode213790* n) {
	NIM_BOOL result;
	result = 0;
	result = NIM_FALSE;
	{
		if (!((*n).kind == ((NU8) 31))) goto LA3;
		{
			NIM_BOOL LOC7;
			NI LOC8;
			Tident188012* v;
			NIM_BOOL LOC12;
			LOC7 = 0;
			LOC8 = 0;
			LOC8 = len_214059(n);
			LOC7 = (LOC8 == ((NI) 2));
			if (!(LOC7)) goto LA9;
			LOC7 = ((*(*n).kindU.S6.sons->data[((NI) 0)]).kind == ((NU8) 2));
			LA9: ;
			if (!LOC7) goto LA10;
			v = (*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S5.ident;
			LOC12 = 0;
			LOC12 = ((*v).Sup.id == ((NI) 76));
			if (LOC12) goto LA13;
			LOC12 = ((*v).Sup.id == ((NI) 77));
			LA13: ;
			result = LOC12;
		}
		LA10: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!((*n).kind == ((NU8) 3))) goto LA15;
		result = ((22 & (*(*n).kindU.S4.sym).flags) == 2);
	}
	goto LA1;
	LA15: ;
	{
		if (!((*n).kind == ((NU8) 43))) goto LA18;
		result = isvisible_358496((*n).kindU.S6.sons->data[((NI) 0)]);
	}
	goto LA1;
	LA18: ;
	LA1: ;
	return result;
}

static N_INLINE(Tnode213790*, HEX5BHEX5D_214238)(Tnode213790* n, NI i) {
	Tnode213790* result;
	result = 0;
	result = (*n).kindU.S6.sons->data[i];
	return result;
}

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

N_NIMCALL(NimStringDesc*, getname_358587)(Tdocumentor358004* d, Tnode213790* n, NI splitafter) {
	NimStringDesc* result;
	result = 0;
	switch ((*n).kind) {
	case ((NU8) 31):
	{
		result = getname_358587(d, (*n).kindU.S6.sons->data[((NI) 1)], splitafter);
	}
	break;
	case ((NU8) 43):
	{
		result = getname_358587(d, (*n).kindU.S6.sons->data[((NI) 0)], splitafter);
	}
	break;
	case ((NU8) 3):
	{
		NimStringDesc* LOC4;
		LOC4 = 0;
		LOC4 = renderdefinitionname_232113((*n).kindU.S4.sym, NIM_FALSE);
		result = esc_325484((*d).Sup.target, LOC4, splitafter);
	}
	break;
	case ((NU8) 2):
	{
		result = esc_325484((*d).Sup.target, (*(*n).kindU.S5.ident).s, splitafter);
	}
	break;
	case ((NU8) 53):
	{
		NimStringDesc* LOC13;
		result = esc_325484((*d).Sup.target, ((NimStringDesc*) &TMP5045), ((NI) -1));
		{
			NI i_358616;
			NI HEX3Atmp_358618;
			NI LOC8;
			NI res_358621;
			i_358616 = 0;
			HEX3Atmp_358618 = 0;
			LOC8 = 0;
			LOC8 = len_214059(n);
			HEX3Atmp_358618 = (LOC8 - 1);
			res_358621 = ((NI) 0);
			{
				while (1) {
					Tnode213790* LOC11;
					NimStringDesc* LOC12;
					if (!(res_358621 <= HEX3Atmp_358618)) goto LA10;
					i_358616 = res_358621;
					LOC11 = 0;
					LOC11 = HEX5BHEX5D_214238(n, i_358616);
					LOC12 = 0;
					LOC12 = getname_358587(d, LOC11, splitafter);
					result = resizeString(result, LOC12->Sup.len + 0);
appendString(result, LOC12);
					res_358621 += ((NI) 1);
				} LA10: ;
			}
		}
		LOC13 = 0;
		LOC13 = esc_325484((*d).Sup.target, ((NimStringDesc*) &TMP5045), ((NI) -1));
		result = resizeString(result, LOC13->Sup.len + 0);
appendString(result, LOC13);
	}
	break;
	default:
	{
		internalerror_186100((*n).info, ((NimStringDesc*) &TMP5046));
		result = copyString(((NimStringDesc*) &TMP2241));
	}
	break;
	}
	return result;
}

N_NIMCALL(NimStringDesc*, getplaindocstring_358351)(Tnode213790* n) {
	NimStringDesc* result;
{	result = 0;
	result = copyString(((NimStringDesc*) &TMP2241));
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = !(((*n).comment == NIM_NIL));
		if (!(LOC7)) goto LA8;
		LOC7 = nsuStartsWith((*n).comment, ((NimStringDesc*) &TMP2240));
		LA8: ;
		if (!LOC7) goto LA9;
		result = copyString((*n).comment);
	}
	LA9: ;
	{
		if (!((result ? result->Sup.len : 0) < ((NI) 1))) goto LA13;
		{
			if (!!(((*n).kind >= ((NU8) 1) && (*n).kind <= ((NU8) 23)))) goto LA17;
			{
				NI i_358392;
				NI HEX3Atmp_358395;
				NI LOC20;
				NI res_358398;
				i_358392 = 0;
				HEX3Atmp_358395 = 0;
				LOC20 = 0;
				LOC20 = len_214059(n);
				HEX3Atmp_358395 = (NI)(LOC20 - ((NI) 1));
				res_358398 = ((NI) 0);
				{
					while (1) {
						if (!(res_358398 <= HEX3Atmp_358395)) goto LA22;
						i_358392 = res_358398;
						result = getplaindocstring_358351((*n).kindU.S6.sons->data[i_358392]);
						{
							if (!(((NI) 0) < (result ? result->Sup.len : 0))) goto LA25;
							goto BeforeRet;
						}
						LA25: ;
						res_358398 += ((NI) 1);
					} LA22: ;
				}
			}
		}
		LA17: ;
	}
	LA13: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Ropeobj168006*, genreccomment_358277)(Tdocumentor358004* d, Tnode213790* n) {
	Ropeobj168006* result;
	NimStringDesc* LOC5;
{	result = 0;
	{
		if (!(n == NIM_NIL)) goto LA3;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = gencomment_358266(d, n);
	result = rope_168277(LOC5);
	{
		if (!(result == NIM_NIL)) goto LA8;
		{
			if (!!(((*n).kind >= ((NU8) 1) && (*n).kind <= ((NU8) 23) || (*n).kind == ((NU8) 150)))) goto LA12;
			{
				NI i_358328;
				NI HEX3Atmp_358344;
				NI LOC15;
				NI res_358347;
				i_358328 = 0;
				HEX3Atmp_358344 = 0;
				LOC15 = 0;
				LOC15 = len_214059(n);
				HEX3Atmp_358344 = (NI)(LOC15 - ((NI) 1));
				res_358347 = ((NI) 0);
				{
					while (1) {
						if (!(res_358347 <= HEX3Atmp_358344)) goto LA17;
						i_358328 = res_358347;
						result = genreccomment_358277(d, (*n).kindU.S6.sons->data[i_358328]);
						{
							if (!!((result == NIM_NIL))) goto LA20;
							goto BeforeRet;
						}
						LA20: ;
						res_358347 += ((NI) 1);
					} LA17: ;
				}
			}
		}
		LA12: ;
	}
	goto LA6;
	LA8: ;
	{
		NimStringDesc* LOC23;
		LOC23 = 0;
		LOC23 = (*n).comment; (*n).comment = copyStringRC1(NIM_NIL);
		if (LOC23) nimGCunrefNoCycle(LOC23);
	}
	LA6: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, dispa_358067)(Ropeobj168006** dest, NimStringDesc* xml, NimStringDesc* tex, Ropeobj168006** args, NI argsLen0) {
	{
		if (!!((gcmd_159123 == ((NU8) 17)))) goto LA3;
		addf_169205(dest, xml, args, argsLen0);
	}
	goto LA1;
	LA3: ;
	{
		addf_169205(dest, tex, args, argsLen0);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, complexname_358678)(NU8 k, Tnode213790* n, NimStringDesc* basename) {
	NimStringDesc* result;
	result = 0;
	result = copyString(basename);
	switch (k) {
	case ((NU8) 12):
	{
		result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP5074));
	}
	break;
	case ((NU8) 16):
	{
		result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP5075));
	}
	break;
	case ((NU8) 13):
	{
		result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP5076));
	}
	break;
	case ((NU8) 14):
	{
		result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP5077));
	}
	break;
	case ((NU8) 17):
	{
		result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP5078));
	}
	break;
	case ((NU8) 15):
	{
		result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP5079));
	}
	break;
	default:
	{
	}
	break;
	}
	{
		NIM_BOOL LOC10;
		NI LOC11;
		Tnode213790* LOC13;
		Tnode213790* LOC16;
		NimStringDesc* LOC17;
		LOC10 = 0;
		LOC11 = 0;
		LOC11 = len_214059(n);
		LOC10 = (((NI) 3) < LOC11);
		if (!(LOC10)) goto LA12;
		LOC13 = 0;
		LOC13 = HEX5BHEX5D_214238(n, ((NI) 3));
		LOC10 = ((*LOC13).kind == ((NU8) 76));
		LA12: ;
		if (!LOC10) goto LA14;
		LOC16 = 0;
		LOC16 = HEX5BHEX5D_214238(n, ((NI) 3));
		LOC17 = 0;
		LOC17 = renderparamtypes_357634(LOC16, ((NimStringDesc*) &TMP5074));
		result = resizeString(result, LOC17->Sup.len + 0);
appendString(result, LOC17);
	}
	LA14: ;
	return result;
}

N_NIMCALL(NimStringDesc*, newuniqueplainsymbol_358662)(Tdocumentor358004* d, NimStringDesc* original) {
	NimStringDesc* result;
	NI count;
{	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = nsthasKey((*d).seensymbols, original);
		if (!!(LOC3)) goto LA4;
		result = copyString(original);
		nstPut((*d).seensymbols, original, ((NimStringDesc*) &TMP2241));
		goto BeforeRet;
	}
	LA4: ;
	count = ((NI) 2);
	{
		while (1) {
			NimStringDesc* LOC8;
			NimStringDesc* LOC9;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = nimIntToStr(count);
			LOC8 = rawNewString(original->Sup.len + LOC9->Sup.len + 1);
appendString(LOC8, original);
appendString(LOC8, ((NimStringDesc*) &TMP5085));
appendString(LOC8, LOC9);
			result = LOC8;
			{
				NIM_BOOL LOC12;
				LOC12 = 0;
				LOC12 = nsthasKey((*d).seensymbols, result);
				if (!!(LOC12)) goto LA13;
				nstPut((*d).seensymbols, result, ((NimStringDesc*) &TMP2241));
				goto LA6;
			}
			LA13: ;
			count += ((NI) 1);
		}
	} LA6: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, getvaridx_358084)(NimStringDesc** varnames, NI varnamesLen0, NimStringDesc* id) {
	NI result;
{	result = 0;
	{
		NI i_358101;
		NI HEX3Atmp_358103;
		NI res_358106;
		i_358101 = 0;
		HEX3Atmp_358103 = 0;
		HEX3Atmp_358103 = (varnamesLen0-1);
		res_358106 = ((NI) 0);
		{
			while (1) {
				if (!(res_358106 <= HEX3Atmp_358103)) goto LA3;
				i_358101 = res_358106;
				{
					NI LOC6;
					LOC6 = 0;
					LOC6 = nsuCmpIgnoreStyle(varnames[i_358101], id);
					if (!(LOC6 == ((NI) 0))) goto LA7;
					result = i_358101;
					goto BeforeRet;
				}
				LA7: ;
				res_358106 += ((NI) 1);
			} LA3: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Ropeobj168006*, ropeformatnamedvars_358110)(NimStringDesc* frmt, NimStringDesc** varnames, NI varnamesLen0, Ropeobj168006** varvalues, NI varvaluesLen0) {
	Ropeobj168006* result;
	NI i;
	NI L;
	NI num;
	result = 0;
	i = ((NI) 0);
	L = (frmt ? frmt->Sup.len : 0);
	result = NIM_NIL;
	num = ((NI) 0);
	{
		while (1) {
			NI start;
			if (!(i < L)) goto LA2;
			{
				if (!((NU8)(frmt->data[i]) == (NU8)(36))) goto LA5;
				i += ((NI) 1);
				switch (((NU8)(frmt->data[i]))) {
				case 35:
				{
					add_168482(&result, varvalues[num]);
					num += ((NI) 1);
					i += ((NI) 1);
				}
				break;
				case 36:
				{
					add_168487(&result, ((NimStringDesc*) &TMP5087));
					i += ((NI) 1);
				}
				break;
				case 48 ... 57:
				{
					NI j;
					j = ((NI) 0);
					{
						while (1) {
							j = (NI)((NI)((NI)(j * ((NI) 10)) + ((NI) (((NU8)(frmt->data[i]))))) - ((NI) 48));
							i += ((NI) 1);
							{
								NIM_BOOL LOC14;
								LOC14 = 0;
								LOC14 = ((NI)((NI)(L + ((NI) 0)) - ((NI) 1)) < i);
								if (LOC14) goto LA15;
								LOC14 = !((((NU8)(frmt->data[i])) >= ((NU8)(48)) && ((NU8)(frmt->data[i])) <= ((NU8)(57))));
								LA15: ;
								if (!LOC14) goto LA16;
								goto LA10;
							}
							LA16: ;
						}
					} LA10: ;
					{
						if (!((NI)((varvaluesLen0-1) + ((NI) 1)) < j)) goto LA20;
						internalerror_186113(((NimStringDesc*) &TMP5088));
					}
					LA20: ;
					num = j;
					add_168482(&result, varvalues[(NI)(j - ((NI) 1))]);
				}
				break;
				case 65 ... 90:
				case 97 ... 122:
				case 128 ... 255:
				{
					NimStringDesc* id;
					NI idx;
					id = copyString(((NimStringDesc*) &TMP2241));
					{
						while (1) {
							id = addChar(id, frmt->data[i]);
							i += ((NI) 1);
							{
								if (!!((((NU8)(frmt->data[i])) >= ((NU8)(65)) && ((NU8)(frmt->data[i])) <= ((NU8)(90)) || ((NU8)(frmt->data[i])) == ((NU8)(95)) || ((NU8)(frmt->data[i])) >= ((NU8)(97)) && ((NU8)(frmt->data[i])) <= ((NU8)(122)) || ((NU8)(frmt->data[i])) >= ((NU8)(128)) && ((NU8)(frmt->data[i])) <= ((NU8)(255))))) goto LA27;
								goto LA23;
							}
							LA27: ;
						}
					} LA23: ;
					idx = getvaridx_358084(varnames, varnamesLen0, id);
					{
						if (!(((NI) 0) <= idx)) goto LA31;
						add_168482(&result, varvalues[idx]);
					}
					goto LA29;
					LA31: ;
					{
						rawmessage_184612(((NU16) 156), id);
					}
					LA29: ;
				}
				break;
				case 123:
				{
					NimStringDesc* id;
					NI idx;
					id = copyString(((NimStringDesc*) &TMP2241));
					i += ((NI) 1);
					{
						while (1) {
							if (!!(((NU8)(frmt->data[i]) == (NU8)(125)))) goto LA36;
							{
								if (!((NU8)(frmt->data[i]) == (NU8)(0))) goto LA39;
								rawmessage_184612(((NU16) 24), ((NimStringDesc*) &TMP5089));
							}
							LA39: ;
							id = addChar(id, frmt->data[i]);
							i += ((NI) 1);
						} LA36: ;
					}
					i += ((NI) 1);
					idx = getvaridx_358084(varnames, varnamesLen0, id);
					{
						if (!(((NI) 0) <= idx)) goto LA43;
						add_168482(&result, varvalues[idx]);
					}
					goto LA41;
					LA43: ;
					{
						rawmessage_184612(((NU16) 156), id);
					}
					LA41: ;
				}
				break;
				default:
				{
					internalerror_186113(((NimStringDesc*) &TMP5088));
				}
				break;
				}
			}
			LA5: ;
			start = i;
			{
				while (1) {
					if (!(i < L)) goto LA48;
					{
						if (!!(((NU8)(frmt->data[i]) == (NU8)(36)))) goto LA51;
						i += ((NI) 1);
					}
					goto LA49;
					LA51: ;
					{
						goto LA47;
					}
					LA49: ;
				} LA48: ;
			} LA47: ;
			{
				NimStringDesc* LOC58;
				if (!(start <= (NI)(i - ((NI) 1)))) goto LA56;
				LOC58 = 0;
				LOC58 = copyStrLast(frmt, start, (NI)(i - ((NI) 1)));
				add_168487(&result, LOC58);
			}
			LA56: ;
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NIM_BOOL, iscallable_358693)(Tnode213790* n) {
	NIM_BOOL result;
	result = 0;
	switch ((*n).kind) {
	case ((NU8) 79):
	case ((NU8) 80):
	case ((NU8) 84):
	case ((NU8) 82):
	case ((NU8) 83):
	case ((NU8) 81):
	{
		result = NIM_TRUE;
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(NimStringDesc*, docstringsummary_358697)(NimStringDesc* rsttext) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NI pos;
	NI last;
{	result = 0;
	LOC1 = 0;
	LOC1 = copyStr(rsttext, ((NI) 2));
	result = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2765);
	pos = nsuFindChar(result, 10, ((NI) 0));
	{
		if (!(((NI) 0) < pos)) goto LA4;
		nsuDelete((&result), pos, (NI)((result ? result->Sup.len : 0) - ((NI) 1)));
		result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP5111));
	}
	LA4: ;
	{
		if (!(pos < ((NI) 100))) goto LA8;
		goto BeforeRet;
	}
	LA8: ;
	pos = nsuFindCharSet(result, TMP5112, ((NI) 0));
	last = (NI)((result ? result->Sup.len : 0) - ((NI) 1));
	{
		NIM_BOOL LOC12;
		LOC12 = 0;
		LOC12 = (((NI) 0) < pos);
		if (!(LOC12)) goto LA13;
		LOC12 = (pos < last);
		LA13: ;
		if (!LOC12) goto LA14;
		nsuDelete((&result), pos, last);
		result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP5111));
	}
	LA14: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, genitem_358806)(Tdocumentor358004* d, Tnode213790* n, Tnode213790* namenode, NU8 k) {
	NimStringDesc* name;
	Ropeobj168006* namerope;
	NimStringDesc* plaindocstring;
	Ropeobj168006* result;
	NimStringDesc* literal;
	NimStringDesc* plainname;
	NU8 kind;
	Ropeobj168006* comm;
	Tsrcgen232014 r;
	Ropeobj168006* plainnamerope;
	NimStringDesc* LOC42;
	NimStringDesc* LOC43;
	NimStringDesc* cleanplainsymbol;
	NimStringDesc* complexsymbol;
	Ropeobj168006* plainsymbolrope;
	Ropeobj168006* plainsymbolencrope;
	NimStringDesc* LOC44;
	Ropeobj168006* itemidrope;
	NimStringDesc* symbolorid;
	Ropeobj168006* symboloridrope;
	Ropeobj168006* symboloridencrope;
	NimStringDesc* LOC45;
	Ropeobj168006* seesrcrope;
	NimStringDesc* docitemseesrc;
	NimStringDesc* LOC59;
	TY358902 LOC60;
	Ropeobj168006* LOC61;
	NimStringDesc* LOC62;
	TY358907 LOC63;
	NimStringDesc* LOC64;
	Ropeobj168006* LOC65;
	NimStringDesc* linktitle;
	NimStringDesc* LOC66;
	NimStringDesc* LOC67;
	NimStringDesc* LOC68;
	Rstgenerator325010* LOC79;
	NimStringDesc* LOC80;
	NimStringDesc* LOC81;
{	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isvisible_358496(namenode);
		if (!!(LOC3)) goto LA4;
		goto BeforeRet;
	}
	LA4: ;
	name = getname_358587(d, namenode, ((NI) -1));
	namerope = rope_168277(name);
	plaindocstring = getplaindocstring_358351(n);
	result = NIM_NIL;
	literal = copyString(((NimStringDesc*) &TMP2241));
	plainname = copyString(((NimStringDesc*) &TMP2241));
	kind = ((NU8) 1);
	comm = genreccomment_358277(d, n);
	memset((void*)(&r), 0, sizeof(r));
	inittokrender_232050((&r), n, 94);
	{
		while (1) {
			getnexttok_232058((&r), (&kind), (&literal));
			{
				if (!(kind == ((NU8) 1))) goto LA10;
				goto LA6;
			}
			LA10: ;
			plainname = resizeString(plainname, literal->Sup.len + 0);
appendString(plainname, literal);
		}
	} LA6: ;
	inittokrender_232050((&r), n, 14);
	{
		while (1) {
			getnexttok_232058((&r), (&kind), (&literal));
			switch (kind) {
			case ((NU8) 1):
			{
				goto LA12;
			}
			break;
			case ((NU8) 113):
			{
				TY168507 LOC16;
				NimStringDesc* LOC17;
				memset((void*)LOC16, 0, sizeof(LOC16));
				LOC17 = 0;
				LOC17 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC16[0] = rope_168277(LOC17);
				dispa_358067(&result, ((NimStringDesc*) &TMP5047), ((NimStringDesc*) &TMP5048), LOC16, 1);
			}
			break;
			case ((NU8) 3) ... ((NU8) 72):
			{
				TY168507 LOC19;
				memset((void*)LOC19, 0, sizeof(LOC19));
				LOC19[0] = rope_168277(literal);
				dispa_358067(&result, ((NimStringDesc*) &TMP5049), ((NimStringDesc*) &TMP5050), LOC19, 1);
			}
			break;
			case ((NU8) 112):
			{
				TY168507 LOC21;
				NimStringDesc* LOC22;
				memset((void*)LOC21, 0, sizeof(LOC21));
				LOC22 = 0;
				LOC22 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC21[0] = rope_168277(LOC22);
				dispa_358067(&result, ((NimStringDesc*) &TMP5051), ((NimStringDesc*) &TMP5052), LOC21, 1);
			}
			break;
			case ((NU8) 87) ... ((NU8) 89):
			{
				TY168507 LOC24;
				NimStringDesc* LOC25;
				memset((void*)LOC24, 0, sizeof(LOC24));
				LOC25 = 0;
				LOC25 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC24[0] = rope_168277(LOC25);
				dispa_358067(&result, ((NimStringDesc*) &TMP5053), ((NimStringDesc*) &TMP5054), LOC24, 1);
			}
			break;
			case ((NU8) 92):
			{
				TY168507 LOC27;
				NimStringDesc* LOC28;
				memset((void*)LOC27, 0, sizeof(LOC27));
				LOC28 = 0;
				LOC28 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC27[0] = rope_168277(LOC28);
				dispa_358067(&result, ((NimStringDesc*) &TMP5055), ((NimStringDesc*) &TMP5056), LOC27, 1);
			}
			break;
			case ((NU8) 73) ... ((NU8) 82):
			{
				TY168507 LOC30;
				NimStringDesc* LOC31;
				memset((void*)LOC30, 0, sizeof(LOC30));
				LOC31 = 0;
				LOC31 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC30[0] = rope_168277(LOC31);
				dispa_358067(&result, ((NimStringDesc*) &TMP5057), ((NimStringDesc*) &TMP5058), LOC30, 1);
			}
			break;
			case ((NU8) 83) ... ((NU8) 86):
			{
				TY168507 LOC33;
				NimStringDesc* LOC34;
				memset((void*)LOC33, 0, sizeof(LOC33));
				LOC34 = 0;
				LOC34 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC33[0] = rope_168277(LOC34);
				dispa_358067(&result, ((NimStringDesc*) &TMP5059), ((NimStringDesc*) &TMP5060), LOC33, 1);
			}
			break;
			case ((NU8) 2):
			{
				TY168507 LOC36;
				NimStringDesc* LOC37;
				memset((void*)LOC36, 0, sizeof(LOC36));
				LOC37 = 0;
				LOC37 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC36[0] = rope_168277(LOC37);
				dispa_358067(&result, ((NimStringDesc*) &TMP5061), ((NimStringDesc*) &TMP5062), LOC36, 1);
			}
			break;
			case ((NU8) 115):
			case ((NU8) 0):
			{
				add_168487(&result, literal);
			}
			break;
			case ((NU8) 93):
			case ((NU8) 94):
			case ((NU8) 95):
			case ((NU8) 96):
			case ((NU8) 97):
			case ((NU8) 98):
			case ((NU8) 99):
			case ((NU8) 100):
			case ((NU8) 101):
			case ((NU8) 102):
			case ((NU8) 103):
			case ((NU8) 104):
			case ((NU8) 105):
			case ((NU8) 106):
			case ((NU8) 107):
			case ((NU8) 109):
			case ((NU8) 110):
			case ((NU8) 111):
			case ((NU8) 114):
			case ((NU8) 108):
			case ((NU8) 90):
			case ((NU8) 91):
			case ((NU8) 116):
			case ((NU8) 117):
			case ((NU8) 118):
			{
				TY168507 LOC40;
				NimStringDesc* LOC41;
				memset((void*)LOC40, 0, sizeof(LOC40));
				LOC41 = 0;
				LOC41 = esc_325484((*d).Sup.target, literal, ((NI) -1));
				LOC40[0] = rope_168277(LOC41);
				dispa_358067(&result, ((NimStringDesc*) &TMP5063), ((NimStringDesc*) &TMP5064), LOC40, 1);
			}
			break;
			}
		}
	} LA12: ;
	(*d).id += ((NI) 1);
	LOC42 = 0;
	LOC42 = nsuStrip(plainname, NIM_TRUE, NIM_TRUE, TMP2765);
	LOC43 = 0;
	LOC43 = escape_351034(LOC42);
	plainnamerope = rope_168277(LOC43);
	cleanplainsymbol = renderplainsymbolname_355004(namenode);
	complexsymbol = complexname_358678(k, n, cleanplainsymbol);
	plainsymbolrope = rope_168277(cleanplainsymbol);
	LOC44 = 0;
	LOC44 = encodeurl_354001(cleanplainsymbol);
	plainsymbolencrope = rope_168277(LOC44);
	itemidrope = rope_168401(((NI64) ((*d).id)));
	symbolorid = newuniqueplainsymbol_358662(d, complexsymbol);
	symboloridrope = rope_168277(symbolorid);
	LOC45 = 0;
	LOC45 = encodeurl_354001(symbolorid);
	symboloridencrope = rope_168277(LOC45);
	seesrcrope = NIM_NIL;
	docitemseesrc = getconfigvar_159282(((NimStringDesc*) &TMP5086));
	{
		NIM_BOOL LOC48;
		Ropeobj168006* urlrope;
		TY500232 LOC52;
		NimStringDesc* LOC53;
		NimStringDesc* LOC54;
		TY168507 LOC55;
		TY473656 LOC56;
		NimStringDesc* LOC57;
		NimStringDesc* LOC58;
		LOC48 = 0;
		LOC48 = (((NI) 0) < (docitemseesrc ? docitemseesrc->Sup.len : 0));
		if (!(LOC48)) goto LA49;
		LOC48 = (((NI) 0) < (docseesrcurl_159128 ? docseesrcurl_159128->Sup.len : 0));
		LA49: ;
		if (!LOC48) goto LA50;
		memset((void*)LOC52, 0, sizeof(LOC52));
		LOC53 = 0;
		LOC53 = tofilename_182262((*n).info.fileindex);
		LOC52[0] = rope_168277(LOC53);
		LOC54 = 0;
		LOC54 = nimIntToStr(((NI) ((*n).info.line)));
		LOC52[1] = rope_168277(LOC54);
		urlrope = ropeformatnamedvars_358110(docseesrcurl_159128, TMP5090, 2, LOC52, 2);
		memset((void*)LOC55, 0, sizeof(LOC55));
		memset((void*)LOC56, 0, sizeof(LOC56));
		LOC57 = 0;
		LOC57 = tofilename_182262((*n).info.fileindex);
		LOC56[0] = rope_168277(LOC57);
		LOC58 = 0;
		LOC58 = nimIntToStr(((NI) ((*n).info.line)));
		LOC56[1] = rope_168277(LOC58);
		LOC56[2] = urlrope;
		LOC55[0] = ropeformatnamedvars_358110(docitemseesrc, TMP5094, 3, LOC56, 3);
		dispa_358067(&seesrcrope, ((NimStringDesc*) &TMP5093), ((NimStringDesc*) &TMP2241), LOC55, 1);
	}
	LA50: ;
	LOC59 = 0;
	LOC59 = getconfigvar_159282(((NimStringDesc*) &TMP5096));
	memset((void*)LOC60, 0, sizeof(LOC60));
	LOC60[0] = namerope;
	LOC60[1] = result;
	LOC60[2] = comm;
	LOC60[3] = itemidrope;
	LOC60[4] = plainnamerope;
	LOC60[5] = plainsymbolrope;
	LOC60[6] = symboloridrope;
	LOC60[7] = plainsymbolencrope;
	LOC60[8] = symboloridencrope;
	LOC60[9] = seesrcrope;
	LOC61 = 0;
	LOC61 = ropeformatnamedvars_358110(LOC59, TMP5097, 10, LOC60, 10);
	add_168482(&(*d).section[(k)- 0], LOC61);
	LOC62 = 0;
	LOC62 = getconfigvar_159282(((NimStringDesc*) &TMP5108));
	memset((void*)LOC63, 0, sizeof(LOC63));
	LOC64 = 0;
	LOC64 = getname_358587(d, namenode, (*d).Sup.splitafter);
	LOC63[0] = rope_168277(LOC64);
	LOC63[1] = result;
	LOC63[2] = comm;
	LOC63[3] = itemidrope;
	LOC63[4] = plainnamerope;
	LOC63[5] = plainsymbolrope;
	LOC63[6] = symboloridrope;
	LOC63[7] = plainsymbolencrope;
	LOC63[8] = symboloridencrope;
	LOC65 = 0;
	LOC65 = ropeformatnamedvars_358110(LOC62, TMP5109, 9, LOC63, 9);
	add_168482(&(*d).toc[(k)- 0], LOC65);
	LOC66 = 0;
	LOC67 = 0;
	LOC67 = nosextractFilename((*d).Sup.filename);
	LOC68 = 0;
	LOC68 = noschangeFileExt(LOC67, ((NimStringDesc*) &TMP2241));
	LOC66 = rawNewString(LOC68->Sup.len + 3);
appendString(LOC66, LOC68);
appendString(LOC66, ((NimStringDesc*) &TMP5110));
	linktitle = LOC66;
	{
		NIM_BOOL LOC71;
		NimStringDesc* LOC74;
		NimStringDesc* LOC75;
		LOC71 = 0;
		LOC71 = iscallable_358693(n);
		if (!LOC71) goto LA72;
		LOC74 = 0;
		LOC74 = nsuStrip(plainname, NIM_TRUE, NIM_TRUE, TMP2765);
		LOC75 = 0;
		LOC75 = escape_351034(LOC74);
		linktitle = resizeString(linktitle, LOC75->Sup.len + 0);
appendString(linktitle, LOC75);
	}
	goto LA69;
	LA72: ;
	{
		NimStringDesc* LOC77;
		NimStringDesc* LOC78;
		LOC77 = 0;
		LOC77 = nsuStrip(complexsymbol, NIM_TRUE, NIM_TRUE, TMP2765);
		LOC78 = 0;
		LOC78 = escape_351034(LOC77);
		linktitle = resizeString(linktitle, LOC78->Sup.len + 0);
appendString(linktitle, LOC78);
	}
	LA69: ;
	LOC79 = 0;
	LOC79 = &d->Sup;
	LOC80 = 0;
	LOC80 = docstringsummary_358697(plaindocstring);
	LOC81 = 0;
	LOC81 = escape_351034(LOC80);
	setindexterm_325683(LOC79, symbolorid, name, linktitle, LOC81);
	}BeforeRet: ;
}

N_NIMCALL(NIM_BOOL, checkforfalse_358941)(Tnode213790* n) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = ((*n).kind == ((NU8) 2));
	if (!(LOC1)) goto LA2;
	LOC1 = identeq_188450((*n).kindU.S5.ident, ((NimStringDesc*) &TMP5113));
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, tracedeps_358955)(Tdocumentor358004* d, Tnode213790* n) {
	TY168507 LOC5;
	NimStringDesc* LOC6;
	{
		if (!!(((*d).section[(((NU8) 6))- 0] == NIM_NIL))) goto LA3;
		add_168487(&(*d).section[(((NU8) 6))- 0], ((NimStringDesc*) &TMP5114));
	}
	LA3: ;
	memset((void*)LOC5, 0, sizeof(LOC5));
	LOC6 = 0;
	LOC6 = getmodulename_270009(n);
	LOC5[0] = rope_168277(LOC6);
	dispa_358067(&(*d).section[(((NU8) 6))- 0], ((NimStringDesc*) &TMP5115), ((NimStringDesc*) &TMP5093), LOC5, 1);
}

N_NIMCALL(void, generatedoc_358976)(Tdocumentor358004* d, Tnode213790* n) {
	switch ((*n).kind) {
	case ((NU8) 125):
	{
		NimStringDesc* LOC2;
		LOC2 = 0;
		LOC2 = gencomment_358266(d, n);
		add_168487(&(*d).moddesc, LOC2);
	}
	break;
	case ((NU8) 79):
	{
		documentraises_343610(n);
		genitem_358806(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 12));
	}
	break;
	case ((NU8) 80):
	{
		documentraises_343610(n);
		genitem_358806(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 13));
	}
	break;
	case ((NU8) 84):
	{
		documentraises_343610(n);
		genitem_358806(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 14));
	}
	break;
	case ((NU8) 82):
	{
		genitem_358806(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 16));
	}
	break;
	case ((NU8) 83):
	{
		genitem_358806(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 17));
	}
	break;
	case ((NU8) 81):
	{
		documentraises_343610(n);
		genitem_358806(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 15));
	}
	break;
	case ((NU8) 98):
	case ((NU8) 99):
	case ((NU8) 100):
	case ((NU8) 101):
	{
		{
			NI i_359613;
			NI HEX3Atmp_359684;
			NI LOC11;
			NI res_359687;
			i_359613 = 0;
			HEX3Atmp_359684 = 0;
			LOC11 = 0;
			LOC11 = sonslen_216351(n);
			HEX3Atmp_359684 = (NI)(LOC11 - ((NI) 1));
			res_359687 = ((NI) 0);
			{
				while (1) {
					if (!(res_359687 <= HEX3Atmp_359684)) goto LA13;
					i_359613 = res_359687;
					{
						if (!!(((*(*n).kindU.S6.sons->data[i_359613]).kind == ((NU8) 125)))) goto LA16;
						genitem_358806(d, (*n).kindU.S6.sons->data[i_359613], (*(*n).kindU.S6.sons->data[i_359613]).kindU.S6.sons->data[((NI) 0)], (NU8)(((NU8) 7) + ((NI) ((NI)(((NI) ((*n).kind)) - ((NI) 98))))));
					}
					LA16: ;
					res_359687 += ((NI) 1);
				} LA13: ;
			}
		}
	}
	break;
	case ((NU8) 115):
	{
		{
			NI i_359666;
			NI HEX3Atmp_359692;
			NI LOC20;
			NI res_359695;
			i_359666 = 0;
			HEX3Atmp_359692 = 0;
			LOC20 = 0;
			LOC20 = sonslen_216351(n);
			HEX3Atmp_359692 = (NI)(LOC20 - ((NI) 1));
			res_359695 = ((NI) 0);
			{
				while (1) {
					if (!(res_359695 <= HEX3Atmp_359692)) goto LA22;
					i_359666 = res_359695;
					generatedoc_358976(d, (*n).kindU.S6.sons->data[i_359666]);
					res_359695 += ((NI) 1);
				} LA22: ;
			}
		}
	}
	break;
	case ((NU8) 93):
	{
		{
			NIM_BOOL LOC26;
			Tnode213790* LOC29;
			LOC26 = 0;
			LOC26 = checkforfalse_358941((*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S6.sons->data[((NI) 0)]);
			if (!!(LOC26)) goto LA27;
			LOC29 = 0;
			LOC29 = lastson_216364((*n).kindU.S6.sons->data[((NI) 0)]);
			generatedoc_358976(d, LOC29);
		}
		LA27: ;
	}
	break;
	case ((NU8) 116):
	{
		{
			NI i_359680;
			NI HEX3Atmp_359700;
			NI LOC32;
			NI res_359703;
			i_359680 = 0;
			HEX3Atmp_359700 = 0;
			LOC32 = 0;
			LOC32 = sonslen_216351(n);
			HEX3Atmp_359700 = (NI)(LOC32 - ((NI) 1));
			res_359703 = ((NI) 0);
			{
				while (1) {
					if (!(res_359703 <= HEX3Atmp_359700)) goto LA34;
					i_359680 = res_359703;
					tracedeps_358955(d, (*n).kindU.S6.sons->data[i_359680]);
					res_359703 += ((NI) 1);
				} LA34: ;
			}
		}
	}
	break;
	case ((NU8) 120):
	case ((NU8) 117):
	{
		tracedeps_358955(d, (*n).kindU.S6.sons->data[((NI) 0)]);
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(void, gensection_360492)(Tdocumentor358004* d, NU8 kind) {
	Ropeobj168006* title;
	NimStringDesc* LOC5;
	TY473653 LOC6;
	NimStringDesc* LOC7;
	TY473653 LOC8;
{	{
		if (!((*d).section[(kind)- 0] == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	title = rope_168277(sectionnames_360496[(kind)- 6]);
	LOC5 = 0;
	LOC5 = getconfigvar_159282(((NimStringDesc*) &TMP5131));
	memset((void*)LOC6, 0, sizeof(LOC6));
	LOC6[0] = rope_168401(((NI64) (kind)));
	LOC6[1] = title;
	LOC6[2] = rope_168401(((NI64) ((NI)(((NI) (kind)) + ((NI) 50)))));
	LOC6[3] = (*d).section[(kind)- 0];
	asgnRefNoCycle((void**) (&(*d).section[(kind)- 0]), ropeformatnamedvars_358110(LOC5, TMP5132, 4, LOC6, 4));
	LOC7 = 0;
	LOC7 = getconfigvar_159282(((NimStringDesc*) &TMP5137));
	memset((void*)LOC8, 0, sizeof(LOC8));
	LOC8[0] = rope_168401(((NI64) (kind)));
	LOC8[1] = title;
	LOC8[2] = rope_168401(((NI64) ((NI)(((NI) (kind)) + ((NI) 50)))));
	LOC8[3] = (*d).toc[(kind)- 0];
	asgnRefNoCycle((void**) (&(*d).toc[(kind)- 0]), ropeformatnamedvars_358110(LOC7, TMP5132, 4, LOC8, 4));
	}BeforeRet: ;
}

N_NIMCALL(Ropeobj168006*, genoutfile_360556)(Tdocumentor358004* d) {
	Ropeobj168006* result;
	Ropeobj168006* code;
	Ropeobj168006* content;
	NimStringDesc* title;
	NI j;
	NimStringDesc* tmp;
	Rstgenerator325010* LOC1;
	Ropeobj168006* toc;
	NimStringDesc* bodyname;
	NimStringDesc* LOC28;
	TY475247 LOC29;
	NimStringDesc* LOC30;
	NimStringDesc* LOC31;
	result = 0;
	code = 0;
	content = 0;
	title = copyString(((NimStringDesc*) &TMP2241));
	j = ((NI) 0);
	tmp = copyString(((NimStringDesc*) &TMP2241));
	LOC1 = 0;
	LOC1 = &d->Sup;
	rendertocentries_331310(LOC1, (&j), ((NI) 1), (&tmp));
	toc = rope_168277(tmp);
	{
		NU8 i_360614;
		NI res_360673;
		i_360614 = 0;
		res_360673 = ((NI) 0);
		{
			while (1) {
				if (!(res_360673 <= ((NI) 24))) goto LA4;
				i_360614 = ((NU8) (res_360673));
				gensection_360492(d, i_360614);
				add_168482(&toc, (*d).toc[(i_360614)- 0]);
				res_360673 += ((NI) 1);
			} LA4: ;
		}
	}
	{
		NimStringDesc* LOC9;
		TY168507 LOC10;
		if (!!((toc == NIM_NIL))) goto LA7;
		LOC9 = 0;
		LOC9 = getconfigvar_159282(((NimStringDesc*) &TMP5138));
		memset((void*)LOC10, 0, sizeof(LOC10));
		LOC10[0] = toc;
		toc = ropeformatnamedvars_358110(LOC9, TMP5139, 1, LOC10, 1);
	}
	LA7: ;
	{
		NU8 i_360645;
		NI res_360681;
		i_360645 = 0;
		res_360681 = ((NI) 0);
		{
			while (1) {
				if (!(res_360681 <= ((NI) 24))) goto LA13;
				i_360645 = ((NU8) (res_360681));
				add_168482(&code, (*d).section[(i_360645)- 0]);
				res_360681 += ((NI) 1);
			} LA13: ;
		}
	}
	{
		Rstgenerator325010* LOC18;
		if (!!((((*d).Sup.meta[(((NU8) 1))- 0] ? (*d).Sup.meta[(((NU8) 1))- 0]->Sup.len : 0) == ((NI) 0)))) goto LA16;
		title = copyString((*d).Sup.meta[(((NU8) 1))- 0]);
		LOC18 = 0;
		LOC18 = &d->Sup;
		setindexterm_325683(LOC18, ((NimStringDesc*) &TMP2241), title, ((NimStringDesc*) &TMP2241), ((NimStringDesc*) &TMP2241));
	}
	goto LA14;
	LA16: ;
	{
		NimStringDesc* LOC20;
		NimStringDesc* LOC21;
		NimStringDesc* LOC22;
		LOC20 = 0;
		LOC21 = 0;
		LOC21 = noschangeFileExt((*d).Sup.filename, ((NimStringDesc*) &TMP2241));
		LOC22 = 0;
		LOC22 = nosextractFilename(LOC21);
		LOC20 = rawNewString(LOC22->Sup.len + 7);
appendString(LOC20, ((NimStringDesc*) &TMP5140));
appendString(LOC20, LOC22);
		title = LOC20;
	}
	LA14: ;
	{
		if (!(*d).Sup.hastoc) goto LA25;
		bodyname = copyString(((NimStringDesc*) &TMP5141));
	}
	goto LA23;
	LA25: ;
	{
		bodyname = copyString(((NimStringDesc*) &TMP5142));
	}
	LA23: ;
	LOC28 = 0;
	LOC28 = getconfigvar_159282(bodyname);
	memset((void*)LOC29, 0, sizeof(LOC29));
	LOC29[0] = rope_168277(title);
	LOC29[1] = toc;
	LOC29[2] = (*d).moddesc;
	LOC30 = 0;
	LOC30 = ntgetDateStr();
	LOC29[3] = rope_168277(LOC30);
	LOC31 = 0;
	LOC31 = ntgetClockStr();
	LOC29[4] = rope_168277(LOC31);
	LOC29[5] = code;
	content = ropeformatnamedvars_358110(LOC28, TMP5143, 6, LOC29, 6);
	{
		NimStringDesc* LOC36;
		TY358907 LOC37;
		NimStringDesc* LOC38;
		NimStringDesc* LOC39;
		if (!!(((gglobaloptions_159121 &(1U<<((NU)(((NU8) 4))&31U)))!=0))) goto LA34;
		LOC36 = 0;
		LOC36 = getconfigvar_159282(((NimStringDesc*) &TMP5149));
		memset((void*)LOC37, 0, sizeof(LOC37));
		LOC37[0] = rope_168277(title);
		LOC37[1] = toc;
		LOC37[2] = (*d).moddesc;
		LOC38 = 0;
		LOC38 = ntgetDateStr();
		LOC37[3] = rope_168277(LOC38);
		LOC39 = 0;
		LOC39 = ntgetClockStr();
		LOC37[4] = rope_168277(LOC39);
		LOC37[5] = content;
		LOC37[6] = rope_168277((*d).Sup.meta[(((NU8) 3))- 0]);
		LOC37[7] = rope_168277((*d).Sup.meta[(((NU8) 4))- 0]);
		LOC37[8] = rope_168277((*d).analytics);
		code = ropeformatnamedvars_358110(LOC36, TMP5150, 9, LOC37, 9);
	}
	goto LA32;
	LA34: ;
	{
		code = content;
	}
	LA32: ;
	result = code;
	return result;
}

N_NIMCALL(void, writeoutput_360697)(Tdocumentor358004* d, NimStringDesc* filename, NimStringDesc* outext, NIM_BOOL usewarning) {
	Ropeobj168006* content;
	content = genoutfile_360556(d);
	{
		if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 23))&31U)))!=0)) goto LA3;
		writerope_168822(stdout, content);
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC6;
		LOC6 = 0;
		LOC6 = getoutfile_159290(filename, outext);
		writerope_168836(content, LOC6, usewarning);
	}
	LA1: ;
}

N_NIMCALL(void, generateindex_360684)(Tdocumentor358004* d) {
	{
		Rstgenerator325010* LOC5;
		NimStringDesc* LOC6;
		TY118906 LOC7;
		TY118906 LOC8;
		NimStringDesc* LOC9;
		if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 27))&31U)))!=0)) goto LA3;
		LOC5 = 0;
		LOC5 = &d->Sup;
		LOC6 = 0;
		memset((void*)(&LOC7), 0, sizeof(LOC7));
		nossplitFile(outfile_159127, (&LOC7));
		memset((void*)(&LOC8), 0, sizeof(LOC8));
		nossplitFile((*d).Sup.filename, (&LOC8));
		LOC9 = 0;
		LOC9 = HEX2F_118665(LOC7.Field0, LOC8.Field1);
		LOC6 = rawNewString(LOC9->Sup.len + 4);
appendString(LOC6, LOC9);
appendString(LOC6, ((NimStringDesc*) &TMP5155));
		writeindexfile_325421(LOC5, LOC6);
	}
	LA3: ;
}

N_NIMCALL(void, commanddoc_360714)(void) {
	Tnode213790* ast;
	Tdocumentor358004* d;
{	ast = parsefile_237029(gprojectmainidx_159203);
	{
		if (!(ast == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	d = newdocumentor_358041(gprojectfull_159201, gconfigvars_159195);
	(*d).Sup.hastoc = NIM_TRUE;
	generatedoc_358976(d, ast);
	writeoutput_360697(d, gprojectfull_159201, ((NimStringDesc*) &TMP5154), NIM_FALSE);
	generateindex_360684(d);
	}BeforeRet: ;
}

N_NIMCALL(void, commandrstaux_360730)(NimStringDesc* filename, NimStringDesc* outext) {
	NimStringDesc* filen;
	Tdocumentor358004* d;
	Rstnode312008* rst;
	NimStringDesc* LOC1;
	NimStringDesc* moddesc;
	Rstgenerator325010* LOC2;
	filen = nosaddFileExt(filename, ((NimStringDesc*) &TMP5161));
	d = newdocumentor_358041(filen, gconfigvars_159195);
	LOC1 = 0;
	LOC1 = readfile_15666(filen);
	rst = parserst_358031(LOC1, filen, ((NI) 0), ((NI) 1), (&(*d).Sup.hastoc), 4);
	moddesc = rawNewString(((NI) 30000));
	LOC2 = 0;
	LOC2 = &d->Sup;
	renderrsttoout_325599(LOC2, rst, (&moddesc));
	asgnRefNoCycle((void**) (&(*d).moddesc), rope_168277(moddesc));
	writeoutput_360697(d, filename, outext, NIM_FALSE);
	generateindex_360684(d);
}

N_NIMCALL(void, commandrst2html_360742)(void) {
	commandrstaux_360730(gprojectfull_159201, ((NimStringDesc*) &TMP5154));
}

N_NIMCALL(void, commandrst2tex_360744)(void) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = splitter_325441; splitter_325441 = copyStringRC1(((NimStringDesc*) &TMP5163));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	commandrstaux_360730(gprojectfull_159201, ((NimStringDesc*) &TMP5164));
}

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)), (*a).Sup.len);
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

static N_INLINE(void, HEX5BHEX5DHEX3D_308413)(Jsonnodeobj305633* obj, NimStringDesc* key, Jsonnodeobj305633* val) {
	TY306043 LOC8;
	NimStringDesc* LOC9;
{	{
		NI i_308619;
		NI HEX3Atmp_308635;
		NI res_308638;
		i_308619 = 0;
		HEX3Atmp_308635 = 0;
		HEX3Atmp_308635 = (NI)(((*obj).kindU.S6.fields ? (*obj).kindU.S6.fields->Sup.len : 0) - ((NI) 1));
		res_308638 = ((NI) 0);
		{
			while (1) {
				if (!(res_308638 <= HEX3Atmp_308635)) goto LA3;
				i_308619 = res_308638;
				{
					if (!eqStrings((*obj).kindU.S6.fields->data[i_308619].Field0, key)) goto LA6;
					asgnRefNoCycle((void**) (&(*obj).kindU.S6.fields->data[i_308619].Field1), val);
					goto BeforeRet;
				}
				LA6: ;
				res_308638 += ((NI) 1);
			} LA3: ;
		}
	}
	memset((void*)(&LOC8), 0, sizeof(LOC8));
	LOC8.Field0 = copyString(key);
	LOC8.Field1 = val;
	(*obj).kindU.S6.fields = (TY305648*) incrSeqV2(&((*obj).kindU.S6.fields)->Sup, sizeof(TY306043));
	LOC9 = 0;
	LOC9 = (*obj).kindU.S6.fields->data[(*obj).kindU.S6.fields->Sup.len].Field0; (*obj).kindU.S6.fields->data[(*obj).kindU.S6.fields->Sup.len].Field0 = copyStringRC1(LOC8.Field0);
	if (LOC9) nimGCunrefNoCycle(LOC9);
	asgnRefNoCycle((void**) (&(*obj).kindU.S6.fields->data[(*obj).kindU.S6.fields->Sup.len].Field1), LOC8.Field1);
	++(*obj).kindU.S6.fields->Sup.len;
	}BeforeRet: ;
}

N_NIMCALL(Jsonnodeobj305633*, genjsonitem_358917)(Tdocumentor358004* d, Tnode213790* n, Tnode213790* namenode, NU8 k) {
	Jsonnodeobj305633* result;
	NimStringDesc* name;
	NimStringDesc* comm;
	Ropeobj168006* LOC6;
	Tsrcgen232014 r;
	TY358929 LOC7;
{	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isvisible_358496(namenode);
		if (!!(LOC3)) goto LA4;
		goto BeforeRet;
	}
	LA4: ;
	name = getname_358587(d, namenode, ((NI) -1));
	LOC6 = 0;
	LOC6 = genreccomment_358277(d, n);
	comm = HEX24_168856(LOC6);
	memset((void*)(&r), 0, sizeof(r));
	inittokrender_232050((&r), n, 14);
	memset((void*)LOC7, 0, sizeof(LOC7));
	LOC7[0].Field0 = copyString(((NimStringDesc*) &TMP5098));
	LOC7[0].Field1 = HEX25_305988(name);
	LOC7[1].Field0 = copyString(((NimStringDesc*) &TMP5173));
	LOC7[1].Field1 = HEX25_305988(reprEnum(k, (&NTI213435)));
	result = HEX25_306040(LOC7, 2);
	{
		NIM_BOOL LOC10;
		Jsonnodeobj305633* LOC14;
		LOC10 = 0;
		LOC10 = !((comm == NIM_NIL));
		if (!(LOC10)) goto LA11;
		LOC10 = !(((comm) && (comm)->Sup.len == 0));
		LA11: ;
		if (!LOC10) goto LA12;
		LOC14 = 0;
		LOC14 = HEX25_305988(comm);
		HEX5BHEX5DHEX3D_308413(result, ((NimStringDesc*) &TMP5174), LOC14);
	}
	LA12: ;
	{
		Jsonnodeobj305633* LOC19;
		if (!!((r.buf == NIM_NIL))) goto LA17;
		LOC19 = 0;
		LOC19 = HEX25_305988(r.buf);
		HEX5BHEX5DHEX3D_308413(result, ((NimStringDesc*) &TMP5175), LOC19);
	}
	LA17: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Jsonnodeobj305633*, generatejson_359707)(Tdocumentor358004* d, Tnode213790* n, Jsonnodeobj305633* jarray) {
	Jsonnodeobj305633* result;
	result = 0;
	switch ((*n).kind) {
	case ((NU8) 125):
	{
		{
			NIM_BOOL LOC4;
			NimStringDesc* stripped;
			NimStringDesc* LOC8;
			TY359717 LOC9;
			LOC4 = 0;
			LOC4 = !(((*n).comment == NIM_NIL));
			if (!(LOC4)) goto LA5;
			LOC4 = nsuStartsWith((*n).comment, ((NimStringDesc*) &TMP2240));
			LA5: ;
			if (!LOC4) goto LA6;
			LOC8 = 0;
			LOC8 = copyStr((*n).comment, ((NI) 2));
			stripped = nsuStrip(LOC8, NIM_TRUE, NIM_TRUE, TMP2765);
			memset((void*)LOC9, 0, sizeof(LOC9));
			LOC9[0].Field0 = copyString(((NimStringDesc*) &TMP5172));
			LOC9[0].Field1 = HEX25_305988(stripped);
			result = HEX25_306040(LOC9, 1);
		}
		LA6: ;
	}
	break;
	case ((NU8) 79):
	{
		documentraises_343610(n);
		result = genjsonitem_358917(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 12));
	}
	break;
	case ((NU8) 80):
	{
		documentraises_343610(n);
		result = genjsonitem_358917(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 13));
	}
	break;
	case ((NU8) 84):
	{
		documentraises_343610(n);
		result = genjsonitem_358917(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 14));
	}
	break;
	case ((NU8) 82):
	{
		result = genjsonitem_358917(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 16));
	}
	break;
	case ((NU8) 83):
	{
		result = genjsonitem_358917(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 17));
	}
	break;
	case ((NU8) 81):
	{
		documentraises_343610(n);
		result = genjsonitem_358917(d, n, (*n).kindU.S6.sons->data[((NI) 0)], ((NU8) 15));
	}
	break;
	case ((NU8) 98):
	case ((NU8) 99):
	case ((NU8) 100):
	case ((NU8) 101):
	{
		{
			NI i_360413;
			NI HEX3Atmp_360477;
			NI LOC18;
			NI res_360480;
			i_360413 = 0;
			HEX3Atmp_360477 = 0;
			LOC18 = 0;
			LOC18 = sonslen_216351(n);
			HEX3Atmp_360477 = (NI)(LOC18 - ((NI) 1));
			res_360480 = ((NI) 0);
			{
				while (1) {
					if (!(res_360480 <= HEX3Atmp_360477)) goto LA20;
					i_360413 = res_360480;
					{
						if (!!(((*(*n).kindU.S6.sons->data[i_360413]).kind == ((NU8) 125)))) goto LA23;
						result = genjsonitem_358917(d, (*n).kindU.S6.sons->data[i_360413], (*(*n).kindU.S6.sons->data[i_360413]).kindU.S6.sons->data[((NI) 0)], (NU8)(((NU8) 7) + ((NI) ((NI)(((NI) ((*n).kind)) - ((NI) 98))))));
					}
					LA23: ;
					res_360480 += ((NI) 1);
				} LA20: ;
			}
		}
	}
	break;
	case ((NU8) 115):
	{
		{
			NIM_BOOL LOC28;
			LOC28 = 0;
			LOC28 = HEX3DHEX3D_306431(jarray, NIM_NIL);
			if (!!(LOC28)) goto LA29;
			result = jarray;
		}
		goto LA26;
		LA29: ;
		{
			result = newjarray_305781();
		}
		LA26: ;
		{
			NI i_360467;
			NI HEX3Atmp_360485;
			NI LOC33;
			NI res_360488;
			i_360467 = 0;
			HEX3Atmp_360485 = 0;
			LOC33 = 0;
			LOC33 = sonslen_216351(n);
			HEX3Atmp_360485 = (NI)(LOC33 - ((NI) 1));
			res_360488 = ((NI) 0);
			{
				while (1) {
					Jsonnodeobj305633* r;
					if (!(res_360488 <= HEX3Atmp_360485)) goto LA35;
					i_360467 = res_360488;
					r = generatejson_359707(d, (*n).kindU.S6.sons->data[i_360467], result);
					{
						NIM_BOOL LOC38;
						LOC38 = 0;
						LOC38 = HEX3DHEX3D_306431(r, NIM_NIL);
						if (!!(LOC38)) goto LA39;
						add_308025(result, r);
					}
					LA39: ;
					res_360488 += ((NI) 1);
				} LA35: ;
			}
		}
	}
	break;
	case ((NU8) 93):
	{
		{
			NIM_BOOL LOC44;
			NIM_BOOL LOC45;
			NIM_BOOL LOC47;
			Tnode213790* LOC50;
			Jsonnodeobj305633* LOC51;
			LOC44 = 0;
			LOC45 = 0;
			LOC45 = checkforfalse_358941((*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S6.sons->data[((NI) 0)]);
			LOC44 = !(LOC45);
			if (!(LOC44)) goto LA46;
			LOC47 = 0;
			LOC47 = HEX3DHEX3D_306431(jarray, NIM_NIL);
			LOC44 = !(LOC47);
			LA46: ;
			if (!LOC44) goto LA48;
			LOC50 = 0;
			LOC50 = lastson_216364((*n).kindU.S6.sons->data[((NI) 0)]);
			LOC51 = 0;
			LOC51 = generatejson_359707(d, LOC50, jarray);
		}
		LA48: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(void, commandjson_360746)(void) {
	Tnode213790* ast;
	Tdocumentor358004* d;
	Jsonnodeobj305633* json;
	Ropeobj168006* content;
	NimStringDesc* LOC5;
{	ast = parsefile_237029(gprojectmainidx_159203);
	{
		if (!(ast == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	d = newdocumentor_358041(gprojectfull_159201, gconfigvars_159195);
	(*d).Sup.hastoc = NIM_TRUE;
	json = generatejson_359707(d, ast, NIM_NIL);
	LOC5 = 0;
	LOC5 = pretty_309754(json, ((NI) 2));
	content = rope_168277(LOC5);
	{
		if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 23))&31U)))!=0)) goto LA8;
		writerope_168822(stdout, content);
	}
	goto LA6;
	LA8: ;
	{
		NimStringDesc* LOC11;
		NimStringDesc* LOC12;
		LOC11 = 0;
		LOC11 = getoutfile_159290(gprojectfull_159201, ((NimStringDesc*) &TMP5185));
		printf("%s\012", LOC11? (LOC11)->data:"nil");
		fflush(stdout);
		LOC12 = 0;
		LOC12 = getoutfile_159290(gprojectfull_159201, ((NimStringDesc*) &TMP5185));
		writerope_168836(content, LOC12, NIM_FALSE);
	}
	LA6: ;
	}BeforeRet: ;
}

N_NIMCALL(void, commandbuildindex_360776)(void) {
	Ropeobj168006* content;
	NimStringDesc* LOC1;
	Ropeobj168006* code;
	NimStringDesc* LOC2;
	TY358907 LOC3;
	NimStringDesc* LOC4;
	NimStringDesc* LOC5;
	NimStringDesc* LOC6;
	LOC1 = 0;
	LOC1 = mergeindexes_330929(gprojectfull_159201);
	content = rope_168277(LOC1);
	LOC2 = 0;
	LOC2 = getconfigvar_159282(((NimStringDesc*) &TMP5149));
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = rope_168277(((NimStringDesc*) &TMP5225));
	LOC3[1] = NIM_NIL;
	LOC3[2] = NIM_NIL;
	LOC4 = 0;
	LOC4 = ntgetDateStr();
	LOC3[3] = rope_168277(LOC4);
	LOC5 = 0;
	LOC5 = ntgetClockStr();
	LOC3[4] = rope_168277(LOC5);
	LOC3[5] = content;
	LOC3[6] = NIM_NIL;
	LOC3[7] = NIM_NIL;
	LOC3[8] = NIM_NIL;
	code = ropeformatnamedvars_358110(LOC2, TMP5150, 9, LOC3, 9);
	LOC6 = 0;
	LOC6 = getoutfile_159290(((NimStringDesc*) &TMP5226), ((NimStringDesc*) &TMP5154));
	writerope_168836(code, LOC6, NIM_FALSE);
}
NIM_EXTERNC N_NOINLINE(void, compiler_docgenInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, compiler_docgenDatInit000)(void) {
static TNimNode* TMP5033[7];
static TNimNode TMP963[8];
NTI358004.size = sizeof(Tdocumentor358004);
NTI358004.kind = 17;
NTI358004.base = (&NTI325010);
TMP5033[0] = &TMP963[1];
TMP963[1].kind = 1;
TMP963[1].offset = offsetof(Tdocumentor358004, moddesc);
TMP963[1].typ = (&NTI168004);
TMP963[1].name = "modDesc";
TMP5033[1] = &TMP963[2];
TMP963[2].kind = 1;
TMP963[2].offset = offsetof(Tdocumentor358004, id);
TMP963[2].typ = (&NTI104);
TMP963[2].name = "id";
TMP5033[2] = &TMP963[3];
NTI358002.size = sizeof(Tsections358002);
NTI358002.kind = 16;
NTI358002.base = (&NTI168004);
NTI358002.flags = 2;
TMP963[3].kind = 1;
TMP963[3].offset = offsetof(Tdocumentor358004, toc);
TMP963[3].typ = (&NTI358002);
TMP963[3].name = "toc";
TMP5033[3] = &TMP963[4];
TMP963[4].kind = 1;
TMP963[4].offset = offsetof(Tdocumentor358004, section);
TMP963[4].typ = (&NTI358002);
TMP963[4].name = "section";
TMP5033[4] = &TMP963[5];
TMP963[5].kind = 1;
TMP963[5].offset = offsetof(Tdocumentor358004, indexvalfilename);
TMP963[5].typ = (&NTI138);
TMP963[5].name = "indexValFilename";
TMP5033[5] = &TMP963[6];
TMP963[6].kind = 1;
TMP963[6].offset = offsetof(Tdocumentor358004, analytics);
TMP963[6].typ = (&NTI138);
TMP963[6].name = "analytics";
TMP5033[6] = &TMP963[7];
TMP963[7].kind = 1;
TMP963[7].offset = offsetof(Tdocumentor358004, seensymbols);
TMP963[7].typ = (&NTI140211);
TMP963[7].name = "seenSymbols";
TMP963[0].len = 7; TMP963[0].kind = 2; TMP963[0].sons = &TMP5033[0];
NTI358004.node = &TMP963[0];
NTI358006.size = sizeof(Tdocumentor358004*);
NTI358006.kind = 22;
NTI358006.base = (&NTI358004);
NTI358006.marker = TMP5034;
}

