text: /* Generated by Nim Compiler v0.15.0 */
  /*   (c) 2016 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 <setjmp.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <time.h>
  #include <stdio.h>
  typedef struct NimStringDesc NimStringDesc;
  typedef struct TGenericSeq TGenericSeq;
  typedef struct TNimType TNimType;
  typedef struct TNimNode TNimNode;
  typedef struct Cell47305 Cell47305;
  typedef struct Cellseq47321 Cellseq47321;
  typedef struct Gcheap49818 Gcheap49818;
  typedef struct Gcstack49816 Gcstack49816;
  typedef struct Memregion29486 Memregion29486;
  typedef struct Smallchunk29440 Smallchunk29440;
  typedef struct Llchunk29480 Llchunk29480;
  typedef struct Bigchunk29442 Bigchunk29442;
  typedef struct Intset29414 Intset29414;
  typedef struct Trunk29410 Trunk29410;
  typedef struct Avlnode29484 Avlnode29484;
  typedef struct Gcstat49814 Gcstat49814;
  typedef struct Cellset47317 Cellset47317;
  typedef struct Pagedesc47313 Pagedesc47313;
  typedef struct Rstgenerator384010 Rstgenerator384010;
  typedef struct Rstnode368011 Rstnode368011;
  typedef struct Rstnodeseq368009 Rstnodeseq368009;
  typedef struct TNimObject TNimObject;
  typedef struct Stringtableobj152608 Stringtableobj152608;
  typedef struct TY384029 TY384029;
  typedef struct Table384047 Table384047;
  typedef struct Keyvaluepairseq384050 Keyvaluepairseq384050;
  typedef struct Tocentry384006 Tocentry384006;
  typedef struct Codeblockparams384014 Codeblockparams384014;
  typedef struct Keyvaluepair152604 Keyvaluepair152604;
  typedef struct Generaltokenizer376006 Generaltokenizer376006;
  typedef struct TY128506 TY128506;
  typedef struct TY387850 TY387850;
  typedef struct TY135002 TY135002;
  typedef struct TY387853 TY387853;
  typedef struct Indexentry385117 Indexentry385117;
  typedef struct Table385130 Table385130;
  typedef struct Keyvaluepairseq385133 Keyvaluepairseq385133;
  typedef struct Exception Exception;
  typedef struct TSafePoint TSafePoint;
  typedef struct Keyvaluepair385136 Keyvaluepair385136;
  typedef struct TY385592 TY385592;
  typedef struct TY385593 TY385593;
  typedef struct Slice90651 Slice90651;
  typedef struct Basechunk29438 Basechunk29438;
  typedef struct Freecell29430 Freecell29430;
  typedef struct Keyvaluepairseq152606 Keyvaluepairseq152606;
  typedef struct Keyvaluepair384053 Keyvaluepair384053;
  struct  TGenericSeq  {
  NI len;
  NI reserved;
  };
  struct  NimStringDesc  {
    TGenericSeq Sup;
  NIM_CHAR data[SEQ_DECL_SIZE];
  };
  typedef NU8 Tnimkind3403;
  typedef NU8 Tnimtypeflag3409Set;
  typedef N_NIMCALL_PTR(void, TY3489) (void* p0, NI op0);
  typedef N_NIMCALL_PTR(void*, TY3494) (void* p0);
  struct  TNimType  {
  NI size;
  Tnimkind3403 kind;
  Tnimtypeflag3409Set flags;
  TNimType* base;
  TNimNode* node;
  void* finalizer;
  TY3489 marker;
  TY3494 deepcopy;
  };
  typedef NU8 Tnimnodekind3405;
  struct  TNimNode  {
  Tnimnodekind3405 kind;
  NI offset;
  TNimType* typ;
  NCSTRING name;
  NI len;
  TNimNode** sons;
  };
  typedef N_NIMCALL_PTR(void, Globalmarkerproc55802) (void);
  struct  Cell47305  {
  NI refcount;
  TNimType* typ;
  };
  struct  Cellseq47321  {
  NI len;
  NI cap;
  Cell47305** d;
  };
  typedef Smallchunk29440* TY29501[512];
  typedef Trunk29410* Trunkbuckets29412[256];
  struct  Intset29414  {
  Trunkbuckets29412 data;
  };
  struct  Memregion29486  {
  NI minlargeobj;
  NI maxlargeobj;
  TY29501 freesmallchunks;
  Llchunk29480* llmem;
  NI currmem;
  NI maxmem;
  NI freemem;
  NI lastsize;
  Bigchunk29442* freechunkslist;
  Intset29414 chunkstarts;
  Avlnode29484* root;
  Avlnode29484* deleted;
  Avlnode29484* last;
  Avlnode29484* freeavlnodes;
  NIM_BOOL locked;
  };
  struct  Gcstat49814  {
  NI stackscans;
  NI cyclecollections;
  NI maxthreshold;
  NI maxstacksize;
  NI maxstackcells;
  NI cycletablesize;
  NI64 maxpause;
  };
  struct  Cellset47317  {
  NI counter;
  NI max;
  Pagedesc47313* head;
  Pagedesc47313** data;
  };
  struct  Gcheap49818  {
  Gcstack49816* stack;
  void* stackbottom;
  NI cyclethreshold;
  Cellseq47321 zct;
  Cellseq47321 decstack;
  Cellseq47321 tempstack;
  NI recgclock;
  Memregion29486 region;
  Gcstat49814 stat;
  Cellset47317 marked;
  Cellseq47321 additionalroots;
  };
  typedef NU8 Rstnodekind368005;
  struct  Rstnode368011  {
  Rstnodekind368005 kind;
  NimStringDesc* text;
  NI level;
  Rstnodeseq368009* sons;
  };
  struct  TNimObject  {
  TNimType* m_type;
  };
  typedef NU8 Outputtarget384004;
  typedef NU8 Rstparseoption369003Set;
  typedef N_NIMCALL_PTR(NimStringDesc*, Findfilehandler369013) (NimStringDesc* filename0);
  typedef NU8 Msgkind369009;
  typedef N_NIMCALL_PTR(void, Msghandler369011) (NimStringDesc* filename0, NI line0, NI col0, Msgkind369009 msgkind0, NimStringDesc* arg0);
  typedef NimStringDesc* TY384039[5];
  struct  Table384047  {
  Keyvaluepairseq384050* data;
  NI counter;
  };
  struct  Rstgenerator384010  {
    TNimObject Sup;
  Outputtarget384004 target;
  Stringtableobj152608* config;
  NI splitafter;
  NI listingcounter;
  TY384029* tocpart;
  NIM_BOOL hastoc;
  NimStringDesc* theindex;
  Rstparseoption369003Set options;
  Findfilehandler369013 findfile;
  Msghandler369011 msghandler;
  NimStringDesc* filename;
  TY384039 meta;
  NimStringDesc* currentsection;
  Table384047 seenindexterms;
  };
  struct  Tocentry384006  {
  Rstnode368011* n;
  NimStringDesc* refname;
  NimStringDesc* header;
  };
  typedef NimStringDesc* TY195781[4];
  typedef NU8 Metaenum384008;
  typedef NimStringDesc* TY193732[1];
  typedef NU8 char136Set[32];
  typedef NimStringDesc* TY194153[2];
  typedef NU8 Sourcelanguage376008;
  struct  Codeblockparams384014  {
  NIM_BOOL numberlines;
  NI startline;
  NimStringDesc* langstr;
  Sourcelanguage376008 lang;
  };
  struct Keyvaluepair152604 {
  NimStringDesc* Field0;
  NimStringDesc* Field1;
  };
  typedef NimStringDesc* TY318494[1];
  typedef NU8 Tokenclass376004;
  struct  Generaltokenizer376006  {
    TNimObject Sup;
  Tokenclass376004 kind;
  NI start;
  NI length;
  NCSTRING buf;
  NI pos;
  Tokenclass376004 state;
  };
  typedef NimStringDesc* TY376071[33];
  struct TY128506 {
  NimStringDesc* Field0;
  NimStringDesc* Field1;
  NimStringDesc* Field2;
  };
  struct  Indexentry385117  {
  NimStringDesc* keyword;
  NimStringDesc* link;
  NimStringDesc* linktitle;
  NimStringDesc* linkdesc;
  };
  struct  Table385130  {
  Keyvaluepairseq385133* data;
  NI counter;
  };
  struct TY387850 {
  TY135002* Field0;
  TY387853* Field1;
  Table385130 Field2;
  };
  typedef NU8 Pathcomponent137212;
  struct  Exception  {
    TNimObject Sup;
  Exception* parent;
  NCSTRING name;
  NimStringDesc* message;
  NimStringDesc* trace;
  };
  typedef struct {
  N_NIMCALL_PTR(NIM_BOOL, ClPrc) (Exception* e0, void* ClEnv);
  void* ClEnv;
  } TY17211;
  struct  TSafePoint  {
  TSafePoint* prev;
  NI status;
  jmp_buf context;
  NIM_BOOL hasRaiseAction;
  TY17211 raiseAction;
  };
  typedef NIM_CHAR TY120773[256];
  typedef NU8 Filemode13009;
  typedef struct {
  N_NIMCALL_PTR(NI, ClPrc) (NimStringDesc* x_388466_3792311747, NimStringDesc* y_388468_3792311747, void* ClEnv);
  void* ClEnv;
  } TY388464;
  typedef NU8 Sortorder104003;
  typedef N_CLOSURE_PTR(NI, T4199187026_169) (NimStringDesc* x_388453_3792311747, NimStringDesc* y_388455_3792311747, void* ClEnv);
  struct Keyvaluepair385136 {
  NI Field0;
  Indexentry385117 Field1;
  TY387853* Field2;
  };
  typedef struct {
  N_NIMCALL_PTR(NI, ClPrc) (Indexentry385117* x_386575_3792311747, Indexentry385117* y_386577_3792311747, void* ClEnv);
  void* ClEnv;
  } TY386573;
  typedef N_CLOSURE_PTR(NI, T4199187026_171) (Indexentry385117* x_387720_3792311747, Indexentry385117* y_387722_3792311747, void* ClEnv);
  typedef N_CLOSURE_PTR(NI, T4199187026_181) (Indexentry385117* x_386562_3792311747, Indexentry385117* y_386564_3792311747, void* ClEnv);
  struct TY385593 {
  NI Field0;
  NimStringDesc* Field1;
  };
  struct  Slice90651  {
  NI a;
  NI b;
  };
  typedef NimStringDesc* TY194140[3];
  struct  Gcstack49816  {
  Gcstack49816* prev;
  Gcstack49816* next;
  void* starts;
  void* pos;
  NI maxstacksize;
  };
  struct  Basechunk29438  {
  NI prevsize;
  NI size;
  NIM_BOOL used;
  };
  struct  Smallchunk29440  {
    Basechunk29438 Sup;
  Smallchunk29440* next;
  Smallchunk29440* prev;
  Freecell29430* freelist;
  NI free;
  NI acc;
  NF data;
  };
  struct  Llchunk29480  {
  NI size;
  NI acc;
  Llchunk29480* next;
  };
  struct  Bigchunk29442  {
    Basechunk29438 Sup;
  Bigchunk29442* next;
  Bigchunk29442* prev;
  NI align;
  NF data;
  };
  typedef NI TY29419[8];
  struct  Trunk29410  {
  Trunk29410* next;
  NI key;
  TY29419 bits;
  };
  typedef Avlnode29484* TY29491[2];
  struct  Avlnode29484  {
  TY29491 link;
  NI key;
  NI upperbound;
  NI level;
  };
  struct  Pagedesc47313  {
  Pagedesc47313* next;
  NI key;
  TY29419 bits;
  };
  typedef NU8 Stringtablemode152602;
  struct  Stringtableobj152608  {
    TNimObject Sup;
  NI counter;
  Keyvaluepairseq152606* data;
  Stringtablemode152602 mode;
  };
  struct Keyvaluepair384053 {
  NI Field0;
  NimStringDesc* Field1;
  NI Field2;
  };
  struct  Freecell29430  {
  Freecell29430* next;
  NI zerofield;
  };
  struct TY384029 {
    TGenericSeq Sup;
    Tocentry384006 data[SEQ_DECL_SIZE];
  };
  struct Rstnodeseq368009 {
    TGenericSeq Sup;
    Rstnode368011* data[SEQ_DECL_SIZE];
  };
  struct TY135002 {
    TGenericSeq Sup;
    NimStringDesc* data[SEQ_DECL_SIZE];
  };
  struct TY387853 {
    TGenericSeq Sup;
    Indexentry385117 data[SEQ_DECL_SIZE];
  };
  struct TY385592 {
    TGenericSeq Sup;
    TY385593 data[SEQ_DECL_SIZE];
  };
  struct Keyvaluepairseq384050 {
    TGenericSeq Sup;
    Keyvaluepair384053 data[SEQ_DECL_SIZE];
  };
  struct Keyvaluepairseq385133 {
    TGenericSeq Sup;
    Keyvaluepair385136 data[SEQ_DECL_SIZE];
  };
  struct Keyvaluepairseq152606 {
    TGenericSeq Sup;
    Keyvaluepair152604 data[SEQ_DECL_SIZE];
  };
  N_NIMCALL(void, nimGCvisit)(void* d0, NI op0);
  N_NIMCALL(void, T4199187026_2)(void);
  N_NIMCALL(void, nimRegisterGlobalMarker)(Globalmarkerproc55802 markerproc0);
  N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src0);
  static N_INLINE(void, nimGCunrefNoCycle)(void* p0);
  static N_INLINE(Cell47305*, usrtocell_51440_1689653243)(void* usr0);
  static N_INLINE(void, rtladdzct_52601_1689653243)(Cell47305* c0);
  N_NOINLINE(void, addzct_51417_1689653243)(Cellseq47321* s0, Cell47305* c0);
  N_NIMCALL(void, renderaux_384606_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(NI, len_368089_4150536388)(Rstnode368011* n0);
  N_NIMCALL(void, renderrsttoout_384599_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(void, renderheadline_390043_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src0);
  N_NIMCALL(void, unsureAsgnRef)(void** dest0, void* src0);
  N_NIMCALL(NimStringDesc*, rstnodetorefname_369062_3635346014)(Rstnode368011* n0);
  static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0);
  static N_INLINE(void, copymem_7485_1689653243)(void* dest0, void* source0, NI size0);
  N_NIMCALL(NimStringDesc*, rawNewString)(NI space0);
  N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq0, NI elemsize0, NI newlen0);
  static N_INLINE(void, asgnRefNoCycle)(void** dest0, void* src0);
  N_NIMCALL(void, dispa_384576_4199187026)(Outputtarget384004 target0, NimStringDesc** dest0, NimStringDesc* xml0, NimStringDesc* tex0, NimStringDesc** args0, NI args0Len0);
  N_NIMCALL(void, nsuAddf)(NimStringDesc** s0, NimStringDesc* formatstr0, NimStringDesc** a0, NI a0Len0);
  N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x0);
  N_NIMCALL(NimStringDesc*, nimCharToStr)(NIM_CHAR x0);
  N_NIMCALL(void, setindexterm_384683_4199187026)(Rstgenerator384010* d0, NimStringDesc* id0, NimStringDesc* term0, NimStringDesc* linktitle0, NimStringDesc* linkdesc0);
  N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s0, NIM_CHAR c0);
  N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename0, NimStringDesc* ext0);
  N_NIMCALL(NimStringDesc*, nosextractFilename)(NimStringDesc* path0);
  N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest0, NI addlen0);
  static N_INLINE(void, appendChar)(NimStringDesc* dest0, NIM_CHAR c0);
  N_NIMCALL(NimStringDesc*, quoteindexcolumn_384675_4199187026)(NimStringDesc* text0);
  N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s0, NimStringDesc* sub0, NimStringDesc* by0);
  N_NIMCALL(void, insert_92201_1689653243)(NimStringDesc** x0, NimStringDesc* item0, NI i0);
  N_NIMCALL(NimStringDesc*, striptochtml_390035_4199187026)(NimStringDesc* s0);
  N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s0, NIM_CHAR sub0, NI start0);
  N_NIMCALL(void, nsuDelete)(NimStringDesc** s0, NI first0, NI last0);
  N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c0, NI count0);
  N_NIMCALL(void, renderoverline_390221_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(void, renderaux_384632_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc* frmta0, NimStringDesc* frmtb0, NimStringDesc** result0);
  N_NIMCALL(void, renderfield_391874_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(NimStringDesc*, addnodes_369065_3635346014)(Rstnode368011* n0);
  N_NIMCALL(NimStringDesc*, esc_384484_4199187026)(Outputtarget384004 target0, NimStringDesc* s0, NI splitafter0);
  N_NIMCALL(NI, nextsplitpoint_384449_4199187026)(NimStringDesc* s0, NI start0);
  static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a0, NimStringDesc* b0);
  static N_INLINE(NIM_BOOL, equalmem_7495_1689653243)(void* a0, void* b0, NI size0);
  static N_INLINE(void, escchar_384443_4199187026)(Outputtarget384004 target0, NimStringDesc** dest0, NIM_CHAR c0);
  N_NIMCALL(void, addxmlchar_384426_4199187026)(NimStringDesc** dest0, NIM_CHAR c0);
  N_NIMCALL(void, addtexchar_384436_4199187026)(NimStringDesc** dest0, NIM_CHAR c0);
  N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s0, NIM_BOOL leading0, NIM_BOOL trailing0, char136Set chars0);
  N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a0, NimStringDesc* b0);
  N_NOINLINE(void, raiseassert_91216_1689653243)(NimStringDesc* msg0);
  N_NIMCALL(NimStringDesc*, texcolumns_391850_4199187026)(Rstnode368011* n0);
  N_NIMCALL(Rstnode368011*, lastson_368134_4150536388)(Rstnode368011* n0);
  N_NIMCALL(void, renderimage_390335_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(NimStringDesc*, getargument_369072_3635346014)(Rstnode368011* n0);
  N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s0, NimStringDesc* suffix0);
  N_NIMCALL(NimStringDesc*, nsuToLowerStr)(NimStringDesc* s0);
  N_NIMCALL(NimStringDesc*, getfieldvalue_369068_3635346014)(Rstnode368011* n0, NimStringDesc* fieldname0);
  N_NIMCALL(NIM_BOOL, allcharsinset_109382_4286263276)(NimStringDesc* s0, char136Set theset0);
  N_NIMCALL(NimStringDesc*, dispf_384559_4199187026)(Outputtarget384004 target0, NimStringDesc* xml0, NimStringDesc* tex0, NimStringDesc** args0, NI args0Len0);
  N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr0, NimStringDesc** a0, NI a0Len0);
  N_NIMCALL(void, rendercodeblock_391421_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(void, parsecodeblockparams_390618_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, Codeblockparams384014* Result);
  N_NIMCALL(void, init_384079_4199187026)(Codeblockparams384014* p0);
  N_NIMCALL(void, parsecodeblockfield_390609_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, Codeblockparams384014* params0);
  N_NIMCALL(NI, npuParseInt)(NimStringDesc* s0, NI* number0, NI start0);
  N_NIMCALL(NimStringDesc*, getfieldvalue_371773_3635346014)(Rstnode368011* n0);
  N_NIMCALL(Sourcelanguage376008, getsourcelanguage_376077_1283795525)(NimStringDesc* name0);
  N_NOINLINE(void, chckNil)(void* p0);
  N_NIMCALL(void, buildlineshtmltable_391211_4199187026)(Rstgenerator384010* d0, Codeblockparams384014* params0, NimStringDesc* code0, Keyvaluepair152604* Result);
  N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr0, NimStringDesc* a0);
  N_NIMCALL(NimStringDesc*, getordefault_153214_603679043)(Stringtableobj152608* t0, NimStringDesc* key0);
  N_NIMCALL(NI, nsuCountLines)(NimStringDesc* s0);
  N_NIMCALL(void, initgeneraltokenizer_376253_1283795525)(Generaltokenizer376006* g0, NimStringDesc* buf0);
  N_NIMCALL(void, getnexttoken_380185_1283795525)(Generaltokenizer376006* g0, Sourcelanguage376008 lang0);
  N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s0, NI start_79210_1689653243, NI last0);
  N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s0, NI first0, NI last0);
  N_NIMCALL(void, deinitgeneraltokenizer_376258_1283795525)(Generaltokenizer376006* g0);
  N_NIMCALL(void, rendercontainer_391837_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(void, renderindexterm_384846_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(NIM_BOOL, haskey_384854_30748785)(Table384047 t0, NimStringDesc* key0);
  N_NIMCALL(void, HEX5BHEX5DHEX3D_384915_30748785)(Table384047* t0, NimStringDesc* key0, NI val0);
  N_NIMCALL(NI, getordefault_384886_30748785)(Table384047 t0, NimStringDesc* key0);
  N_NIMCALL(void, rendersmiley_390601_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0);
  N_NIMCALL(void, T4199187026_152)(void* p, NI op);
  N_NIMCALL(void*, newSeq)(TNimType* typ0, NI len0);
  N_NIMCALL(void, nossplitFile)(NimStringDesc* path0, TY128506* Result);
  N_NIMCALL(void, inittable_384111_30748785)(NI initialsize0, Table384047* Result);
  N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s0);
  N_NIMCALL(void, rendertocentry_390302_4199187026)(Rstgenerator384010* d0, Tocentry384006* e0, NimStringDesc** result0);
  N_NIMCALL(void, rendertocentries_390310_4199187026)(Rstgenerator384010* d0, NI* j0, NI lvl0, NimStringDesc** result0);
  N_NIMCALL(void, writefile_14871_1689653243)(NimStringDesc* filename0, NimStringDesc* content0);
  N_NIMCALL(void, readindexdir_387847_4199187026)(NimStringDesc* dir0, TY387850* Result);
  N_NIMCALL(void, inittable_387875_30748785)(NI initialsize0, Table385130* Result);
  N_NIMCALL(void, T4199187026_161)(void* p, NI op);
  static N_INLINE(void, pushSafePoint)(TSafePoint* s0);
  N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str0);
  N_NIMCALL(NimStringDesc*, HEX2F_128265_2125978480)(NimStringDesc* head0, NimStringDesc* tail0);
  static N_INLINE(NIM_BOOL, direxists_131608_2125978480)(NimStringDesc* dir0);
  N_NIMCALL(NIM_BOOL, nosexistsDir)(NimStringDesc* dir0);
  N_NIMCALL(FILE*, open_14817_1689653243)(NimStringDesc* filename0, Filemode13009 mode0, NI bufsize0);
  N_NIMCALL(NimStringDesc*, rawNewString)(NI cap0);
  N_NIMCALL(NIM_BOOL, readline_14915_1689653243)(FILE* f0, NimStringDesc** line0);
  N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s0, NI start0);
  N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s0, NI first0);
  N_NIMCALL(NIM_BOOL, isdocumentationtitle_385525_4199187026)(NimStringDesc* hyperlink0);
  N_NIMCALL(TY135002*, nsuSplitChar)(NimStringDesc* s0, NIM_CHAR sep0, NI maxsplit0);
  N_NIMCALL(NimStringDesc*, unquoteindexcolumn_384679_4199187026)(NimStringDesc* text0);
  static N_INLINE(void, popSafePoint)(void);
  N_NIMCALL(void, close_14853_1689653243)(FILE* f0);
  N_NIMCALL(void, reraiseException)(void);
  N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq0, NI elemsize0);
  N_NIMCALL(NI, len_388259_30748785)(Table385130 t0);
  N_NIMCALL(void, HEX5BHEX5DHEX3D_388268_30748785)(Table385130* t0, Indexentry385117* key0, TY387853* val0);
  static N_INLINE(NI, HEX21HEX26_149005_213663784)(NI h0, NI val0);
  N_NIMCALL(NI, hash_149827_213663784)(NimStringDesc* x0);
  static N_INLINE(NimStringDesc*, or_384594_4199187026)(NimStringDesc* x0, NimStringDesc* y0);
  static N_INLINE(NI, HEX21HEX24_149028_213663784)(NI h0);
  N_NIMCALL(Pathcomponent137212, getsymlinkfilekind_137219_2125978480)(NimStringDesc* path0);
  N_NIMCALL(void, sort_388457_3792311747)(NimStringDesc** a0, NI a0Len0, TY388464 cmp0, Sortorder104003 order0);
  N_NIMCALL(NI, cmp_5683_1689653243)(NimStringDesc* x0, NimStringDesc* y0);
  N_NIMCALL(void, genericSeqAssign)(void* dest0, void* src_86404_1689653243, TNimType* mt0);
  N_NIMCALL(NimStringDesc*, generatedocumentationjumps_387317_4199187026)(Table385130 docs0);
  static N_INLINE(NIM_BOOL, isfilled_173465_30748785)(NI hcode0);
  N_NIMCALL(void, sort_386566_3792311747)(Indexentry385117* a0, NI a0Len0, TY386573 cmp0, Sortorder104003 order0);
  N_NIMCALL(NI, cmp_385153_4199187026)(Indexentry385117* a0, Indexentry385117* b0);
  N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a0, NI a0Len0, NimStringDesc* sep0);
  N_NIMCALL(NimStringDesc*, generatemodulejumps_387798_4199187026)(TY135002* modules0);
  N_NIMCALL(NimStringDesc*, generatedocumentationindex_386010_4199187026)(Table385130 docs0);
  N_NIMCALL(NimStringDesc*, generatedocumentationtoc_385586_4199187026)(TY387853* entries0);
  N_NIMCALL(void, T4199187026_183)(void* p, NI op);
  N_NIMCALL(void, striptoclevel_385529_4199187026)(NimStringDesc* s0, TY385593* Result);
  static N_INLINE(NimStringDesc*, HEX5BHEX5D_90644_1689653243)(NimStringDesc* s0, Slice90651 x0);
  static N_INLINE(Slice90651, HEX2EHEX2E_109260_1689653243)(NI a0, NI b0);
  N_NIMCALL(NimStringDesc*, indenttolevel_385580_4199187026)(NI* level0, NI newlevel0);
  N_NIMCALL(NimStringDesc*, nsuRepeatStr)(NimStringDesc* s0, NI n0);
  N_NIMCALL(TY387853*, getordefault_387246_30748785)(Table385130 t0, Indexentry385117* key0);
  N_NIMCALL(void, sortindex_385414_4199187026)(Indexentry385117* a0, NI a0Len0);
  N_NIMCALL(void, HEX3CHEX2D_385409_4199187026)(Indexentry385117* a0, Indexentry385117* b0);
  N_NIMCALL(NimStringDesc*, generatesymbolindex_385477_4199187026)(TY387853* symbols0);
  N_NIMCALL(NimStringDesc*, escapelink_385457_4199187026)(NimStringDesc* s0);
  N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x0, NI len0);
  STRING_LITERAL(T4199187026_3, "<wbr />", 7);
  STRING_LITERAL(T4199187026_4, "", 0);
  STRING_LITERAL(T4199187026_5, "-", 1);
  STRING_LITERAL(T4199187026_6, "\012<h$1><a class=\"toc-backref\" id=\"$2\" href=\"#$2\">$3</a></h$1>", 60);
  STRING_LITERAL(T4199187026_7, "\\rsth$4{$3}\\label{$2}\012", 22);
  STRING_LITERAL(T4199187026_8, "\012<h$1 id=\"$2\">$3</h$1>", 22);
  STRING_LITERAL(T4199187026_9, "html", 4);
  STRING_LITERAL(T4199187026_10, "\\", 1);
  STRING_LITERAL(T4199187026_11, "\\\\", 2);
  STRING_LITERAL(T4199187026_12, "\012", 1);
  STRING_LITERAL(T4199187026_13, "\\n", 2);
  STRING_LITERAL(T4199187026_14, "\011", 1);
  STRING_LITERAL(T4199187026_15, "\\t", 2);
  STRING_LITERAL(T4199187026_16, "<h$1 id=\"$2\"><center>$3</center></h$1>", 38);
  STRING_LITERAL(T4199187026_17, "\\rstov$4{$3}\\label{$2}\012", 23);
  STRING_LITERAL(T4199187026_18, "<hr />\012", 7);
  STRING_LITERAL(T4199187026_19, "\\hrule\012", 7);
  STRING_LITERAL(T4199187026_20, "<p>$1</p>\012", 10);
  STRING_LITERAL(T4199187026_21, "$1\012\012", 4);
  STRING_LITERAL(T4199187026_22, "<ul class=\"simple\">$1</ul>\012", 27);
  STRING_LITERAL(T4199187026_23, "\\begin{itemize}$1\\end{itemize}\012", 31);
  STRING_LITERAL(T4199187026_24, "<li>$1</li>\012", 12);
  STRING_LITERAL(T4199187026_25, "\\item $1\012", 9);
  STRING_LITERAL(T4199187026_26, "<ol class=\"simple\">$1</ol>\012", 27);
  STRING_LITERAL(T4199187026_27, "\\begin{enumerate}$1\\end{enumerate}\012", 35);
  STRING_LITERAL(T4199187026_28, "<dl class=\"docutils\">$1</dl>\012", 29);
  STRING_LITERAL(T4199187026_29, "\\begin{description}$1\\end{description}\012", 39);
  STRING_LITERAL(T4199187026_30, "<dt>$1</dt>\012", 12);
  STRING_LITERAL(T4199187026_31, "\\item[$1] ", 10);
  STRING_LITERAL(T4199187026_32, "<dd>$1</dd>\012", 12);
  STRING_LITERAL(T4199187026_33, "$1\012", 3);
  STRING_LITERAL(T4199187026_34, "<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(T4199187026_35, " ", 1);
  STRING_LITERAL(T4199187026_36, "&amp;", 5);
  STRING_LITERAL(T4199187026_37, "&lt;", 4);
  STRING_LITERAL(T4199187026_38, "&gt;", 4);
  STRING_LITERAL(T4199187026_39, "&quot;", 6);
  STRING_LITERAL(T4199187026_40, "\\_", 2);
  STRING_LITERAL(T4199187026_41, "\\symbol{123}", 12);
  STRING_LITERAL(T4199187026_42, "\\symbol{125}", 12);
  STRING_LITERAL(T4199187026_43, "\\symbol{91}", 11);
  STRING_LITERAL(T4199187026_44, "\\symbol{93}", 11);
  STRING_LITERAL(T4199187026_45, "\\symbol{92}", 11);
  STRING_LITERAL(T4199187026_46, "\\$", 2);
  STRING_LITERAL(T4199187026_47, "\\&", 2);
  STRING_LITERAL(T4199187026_48, "\\#", 2);
  STRING_LITERAL(T4199187026_49, "\\%", 2);
  STRING_LITERAL(T4199187026_50, "\\symbol{126}", 12);
  STRING_LITERAL(T4199187026_51, "\\symbol{64}", 11);
  STRING_LITERAL(T4199187026_52, "\\symbol{94}", 11);
  STRING_LITERAL(T4199187026_53, "\\symbol{96}", 11);
  static NIM_CONST char136Set T4199187026_54 = {
  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(T4199187026_55, "author", 6);
  STRING_LITERAL(T4199187026_56, "authors", 7);
  STRING_LITERAL(T4199187026_57, "version", 7);
  STRING_LITERAL(T4199187026_58, "<tr>$1</tr>\012", 12);
  STRING_LITERAL(T4199187026_59, "$1", 2);
  STRING_LITERAL(T4199187026_60, "<th class=\"docinfo-name\">$1:</th>", 33);
  STRING_LITERAL(T4199187026_61, "\\item[$1:]", 10);
  STRING_LITERAL(T4199187026_62, "<td>$1</td>", 11);
  STRING_LITERAL(T4199187026_63, " $1\012", 4);
  STRING_LITERAL(T4199187026_64, "<table frame=\"void\">$1</table>", 30);
  STRING_LITERAL(T4199187026_65, "\\begin{description}\012$1\\end{description}\012", 40);
  STRING_LITERAL(T4199187026_66, "<th align=\"left\">$1</th>", 24);
  STRING_LITERAL(T4199187026_67, "\\item[$1]", 9);
  STRING_LITERAL(T4199187026_68, "<td align=\"left\">$1</td>\012", 25);
  STRING_LITERAL(T4199187026_69, "false renderRstToOut", 20);
  STRING_LITERAL(T4199187026_70, "<pre>$1</pre>\012", 14);
  STRING_LITERAL(T4199187026_71, "\\begin{rstpre}\012$1\012\\end{rstpre}\012", 31);
  STRING_LITERAL(T4199187026_72, "<p>$1</p>", 9);
  STRING_LITERAL(T4199187026_73, "$1<br />", 8);
  STRING_LITERAL(T4199187026_74, "$1\\\\\012", 5);
  STRING_LITERAL(T4199187026_75, "<blockquote><p>$1</p></blockquote>\012", 35);
  STRING_LITERAL(T4199187026_76, "\\begin{quote}$1\\end{quote}\012", 27);
  STRING_LITERAL(T4199187026_77, "<table border=\"1\" class=\"docutils\">$1</table>", 45);
  STRING_LITERAL(T4199187026_78, "\\begin{table}\\begin{rsttab}{", 28);
  STRING_LITERAL(T4199187026_79, "|X", 2);
  STRING_LITERAL(T4199187026_80, "|}\012\\hline\012$1\\end{rsttab}\\end{table}", 35);
  STRING_LITERAL(T4199187026_81, " & ", 3);
  STRING_LITERAL(T4199187026_82, "\\\\\012\\hline\012", 10);
  STRING_LITERAL(T4199187026_83, "<tr>", 4);
  STRING_LITERAL(T4199187026_84, "</tr>\012", 6);
  STRING_LITERAL(T4199187026_85, "<th>$1</th>", 11);
  STRING_LITERAL(T4199187026_86, "\\textbf{$1}", 11);
  STRING_LITERAL(T4199187026_87, "<a class=\"reference external\" href=\"#$2\">$1</a>", 47);
  STRING_LITERAL(T4199187026_88, "$1\\ref{$2}", 10);
  STRING_LITERAL(T4199187026_89, "<a class=\"reference external\" href=\"$1\">$1</a>", 46);
  STRING_LITERAL(T4199187026_90, "\\href{$1}{$1}", 13);
  STRING_LITERAL(T4199187026_91, "<a class=\"reference external\" href=\"$2\">$1</a>", 46);
  STRING_LITERAL(T4199187026_92, "\\href{$2}{$1}", 13);
  STRING_LITERAL(T4199187026_93, ".svg", 4);
  STRING_LITERAL(T4199187026_94, "scale", 5);
  static NIM_CONST char136Set T4199187026_95 = {
  0x00, 0x3E, 0x00, 0x00, 0x21, 0xC0, 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(T4199187026_96, " scale=\"$1\"", 11);
  STRING_LITERAL(T4199187026_97, " scale=$1", 9);
  STRING_LITERAL(T4199187026_98, "height", 6);
  STRING_LITERAL(T4199187026_99, " height=\"$1\"", 12);
  STRING_LITERAL(T4199187026_100, " height=$1", 10);
  STRING_LITERAL(T4199187026_101, "width", 5);
  STRING_LITERAL(T4199187026_102, " width=\"$1\"", 11);
  STRING_LITERAL(T4199187026_103, " width=$1", 9);
  STRING_LITERAL(T4199187026_104, "alt", 3);
  STRING_LITERAL(T4199187026_105, " alt=\"$1\"", 9);
  STRING_LITERAL(T4199187026_106, "align", 5);
  STRING_LITERAL(T4199187026_107, " align=\"$1\"", 11);
  STRING_LITERAL(T4199187026_108, "[$1]", 4);
  STRING_LITERAL(T4199187026_109, "<object data=\"$1\" type=\"image/svg+xml\"$2 >", 42);
  STRING_LITERAL(T4199187026_110, "</object>", 9);
  STRING_LITERAL(T4199187026_111, "<img src=\"$1\"$2 />", 18);
  STRING_LITERAL(T4199187026_112, "\\includegraphics$2{$1}", 22);
  STRING_LITERAL(T4199187026_113, "number-lines", 12);
  STRING_LITERAL(T4199187026_114, "file", 4);
  STRING_LITERAL(T4199187026_115, "default-language", 16);
  STRING_LITERAL(T4199187026_116, "doc.listing_start", 17);
  STRING_LITERAL(T4199187026_117, "doc.listing_end", 15);
  STRING_LITERAL(T4199187026_118, "<table class=\"line-nums-table\"><tbody><tr><td class=\"blob-line-"
  "nums\"><pre class=\"line-nums\">", 92);
  STRING_LITERAL(T4199187026_119, "</pre></td><td>", 15);
  STRING_LITERAL(T4199187026_120, "</td></tr></tbody></table>", 26);
  STRING_LITERAL(T4199187026_121, "doc.listing_button", 18);
  STRING_LITERAL(T4199187026_122, "\\begin{rstpre}\012", 15);
  STRING_LITERAL(T4199187026_123, "<span class=\"$2\">$1</span>", 26);
  STRING_LITERAL(T4199187026_124, "\\span$2{$1}", 11);
  extern NIM_CONST TY376071 tokenclasstostr_376068_1283795525;
  STRING_LITERAL(T4199187026_125, "\012\\end{rstpre}\012", 14);
  STRING_LITERAL(T4199187026_126, "<div>$1</div>", 13);
  STRING_LITERAL(T4199187026_127, "<div class=\"$1\">$2</div>", 24);
  STRING_LITERAL(T4199187026_128, "$2", 2);
  STRING_LITERAL(T4199187026_129, "|$1|", 4);
  STRING_LITERAL(T4199187026_130, "<sub>$1</sub>", 13);
  STRING_LITERAL(T4199187026_131, "\\rstsub{$1}", 11);
  STRING_LITERAL(T4199187026_132, "<sup>$1</sup>", 13);
  STRING_LITERAL(T4199187026_133, "\\rstsup{$1}", 11);
  STRING_LITERAL(T4199187026_134, "<em>$1</em>", 11);
  STRING_LITERAL(T4199187026_135, "\\emph{$1}", 9);
  STRING_LITERAL(T4199187026_136, "<strong>$1</strong>", 19);
  STRING_LITERAL(T4199187026_137, "<strong><em>$1</em></strong>", 28);
  STRING_LITERAL(T4199187026_138, "\\textbf{emph{$1}}", 17);
  STRING_LITERAL(T4199187026_139, "<cite>$1</cite>", 15);
  STRING_LITERAL(T4199187026_140, "<span id=\"$1\">$2</span>", 23);
  STRING_LITERAL(T4199187026_141, "$2\\label{$1}", 12);
  STRING_LITERAL(T4199187026_142, "<tt class=\"docutils literal\"><span class=\"pre\">$1</span></tt>", 61);
  STRING_LITERAL(T4199187026_143, "\\texttt{$1}", 11);
  STRING_LITERAL(T4199187026_144, "<img src=\"$1\" width=\"15\"\012        height=\"17\" hspace=\"2\" vspace="
  "\"2\" class=\"smiley\" />", 84);
  STRING_LITERAL(T4199187026_145, "\\includegraphics{$1}", 20);
  STRING_LITERAL(T4199187026_146, "doc.smiley_format", 17);
  STRING_LITERAL(T4199187026_153, ".nim", 4);
  STRING_LITERAL(T4199187026_154, "Module ", 7);
  STRING_LITERAL(T4199187026_155, "split.item.toc", 14);
  STRING_LITERAL(T4199187026_156, "<li><a class=\"reference\" id=\"$1_toc\" href=\"#$1\">$2</a></li>\012", 60);
  STRING_LITERAL(T4199187026_157, "\\item\\label{$1_toc} $2\\ref{$1}\012", 31);
  STRING_LITERAL(T4199187026_158, "<ul class=\"simple\">$1</ul>", 26);
  STRING_LITERAL(T4199187026_159, "\\begin{enumerate}$1\\end{enumerate}", 34);
  STRING_LITERAL(T4199187026_163, ".", 1);
  STRING_LITERAL(T4199187026_164, "..", 2);
  STRING_LITERAL(T4199187026_165, ".idx", 4);
  STRING_LITERAL(T4199187026_167, "doc_toc_", 8);
  STRING_LITERAL(T4199187026_170, "Documents: ", 11);
  STRING_LITERAL(T4199187026_172, "<a href=\"", 9);
  STRING_LITERAL(T4199187026_173, "\">", 2);
  STRING_LITERAL(T4199187026_174, "</a>", 4);
  STRING_LITERAL(T4199187026_175, ", ", 2);
  STRING_LITERAL(T4199187026_176, ".<br/>", 6);
  STRING_LITERAL(T4199187026_177, "<p />", 5);
  STRING_LITERAL(T4199187026_178, "Modules: ", 9);
  STRING_LITERAL(T4199187026_179, ".html\">", 7);
  STRING_LITERAL(T4199187026_180, "<h2>Documentation files</h2>\012", 29);
  STRING_LITERAL(T4199187026_184, "<ul>\012", 5);
  STRING_LITERAL(T4199187026_185, "<li><ul>", 8);
  STRING_LITERAL(T4199187026_186, "</ul></li>", 10);
  STRING_LITERAL(T4199187026_187, "<li><a href=\"", 13);
  STRING_LITERAL(T4199187026_188, "</a></li>\012", 10);
  STRING_LITERAL(T4199187026_189, "</ul>\012", 6);
  STRING_LITERAL(T4199187026_190, "<ul><li><a href=\"", 17);
  STRING_LITERAL(T4199187026_191, "</a>\012", 5);
  STRING_LITERAL(T4199187026_192, "</li></ul>\012", 11);
  STRING_LITERAL(T4199187026_193, "<h2>API symbols</h2>\012", 21);
  STRING_LITERAL(T4199187026_194, "<dl>", 4);
  STRING_LITERAL(T4199187026_195, "%", 1);
  STRING_LITERAL(T4199187026_196, "<dt><a name=\"$2\" href=\"#$2\"><span>$1:</span></a></dt><dd><ul cl"
  "ass=\"simple\">\012", 77);
  STRING_LITERAL(T4199187026_197, "<li><a class=\"reference external\"\012          title=\"$3\" href=\"$1"
  "\">$2</a></li>\012          ", 87);
  STRING_LITERAL(T4199187026_198, "<li><a class=\"reference external\" href=\"$1\">$2</a></li>\012       "
  "   ", 66);
  STRING_LITERAL(T4199187026_199, "</ul></dd>\012", 11);
  STRING_LITERAL(T4199187026_200, "</dl>", 5);
  NimStringDesc* splitter_384441_4199187026;
  extern TNimType NTI138; /* string */
  extern Gcheap49818 gch_49858_1689653243;
  extern TNimType NTI376006; /* GeneralTokenizer */
  extern TNimType NTI3608; /* RootObj */
  TNimType NTI384010; /* RstGenerator */
  TNimType NTI384004; /* OutputTarget */
  extern TNimType NTI152610; /* StringTableRef */
  extern TNimType NTI104; /* int */
  TNimType NTI384006; /* TocEntry */
  extern TNimType NTI368007; /* PRstNode */
  TNimType NTI384029; /* seq[TocEntry] */
  extern TNimType NTI130; /* bool */
  extern TNimType NTI369005; /* RstParseOptions */
  extern TNimType NTI369013; /* FindFileHandler */
  extern TNimType NTI369011; /* MsgHandler */
  TNimType NTI384039; /* array[MetaEnum, string] */
  extern TNimType NTI384047; /* Table */
  extern TNimType NTI135002; /* seq[string] */
  TNimType NTI385117; /* IndexEntry */
  TNimType NTI387853; /* seq[IndexEntry] */
  extern TSafePoint* exchandler_18837_1689653243;
  extern TNimType NTI385133; /* KeyValuePairSeq */
  TNimType NTI385593; /* tuple[level: int, text: string] */
  TNimType NTI385592; /* seq[tuple[level: int, text: string]] */
  N_NIMCALL(void, T4199187026_2)(void) {
  	nimGCvisit((void*)splitter_384441_4199187026, 0);
  }
  
  static N_INLINE(Cell47305*, usrtocell_51440_1689653243)(void* usr0) {
  	Cell47305* result0;
  	result0 = (Cell47305*)0;
  	result0 = ((Cell47305*) ((NI)((NU64)(((NI) (usr0))) - (NU64)(((NI)sizeof(Cell47305))))));
  	return result0;
  }
  
  static N_INLINE(void, rtladdzct_52601_1689653243)(Cell47305* c0) {
  	addzct_51417_1689653243((&gch_49858_1689653243.zct), c0);
  }
  
  static N_INLINE(void, nimGCunrefNoCycle)(void* p0) {
  	Cell47305* c0;
  	c0 = usrtocell_51440_1689653243(p0);
  	{
  		(*c0).refcount -= ((NI) 8);
  		if (!((NU64)((*c0).refcount) < (NU64)(((NI) 8)))) goto LA3;
  		rtladdzct_52601_1689653243(c0);
  	}
  	LA3: ;
  }
  
  N_NIMCALL(void, renderaux_384606_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	{
  		NI i_384623_4199187026;
  		NI HEX3Atmp_384625_4199187026;
  		NI LOC2;
  		NI res_384628_4199187026;
  		i_384623_4199187026 = (NI)0;
  		HEX3Atmp_384625_4199187026 = (NI)0;
  		LOC2 = (NI)0;
  		LOC2 = len_368089_4150536388(n0);
  		HEX3Atmp_384625_4199187026 = (NI)(LOC2 - ((NI) 1));
  		res_384628_4199187026 = ((NI) 0);
  		{
  			while (1) {
  				if (!(res_384628_4199187026 <= HEX3Atmp_384625_4199187026)) goto LA4;
  				i_384623_4199187026 = res_384628_4199187026;
  				renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_384623_4199187026], result0);
  				res_384628_4199187026 += ((NI) 1);
  			} LA4: ;
  		}
  	}
  }
  
  static N_INLINE(void, copymem_7485_1689653243)(void* dest0, void* source0, NI size0) {
  	void* LOC1;
  	LOC1 = (void*)0;
  	LOC1 = memcpy(dest0, source0, ((size_t) (size0)));
  }
  
  static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0) {
  	copymem_7485_1689653243(((void*) ((&(*dest0).data[((*dest0).Sup.len)- 0]))), ((void*) ((*src0).data)), ((NI) ((NI)((*src0).Sup.len + ((NI) 1)))));
  	(*dest0).Sup.len += (*src0).Sup.len;
  }
  
  static N_INLINE(void, asgnRefNoCycle)(void** dest0, void* src0) {
  	{
  		Cell47305* c0;
  		if (!!((src0 == NIM_NIL))) goto LA3;
  		c0 = usrtocell_51440_1689653243(src0);
  		(*c0).refcount += ((NI) 8);
  	}
  	LA3: ;
  	{
  		Cell47305* c0;
  		if (!!(((*dest0) == NIM_NIL))) goto LA7;
  		c0 = usrtocell_51440_1689653243((*dest0));
  		{
  			(*c0).refcount -= ((NI) 8);
  			if (!((NU64)((*c0).refcount) < (NU64)(((NI) 8)))) goto LA11;
  			rtladdzct_52601_1689653243(c0);
  		}
  		LA11: ;
  	}
  	LA7: ;
  	(*dest0) = src0;
  }
  
  N_NIMCALL(void, dispa_384576_4199187026)(Outputtarget384004 target0, NimStringDesc** dest0, NimStringDesc* xml0, NimStringDesc* tex0, NimStringDesc** args0, NI args0Len0) {
  	{
  		if (!!((target0 == ((Outputtarget384004) 1)))) goto LA3;
  		nsuAddf(dest0, xml0, args0, args0Len0);
  	}
  	goto LA1;
  	LA3: ;
  	{
  		nsuAddf(dest0, tex0, args0, args0Len0);
  	}
  	LA1: ;
  }
  
  static N_INLINE(void, appendChar)(NimStringDesc* dest0, NIM_CHAR c0) {
  	(*dest0).data[((*dest0).Sup.len)- 0] = c0;
  	(*dest0).data[((NI)((*dest0).Sup.len + ((NI) 1)))- 0] = 0;
  	(*dest0).Sup.len += ((NI) 1);
  }
  
  N_NIMCALL(NimStringDesc*, quoteindexcolumn_384675_4199187026)(NimStringDesc* text0) {
  	NimStringDesc* result0;
  	NimStringDesc* LOC1;
  	NimStringDesc* LOC2;
  	result0 = (NimStringDesc*)0;
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = nsuReplaceStr(text0, ((NimStringDesc*) &T4199187026_10), ((NimStringDesc*) &T4199187026_11));
  	LOC2 = (NimStringDesc*)0;
  	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &T4199187026_12), ((NimStringDesc*) &T4199187026_13));
  	result0 = nsuReplaceStr(LOC2, ((NimStringDesc*) &T4199187026_14), ((NimStringDesc*) &T4199187026_15));
  	return result0;
  }
  
  N_NIMCALL(void, setindexterm_384683_4199187026)(Rstgenerator384010* d0, NimStringDesc* id0, NimStringDesc* term0, NimStringDesc* linktitle0, NimStringDesc* linkdesc0) {
  	NimStringDesc* entry0;
  	NIM_BOOL istitle0;
  	NimStringDesc* htmlfile0;
  	NimStringDesc* LOC1;
  	entry0 = copyString(term0);
  	istitle0 = NIM_FALSE;
  	entry0 = addChar(entry0, 9);
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = nosextractFilename((*d0).filename);
  	htmlfile0 = noschangeFileExt(LOC1, ((NimStringDesc*) &T4199187026_9));
  	entry0 = resizeString(entry0, htmlfile0->Sup.len + 0);
  appendString(entry0, htmlfile0);
  	{
  		if (!(((NI) 0) < (id0 ? id0->Sup.len : 0))) goto LA4;
  		entry0 = addChar(entry0, 35);
  		entry0 = resizeString(entry0, id0->Sup.len + 0);
  appendString(entry0, id0);
  	}
  	goto LA2;
  	LA4: ;
  	{
  		istitle0 = NIM_TRUE;
  	}
  	LA2: ;
  	{
  		NIM_BOOL LOC9;
  		NimStringDesc* LOC13;
  		NimStringDesc* LOC14;
  		NimStringDesc* LOC15;
  		NimStringDesc* LOC16;
  		LOC9 = (NIM_BOOL)0;
  		LOC9 = (((NI) 0) < (linktitle0 ? linktitle0->Sup.len : 0));
  		if (LOC9) goto LA10;
  		LOC9 = (((NI) 0) < (linkdesc0 ? linkdesc0->Sup.len : 0));
  		LA10: ;
  		if (!LOC9) goto LA11;
  		LOC13 = (NimStringDesc*)0;
  		LOC14 = (NimStringDesc*)0;
  		LOC14 = quoteindexcolumn_384675_4199187026(linktitle0);
  		LOC13 = rawNewString(LOC14->Sup.len + 1);
  appendChar(LOC13, 9);
  appendString(LOC13, LOC14);
  		entry0 = resizeString(entry0, LOC13->Sup.len + 0);
  appendString(entry0, LOC13);
  		LOC15 = (NimStringDesc*)0;
  		LOC16 = (NimStringDesc*)0;
  		LOC16 = quoteindexcolumn_384675_4199187026(linkdesc0);
  		LOC15 = rawNewString(LOC16->Sup.len + 1);
  appendChar(LOC15, 9);
  appendString(LOC15, LOC16);
  		entry0 = resizeString(entry0, LOC15->Sup.len + 0);
  appendString(entry0, LOC15);
  	}
  	LA11: ;
  	entry0 = resizeString(entry0, 1);
  appendString(entry0, ((NimStringDesc*) &T4199187026_12));
  	{
  		if (!istitle0) goto LA19;
  		insert_92201_1689653243((&(*d0).theindex), entry0, ((NI) 0));
  	}
  	goto LA17;
  	LA19: ;
  	{
  		(*d0).theindex = resizeString((*d0).theindex, entry0->Sup.len + 0);
  appendString((*d0).theindex, entry0);
  	}
  	LA17: ;
  }
  
  N_NIMCALL(NimStringDesc*, striptochtml_390035_4199187026)(NimStringDesc* s0) {
  	NimStringDesc* result0;
  	NI first0;
  {	result0 = (NimStringDesc*)0;
  	result0 = copyString(s0);
  	first0 = nsuFindChar(result0, 60, ((NI) 0));
  	{
  		while (1) {
  			NI last0;
  			if (!(((NI) 0) <= first0)) goto LA2;
  			last0 = nsuFindChar(result0, 62, ((NI) (first0)));
  			{
  				if (!(last0 < ((NI) 0))) goto LA5;
  				goto BeforeRet;
  			}
  			LA5: ;
  			nsuDelete((&result0), first0, last0);
  			first0 = nsuFindChar(result0, 60, ((NI) (first0)));
  		} LA2: ;
  	}
  	}BeforeRet: ;
  	return result0;
  }
  
  N_NIMCALL(void, renderheadline_390043_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	NimStringDesc* tmp0;
  	NimStringDesc* sectionprefix0;
  	NimStringDesc* refname0;
  	NimStringDesc* LOC14;
  	NimStringDesc* LOC15;
  	NimStringDesc* LOC25;
  	NimStringDesc* LOC26;
  	NimStringDesc* LOC27;
  	tmp0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		NI i_390061_4199187026;
  		NI HEX3Atmp_390206_4199187026;
  		NI LOC2;
  		NI res_390209_4199187026;
  		i_390061_4199187026 = (NI)0;
  		HEX3Atmp_390206_4199187026 = (NI)0;
  		LOC2 = (NI)0;
  		LOC2 = len_368089_4150536388(n0);
  		HEX3Atmp_390206_4199187026 = (NI)(LOC2 - ((NI) 1));
  		res_390209_4199187026 = ((NI) 0);
  		{
  			while (1) {
  				if (!(res_390209_4199187026 <= HEX3Atmp_390206_4199187026)) goto LA4;
  				i_390061_4199187026 = res_390209_4199187026;
  				renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_390061_4199187026], (&tmp0));
  				res_390209_4199187026 += ((NI) 1);
  			} LA4: ;
  		}
  	}
  	unsureAsgnRef((void**) (&(*d0).currentsection), copyString(tmp0));
  	sectionprefix0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		NI i_390074_4199187026;
  		NI HEX3Atmp_390214_4199187026;
  		NI res_390217_4199187026;
  		i_390074_4199187026 = (NI)0;
  		HEX3Atmp_390214_4199187026 = (NI)0;
  		HEX3Atmp_390214_4199187026 = ((*d0).tocpart ? ((*d0).tocpart->Sup.len-1) : -1);
  		res_390217_4199187026 = HEX3Atmp_390214_4199187026;
  		{
  			while (1) {
  				Rstnode368011* n20;
  				if (!(((NI) 0) <= res_390217_4199187026)) goto LA7;
  				i_390074_4199187026 = res_390217_4199187026;
  				n20 = (*d0).tocpart->data[i_390074_4199187026].n;
  				{
  					NimStringDesc* LOC12;
  					NimStringDesc* LOC13;
  					if (!((*n20).level < (*n0).level)) goto LA10;
  					LOC12 = (NimStringDesc*)0;
  					LOC13 = (NimStringDesc*)0;
  					LOC13 = rstnodetorefname_369062_3635346014(n20);
  					LOC12 = rawNewString(LOC13->Sup.len + 1);
  appendString(LOC12, LOC13);
  appendString(LOC12, ((NimStringDesc*) &T4199187026_5));
  					sectionprefix0 = LOC12;
  					goto LA5;
  				}
  				LA10: ;
  				res_390217_4199187026 -= ((NI) 1);
  			} LA7: ;
  		}
  	} LA5: ;
  	LOC14 = (NimStringDesc*)0;
  	LOC15 = (NimStringDesc*)0;
  	LOC15 = rstnodetorefname_369062_3635346014(n0);
  	LOC14 = rawNewString(sectionprefix0->Sup.len + LOC15->Sup.len + 0);
  appendString(LOC14, sectionprefix0);
  appendString(LOC14, LOC15);
  	refname0 = LOC14;
  	{
  		NI length0;
  		NimStringDesc* LOC20;
  		NimStringDesc* LOC21;
  		TY195781 LOC22;
  		if (!(*d0).hastoc) goto LA18;
  		length0 = ((*d0).tocpart ? (*d0).tocpart->Sup.len : 0);
  		(*d0).tocpart = (TY384029*) setLengthSeq(&((*d0).tocpart)->Sup, sizeof(Tocentry384006), ((NI) ((NI)(length0 + ((NI) 1)))));
  		LOC20 = (NimStringDesc*)0;
  		LOC20 = (*d0).tocpart->data[length0].refname; (*d0).tocpart->data[length0].refname = copyStringRC1(refname0);
  		if (LOC20) nimGCunrefNoCycle(LOC20);
  		asgnRefNoCycle((void**) (&(*d0).tocpart->data[length0].n), n0);
  		LOC21 = (NimStringDesc*)0;
  		LOC21 = (*d0).tocpart->data[length0].header; (*d0).tocpart->data[length0].header = copyStringRC1(tmp0);
  		if (LOC21) nimGCunrefNoCycle(LOC21);
  		memset((void*)LOC22, 0, sizeof(LOC22));
  		LOC22[0] = nimIntToStr((*n0).level);
  		LOC22[1] = copyString((*d0).tocpart->data[length0].refname);
  		LOC22[2] = copyString(tmp0);
  		LOC22[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI)((NI)((*n0).level - ((NI) 1)) + ((NI) 65)))))));
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_6), ((NimStringDesc*) &T4199187026_7), LOC22, 4);
  	}
  	goto LA16;
  	LA18: ;
  	{
  		TY195781 LOC24;
  		memset((void*)LOC24, 0, sizeof(LOC24));
  		LOC24[0] = nimIntToStr((*n0).level);
  		LOC24[1] = copyString(refname0);
  		LOC24[2] = copyString(tmp0);
  		LOC24[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI)((NI)((*n0).level - ((NI) 1)) + ((NI) 65)))))));
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_8), ((NimStringDesc*) &T4199187026_7), LOC24, 4);
  	}
  	LA16: ;
  	LOC25 = (NimStringDesc*)0;
  	LOC25 = striptochtml_390035_4199187026(tmp0);
  	LOC26 = (NimStringDesc*)0;
  	LOC27 = (NimStringDesc*)0;
  	LOC27 = nsuRepeatChar(32, ((NI) (((((NI) 0) >= (*n0).level) ? ((NI) 0) : (*n0).level))));
  	LOC26 = rawNewString(LOC27->Sup.len + tmp0->Sup.len + 0);
  appendString(LOC26, LOC27);
  appendString(LOC26, tmp0);
  	setindexterm_384683_4199187026(d0, refname0, LOC25, LOC26, ((NimStringDesc*) &T4199187026_4));
  }
  
  N_NIMCALL(void, renderoverline_390221_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	{
  		if (!(((*d0).meta[(((Metaenum384008) 1))- 0] ? (*d0).meta[(((Metaenum384008) 1))- 0]->Sup.len : 0) == ((NI) 0))) goto LA3;
  		{
  			NI i_390238_4199187026;
  			NI HEX3Atmp_390279_4199187026;
  			NI LOC6;
  			NI res_390282_4199187026;
  			i_390238_4199187026 = (NI)0;
  			HEX3Atmp_390279_4199187026 = (NI)0;
  			LOC6 = (NI)0;
  			LOC6 = len_368089_4150536388(n0);
  			HEX3Atmp_390279_4199187026 = (NI)(LOC6 - ((NI) 1));
  			res_390282_4199187026 = ((NI) 0);
  			{
  				while (1) {
  					if (!(res_390282_4199187026 <= HEX3Atmp_390279_4199187026)) goto LA8;
  					i_390238_4199187026 = res_390282_4199187026;
  					renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_390238_4199187026], (&(*d0).meta[(((Metaenum384008) 1))- 0]));
  					res_390282_4199187026 += ((NI) 1);
  				} LA8: ;
  			}
  		}
  		unsureAsgnRef((void**) (&(*d0).currentsection), copyString((*d0).meta[(((Metaenum384008) 1))- 0]));
  	}
  	goto LA1;
  	LA3: ;
  	{
  		if (!(((*d0).meta[(((Metaenum384008) 2))- 0] ? (*d0).meta[(((Metaenum384008) 2))- 0]->Sup.len : 0) == ((NI) 0))) goto LA10;
  		{
  			NI i_390251_4199187026;
  			NI HEX3Atmp_390287_4199187026;
  			NI LOC13;
  			NI res_390290_4199187026;
  			i_390251_4199187026 = (NI)0;
  			HEX3Atmp_390287_4199187026 = (NI)0;
  			LOC13 = (NI)0;
  			LOC13 = len_368089_4150536388(n0);
  			HEX3Atmp_390287_4199187026 = (NI)(LOC13 - ((NI) 1));
  			res_390290_4199187026 = ((NI) 0);
  			{
  				while (1) {
  					if (!(res_390290_4199187026 <= HEX3Atmp_390287_4199187026)) goto LA15;
  					i_390251_4199187026 = res_390290_4199187026;
  					renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_390251_4199187026], (&(*d0).meta[(((Metaenum384008) 2))- 0]));
  					res_390290_4199187026 += ((NI) 1);
  				} LA15: ;
  			}
  		}
  		unsureAsgnRef((void**) (&(*d0).currentsection), copyString((*d0).meta[(((Metaenum384008) 2))- 0]));
  	}
  	goto LA1;
  	LA10: ;
  	{
  		NimStringDesc* tmp0;
  		TY195781 LOC21;
  		tmp0 = copyString(((NimStringDesc*) &T4199187026_4));
  		{
  			NI i_390265_4199187026;
  			NI HEX3Atmp_390295_4199187026;
  			NI LOC18;
  			NI res_390298_4199187026;
  			i_390265_4199187026 = (NI)0;
  			HEX3Atmp_390295_4199187026 = (NI)0;
  			LOC18 = (NI)0;
  			LOC18 = len_368089_4150536388(n0);
  			HEX3Atmp_390295_4199187026 = (NI)(LOC18 - ((NI) 1));
  			res_390298_4199187026 = ((NI) 0);
  			{
  				while (1) {
  					if (!(res_390298_4199187026 <= HEX3Atmp_390295_4199187026)) goto LA20;
  					i_390265_4199187026 = res_390298_4199187026;
  					renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_390265_4199187026], (&tmp0));
  					res_390298_4199187026 += ((NI) 1);
  				} LA20: ;
  			}
  		}
  		unsureAsgnRef((void**) (&(*d0).currentsection), copyString(tmp0));
  		memset((void*)LOC21, 0, sizeof(LOC21));
  		LOC21[0] = nimIntToStr((*n0).level);
  		LOC21[1] = rstnodetorefname_369062_3635346014(n0);
  		LOC21[2] = copyString(tmp0);
  		LOC21[3] = nimCharToStr(((NIM_CHAR) (((NI) ((NI)((NI)((*n0).level - ((NI) 1)) + ((NI) 65)))))));
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_16), ((NimStringDesc*) &T4199187026_17), LOC21, 4);
  	}
  	LA1: ;
  }
  
  N_NIMCALL(void, renderaux_384632_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc* frmta0, NimStringDesc* frmtb0, NimStringDesc** result0) {
  	NimStringDesc* tmp0;
  	tmp0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		NI i_384652_4199187026;
  		NI HEX3Atmp_384668_4199187026;
  		NI LOC2;
  		NI res_384671_4199187026;
  		i_384652_4199187026 = (NI)0;
  		HEX3Atmp_384668_4199187026 = (NI)0;
  		LOC2 = (NI)0;
  		LOC2 = len_368089_4150536388(n0);
  		HEX3Atmp_384668_4199187026 = (NI)(LOC2 - ((NI) 1));
  		res_384671_4199187026 = ((NI) 0);
  		{
  			while (1) {
  				if (!(res_384671_4199187026 <= HEX3Atmp_384668_4199187026)) goto LA4;
  				i_384652_4199187026 = res_384671_4199187026;
  				renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_384652_4199187026], (&tmp0));
  				res_384671_4199187026 += ((NI) 1);
  			} LA4: ;
  		}
  	}
  	{
  		TY193732 LOC9;
  		if (!!(((*d0).target == ((Outputtarget384004) 1)))) goto LA7;
  		memset((void*)LOC9, 0, sizeof(LOC9));
  		LOC9[0] = copyString(tmp0);
  		nsuAddf(result0, frmta0, LOC9, 1);
  	}
  	goto LA5;
  	LA7: ;
  	{
  		TY193732 LOC11;
  		memset((void*)LOC11, 0, sizeof(LOC11));
  		LOC11[0] = copyString(tmp0);
  		nsuAddf(result0, frmtb0, LOC11, 1);
  	}
  	LA5: ;
  }
  
  N_NIMCALL(NI, nextsplitpoint_384449_4199187026)(NimStringDesc* s0, NI start0) {
  	NI result0;
  {	result0 = (NI)0;
  	result0 = start0;
  	{
  		while (1) {
  			if (!(result0 < (NI)((s0 ? s0->Sup.len : 0) + ((NI) 0)))) goto LA2;
  			switch (((NU8)(s0->data[result0]))) {
  			case 95:
  			{
  				goto BeforeRet;
  			}
  			break;
  			case 97 ... 122:
  			{
  				{
  					if (!((NI)(result0 + ((NI) 1)) < (NI)((s0 ? s0->Sup.len : 0) + ((NI) 0)))) goto LA7;
  					{
  						if (!(((NU8)(s0->data[(NI)(result0 + ((NI) 1))])) >= ((NU8)(65)) && ((NU8)(s0->data[(NI)(result0 + ((NI) 1))])) <= ((NU8)(90)))) goto LA11;
  						goto BeforeRet;
  					}
  					LA11: ;
  				}
  				LA7: ;
  			}
  			break;
  			default:
  			{
  			}
  			break;
  			}
  			result0 += ((NI) 1);
  		} LA2: ;
  	}
  	result0 -= ((NI) 1);
  	}BeforeRet: ;
  	return result0;
  }
  
  static N_INLINE(NIM_BOOL, equalmem_7495_1689653243)(void* a0, void* b0, NI size0) {
  	NIM_BOOL result0;
  	int LOC1;
  	result0 = (NIM_BOOL)0;
  	LOC1 = (int)0;
  	LOC1 = memcmp(a0, b0, ((size_t) (size0)));
  	result0 = (LOC1 == ((NI32) 0));
  	return result0;
  }
  
  static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a0, NimStringDesc* b0) {
  	NIM_BOOL result0;
  	NIM_BOOL LOC11;
  {	result0 = (NIM_BOOL)0;
  	{
  		if (!(a0 == b0)) goto LA3;
  		result0 = NIM_TRUE;
  		goto BeforeRet;
  	}
  	LA3: ;
  	{
  		NIM_BOOL LOC7;
  		LOC7 = (NIM_BOOL)0;
  		LOC7 = (a0 == NIM_NIL);
  		if (LOC7) goto LA8;
  		LOC7 = (b0 == NIM_NIL);
  		LA8: ;
  		if (!LOC7) goto LA9;
  		result0 = NIM_FALSE;
  		goto BeforeRet;
  	}
  	LA9: ;
  	LOC11 = (NIM_BOOL)0;
  	LOC11 = ((*a0).Sup.len == (*b0).Sup.len);
  	if (!(LOC11)) goto LA12;
  	LOC11 = equalmem_7495_1689653243(((void*) ((*a0).data)), ((void*) ((*b0).data)), ((NI) ((*a0).Sup.len)));
  	LA12: ;
  	result0 = LOC11;
  	goto BeforeRet;
  	}BeforeRet: ;
  	return result0;
  }
  
  N_NIMCALL(void, addxmlchar_384426_4199187026)(NimStringDesc** dest0, NIM_CHAR c0) {
  	switch (((NU8)(c0))) {
  	case 38:
  	{
  		(*dest0) = resizeString((*dest0), 5);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_36));
  	}
  	break;
  	case 60:
  	{
  		(*dest0) = resizeString((*dest0), 4);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_37));
  	}
  	break;
  	case 62:
  	{
  		(*dest0) = resizeString((*dest0), 4);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_38));
  	}
  	break;
  	case 34:
  	{
  		(*dest0) = resizeString((*dest0), 6);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_39));
  	}
  	break;
  	default:
  	{
  		(*dest0) = addChar((*dest0), c0);
  	}
  	break;
  	}
  }
  
  N_NIMCALL(void, addtexchar_384436_4199187026)(NimStringDesc** dest0, NIM_CHAR c0) {
  	switch (((NU8)(c0))) {
  	case 95:
  	{
  		(*dest0) = resizeString((*dest0), 2);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_40));
  	}
  	break;
  	case 123:
  	{
  		(*dest0) = resizeString((*dest0), 12);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_41));
  	}
  	break;
  	case 125:
  	{
  		(*dest0) = resizeString((*dest0), 12);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_42));
  	}
  	break;
  	case 91:
  	{
  		(*dest0) = resizeString((*dest0), 11);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_43));
  	}
  	break;
  	case 93:
  	{
  		(*dest0) = resizeString((*dest0), 11);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_44));
  	}
  	break;
  	case 92:
  	{
  		(*dest0) = resizeString((*dest0), 11);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_45));
  	}
  	break;
  	case 36:
  	{
  		(*dest0) = resizeString((*dest0), 2);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_46));
  	}
  	break;
  	case 38:
  	{
  		(*dest0) = resizeString((*dest0), 2);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_47));
  	}
  	break;
  	case 35:
  	{
  		(*dest0) = resizeString((*dest0), 2);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_48));
  	}
  	break;
  	case 37:
  	{
  		(*dest0) = resizeString((*dest0), 2);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_49));
  	}
  	break;
  	case 126:
  	{
  		(*dest0) = resizeString((*dest0), 12);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_50));
  	}
  	break;
  	case 64:
  	{
  		(*dest0) = resizeString((*dest0), 11);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_51));
  	}
  	break;
  	case 94:
  	{
  		(*dest0) = resizeString((*dest0), 11);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_52));
  	}
  	break;
  	case 96:
  	{
  		(*dest0) = resizeString((*dest0), 11);
  appendString((*dest0), ((NimStringDesc*) &T4199187026_53));
  	}
  	break;
  	default:
  	{
  		(*dest0) = addChar((*dest0), c0);
  	}
  	break;
  	}
  }
  
  static N_INLINE(void, escchar_384443_4199187026)(Outputtarget384004 target0, NimStringDesc** dest0, NIM_CHAR c0) {
  	switch (target0) {
  	case ((Outputtarget384004) 0):
  	{
  		addxmlchar_384426_4199187026(dest0, c0);
  	}
  	break;
  	case ((Outputtarget384004) 1):
  	{
  		addtexchar_384436_4199187026(dest0, c0);
  	}
  	break;
  	}
  }
  
  N_NIMCALL(NimStringDesc*, esc_384484_4199187026)(Outputtarget384004 target0, NimStringDesc* s0, NI splitafter0) {
  	NimStringDesc* result0;
  	result0 = (NimStringDesc*)0;
  	result0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		NI partlen0;
  		NI j0;
  		if (!(((NI) 0) <= splitafter0)) goto LA3;
  		partlen0 = ((NI) 0);
  		j0 = ((NI) 0);
  		{
  			while (1) {
  				NI k0;
  				if (!(j0 < (s0 ? s0->Sup.len : 0))) goto LA6;
  				k0 = nextsplitpoint_384449_4199187026(s0, j0);
  				{
  					NIM_BOOL LOC9;
  					LOC9 = (NIM_BOOL)0;
  					LOC9 = !(eqStrings(splitter_384441_4199187026, ((NimStringDesc*) &T4199187026_35)));
  					if (LOC9) goto LA10;
  					LOC9 = (splitafter0 < (NI)((NI)((NI)(partlen0 + k0) - j0) + ((NI) 1)));
  					LA10: ;
  					if (!LOC9) goto LA11;
  					partlen0 = ((NI) 0);
  					result0 = resizeString(result0, splitter_384441_4199187026->Sup.len + 0);
  appendString(result0, splitter_384441_4199187026);
  				}
  				LA11: ;
  				{
  					NI i_384504_4199187026;
  					NI res_384532_4199187026;
  					i_384504_4199187026 = (NI)0;
  					res_384532_4199187026 = j0;
  					{
  						while (1) {
  							if (!(res_384532_4199187026 <= k0)) goto LA15;
  							i_384504_4199187026 = res_384532_4199187026;
  							escchar_384443_4199187026(target0, (&result0), s0->data[i_384504_4199187026]);
  							res_384532_4199187026 += ((NI) 1);
  						} LA15: ;
  					}
  				}
  				partlen0 += (NI)((NI)(k0 - j0) + ((NI) 1));
  				j0 = (NI)(k0 + ((NI) 1));
  			} LA6: ;
  		}
  	}
  	goto LA1;
  	LA3: ;
  	{
  		{
  			NI i_384526_4199187026;
  			NI HEX3Atmp_384537_4199187026;
  			NI res_384540_4199187026;
  			i_384526_4199187026 = (NI)0;
  			HEX3Atmp_384537_4199187026 = (NI)0;
  			HEX3Atmp_384537_4199187026 = (NI)((s0 ? s0->Sup.len : 0) - ((NI) 1));
  			res_384540_4199187026 = ((NI) 0);
  			{
  				while (1) {
  					if (!(res_384540_4199187026 <= HEX3Atmp_384537_4199187026)) goto LA19;
  					i_384526_4199187026 = res_384540_4199187026;
  					escchar_384443_4199187026(target0, (&result0), s0->data[i_384526_4199187026]);
  					res_384540_4199187026 += ((NI) 1);
  				} LA19: ;
  			}
  		}
  	}
  	LA1: ;
  	return result0;
  }
  
  N_NIMCALL(void, renderfield_391874_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	NIM_BOOL b0;
  	b0 = NIM_FALSE;
  	{
  		NimStringDesc* fieldname0;
  		NimStringDesc* fieldval0;
  		NimStringDesc* LOC5;
  		NimStringDesc* LOC6;
  		if (!((*d0).target == ((Outputtarget384004) 1))) goto LA3;
  		fieldname0 = addnodes_369065_3635346014((*n0).sons->data[((NI) 0)]);
  		LOC5 = (NimStringDesc*)0;
  		LOC5 = addnodes_369065_3635346014((*n0).sons->data[((NI) 1)]);
  		LOC6 = (NimStringDesc*)0;
  		LOC6 = nsuStrip(LOC5, NIM_TRUE, NIM_TRUE, T4199187026_54);
  		fieldval0 = esc_384484_4199187026((*d0).target, LOC6, ((NI) -1));
  		{
  			NIM_BOOL LOC9;
  			NI LOC10;
  			NI LOC12;
  			LOC9 = (NIM_BOOL)0;
  			LOC10 = (NI)0;
  			LOC10 = nsuCmpIgnoreStyle(fieldname0, ((NimStringDesc*) &T4199187026_55));
  			LOC9 = (LOC10 == ((NI) 0));
  			if (LOC9) goto LA11;
  			LOC12 = (NI)0;
  			LOC12 = nsuCmpIgnoreStyle(fieldname0, ((NimStringDesc*) &T4199187026_56));
  			LOC9 = (LOC12 == ((NI) 0));
  			LA11: ;
  			if (!LOC9) goto LA13;
  			{
  				if (!(((*d0).meta[(((Metaenum384008) 3))- 0] ? (*d0).meta[(((Metaenum384008) 3))- 0]->Sup.len : 0) == ((NI) 0))) goto LA17;
  				unsureAsgnRef((void**) (&(*d0).meta[(((Metaenum384008) 3))- 0]), copyString(fieldval0));
  				b0 = NIM_TRUE;
  			}
  			LA17: ;
  		}
  		goto LA7;
  		LA13: ;
  		{
  			NI LOC20;
  			LOC20 = (NI)0;
  			LOC20 = nsuCmpIgnoreStyle(fieldname0, ((NimStringDesc*) &T4199187026_57));
  			if (!(LOC20 == ((NI) 0))) goto LA21;
  			{
  				if (!(((*d0).meta[(((Metaenum384008) 4))- 0] ? (*d0).meta[(((Metaenum384008) 4))- 0]->Sup.len : 0) == ((NI) 0))) goto LA25;
  				unsureAsgnRef((void**) (&(*d0).meta[(((Metaenum384008) 4))- 0]), copyString(fieldval0));
  				b0 = NIM_TRUE;
  			}
  			LA25: ;
  		}
  		goto LA7;
  		LA21: ;
  		LA7: ;
  	}
  	LA3: ;
  	{
  		if (!!(b0)) goto LA29;
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_58), ((NimStringDesc*) &T4199187026_59), result0);
  	}
  	LA29: ;
  }
  
  N_NIMCALL(NimStringDesc*, texcolumns_391850_4199187026)(Rstnode368011* n0) {
  	NimStringDesc* result0;
  	result0 = (NimStringDesc*)0;
  	result0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		NI i_391865_4199187026;
  		NI HEX3Atmp_391867_4199187026;
  		NI res_391870_4199187026;
  		i_391865_4199187026 = (NI)0;
  		HEX3Atmp_391867_4199187026 = (NI)0;
  		HEX3Atmp_391867_4199187026 = len_368089_4150536388(n0);
  		res_391870_4199187026 = ((NI) 1);
  		{
  			while (1) {
  				if (!(res_391870_4199187026 <= HEX3Atmp_391867_4199187026)) goto LA3;
  				i_391865_4199187026 = res_391870_4199187026;
  				result0 = resizeString(result0, 2);
  appendString(result0, ((NimStringDesc*) &T4199187026_79));
  				res_391870_4199187026 += ((NI) 1);
  			} LA3: ;
  		}
  	}
  	return result0;
  }
  
  N_NIMCALL(NimStringDesc*, dispf_384559_4199187026)(Outputtarget384004 target0, NimStringDesc* xml0, NimStringDesc* tex0, NimStringDesc** args0, NI args0Len0) {
  	NimStringDesc* result0;
  	result0 = (NimStringDesc*)0;
  	{
  		if (!!((target0 == ((Outputtarget384004) 1)))) goto LA3;
  		result0 = nsuFormatOpenArray(xml0, args0, args0Len0);
  	}
  	goto LA1;
  	LA3: ;
  	{
  		result0 = nsuFormatOpenArray(tex0, args0, args0Len0);
  	}
  	LA1: ;
  	return result0;
  }
  
  N_NIMCALL(void, renderimage_390335_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	NimStringDesc* arg0;
  	NIM_BOOL isobject0;
  	NimStringDesc* LOC1;
  	NimStringDesc* options0;
  	NimStringDesc* content0;
  	NimStringDesc* s0;
  	arg0 = getargument_369072_3635346014(n0);
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = nsuToLowerStr(arg0);
  	isobject0 = nsuEndsWith(LOC1, ((NimStringDesc*) &T4199187026_93));
  	options0 = copyString(((NimStringDesc*) &T4199187026_4));
  	content0 = copyString(((NimStringDesc*) &T4199187026_4));
  	s0 = getfieldvalue_369068_3635346014(n0, ((NimStringDesc*) &T4199187026_94));
  	{
  		NIM_BOOL LOC4;
  		NimStringDesc* LOC8;
  		TY193732 LOC14;
  		LOC4 = (NIM_BOOL)0;
  		LOC4 = (((NI) 0) < (s0 ? s0->Sup.len : 0));
  		if (!(LOC4)) goto LA5;
  		LOC4 = allcharsinset_109382_4286263276(s0, T4199187026_95);
  		LA5: ;
  		if (!LOC4) goto LA6;
  		LOC8 = (NimStringDesc*)0;
  		{
  			if (!isobject0) goto LA11;
  			LOC8 = copyString(((NimStringDesc*) &T4199187026_4));
  		}
  		goto LA9;
  		LA11: ;
  		{
  			LOC8 = copyString(((NimStringDesc*) &T4199187026_96));
  		}
  		LA9: ;
  		memset((void*)LOC14, 0, sizeof(LOC14));
  		LOC14[0] = nsuStrip(s0, NIM_TRUE, NIM_TRUE, T4199187026_54);
  		dispa_384576_4199187026((*d0).target, (&options0), LOC8, ((NimStringDesc*) &T4199187026_97), LOC14, 1);
  	}
  	LA6: ;
  	s0 = getfieldvalue_369068_3635346014(n0, ((NimStringDesc*) &T4199187026_98));
  	{
  		NIM_BOOL LOC17;
  		TY193732 LOC21;
  		LOC17 = (NIM_BOOL)0;
  		LOC17 = (((NI) 0) < (s0 ? s0->Sup.len : 0));
  		if (!(LOC17)) goto LA18;
  		LOC17 = allcharsinset_109382_4286263276(s0, T4199187026_95);
  		LA18: ;
  		if (!LOC17) goto LA19;
  		memset((void*)LOC21, 0, sizeof(LOC21));
  		LOC21[0] = nsuStrip(s0, NIM_TRUE, NIM_TRUE, T4199187026_54);
  		dispa_384576_4199187026((*d0).target, (&options0), ((NimStringDesc*) &T4199187026_99), ((NimStringDesc*) &T4199187026_100), LOC21, 1);
  	}
  	LA19: ;
  	s0 = getfieldvalue_369068_3635346014(n0, ((NimStringDesc*) &T4199187026_101));
  	{
  		NIM_BOOL LOC24;
  		TY193732 LOC28;
  		LOC24 = (NIM_BOOL)0;
  		LOC24 = (((NI) 0) < (s0 ? s0->Sup.len : 0));
  		if (!(LOC24)) goto LA25;
  		LOC24 = allcharsinset_109382_4286263276(s0, T4199187026_95);
  		LA25: ;
  		if (!LOC24) goto LA26;
  		memset((void*)LOC28, 0, sizeof(LOC28));
  		LOC28[0] = nsuStrip(s0, NIM_TRUE, NIM_TRUE, T4199187026_54);
  		dispa_384576_4199187026((*d0).target, (&options0), ((NimStringDesc*) &T4199187026_102), ((NimStringDesc*) &T4199187026_103), LOC28, 1);
  	}
  	LA26: ;
  	s0 = getfieldvalue_369068_3635346014(n0, ((NimStringDesc*) &T4199187026_104));
  	{
  		NIM_BOOL LOC31;
  		LOC31 = (NIM_BOOL)0;
  		LOC31 = (((NI) 0) < (s0 ? s0->Sup.len : 0));
  		if (!(LOC31)) goto LA32;
  		LOC31 = allcharsinset_109382_4286263276(s0, T4199187026_95);
  		LA32: ;
  		if (!LOC31) goto LA33;
  		{
  			TY193732 LOC39;
  			if (!isobject0) goto LA37;
  			memset((void*)LOC39, 0, sizeof(LOC39));
  			LOC39[0] = nsuStrip(s0, NIM_TRUE, NIM_TRUE, T4199187026_54);
  			dispa_384576_4199187026((*d0).target, (&content0), ((NimStringDesc*) &T4199187026_59), ((NimStringDesc*) &T4199187026_4), LOC39, 1);
  		}
  		goto LA35;
  		LA37: ;
  		{
  			TY193732 LOC41;
  			memset((void*)LOC41, 0, sizeof(LOC41));
  			LOC41[0] = nsuStrip(s0, NIM_TRUE, NIM_TRUE, T4199187026_54);
  			dispa_384576_4199187026((*d0).target, (&options0), ((NimStringDesc*) &T4199187026_105), ((NimStringDesc*) &T4199187026_4), LOC41, 1);
  		}
  		LA35: ;
  	}
  	LA33: ;
  	s0 = getfieldvalue_369068_3635346014(n0, ((NimStringDesc*) &T4199187026_106));
  	{
  		NIM_BOOL LOC44;
  		TY193732 LOC48;
  		LOC44 = (NIM_BOOL)0;
  		LOC44 = (((NI) 0) < (s0 ? s0->Sup.len : 0));
  		if (!(LOC44)) goto LA45;
  		LOC44 = allcharsinset_109382_4286263276(s0, T4199187026_95);
  		LA45: ;
  		if (!LOC44) goto LA46;
  		memset((void*)LOC48, 0, sizeof(LOC48));
  		LOC48[0] = nsuStrip(s0, NIM_TRUE, NIM_TRUE, T4199187026_54);
  		dispa_384576_4199187026((*d0).target, (&options0), ((NimStringDesc*) &T4199187026_107), ((NimStringDesc*) &T4199187026_4), LOC48, 1);
  	}
  	LA46: ;
  	{
  		TY193732 LOC53;
  		if (!(((NI) 0) < (options0 ? options0->Sup.len : 0))) goto LA51;
  		memset((void*)LOC53, 0, sizeof(LOC53));
  		LOC53[0] = copyString(options0);
  		options0 = dispf_384559_4199187026((*d0).target, ((NimStringDesc*) &T4199187026_59), ((NimStringDesc*) &T4199187026_108), LOC53, 1);
  	}
  	LA51: ;
  	{
  		NIM_BOOL LOC56;
  		NimStringDesc* htmlout0;
  		TY194153 LOC66;
  		LOC56 = (NIM_BOOL)0;
  		LOC56 = (((NI) 0) < (arg0 ? arg0->Sup.len : 0));
  		if (!(LOC56)) goto LA57;
  		LOC56 = allcharsinset_109382_4286263276(arg0, T4199187026_95);
  		LA57: ;
  		if (!LOC56) goto LA58;
  		{
  			NimStringDesc* LOC64;
  			if (!isobject0) goto LA62;
  			LOC64 = (NimStringDesc*)0;
  			LOC64 = rawNewString(content0->Sup.len + 51);
  appendString(LOC64, ((NimStringDesc*) &T4199187026_109));
  appendString(LOC64, content0);
  appendString(LOC64, ((NimStringDesc*) &T4199187026_110));
  			htmlout0 = LOC64;
  		}
  		goto LA60;
  		LA62: ;
  		{
  			htmlout0 = copyString(((NimStringDesc*) &T4199187026_111));
  		}
  		LA60: ;
  		memset((void*)LOC66, 0, sizeof(LOC66));
  		LOC66[0] = copyString(arg0);
  		LOC66[1] = copyString(options0);
  		dispa_384576_4199187026((*d0).target, result0, htmlout0, ((NimStringDesc*) &T4199187026_112), LOC66, 2);
  	}
  	LA58: ;
  	{
  		NI LOC69;
  		LOC69 = (NI)0;
  		LOC69 = len_368089_4150536388(n0);
  		if (!(((NI) 3) <= LOC69)) goto LA70;
  		renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 2)], result0);
  	}
  	LA70: ;
  }
  
  N_NIMCALL(void, init_384079_4199187026)(Codeblockparams384014* p0) {
  	(*p0).startline = ((NI) 1);
  	(*p0).lang = ((Sourcelanguage376008) 0);
  	unsureAsgnRef((void**) (&(*p0).langstr), copyString(((NimStringDesc*) &T4199187026_4)));
  }
  
  N_NIMCALL(void, parsecodeblockfield_390609_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, Codeblockparams384014* params0) {
  	NimStringDesc* LOC1;
  	NimStringDesc* LOC2;
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = getargument_369072_3635346014(n0);
  	LOC2 = (NimStringDesc*)0;
  	LOC2 = nsuToLowerStr(LOC1);
  	if (eqStrings(LOC2, ((NimStringDesc*) &T4199187026_113))) goto LA3;
  	if (eqStrings(LOC2, ((NimStringDesc*) &T4199187026_114))) goto LA4;
  	if (eqStrings(LOC2, ((NimStringDesc*) &T4199187026_115))) goto LA5;
  	goto LA6;
  	LA3: ;
  	{
  		NI number0;
  		(*params0).numberlines = NIM_TRUE;
  		number0 = (NI)0;
  		{
  			NimStringDesc* LOC11;
  			NI LOC12;
  			LOC11 = (NimStringDesc*)0;
  			LOC11 = getfieldvalue_371773_3635346014(n0);
  			LOC12 = (NI)0;
  			LOC12 = npuParseInt(LOC11, (&number0), ((NI) 0));
  			if (!(((NI) 0) < LOC12)) goto LA13;
  			(*params0).startline = number0;
  		}
  		LA13: ;
  	}
  	goto LA7;
  	LA4: ;
  	{
  	}
  	goto LA7;
  	LA5: ;
  	{
  		NimStringDesc* LOC17;
  		LOC17 = (NimStringDesc*)0;
  		LOC17 = getfieldvalue_371773_3635346014(n0);
  		unsureAsgnRef((void**) (&(*params0).langstr), nsuStrip(LOC17, NIM_TRUE, NIM_TRUE, T4199187026_54));
  		(*params0).lang = getsourcelanguage_376077_1283795525((*params0).langstr);
  	}
  	goto LA7;
  	LA6: ;
  	{
  		NimStringDesc* LOC19;
  		LOC19 = (NimStringDesc*)0;
  		LOC19 = getargument_369072_3635346014(n0);
  		(*d0).msghandler((*d0).filename, ((NI) 1), ((NI) 0), ((Msgkind369009) 9), LOC19);
  	}
  	LA7: ;
  }
  
  N_NIMCALL(void, parsecodeblockparams_390618_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, Codeblockparams384014* Result) {
  	NimStringDesc* LOC12;
  {	init_384079_4199187026(Result);
  	{
  		if (!n0 == 0) goto LA3;
  		goto BeforeRet;
  	}
  	LA3: ;
  	{
  		if (!!((*n0).sons->data[((NI) 1)] == 0)) goto LA7;
  		{
  			Rstnode368011* son_391202_4199187026;
  			Rstnodeseq368009* HEX3Atmp_391205_4199187026;
  			NI i_391208_4199187026;
  			NI L_391210_4199187026;
  			son_391202_4199187026 = (Rstnode368011*)0;
  			HEX3Atmp_391205_4199187026 = (Rstnodeseq368009*)0;
  			HEX3Atmp_391205_4199187026 = (*(*n0).sons->data[((NI) 1)]).sons;
  			i_391208_4199187026 = ((NI) 0);
  			L_391210_4199187026 = (HEX3Atmp_391205_4199187026 ? HEX3Atmp_391205_4199187026->Sup.len : 0);
  			{
  				while (1) {
  					if (!(i_391208_4199187026 < L_391210_4199187026)) goto LA11;
  					son_391202_4199187026 = HEX3Atmp_391205_4199187026->data[i_391208_4199187026];
  					parsecodeblockfield_390609_4199187026(d0, son_391202_4199187026, Result);
  					i_391208_4199187026 += ((NI) 1);
  				} LA11: ;
  			}
  		}
  	}
  	LA7: ;
  	LOC12 = (NimStringDesc*)0;
  	LOC12 = getargument_369072_3635346014(n0);
  	unsureAsgnRef((void**) (&(*Result).langstr), nsuStrip(LOC12, NIM_TRUE, NIM_TRUE, T4199187026_54));
  	{
  		if (!!((((*Result).langstr) && ((*Result).langstr)->Sup.len == 0))) goto LA15;
  		(*Result).lang = getsourcelanguage_376077_1283795525((*Result).langstr);
  	}
  	LA15: ;
  	}BeforeRet: ;
  }
  
  N_NIMCALL(void, buildlineshtmltable_391211_4199187026)(Rstgenerator384010* d0, Codeblockparams384014* params0, NimStringDesc* code0, Keyvaluepair152604* Result) {
  	NimStringDesc* id0;
  	NI codelines0;
  	NimStringDesc* LOC7;
  	NI LOC8;
  	NI line0;
  	NimStringDesc* LOC13;
  	NimStringDesc* LOC14;
  	NimStringDesc* LOC15;
  	NimStringDesc* LOC16;
  	NimStringDesc* LOC17;
  	NimStringDesc* LOC18;
  	NimStringDesc* LOC19;
  	NimStringDesc* LOC20;
  {	(*d0).listingcounter += ((NI) 1);
  	id0 = nimIntToStr((*d0).listingcounter);
  	{
  		NimStringDesc* LOC5;
  		NimStringDesc* LOC6;
  		if (!!((*params0).numberlines)) goto LA3;
  		LOC5 = (NimStringDesc*)0;
  		LOC5 = getordefault_153214_603679043((*d0).config, ((NimStringDesc*) &T4199187026_116));
  		unsureAsgnRef((void**) (&(*Result).Field0), nsuFormatSingleElem(LOC5, id0));
  		LOC6 = (NimStringDesc*)0;
  		LOC6 = getordefault_153214_603679043((*d0).config, ((NimStringDesc*) &T4199187026_117));
  		unsureAsgnRef((void**) (&(*Result).Field1), nsuFormatSingleElem(LOC6, id0));
  		goto BeforeRet;
  	}
  	LA3: ;
  	LOC7 = (NimStringDesc*)0;
  	LOC7 = nsuStrip(code0, NIM_TRUE, NIM_TRUE, T4199187026_54);
  	LOC8 = (NI)0;
  	LOC8 = nsuCountLines(LOC7);
  	codelines0 = (NI)(((NI) 1) + LOC8);
  	unsureAsgnRef((void**) (&(*Result).Field0), copyString(((NimStringDesc*) &T4199187026_118)));
  	line0 = (*params0).startline;
  	{
  		while (1) {
  			NimStringDesc* LOC11;
  			NimStringDesc* LOC12;
  			if (!(((NI) 0) < codelines0)) goto LA10;
  			LOC11 = (NimStringDesc*)0;
  			LOC12 = (NimStringDesc*)0;
  			LOC12 = nimIntToStr(line0);
  			LOC11 = rawNewString(LOC12->Sup.len + 1);
  appendString(LOC11, LOC12);
  appendString(LOC11, ((NimStringDesc*) &T4199187026_12));
  			(*Result).Field0 = resizeString((*Result).Field0, LOC11->Sup.len + 0);
  appendString((*Result).Field0, LOC11);
  			line0 += ((NI) 1);
  			codelines0 -= ((NI) 1);
  		} LA10: ;
  	}
  	LOC13 = (NimStringDesc*)0;
  	LOC14 = (NimStringDesc*)0;
  	LOC14 = getordefault_153214_603679043((*d0).config, ((NimStringDesc*) &T4199187026_116));
  	LOC15 = (NimStringDesc*)0;
  	LOC15 = nsuFormatSingleElem(LOC14, id0);
  	LOC13 = rawNewString(LOC15->Sup.len + 15);
  appendString(LOC13, ((NimStringDesc*) &T4199187026_119));
  appendString(LOC13, LOC15);
  	(*Result).Field0 = resizeString((*Result).Field0, LOC13->Sup.len + 0);
  appendString((*Result).Field0, LOC13);
  	LOC16 = (NimStringDesc*)0;
  	LOC17 = (NimStringDesc*)0;
  	LOC17 = getordefault_153214_603679043((*d0).config, ((NimStringDesc*) &T4199187026_117));
  	LOC18 = (NimStringDesc*)0;
  	LOC18 = nsuFormatSingleElem(LOC17, id0);
  	LOC19 = (NimStringDesc*)0;
  	LOC19 = getordefault_153214_603679043((*d0).config, ((NimStringDesc*) &T4199187026_121));
  	LOC20 = (NimStringDesc*)0;
  	LOC20 = nsuFormatSingleElem(LOC19, id0);
  	LOC16 = rawNewString(LOC18->Sup.len + LOC20->Sup.len + 26);
  appendString(LOC16, LOC18);
  appendString(LOC16, ((NimStringDesc*) &T4199187026_120));
  appendString(LOC16, LOC20);
  	unsureAsgnRef((void**) (&(*Result).Field1), LOC16);
  	}BeforeRet: ;
  }
  
  N_NIMCALL(void, rendercodeblock_391421_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	Codeblockparams384014 params0;
  	Rstnode368011* m0;
  	Keyvaluepair152604 LOC5;
  	NimStringDesc* blockstart0;
  	NimStringDesc* blockend0;
  	TY318494 LOC6;
  	TY318494 LOC27;
  {	{
  		if (!((*n0).sons->data[((NI) 2)] == NIM_NIL)) goto LA3;
  		goto BeforeRet;
  	}
  	LA3: ;
  	memset((void*)(&params0), 0, sizeof(params0));
  	chckNil((void*)(&params0));
  	memset((void*)(&params0), 0, sizeof(params0));
  	parsecodeblockparams_390618_4199187026(d0, n0, (&params0));
  	m0 = (*(*n0).sons->data[((NI) 2)]).sons->data[((NI) 0)];
  	memset((void*)(&LOC5), 0, sizeof(LOC5));
  	buildlineshtmltable_391211_4199187026(d0, (&params0), (*m0).text, (&LOC5));
  	blockstart0 = (NimStringDesc*)0;
  	blockstart0 = LOC5.Field0;
  	blockend0 = (NimStringDesc*)0;
  	blockend0 = LOC5.Field1;
  	memset((void*)LOC6, 0, sizeof(LOC6));
  	dispa_384576_4199187026((*d0).target, result0, blockstart0, ((NimStringDesc*) &T4199187026_122), LOC6, 0);
  	{
  		if (!(params0.lang == ((Sourcelanguage376008) 0))) goto LA9;
  		{
  			if (!(((NI) 0) < (params0.langstr ? params0.langstr->Sup.len : 0))) goto LA13;
  			(*d0).msghandler((*d0).filename, ((NI) 1), ((NI) 0), ((Msgkind369009) 8), params0.langstr);
  		}
  		LA13: ;
  		{
  			NIM_CHAR letter_391816_4199187026;
  			NimStringDesc* HEX3Atmp_391828_4199187026;
  			NI i_391831_4199187026;
  			NI L_391833_4199187026;
  			letter_391816_4199187026 = (NIM_CHAR)0;
  			HEX3Atmp_391828_4199187026 = (NimStringDesc*)0;
  			HEX3Atmp_391828_4199187026 = (*m0).text;
  			i_391831_4199187026 = ((NI) 0);
  			L_391833_4199187026 = (HEX3Atmp_391828_4199187026 ? HEX3Atmp_391828_4199187026->Sup.len : 0);
  			{
  				while (1) {
  					if (!(i_391831_4199187026 < L_391833_4199187026)) goto LA17;
  					letter_391816_4199187026 = HEX3Atmp_391828_4199187026->data[i_391831_4199187026];
  					escchar_384443_4199187026((*d0).target, result0, letter_391816_4199187026);
  					i_391831_4199187026 += ((NI) 1);
  				} LA17: ;
  			}
  		}
  	}
  	goto LA7;
  	LA9: ;
  	{
  		Generaltokenizer376006 g0;
  		memset((void*)(&g0), 0, sizeof(g0));
  		g0.Sup.m_type = (&NTI376006);
  		initgeneraltokenizer_376253_1283795525((&g0), (*m0).text);
  		{
  			while (1) {
  				getnexttoken_380185_1283795525((&g0), params0.lang);
  				switch (g0.kind) {
  				case ((Tokenclass376004) 0):
  				{
  					goto LA19;
  				}
  				break;
  				case ((Tokenclass376004) 1):
  				case ((Tokenclass376004) 2):
  				{
  					NimStringDesc* LOC23;
  					LOC23 = (NimStringDesc*)0;
  					LOC23 = copyStrLast((*m0).text, g0.start, (NI)((NI)(g0.length + g0.start) - ((NI) 1)));
  					(*result0) = resizeString((*result0), LOC23->Sup.len + 0);
  appendString((*result0), LOC23);
  				}
  				break;
  				default:
  				{
  					TY194153 LOC25;
  					NimStringDesc* LOC26;
  					memset((void*)LOC25, 0, sizeof(LOC25));
  					LOC26 = (NimStringDesc*)0;
  					LOC26 = copyStrLast((*m0).text, g0.start, (NI)((NI)(g0.length + g0.start) - ((NI) 1)));
  					LOC25[0] = esc_384484_4199187026((*d0).target, LOC26, ((NI) -1));
  					LOC25[1] = copyString(tokenclasstostr_376068_1283795525[(g0.kind)- 0]);
  					dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_123), ((NimStringDesc*) &T4199187026_124), LOC25, 2);
  				}
  				break;
  				}
  			}
  		} LA19: ;
  		deinitgeneraltokenizer_376258_1283795525((&g0));
  	}
  	LA7: ;
  	memset((void*)LOC27, 0, sizeof(LOC27));
  	dispa_384576_4199187026((*d0).target, result0, blockend0, ((NimStringDesc*) &T4199187026_125), LOC27, 0);
  	}BeforeRet: ;
  }
  
  N_NIMCALL(void, rendercontainer_391837_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	NimStringDesc* tmp0;
  	NimStringDesc* arg0;
  	NimStringDesc* LOC1;
  	tmp0 = copyString(((NimStringDesc*) &T4199187026_4));
  	renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 2)], (&tmp0));
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = getargument_369072_3635346014(n0);
  	arg0 = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, T4199187026_54);
  	{
  		TY193732 LOC6;
  		if (!((arg0) && (arg0)->Sup.len == 0)) goto LA4;
  		memset((void*)LOC6, 0, sizeof(LOC6));
  		LOC6[0] = copyString(tmp0);
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_126), ((NimStringDesc*) &T4199187026_59), LOC6, 1);
  	}
  	goto LA2;
  	LA4: ;
  	{
  		TY194153 LOC8;
  		memset((void*)LOC8, 0, sizeof(LOC8));
  		LOC8[0] = copyString(arg0);
  		LOC8[1] = copyString(tmp0);
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_127), ((NimStringDesc*) &T4199187026_128), LOC8, 2);
  	}
  	LA2: ;
  }
  
  N_NIMCALL(void, renderindexterm_384846_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	NimStringDesc* refname0;
  	NimStringDesc* id0;
  	NimStringDesc* LOC8;
  	NI LOC9;
  	NimStringDesc* LOC10;
  	NimStringDesc* term0;
  	TY194153 LOC11;
  	refname0 = rstnodetorefname_369062_3635346014(n0);
  	{
  		NIM_BOOL LOC3;
  		NI LOC6;
  		LOC3 = (NIM_BOOL)0;
  		LOC3 = haskey_384854_30748785((*d0).seenindexterms, refname0);
  		if (!LOC3) goto LA4;
  		LOC6 = (NI)0;
  		LOC6 = getordefault_384886_30748785((*d0).seenindexterms, refname0);
  		HEX5BHEX5DHEX3D_384915_30748785((&(*d0).seenindexterms), refname0, (NI)(LOC6 + ((NI) 1)));
  	}
  	goto LA1;
  	LA4: ;
  	{
  		HEX5BHEX5DHEX3D_384915_30748785((&(*d0).seenindexterms), refname0, ((NI) 1));
  	}
  	LA1: ;
  	LOC8 = (NimStringDesc*)0;
  	LOC9 = (NI)0;
  	LOC9 = getordefault_384886_30748785((*d0).seenindexterms, refname0);
  	LOC10 = (NimStringDesc*)0;
  	LOC10 = nimIntToStr(LOC9);
  	LOC8 = rawNewString(refname0->Sup.len + LOC10->Sup.len + 1);
  appendString(LOC8, refname0);
  appendChar(LOC8, 95);
  appendString(LOC8, LOC10);
  	id0 = LOC8;
  	term0 = copyString(((NimStringDesc*) &T4199187026_4));
  	renderaux_384606_4199187026(d0, n0, (&term0));
  	setindexterm_384683_4199187026(d0, id0, term0, (*d0).currentsection, ((NimStringDesc*) &T4199187026_4));
  	memset((void*)LOC11, 0, sizeof(LOC11));
  	LOC11[0] = copyString(id0);
  	LOC11[1] = copyString(term0);
  	dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_140), ((NimStringDesc*) &T4199187026_141), LOC11, 2);
  }
  
  N_NIMCALL(void, rendersmiley_390601_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  	TY193732 LOC1;
  	NimStringDesc* LOC2;
  	memset((void*)LOC1, 0, sizeof(LOC1));
  	LOC2 = (NimStringDesc*)0;
  	LOC2 = getordefault_153214_603679043((*d0).config, ((NimStringDesc*) &T4199187026_146));
  	LOC1[0] = nsuFormatSingleElem(LOC2, (*n0).text);
  	dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_144), ((NimStringDesc*) &T4199187026_145), LOC1, 1);
  }
  
  N_NIMCALL(void, renderrsttoout_384599_4199187026)(Rstgenerator384010* d0, Rstnode368011* n0, NimStringDesc** result0) {
  {	{
  		if (!(n0 == NIM_NIL)) goto LA3;
  		goto BeforeRet;
  	}
  	LA3: ;
  	switch ((*n0).kind) {
  	case ((Rstnodekind368005) 0):
  	{
  		renderaux_384606_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 1):
  	{
  		renderheadline_390043_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 2):
  	{
  		renderoverline_390221_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 3):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_18), ((NimStringDesc*) &T4199187026_19), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 4):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_20), ((NimStringDesc*) &T4199187026_21), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 5):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_22), ((NimStringDesc*) &T4199187026_23), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 6):
  	case ((Rstnodekind368005) 8):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_24), ((NimStringDesc*) &T4199187026_25), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 7):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_26), ((NimStringDesc*) &T4199187026_27), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 9):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_28), ((NimStringDesc*) &T4199187026_29), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 10):
  	{
  		renderaux_384606_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 11):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_30), ((NimStringDesc*) &T4199187026_31), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 12):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_32), ((NimStringDesc*) &T4199187026_33), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 13):
  	{
  		NimStringDesc* tmp0;
  		tmp0 = copyString(((NimStringDesc*) &T4199187026_4));
  		{
  			NI i_391922_4199187026;
  			NI HEX3Atmp_391983_4199187026;
  			NI LOC19;
  			NI res_391986_4199187026;
  			i_391922_4199187026 = (NI)0;
  			HEX3Atmp_391983_4199187026 = (NI)0;
  			LOC19 = (NI)0;
  			LOC19 = len_368089_4150536388(n0);
  			HEX3Atmp_391983_4199187026 = (NI)(LOC19 - ((NI) 1));
  			res_391986_4199187026 = ((NI) 0);
  			{
  				while (1) {
  					if (!(res_391986_4199187026 <= HEX3Atmp_391983_4199187026)) goto LA21;
  					i_391922_4199187026 = res_391986_4199187026;
  					renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_391922_4199187026], (&tmp0));
  					res_391986_4199187026 += ((NI) 1);
  				} LA21: ;
  			}
  		}
  		{
  			TY193732 LOC26;
  			if (!!(((tmp0 ? tmp0->Sup.len : 0) == ((NI) 0)))) goto LA24;
  			memset((void*)LOC26, 0, sizeof(LOC26));
  			LOC26[0] = copyString(tmp0);
  			dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_34), ((NimStringDesc*) &T4199187026_29), LOC26, 1);
  		}
  		LA24: ;
  	}
  	break;
  	case ((Rstnodekind368005) 14):
  	{
  		renderfield_391874_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 15):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_60), ((NimStringDesc*) &T4199187026_61), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 16):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_62), ((NimStringDesc*) &T4199187026_63), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 51):
  	{
  		renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 2)], result0);
  	}
  	break;
  	case ((Rstnodekind368005) 17):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_64), ((NimStringDesc*) &T4199187026_65), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 18):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_58), ((NimStringDesc*) &T4199187026_59), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 19):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_66), ((NimStringDesc*) &T4199187026_67), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 23):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_68), ((NimStringDesc*) &T4199187026_63), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 20):
  	case ((Rstnodekind368005) 21):
  	case ((Rstnodekind368005) 22):
  	{
  		{
  			if (!NIM_TRUE) goto LA38;
  			raiseassert_91216_1689653243(((NimStringDesc*) &T4199187026_69));
  		}
  		LA38: ;
  	}
  	break;
  	case ((Rstnodekind368005) 24):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_70), ((NimStringDesc*) &T4199187026_71), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 25):
  	{
  		{
  			if (!NIM_TRUE) goto LA44;
  			raiseassert_91216_1689653243(((NimStringDesc*) &T4199187026_69));
  		}
  		LA44: ;
  	}
  	break;
  	case ((Rstnodekind368005) 26):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_72), ((NimStringDesc*) &T4199187026_21), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 27):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_73), ((NimStringDesc*) &T4199187026_74), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 28):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_75), ((NimStringDesc*) &T4199187026_76), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 29):
  	case ((Rstnodekind368005) 30):
  	{
  		NimStringDesc* LOC50;
  		NimStringDesc* LOC51;
  		LOC50 = (NimStringDesc*)0;
  		LOC51 = (NimStringDesc*)0;
  		LOC51 = texcolumns_391850_4199187026(n0);
  		LOC50 = rawNewString(LOC51->Sup.len + 63);
  appendString(LOC50, ((NimStringDesc*) &T4199187026_78));
  appendString(LOC50, LOC51);
  appendString(LOC50, ((NimStringDesc*) &T4199187026_80));
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_77), LOC50, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 31):
  	{
  		{
  			NI LOC55;
  			LOC55 = (NI)0;
  			LOC55 = len_368089_4150536388(n0);
  			if (!(((NI) 1) <= LOC55)) goto LA56;
  			{
  				if (!((*d0).target == ((Outputtarget384004) 1))) goto LA60;
  				renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 0)], result0);
  				{
  					NI i_391946_4199187026;
  					NI HEX3Atmp_391991_4199187026;
  					NI LOC63;
  					NI res_391994_4199187026;
  					i_391946_4199187026 = (NI)0;
  					HEX3Atmp_391991_4199187026 = (NI)0;
  					LOC63 = (NI)0;
  					LOC63 = len_368089_4150536388(n0);
  					HEX3Atmp_391991_4199187026 = (NI)(LOC63 - ((NI) 1));
  					res_391994_4199187026 = ((NI) 1);
  					{
  						while (1) {
  							if (!(res_391994_4199187026 <= HEX3Atmp_391991_4199187026)) goto LA65;
  							i_391946_4199187026 = res_391994_4199187026;
  							(*result0) = resizeString((*result0), 3);
  appendString((*result0), ((NimStringDesc*) &T4199187026_81));
  							renderrsttoout_384599_4199187026(d0, (*n0).sons->data[i_391946_4199187026], result0);
  							res_391994_4199187026 += ((NI) 1);
  						} LA65: ;
  					}
  				}
  				(*result0) = resizeString((*result0), 10);
  appendString((*result0), ((NimStringDesc*) &T4199187026_82));
  			}
  			goto LA58;
  			LA60: ;
  			{
  				(*result0) = resizeString((*result0), 4);
  appendString((*result0), ((NimStringDesc*) &T4199187026_83));
  				renderaux_384606_4199187026(d0, n0, result0);
  				(*result0) = resizeString((*result0), 6);
  appendString((*result0), ((NimStringDesc*) &T4199187026_84));
  			}
  			LA58: ;
  		}
  		LA56: ;
  	}
  	break;
  	case ((Rstnodekind368005) 33):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_62), ((NimStringDesc*) &T4199187026_59), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 32):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_85), ((NimStringDesc*) &T4199187026_86), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 34):
  	{
  		{
  			if (!NIM_TRUE) goto LA72;
  			raiseassert_91216_1689653243(((NimStringDesc*) &T4199187026_69));
  		}
  		LA72: ;
  	}
  	break;
  	case ((Rstnodekind368005) 35):
  	{
  		{
  			if (!NIM_TRUE) goto LA77;
  			raiseassert_91216_1689653243(((NimStringDesc*) &T4199187026_69));
  		}
  		LA77: ;
  	}
  	break;
  	case ((Rstnodekind368005) 36):
  	{
  		{
  			if (!NIM_TRUE) goto LA82;
  			raiseassert_91216_1689653243(((NimStringDesc*) &T4199187026_69));
  		}
  		LA82: ;
  	}
  	break;
  	case ((Rstnodekind368005) 39):
  	{
  		NimStringDesc* tmp0;
  		TY194153 LOC85;
  		tmp0 = copyString(((NimStringDesc*) &T4199187026_4));
  		renderaux_384606_4199187026(d0, n0, (&tmp0));
  		memset((void*)LOC85, 0, sizeof(LOC85));
  		LOC85[0] = copyString(tmp0);
  		LOC85[1] = rstnodetorefname_369062_3635346014(n0);
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_87), ((NimStringDesc*) &T4199187026_88), LOC85, 2);
  	}
  	break;
  	case ((Rstnodekind368005) 37):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_89), ((NimStringDesc*) &T4199187026_90), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 38):
  	{
  		NimStringDesc* tmp00;
  		NimStringDesc* tmp10;
  		TY194153 LOC88;
  		tmp00 = copyString(((NimStringDesc*) &T4199187026_4));
  		tmp10 = copyString(((NimStringDesc*) &T4199187026_4));
  		renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 0)], (&tmp00));
  		renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 1)], (&tmp10));
  		memset((void*)LOC88, 0, sizeof(LOC88));
  		LOC88[0] = copyString(tmp00);
  		LOC88[1] = copyString(tmp10);
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_91), ((NimStringDesc*) &T4199187026_92), LOC88, 2);
  	}
  	break;
  	case ((Rstnodekind368005) 41):
  	case ((Rstnodekind368005) 42):
  	{
  		renderaux_384606_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 48):
  	{
  		{
  			Rstnode368011* LOC95;
  			NimStringDesc* LOC96;
  			if (!!(((*d0).target == ((Outputtarget384004) 1)))) goto LA93;
  			LOC95 = (Rstnode368011*)0;
  			LOC95 = lastson_368134_4150536388(n0);
  			LOC96 = (NimStringDesc*)0;
  			LOC96 = addnodes_369065_3635346014(LOC95);
  			(*result0) = resizeString((*result0), LOC96->Sup.len + 0);
  appendString((*result0), LOC96);
  		}
  		LA93: ;
  	}
  	break;
  	case ((Rstnodekind368005) 49):
  	{
  		{
  			Rstnode368011* LOC102;
  			NimStringDesc* LOC103;
  			if (!((*d0).target == ((Outputtarget384004) 1))) goto LA100;
  			LOC102 = (Rstnode368011*)0;
  			LOC102 = lastson_368134_4150536388(n0);
  			LOC103 = (NimStringDesc*)0;
  			LOC103 = addnodes_369065_3635346014(LOC102);
  			(*result0) = resizeString((*result0), LOC103->Sup.len + 0);
  appendString((*result0), LOC103);
  		}
  		LA100: ;
  	}
  	break;
  	case ((Rstnodekind368005) 45):
  	case ((Rstnodekind368005) 46):
  	{
  		renderimage_390335_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 47):
  	{
  		rendercodeblock_391421_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 50):
  	{
  		rendercontainer_391837_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 62):
  	case ((Rstnodekind368005) 52):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_129), ((NimStringDesc*) &T4199187026_129), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 40):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_4), ((NimStringDesc*) &T4199187026_4), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 53):
  	{
  		NimStringDesc* tmp00;
  		NimStringDesc* tmp10;
  		TY194153 LOC110;
  		tmp00 = copyString(((NimStringDesc*) &T4199187026_4));
  		tmp10 = copyString(((NimStringDesc*) &T4199187026_4));
  		renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 0)], (&tmp00));
  		renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 1)], (&tmp10));
  		memset((void*)LOC110, 0, sizeof(LOC110));
  		LOC110[0] = copyString(tmp00);
  		LOC110[1] = copyString(tmp10);
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_123), ((NimStringDesc*) &T4199187026_124), LOC110, 2);
  	}
  	break;
  	case ((Rstnodekind368005) 54):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_130), ((NimStringDesc*) &T4199187026_131), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 55):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_132), ((NimStringDesc*) &T4199187026_133), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 57):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_134), ((NimStringDesc*) &T4199187026_135), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 58):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_136), ((NimStringDesc*) &T4199187026_86), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 59):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_137), ((NimStringDesc*) &T4199187026_138), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 60):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_139), ((NimStringDesc*) &T4199187026_135), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 56):
  	{
  		renderindexterm_384846_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 61):
  	{
  		renderaux_384632_4199187026(d0, n0, ((NimStringDesc*) &T4199187026_142), ((NimStringDesc*) &T4199187026_143), result0);
  	}
  	break;
  	case ((Rstnodekind368005) 63):
  	{
  		rendersmiley_390601_4199187026(d0, n0, result0);
  	}
  	break;
  	case ((Rstnodekind368005) 64):
  	{
  		NimStringDesc* LOC121;
  		LOC121 = (NimStringDesc*)0;
  		LOC121 = esc_384484_4199187026((*d0).target, (*n0).text, ((NI) -1));
  		(*result0) = resizeString((*result0), LOC121->Sup.len + 0);
  appendString((*result0), LOC121);
  	}
  	break;
  	case ((Rstnodekind368005) 44):
  	{
  		(*d0).hastoc = NIM_TRUE;
  	}
  	break;
  	case ((Rstnodekind368005) 43):
  	{
  		unsureAsgnRef((void**) (&(*d0).meta[(((Metaenum384008) 1))- 0]), copyString(((NimStringDesc*) &T4199187026_4)));
  		renderrsttoout_384599_4199187026(d0, (*n0).sons->data[((NI) 0)], (&(*d0).meta[(((Metaenum384008) 1))- 0]));
  	}
  	break;
  	}
  	}BeforeRet: ;
  }
  N_NIMCALL(void, T4199187026_152)(void* p, NI op) {
  	TY384029* a;
  	NI LOC1;
  	a = (TY384029*)p;
  	LOC1 = (NI)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_384083_4199187026)(Rstgenerator384010* g0, Outputtarget384004 target0, Stringtableobj152608* config0, NimStringDesc* filename0, Rstparseoption369003Set options0, Findfilehandler369013 findfile0, Msghandler369011 msghandler0) {
  	TY128506 fileparts0;
  	NimStringDesc* s0;
  	unsureAsgnRef((void**) (&(*g0).config), config0);
  	(*g0).target = target0;
  	unsureAsgnRef((void**) (&(*g0).tocpart), (TY384029*) newSeq((&NTI384029), 0));
  	unsureAsgnRef((void**) (&(*g0).filename), copyString(filename0));
  	(*g0).splitafter = ((NI) 20);
  	unsureAsgnRef((void**) (&(*g0).theindex), copyString(((NimStringDesc*) &T4199187026_4)));
  	(*g0).options = options0;
  	(*g0).findfile = findfile0;
  	unsureAsgnRef((void**) (&(*g0).currentsection), copyString(((NimStringDesc*) &T4199187026_4)));
  	memset((void*)(&fileparts0), 0, sizeof(fileparts0));
  	chckNil((void*)(&fileparts0));
  	memset((void*)(&fileparts0), 0, sizeof(fileparts0));
  	nossplitFile(filename0, (&fileparts0));
  	{
  		NimStringDesc* LOC5;
  		if (!eqStrings(fileparts0.Field2, ((NimStringDesc*) &T4199187026_153))) goto LA3;
  		LOC5 = (NimStringDesc*)0;
  		LOC5 = rawNewString(fileparts0.Field1->Sup.len + 7);
  appendString(LOC5, ((NimStringDesc*) &T4199187026_154));
  appendString(LOC5, fileparts0.Field1);
  		unsureAsgnRef((void**) (&(*g0).currentsection), LOC5);
  	}
  	LA3: ;
  	inittable_384111_30748785(((NI) 64), (&(*g0).seenindexterms));
  	(*g0).msghandler = msghandler0;
  	s0 = getordefault_153214_603679043(config0, ((NimStringDesc*) &T4199187026_155));
  	{
  		if (!!(((s0) && (s0)->Sup.len == 0))) goto LA8;
  		(*g0).splitafter = nsuParseInt(s0);
  	}
  	LA8: ;
  	{
  		Metaenum384008 i_384414_4199187026;
  		NI res_384418_4199187026;
  		i_384414_4199187026 = (Metaenum384008)0;
  		res_384418_4199187026 = ((NI) 0);
  		{
  			while (1) {
  				if (!(res_384418_4199187026 <= ((NI) 4))) goto LA12;
  				i_384414_4199187026 = ((Metaenum384008) (res_384418_4199187026));
  				unsureAsgnRef((void**) (&(*g0).meta[(i_384414_4199187026)- 0]), copyString(((NimStringDesc*) &T4199187026_4)));
  				res_384418_4199187026 += ((NI) 1);
  			} LA12: ;
  		}
  	}
  }
  
  N_NIMCALL(void, rendertocentry_390302_4199187026)(Rstgenerator384010* d0, Tocentry384006* e0, NimStringDesc** result0) {
  	TY194153 LOC1;
  	memset((void*)LOC1, 0, sizeof(LOC1));
  	LOC1[0] = copyString((*e0).refname);
  	LOC1[1] = copyString((*e0).header);
  	dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_156), ((NimStringDesc*) &T4199187026_157), LOC1, 2);
  }
  
  N_NIMCALL(void, rendertocentries_390310_4199187026)(Rstgenerator384010* d0, NI* j0, NI lvl0, NimStringDesc** result0) {
  	NimStringDesc* tmp0;
  	tmp0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		while (1) {
  			NI a0;
  			if (!((*j0) <= ((*d0).tocpart ? ((*d0).tocpart->Sup.len-1) : -1))) goto LA2;
  			a0 = ((*(*d0).tocpart->data[(*j0)].n).level > 0? ((*(*d0).tocpart->data[(*j0)].n).level) : -((*(*d0).tocpart->data[(*j0)].n).level));
  			{
  				if (!(a0 == lvl0)) goto LA5;
  				rendertocentry_390302_4199187026(d0, (&(*d0).tocpart->data[(*j0)]), (&tmp0));
  				(*j0) += ((NI) 1);
  			}
  			goto LA3;
  			LA5: ;
  			{
  				if (!(lvl0 < a0)) goto LA8;
  				rendertocentries_390310_4199187026(d0, j0, a0, (&tmp0));
  			}
  			goto LA3;
  			LA8: ;
  			{
  				goto LA1;
  			}
  			LA3: ;
  		} LA2: ;
  	} LA1: ;
  	{
  		TY193732 LOC15;
  		if (!(((NI) 1) < lvl0)) goto LA13;
  		memset((void*)LOC15, 0, sizeof(LOC15));
  		LOC15[0] = copyString(tmp0);
  		dispa_384576_4199187026((*d0).target, result0, ((NimStringDesc*) &T4199187026_158), ((NimStringDesc*) &T4199187026_159), LOC15, 1);
  	}
  	goto LA11;
  	LA13: ;
  	{
  		(*result0) = resizeString((*result0), tmp0->Sup.len + 0);
  appendString((*result0), tmp0);
  	}
  	LA11: ;
  }
  
  N_NIMCALL(void, writeindexfile_384421_4199187026)(Rstgenerator384010* g0, NimStringDesc* outfile0) {
  	{
  		if (!(((NI) 0) < ((*g0).theindex ? (*g0).theindex->Sup.len : 0))) goto LA3;
  		writefile_14871_1689653243(outfile0, (*g0).theindex);
  	}
  	LA3: ;
  }
  N_NIMCALL(void, T4199187026_161)(void* p, NI op) {
  	TY387853* a;
  	NI LOC1;
  	a = (TY387853*)p;
  	LOC1 = (NI)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);
  	}
  }
  
  static N_INLINE(void, pushSafePoint)(TSafePoint* s0) {
  	(*s0).hasRaiseAction = NIM_FALSE;
  	(*s0).prev = exchandler_18837_1689653243;
  	exchandler_18837_1689653243 = s0;
  }
  
  static N_INLINE(NIM_BOOL, direxists_131608_2125978480)(NimStringDesc* dir0) {
  	NIM_BOOL result0;
  	result0 = (NIM_BOOL)0;
  	result0 = nosexistsDir(dir0);
  	return result0;
  }
  
  N_NIMCALL(NIM_BOOL, isdocumentationtitle_385525_4199187026)(NimStringDesc* hyperlink0) {
  	NIM_BOOL result0;
  	NI LOC1;
  	result0 = (NIM_BOOL)0;
  	LOC1 = (NI)0;
  	LOC1 = nsuFindChar(hyperlink0, 35, ((NI) 0));
  	result0 = (LOC1 < ((NI) 0));
  	return result0;
  }
  
  N_NIMCALL(NimStringDesc*, unquoteindexcolumn_384679_4199187026)(NimStringDesc* text0) {
  	NimStringDesc* result0;
  	NimStringDesc* LOC1;
  	NimStringDesc* LOC2;
  	result0 = (NimStringDesc*)0;
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = nsuReplaceStr(text0, ((NimStringDesc*) &T4199187026_15), ((NimStringDesc*) &T4199187026_14));
  	LOC2 = (NimStringDesc*)0;
  	LOC2 = nsuReplaceStr(LOC1, ((NimStringDesc*) &T4199187026_13), ((NimStringDesc*) &T4199187026_12));
  	result0 = nsuReplaceStr(LOC2, ((NimStringDesc*) &T4199187026_11), ((NimStringDesc*) &T4199187026_10));
  	return result0;
  }
  
  static N_INLINE(void, popSafePoint)(void) {
  	exchandler_18837_1689653243 = (*exchandler_18837_1689653243).prev;
  }
  
  static N_INLINE(NI, HEX21HEX26_149005_213663784)(NI h0, NI val0) {
  	NI result0;
  	result0 = (NI)0;
  	result0 = (NI)((NU64)(h0) + (NU64)(val0));
  	result0 = (NI)((NU64)(result0) + (NU64)((NI)((NU64)(result0) << (NU64)(((NI) 10)))));
  	result0 = (NI)(result0 ^ (NI)((NU64)(result0) >> (NU64)(((NI) 6))));
  	return result0;
  }
  
  static N_INLINE(NimStringDesc*, or_384594_4199187026)(NimStringDesc* x0, NimStringDesc* y0) {
  	NimStringDesc* result0;
  	result0 = (NimStringDesc*)0;
  	{
  		if (!x0 == 0) goto LA3;
  		result0 = copyString(y0);
  	}
  	goto LA1;
  	LA3: ;
  	{
  		result0 = copyString(x0);
  	}
  	LA1: ;
  	return result0;
  }
  
  static N_INLINE(NI, HEX21HEX24_149028_213663784)(NI h0) {
  	NI result0;
  	result0 = (NI)0;
  	result0 = (NI)((NU64)(h0) + (NU64)((NI)((NU64)(h0) << (NU64)(((NI) 3)))));
  	result0 = (NI)(result0 ^ (NI)((NU64)(result0) >> (NU64)(((NI) 11))));
  	result0 = (NI)((NU64)(result0) + (NU64)((NI)((NU64)(result0) << (NU64)(((NI) 15)))));
  	return result0;
  }
  
  N_NIMCALL(NI, hash_385158_4199187026)(Indexentry385117* x0) {
  	NI result0;
  	NI LOC1;
  	NI LOC2;
  	NimStringDesc* LOC3;
  	NI LOC4;
  	NimStringDesc* LOC5;
  	NI LOC6;
  	result0 = (NI)0;
  	LOC1 = (NI)0;
  	LOC1 = hash_149827_213663784((*x0).keyword);
  	LOC2 = (NI)0;
  	LOC2 = hash_149827_213663784((*x0).link);
  	result0 = HEX21HEX26_149005_213663784(LOC1, LOC2);
  	LOC3 = (NimStringDesc*)0;
  	LOC3 = or_384594_4199187026((*x0).linktitle, ((NimStringDesc*) &T4199187026_4));
  	LOC4 = (NI)0;
  	LOC4 = hash_149827_213663784(LOC3);
  	result0 = HEX21HEX26_149005_213663784(result0, LOC4);
  	LOC5 = (NimStringDesc*)0;
  	LOC5 = or_384594_4199187026((*x0).linkdesc, ((NimStringDesc*) &T4199187026_4));
  	LOC6 = (NI)0;
  	LOC6 = hash_149827_213663784(LOC5);
  	result0 = HEX21HEX26_149005_213663784(result0, LOC6);
  	result0 = HEX21HEX24_149028_213663784(result0);
  	return result0;
  }
  
  N_NIMCALL(void, readindexdir_387847_4199187026)(NimStringDesc* dir0, TY387850* Result) {
  	NI L0;
  	TY388464 LOC177;
  	unsureAsgnRef((void**) (&(*Result).Field0), (TY135002*) newSeq((&NTI135002), 0));
  	inittable_387875_30748785(((NI) 32), (&(*Result).Field2));
  	unsureAsgnRef((void**) (&(*Result).Field1), (TY387853*) newSeq((&NTI387853), ((NI) 15000)));
  	(*Result).Field1 = (TY387853*) setLengthSeq(&((*Result).Field1)->Sup, sizeof(Indexentry385117), ((NI) 0));
  	L0 = ((NI) 0);
  	{
  		Pathcomponent137212 kind_388033_4199187026;
  		NimStringDesc* path_388034_4199187026;
  		DIR* d_389870_4199187026;
  		kind_388033_4199187026 = (Pathcomponent137212)0;
  		path_388034_4199187026 = (NimStringDesc*)0;
  		d_389870_4199187026 = opendir(dir0->data);
  		{
  			TSafePoint T4199187026_162;
  			if (!!((d_389870_4199187026 == NIM_NIL))) goto LA4;
  			pushSafePoint(&T4199187026_162);
  			T4199187026_162.status = _setjmp(T4199187026_162.context);
  			if (T4199187026_162.status == 0) {
  				{
  					while (1) {
  						{
  							struct dirent* x_389872_4199187026;
  							NimStringDesc* volatile y_389874_4199187026;
  							x_389872_4199187026 = readdir(d_389870_4199187026);
  							{
  								if (!(x_389872_4199187026 == NIM_NIL)) goto LA12;
  								goto LA7;
  							}
  							LA12: ;
  							y_389874_4199187026 = cstrToNimstr(((NCSTRING) ((*x_389872_4199187026).d_name)));
  							{
  								NIM_BOOL LOC16;
  								struct stat s_389876_4199187026;
  								Pathcomponent137212 volatile k_389878_4199187026;
  								LOC16 = (NIM_BOOL)0;
  								LOC16 = !(eqStrings(y_389874_4199187026, ((NimStringDesc*) &T4199187026_163)));
  								if (!(LOC16)) goto LA17;
  								LOC16 = !(eqStrings(y_389874_4199187026, ((NimStringDesc*) &T4199187026_164)));
  								LA17: ;
  								if (!LOC16) goto LA18;
  								memset((void*)(&s_389876_4199187026), 0, sizeof(s_389876_4199187026));
  								{
  									if (!NIM_TRUE) goto LA22;
  									y_389874_4199187026 = HEX2F_128265_2125978480(dir0, y_389874_4199187026);
  								}
  								LA22: ;
  								k_389878_4199187026 = ((Pathcomponent137212) 0);
  								{
  									if (!!(((*x_389872_4199187026).d_type == ((NI8) 0)))) goto LA26;
  									{
  										if (!((*x_389872_4199187026).d_type == ((NI8) 4))) goto LA30;
  										k_389878_4199187026 = ((Pathcomponent137212) 2);
  									}
  									LA30: ;
  									{
  										if (!((*x_389872_4199187026).d_type == ((NI8) 10))) goto LA34;
  										{
  											NIM_BOOL LOC38;
  											LOC38 = (NIM_BOOL)0;
  											LOC38 = direxists_131608_2125978480(y_389874_4199187026);
  											if (!LOC38) goto LA39;
  											k_389878_4199187026 = ((Pathcomponent137212) 3);
  										}
  										goto LA36;
  										LA39: ;
  										{
  											k_389878_4199187026 = ((Pathcomponent137212) 1);
  										}
  										LA36: ;
  									}
  									LA34: ;
  									kind_388033_4199187026 = k_389878_4199187026;
  									path_388034_4199187026 = y_389874_4199187026;
  									{
  										NIM_BOOL LOC44;
  										TY387853* volatile fileentries_389880_4199187026;
  										Indexentry385117 title_389882_4199187026;
  										NI F_389884_4199187026;
  										LOC44 = (NIM_BOOL)0;
  										LOC44 = (kind_388033_4199187026 == ((Pathcomponent137212) 0));
  										if (!(LOC44)) goto LA45;
  										LOC44 = nsuEndsWith(path_388034_4199187026, ((NimStringDesc*) &T4199187026_165));
  										LA45: ;
  										if (!LOC44) goto LA46;
  										fileentries_389880_4199187026 = (TY387853*)0;
  										memset((void*)(&title_389882_4199187026), 0, sizeof(title_389882_4199187026));
  										F_389884_4199187026 = ((NI) 0);
  										fileentries_389880_4199187026 = (TY387853*) newSeq((&NTI387853), ((NI) 500));
  										fileentries_389880_4199187026 = (TY387853*) setLengthSeq(&(fileentries_389880_4199187026)->Sup, sizeof(Indexentry385117), ((NI) 0));
  										{
  											NimStringDesc* line_389886_4199187026;
  											FILE* f_389888_4199187026;
  											TSafePoint T4199187026_166;
  											line_389886_4199187026 = (NimStringDesc*)0;
  											f_389888_4199187026 = open_14817_1689653243(path_388034_4199187026, ((Filemode13009) 0), ((NI) 8000));
  											pushSafePoint(&T4199187026_166);
  											T4199187026_166.status = _setjmp(T4199187026_166.context);
  											if (T4199187026_166.status == 0) {
  												NimStringDesc* res_389890_4199187026;
  												res_389890_4199187026 = rawNewString(((NI) 80));
  												{
  													while (1) {
  														NIM_BOOL LOC52;
  														LOC52 = (NIM_BOOL)0;
  														LOC52 = readline_14915_1689653243(f_389888_4199187026, (&res_389890_4199187026));
  														if (!LOC52) goto LA51;
  														line_389886_4199187026 = res_389890_4199187026;
  														{
  															NI s_389893_4199187026;
  															s_389893_4199187026 = nsuFindChar(line_389886_4199187026, 9, ((NI) 0));
  															{
  																if (!(s_389893_4199187026 < ((NI) 0))) goto LA56;
  																goto LA53;
  															}
  															LA56: ;
  															fileentries_389880_4199187026 = (TY387853*) setLengthSeq(&(fileentries_389880_4199187026)->Sup, sizeof(Indexentry385117), ((NI) ((NI)(F_389884_4199187026 + ((NI) 1)))));
  															asgnRefNoCycle((void**) (&fileentries_389880_4199187026->data[F_389884_4199187026].keyword), copyStrLast(line_389886_4199187026, ((NI) 0), (NI)(s_389893_4199187026 - ((NI) 1))));
  															asgnRefNoCycle((void**) (&fileentries_389880_4199187026->data[F_389884_4199187026].link), copyStr(line_389886_4199187026, (NI)(s_389893_4199187026 + ((NI) 1))));
  															{
  																NIM_BOOL LOC60;
  																LOC60 = (NIM_BOOL)0;
  																LOC60 = title_389882_4199187026.keyword == 0;
  																if (!(LOC60)) goto LA61;
  																LOC60 = isdocumentationtitle_385525_4199187026(fileentries_389880_4199187026->data[F_389884_4199187026].link);
  																LA61: ;
  																if (!LOC60) goto LA62;
  																title_389882_4199187026.keyword = copyString(fileentries_389880_4199187026->data[F_389884_4199187026].keyword);
  																title_389882_4199187026.link = copyString(fileentries_389880_4199187026->data[F_389884_4199187026].link);
  															}
  															LA62: ;
  															{
  																NI LOC66;
  																TY135002* extracols_389895_4199187026;
  																NimStringDesc* LOC69;
  																LOC66 = (NI)0;
  																LOC66 = nsuFindChar(fileentries_389880_4199187026->data[F_389884_4199187026].link, 9, ((NI) 0));
  																if (!(((NI) 0) < LOC66)) goto LA67;
  																extracols_389895_4199187026 = nsuSplitChar(fileentries_389880_4199187026->data[F_389884_4199187026].link, 9, ((NI) -1));
  																LOC69 = (NimStringDesc*)0;
  																LOC69 = fileentries_389880_4199187026->data[F_389884_4199187026].link; fileentries_389880_4199187026->data[F_389884_4199187026].link = copyStringRC1(extracols_389895_4199187026->data[((NI) 0)]);
  																if (LOC69) nimGCunrefNoCycle(LOC69);
  																asgnRefNoCycle((void**) (&fileentries_389880_4199187026->data[F_389884_4199187026].linktitle), unquoteindexcolumn_384679_4199187026(extracols_389895_4199187026->data[((NI) 1)]));
  																asgnRefNoCycle((void**) (&fileentries_389880_4199187026->data[F_389884_4199187026].linkdesc), unquoteindexcolumn_384679_4199187026(extracols_389895_4199187026->data[((NI) 2)]));
  															}
  															goto LA64;
  															LA67: ;
  															{
  																NimStringDesc* LOC71;
  																NimStringDesc* LOC72;
  																LOC71 = (NimStringDesc*)0;
  																LOC71 = fileentries_389880_4199187026->data[F_389884_4199187026].linktitle; fileentries_389880_4199187026->data[F_389884_4199187026].linktitle = copyStringRC1(NIM_NIL);
  																if (LOC71) nimGCunrefNoCycle(LOC71);
  																LOC72 = (NimStringDesc*)0;
  																LOC72 = fileentries_389880_4199187026->data[F_389884_4199187026].linkdesc; fileentries_389880_4199187026->data[F_389884_4199187026].linkdesc = copyStringRC1(NIM_NIL);
  																if (LOC72) nimGCunrefNoCycle(LOC72);
  															}
  															LA64: ;
  															F_389884_4199187026 += ((NI) 1);
  														} LA53: ;
  													} LA51: ;
  												}
  												popSafePoint();
  											}
  											else {
  												popSafePoint();
  											}
  											{
  												close_14853_1689653243(f_389888_4199187026);
  											}
  											if (T4199187026_166.status != 0) reraiseException();
  										}
  										{
  											TY128506 LOC95;
  											NimStringDesc* LOC96;
  											if (!title_389882_4199187026.keyword == 0) goto LA77;
  											{
  												NI i_389897_4199187026;
  												NI HEX3Atmp_389899_4199187026;
  												NI res_389901_4199187026;
  												i_389897_4199187026 = (NI)0;
  												HEX3Atmp_389899_4199187026 = (NI)0;
  												HEX3Atmp_389899_4199187026 = (F_389884_4199187026 - 1);
  												res_389901_4199187026 = ((NI) 0);
  												{
  													while (1) {
  														if (!(res_389901_4199187026 <= HEX3Atmp_389899_4199187026)) goto LA81;
  														i_389897_4199187026 = res_389901_4199187026;
  														{
  															NimStringDesc* toc_389903_4199187026;
  															NimStringDesc* LOC91;
  															NimStringDesc* LOC92;
  															NimStringDesc* LOC93;
  															NimStringDesc* LOC94;
  															toc_389903_4199187026 = fileentries_389880_4199187026->data[i_389897_4199187026].linktitle;
  															{
  																NIM_BOOL LOC85;
  																NIM_BOOL LOC86;
  																LOC85 = (NIM_BOOL)0;
  																LOC86 = (NIM_BOOL)0;
  																LOC86 = !(toc_389903_4199187026 == 0);
  																if (!(LOC86)) goto LA87;
  																LOC86 = (((NI) 0) < (toc_389903_4199187026 ? toc_389903_4199187026->Sup.len : 0));
  																LA87: ;
  																LOC85 = LOC86;
  																if (!(LOC85)) goto LA88;
  																LOC85 = ((NU8)(toc_389903_4199187026->data[((NI) 0)]) == (NU8)(32));
  																LA88: ;
  																if (!LOC85) goto LA89;
  																goto LA82;
  															}
  															LA89: ;
  															(*Result).Field1 = (TY387853*) setLengthSeq(&((*Result).Field1)->Sup, sizeof(Indexentry385117), ((NI) ((NI)(L0 + ((NI) 1)))));
  															LOC91 = (NimStringDesc*)0;
  															LOC91 = (*Result).Field1->data[L0].keyword; (*Result).Field1->data[L0].keyword = copyStringRC1(fileentries_389880_4199187026->data[i_389897_4199187026].keyword);
  															if (LOC91) nimGCunrefNoCycle(LOC91);
  															LOC92 = (NimStringDesc*)0;
  															LOC92 = (*Result).Field1->data[L0].link; (*Result).Field1->data[L0].link = copyStringRC1(fileentries_389880_4199187026->data[i_389897_4199187026].link);
  															if (LOC92) nimGCunrefNoCycle(LOC92);
  															LOC93 = (NimStringDesc*)0;
  															LOC93 = (*Result).Field1->data[L0].linktitle; (*Result).Field1->data[L0].linktitle = copyStringRC1(fileentries_389880_4199187026->data[i_389897_4199187026].linktitle);
  															if (LOC93) nimGCunrefNoCycle(LOC93);
  															LOC94 = (NimStringDesc*)0;
  															LOC94 = (*Result).Field1->data[L0].linkdesc; (*Result).Field1->data[L0].linkdesc = copyStringRC1(fileentries_389880_4199187026->data[i_389897_4199187026].linkdesc);
  															if (LOC94) nimGCunrefNoCycle(LOC94);
  															L0 += ((NI) 1);
  														} LA82: ;
  														res_389901_4199187026 += ((NI) 1);
  													} LA81: ;
  												}
  											}
  											memset((void*)(&LOC95), 0, sizeof(LOC95));
  											nossplitFile(path_388034_4199187026, (&LOC95));
  											(*Result).Field0 = (TY135002*) incrSeqV2(&((*Result).Field0)->Sup, sizeof(NimStringDesc*));
  											LOC96 = (NimStringDesc*)0;
  											LOC96 = (*Result).Field0->data[(*Result).Field0->Sup.len]; (*Result).Field0->data[(*Result).Field0->Sup.len] = copyStringRC1(LOC95.Field1);
  											if (LOC96) nimGCunrefNoCycle(LOC96);
  											++(*Result).Field0->Sup.len;
  										}
  										goto LA75;
  										LA77: ;
  										{
  											NimStringDesc* LOC98;
  											NI LOC99;
  											NimStringDesc* LOC100;
  											LOC98 = (NimStringDesc*)0;
  											LOC99 = (NI)0;
  											LOC99 = len_388259_30748785((*Result).Field2);
  											LOC100 = (NimStringDesc*)0;
  											LOC100 = nimIntToStr(LOC99);
  											LOC98 = rawNewString(LOC100->Sup.len + 8);
  appendString(LOC98, ((NimStringDesc*) &T4199187026_167));
  appendString(LOC98, LOC100);
  											title_389882_4199187026.linktitle = LOC98;
  											HEX5BHEX5DHEX3D_388268_30748785((&(*Result).Field2), (&title_389882_4199187026), fileentries_389880_4199187026);
  										}
  										LA75: ;
  									}
  									LA46: ;
  									goto LA9;
  								}
  								LA26: ;
  								{
  									int LOC103;
  									LOC103 = (int)0;
  									LOC103 = lstat(y_389874_4199187026->data, (&s_389876_4199187026));
  									if (!(LOC103 < ((NI32) 0))) goto LA104;
  									goto LA7;
  								}
  								LA104: ;
  								{
  									NIM_BOOL LOC108;
  									LOC108 = (NIM_BOOL)0;
  									LOC108 = S_ISDIR(s_389876_4199187026.st_mode);
  									if (!LOC108) goto LA109;
  									k_389878_4199187026 = ((Pathcomponent137212) 2);
  								}
  								goto LA106;
  								LA109: ;
  								{
  									NIM_BOOL LOC112;
  									LOC112 = (NIM_BOOL)0;
  									LOC112 = S_ISLNK(s_389876_4199187026.st_mode);
  									if (!LOC112) goto LA113;
  									k_389878_4199187026 = getsymlinkfilekind_137219_2125978480(y_389874_4199187026);
  								}
  								goto LA106;
  								LA113: ;
  								LA106: ;
  								kind_388033_4199187026 = k_389878_4199187026;
  								path_388034_4199187026 = y_389874_4199187026;
  								{
  									NIM_BOOL LOC117;
  									TY387853* volatile fileentries_389905_4199187026;
  									Indexentry385117 title_389907_4199187026;
  									NI F_389909_4199187026;
  									LOC117 = (NIM_BOOL)0;
  									LOC117 = (kind_388033_4199187026 == ((Pathcomponent137212) 0));
  									if (!(LOC117)) goto LA118;
  									LOC117 = nsuEndsWith(path_388034_4199187026, ((NimStringDesc*) &T4199187026_165));
  									LA118: ;
  									if (!LOC117) goto LA119;
  									fileentries_389905_4199187026 = (TY387853*)0;
  									memset((void*)(&title_389907_4199187026), 0, sizeof(title_389907_4199187026));
  									F_389909_4199187026 = ((NI) 0);
  									fileentries_389905_4199187026 = (TY387853*) newSeq((&NTI387853), ((NI) 500));
  									fileentries_389905_4199187026 = (TY387853*) setLengthSeq(&(fileentries_389905_4199187026)->Sup, sizeof(Indexentry385117), ((NI) 0));
  									{
  										NimStringDesc* line_389911_4199187026;
  										FILE* f_389913_4199187026;
  										TSafePoint T4199187026_168;
  										line_389911_4199187026 = (NimStringDesc*)0;
  										f_389913_4199187026 = open_14817_1689653243(path_388034_4199187026, ((Filemode13009) 0), ((NI) 8000));
  										pushSafePoint(&T4199187026_168);
  										T4199187026_168.status = _setjmp(T4199187026_168.context);
  										if (T4199187026_168.status == 0) {
  											NimStringDesc* res_389915_4199187026;
  											res_389915_4199187026 = rawNewString(((NI) 80));
  											{
  												while (1) {
  													NIM_BOOL LOC125;
  													LOC125 = (NIM_BOOL)0;
  													LOC125 = readline_14915_1689653243(f_389913_4199187026, (&res_389915_4199187026));
  													if (!LOC125) goto LA124;
  													line_389911_4199187026 = res_389915_4199187026;
  													{
  														NI s_389918_4199187026;
  														s_389918_4199187026 = nsuFindChar(line_389911_4199187026, 9, ((NI) 0));
  														{
  															if (!(s_389918_4199187026 < ((NI) 0))) goto LA129;
  															goto LA126;
  														}
  														LA129: ;
  														fileentries_389905_4199187026 = (TY387853*) setLengthSeq(&(fileentries_389905_4199187026)->Sup, sizeof(Indexentry385117), ((NI) ((NI)(F_389909_4199187026 + ((NI) 1)))));
  														asgnRefNoCycle((void**) (&fileentries_389905_4199187026->data[F_389909_4199187026].keyword), copyStrLast(line_389911_4199187026, ((NI) 0), (NI)(s_389918_4199187026 - ((NI) 1))));
  														asgnRefNoCycle((void**) (&fileentries_389905_4199187026->data[F_389909_4199187026].link), copyStr(line_389911_4199187026, (NI)(s_389918_4199187026 + ((NI) 1))));
  														{
  															NIM_BOOL LOC133;
  															LOC133 = (NIM_BOOL)0;
  															LOC133 = title_389907_4199187026.keyword == 0;
  															if (!(LOC133)) goto LA134;
  															LOC133 = isdocumentationtitle_385525_4199187026(fileentries_389905_4199187026->data[F_389909_4199187026].link);
  															LA134: ;
  															if (!LOC133) goto LA135;
  															title_389907_4199187026.keyword = copyString(fileentries_389905_4199187026->data[F_389909_4199187026].keyword);
  															title_389907_4199187026.link = copyString(fileentries_389905_4199187026->data[F_389909_4199187026].link);
  														}
  														LA135: ;
  														{
  															NI LOC139;
  															TY135002* extracols_389920_4199187026;
  															NimStringDesc* LOC142;
  															LOC139 = (NI)0;
  															LOC139 = nsuFindChar(fileentries_389905_4199187026->data[F_389909_4199187026].link, 9, ((NI) 0));
  															if (!(((NI) 0) < LOC139)) goto LA140;
  															extracols_389920_4199187026 = nsuSplitChar(fileentries_389905_4199187026->data[F_389909_4199187026].link, 9, ((NI) -1));
  															LOC142 = (NimStringDesc*)0;
  															LOC142 = fileentries_389905_4199187026->data[F_389909_4199187026].link; fileentries_389905_4199187026->data[F_389909_4199187026].link = copyStringRC1(extracols_389920_4199187026->data[((NI) 0)]);
  															if (LOC142) nimGCunrefNoCycle(LOC142);
  															asgnRefNoCycle((void**) (&fileentries_389905_4199187026->data[F_389909_4199187026].linktitle), unquoteindexcolumn_384679_4199187026(extracols_389920_4199187026->data[((NI) 1)]));
  															asgnRefNoCycle((void**) (&fileentries_389905_4199187026->data[F_389909_4199187026].linkdesc), unquoteindexcolumn_384679_4199187026(extracols_389920_4199187026->data[((NI) 2)]));
  														}
  														goto LA137;
  														LA140: ;
  														{
  															NimStringDesc* LOC144;
  															NimStringDesc* LOC145;
  															LOC144 = (NimStringDesc*)0;
  															LOC144 = fileentries_389905_4199187026->data[F_389909_4199187026].linktitle; fileentries_389905_4199187026->data[F_389909_4199187026].linktitle = copyStringRC1(NIM_NIL);
  															if (LOC144) nimGCunrefNoCycle(LOC144);
  															LOC145 = (NimStringDesc*)0;
  															LOC145 = fileentries_389905_4199187026->data[F_389909_4199187026].linkdesc; fileentries_389905_4199187026->data[F_389909_4199187026].linkdesc = copyStringRC1(NIM_NIL);
  															if (LOC145) nimGCunrefNoCycle(LOC145);
  														}
  														LA137: ;
  														F_389909_4199187026 += ((NI) 1);
  													} LA126: ;
  												} LA124: ;
  											}
  											popSafePoint();
  										}
  										else {
  											popSafePoint();
  										}
  										{
  											close_14853_1689653243(f_389913_4199187026);
  										}
  										if (T4199187026_168.status != 0) reraiseException();
  									}
  									{
  										TY128506 LOC168;
  										NimStringDesc* LOC169;
  										if (!title_389907_4199187026.keyword == 0) goto LA150;
  										{
  											NI i_389922_4199187026;
  											NI HEX3Atmp_389924_4199187026;
  											NI res_389926_4199187026;
  											i_389922_4199187026 = (NI)0;
  											HEX3Atmp_389924_4199187026 = (NI)0;
  											HEX3Atmp_389924_4199187026 = (F_389909_4199187026 - 1);
  											res_389926_4199187026 = ((NI) 0);
  											{
  												while (1) {
  													if (!(res_389926_4199187026 <= HEX3Atmp_389924_4199187026)) goto LA154;
  													i_389922_4199187026 = res_389926_4199187026;
  													{
  														NimStringDesc* toc_389928_4199187026;
  														NimStringDesc* LOC164;
  														NimStringDesc* LOC165;
  														NimStringDesc* LOC166;
  														NimStringDesc* LOC167;
  														toc_389928_4199187026 = fileentries_389905_4199187026->data[i_389922_4199187026].linktitle;
  														{
  															NIM_BOOL LOC158;
  															NIM_BOOL LOC159;
  															LOC158 = (NIM_BOOL)0;
  															LOC159 = (NIM_BOOL)0;
  															LOC159 = !(toc_389928_4199187026 == 0);
  															if (!(LOC159)) goto LA160;
  															LOC159 = (((NI) 0) < (toc_389928_4199187026 ? toc_389928_4199187026->Sup.len : 0));
  															LA160: ;
  															LOC158 = LOC159;
  															if (!(LOC158)) goto LA161;
  															LOC158 = ((NU8)(toc_389928_4199187026->data[((NI) 0)]) == (NU8)(32));
  															LA161: ;
  															if (!LOC158) goto LA162;
  															goto LA155;
  														}
  														LA162: ;
  														(*Result).Field1 = (TY387853*) setLengthSeq(&((*Result).Field1)->Sup, sizeof(Indexentry385117), ((NI) ((NI)(L0 + ((NI) 1)))));
  														LOC164 = (NimStringDesc*)0;
  														LOC164 = (*Result).Field1->data[L0].keyword; (*Result).Field1->data[L0].keyword = copyStringRC1(fileentries_389905_4199187026->data[i_389922_4199187026].keyword);
  														if (LOC164) nimGCunrefNoCycle(LOC164);
  														LOC165 = (NimStringDesc*)0;
  														LOC165 = (*Result).Field1->data[L0].link; (*Result).Field1->data[L0].link = copyStringRC1(fileentries_389905_4199187026->data[i_389922_4199187026].link);
  														if (LOC165) nimGCunrefNoCycle(LOC165);
  														LOC166 = (NimStringDesc*)0;
  														LOC166 = (*Result).Field1->data[L0].linktitle; (*Result).Field1->data[L0].linktitle = copyStringRC1(fileentries_389905_4199187026->data[i_389922_4199187026].linktitle);
  														if (LOC166) nimGCunrefNoCycle(LOC166);
  														LOC167 = (NimStringDesc*)0;
  														LOC167 = (*Result).Field1->data[L0].linkdesc; (*Result).Field1->data[L0].linkdesc = copyStringRC1(fileentries_389905_4199187026->data[i_389922_4199187026].linkdesc);
  														if (LOC167) nimGCunrefNoCycle(LOC167);
  														L0 += ((NI) 1);
  													} LA155: ;
  													res_389926_4199187026 += ((NI) 1);
  												} LA154: ;
  											}
  										}
  										memset((void*)(&LOC168), 0, sizeof(LOC168));
  										nossplitFile(path_388034_4199187026, (&LOC168));
  										(*Result).Field0 = (TY135002*) incrSeqV2(&((*Result).Field0)->Sup, sizeof(NimStringDesc*));
  										LOC169 = (NimStringDesc*)0;
  										LOC169 = (*Result).Field0->data[(*Result).Field0->Sup.len]; (*Result).Field0->data[(*Result).Field0->Sup.len] = copyStringRC1(LOC168.Field1);
  										if (LOC169) nimGCunrefNoCycle(LOC169);
  										++(*Result).Field0->Sup.len;
  									}
  									goto LA148;
  									LA150: ;
  									{
  										NimStringDesc* LOC171;
  										NI LOC172;
  										NimStringDesc* LOC173;
  										LOC171 = (NimStringDesc*)0;
  										LOC172 = (NI)0;
  										LOC172 = len_388259_30748785((*Result).Field2);
  										LOC173 = (NimStringDesc*)0;
  										LOC173 = nimIntToStr(LOC172);
  										LOC171 = rawNewString(LOC173->Sup.len + 8);
  appendString(LOC171, ((NimStringDesc*) &T4199187026_167));
  appendString(LOC171, LOC173);
  										title_389907_4199187026.linktitle = LOC171;
  										HEX5BHEX5DHEX3D_388268_30748785((&(*Result).Field2), (&title_389907_4199187026), fileentries_389905_4199187026);
  									}
  									LA148: ;
  								}
  								LA119: ;
  							}
  							LA18: ;
  						} LA9: ;
  					}
  				} LA7: ;
  				popSafePoint();
  			}
  			else {
  				popSafePoint();
  			}
  			{
  				int LOC176;
  				LOC176 = (int)0;
  				LOC176 = closedir(d_389870_4199187026);
  			}
  			if (T4199187026_162.status != 0) reraiseException();
  		}
  		LA4: ;
  	}
  	memset((void*)(&LOC177), 0, sizeof(LOC177));
  	LOC177.ClPrc = ((T4199187026_169) (cmp_5683_1689653243)); LOC177.ClEnv = NIM_NIL;
  	sort_388457_3792311747((*Result).Field0->data, (*Result).Field0->Sup.len, LOC177, ((Sortorder104003) 1));
  }
  
  static N_INLINE(NIM_BOOL, isfilled_173465_30748785)(NI hcode0) {
  	NIM_BOOL result0;
  	result0 = (NIM_BOOL)0;
  	result0 = !((hcode0 == ((NI) 0)));
  	return result0;
  }
  
  N_NIMCALL(void, HEX3CHEX2D_385409_4199187026)(Indexentry385117* a0, Indexentry385117* b0) {
  	unsureAsgnRef((void**) (&(*a0).keyword), (*b0).keyword);
  	unsureAsgnRef((void**) (&(*a0).link), (*b0).link);
  	{
  		if (!(*b0).linktitle == 0) goto LA3;
  		unsureAsgnRef((void**) (&(*a0).linktitle), copyString(NIM_NIL));
  	}
  	goto LA1;
  	LA3: ;
  	{
  		unsureAsgnRef((void**) (&(*a0).linktitle), (*b0).linktitle);
  	}
  	LA1: ;
  	{
  		if (!(*b0).linkdesc == 0) goto LA8;
  		unsureAsgnRef((void**) (&(*a0).linkdesc), copyString(NIM_NIL));
  	}
  	goto LA6;
  	LA8: ;
  	{
  		unsureAsgnRef((void**) (&(*a0).linkdesc), (*b0).linkdesc);
  	}
  	LA6: ;
  }
  
  N_NIMCALL(NI, cmp_385153_4199187026)(Indexentry385117* a0, Indexentry385117* b0) {
  	NI result0;
  	result0 = (NI)0;
  	result0 = nsuCmpIgnoreStyle((*a0).keyword, (*b0).keyword);
  	{
  		if (!(result0 == ((NI) 0))) goto LA3;
  		result0 = nsuCmpIgnoreStyle((*a0).link, (*b0).link);
  	}
  	LA3: ;
  	return result0;
  }
  
  N_NIMCALL(NimStringDesc*, generatedocumentationjumps_387317_4199187026)(Table385130 docs0) {
  	NimStringDesc* result_387320_4199187026;
  	TY387853* titles0;
  	TY387853* result_387324_4199187026;
  	TY386573 LOC14;
  	TY135002* chunks0;
  	NimStringDesc* LOC20;
  	NimStringDesc* LOC21;
  	result_387320_4199187026 = (NimStringDesc*)0;
  	result_387320_4199187026 = copyString(((NimStringDesc*) &T4199187026_170));
  	result_387324_4199187026 = (TY387853*) newSeq((&NTI387853), 0);
  	{
  		Indexentry385117 x_387328_4199187026;
  		memset((void*)(&x_387328_4199187026), 0, sizeof(x_387328_4199187026));
  		{
  			NI h_387784_4199187026;
  			NI HEX3Atmp_387786_4199187026;
  			NI res_387788_4199187026;
  			h_387784_4199187026 = (NI)0;
  			HEX3Atmp_387786_4199187026 = (NI)0;
  			HEX3Atmp_387786_4199187026 = (docs0.data ? (docs0.data->Sup.len-1) : -1);
  			res_387788_4199187026 = ((NI) 0);
  			{
  				while (1) {
  					if (!(res_387788_4199187026 <= HEX3Atmp_387786_4199187026)) goto LA4;
  					h_387784_4199187026 = res_387788_4199187026;
  					{
  						NIM_BOOL LOC7;
  						NimStringDesc* LOC10;
  						NimStringDesc* LOC11;
  						NimStringDesc* LOC12;
  						NimStringDesc* LOC13;
  						LOC7 = (NIM_BOOL)0;
  						LOC7 = isfilled_173465_30748785(docs0.data->data[h_387784_4199187026].Field0);
  						if (!LOC7) goto LA8;
  						x_387328_4199187026.keyword = docs0.data->data[h_387784_4199187026].Field1.keyword;
  						x_387328_4199187026.link = docs0.data->data[h_387784_4199187026].Field1.link;
  						x_387328_4199187026.linktitle = docs0.data->data[h_387784_4199187026].Field1.linktitle;
  						x_387328_4199187026.linkdesc = docs0.data->data[h_387784_4199187026].Field1.linkdesc;
  						result_387324_4199187026 = (TY387853*) incrSeqV2(&(result_387324_4199187026)->Sup, sizeof(Indexentry385117));
  						LOC10 = (NimStringDesc*)0;
  						LOC10 = result_387324_4199187026->data[result_387324_4199187026->Sup.len].keyword; result_387324_4199187026->data[result_387324_4199187026->Sup.len].keyword = copyStringRC1(x_387328_4199187026.keyword);
  						if (LOC10) nimGCunrefNoCycle(LOC10);
  						LOC11 = (NimStringDesc*)0;
  						LOC11 = result_387324_4199187026->data[result_387324_4199187026->Sup.len].link; result_387324_4199187026->data[result_387324_4199187026->Sup.len].link = copyStringRC1(x_387328_4199187026.link);
  						if (LOC11) nimGCunrefNoCycle(LOC11);
  						LOC12 = (NimStringDesc*)0;
  						LOC12 = result_387324_4199187026->data[result_387324_4199187026->Sup.len].linktitle; result_387324_4199187026->data[result_387324_4199187026->Sup.len].linktitle = copyStringRC1(x_387328_4199187026.linktitle);
  						if (LOC12) nimGCunrefNoCycle(LOC12);
  						LOC13 = (NimStringDesc*)0;
  						LOC13 = result_387324_4199187026->data[result_387324_4199187026->Sup.len].linkdesc; result_387324_4199187026->data[result_387324_4199187026->Sup.len].linkdesc = copyStringRC1(x_387328_4199187026.linkdesc);
  						if (LOC13) nimGCunrefNoCycle(LOC13);
  						++result_387324_4199187026->Sup.len;
  					}
  					LA8: ;
  					res_387788_4199187026 += ((NI) 1);
  				} LA4: ;
  			}
  		}
  	}
  	genericSeqAssign((&titles0), result_387324_4199187026, (&NTI387853));
  	memset((void*)(&LOC14), 0, sizeof(LOC14));
  	LOC14.ClPrc = ((T4199187026_171) (cmp_385153_4199187026)); LOC14.ClEnv = NIM_NIL;
  	sort_386566_3792311747(titles0->data, titles0->Sup.len, LOC14, ((Sortorder104003) 1));
  	chunks0 = (TY135002*) newSeq((&NTI135002), 0);
  	{
  		Indexentry385117 title_387766_4199187026;
  		NI i_387795_4199187026;
  		NI L_387797_4199187026;
  		memset((void*)(&title_387766_4199187026), 0, sizeof(title_387766_4199187026));
  		i_387795_4199187026 = ((NI) 0);
  		L_387797_4199187026 = (titles0 ? titles0->Sup.len : 0);
  		{
  			while (1) {
  				NimStringDesc* LOC18;
  				NimStringDesc* LOC19;
  				if (!(i_387795_4199187026 < L_387797_4199187026)) goto LA17;
  				title_387766_4199187026.keyword = titles0->data[i_387795_4199187026].keyword;
  				title_387766_4199187026.link = titles0->data[i_387795_4199187026].link;
  				title_387766_4199187026.linktitle = titles0->data[i_387795_4199187026].linktitle;
  				title_387766_4199187026.linkdesc = titles0->data[i_387795_4199187026].linkdesc;
  				LOC18 = (NimStringDesc*)0;
  				LOC18 = rawNewString(title_387766_4199187026.link->Sup.len + title_387766_4199187026.keyword->Sup.len + 15);
  appendString(LOC18, ((NimStringDesc*) &T4199187026_172));
  appendString(LOC18, title_387766_4199187026.link);
  appendString(LOC18, ((NimStringDesc*) &T4199187026_173));
  appendString(LOC18, title_387766_4199187026.keyword);
  appendString(LOC18, ((NimStringDesc*) &T4199187026_174));
  				chunks0 = (TY135002*) incrSeqV2(&(chunks0)->Sup, sizeof(NimStringDesc*));
  				LOC19 = (NimStringDesc*)0;
  				LOC19 = chunks0->data[chunks0->Sup.len]; chunks0->data[chunks0->Sup.len] = copyStringRC1(LOC18);
  				if (LOC19) nimGCunrefNoCycle(LOC19);
  				++chunks0->Sup.len;
  				i_387795_4199187026 += ((NI) 1);
  			} LA17: ;
  		}
  	}
  	LOC20 = (NimStringDesc*)0;
  	LOC21 = (NimStringDesc*)0;
  	LOC21 = nsuJoinSep(chunks0->data, chunks0->Sup.len, ((NimStringDesc*) &T4199187026_175));
  	LOC20 = rawNewString(LOC21->Sup.len + 6);
  appendString(LOC20, LOC21);
  appendString(LOC20, ((NimStringDesc*) &T4199187026_176));
  	result_387320_4199187026 = resizeString(result_387320_4199187026, LOC20->Sup.len + 0);
  appendString(result_387320_4199187026, LOC20);
  	return result_387320_4199187026;
  }
  
  N_NIMCALL(NimStringDesc*, generatemodulejumps_387798_4199187026)(TY135002* modules0) {
  	NimStringDesc* result0;
  	TY135002* chunks0;
  	NimStringDesc* LOC6;
  	NimStringDesc* LOC7;
  	result0 = (NimStringDesc*)0;
  	result0 = copyString(((NimStringDesc*) &T4199187026_178));
  	chunks0 = (TY135002*) newSeq((&NTI135002), 0);
  	{
  		NimStringDesc* name_387829_4199187026;
  		NI i_387844_4199187026;
  		NI L_387846_4199187026;
  		name_387829_4199187026 = (NimStringDesc*)0;
  		i_387844_4199187026 = ((NI) 0);
  		L_387846_4199187026 = (modules0 ? modules0->Sup.len : 0);
  		{
  			while (1) {
  				NimStringDesc* LOC4;
  				NimStringDesc* LOC5;
  				if (!(i_387844_4199187026 < L_387846_4199187026)) goto LA3;
  				name_387829_4199187026 = modules0->data[i_387844_4199187026];
  				LOC4 = (NimStringDesc*)0;
  				LOC4 = rawNewString(name_387829_4199187026->Sup.len + name_387829_4199187026->Sup.len + 20);
  appendString(LOC4, ((NimStringDesc*) &T4199187026_172));
  appendString(LOC4, name_387829_4199187026);
  appendString(LOC4, ((NimStringDesc*) &T4199187026_179));
  appendString(LOC4, name_387829_4199187026);
  appendString(LOC4, ((NimStringDesc*) &T4199187026_174));
  				chunks0 = (TY135002*) incrSeqV2(&(chunks0)->Sup, sizeof(NimStringDesc*));
  				LOC5 = (NimStringDesc*)0;
  				LOC5 = chunks0->data[chunks0->Sup.len]; chunks0->data[chunks0->Sup.len] = copyStringRC1(LOC4);
  				if (LOC5) nimGCunrefNoCycle(LOC5);
  				++chunks0->Sup.len;
  				i_387844_4199187026 += ((NI) 1);
  			} LA3: ;
  		}
  	}
  	LOC6 = (NimStringDesc*)0;
  	LOC7 = (NimStringDesc*)0;
  	LOC7 = nsuJoinSep(chunks0->data, chunks0->Sup.len, ((NimStringDesc*) &T4199187026_175));
  	LOC6 = rawNewString(LOC7->Sup.len + 6);
  appendString(LOC6, LOC7);
  appendString(LOC6, ((NimStringDesc*) &T4199187026_176));
  	result0 = resizeString(result0, LOC6->Sup.len + 0);
  appendString(result0, LOC6);
  	return result0;
  }
  N_NIMCALL(void, T4199187026_183)(void* p, NI op) {
  	TY385592* a;
  	NI LOC1;
  	a = (TY385592*)p;
  	LOC1 = (NI)0;
  	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
  	nimGCvisit((void*)a->data[LOC1].Field1, op);
  	}
  }
  
  static N_INLINE(NimStringDesc*, HEX5BHEX5D_90644_1689653243)(NimStringDesc* s0, Slice90651 x0) {
  	NimStringDesc* result0;
  	result0 = (NimStringDesc*)0;
  	result0 = copyStrLast(s0, x0.a, x0.b);
  	return result0;
  }
  
  static N_INLINE(Slice90651, HEX2EHEX2E_109260_1689653243)(NI a0, NI b0) {
  	Slice90651 result0;
  	memset((void*)(&result0), 0, sizeof(result0));
  	result0.a = a0;
  	result0.b = b0;
  	return result0;
  }
  
  N_NIMCALL(void, striptoclevel_385529_4199187026)(NimStringDesc* s0, TY385593* Result) {
  	Slice90651 LOC8;
  	{
  		NI c_385553_4199187026;
  		NI HEX3Atmp_385573_4199187026;
  		NI res_385576_4199187026;
  		c_385553_4199187026 = (NI)0;
  		HEX3Atmp_385573_4199187026 = (NI)0;
  		HEX3Atmp_385573_4199187026 = ((s0 ? s0->Sup.len : 0) - 1);
  		res_385576_4199187026 = ((NI) 0);
  		{
  			while (1) {
  				if (!(res_385576_4199187026 <= HEX3Atmp_385573_4199187026)) goto LA3;
  				c_385553_4199187026 = res_385576_4199187026;
  				(*Result).Field0 = c_385553_4199187026;
  				{
  					if (!!(((NU8)(s0->data[c_385553_4199187026]) == (NU8)(32)))) goto LA6;
  					goto LA1;
  				}
  				LA6: ;
  				res_385576_4199187026 += ((NI) 1);
  			} LA3: ;
  		}
  	} LA1: ;
  	LOC8 = HEX2EHEX2E_109260_1689653243((*Result).Field0, ((s0 ? s0->Sup.len : 0) - 1));
  	unsureAsgnRef((void**) (&(*Result).Field1), HEX5BHEX5D_90644_1689653243(s0, LOC8));
  }
  
  N_NIMCALL(NimStringDesc*, indenttolevel_385580_4199187026)(NI* level0, NI newlevel0) {
  	NimStringDesc* result0;
  {	result0 = (NimStringDesc*)0;
  	result0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		if (!((*level0) == newlevel0)) goto LA3;
  		goto BeforeRet;
  	}
  	LA3: ;
  	{
  		if (!((*level0) < newlevel0)) goto LA7;
  		result0 = nsuRepeatStr(((NimStringDesc*) &T4199187026_185), ((NI) ((NI)(newlevel0 - (*level0)))));
  	}
  	goto LA5;
  	LA7: ;
  	{
  		result0 = nsuRepeatStr(((NimStringDesc*) &T4199187026_186), ((NI) ((NI)((*level0) - newlevel0))));
  	}
  	LA5: ;
  	(*level0) = newlevel0;
  	}BeforeRet: ;
  	return result0;
  }
  
  N_NIMCALL(NimStringDesc*, generatedocumentationtoc_385586_4199187026)(TY387853* entries0) {
  	NimStringDesc* result0;
  	NimStringDesc* titleref0;
  	TY385592* levels0;
  	NI L0;
  	NI level0;
  	NimStringDesc* LOC23;
  	NimStringDesc* LOC24;
  	result0 = (NimStringDesc*)0;
  	result0 = copyString(((NimStringDesc*) &T4199187026_4));
  	titleref0 = (NimStringDesc*)0;
  	levels0 = (TY385592*)0;
  	L0 = ((NI) 0);
  	level0 = ((NI) 1);
  	levels0 = (TY385592*) newSeq((&NTI385592), ((NI) ((entries0 ? entries0->Sup.len : 0))));
  	{
  		Indexentry385117 entry_385802_4199187026;
  		NI i_386006_4199187026;
  		NI L_386008_4199187026;
  		memset((void*)(&entry_385802_4199187026), 0, sizeof(entry_385802_4199187026));
  		i_386006_4199187026 = ((NI) 0);
  		L_386008_4199187026 = (entries0 ? entries0->Sup.len : 0);
  		{
  			while (1) {
  				NimStringDesc* LOC4;
  				TY385593 LOC5;
  				NI rawlevel0;
  				NimStringDesc* rawtext0;
  				if (!(i_386006_4199187026 < L_386008_4199187026)) goto LA3;
  				entry_385802_4199187026.keyword = entries0->data[i_386006_4199187026].keyword;
  				entry_385802_4199187026.link = entries0->data[i_386006_4199187026].link;
  				entry_385802_4199187026.linktitle = entries0->data[i_386006_4199187026].linktitle;
  				entry_385802_4199187026.linkdesc = entries0->data[i_386006_4199187026].linkdesc;
  				LOC4 = (NimStringDesc*)0;
  				LOC4 = or_384594_4199187026(entry_385802_4199187026.linktitle, entry_385802_4199187026.keyword);
  				memset((void*)(&LOC5), 0, sizeof(LOC5));
  				striptoclevel_385529_4199187026(LOC4, (&LOC5));
  				rawlevel0 = (NI)0;
  				rawlevel0 = LOC5.Field0;
  				rawtext0 = (NimStringDesc*)0;
  				rawtext0 = LOC5.Field1;
  				{
  					NimStringDesc* LOC10;
  					if (!(rawlevel0 < ((NI) 1))) goto LA8;
  					levels0->data[L0].Field0 = (NI)(level0 + ((NI) 1));
  					LOC10 = (NimStringDesc*)0;
  					LOC10 = levels0->data[L0].Field1; levels0->data[L0].Field1 = copyStringRC1(entry_385802_4199187026.keyword);
  					if (LOC10) nimGCunrefNoCycle(LOC10);
  				}
  				goto LA6;
  				LA8: ;
  				{
  					NimStringDesc* LOC12;
  					level0 = rawlevel0;
  					levels0->data[L0].Field0 = rawlevel0;
  					LOC12 = (NimStringDesc*)0;
  					LOC12 = levels0->data[L0].Field1; levels0->data[L0].Field1 = copyStringRC1(rawtext0);
  					if (LOC12) nimGCunrefNoCycle(LOC12);
  				}
  				LA6: ;
  				L0 += ((NI) 1);
  				i_386006_4199187026 += ((NI) 1);
  			} LA3: ;
  		}
  	}
  	result0 = copyString(((NimStringDesc*) &T4199187026_184));
  	level0 = ((NI) 1);
  	L0 = ((NI) 0);
  	{
  		while (1) {
  			NimStringDesc* link0;
  			if (!(L0 < (entries0 ? entries0->Sup.len : 0))) goto LA14;
  			link0 = entries0->data[L0].link;
  			{
  				NIM_BOOL LOC17;
  				LOC17 = (NIM_BOOL)0;
  				LOC17 = isdocumentationtitle_385525_4199187026(link0);
  				if (!LOC17) goto LA18;
  				titleref0 = copyString(link0);
  			}
  			goto LA15;
  			LA18: ;
  			{
  				NimStringDesc* LOC21;
  				NimStringDesc* LOC22;
  				LOC21 = (NimStringDesc*)0;
  				LOC21 = indenttolevel_385580_4199187026((&level0), levels0->data[L0].Field0);
  				result0 = resizeString(result0, LOC21->Sup.len + 0);
  appendString(result0, LOC21);
  				LOC22 = (NimStringDesc*)0;
  				LOC22 = rawNewString(link0->Sup.len + levels0->data[L0].Field1->Sup.len + 25);
  appendString(LOC22, ((NimStringDesc*) &T4199187026_187));
  appendString(LOC22, link0);
  appendString(LOC22, ((NimStringDesc*) &T4199187026_173));
  appendString(LOC22, levels0->data[L0].Field1);
  appendString(LOC22, ((NimStringDesc*) &T4199187026_188));
  				result0 = resizeString(result0, LOC22->Sup.len + 0);
  appendString(result0, LOC22);
  			}
  			LA15: ;
  			L0 += ((NI) 1);
  		} LA14: ;
  	}
  	LOC23 = (NimStringDesc*)0;
  	LOC24 = (NimStringDesc*)0;
  	LOC24 = indenttolevel_385580_4199187026((&level0), ((NI) 1));
  	LOC23 = rawNewString(LOC24->Sup.len + 6);
  appendString(LOC23, LOC24);
  appendString(LOC23, ((NimStringDesc*) &T4199187026_189));
  	result0 = resizeString(result0, LOC23->Sup.len + 0);
  appendString(result0, LOC23);
  	return result0;
  }
  
  N_NIMCALL(NimStringDesc*, generatedocumentationindex_386010_4199187026)(Table385130 docs0) {
  	NimStringDesc* result_386013_4199187026;
  	TY387853* titles0;
  	TY387853* result_386017_4199187026;
  	TY386573 LOC14;
  	result_386013_4199187026 = (NimStringDesc*)0;
  	result_386013_4199187026 = copyString(((NimStringDesc*) &T4199187026_4));
  	result_386017_4199187026 = (TY387853*) newSeq((&NTI387853), 0);
  	{
  		Indexentry385117 x_386021_4199187026;
  		memset((void*)(&x_386021_4199187026), 0, sizeof(x_386021_4199187026));
  		{
  			NI h_387304_4199187026;
  			NI HEX3Atmp_387306_4199187026;
  			NI res_387308_4199187026;
  			h_387304_4199187026 = (NI)0;
  			HEX3Atmp_387306_4199187026 = (NI)0;
  			HEX3Atmp_387306_4199187026 = (docs0.data ? (docs0.data->Sup.len-1) : -1);
  			res_387308_4199187026 = ((NI) 0);
  			{
  				while (1) {
  					if (!(res_387308_4199187026 <= HEX3Atmp_387306_4199187026)) goto LA4;
  					h_387304_4199187026 = res_387308_4199187026;
  					{
  						NIM_BOOL LOC7;
  						NimStringDesc* LOC10;
  						NimStringDesc* LOC11;
  						NimStringDesc* LOC12;
  						NimStringDesc* LOC13;
  						LOC7 = (NIM_BOOL)0;
  						LOC7 = isfilled_173465_30748785(docs0.data->data[h_387304_4199187026].Field0);
  						if (!LOC7) goto LA8;
  						x_386021_4199187026.keyword = docs0.data->data[h_387304_4199187026].Field1.keyword;
  						x_386021_4199187026.link = docs0.data->data[h_387304_4199187026].Field1.link;
  						x_386021_4199187026.linktitle = docs0.data->data[h_387304_4199187026].Field1.linktitle;
  						x_386021_4199187026.linkdesc = docs0.data->data[h_387304_4199187026].Field1.linkdesc;
  						result_386017_4199187026 = (TY387853*) incrSeqV2(&(result_386017_4199187026)->Sup, sizeof(Indexentry385117));
  						LOC10 = (NimStringDesc*)0;
  						LOC10 = result_386017_4199187026->data[result_386017_4199187026->Sup.len].keyword; result_386017_4199187026->data[result_386017_4199187026->Sup.len].keyword = copyStringRC1(x_386021_4199187026.keyword);
  						if (LOC10) nimGCunrefNoCycle(LOC10);
  						LOC11 = (NimStringDesc*)0;
  						LOC11 = result_386017_4199187026->data[result_386017_4199187026->Sup.len].link; result_386017_4199187026->data[result_386017_4199187026->Sup.len].link = copyStringRC1(x_386021_4199187026.link);
  						if (LOC11) nimGCunrefNoCycle(LOC11);
  						LOC12 = (NimStringDesc*)0;
  						LOC12 = result_386017_4199187026->data[result_386017_4199187026->Sup.len].linktitle; result_386017_4199187026->data[result_386017_4199187026->Sup.len].linktitle = copyStringRC1(x_386021_4199187026.linktitle);
  						if (LOC12) nimGCunrefNoCycle(LOC12);
  						LOC13 = (NimStringDesc*)0;
  						LOC13 = result_386017_4199187026->data[result_386017_4199187026->Sup.len].linkdesc; result_386017_4199187026->data[result_386017_4199187026->Sup.len].linkdesc = copyStringRC1(x_386021_4199187026.linkdesc);
  						if (LOC13) nimGCunrefNoCycle(LOC13);
  						++result_386017_4199187026->Sup.len;
  					}
  					LA8: ;
  					res_387308_4199187026 += ((NI) 1);
  				} LA4: ;
  			}
  		}
  	}
  	genericSeqAssign((&titles0), result_386017_4199187026, (&NTI387853));
  	memset((void*)(&LOC14), 0, sizeof(LOC14));
  	LOC14.ClPrc = ((T4199187026_181) (cmp_385153_4199187026)); LOC14.ClEnv = NIM_NIL;
  	sort_386566_3792311747(titles0->data, titles0->Sup.len, LOC14, ((Sortorder104003) 1));
  	{
  		Indexentry385117 title_387244_4199187026;
  		NI i_387314_4199187026;
  		NI L_387316_4199187026;
  		memset((void*)(&title_387244_4199187026), 0, sizeof(title_387244_4199187026));
  		i_387314_4199187026 = ((NI) 0);
  		L_387316_4199187026 = (titles0 ? titles0->Sup.len : 0);
  		{
  			while (1) {
  				NimStringDesc* toclist0;
  				TY387853* LOC18;
  				NimStringDesc* LOC19;
  				if (!(i_387314_4199187026 < L_387316_4199187026)) goto LA17;
  				title_387244_4199187026.keyword = titles0->data[i_387314_4199187026].keyword;
  				title_387244_4199187026.link = titles0->data[i_387314_4199187026].link;
  				title_387244_4199187026.linktitle = titles0->data[i_387314_4199187026].linktitle;
  				title_387244_4199187026.linkdesc = titles0->data[i_387314_4199187026].linkdesc;
  				LOC18 = (TY387853*)0;
  				LOC18 = getordefault_387246_30748785(docs0, (&title_387244_4199187026));
  				toclist0 = generatedocumentationtoc_385586_4199187026(LOC18);
  				LOC19 = (NimStringDesc*)0;
  				LOC19 = rawNewString(title_387244_4199187026.link->Sup.len + title_387244_4199187026.keyword->Sup.len + toclist0->Sup.len + 35);
  appendString(LOC19, ((NimStringDesc*) &T4199187026_190));
  appendString(LOC19, title_387244_4199187026.link);
  appendString(LOC19, ((NimStringDesc*) &T4199187026_173));
  appendString(LOC19, title_387244_4199187026.keyword);
  appendString(LOC19, ((NimStringDesc*) &T4199187026_191));
  appendString(LOC19, toclist0);
  appendString(LOC19, ((NimStringDesc*) &T4199187026_192));
  				result_386013_4199187026 = resizeString(result_386013_4199187026, LOC19->Sup.len + 0);
  appendString(result_386013_4199187026, LOC19);
  				i_387314_4199187026 += ((NI) 1);
  			} LA17: ;
  		}
  	}
  	return result_386013_4199187026;
  }
  
  N_NIMCALL(void, sortindex_385414_4199187026)(Indexentry385117* a0, NI a0Len0) {
  	NI n0;
  	NI h0;
  	n0 = a0Len0;
  	h0 = ((NI) 1);
  	{
  		while (1) {
  			h0 = (NI)((NI)(((NI) 3) * h0) + ((NI) 1));
  			{
  				if (!(n0 < h0)) goto LA5;
  				goto LA1;
  			}
  			LA5: ;
  		}
  	} LA1: ;
  	{
  		while (1) {
  			h0 = (NI)(h0 / ((NI) 3));
  			{
  				NI i_385439_4199187026;
  				NI HEX3Atmp_385450_4199187026;
  				NI res_385453_4199187026;
  				i_385439_4199187026 = (NI)0;
  				HEX3Atmp_385450_4199187026 = (NI)0;
  				HEX3Atmp_385450_4199187026 = (NI)(n0 - ((NI) 1));
  				res_385453_4199187026 = h0;
  				{
  					while (1) {
  						Indexentry385117 v0;
  						NI j0;
  						if (!(res_385453_4199187026 <= HEX3Atmp_385450_4199187026)) goto LA11;
  						i_385439_4199187026 = res_385453_4199187026;
  						memset((void*)(&v0), 0, sizeof(v0));
  						HEX3CHEX2D_385409_4199187026((&v0), (&a0[i_385439_4199187026]));
  						j0 = i_385439_4199187026;
  						{
  							while (1) {
  								NI LOC14;
  								LOC14 = (NI)0;
  								LOC14 = cmp_385153_4199187026((&a0[(NI)(j0 - h0)]), (&v0));
  								if (!(((NI) 0) <= LOC14)) goto LA13;
  								HEX3CHEX2D_385409_4199187026((&a0[j0]), (&a0[(NI)(j0 - h0)]));
  								j0 = (NI)(j0 - h0);
  								{
  									if (!(j0 < h0)) goto LA17;
  									goto LA12;
  								}
  								LA17: ;
  							} LA13: ;
  						} LA12: ;
  						HEX3CHEX2D_385409_4199187026((&a0[j0]), (&v0));
  						res_385453_4199187026 += ((NI) 1);
  					} LA11: ;
  				}
  			}
  			{
  				if (!(h0 == ((NI) 1))) goto LA21;
  				goto LA7;
  			}
  			LA21: ;
  		}
  	} LA7: ;
  }
  
  N_NIMCALL(NimStringDesc*, escapelink_385457_4199187026)(NimStringDesc* s0) {
  	NimStringDesc* result0;
  	result0 = (NimStringDesc*)0;
  	result0 = rawNewString(((NI) ((NI)((s0 ? s0->Sup.len : 0) + (NI)((NU64)((s0 ? s0->Sup.len : 0)) >> (NU64)(((NI) 2)))))));
  	{
  		NIM_CHAR c_385462_4199187026;
  		NI i_385474_4199187026;
  		NI L_385476_4199187026;
  		c_385462_4199187026 = (NIM_CHAR)0;
  		i_385474_4199187026 = ((NI) 0);
  		L_385476_4199187026 = (s0 ? s0->Sup.len : 0);
  		{
  			while (1) {
  				if (!(i_385474_4199187026 < L_385476_4199187026)) goto LA3;
  				c_385462_4199187026 = s0->data[i_385474_4199187026];
  				switch (((NU8)(c_385462_4199187026))) {
  				case 97 ... 122:
  				case 95:
  				case 65 ... 90:
  				case 48 ... 57:
  				case 46:
  				case 35:
  				case 44:
  				case 47:
  				{
  					result0 = addChar(result0, c_385462_4199187026);
  				}
  				break;
  				default:
  				{
  					NimStringDesc* LOC6;
  					result0 = resizeString(result0, 1);
  appendString(result0, ((NimStringDesc*) &T4199187026_195));
  					LOC6 = (NimStringDesc*)0;
  					LOC6 = nsuToHex(((NI64) (((NU8)(c_385462_4199187026)))), ((NI) 2));
  					result0 = resizeString(result0, LOC6->Sup.len + 0);
  appendString(result0, LOC6);
  				}
  				break;
  				}
  				i_385474_4199187026 += ((NI) 1);
  			} LA3: ;
  		}
  	}
  	return result0;
  }
  
  N_NIMCALL(NimStringDesc*, generatesymbolindex_385477_4199187026)(TY387853* symbols0) {
  	NimStringDesc* result0;
  	NI i0;
  	result0 = (NimStringDesc*)0;
  	result0 = copyString(((NimStringDesc*) &T4199187026_194));
  	i0 = ((NI) 0);
  	{
  		while (1) {
  			NimStringDesc* keyword0;
  			NimStringDesc* cleanedkeyword0;
  			TY194153 LOC3;
  			NI j0;
  			if (!(i0 < (symbols0 ? symbols0->Sup.len : 0))) goto LA2;
  			keyword0 = symbols0->data[i0].keyword;
  			cleanedkeyword0 = escapelink_385457_4199187026(keyword0);
  			memset((void*)LOC3, 0, sizeof(LOC3));
  			LOC3[0] = copyString(keyword0);
  			LOC3[1] = copyString(cleanedkeyword0);
  			nsuAddf((&result0), ((NimStringDesc*) &T4199187026_196), LOC3, 2);
  			j0 = i0;
  			{
  				while (1) {
  					NIM_BOOL LOC6;
  					NimStringDesc* url0;
  					NimStringDesc* text0;
  					NimStringDesc* desc0;
  					LOC6 = (NIM_BOOL)0;
  					LOC6 = (j0 < (symbols0 ? symbols0->Sup.len : 0));
  					if (!(LOC6)) goto LA7;
  					LOC6 = eqStrings(keyword0, symbols0->data[j0].keyword);
  					LA7: ;
  					if (!LOC6) goto LA5;
  					url0 = escapelink_385457_4199187026(symbols0->data[j0].link);
  					{
  						if (!!(symbols0->data[j0].linktitle == 0)) goto LA10;
  						text0 = symbols0->data[j0].linktitle;
  					}
  					goto LA8;
  					LA10: ;
  					{
  						text0 = url0;
  					}
  					LA8: ;
  					{
  						if (!!(symbols0->data[j0].linkdesc == 0)) goto LA15;
  						desc0 = symbols0->data[j0].linkdesc;
  					}
  					goto LA13;
  					LA15: ;
  					{
  						desc0 = copyString(((NimStringDesc*) &T4199187026_4));
  					}
  					LA13: ;
  					{
  						TY194140 LOC22;
  						if (!(((NI) 0) < (desc0 ? desc0->Sup.len : 0))) goto LA20;
  						memset((void*)LOC22, 0, sizeof(LOC22));
  						LOC22[0] = copyString(url0);
  						LOC22[1] = copyString(text0);
  						LOC22[2] = copyString(desc0);
  						nsuAddf((&result0), ((NimStringDesc*) &T4199187026_197), LOC22, 3);
  					}
  					goto LA18;
  					LA20: ;
  					{
  						TY194153 LOC24;
  						memset((void*)LOC24, 0, sizeof(LOC24));
  						LOC24[0] = copyString(url0);
  						LOC24[1] = copyString(text0);
  						nsuAddf((&result0), ((NimStringDesc*) &T4199187026_198), LOC24, 2);
  					}
  					LA18: ;
  					j0 += ((NI) 1);
  				} LA5: ;
  			}
  			result0 = resizeString(result0, 11);
  appendString(result0, ((NimStringDesc*) &T4199187026_199));
  			i0 = j0;
  		} LA2: ;
  	}
  	result0 = resizeString(result0, 5);
  appendString(result0, ((NimStringDesc*) &T4199187026_200));
  	return result0;
  }
  
  N_NIMCALL(NimStringDesc*, mergeindexes_389929_4199187026)(NimStringDesc* dir0) {
  	NimStringDesc* result0;
  	TY387850 LOC1;
  	TY135002* modules0;
  	TY387853* symbols0;
  	Table385130 docs0;
  	result0 = (NimStringDesc*)0;
  	memset((void*)(&LOC1), 0, sizeof(LOC1));
  	readindexdir_387847_4199187026(dir0, (&LOC1));
  	modules0 = (TY135002*)0;
  	genericSeqAssign((&modules0), LOC1.Field0, (&NTI135002));
  	symbols0 = (TY387853*)0;
  	genericSeqAssign((&symbols0), LOC1.Field1, (&NTI387853));
  	memset((void*)(&docs0), 0, sizeof(docs0));
  	genericSeqAssign((&docs0.data), LOC1.Field2.data, (&NTI385133));
  	docs0.counter = LOC1.Field2.counter;
  	result0 = copyString(((NimStringDesc*) &T4199187026_4));
  	{
  		NI LOC4;
  		NimStringDesc* LOC7;
  		LOC4 = (NI)0;
  		LOC4 = len_388259_30748785(docs0);
  		if (!(((NI) 0) < LOC4)) goto LA5;
  		LOC7 = (NimStringDesc*)0;
  		LOC7 = generatedocumentationjumps_387317_4199187026(docs0);
  		result0 = resizeString(result0, LOC7->Sup.len + 0);
  appendString(result0, LOC7);
  		result0 = resizeString(result0, 5);
  appendString(result0, ((NimStringDesc*) &T4199187026_177));
  	}
  	LA5: ;
  	{
  		NimStringDesc* LOC12;
  		if (!(((NI) 0) < (modules0 ? modules0->Sup.len : 0))) goto LA10;
  		LOC12 = (NimStringDesc*)0;
  		LOC12 = generatemodulejumps_387798_4199187026(modules0);
  		result0 = resizeString(result0, LOC12->Sup.len + 0);
  appendString(result0, LOC12);
  		result0 = resizeString(result0, 5);
  appendString(result0, ((NimStringDesc*) &T4199187026_177));
  	}
  	LA10: ;
  	{
  		NI LOC15;
  		NimStringDesc* LOC18;
  		LOC15 = (NI)0;
  		LOC15 = len_388259_30748785(docs0);
  		if (!(((NI) 0) < LOC15)) goto LA16;
  		result0 = resizeString(result0, 29);
  appendString(result0, ((NimStringDesc*) &T4199187026_180));
  		LOC18 = (NimStringDesc*)0;
  		LOC18 = generatedocumentationindex_386010_4199187026(docs0);
  		result0 = resizeString(result0, LOC18->Sup.len + 0);
  appendString(result0, LOC18);
  	}
  	LA16: ;
  	{
  		NimStringDesc* LOC23;
  		if (!(((NI) 0) < (symbols0 ? symbols0->Sup.len : 0))) goto LA21;
  		sortindex_385414_4199187026(symbols0->data, symbols0->Sup.len);
  		result0 = resizeString(result0, 21);
  appendString(result0, ((NimStringDesc*) &T4199187026_193));
  		LOC23 = (NimStringDesc*)0;
  		LOC23 = generatesymbolindex_385477_4199187026(symbols0);
  		result0 = resizeString(result0, LOC23->Sup.len + 0);
  appendString(result0, LOC23);
  	}
  	LA21: ;
  	return result0;
  }
  NIM_EXTERNC N_NOINLINE(void, docutils_rstgenInit000)(void) {
  	NimStringDesc* LOC1;
  nimRegisterGlobalMarker(T4199187026_2);
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = splitter_384441_4199187026; splitter_384441_4199187026 = copyStringRC1(((NimStringDesc*) &T4199187026_3));
  	if (LOC1) nimGCunrefNoCycle(LOC1);
  }
  
  NIM_EXTERNC N_NOINLINE(void, docutils_rstgenDatInit000)(void) {
  static TNimNode* T4199187026_147[14];
  static TNimNode* T4199187026_148[2];
  NI T4199187026_150;
  static char* NIM_CONST T4199187026_149[2] = {
  "outHtml", 
  "outLatex"};
  static TNimNode* T4199187026_151[3];
  static TNimNode* T4199187026_160[4];
  static TNimNode* T4199187026_182[2];
  static TNimNode T4199187026_0[30];
  NTI384010.size = sizeof(Rstgenerator384010);
  NTI384010.kind = 17;
  NTI384010.base = (&NTI3608);
  T4199187026_147[0] = &T4199187026_0[1];
  NTI384004.size = sizeof(Outputtarget384004);
  NTI384004.kind = 14;
  NTI384004.base = 0;
  NTI384004.flags = 3;
  for (T4199187026_150 = 0; T4199187026_150 < 2; T4199187026_150++) {
  T4199187026_0[T4199187026_150+2].kind = 1;
  T4199187026_0[T4199187026_150+2].offset = T4199187026_150;
  T4199187026_0[T4199187026_150+2].name = T4199187026_149[T4199187026_150];
  T4199187026_148[T4199187026_150] = &T4199187026_0[T4199187026_150+2];
  }
  T4199187026_0[4].len = 2; T4199187026_0[4].kind = 2; T4199187026_0[4].sons = &T4199187026_148[0];
  NTI384004.node = &T4199187026_0[4];
  T4199187026_0[1].kind = 1;
  T4199187026_0[1].offset = offsetof(Rstgenerator384010, target);
  T4199187026_0[1].typ = (&NTI384004);
  T4199187026_0[1].name = "target";
  T4199187026_147[1] = &T4199187026_0[5];
  T4199187026_0[5].kind = 1;
  T4199187026_0[5].offset = offsetof(Rstgenerator384010, config);
  T4199187026_0[5].typ = (&NTI152610);
  T4199187026_0[5].name = "config";
  T4199187026_147[2] = &T4199187026_0[6];
  T4199187026_0[6].kind = 1;
  T4199187026_0[6].offset = offsetof(Rstgenerator384010, splitafter);
  T4199187026_0[6].typ = (&NTI104);
  T4199187026_0[6].name = "splitAfter";
  T4199187026_147[3] = &T4199187026_0[7];
  T4199187026_0[7].kind = 1;
  T4199187026_0[7].offset = offsetof(Rstgenerator384010, listingcounter);
  T4199187026_0[7].typ = (&NTI104);
  T4199187026_0[7].name = "listingCounter";
  T4199187026_147[4] = &T4199187026_0[8];
  NTI384006.size = sizeof(Tocentry384006);
  NTI384006.kind = 18;
  NTI384006.base = 0;
  NTI384006.flags = 2;
  T4199187026_151[0] = &T4199187026_0[10];
  T4199187026_0[10].kind = 1;
  T4199187026_0[10].offset = offsetof(Tocentry384006, n);
  T4199187026_0[10].typ = (&NTI368007);
  T4199187026_0[10].name = "n";
  T4199187026_151[1] = &T4199187026_0[11];
  T4199187026_0[11].kind = 1;
  T4199187026_0[11].offset = offsetof(Tocentry384006, refname);
  T4199187026_0[11].typ = (&NTI138);
  T4199187026_0[11].name = "refname";
  T4199187026_151[2] = &T4199187026_0[12];
  T4199187026_0[12].kind = 1;
  T4199187026_0[12].offset = offsetof(Tocentry384006, header);
  T4199187026_0[12].typ = (&NTI138);
  T4199187026_0[12].name = "header";
  T4199187026_0[9].len = 3; T4199187026_0[9].kind = 2; T4199187026_0[9].sons = &T4199187026_151[0];
  NTI384006.node = &T4199187026_0[9];
  NTI384029.size = sizeof(TY384029*);
  NTI384029.kind = 24;
  NTI384029.base = (&NTI384006);
  NTI384029.flags = 2;
  NTI384029.marker = T4199187026_152;
  T4199187026_0[8].kind = 1;
  T4199187026_0[8].offset = offsetof(Rstgenerator384010, tocpart);
  T4199187026_0[8].typ = (&NTI384029);
  T4199187026_0[8].name = "tocPart";
  T4199187026_147[5] = &T4199187026_0[13];
  T4199187026_0[13].kind = 1;
  T4199187026_0[13].offset = offsetof(Rstgenerator384010, hastoc);
  T4199187026_0[13].typ = (&NTI130);
  T4199187026_0[13].name = "hasToc";
  T4199187026_147[6] = &T4199187026_0[14];
  T4199187026_0[14].kind = 1;
  T4199187026_0[14].offset = offsetof(Rstgenerator384010, theindex);
  T4199187026_0[14].typ = (&NTI138);
  T4199187026_0[14].name = "theIndex";
  T4199187026_147[7] = &T4199187026_0[15];
  T4199187026_0[15].kind = 1;
  T4199187026_0[15].offset = offsetof(Rstgenerator384010, options);
  T4199187026_0[15].typ = (&NTI369005);
  T4199187026_0[15].name = "options";
  T4199187026_147[8] = &T4199187026_0[16];
  T4199187026_0[16].kind = 1;
  T4199187026_0[16].offset = offsetof(Rstgenerator384010, findfile);
  T4199187026_0[16].typ = (&NTI369013);
  T4199187026_0[16].name = "findFile";
  T4199187026_147[9] = &T4199187026_0[17];
  T4199187026_0[17].kind = 1;
  T4199187026_0[17].offset = offsetof(Rstgenerator384010, msghandler);
  T4199187026_0[17].typ = (&NTI369011);
  T4199187026_0[17].name = "msgHandler";
  T4199187026_147[10] = &T4199187026_0[18];
  T4199187026_0[18].kind = 1;
  T4199187026_0[18].offset = offsetof(Rstgenerator384010, filename);
  T4199187026_0[18].typ = (&NTI138);
  T4199187026_0[18].name = "filename";
  T4199187026_147[11] = &T4199187026_0[19];
  NTI384039.size = sizeof(TY384039);
  NTI384039.kind = 16;
  NTI384039.base = (&NTI138);
  NTI384039.flags = 2;
  T4199187026_0[19].kind = 1;
  T4199187026_0[19].offset = offsetof(Rstgenerator384010, meta);
  T4199187026_0[19].typ = (&NTI384039);
  T4199187026_0[19].name = "meta";
  T4199187026_147[12] = &T4199187026_0[20];
  T4199187026_0[20].kind = 1;
  T4199187026_0[20].offset = offsetof(Rstgenerator384010, currentsection);
  T4199187026_0[20].typ = (&NTI138);
  T4199187026_0[20].name = "currentSection";
  T4199187026_147[13] = &T4199187026_0[21];
  T4199187026_0[21].kind = 1;
  T4199187026_0[21].offset = offsetof(Rstgenerator384010, seenindexterms);
  T4199187026_0[21].typ = (&NTI384047);
  T4199187026_0[21].name = "seenIndexTerms";
  T4199187026_0[0].len = 14; T4199187026_0[0].kind = 2; T4199187026_0[0].sons = &T4199187026_147[0];
  NTI384010.node = &T4199187026_0[0];
  NTI385117.size = sizeof(Indexentry385117);
  NTI385117.kind = 18;
  NTI385117.base = 0;
  NTI385117.flags = 2;
  T4199187026_160[0] = &T4199187026_0[23];
  T4199187026_0[23].kind = 1;
  T4199187026_0[23].offset = offsetof(Indexentry385117, keyword);
  T4199187026_0[23].typ = (&NTI138);
  T4199187026_0[23].name = "keyword";
  T4199187026_160[1] = &T4199187026_0[24];
  T4199187026_0[24].kind = 1;
  T4199187026_0[24].offset = offsetof(Indexentry385117, link);
  T4199187026_0[24].typ = (&NTI138);
  T4199187026_0[24].name = "link";
  T4199187026_160[2] = &T4199187026_0[25];
  T4199187026_0[25].kind = 1;
  T4199187026_0[25].offset = offsetof(Indexentry385117, linktitle);
  T4199187026_0[25].typ = (&NTI138);
  T4199187026_0[25].name = "linkTitle";
  T4199187026_160[3] = &T4199187026_0[26];
  T4199187026_0[26].kind = 1;
  T4199187026_0[26].offset = offsetof(Indexentry385117, linkdesc);
  T4199187026_0[26].typ = (&NTI138);
  T4199187026_0[26].name = "linkDesc";
  T4199187026_0[22].len = 4; T4199187026_0[22].kind = 2; T4199187026_0[22].sons = &T4199187026_160[0];
  NTI385117.node = &T4199187026_0[22];
  NTI387853.size = sizeof(TY387853*);
  NTI387853.kind = 24;
  NTI387853.base = (&NTI385117);
  NTI387853.flags = 2;
  NTI387853.marker = T4199187026_161;
  NTI385593.size = sizeof(TY385593);
  NTI385593.kind = 18;
  NTI385593.base = 0;
  NTI385593.flags = 2;
  T4199187026_182[0] = &T4199187026_0[28];
  T4199187026_0[28].kind = 1;
  T4199187026_0[28].offset = offsetof(TY385593, Field0);
  T4199187026_0[28].typ = (&NTI104);
  T4199187026_0[28].name = "Field0";
  T4199187026_182[1] = &T4199187026_0[29];
  T4199187026_0[29].kind = 1;
  T4199187026_0[29].offset = offsetof(TY385593, Field1);
  T4199187026_0[29].typ = (&NTI138);
  T4199187026_0[29].name = "Field1";
  T4199187026_0[27].len = 2; T4199187026_0[27].kind = 2; T4199187026_0[27].sons = &T4199187026_182[0];
  NTI385593.node = &T4199187026_0[27];
  NTI385592.size = sizeof(TY385592*);
  NTI385592.kind = 24;
  NTI385592.base = (&NTI385593);
  NTI385592.flags = 2;
  NTI385592.marker = T4199187026_183;
  }
  
  