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

#include "nimbase.h"
#include <string.h>
#include <stdio.h>
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Rstnode313008 Rstnode313008;
typedef struct Rstnodeseq313006 Rstnodeseq313006;
typedef struct Rstparser314482 Rstparser314482;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tokenseq314110 Tokenseq314110;
typedef struct Sharedstate314478 Sharedstate314478;
typedef struct TY314503 TY314503;
typedef struct Token314108 Token314108;
typedef struct TY314492 TY314492;
typedef struct Substitution314476 Substitution314476;
typedef struct Cell47505 Cell47505;
typedef struct Cellseq47521 Cellseq47521;
typedef struct Gcheap49818 Gcheap49818;
typedef struct Gcstack49816 Gcstack49816;
typedef struct Cellset47517 Cellset47517;
typedef struct Pagedesc47513 Pagedesc47513;
typedef struct Memregion29688 Memregion29688;
typedef struct Smallchunk29640 Smallchunk29640;
typedef struct Llchunk29682 Llchunk29682;
typedef struct Bigchunk29642 Bigchunk29642;
typedef struct Intset29614 Intset29614;
typedef struct Trunk29610 Trunk29610;
typedef struct Avlnode29686 Avlnode29686;
typedef struct Gcstat49814 Gcstat49814;
typedef struct Eparseerror314484 Eparseerror314484;
typedef struct Valueerror3646 Valueerror3646;
typedef struct Exception Exception;
typedef struct Lexer314112 Lexer314112;
typedef struct Keyvaluepair140205 Keyvaluepair140205;
typedef struct TY125202 TY125202;
typedef struct Basechunk29638 Basechunk29638;
typedef struct Freecell29630 Freecell29630;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Rstnode313008  {
NU8 kind;
NimStringDesc* text;
NI level;
Rstnodeseq313006* sons;
};
typedef NU8 TY202404[32];
typedef N_NIMCALL_PTR(NimStringDesc*, Findfilehandler314014) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, Msghandler314012) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef N_NIMCALL_PTR(void, TY3489) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3494) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3489 marker;
TY3494 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Rstparser314482  {
  TNimObject Sup;
NI idx;
Tokenseq314110* tok;
Sharedstate314478* s;
TY314503* indentstack;
NimStringDesc* filename;
NI line;
NI col;
NIM_BOOL hastoc;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Token314108  {
NU8 kind;
NI ival;
NimStringDesc* symbol;
NI line;
NI col;
};
typedef NI Skiptable100505[256];
struct  Sharedstate314478  {
NU8 options;
NI ulevel;
NI olevel;
TY314492* subs;
TY314492* refs;
Skiptable100505 underlinetolevel;
Skiptable100505 overlinetolevel;
Msghandler314012 msghandler;
Findfilehandler314014 findfile;
};
struct  Substitution314476  {
NimStringDesc* key;
Rstnode313008* value;
};
struct  Cell47505  {
NI refcount;
TNimType* typ;
};
struct  Cellseq47521  {
NI len;
NI cap;
Cell47505** d;
};
struct  Cellset47517  {
NI counter;
NI max;
Pagedesc47513* head;
Pagedesc47513** data;
};
typedef Smallchunk29640* TY29703[512];
typedef Trunk29610* Trunkbuckets29612[256];
struct  Intset29614  {
Trunkbuckets29612 data;
};
struct  Memregion29688  {
NI minlargeobj;
NI maxlargeobj;
TY29703 freesmallchunks;
Llchunk29682* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk29642* freechunkslist;
Intset29614 chunkstarts;
Avlnode29686* root;
Avlnode29686* deleted;
Avlnode29686* last;
Avlnode29686* freeavlnodes;
};
struct  Gcstat49814  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap49818  {
Gcstack49816* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq47521 zct;
Cellseq47521 decstack;
Cellset47517 cycleroots;
Cellseq47521 tempstack;
NI recgclock;
Memregion29688 region;
Gcstat49814 stat;
};
typedef NimStringDesc* TY314046[10];
typedef NimStringDesc* TY314610[5];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror3646  {
  Exception Sup;
};
struct  Eparseerror314484  {
  Valueerror3646 Sup;
};
typedef NimStringDesc* TY183752[1];
struct  Lexer314112  {
  TNimObject Sup;
NCSTRING buf;
NI bufpos;
NI line;
NI col;
NI baseindent;
NIM_BOOL skippounds;
};
typedef NimStringDesc* TY316626[13];
typedef N_NIMCALL_PTR(Rstnode313008*, Sectionparser319206) (Rstparser314482* p);
struct Keyvaluepair140205 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef Keyvaluepair140205 TY314069[34];
typedef NimStringDesc* TY318890[3];
typedef NI TY318895[3];
struct  Gcstack49816  {
Gcstack49816* prev;
Gcstack49816* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY29619[8];
struct  Pagedesc47513  {
Pagedesc47513* next;
NI key;
TY29619 bits;
};
struct  Basechunk29638  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk29640  {
  Basechunk29638 Sup;
Smallchunk29640* next;
Smallchunk29640* prev;
Freecell29630* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk29682  {
NI size;
NI acc;
Llchunk29682* next;
};
struct  Bigchunk29642  {
  Basechunk29638 Sup;
Bigchunk29642* next;
Bigchunk29642* prev;
NI align;
NF data;
};
struct  Trunk29610  {
Trunk29610* next;
NI key;
TY29619 bits;
};
typedef Avlnode29686* TY29693[2];
struct  Avlnode29686  {
TY29693 link;
NI key;
NI upperbound;
NI level;
};
struct  Freecell29630  {
Freecell29630* next;
NI zerofield;
};
struct Tokenseq314110 {
  TGenericSeq Sup;
  Token314108 data[SEQ_DECL_SIZE];
};
struct TY314492 {
  TGenericSeq Sup;
  Substitution314476 data[SEQ_DECL_SIZE];
};
struct TY314503 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY125202 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct Rstnodeseq313006 {
  TGenericSeq Sup;
  Rstnode313008* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, rstnodetorefnameaux_314923)(Rstnode313008* n, NimStringDesc** r, NIM_BOOL* b);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, len_313081)(Rstnode313008* n);
N_NIMCALL(void, addnodesaux_314884)(Rstnode313008* n, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, addnodes_314052)(Rstnode313008* n);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing, TY202404 chars);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2596)(void* p, NI op);
N_NIMCALL(void, TMP2608)(void* p, NI op);
N_NIMCALL(void, TMP2609)(void* p, NI op);
N_NIMCALL(void, TMP2610)(void* p, NI op);
N_NIMCALL(void, initparser_314850)(Rstparser314482* p, Sharedstate314478* sharedstate);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_84004, TNimType* mt);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Sharedstate314478*, newsharedstate_314659)(NU8 options, Findfilehandler314014 findfile, Msghandler314012 msghandler);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(Cell47505*, usrtocell_51440)(void* usr);
static N_INLINE(void, rtladdzct_53001)(Cell47505* c);
N_NOINLINE(void, addzct_51417)(Cellseq47521* s, Cell47505* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, defaultmsghandler_314601)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(NU8, whichmsgclass_314516)(NU8 k);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_85009, TNimType* typ);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(void, TMP2630)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
static N_INLINE(void, writeline_161405)(FILE* f, NimStringDesc** x, NI xLen0);
N_NIMCALL(void, write_15489)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, defaultfindfile_314655)(NimStringDesc* filename);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(NI, gettokens_314342)(NimStringDesc* buffer, NIM_BOOL skippounds, Tokenseq314110** tokens);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, rawgettok_314301)(Lexer314112* L, Token314108* tok);
N_NIMCALL(void, getthing_314135)(Lexer314112* L, Token314108* tok, TY202404 s);
N_NIMCALL(void, getindent_314282)(Lexer314112* L, Token314108* tok);
N_NIMCALL(NI, getindentaux_314200)(Lexer314112* L, NI start);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, getadornment_314173)(Lexer314112* L, Token314108* tok);
N_NIMCALL(Rstnode313008*, resolvesubs_320196)(Rstparser314482* p, Rstnode313008* n);
N_NIMCALL(NI, findsub_315014)(Rstparser314482* p, Rstnode313008* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, getenv_125825)(NimStringDesc* key);
N_NIMCALL(Rstnode313008*, newrstnode_313121)(NU8 kind, NimStringDesc* s);
N_NIMCALL(void, rstmessage_314719)(Rstparser314482* p, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(Rstnode313008*, findref_315151)(Rstparser314482* p, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, rstnodetorefname_314049)(Rstnode313008* n);
N_NIMCALL(Rstnode313008*, newrstnode_313093)(NU8 kind);
N_NIMCALL(void, add_313138)(Rstnode313008* father, Rstnode313008* son);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Rstnode313008*, parsedoc_318257)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsesectionwrapper_319091)(Rstparser314482* p);
N_NIMCALL(void, parsesection_316696)(Rstparser314482* p, Rstnode313008* result);
N_NIMCALL(NI, currind_314801)(Rstparser314482* p);
N_NIMCALL(void, pushind_314805)(Rstparser314482* p, NI ind);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, popind_314820)(Rstparser314482* p);
N_NIMCALL(NU8, whichsection_317611)(Rstparser314482* p);
N_NIMCALL(NIM_BOOL, match_315327)(Rstparser314482* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, allcharsinset_100325)(NimStringDesc* s, TY202404 theset);
N_NIMCALL(NI, tokenafternewline_317550)(Rstparser314482* p);
N_NIMCALL(NIM_BOOL, prednl_317578)(Rstparser314482* p);
N_NIMCALL(NIM_BOOL, islineblock_317573)(Rstparser314482* p);
N_NIMCALL(void, rstmessage_314731)(Rstparser314482* p, NU8 msgkind);
N_NIMCALL(NIM_BOOL, isdeflist_317591)(Rstparser314482* p);
N_NIMCALL(NIM_BOOL, isoptionlist_317607)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parseliteralblock_317468)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsebulletlist_318668)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parselineblock_317624)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsedotdot_317464)(Rstparser314482* p);
N_NIMCALL(NimStringDesc*, getdirective_316436)(Rstparser314482* p);
N_NIMCALL(NU8, getdirkind_316629)(NimStringDesc* s);
static N_INLINE(NI, find_316634)(TY316626 a, NimStringDesc* item);
N_NIMCALL(Rstnode313008*, dirinclude_319357)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsedirective_319336)(Rstparser314482* p, NU8 flags, Sectionparser319206 contentparser);
N_NIMCALL(Rstnode313008*, parsedirective_319217)(Rstparser314482* p, NU8 flags);
N_NIMCALL(Rstnode313008*, newleaf_315177)(Rstparser314482* p);
N_NIMCALL(void, parseline_316684)(Rstparser314482* p, Rstnode313008* father);
N_NIMCALL(void, parseinline_316328)(Rstparser314482* p, Rstnode313008* father);
N_NIMCALL(NIM_BOOL, isinlinemarkupstart_315286)(Rstparser314482* p, NimStringDesc* markup);
N_NIMCALL(void, parseuntil_316201)(Rstparser314482* p, Rstnode313008* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash);
N_NIMCALL(NIM_BOOL, isinlinemarkupend_315248)(Rstparser314482* p, NimStringDesc* markup);
N_NIMCALL(void, parsebackslash_315896)(Rstparser314482* p, Rstnode313008* father);
N_NIMCALL(void, rstmessage_314724)(Rstparser314482* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col);
N_NIMCALL(Rstnode313008*, parsemarkdowncodeblock_316274)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsepostfix_315538)(Rstparser314482* p, Rstnode313008* n);
N_NIMCALL(void, fixupembeddedref_315471)(Rstnode313008* n, Rstnode313008* a, Rstnode313008* b);
N_NIMCALL(void, setref_315106)(Rstparser314482* p, NimStringDesc* key, Rstnode313008* value);
N_NIMCALL(Rstnode313008*, parsesmiley_315607)(Rstparser314482* p);
N_NIMCALL(NI, matchverbatim_315573)(Rstparser314482* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_NIMCALL(void, parseurl_315859)(Rstparser314482* p, Rstnode313008* father);
N_NIMCALL(NIM_BOOL, isurl_315801)(Rstparser314482* p, NI i);
static N_INLINE(NIM_BOOL, contains_315819)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
static N_INLINE(NI, find_315829)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
N_NIMCALL(Rstnode313008*, parsefields_316728)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsefield_316701)(Rstparser314482* p);
N_NIMCALL(NIM_BOOL, indfollows_319323)(Rstparser314482* p);
N_NIMCALL(NimStringDesc*, getfieldvalue_314055)(Rstnode313008* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, readfile_15466)(NimStringDesc* filename);
N_NIMCALL(Rstnode313008*, dirimage_320001)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, dirfigure_320007)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, dirtitle_320013)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, dircontainer_319602)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, dircontents_320019)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, dirraw_320043)(Rstparser314482* p);
N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, dirrawaux_320032)(Rstparser314482* p, Rstnode313008** result, NU8 kind, Sectionparser319206 contentparser);
N_NIMCALL(Rstnode313008*, parsedirbody_319351)(Rstparser314482* p, Sectionparser319206 contentparser);
N_NIMCALL(Rstnode313008*, dircodeblock_319380)(Rstparser314482* p, NIM_BOOL nimrodextension);
N_NIMCALL(Rstnode313008*, dirindex_320025)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, getreferencename_315182)(Rstparser314482* p, NimStringDesc* endstr);
N_NIMCALL(Rstnode313008*, untileol_315208)(Rstparser314482* p);
N_NIMCALL(void, expect_315234)(Rstparser314482* p, NimStringDesc* tok);
N_NIMCALL(void, setsub_315061)(Rstparser314482* p, NimStringDesc* key, Rstnode313008* value);
N_NIMCALL(Rstnode313008*, parsecomment_316544)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parseenumlist_318883)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsedefinitionlist_318807)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsetransition_318546)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parseheadline_317728)(Rstparser314482* p);
N_NIMCALL(void, parseuntilnewline_316690)(Rstparser314482* p, Rstnode313008* father);
N_NIMCALL(NI, getlevel_317533)(NI* map, NI* lvl, NIM_CHAR c);
N_NIMCALL(Rstnode313008*, parseoverline_318596)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parsesimpletable_318261)(Rstparser314482* p);
N_NIMCALL(void, getcolumns_318020)(Rstparser314482* p, TY314503** cols);
N_NIMCALL(NI, tokend_318016)(Rstparser314482* p);
N_NIMCALL(Rstnode313008*, parseoptionlist_318722)(Rstparser314482* p);
N_NIMCALL(void, parseparagraph_317677)(Rstparser314482* p, Rstnode313008* result);
N_NIMCALL(void, addifnotnil_313152)(Rstnode313008* father, Rstnode313008* son);
N_NIMCALL(NU8, sonkind_318949)(Rstnode313008* father, NI i);
STRING_LITERAL(TMP2245, "", 0);
STRING_LITERAL(TMP2335, "\001\001", 2);
static NIM_CONST TY202404 TMP2356 = {
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}
;
NIM_CONST struct {
  TGenericSeq Sup;
  NI data[1];
} CNSTSEQ2613 = {{1, 1}, {((NI) 0)}};
NIM_CONST TY314503* TMP2611 = ((TY314503*)&CNSTSEQ2613);
STRING_LITERAL(TMP2616, "cannot open \'$1\'", 16);
STRING_LITERAL(TMP2617, "\'$1\' expected", 13);
STRING_LITERAL(TMP2618, "grid table is not implemented", 29);
STRING_LITERAL(TMP2619, "new section expected", 20);
STRING_LITERAL(TMP2620, "general parse error", 19);
STRING_LITERAL(TMP2621, "invalid directive: \'$1\'", 23);
STRING_LITERAL(TMP2622, "redefinition of label \'$1\'", 26);
STRING_LITERAL(TMP2623, "unknown substitution \'$1\'", 25);
STRING_LITERAL(TMP2624, "language \'$1\' not supported", 27);
STRING_LITERAL(TMP2625, "field \'$1\' not supported", 24);
NIM_CONST TY314046 messages_314043 = {((NimStringDesc*) &TMP2616),
((NimStringDesc*) &TMP2617),
((NimStringDesc*) &TMP2618),
((NimStringDesc*) &TMP2619),
((NimStringDesc*) &TMP2620),
((NimStringDesc*) &TMP2621),
((NimStringDesc*) &TMP2622),
((NimStringDesc*) &TMP2623),
((NimStringDesc*) &TMP2624),
((NimStringDesc*) &TMP2625)}
;
STRING_LITERAL(TMP2626, "$1($2, $3) $4: $5", 17);
STRING_LITERAL(TMP2631, "\012", 1);
static NIM_CONST TY202404 TMP2633 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,
0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
;
static NIM_CONST TY202404 TMP2634 = {
0x00, 0x02, 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(TMP2635, "#", 1);
static NIM_CONST TY202404 TMP2636 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03,
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(TMP2637, "ii", 2);
STRING_LITERAL(TMP2638, " a", 2);
STRING_LITERAL(TMP2639, "i", 1);
STRING_LITERAL(TMP2640, "ai", 2);
STRING_LITERAL(TMP2641, "::", 2);
STRING_LITERAL(TMP2642, "+", 1);
STRING_LITERAL(TMP2643, "*", 1);
STRING_LITERAL(TMP2644, "-", 1);
STRING_LITERAL(TMP2645, "|", 1);
STRING_LITERAL(TMP2646, "..", 2);
STRING_LITERAL(TMP2647, ":w:", 3);
STRING_LITERAL(TMP2648, "(e) ", 4);
STRING_LITERAL(TMP2649, "+a+", 3);
STRING_LITERAL(TMP2650, "-w", 2);
STRING_LITERAL(TMP2651, "--w", 3);
STRING_LITERAL(TMP2652, "/w", 2);
STRING_LITERAL(TMP2653, "//w", 3);
STRING_LITERAL(TMP2654, "e) ", 3);
STRING_LITERAL(TMP2655, "e. ", 3);
STRING_LITERAL(TMP2656, "author", 6);
STRING_LITERAL(TMP2657, "authors", 7);
STRING_LITERAL(TMP2658, "code", 4);
STRING_LITERAL(TMP2659, "code-block", 10);
STRING_LITERAL(TMP2660, "container", 9);
STRING_LITERAL(TMP2661, "contents", 8);
STRING_LITERAL(TMP2662, "figure", 6);
STRING_LITERAL(TMP2663, "image", 5);
STRING_LITERAL(TMP2664, "include", 7);
STRING_LITERAL(TMP2665, "index", 5);
STRING_LITERAL(TMP2666, "raw", 3);
STRING_LITERAL(TMP2667, "title", 5);
NIM_CONST TY316626 Dirids_316624 = {((NimStringDesc*) &TMP2245),
((NimStringDesc*) &TMP2656),
((NimStringDesc*) &TMP2657),
((NimStringDesc*) &TMP2658),
((NimStringDesc*) &TMP2659),
((NimStringDesc*) &TMP2660),
((NimStringDesc*) &TMP2661),
((NimStringDesc*) &TMP2662),
((NimStringDesc*) &TMP2663),
((NimStringDesc*) &TMP2664),
((NimStringDesc*) &TMP2665),
((NimStringDesc*) &TMP2666),
((NimStringDesc*) &TMP2667)}
;
static NIM_CONST TY202404 TMP2668 = {
0x00, 0x00, 0x00, 0x00, 0x84, 0xA1, 0x00, 0x14,
0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2669, "\\", 1);
STRING_LITERAL(TMP2670, "***", 3);
static NIM_CONST TY202404 TMP2671 = {
0x00, 0x00, 0x00, 0x00, 0x86, 0xF2, 0x00, 0xCC,
0x00, 0x00, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2672, "``", 2);
STRING_LITERAL(TMP2673, "\\\\", 2);
STRING_LITERAL(TMP2674, " ", 1);
STRING_LITERAL(TMP2675, "**", 2);
STRING_LITERAL(TMP2676, "```", 3);
STRING_LITERAL(TMP2677, "`", 1);
STRING_LITERAL(TMP2678, "_", 1);
STRING_LITERAL(TMP2679, "__", 2);
STRING_LITERAL(TMP2680, ">", 1);
STRING_LITERAL(TMP2681, "<", 1);
STRING_LITERAL(TMP2682, "idx", 3);
STRING_LITERAL(TMP2683, "literal", 7);
STRING_LITERAL(TMP2684, "strong", 6);
STRING_LITERAL(TMP2685, "emphasis", 8);
STRING_LITERAL(TMP2686, "sub", 3);
STRING_LITERAL(TMP2687, "subscript", 9);
STRING_LITERAL(TMP2688, "sup", 3);
STRING_LITERAL(TMP2689, "supscript", 9);
STRING_LITERAL(TMP2690, ":D", 2);
STRING_LITERAL(TMP2691, "icon_e_biggrin", 14);
STRING_LITERAL(TMP2692, ":-D", 3);
STRING_LITERAL(TMP2693, ":)", 2);
STRING_LITERAL(TMP2694, "icon_e_smile", 12);
STRING_LITERAL(TMP2695, ":-)", 3);
STRING_LITERAL(TMP2696, ";)", 2);
STRING_LITERAL(TMP2697, "icon_e_wink", 11);
STRING_LITERAL(TMP2698, ";-)", 3);
STRING_LITERAL(TMP2699, ":(", 2);
STRING_LITERAL(TMP2700, "icon_e_sad", 10);
STRING_LITERAL(TMP2701, ":-(", 3);
STRING_LITERAL(TMP2702, ":o", 2);
STRING_LITERAL(TMP2703, "icon_e_surprised", 16);
STRING_LITERAL(TMP2704, ":-o", 3);
STRING_LITERAL(TMP2705, ":shock:", 7);
STRING_LITERAL(TMP2706, "icon_eek", 8);
STRING_LITERAL(TMP2707, ":?", 2);
STRING_LITERAL(TMP2708, "icon_e_confused", 15);
STRING_LITERAL(TMP2709, ":-?", 3);
STRING_LITERAL(TMP2710, ":-/", 3);
STRING_LITERAL(TMP2711, "8-)", 3);
STRING_LITERAL(TMP2712, "icon_cool", 9);
STRING_LITERAL(TMP2713, ":lol:", 5);
STRING_LITERAL(TMP2714, "icon_lol", 8);
STRING_LITERAL(TMP2715, ":x", 2);
STRING_LITERAL(TMP2716, "icon_mad", 8);
STRING_LITERAL(TMP2717, ":-x", 3);
STRING_LITERAL(TMP2718, ":P", 2);
STRING_LITERAL(TMP2719, "icon_razz", 9);
STRING_LITERAL(TMP2720, ":-P", 3);
STRING_LITERAL(TMP2721, ":oops:", 6);
STRING_LITERAL(TMP2722, "icon_redface", 12);
STRING_LITERAL(TMP2723, ":cry:", 5);
STRING_LITERAL(TMP2724, "icon_cry", 8);
STRING_LITERAL(TMP2725, ":evil:", 6);
STRING_LITERAL(TMP2726, "icon_evil", 9);
STRING_LITERAL(TMP2727, ":twisted:", 9);
STRING_LITERAL(TMP2728, "icon_twisted", 12);
STRING_LITERAL(TMP2729, ":roll:", 6);
STRING_LITERAL(TMP2730, "icon_rolleyes", 13);
STRING_LITERAL(TMP2731, ":!:", 3);
STRING_LITERAL(TMP2732, "icon_exclaim", 12);
STRING_LITERAL(TMP2733, ":?:", 3);
STRING_LITERAL(TMP2734, "icon_question", 13);
STRING_LITERAL(TMP2735, ":idea:", 6);
STRING_LITERAL(TMP2736, "icon_idea", 9);
STRING_LITERAL(TMP2737, ":arrow:", 7);
STRING_LITERAL(TMP2738, "icon_arrow", 10);
STRING_LITERAL(TMP2739, ":|", 2);
STRING_LITERAL(TMP2740, "icon_neutral", 12);
STRING_LITERAL(TMP2741, ":-|", 3);
STRING_LITERAL(TMP2742, ":mrgreen:", 9);
STRING_LITERAL(TMP2743, "icon_mrgreen", 12);
STRING_LITERAL(TMP2744, ":geek:", 6);
STRING_LITERAL(TMP2745, "icon_e_geek", 11);
STRING_LITERAL(TMP2746, ":ugeek:", 7);
STRING_LITERAL(TMP2747, "icon_e_ugeek", 12);
NIM_CONST TY314069 Smilies_314068 = {{((NimStringDesc*) &TMP2690),
((NimStringDesc*) &TMP2691)}
,
{((NimStringDesc*) &TMP2692),
((NimStringDesc*) &TMP2691)}
,
{((NimStringDesc*) &TMP2693),
((NimStringDesc*) &TMP2694)}
,
{((NimStringDesc*) &TMP2695),
((NimStringDesc*) &TMP2694)}
,
{((NimStringDesc*) &TMP2696),
((NimStringDesc*) &TMP2697)}
,
{((NimStringDesc*) &TMP2698),
((NimStringDesc*) &TMP2697)}
,
{((NimStringDesc*) &TMP2699),
((NimStringDesc*) &TMP2700)}
,
{((NimStringDesc*) &TMP2701),
((NimStringDesc*) &TMP2700)}
,
{((NimStringDesc*) &TMP2702),
((NimStringDesc*) &TMP2703)}
,
{((NimStringDesc*) &TMP2704),
((NimStringDesc*) &TMP2703)}
,
{((NimStringDesc*) &TMP2705),
((NimStringDesc*) &TMP2706)}
,
{((NimStringDesc*) &TMP2707),
((NimStringDesc*) &TMP2708)}
,
{((NimStringDesc*) &TMP2709),
((NimStringDesc*) &TMP2708)}
,
{((NimStringDesc*) &TMP2710),
((NimStringDesc*) &TMP2708)}
,
{((NimStringDesc*) &TMP2711),
((NimStringDesc*) &TMP2712)}
,
{((NimStringDesc*) &TMP2713),
((NimStringDesc*) &TMP2714)}
,
{((NimStringDesc*) &TMP2715),
((NimStringDesc*) &TMP2716)}
,
{((NimStringDesc*) &TMP2717),
((NimStringDesc*) &TMP2716)}
,
{((NimStringDesc*) &TMP2718),
((NimStringDesc*) &TMP2719)}
,
{((NimStringDesc*) &TMP2720),
((NimStringDesc*) &TMP2719)}
,
{((NimStringDesc*) &TMP2721),
((NimStringDesc*) &TMP2722)}
,
{((NimStringDesc*) &TMP2723),
((NimStringDesc*) &TMP2724)}
,
{((NimStringDesc*) &TMP2725),
((NimStringDesc*) &TMP2726)}
,
{((NimStringDesc*) &TMP2727),
((NimStringDesc*) &TMP2728)}
,
{((NimStringDesc*) &TMP2729),
((NimStringDesc*) &TMP2730)}
,
{((NimStringDesc*) &TMP2731),
((NimStringDesc*) &TMP2732)}
,
{((NimStringDesc*) &TMP2733),
((NimStringDesc*) &TMP2734)}
,
{((NimStringDesc*) &TMP2735),
((NimStringDesc*) &TMP2736)}
,
{((NimStringDesc*) &TMP2737),
((NimStringDesc*) &TMP2738)}
,
{((NimStringDesc*) &TMP2739),
((NimStringDesc*) &TMP2740)}
,
{((NimStringDesc*) &TMP2741),
((NimStringDesc*) &TMP2740)}
,
{((NimStringDesc*) &TMP2742),
((NimStringDesc*) &TMP2743)}
,
{((NimStringDesc*) &TMP2744),
((NimStringDesc*) &TMP2745)}
,
{((NimStringDesc*) &TMP2746),
((NimStringDesc*) &TMP2747)}
}
;
STRING_LITERAL(TMP2748, ":", 1);
STRING_LITERAL(TMP2749, "//", 2);
STRING_LITERAL(TMP2751, "http", 4);
STRING_LITERAL(TMP2752, "https", 5);
STRING_LITERAL(TMP2753, "ftp", 3);
STRING_LITERAL(TMP2754, "telnet", 6);
STRING_LITERAL(TMP2755, "file", 4);
NIM_CONST TY314610 TMP2750 = {((NimStringDesc*) &TMP2751),
((NimStringDesc*) &TMP2752),
((NimStringDesc*) &TMP2753),
((NimStringDesc*) &TMP2754),
((NimStringDesc*) &TMP2755)}
;
STRING_LITERAL(TMP2756, "html", 4);
STRING_LITERAL(TMP2757, "latex", 5);
STRING_LITERAL(TMP2758, "default-language", 16);
STRING_LITERAL(TMP2759, "Nimrod", 6);
STRING_LITERAL(TMP2760, " _", 2);
STRING_LITERAL(TMP2761, " |", 2);
STRING_LITERAL(TMP2762, "replace", 7);
STRING_LITERAL(TMP2763, " [", 2);
STRING_LITERAL(TMP2764, "]", 1);
NIM_CONST TY318890 wildcards_318888 = {((NimStringDesc*) &TMP2648),
((NimStringDesc*) &TMP2654),
((NimStringDesc*) &TMP2655)}
;
NIM_CONST TY318895 wildpos_318893 = {((NI) 1),
((NI) 0),
((NI) 0)}
;
extern TNimType NTI3608; /* RootObj */
TNimType NTI314482; /* RstParser */
extern TNimType NTI104; /* int */
TNimType NTI314108; /* Token */
TNimType NTI314106; /* TokType */
extern TNimType NTI138; /* string */
TNimType NTI314110; /* TokenSeq */
TNimType NTI314478; /* SharedState */
TNimType NTI314004; /* RstParseOption */
TNimType NTI314006; /* RstParseOptions */
TNimType NTI314476; /* Substitution */
extern TNimType NTI313004; /* PRstNode */
TNimType NTI314492; /* seq[Substitution] */
extern TNimType NTI100505; /* SkipTable */
TNimType NTI314012; /* MsgHandler */
TNimType NTI314014; /* FindFileHandler */
TNimType NTI314480; /* PSharedState */
TNimType NTI314503; /* seq[int] */
extern TNimType NTI130; /* bool */
extern Gcheap49818 gch_49859;
TNimType NTI314010; /* MsgKind */
TNimType NTI314008; /* MsgClass */
extern TNimType NTI3646; /* ValueError */
TNimType NTI314484; /* EParseError */
TNimType NTI314633; /* ref EParseError */
TNimType NTI314112; /* Lexer */
extern TNimType NTI140; /* cstring */
extern TNimType NTI125202; /* seq[string] */

N_NIMCALL(void, rstnodetorefnameaux_314923)(Rstnode313008* n, NimStringDesc** r, NIM_BOOL* b) {
	{
		if (!((*n).kind == ((NU8) 64))) goto LA3;
		{
			NI i_314950;
			NI HEX3Atmp_314992;
			NI res_314995;
			i_314950 = 0;
			HEX3Atmp_314992 = 0;
			HEX3Atmp_314992 = (NI)(((*n).text ? (*n).text->Sup.len : 0) - ((NI) 1));
			res_314995 = ((NI) 0);
			{
				while (1) {
					if (!(res_314995 <= HEX3Atmp_314992)) goto LA7;
					i_314950 = res_314995;
					switch (((NU8)((*n).text->data[i_314950]))) {
					case 48 ... 57:
					{
						{
							if (!(*b)) goto LA11;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA11: ;
						{
							if (!(((*r) ? (*r)->Sup.len : 0) == ((NI) 0))) goto LA15;
							(*r) = addChar((*r), 90);
						}
						LA15: ;
						(*r) = addChar((*r), (*n).text->data[i_314950]);
					}
					break;
					case 97 ... 122:
					{
						{
							if (!(*b)) goto LA20;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA20: ;
						(*r) = addChar((*r), (*n).text->data[i_314950]);
					}
					break;
					case 65 ... 90:
					{
						{
							if (!(*b)) goto LA25;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA25: ;
						(*r) = addChar((*r), ((NIM_CHAR) (((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)((*n).text->data[i_314950])))) - ((NI) 65)))) + ((NI) 97)))))));
					}
					break;
					default:
					{
						{
							if (!(((NI) 0) < ((*r) ? (*r)->Sup.len : 0))) goto LA30;
							(*b) = NIM_TRUE;
						}
						LA30: ;
					}
					break;
					}
					res_314995 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_314990;
			NI HEX3Atmp_315000;
			NI LOC34;
			NI res_315003;
			i_314990 = 0;
			HEX3Atmp_315000 = 0;
			LOC34 = 0;
			LOC34 = len_313081(n);
			HEX3Atmp_315000 = (NI)(LOC34 - ((NI) 1));
			res_315003 = ((NI) 0);
			{
				while (1) {
					if (!(res_315003 <= HEX3Atmp_315000)) goto LA36;
					i_314990 = res_315003;
					rstnodetorefnameaux_314923((*n).sons->data[i_314990], r, b);
					res_315003 += ((NI) 1);
				} LA36: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, rstnodetorefname_314049)(Rstnode313008* n) {
	NimStringDesc* result;
	NIM_BOOL b;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2245));
	b = NIM_FALSE;
	rstnodetorefnameaux_314923(n, (&result), (&b));
	return result;
}

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

N_NIMCALL(void, addnodesaux_314884)(Rstnode313008* n, NimStringDesc** result) {
	{
		if (!((*n).kind == ((NU8) 64))) goto LA3;
		(*result) = resizeString((*result), (*n).text->Sup.len + 0);
appendString((*result), (*n).text);
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_314909;
			NI HEX3Atmp_314911;
			NI LOC7;
			NI res_314914;
			i_314909 = 0;
			HEX3Atmp_314911 = 0;
			LOC7 = 0;
			LOC7 = len_313081(n);
			HEX3Atmp_314911 = (NI)(LOC7 - ((NI) 1));
			res_314914 = ((NI) 0);
			{
				while (1) {
					if (!(res_314914 <= HEX3Atmp_314911)) goto LA9;
					i_314909 = res_314914;
					addnodesaux_314884((*n).sons->data[i_314909], result);
					res_314914 += ((NI) 1);
				} LA9: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, addnodes_314052)(Rstnode313008* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2245));
	addnodesaux_314884(n, (&result));
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_314055)(Rstnode313008* n, NimStringDesc* fieldname) {
	NimStringDesc* result;
{	result = 0;
	result = copyString(((NimStringDesc*) &TMP2245));
	{
		if (!((*n).sons->data[((NI) 1)] == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!(((*(*n).sons->data[((NI) 1)]).kind == ((NU8) 13)))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	{
		NI i_317438;
		NI HEX3Atmp_317441;
		NI LOC10;
		NI res_317444;
		i_317438 = 0;
		HEX3Atmp_317441 = 0;
		LOC10 = 0;
		LOC10 = len_313081((*n).sons->data[((NI) 1)]);
		HEX3Atmp_317441 = (NI)(LOC10 - ((NI) 1));
		res_317444 = ((NI) 0);
		{
			while (1) {
				Rstnode313008* f;
				if (!(res_317444 <= HEX3Atmp_317441)) goto LA12;
				i_317438 = res_317444;
				f = (*(*n).sons->data[((NI) 1)]).sons->data[i_317438];
				{
					NimStringDesc* LOC15;
					NI LOC16;
					LOC15 = 0;
					LOC15 = addnodes_314052((*f).sons->data[((NI) 0)]);
					LOC16 = 0;
					LOC16 = nsuCmpIgnoreStyle(LOC15, fieldname);
					if (!(LOC16 == ((NI) 0))) goto LA17;
					result = addnodes_314052((*f).sons->data[((NI) 1)]);
					{
						if (!((result) && (result)->Sup.len == 0)) goto LA21;
						result = copyString(((NimStringDesc*) &TMP2335));
					}
					LA21: ;
					goto BeforeRet;
				}
				LA17: ;
				res_317444 += ((NI) 1);
			} LA12: ;
		}
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getargument_314059)(Rstnode313008* n) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*n).sons->data[((NI) 0)] == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP2245));
	}
	goto LA1;
	LA3: ;
	{
		result = addnodes_314052((*n).sons->data[((NI) 0)]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_316772)(Rstnode313008* n) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = addnodes_314052((*n).sons->data[((NI) 1)]);
	result = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2356);
	return result;
}
N_NIMCALL(void, TMP2596)(void* p, NI op) {
	Tokenseq314110* a;
	NI LOC1;
	a = (Tokenseq314110*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].symbol, op);
	}
}
N_NIMCALL(void, TMP2608)(void* p, NI op) {
	TY314492* a;
	NI LOC1;
	a = (TY314492*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].key, op);
	nimGCvisit((void*)a->data[LOC1].value, op);
	}
}
N_NIMCALL(void, TMP2609)(void* p, NI op) {
	Sharedstate314478* a;
	NI LOC1;
	NI LOC2;
	a = (Sharedstate314478*)p;
	nimGCvisit((void*)(*a).subs, op);
	nimGCvisit((void*)(*a).refs, op);
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < 256; LOC1++) {
	}
	LOC2 = 0;
	for (LOC2 = 0; LOC2 < 256; LOC2++) {
	}
}
N_NIMCALL(void, TMP2610)(void* p, NI op) {
	TY314503* a;
	NI LOC1;
	a = (TY314503*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, initparser_314850)(Rstparser314482* p, Sharedstate314478* sharedstate) {
	genericSeqAssign((&(*p).indentstack), TMP2611, (&NTI314503));
	unsureAsgnRef((void**) (&(*p).tok), (Tokenseq314110*) newSeq((&NTI314110), 0));
	(*p).idx = ((NI) 0);
	unsureAsgnRef((void**) (&(*p).filename), copyString(((NimStringDesc*) &TMP2245)));
	(*p).hastoc = NIM_FALSE;
	(*p).col = ((NI) 0);
	(*p).line = ((NI) 1);
	unsureAsgnRef((void**) (&(*p).s), sharedstate);
}

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

static N_INLINE(void, rtladdzct_53001)(Cell47505* c) {
	addzct_51417((&gch_49859.zct), c);
}

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

N_NIMCALL(NU8, whichmsgclass_314516)(NU8 k) {
	NU8 result;
	result = 0;
	switch (((NU8)(reprEnum(k, (&NTI314010))->data[((NI) 1)]))) {
	case 101:
	case 69:
	{
		result = ((NU8) 2);
	}
	break;
	case 119:
	case 87:
	{
		result = ((NU8) 1);
	}
	break;
	case 104:
	case 72:
	{
		result = ((NU8) 0);
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}
N_NIMCALL(void, TMP2630)(void* p, NI op) {
	Eparseerror314484* a;
	a = (Eparseerror314484*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

static N_INLINE(void, writeline_161405)(FILE* f, NimStringDesc** x, NI xLen0) {
	{
		NimStringDesc* i_161420;
		NI i_161428;
		i_161420 = 0;
		i_161428 = ((NI) 0);
		{
			while (1) {
				if (!(i_161428 < xLen0)) goto LA3;
				i_161420 = x[i_161428];
				write_15489(f, i_161420);
				i_161428 += ((NI) 1);
			} LA3: ;
		}
	}
	write_15489(f, ((NimStringDesc*) &TMP2631));
}

N_NIMCALL(void, defaultmsghandler_314601)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU8 mc;
	NimStringDesc* a;
	NimStringDesc* message;
	TY314610 LOC1;
	mc = whichmsgclass_314516(msgkind);
	a = nsuFormatSingleElem(messages_314043[(msgkind)- 0], arg);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString(filename);
	LOC1[1] = nimIntToStr(line);
	LOC1[2] = nimIntToStr(col);
	LOC1[3] = copyString(reprEnum(mc, (&NTI314008)));
	LOC1[4] = copyString(a);
	message = nsuFormatOpenArray(((NimStringDesc*) &TMP2626), LOC1, 5);
	{
		Eparseerror314484* e_314632;
		NimStringDesc* LOC6;
		if (!(mc == ((NU8) 2))) goto LA4;
		e_314632 = 0;
		e_314632 = (Eparseerror314484*) newObj((&NTI314633), sizeof(Eparseerror314484));
		(*e_314632).Sup.Sup.Sup.m_type = (&NTI314484);
		LOC6 = 0;
		LOC6 = (*e_314632).Sup.Sup.message; (*e_314632).Sup.Sup.message = copyStringRC1(message);
		if (LOC6) nimGCunrefNoCycle(LOC6);
		raiseException((Exception*)e_314632, "EParseError");
	}
	goto LA2;
	LA4: ;
	{
		TY183752 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(message);
		writeline_161405(stdout, LOC8, 1);
	}
	LA2: ;
}

N_NIMCALL(NimStringDesc*, defaultfindfile_314655)(NimStringDesc* filename) {
	NimStringDesc* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = nosexistsFile(filename);
		if (!LOC3) goto LA4;
		result = copyString(filename);
	}
	goto LA1;
	LA4: ;
	{
		result = copyString(((NimStringDesc*) &TMP2245));
	}
	LA1: ;
	return result;
}

N_NIMCALL(Sharedstate314478*, newsharedstate_314659)(NU8 options, Findfilehandler314014 findfile, Msghandler314012 msghandler) {
	Sharedstate314478* result;
	result = 0;
	result = (Sharedstate314478*) newObj((&NTI314480), sizeof(Sharedstate314478));
	if ((*result).subs) nimGCunrefNoCycle((*result).subs);
	(*result).subs = (TY314492*) newSeqRC1((&NTI314492), 0);
	if ((*result).refs) nimGCunrefNoCycle((*result).refs);
	(*result).refs = (TY314492*) newSeqRC1((&NTI314492), 0);
	(*result).options = options;
	{
		if (!!(msghandler == 0)) goto LA3;
		(*result).msghandler = msghandler;
	}
	goto LA1;
	LA3: ;
	{
		(*result).msghandler = defaultmsghandler_314601;
	}
	LA1: ;
	{
		if (!!(findfile == 0)) goto LA8;
		(*result).findfile = findfile;
	}
	goto LA6;
	LA8: ;
	{
		(*result).findfile = defaultfindfile_314655;
	}
	LA6: ;
	return result;
}

N_NIMCALL(void, getthing_314135)(Lexer314112* L, Token314108* tok, TY202404 s) {
	NI pos;
	(*tok).kind = ((NU8) 3);
	(*tok).line = (*L).line;
	(*tok).col = (*L).col;
	pos = (*L).bufpos;
	{
		while (1) {
			(*tok).symbol = addChar((*tok).symbol, (*L).buf[pos]);
			pos += ((NI) 1);
			{
				if (!!(((s[(NU)(((NU8)((*L).buf[pos])))>>3] &(1U<<((NU)(((NU8)((*L).buf[pos])))&7U)))!=0))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*L).col += (NI)(pos - (*L).bufpos);
	(*L).bufpos = pos;
}

N_NIMCALL(NI, getindentaux_314200)(Lexer314112* L, NI start) {
	NI result;
	NI pos;
	NCSTRING buf;
	result = 0;
	pos = start;
	buf = (*L).buf;
	{
		if (!((NU8)(buf[pos]) == (NU8)(13))) goto LA3;
		{
			if (!((NU8)(buf[(NI)(pos + ((NI) 1))]) == (NU8)(10))) goto LA7;
			pos += ((NI) 2);
		}
		goto LA5;
		LA7: ;
		{
			pos += ((NI) 1);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!((NU8)(buf[pos]) == (NU8)(10))) goto LA11;
		pos += ((NI) 1);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	{
		if (!(*L).skippounds) goto LA15;
		{
			if (!((NU8)(buf[pos]) == (NU8)(35))) goto LA19;
			pos += ((NI) 1);
		}
		LA19: ;
		{
			if (!((NU8)(buf[pos]) == (NU8)(35))) goto LA23;
			pos += ((NI) 1);
		}
		LA23: ;
	}
	LA15: ;
	{
		while (1) {
			switch (((NU8)(buf[pos]))) {
			case 32:
			case 11:
			case 12:
			{
				pos += ((NI) 1);
				result += ((NI) 1);
			}
			break;
			case 9:
			{
				pos += ((NI) 1);
				result = (NI)((NI)(result - ((NI) ((NI)(result % ((NI) 8))))) + ((NI) 8));
			}
			break;
			default:
			{
				goto LA25;
			}
			break;
			}
		}
	} LA25: ;
	{
		if (!((NU8)(buf[pos]) == (NU8)(0))) goto LA32;
		result = ((NI) 0);
	}
	goto LA30;
	LA32: ;
	{
		NIM_BOOL LOC35;
		LOC35 = 0;
		LOC35 = ((NU8)(buf[pos]) == (NU8)(10));
		if (LOC35) goto LA36;
		LOC35 = ((NU8)(buf[pos]) == (NU8)(13));
		LA36: ;
		if (!LOC35) goto LA37;
		result = getindentaux_314200(L, pos);
	}
	goto LA30;
	LA37: ;
	LA30: ;
	(*L).bufpos = pos;
	return result;
}

N_NIMCALL(void, getindent_314282)(Lexer314112* L, Token314108* tok) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	(*tok).col = ((NI) 0);
	(*tok).kind = ((NU8) 1);
	(*tok).ival = getindentaux_314200(L, (*L).bufpos);
	(*L).line += ((NI) 1);
	(*tok).line = (*L).line;
	(*L).col = (*tok).ival;
	(*tok).ival = (((NI)((*tok).ival - (*L).baseindent) >= ((NI) 0)) ? (NI)((*tok).ival - (*L).baseindent) : ((NI) 0));
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nsuRepeatChar(32, ((NI) ((*tok).ival)));
	LOC1 = rawNewString(LOC2->Sup.len + 1);
appendString(LOC1, ((NimStringDesc*) &TMP2631));
appendString(LOC1, LOC2);
	unsureAsgnRef((void**) (&(*tok).symbol), LOC1);
}

N_NIMCALL(void, getadornment_314173)(Lexer314112* L, Token314108* tok) {
	NI pos;
	NIM_CHAR c;
	(*tok).kind = ((NU8) 4);
	(*tok).line = (*L).line;
	(*tok).col = (*L).col;
	pos = (*L).bufpos;
	c = (*L).buf[pos];
	{
		while (1) {
			(*tok).symbol = addChar((*tok).symbol, (*L).buf[pos]);
			pos += ((NI) 1);
			{
				if (!!(((NU8)((*L).buf[pos]) == (NU8)(c)))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*L).col += (NI)(pos - (*L).bufpos);
	(*L).bufpos = pos;
}

N_NIMCALL(void, rawgettok_314301)(Lexer314112* L, Token314108* tok) {
	NIM_CHAR c;
	unsureAsgnRef((void**) (&(*tok).symbol), copyString(((NimStringDesc*) &TMP2245)));
	(*tok).ival = ((NI) 0);
	c = (*L).buf[(*L).bufpos];
	switch (((NU8)(c))) {
	case 97 ... 122:
	case 65 ... 90:
	case 128 ... 255:
	case 48 ... 57:
	{
		getthing_314135(L, tok, TMP2633);
	}
	break;
	case 32:
	case 9:
	case 11:
	case 12:
	{
		getthing_314135(L, tok, TMP2634);
		(*tok).kind = ((NU8) 2);
		{
			if (!(((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(13)) || ((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(10)))) goto LA5;
			rawgettok_314301(L, tok);
		}
		LA5: ;
	}
	break;
	case 13:
	case 10:
	{
		getindent_314282(L, tok);
	}
	break;
	case 33:
	case 34:
	case 35:
	case 36:
	case 37:
	case 38:
	case 39:
	case 40:
	case 41:
	case 42:
	case 43:
	case 44:
	case 45:
	case 46:
	case 47:
	case 58:
	case 59:
	case 60:
	case 61:
	case 62:
	case 63:
	case 64:
	case 91:
	case 92:
	case 93:
	case 94:
	case 95:
	case 96:
	case 123:
	case 124:
	case 125:
	case 126:
	{
		getadornment_314173(L, tok);
		{
			if (!(((*tok).symbol ? (*tok).symbol->Sup.len : 0) <= ((NI) 3))) goto LA11;
			(*tok).kind = ((NU8) 5);
		}
		LA11: ;
	}
	break;
	default:
	{
		(*tok).line = (*L).line;
		(*tok).col = (*L).col;
		{
			if (!((NU8)(c) == (NU8)(0))) goto LA16;
			(*tok).kind = ((NU8) 0);
		}
		goto LA14;
		LA16: ;
		{
			(*tok).kind = ((NU8) 6);
			(*tok).symbol = addChar((*tok).symbol, c);
			(*L).bufpos += ((NI) 1);
			(*L).col += ((NI) 1);
		}
		LA14: ;
	}
	break;
	}
	(*tok).col = (((NI)((*tok).col - (*L).baseindent) >= ((NI) 0)) ? (NI)((*tok).col - (*L).baseindent) : ((NI) 0));
}

N_NIMCALL(NI, gettokens_314342)(NimStringDesc* buffer, NIM_BOOL skippounds, Tokenseq314110** tokens) {
	NI result;
	Lexer314112 L;
	NI length;
	result = 0;
	memset((void*)(&L), 0, sizeof(L));
	L.Sup.m_type = (&NTI314112);
	length = ((*tokens) ? (*tokens)->Sup.len : 0);
	L.buf = buffer->data;
	L.line = ((NI) 0);
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = ((NU8)(L.buf[((NI) 0)]) == (NU8)(239));
		if (!(LOC4)) goto LA5;
		LOC4 = ((NU8)(L.buf[((NI) 1)]) == (NU8)(187));
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA6;
		LOC3 = ((NU8)(L.buf[((NI) 2)]) == (NU8)(191));
		LA6: ;
		if (!LOC3) goto LA7;
		L.bufpos += ((NI) 3);
	}
	LA7: ;
	L.skippounds = skippounds;
	{
		if (!skippounds) goto LA11;
		{
			if (!((NU8)(L.buf[L.bufpos]) == (NU8)(35))) goto LA15;
			L.bufpos += ((NI) 1);
			result += ((NI) 1);
		}
		LA15: ;
		{
			if (!((NU8)(L.buf[L.bufpos]) == (NU8)(35))) goto LA19;
			L.bufpos += ((NI) 1);
			result += ((NI) 1);
		}
		LA19: ;
		L.baseindent = ((NI) 0);
		{
			while (1) {
				if (!((NU8)(L.buf[L.bufpos]) == (NU8)(32))) goto LA22;
				L.bufpos += ((NI) 1);
				L.baseindent += ((NI) 1);
				result += ((NI) 1);
			} LA22: ;
		}
	}
	LA11: ;
	{
		while (1) {
			length += ((NI) 1);
			(*tokens) = (Tokenseq314110*) setLengthSeq(&((*tokens))->Sup, sizeof(Token314108), ((NI) (length)));
			rawgettok_314301((&L), (&(*tokens)->data[(NI)(length - ((NI) 1))]));
			{
				if (!((*tokens)->data[(NI)(length - ((NI) 1))].kind == ((NU8) 0))) goto LA27;
				goto LA23;
			}
			LA27: ;
		}
	} LA23: ;
	{
		if (!((*tokens)->data[((NI) 0)].kind == ((NU8) 2))) goto LA31;
		(*tokens)->data[((NI) 0)].ival = ((*tokens)->data[((NI) 0)].symbol ? (*tokens)->data[((NI) 0)].symbol->Sup.len : 0);
		(*tokens)->data[((NI) 0)].kind = ((NU8) 1);
	}
	LA31: ;
	return result;
}

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

N_NIMCALL(NI, findsub_315014)(Rstparser314482* p, Rstnode313008* n) {
	NI result;
	NimStringDesc* key;
{	result = 0;
	key = addnodes_314052(n);
	{
		NI i_315032;
		NI HEX3Atmp_315046;
		NI res_315049;
		i_315032 = 0;
		HEX3Atmp_315046 = 0;
		HEX3Atmp_315046 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_315049 = ((NI) 0);
		{
			while (1) {
				if (!(res_315049 <= HEX3Atmp_315046)) goto LA3;
				i_315032 = res_315049;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_315032].key)) goto LA6;
					result = i_315032;
					goto BeforeRet;
				}
				LA6: ;
				res_315049 += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NI i_315044;
		NI HEX3Atmp_315054;
		NI res_315057;
		i_315044 = 0;
		HEX3Atmp_315054 = 0;
		HEX3Atmp_315054 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_315057 = ((NI) 0);
		{
			while (1) {
				if (!(res_315057 <= HEX3Atmp_315054)) goto LA10;
				i_315044 = res_315057;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = nsuCmpIgnoreStyle(key, (*(*p).s).subs->data[i_315044].key);
					if (!(LOC13 == ((NI) 0))) goto LA14;
					result = i_315044;
					goto BeforeRet;
				}
				LA14: ;
				res_315057 += ((NI) 1);
			} LA10: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rstmessage_314719)(Rstparser314482* p, NU8 msgkind, NimStringDesc* arg) {
	(*(*p).s).msghandler((*p).filename, (NI)((*p).line + (*p).tok->data[(*p).idx].line), (NI)((*p).col + (*p).tok->data[(*p).idx].col), msgkind, arg);
}

N_NIMCALL(Rstnode313008*, findref_315151)(Rstparser314482* p, NimStringDesc* key) {
	Rstnode313008* result;
{	result = 0;
	{
		NI i_315168;
		NI HEX3Atmp_315170;
		NI res_315173;
		i_315168 = 0;
		HEX3Atmp_315170 = 0;
		HEX3Atmp_315170 = ((*(*p).s).refs ? ((*(*p).s).refs->Sup.len-1) : -1);
		res_315173 = ((NI) 0);
		{
			while (1) {
				if (!(res_315173 <= HEX3Atmp_315170)) goto LA3;
				i_315168 = res_315173;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_315168].key)) goto LA6;
					result = (*(*p).s).refs->data[i_315168].value;
					goto BeforeRet;
				}
				LA6: ;
				res_315173 += ((NI) 1);
			} LA3: ;
		}
	}
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(Rstnode313008*, resolvesubs_320196)(Rstparser314482* p, Rstnode313008* n) {
	Rstnode313008* result;
{	result = 0;
	result = n;
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).kind) {
	case ((NU8) 62):
	{
		NI x;
		x = findsub_315014(p, n);
		{
			if (!(((NI) 0) <= x)) goto LA8;
			result = (*(*p).s).subs->data[x].value;
		}
		goto LA6;
		LA8: ;
		{
			NimStringDesc* key;
			NimStringDesc* e;
			key = addnodes_314052(n);
			e = getenv_125825(key);
			{
				if (!!(((e) && (e)->Sup.len == 0))) goto LA13;
				result = newrstnode_313121(((NU8) 64), e);
			}
			goto LA11;
			LA13: ;
			{
				rstmessage_314719((&(*p)), ((NU8) 7), key);
			}
			LA11: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 39):
	{
		Rstnode313008* y;
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rstnodetorefname_314049(n);
		y = findref_315151(p, LOC17);
		{
			if (!!((y == NIM_NIL))) goto LA20;
			result = newrstnode_313093(((NU8) 38));
			(*n).kind = ((NU8) 0);
			add_313138(result, n);
			add_313138(result, y);
		}
		LA20: ;
	}
	break;
	case ((NU8) 64):
	{
	}
	break;
	case ((NU8) 44):
	{
		(*p).hastoc = NIM_TRUE;
	}
	break;
	default:
	{
		{
			NI i_320241;
			NI HEX3Atmp_320243;
			NI LOC26;
			NI res_320246;
			i_320241 = 0;
			HEX3Atmp_320243 = 0;
			LOC26 = 0;
			LOC26 = len_313081(n);
			HEX3Atmp_320243 = (NI)(LOC26 - ((NI) 1));
			res_320246 = ((NI) 0);
			{
				while (1) {
					if (!(res_320246 <= HEX3Atmp_320243)) goto LA28;
					i_320241 = res_320246;
					asgnRefNoCycle((void**) (&(*n).sons->data[i_320241]), resolvesubs_320196(p, (*n).sons->data[i_320241]));
					res_320246 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, currind_314801)(Rstparser314482* p) {
	NI result;
	result = 0;
	result = (*p).indentstack->data[((*p).indentstack ? ((*p).indentstack->Sup.len-1) : -1)];
	return result;
}

N_NIMCALL(void, pushind_314805)(Rstparser314482* p, NI ind) {
	(*p).indentstack = (TY314503*) incrSeqV2(&((*p).indentstack)->Sup, sizeof(NI));
	(*p).indentstack->data[(*p).indentstack->Sup.len] = ind;
	++(*p).indentstack->Sup.len;
}

N_NIMCALL(void, popind_314820)(Rstparser314482* p) {
	{
		if (!(((NI) 1) < ((*p).indentstack ? (*p).indentstack->Sup.len : 0))) goto LA3;
		(*p).indentstack = (TY314503*) setLengthSeq(&((*p).indentstack)->Sup, sizeof(NI), ((NI) ((NI)(((*p).indentstack ? (*p).indentstack->Sup.len : 0) - ((NI) 1)))));
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, match_315327)(Rstparser314482* p, NI start, NimStringDesc* expr) {
	NIM_BOOL result;
	NI i;
	NI j;
	NI last;
{	result = 0;
	i = ((NI) 0);
	j = start;
	last = (NI)((expr ? expr->Sup.len : 0) - ((NI) 1));
	{
		while (1) {
			if (!(i <= last)) goto LA2;
			switch (((NU8)(expr->data[i]))) {
			case 119:
			{
				result = ((*p).tok->data[j].kind == ((NU8) 3));
			}
			break;
			case 32:
			{
				result = ((*p).tok->data[j].kind == ((NU8) 2));
			}
			break;
			case 105:
			{
				result = ((*p).tok->data[j].kind == ((NU8) 1));
			}
			break;
			case 112:
			{
				result = ((*p).tok->data[j].kind == ((NU8) 5));
			}
			break;
			case 97:
			{
				result = ((*p).tok->data[j].kind == ((NU8) 4));
			}
			break;
			case 111:
			{
				result = ((*p).tok->data[j].kind == ((NU8) 6));
			}
			break;
			case 84:
			{
				result = NIM_TRUE;
			}
			break;
			case 69:
			{
				result = ((7 &(1U<<((NU)((*p).tok->data[j].kind)&7U)))!=0);
			}
			break;
			case 101:
			{
				NIM_BOOL LOC12;
				LOC12 = 0;
				LOC12 = ((*p).tok->data[j].kind == ((NU8) 3));
				if (LOC12) goto LA13;
				LOC12 = eqStrings((*p).tok->data[j].symbol, ((NimStringDesc*) &TMP2635));
				LA13: ;
				result = LOC12;
				{
					if (!result) goto LA16;
					switch (((NU8)((*p).tok->data[j].symbol->data[((NI) 0)]))) {
					case 97 ... 122:
					case 65 ... 90:
					{
						result = (((*p).tok->data[j].symbol ? (*p).tok->data[j].symbol->Sup.len : 0) == ((NI) 1));
					}
					break;
					case 48 ... 57:
					{
						result = allcharsinset_100325((*p).tok->data[j].symbol, TMP2636);
					}
					break;
					default:
					{
					}
					break;
					}
				}
				LA16: ;
			}
			break;
			default:
			{
				NIM_CHAR c;
				NI length;
				NIM_BOOL LOC26;
				NIM_BOOL LOC27;
				c = expr->data[i];
				length = ((NI) 0);
				{
					while (1) {
						NIM_BOOL LOC24;
						LOC24 = 0;
						LOC24 = (i <= last);
						if (!(LOC24)) goto LA25;
						LOC24 = ((NU8)(expr->data[i]) == (NU8)(c));
						LA25: ;
						if (!LOC24) goto LA23;
						i += ((NI) 1);
						length += ((NI) 1);
					} LA23: ;
				}
				i -= ((NI) 1);
				LOC26 = 0;
				LOC27 = 0;
				LOC27 = ((48 &(1U<<((NU)((*p).tok->data[j].kind)&7U)))!=0);
				if (!(LOC27)) goto LA28;
				LOC27 = (((*p).tok->data[j].symbol ? (*p).tok->data[j].symbol->Sup.len : 0) == length);
				LA28: ;
				LOC26 = LOC27;
				if (!(LOC26)) goto LA29;
				LOC26 = ((NU8)((*p).tok->data[j].symbol->data[((NI) 0)]) == (NU8)(c));
				LA29: ;
				result = LOC26;
			}
			break;
			}
			{
				if (!!(result)) goto LA32;
				goto BeforeRet;
			}
			LA32: ;
			j += ((NI) 1);
			i += ((NI) 1);
		} LA2: ;
	}
	result = NIM_TRUE;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, tokenafternewline_317550)(Rstparser314482* p) {
	NI result;
	result = 0;
	result = (*p).idx;
	{
		while (1) {
			switch ((*p).tok->data[result].kind) {
			case ((NU8) 0):
			{
				goto LA1;
			}
			break;
			case ((NU8) 1):
			{
				result += ((NI) 1);
				goto LA1;
			}
			break;
			default:
			{
				result += ((NI) 1);
			}
			break;
			}
		}
	} LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, prednl_317578)(Rstparser314482* p) {
	NIM_BOOL result;
	result = 0;
	result = NIM_TRUE;
	{
		NIM_BOOL LOC5;
		NI LOC7;
		if (!(((NI) 0) < (*p).idx)) goto LA3;
		LOC5 = 0;
		LOC5 = ((*p).tok->data[(NI)((*p).idx - ((NI) 1))].kind == ((NU8) 1));
		if (!(LOC5)) goto LA6;
		LOC7 = 0;
		LOC7 = currind_314801(p);
		LOC5 = ((*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival == LOC7);
		LA6: ;
		result = LOC5;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, islineblock_317573)(Rstparser314482* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_317550(p);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*p).tok->data[(*p).idx].col == (*p).tok->data[j].col);
	if (!(LOC2)) goto LA3;
	LOC2 = eqStrings((*p).tok->data[j].symbol, ((NimStringDesc*) &TMP2645));
	LA3: ;
	LOC1 = LOC2;
	if (LOC1) goto LA4;
	LOC1 = ((*p).tok->data[(*p).idx].col < (*p).tok->data[j].col);
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, rstmessage_314731)(Rstparser314482* p, NU8 msgkind) {
	(*(*p).s).msghandler((*p).filename, (NI)((*p).line + (*p).tok->data[(*p).idx].line), (NI)((*p).col + (*p).tok->data[(*p).idx].col), msgkind, (*p).tok->data[(*p).idx].symbol);
}

N_NIMCALL(NIM_BOOL, isdeflist_317591)(Rstparser314482* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_317550(p);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*p).tok->data[(*p).idx].col < (*p).tok->data[j].col);
	if (!(LOC2)) goto LA3;
	LOC2 = ((104 &(1U<<((NU)((*p).tok->data[j].kind)&7U)))!=0);
	LA3: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA4;
	LOC1 = !(eqStrings((*p).tok->data[(NI)(j - ((NI) 2))].symbol, ((NimStringDesc*) &TMP2641)));
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, isoptionlist_317607)(Rstparser314482* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2650));
	if (LOC3) goto LA4;
	LOC3 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2651));
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2652));
	LA5: ;
	LOC1 = LOC2;
	if (LOC1) goto LA6;
	LOC1 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2653));
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, whichsection_317611)(Rstparser314482* p) {
	NU8 result;
	result = 0;
	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 4):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_315327(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2637));
			if (!LOC4) goto LA5;
			result = ((NU8) 3);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = match_315327(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2638));
			if (!LOC8) goto LA9;
			result = ((NU8) 29);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = match_315327(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2639));
			if (!LOC12) goto LA13;
			result = ((NU8) 2);
		}
		goto LA2;
		LA13: ;
		{
			result = ((NU8) 64);
		}
		LA2: ;
	}
	break;
	case ((NU8) 5):
	{
		{
			NI LOC19;
			NIM_BOOL LOC20;
			LOC19 = 0;
			LOC19 = tokenafternewline_317550(p);
			LOC20 = 0;
			LOC20 = match_315327(p, LOC19, ((NimStringDesc*) &TMP2640));
			if (!LOC20) goto LA21;
			result = ((NU8) 1);
		}
		goto LA17;
		LA21: ;
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2641))) goto LA24;
			result = ((NU8) 24);
		}
		goto LA17;
		LA24: ;
		{
			NIM_BOOL LOC27;
			NIM_BOOL LOC28;
			NIM_BOOL LOC30;
			NIM_BOOL LOC31;
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = prednl_317578(p);
			if (!(LOC28)) goto LA29;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2642));
			if (LOC31) goto LA32;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2643));
			LA32: ;
			LOC30 = LOC31;
			if (LOC30) goto LA33;
			LOC30 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2644));
			LA33: ;
			LOC28 = LOC30;
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA34;
			LOC27 = ((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 2));
			LA34: ;
			if (!LOC27) goto LA35;
			result = ((NU8) 5);
		}
		goto LA17;
		LA35: ;
		{
			NIM_BOOL LOC38;
			LOC38 = 0;
			LOC38 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2645));
			if (!(LOC38)) goto LA39;
			LOC38 = islineblock_317573(p);
			LA39: ;
			if (!LOC38) goto LA40;
			result = ((NU8) 26);
		}
		goto LA17;
		LA40: ;
		{
			NIM_BOOL LOC43;
			LOC43 = 0;
			LOC43 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2646));
			if (!(LOC43)) goto LA44;
			LOC43 = prednl_317578(p);
			LA44: ;
			if (!LOC43) goto LA45;
			result = ((NU8) 40);
		}
		goto LA17;
		LA45: ;
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2647));
			if (!(LOC48)) goto LA49;
			LOC48 = prednl_317578(p);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 13);
		}
		goto LA17;
		LA50: ;
		{
			NIM_BOOL LOC53;
			LOC53 = 0;
			LOC53 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2648));
			if (!LOC53) goto LA54;
			result = ((NU8) 7);
		}
		goto LA17;
		LA54: ;
		{
			NIM_BOOL LOC57;
			LOC57 = 0;
			LOC57 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2649));
			if (!LOC57) goto LA58;
			result = ((NU8) 30);
			rstmessage_314731(p, ((NU8) 2));
		}
		goto LA17;
		LA58: ;
		{
			NIM_BOOL LOC61;
			LOC61 = 0;
			LOC61 = isdeflist_317591(p);
			if (!LOC61) goto LA62;
			result = ((NU8) 9);
		}
		goto LA17;
		LA62: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = isoptionlist_317607(p);
			if (!LOC65) goto LA66;
			result = ((NU8) 17);
		}
		goto LA17;
		LA66: ;
		{
			result = ((NU8) 4);
		}
		LA17: ;
	}
	break;
	case ((NU8) 3):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		{
			NI LOC72;
			NIM_BOOL LOC73;
			LOC72 = 0;
			LOC72 = tokenafternewline_317550(p);
			LOC73 = 0;
			LOC73 = match_315327(p, LOC72, ((NimStringDesc*) &TMP2640));
			if (!LOC73) goto LA74;
			result = ((NU8) 1);
		}
		goto LA70;
		LA74: ;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2654));
			if (LOC77) goto LA78;
			LOC77 = match_315327(p, (*p).idx, ((NimStringDesc*) &TMP2655));
			LA78: ;
			if (!LOC77) goto LA79;
			result = ((NU8) 7);
		}
		goto LA70;
		LA79: ;
		{
			NIM_BOOL LOC82;
			LOC82 = 0;
			LOC82 = isdeflist_317591(p);
			if (!LOC82) goto LA83;
			result = ((NU8) 9);
		}
		goto LA70;
		LA83: ;
		{
			result = ((NU8) 4);
		}
		LA70: ;
	}
	break;
	default:
	{
		result = ((NU8) 64);
	}
	break;
	}
	return result;
}

N_NIMCALL(Rstnode313008*, parseliteralblock_317468)(Rstparser314482* p) {
	Rstnode313008* result;
	Rstnode313008* n;
	result = 0;
	result = newrstnode_313093(((NU8) 24));
	n = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2245));
	{
		NI indent;
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA3;
		indent = (*p).tok->data[(*p).idx].ival;
		(*p).idx += ((NI) 1);
		{
			while (1) {
				switch ((*p).tok->data[(*p).idx].kind) {
				case ((NU8) 0):
				{
					goto LA5;
				}
				break;
				case ((NU8) 1):
				{
					{
						if (!((*p).tok->data[(*p).idx].ival < indent)) goto LA11;
						goto LA5;
					}
					goto LA9;
					LA11: ;
					{
						NimStringDesc* LOC14;
						(*n).text = resizeString((*n).text, 1);
appendString((*n).text, ((NimStringDesc*) &TMP2631));
						LOC14 = 0;
						LOC14 = nsuRepeatChar(32, ((NI) ((NI)((*p).tok->data[(*p).idx].ival - indent))));
						(*n).text = resizeString((*n).text, LOC14->Sup.len + 0);
appendString((*n).text, LOC14);
						(*p).idx += ((NI) 1);
					}
					LA9: ;
				}
				break;
				default:
				{
					(*n).text = resizeString((*n).text, (*p).tok->data[(*p).idx].symbol->Sup.len + 0);
appendString((*n).text, (*p).tok->data[(*p).idx].symbol);
					(*p).idx += ((NI) 1);
				}
				break;
				}
			}
		} LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			while (1) {
				if (!!(((3 &(1U<<((NU)((*p).tok->data[(*p).idx].kind)&7U)))!=0))) goto LA18;
				(*n).text = resizeString((*n).text, (*p).tok->data[(*p).idx].symbol->Sup.len + 0);
appendString((*n).text, (*p).tok->data[(*p).idx].symbol);
				(*p).idx += ((NI) 1);
			} LA18: ;
		}
	}
	LA1: ;
	add_313138(result, n);
	return result;
}

N_NIMCALL(Rstnode313008*, parsebulletlist_318668)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = NIM_NIL;
	{
		NimStringDesc* bullet;
		NI col;
		if (!((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 2))) goto LA3;
		bullet = copyString((*p).tok->data[(*p).idx].symbol);
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_313093(((NU8) 5));
		pushind_314805(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Rstnode313008* item;
				item = newrstnode_313093(((NU8) 6));
				parsesection_316696(p, item);
				add_313138(result, item);
				{
					NIM_BOOL LOC9;
					NIM_BOOL LOC10;
					NIM_BOOL LOC11;
					LOC9 = 0;
					LOC10 = 0;
					LOC11 = 0;
					LOC11 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC11)) goto LA12;
					LOC11 = ((*p).tok->data[(*p).idx].ival == col);
					LA12: ;
					LOC10 = LOC11;
					if (!(LOC10)) goto LA13;
					LOC10 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, bullet);
					LA13: ;
					LOC9 = LOC10;
					if (!(LOC9)) goto LA14;
					LOC9 = ((*p).tok->data[(NI)((*p).idx + ((NI) 2))].kind == ((NU8) 2));
					LA14: ;
					if (!LOC9) goto LA15;
					(*p).idx += ((NI) 3);
				}
				goto LA7;
				LA15: ;
				{
					goto LA5;
				}
				LA7: ;
			}
		} LA5: ;
		popind_314820(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(Rstnode313008*, parselineblock_317624)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = NIM_NIL;
	{
		NI col;
		if (!((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 2))) goto LA3;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_313093(((NU8) 26));
		pushind_314805(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Rstnode313008* item;
				item = newrstnode_313093(((NU8) 27));
				parsesection_316696(p, item);
				add_313138(result, item);
				{
					NIM_BOOL LOC9;
					NIM_BOOL LOC10;
					NIM_BOOL LOC11;
					LOC9 = 0;
					LOC10 = 0;
					LOC11 = 0;
					LOC11 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC11)) goto LA12;
					LOC11 = ((*p).tok->data[(*p).idx].ival == col);
					LA12: ;
					LOC10 = LOC11;
					if (!(LOC10)) goto LA13;
					LOC10 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2645));
					LA13: ;
					LOC9 = LOC10;
					if (!(LOC9)) goto LA14;
					LOC9 = ((*p).tok->data[(NI)((*p).idx + ((NI) 2))].kind == ((NU8) 2));
					LA14: ;
					if (!LOC9) goto LA15;
					(*p).idx += ((NI) 3);
				}
				goto LA7;
				LA15: ;
				{
					goto LA5;
				}
				LA7: ;
			}
		} LA5: ;
		popind_314820(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdirective_316436)(Rstparser314482* p) {
	NimStringDesc* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI j;
		LOC3 = 0;
		LOC3 = ((*p).tok->data[(*p).idx].kind == ((NU8) 2));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 3));
		LA4: ;
		if (!LOC3) goto LA5;
		j = (*p).idx;
		(*p).idx += ((NI) 1);
		result = copyString((*p).tok->data[(*p).idx].symbol);
		(*p).idx += ((NI) 1);
		{
			while (1) {
				if (!((120 &(1U<<((NU)((*p).tok->data[(*p).idx].kind)&7U)))!=0)) goto LA8;
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2641))) goto LA11;
					goto LA7;
				}
				LA11: ;
				result = resizeString(result, (*p).tok->data[(*p).idx].symbol->Sup.len + 0);
appendString(result, (*p).tok->data[(*p).idx].symbol);
				(*p).idx += ((NI) 1);
			} LA8: ;
		} LA7: ;
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA15;
			(*p).idx += ((NI) 1);
		}
		LA15: ;
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2641))) goto LA19;
			(*p).idx += ((NI) 1);
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA23;
				(*p).idx += ((NI) 1);
			}
			LA23: ;
		}
		goto LA17;
		LA19: ;
		{
			(*p).idx = j;
			result = copyString(((NimStringDesc*) &TMP2245));
		}
		LA17: ;
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP2245));
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, find_316634)(TY316626 a, NimStringDesc* item) {
	NI result;
{	result = 0;
	{
		NimStringDesc* i_316669;
		NI i_316682;
		i_316669 = 0;
		i_316682 = ((NI) 0);
		{
			if (!(((NI) (i_316682)) <= ((NI) 12))) goto LA4;
			{
				while (1) {
					i_316669 = a[(i_316682)- 0];
					{
						if (!eqStrings(i_316669, item)) goto LA10;
						goto BeforeRet;
					}
					LA10: ;
					result += ((NI) 1);
					{
						if (!(((NI) 12) <= ((NI) (i_316682)))) goto LA14;
						goto LA6;
					}
					LA14: ;
					i_316682 += ((NI) 1);
				}
			} LA6: ;
		}
		LA4: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, getdirkind_316629)(NimStringDesc* s) {
	NU8 result;
	NI i;
	result = 0;
	i = find_316634(Dirids_316624, s);
	{
		if (!(((NI) 0) <= i)) goto LA3;
		result = ((NU8) (i));
	}
	goto LA1;
	LA3: ;
	{
		result = ((NU8) 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode313008*, newleaf_315177)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = newrstnode_313121(((NU8) 64), (*p).tok->data[(*p).idx].symbol);
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupstart_315286)(Rstparser314482* p, NimStringDesc* markup) {
	NIM_BOOL result;
	NIM_CHAR d;
	NIM_BOOL LOC5;
	NIM_BOOL LOC6;
{	result = 0;
	d = 0;
	result = eqStrings((*p).tok->data[(*p).idx].symbol, markup);
	{
		if (!!(result)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC6 = 0;
	LOC6 = ((*p).idx == ((NI) 0));
	if (LOC6) goto LA7;
	LOC6 = ((6 &(1U<<((NU)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].kind)&7U)))!=0);
	LA7: ;
	LOC5 = LOC6;
	if (LOC5) goto LA8;
	LOC5 = ((TMP2668[(NU)(((NU8)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 0)])))>>3] &(1U<<((NU)(((NU8)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 0)])))&7U)))!=0);
	LA8: ;
	result = LOC5;
	{
		if (!!(result)) goto LA11;
		goto BeforeRet;
	}
	LA11: ;
	result = !(((7 &(1U<<((NU)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7U)))!=0));
	{
		if (!!(result)) goto LA15;
		goto BeforeRet;
	}
	LA15: ;
	{
		if (!(((NI) 0) < (*p).idx)) goto LA19;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2669))) goto LA23;
			result = NIM_FALSE;
		}
		goto LA21;
		LA23: ;
		{
			NIM_CHAR c;
			c = (*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 0)];
			switch (((NU8)(c))) {
			case 39:
			case 34:
			{
				d = c;
			}
			break;
			case 40:
			{
				d = 41;
			}
			break;
			case 91:
			{
				d = 93;
			}
			break;
			case 123:
			{
				d = 125;
			}
			break;
			case 60:
			{
				d = 62;
			}
			break;
			default:
			{
				d = 0;
			}
			break;
			}
			{
				if (!!(((NU8)(d) == (NU8)(0)))) goto LA34;
				result = !(((NU8)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)]) == (NU8)(d)));
			}
			LA34: ;
		}
		LA21: ;
	}
	LA19: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupend_315248)(Rstparser314482* p, NimStringDesc* markup) {
	NIM_BOOL result;
	NIM_BOOL LOC9;
{	result = 0;
	result = eqStrings((*p).tok->data[(*p).idx].symbol, markup);
	{
		if (!!(result)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = !(((6 &(1U<<((NU)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].kind)&7U)))!=0));
	{
		if (!!(result)) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	LOC9 = 0;
	LOC9 = ((7 &(1U<<((NU)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7U)))!=0);
	if (LOC9) goto LA10;
	LOC9 = ((TMP2671[(NU)(((NU8)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)])))>>3] &(1U<<((NU)(((NU8)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)])))&7U)))!=0);
	LA10: ;
	result = LOC9;
	{
		if (!!(result)) goto LA13;
		goto BeforeRet;
	}
	LA13: ;
	{
		if (!(((NI) 0) < (*p).idx)) goto LA17;
		{
			NIM_BOOL LOC21;
			LOC21 = 0;
			LOC21 = !(eqStrings(markup, ((NimStringDesc*) &TMP2672)));
			if (!(LOC21)) goto LA22;
			LOC21 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2669));
			LA22: ;
			if (!LOC21) goto LA23;
			result = NIM_FALSE;
		}
		LA23: ;
	}
	LA17: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, parsebackslash_315896)(Rstparser314482* p, Rstnode313008* father) {
	{
		Rstnode313008* LOC5;
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2673))) goto LA3;
		LOC5 = 0;
		LOC5 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2669));
		add_313138(father, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2669))) goto LA7;
		(*p).idx += ((NI) 1);
		{
			Rstnode313008* LOC13;
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 2)))) goto LA11;
			LOC13 = 0;
			LOC13 = newleaf_315177(p);
			add_313138(father, LOC13);
		}
		LA11: ;
		{
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA16;
			(*p).idx += ((NI) 1);
		}
		LA16: ;
	}
	goto LA1;
	LA7: ;
	{
		Rstnode313008* LOC19;
		LOC19 = 0;
		LOC19 = newleaf_315177(p);
		add_313138(father, LOC19);
		(*p).idx += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, rstmessage_314724)(Rstparser314482* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col) {
	(*(*p).s).msghandler((*p).filename, (NI)((*p).line + line), (NI)((*p).col + col), msgkind, arg);
}

N_NIMCALL(void, parseuntil_316201)(Rstparser314482* p, Rstnode313008* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash) {
	NI line;
	NI col;
	line = (*p).tok->data[(*p).idx].line;
	col = (*p).tok->data[(*p).idx].col;
	(*p).idx += ((NI) 1);
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 5):
			{
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = isinlinemarkupend_315248((&(*p)), postfix);
					if (!LOC6) goto LA7;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA4;
				LA7: ;
				{
					if (!interpretbackslash) goto LA10;
					parsebackslash_315896(p, father);
				}
				goto LA4;
				LA10: ;
				{
					Rstnode313008* LOC13;
					LOC13 = 0;
					LOC13 = newleaf_315177(p);
					add_313138(father, LOC13);
					(*p).idx += ((NI) 1);
				}
				LA4: ;
			}
			break;
			case ((NU8) 4):
			case ((NU8) 3):
			case ((NU8) 6):
			{
				Rstnode313008* LOC15;
				LOC15 = 0;
				LOC15 = newleaf_315177(p);
				add_313138(father, LOC15);
				(*p).idx += ((NI) 1);
			}
			break;
			case ((NU8) 1):
			{
				Rstnode313008* LOC17;
				LOC17 = 0;
				LOC17 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2674));
				add_313138(father, LOC17);
				(*p).idx += ((NI) 1);
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA20;
					rstmessage_314724((&(*p)), ((NU8) 1), postfix, line, col);
					goto LA1;
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			{
				Rstnode313008* LOC23;
				LOC23 = 0;
				LOC23 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2674));
				add_313138(father, LOC23);
				(*p).idx += ((NI) 1);
			}
			break;
			default:
			{
				rstmessage_314724((&(*p)), ((NU8) 1), postfix, line, col);
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(Rstnode313008*, parsemarkdowncodeblock_316274)(Rstparser314482* p) {
	Rstnode313008* result;
	Rstnode313008* args;
	Rstnode313008* n;
	Rstnode313008* lb;
	result = 0;
	args = newrstnode_313093(((NU8) 41));
	{
		Rstnode313008* LOC5;
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA3;
		LOC5 = 0;
		LOC5 = newleaf_315177(p);
		add_313138(args, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		args = NIM_NIL;
	}
	LA1: ;
	n = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2245));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 0):
			{
				rstmessage_314719((&(*p)), ((NU8) 1), ((NimStringDesc*) &TMP2676));
				goto LA7;
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2676))) goto LA13;
					(*p).idx += ((NI) 1);
					goto LA7;
				}
				goto LA11;
				LA13: ;
				{
					(*n).text = resizeString((*n).text, (*p).tok->data[(*p).idx].symbol->Sup.len + 0);
appendString((*n).text, (*p).tok->data[(*p).idx].symbol);
					(*p).idx += ((NI) 1);
				}
				LA11: ;
			}
			break;
			default:
			{
				(*n).text = resizeString((*n).text, (*p).tok->data[(*p).idx].symbol->Sup.len + 0);
appendString((*n).text, (*p).tok->data[(*p).idx].symbol);
				(*p).idx += ((NI) 1);
			}
			break;
			}
		}
	} LA7: ;
	lb = newrstnode_313093(((NU8) 24));
	add_313138(lb, n);
	result = newrstnode_313093(((NU8) 47));
	add_313138(result, args);
	add_313138(result, NIM_NIL);
	add_313138(result, lb);
	return result;
}

N_NIMCALL(void, fixupembeddedref_315471)(Rstnode313008* n, Rstnode313008* a, Rstnode313008* b) {
	NI sep;
	NI incr;
	sep = ((NI) -1);
	{
		NI i_315487;
		NI HEX3Atmp_315514;
		NI LOC2;
		NI res_315517;
		i_315487 = 0;
		HEX3Atmp_315514 = 0;
		LOC2 = 0;
		LOC2 = len_313081(n);
		HEX3Atmp_315514 = (NI)(LOC2 - ((NI) 2));
		res_315517 = HEX3Atmp_315514;
		{
			while (1) {
				if (!(((NI) 0) <= res_315517)) goto LA4;
				i_315487 = res_315517;
				{
					if (!eqStrings((*(*n).sons->data[i_315487]).text, ((NimStringDesc*) &TMP2681))) goto LA7;
					sep = i_315487;
					goto LA1;
				}
				LA7: ;
				res_315517 -= ((NI) 1);
			} LA4: ;
		}
	} LA1: ;
	{
		NIM_BOOL LOC11;
		LOC11 = 0;
		LOC11 = (((NI) 0) < sep);
		if (!(LOC11)) goto LA12;
		LOC11 = ((NU8)((*(*n).sons->data[(NI)(sep - ((NI) 1))]).text->data[((NI) 0)]) == (NU8)(32));
		LA12: ;
		if (!LOC11) goto LA13;
		incr = ((NI) 2);
	}
	goto LA9;
	LA13: ;
	{
		incr = ((NI) 1);
	}
	LA9: ;
	{
		NI i_315500;
		NI HEX3Atmp_315522;
		NI res_315525;
		i_315500 = 0;
		HEX3Atmp_315522 = 0;
		HEX3Atmp_315522 = (NI)(sep - incr);
		res_315525 = ((NI) 0);
		{
			while (1) {
				if (!(res_315525 <= HEX3Atmp_315522)) goto LA18;
				i_315500 = res_315525;
				add_313138(a, (*n).sons->data[i_315500]);
				res_315525 += ((NI) 1);
			} LA18: ;
		}
	}
	{
		NI i_315512;
		NI HEX3Atmp_315530;
		NI HEX3Atmp_315531;
		NI LOC20;
		NI res_315534;
		i_315512 = 0;
		HEX3Atmp_315530 = 0;
		HEX3Atmp_315531 = 0;
		HEX3Atmp_315530 = (NI)(sep + ((NI) 1));
		LOC20 = 0;
		LOC20 = len_313081(n);
		HEX3Atmp_315531 = (NI)(LOC20 - ((NI) 2));
		res_315534 = HEX3Atmp_315530;
		{
			while (1) {
				if (!(res_315534 <= HEX3Atmp_315531)) goto LA22;
				i_315512 = res_315534;
				add_313138(b, (*n).sons->data[i_315512]);
				res_315534 += ((NI) 1);
			} LA22: ;
		}
	}
}

N_NIMCALL(void, setref_315106)(Rstparser314482* p, NimStringDesc* key, Rstnode313008* value) {
	NI length;
	NimStringDesc* LOC14;
{	length = ((*(*p).s).refs ? (*(*p).s).refs->Sup.len : 0);
	{
		NI i_315132;
		NI HEX3Atmp_315144;
		NI res_315147;
		i_315132 = 0;
		HEX3Atmp_315144 = 0;
		HEX3Atmp_315144 = (NI)(length - ((NI) 1));
		res_315147 = ((NI) 0);
		{
			while (1) {
				if (!(res_315147 <= HEX3Atmp_315144)) goto LA3;
				i_315132 = res_315147;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_315132].key)) goto LA6;
					{
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						LOC10 = 0;
						LOC10 = addnodes_314052((*(*p).s).refs->data[i_315132].value);
						LOC11 = 0;
						LOC11 = addnodes_314052(value);
						if (!!(eqStrings(LOC10, LOC11))) goto LA12;
						rstmessage_314719((&(*p)), ((NU8) 6), key);
					}
					LA12: ;
					asgnRefNoCycle((void**) (&(*(*p).s).refs->data[i_315132].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_315147 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).refs = (TY314492*) setLengthSeq(&((*(*p).s).refs)->Sup, sizeof(Substitution314476), ((NI) ((NI)(length + ((NI) 1)))));
	LOC14 = 0;
	LOC14 = (*(*p).s).refs->data[length].key; (*(*p).s).refs->data[length].key = copyStringRC1(key);
	if (LOC14) nimGCunrefNoCycle(LOC14);
	asgnRefNoCycle((void**) (&(*(*p).s).refs->data[length].value), value);
	}BeforeRet: ;
}

N_NIMCALL(Rstnode313008*, parsepostfix_315538)(Rstparser314482* p, Rstnode313008* n) {
	Rstnode313008* result;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isinlinemarkupend_315248((&(*p)), ((NimStringDesc*) &TMP2678));
		if (LOC3) goto LA4;
		LOC3 = isinlinemarkupend_315248((&(*p)), ((NimStringDesc*) &TMP2679));
		LA4: ;
		if (!LOC3) goto LA5;
		(*p).idx += ((NI) 1);
		{
			NIM_BOOL LOC9;
			Rstnode313008* a;
			Rstnode313008* b;
			LOC9 = 0;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 2))].symbol, ((NimStringDesc*) &TMP2677));
			if (!(LOC9)) goto LA10;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 3))].symbol, ((NimStringDesc*) &TMP2680));
			LA10: ;
			if (!LOC9) goto LA11;
			a = newrstnode_313093(((NU8) 0));
			b = newrstnode_313093(((NU8) 0));
			fixupembeddedref_315471(n, a, b);
			{
				NI LOC15;
				LOC15 = 0;
				LOC15 = len_313081(a);
				if (!(LOC15 == ((NI) 0))) goto LA16;
				result = newrstnode_313093(((NU8) 37));
				add_313138(result, b);
			}
			goto LA13;
			LA16: ;
			{
				NimStringDesc* LOC19;
				result = newrstnode_313093(((NU8) 38));
				add_313138(result, a);
				add_313138(result, b);
				LOC19 = 0;
				LOC19 = rstnodetorefname_314049(a);
				setref_315106(p, LOC19, b);
			}
			LA13: ;
		}
		goto LA7;
		LA11: ;
		{
			if (!((*n).kind == ((NU8) 60))) goto LA21;
			(*n).kind = ((NU8) 39);
		}
		goto LA7;
		LA21: ;
		{
			result = newrstnode_313093(((NU8) 39));
			add_313138(result, n);
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC25;
		LOC25 = 0;
		LOC25 = match_315327((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2647));
		if (!LOC25) goto LA26;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2682))) goto LA30;
			(*n).kind = ((NU8) 56);
		}
		goto LA28;
		LA30: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2683))) goto LA33;
			(*n).kind = ((NU8) 61);
		}
		goto LA28;
		LA33: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2684))) goto LA36;
			(*n).kind = ((NU8) 58);
		}
		goto LA28;
		LA36: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2685))) goto LA39;
			(*n).kind = ((NU8) 57);
		}
		goto LA28;
		LA39: ;
		{
			NIM_BOOL LOC42;
			LOC42 = 0;
			LOC42 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2686));
			if (LOC42) goto LA43;
			LOC42 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2687));
			LA43: ;
			if (!LOC42) goto LA44;
			(*n).kind = ((NU8) 54);
		}
		goto LA28;
		LA44: ;
		{
			NIM_BOOL LOC47;
			LOC47 = 0;
			LOC47 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2688));
			if (LOC47) goto LA48;
			LOC47 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2689));
			LA48: ;
			if (!LOC47) goto LA49;
			(*n).kind = ((NU8) 55);
		}
		goto LA28;
		LA49: ;
		{
			Rstnode313008* LOC52;
			result = newrstnode_313093(((NU8) 53));
			(*n).kind = ((NU8) 0);
			add_313138(result, n);
			LOC52 = 0;
			LOC52 = newrstnode_313121(((NU8) 64), (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol);
			add_313138(result, LOC52);
		}
		LA28: ;
		(*p).idx += ((NI) 3);
	}
	goto LA1;
	LA26: ;
	LA1: ;
	return result;
}

N_NIMCALL(NI, matchverbatim_315573)(Rstparser314482* p, NI start, NimStringDesc* expr) {
	NI result;
	NI j;
	result = 0;
	result = start;
	j = ((NI) 0);
	{
		while (1) {
			NIM_BOOL LOC3;
			NIM_BOOL LOC4;
			LOC3 = 0;
			LOC4 = 0;
			LOC4 = (j < (expr ? expr->Sup.len : 0));
			if (!(LOC4)) goto LA5;
			LOC4 = (result < ((*p).tok ? (*p).tok->Sup.len : 0));
			LA5: ;
			LOC3 = LOC4;
			if (!(LOC3)) goto LA6;
			LOC3 = nsuContinuesWith(expr, (*p).tok->data[result].symbol, ((NI) (j)));
			LA6: ;
			if (!LOC3) goto LA2;
			j += ((*p).tok->data[result].symbol ? (*p).tok->data[result].symbol->Sup.len : 0);
			result += ((NI) 1);
		} LA2: ;
	}
	{
		if (!(j < (expr ? expr->Sup.len : 0))) goto LA9;
		result = ((NI) 0);
	}
	LA9: ;
	return result;
}

N_NIMCALL(Rstnode313008*, parsesmiley_315607)(Rstparser314482* p) {
	Rstnode313008* result;
{	result = 0;
	{
		if (!!((((NU8)((*p).tok->data[(*p).idx].symbol->data[((NI) 0)])) == ((NU8)(58)) || ((NU8)((*p).tok->data[(*p).idx].symbol->data[((NI) 0)])) == ((NU8)(59)) || ((NU8)((*p).tok->data[(*p).idx].symbol->data[((NI) 0)])) == ((NU8)(56))))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		NimStringDesc* key_315649;
		NimStringDesc* val_315650;
		NI i_315655;
		key_315649 = 0;
		val_315650 = 0;
		i_315655 = ((NI) 0);
		{
			if (!(((NI) (i_315655)) <= ((NI) 33))) goto LA8;
			{
				while (1) {
					NI m;
					key_315649 = copyString(Smilies_314068[(i_315655)- 0].Field0);
					val_315650 = copyString(Smilies_314068[(i_315655)- 0].Field1);
					m = matchverbatim_315573((&(*p)), (*p).idx, key_315649);
					{
						NimStringDesc* LOC16;
						if (!(((NI) 0) < m)) goto LA14;
						(*p).idx = m;
						result = newrstnode_313093(((NU8) 63));
						LOC16 = 0;
						LOC16 = (*result).text; (*result).text = copyStringRC1(val_315650);
						if (LOC16) nimGCunrefNoCycle(LOC16);
						goto BeforeRet;
					}
					LA14: ;
					{
						if (!(((NI) 33) <= ((NI) (i_315655)))) goto LA19;
						goto LA10;
					}
					LA19: ;
					i_315655 += ((NI) 1);
				}
			} LA10: ;
		}
		LA8: ;
	}
	}BeforeRet: ;
	return result;
}

static N_INLINE(NI, find_315829)(NimStringDesc** a, NI aLen0, NimStringDesc* item) {
	NI result;
{	result = 0;
	{
		NimStringDesc* i_315845;
		NI i_315858;
		i_315845 = 0;
		i_315858 = ((NI) 0);
		{
			while (1) {
				if (!(i_315858 < aLen0)) goto LA3;
				i_315845 = a[i_315858];
				{
					if (!eqStrings(i_315845, item)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				result += ((NI) 1);
				i_315858 += ((NI) 1);
			} LA3: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, contains_315819)(NimStringDesc** a, NI aLen0, NimStringDesc* item) {
	NIM_BOOL result;
	NI LOC1;
{	result = 0;
	LOC1 = 0;
	LOC1 = find_315829(a, aLen0, item);
	result = (((NI) 0) <= LOC1);
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isurl_315801)(Rstparser314482* p, NI i) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = eqStrings((*p).tok->data[(NI)(i + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2748));
	if (!(LOC3)) goto LA4;
	LOC3 = eqStrings((*p).tok->data[(NI)(i + ((NI) 2))].symbol, ((NimStringDesc*) &TMP2749));
	LA4: ;
	LOC2 = LOC3;
	if (!(LOC2)) goto LA5;
	LOC2 = ((*p).tok->data[(NI)(i + ((NI) 3))].kind == ((NU8) 3));
	LA5: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA6;
	LOC1 = contains_315819(TMP2750, 5, (*p).tok->data[i].symbol);
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseurl_315859)(Rstparser314482* p, Rstnode313008* father) {
	{
		NIM_BOOL LOC3;
		Rstnode313008* n;
		LOC3 = 0;
		LOC3 = isurl_315801((&(*p)), (*p).idx);
		if (!LOC3) goto LA4;
		n = newrstnode_313093(((NU8) 37));
		{
			while (1) {
				Rstnode313008* LOC15;
				switch ((*p).tok->data[(*p).idx].kind) {
				case ((NU8) 3):
				case ((NU8) 4):
				case ((NU8) 6):
				{
				}
				break;
				case ((NU8) 5):
				{
					{
						if (!!(((120 &(1U<<((NU)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7U)))!=0))) goto LA12;
						goto LA6;
					}
					LA12: ;
				}
				break;
				default:
				{
					goto LA6;
				}
				break;
				}
				LOC15 = 0;
				LOC15 = newleaf_315177(p);
				add_313138(n, LOC15);
				(*p).idx += ((NI) 1);
			}
		} LA6: ;
		add_313138(father, n);
	}
	goto LA1;
	LA4: ;
	{
		Rstnode313008* n;
		n = newleaf_315177(p);
		(*p).idx += ((NI) 1);
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2678))) goto LA19;
			n = parsepostfix_315538(p, n);
		}
		LA19: ;
		add_313138(father, n);
	}
	LA1: ;
}

N_NIMCALL(void, parseinline_316328)(Rstparser314482* p, Rstnode313008* father) {
{	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			Rstnode313008* n;
			LOC4 = 0;
			LOC4 = isinlinemarkupstart_315286((&(*p)), ((NimStringDesc*) &TMP2670));
			if (!LOC4) goto LA5;
			n = newrstnode_313093(((NU8) 59));
			parseuntil_316201(p, n, ((NimStringDesc*) &TMP2670), NIM_TRUE);
			add_313138(father, n);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			Rstnode313008* n;
			LOC8 = 0;
			LOC8 = isinlinemarkupstart_315286((&(*p)), ((NimStringDesc*) &TMP2675));
			if (!LOC8) goto LA9;
			n = newrstnode_313093(((NU8) 58));
			parseuntil_316201(p, n, ((NimStringDesc*) &TMP2675), NIM_TRUE);
			add_313138(father, n);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			Rstnode313008* n;
			LOC12 = 0;
			LOC12 = isinlinemarkupstart_315286((&(*p)), ((NimStringDesc*) &TMP2643));
			if (!LOC12) goto LA13;
			n = newrstnode_313093(((NU8) 57));
			parseuntil_316201(p, n, ((NimStringDesc*) &TMP2643), NIM_TRUE);
			add_313138(father, n);
		}
		goto LA2;
		LA13: ;
		{
			NIM_BOOL LOC16;
			Rstnode313008* LOC20;
			LOC16 = 0;
			LOC16 = (((*(*p).s).options &(1U<<((NU)(((NU8) 3))&7U)))!=0);
			if (!(LOC16)) goto LA17;
			LOC16 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2676));
			LA17: ;
			if (!LOC16) goto LA18;
			(*p).idx += ((NI) 1);
			LOC20 = 0;
			LOC20 = parsemarkdowncodeblock_316274(p);
			add_313138(father, LOC20);
		}
		goto LA2;
		LA18: ;
		{
			NIM_BOOL LOC22;
			Rstnode313008* n;
			LOC22 = 0;
			LOC22 = isinlinemarkupstart_315286((&(*p)), ((NimStringDesc*) &TMP2672));
			if (!LOC22) goto LA23;
			n = newrstnode_313093(((NU8) 61));
			parseuntil_316201(p, n, ((NimStringDesc*) &TMP2672), NIM_FALSE);
			add_313138(father, n);
		}
		goto LA2;
		LA23: ;
		{
			NIM_BOOL LOC26;
			Rstnode313008* n;
			LOC26 = 0;
			LOC26 = isinlinemarkupstart_315286((&(*p)), ((NimStringDesc*) &TMP2677));
			if (!LOC26) goto LA27;
			n = newrstnode_313093(((NU8) 60));
			parseuntil_316201(p, n, ((NimStringDesc*) &TMP2677), NIM_TRUE);
			n = parsepostfix_315538(p, n);
			add_313138(father, n);
		}
		goto LA2;
		LA27: ;
		{
			NIM_BOOL LOC30;
			Rstnode313008* n;
			LOC30 = 0;
			LOC30 = isinlinemarkupstart_315286((&(*p)), ((NimStringDesc*) &TMP2645));
			if (!LOC30) goto LA31;
			n = newrstnode_313093(((NU8) 62));
			parseuntil_316201(p, n, ((NimStringDesc*) &TMP2645), NIM_FALSE);
			add_313138(father, n);
		}
		goto LA2;
		LA31: ;
		{
			{
				Rstnode313008* n;
				if (!(((*(*p).s).options &(1U<<((NU)(((NU8) 1))&7U)))!=0)) goto LA36;
				n = parsesmiley_315607(p);
				{
					if (!!((n == NIM_NIL))) goto LA40;
					add_313138(father, n);
					goto BeforeRet;
				}
				LA40: ;
			}
			LA36: ;
			parsebackslash_315896(p, father);
		}
		LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			Rstnode313008* n;
			if (!(((*(*p).s).options &(1U<<((NU)(((NU8) 1))&7U)))!=0)) goto LA45;
			n = parsesmiley_315607(p);
			{
				if (!!((n == NIM_NIL))) goto LA49;
				add_313138(father, n);
				goto BeforeRet;
			}
			LA49: ;
		}
		LA45: ;
		parseurl_315859(p, father);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		Rstnode313008* LOC60;
		{
			Rstnode313008* n;
			if (!(((*(*p).s).options &(1U<<((NU)(((NU8) 1))&7U)))!=0)) goto LA54;
			n = parsesmiley_315607(p);
			{
				if (!!((n == NIM_NIL))) goto LA58;
				add_313138(father, n);
				goto BeforeRet;
			}
			LA58: ;
		}
		LA54: ;
		LOC60 = 0;
		LOC60 = newleaf_315177(p);
		add_313138(father, LOC60);
		(*p).idx += ((NI) 1);
	}
	break;
	default:
	{
	}
	break;
	}
	}BeforeRet: ;
}

N_NIMCALL(void, parseline_316684)(Rstparser314482* p, Rstnode313008* father) {
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 5):
			{
				parseinline_316328(p, father);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(Rstnode313008*, parsefield_316701)(Rstparser314482* p) {
	Rstnode313008* result;
	NI col;
	Rstnode313008* fieldname;
	Rstnode313008* fieldbody;
	result = 0;
	result = newrstnode_313093(((NU8) 14));
	col = (*p).tok->data[(*p).idx].col;
	fieldname = newrstnode_313093(((NU8) 15));
	parseuntil_316201(p, fieldname, ((NimStringDesc*) &TMP2748), NIM_FALSE);
	fieldbody = newrstnode_313093(((NU8) 16));
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 1)))) goto LA3;
		parseline_316684(p, fieldbody);
	}
	LA3: ;
	{
		NI indent;
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA7;
		indent = (*p).tok->data[(*p).idx].ival;
		{
			if (!(col < indent)) goto LA11;
			pushind_314805(p, indent);
			parsesection_316696(p, fieldbody);
			popind_314820(p);
		}
		LA11: ;
	}
	LA7: ;
	add_313138(result, fieldname);
	add_313138(result, fieldbody);
	return result;
}

N_NIMCALL(Rstnode313008*, parsefields_316728)(Rstparser314482* p) {
	Rstnode313008* result;
	NIM_BOOL atstart;
	NIM_BOOL LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = ((*p).idx == ((NI) 0));
	if (!(LOC1)) goto LA2;
	LOC1 = eqStrings((*p).tok->data[((NI) 0)].symbol, ((NimStringDesc*) &TMP2748));
	LA2: ;
	atstart = LOC1;
	{
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NI col;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
		if (!(LOC6)) goto LA7;
		LOC6 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2748));
		LA7: ;
		LOC5 = LOC6;
		if (LOC5) goto LA8;
		LOC5 = atstart;
		LA8: ;
		if (!LOC5) goto LA9;
		{
			if (!atstart) goto LA13;
			col = (*p).tok->data[(*p).idx].col;
		}
		goto LA11;
		LA13: ;
		{
			col = (*p).tok->data[(*p).idx].ival;
		}
		LA11: ;
		result = newrstnode_313093(((NU8) 13));
		{
			if (!!(atstart)) goto LA18;
			(*p).idx += ((NI) 1);
		}
		LA18: ;
		{
			while (1) {
				Rstnode313008* LOC22;
				LOC22 = 0;
				LOC22 = parsefield_316701(p);
				add_313138(result, LOC22);
				{
					NIM_BOOL LOC25;
					NIM_BOOL LOC26;
					LOC25 = 0;
					LOC26 = 0;
					LOC26 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC26)) goto LA27;
					LOC26 = ((*p).tok->data[(*p).idx].ival == col);
					LA27: ;
					LOC25 = LOC26;
					if (!(LOC25)) goto LA28;
					LOC25 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2748));
					LA28: ;
					if (!LOC25) goto LA29;
					(*p).idx += ((NI) 1);
				}
				goto LA23;
				LA29: ;
				{
					goto LA20;
				}
				LA23: ;
			}
		} LA20: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(Rstnode313008*, parsedirective_319217)(Rstparser314482* p, NU8 flags) {
	Rstnode313008* result;
	Rstnode313008* args;
	Rstnode313008* options;
	result = 0;
	result = newrstnode_313093(((NU8) 40));
	args = NIM_NIL;
	options = NIM_NIL;
	{
		if (!((flags &(1U<<((NU)(((NU8) 0))&7U)))!=0)) goto LA3;
		args = newrstnode_313093(((NU8) 41));
		{
			if (!((flags &(1U<<((NU)(((NU8) 2))&7U)))!=0)) goto LA7;
			{
				while (1) {
					switch ((*p).tok->data[(*p).idx].kind) {
					case ((NU8) 3):
					case ((NU8) 6):
					case ((NU8) 5):
					case ((NU8) 4):
					{
						Rstnode313008* LOC12;
						LOC12 = 0;
						LOC12 = newleaf_315177(p);
						add_313138(args, LOC12);
						(*p).idx += ((NI) 1);
					}
					break;
					default:
					{
						goto LA9;
					}
					break;
					}
				}
			} LA9: ;
		}
		goto LA5;
		LA7: ;
		{
			if (!((flags &(1U<<((NU)(((NU8) 3))&7U)))!=0)) goto LA15;
			{
				while (1) {
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA18;
					(*p).idx += ((NI) 1);
				} LA18: ;
			}
			{
				Rstnode313008* LOC23;
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA21;
				LOC23 = 0;
				LOC23 = newleaf_315177(p);
				add_313138(args, LOC23);
				(*p).idx += ((NI) 1);
			}
			goto LA19;
			LA21: ;
			{
				args = NIM_NIL;
			}
			LA19: ;
		}
		goto LA5;
		LA15: ;
		{
			parseline_316684(p, args);
		}
		LA5: ;
	}
	LA3: ;
	add_313138(result, args);
	{
		if (!((flags &(1U<<((NU)(((NU8) 1))&7U)))!=0)) goto LA28;
		{
			NIM_BOOL LOC32;
			NIM_BOOL LOC33;
			LOC32 = 0;
			LOC33 = 0;
			LOC33 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
			if (!(LOC33)) goto LA34;
			LOC33 = (((NI) 3) <= (*p).tok->data[(*p).idx].ival);
			LA34: ;
			LOC32 = LOC33;
			if (!(LOC32)) goto LA35;
			LOC32 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2748));
			LA35: ;
			if (!LOC32) goto LA36;
			options = parsefields_316728(p);
		}
		LA36: ;
	}
	LA28: ;
	add_313138(result, options);
	return result;
}

N_NIMCALL(NIM_BOOL, indfollows_319323)(Rstparser314482* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NI LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
	if (!(LOC1)) goto LA2;
	LOC3 = 0;
	LOC3 = currind_314801(p);
	LOC1 = (LOC3 < (*p).tok->data[(*p).idx].ival);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(Rstnode313008*, parsedirective_319336)(Rstparser314482* p, NU8 flags, Sectionparser319206 contentparser) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319217(p, flags);
	{
		NIM_BOOL LOC3;
		Rstnode313008* content;
		LOC3 = 0;
		LOC3 = !(contentparser == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = indfollows_319323((&(*p)));
		LA4: ;
		if (!LOC3) goto LA5;
		pushind_314805(p, (*p).tok->data[(*p).idx].ival);
		content = contentparser(p);
		popind_314820(p);
		add_313138(result, content);
	}
	goto LA1;
	LA5: ;
	{
		add_313138(result, NIM_NIL);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode313008*, dirinclude_319357)(Rstparser314482* p) {
	Rstnode313008* result;
	Rstnode313008* n;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	NimStringDesc* path;
	result = 0;
	result = NIM_NIL;
	n = parsedirective_319336(p, 7, NIM_NIL);
	LOC1 = 0;
	LOC1 = addnodes_314052((*n).sons->data[((NI) 0)]);
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2356);
	path = (*(*p).s).findfile(filename);
	{
		if (!((path) && (path)->Sup.len == 0)) goto LA4;
		rstmessage_314719((&(*p)), ((NU8) 0), filename);
	}
	goto LA2;
	LA4: ;
	{
		{
			NimStringDesc* LOC9;
			NimStringDesc* LOC12;
			Rstnode313008* LOC13;
			LOC9 = 0;
			LOC9 = getfieldvalue_314055(n, ((NimStringDesc*) &TMP2683));
			if (!!(((LOC9) && (LOC9)->Sup.len == 0))) goto LA10;
			result = newrstnode_313093(((NU8) 24));
			LOC12 = 0;
			LOC12 = readfile_15466(path);
			LOC13 = 0;
			LOC13 = newrstnode_313121(((NU8) 64), LOC12);
			add_313138(result, LOC13);
		}
		goto LA7;
		LA10: ;
		{
			Rstparser314482 q;
			NimStringDesc* LOC15;
			NI LOC16;
			memset((void*)(&q), 0, sizeof(q));
			q.Sup.m_type = (&NTI314482);
			initparser_314850((&q), (*p).s);
			q.filename = copyString(filename);
			LOC15 = 0;
			LOC15 = readfile_15466(path);
			LOC16 = 0;
			LOC16 = gettokens_314342(LOC15, NIM_FALSE, (&q.tok));
			q.col += LOC16;
			result = parsedoc_318257((&q));
		}
		LA7: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(Rstnode313008*, dirimage_320001)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319336(p, 7, NIM_NIL);
	(*result).kind = ((NU8) 45);
	return result;
}

N_NIMCALL(Rstnode313008*, dirfigure_320007)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319336(p, 7, parsesectionwrapper_319091);
	(*result).kind = ((NU8) 46);
	return result;
}

N_NIMCALL(Rstnode313008*, dirtitle_320013)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319336(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 43);
	return result;
}

N_NIMCALL(Rstnode313008*, dircontainer_319602)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319336(p, 1, parsesectionwrapper_319091);
	(*result).kind = ((NU8) 50);
	return result;
}

N_NIMCALL(Rstnode313008*, dircontents_320019)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319336(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 44);
	return result;
}

N_NIMCALL(Rstnode313008*, parsedirbody_319351)(Rstparser314482* p, Sectionparser319206 contentparser) {
	Rstnode313008* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = indfollows_319323((&(*p)));
		if (!LOC3) goto LA4;
		pushind_314805(p, (*p).tok->data[(*p).idx].ival);
		result = contentparser(p);
		popind_314820(p);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, dirrawaux_320032)(Rstparser314482* p, Rstnode313008** result, NU8 kind, Sectionparser319206 contentparser) {
	NimStringDesc* filename;
	filename = getfieldvalue_314055((*result), ((NimStringDesc*) &TMP2755));
	{
		NimStringDesc* path;
		if (!(((NI) 0) < (filename ? filename->Sup.len : 0))) goto LA3;
		path = (*(*p).s).findfile(filename);
		{
			if (!((path ? path->Sup.len : 0) == ((NI) 0))) goto LA7;
			rstmessage_314719((&(*p)), ((NU8) 0), filename);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* f;
			Rstnode313008* LOC10;
			f = readfile_15466(path);
			unsureAsgnRef((void**) (&(*result)), newrstnode_313093(kind));
			LOC10 = 0;
			LOC10 = newrstnode_313121(((NU8) 64), f);
			add_313138((*result), LOC10);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		Rstnode313008* LOC12;
		(*(*result)).kind = kind;
		LOC12 = 0;
		LOC12 = parsedirbody_319351(p, contentparser);
		add_313138((*result), LOC12);
	}
	LA1: ;
}

N_NIMCALL(Rstnode313008*, dirraw_320043)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319217(p, 11);
	{
		if (!!(((*result).sons->data[((NI) 0)] == NIM_NIL))) goto LA3;
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = nsuCmpIgnoreCase((*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text, ((NimStringDesc*) &TMP2756));
			if (!(LOC7 == ((NI) 0))) goto LA8;
			dirrawaux_320032(p, &result, ((NU8) 48), parseliteralblock_317468);
		}
		goto LA5;
		LA8: ;
		{
			NI LOC11;
			LOC11 = 0;
			LOC11 = nsuCmpIgnoreCase((*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text, ((NimStringDesc*) &TMP2757));
			if (!(LOC11 == ((NI) 0))) goto LA12;
			dirrawaux_320032(p, &result, ((NU8) 49), parseliteralblock_317468);
		}
		goto LA5;
		LA12: ;
		{
			rstmessage_314719((&(*p)), ((NU8) 5), (*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		dirrawaux_320032(p, &result, ((NU8) 42), parsesectionwrapper_319091);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode313008*, dircodeblock_319380)(Rstparser314482* p, NIM_BOOL nimrodextension) {
	Rstnode313008* result;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	result = 0;
	result = parsedirective_319336(p, 3, parseliteralblock_317468);
	LOC1 = 0;
	LOC1 = getfieldvalue_314055(result, ((NimStringDesc*) &TMP2755));
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2356);
	{
		NimStringDesc* path;
		Rstnode313008* n;
		NimStringDesc* LOC10;
		Rstnode313008* LOC11;
		if (!!(((filename) && (filename)->Sup.len == 0))) goto LA4;
		path = (*(*p).s).findfile(filename);
		{
			if (!((path) && (path)->Sup.len == 0)) goto LA8;
			rstmessage_314719((&(*p)), ((NU8) 0), filename);
		}
		LA8: ;
		n = newrstnode_313093(((NU8) 24));
		LOC10 = 0;
		LOC10 = readfile_15466(path);
		LOC11 = 0;
		LOC11 = newrstnode_313121(((NU8) 64), LOC10);
		add_313138(n, LOC11);
		asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 2)]), n);
	}
	LA4: ;
	{
		Rstnode313008* extranode;
		Rstnode313008* LOC20;
		Rstnode313008* LOC21;
		Rstnode313008* LOC22;
		Rstnode313008* LOC23;
		if (!nimrodextension) goto LA14;
		{
			if (!(*result).sons->data[((NI) 1)] == 0) goto LA18;
			asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 1)]), newrstnode_313093(((NU8) 13)));
		}
		LA18: ;
		extranode = newrstnode_313093(((NU8) 14));
		LOC20 = 0;
		LOC20 = newrstnode_313093(((NU8) 15));
		add_313138(extranode, LOC20);
		LOC21 = 0;
		LOC21 = newrstnode_313093(((NU8) 16));
		add_313138(extranode, LOC21);
		LOC22 = 0;
		LOC22 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2758));
		add_313138((*extranode).sons->data[((NI) 0)], LOC22);
		LOC23 = 0;
		LOC23 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2759));
		add_313138((*extranode).sons->data[((NI) 1)], LOC23);
		add_313138((*result).sons->data[((NI) 1)], extranode);
	}
	LA14: ;
	(*result).kind = ((NU8) 47);
	return result;
}

N_NIMCALL(Rstnode313008*, dirindex_320025)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsedirective_319336(p, 0, parsesectionwrapper_319091);
	(*result).kind = ((NU8) 51);
	return result;
}

N_NIMCALL(Rstnode313008*, getreferencename_315182)(Rstparser314482* p, NimStringDesc* endstr) {
	Rstnode313008* result;
	Rstnode313008* res;
	result = 0;
	res = newrstnode_313093(((NU8) 0));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 2):
			{
				Rstnode313008* LOC4;
				LOC4 = 0;
				LOC4 = newleaf_315177(p);
				add_313138(res, LOC4);
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, endstr)) goto LA8;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA6;
				LA8: ;
				{
					Rstnode313008* LOC11;
					LOC11 = 0;
					LOC11 = newleaf_315177(p);
					add_313138(res, LOC11);
				}
				LA6: ;
			}
			break;
			default:
			{
				rstmessage_314719((&(*p)), ((NU8) 1), endstr);
				goto LA1;
			}
			break;
			}
			(*p).idx += ((NI) 1);
		}
	} LA1: ;
	result = res;
	return result;
}

N_NIMCALL(Rstnode313008*, untileol_315208)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = newrstnode_313093(((NU8) 0));
	{
		while (1) {
			Rstnode313008* LOC3;
			if (!!(((3 &(1U<<((NU)((*p).tok->data[(*p).idx].kind)&7U)))!=0))) goto LA2;
			LOC3 = 0;
			LOC3 = newleaf_315177(p);
			add_313138(result, LOC3);
			(*p).idx += ((NI) 1);
		} LA2: ;
	}
	return result;
}

N_NIMCALL(void, expect_315234)(Rstparser314482* p, NimStringDesc* tok) {
	{
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, tok)) goto LA3;
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		rstmessage_314719((&(*p)), ((NU8) 1), tok);
	}
	LA1: ;
}

N_NIMCALL(void, setsub_315061)(Rstparser314482* p, NimStringDesc* key, Rstnode313008* value) {
	NI length;
	NimStringDesc* LOC8;
{	length = ((*(*p).s).subs ? (*(*p).s).subs->Sup.len : 0);
	{
		NI i_315087;
		NI HEX3Atmp_315099;
		NI res_315102;
		i_315087 = 0;
		HEX3Atmp_315099 = 0;
		HEX3Atmp_315099 = (NI)(length - ((NI) 1));
		res_315102 = ((NI) 0);
		{
			while (1) {
				if (!(res_315102 <= HEX3Atmp_315099)) goto LA3;
				i_315087 = res_315102;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_315087].key)) goto LA6;
					asgnRefNoCycle((void**) (&(*(*p).s).subs->data[i_315087].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_315102 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).subs = (TY314492*) setLengthSeq(&((*(*p).s).subs)->Sup, sizeof(Substitution314476), ((NI) ((NI)(length + ((NI) 1)))));
	LOC8 = 0;
	LOC8 = (*(*p).s).subs->data[length].key; (*(*p).s).subs->data[length].key = copyStringRC1(key);
	if (LOC8) nimGCunrefNoCycle(LOC8);
	asgnRefNoCycle((void**) (&(*(*p).s).subs->data[length].value), value);
	}BeforeRet: ;
}

N_NIMCALL(Rstnode313008*, parsecomment_316544)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 1):
	case ((NU8) 0):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = !(((*p).tok->data[(*p).idx].kind == ((NU8) 0)));
			if (!(LOC4)) goto LA5;
			LOC4 = ((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 1));
			LA5: ;
			if (!LOC4) goto LA6;
			(*p).idx += ((NI) 1);
		}
		goto LA2;
		LA6: ;
		{
			NI indent;
			indent = (*p).tok->data[(*p).idx].ival;
			{
				while (1) {
					switch ((*p).tok->data[(*p).idx].kind) {
					case ((NU8) 0):
					{
						goto LA9;
					}
					break;
					case ((NU8) 1):
					{
						{
							if (!((*p).tok->data[(*p).idx].ival < indent)) goto LA15;
							goto LA9;
						}
						LA15: ;
					}
					break;
					default:
					{
					}
					break;
					}
					(*p).idx += ((NI) 1);
				}
			} LA9: ;
		}
		LA2: ;
	}
	break;
	default:
	{
		{
			while (1) {
				if (!!(((3 &(1U<<((NU)((*p).tok->data[(*p).idx].kind)&7U)))!=0))) goto LA20;
				(*p).idx += ((NI) 1);
			} LA20: ;
		}
	}
	break;
	}
	result = NIM_NIL;
	return result;
}

N_NIMCALL(Rstnode313008*, parsedotdot_317464)(Rstparser314482* p) {
	Rstnode313008* result;
	NI col;
	NimStringDesc* d;
	result = 0;
	result = NIM_NIL;
	col = (*p).tok->data[(*p).idx].col;
	(*p).idx += ((NI) 1);
	d = getdirective_316436(p);
	{
		NU8 LOC5;
		if (!!(((d) && (d)->Sup.len == 0))) goto LA3;
		pushind_314805(p, col);
		LOC5 = 0;
		LOC5 = getdirkind_316629(d);
		switch (LOC5) {
		case ((NU8) 9):
		{
			result = dirinclude_319357(p);
		}
		break;
		case ((NU8) 8):
		{
			result = dirimage_320001(p);
		}
		break;
		case ((NU8) 7):
		{
			result = dirfigure_320007(p);
		}
		break;
		case ((NU8) 12):
		{
			result = dirtitle_320013(p);
		}
		break;
		case ((NU8) 5):
		{
			result = dircontainer_319602(p);
		}
		break;
		case ((NU8) 6):
		{
			result = dircontents_320019(p);
		}
		break;
		case ((NU8) 11):
		{
			{
				if (!(((*(*p).s).options &(1U<<((NU)(((NU8) 2))&7U)))!=0)) goto LA15;
				result = dirraw_320043(p);
			}
			goto LA13;
			LA15: ;
			{
				rstmessage_314719((&(*p)), ((NU8) 5), d);
			}
			LA13: ;
		}
		break;
		case ((NU8) 3):
		{
			result = dircodeblock_319380(p, NIM_FALSE);
		}
		break;
		case ((NU8) 4):
		{
			result = dircodeblock_319380(p, NIM_TRUE);
		}
		break;
		case ((NU8) 10):
		{
			result = dirindex_320025(p);
		}
		break;
		default:
		{
			rstmessage_314719((&(*p)), ((NU8) 5), d);
		}
		break;
		}
		popind_314820(p);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC23;
		Rstnode313008* a;
		Rstnode313008* b;
		NimStringDesc* LOC30;
		LOC23 = 0;
		LOC23 = match_315327((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2760));
		if (!LOC23) goto LA24;
		(*p).idx += ((NI) 2);
		a = getreferencename_315182(p, ((NimStringDesc*) &TMP2748));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA28;
			(*p).idx += ((NI) 1);
		}
		LA28: ;
		b = untileol_315208(p);
		LOC30 = 0;
		LOC30 = rstnodetorefname_314049(a);
		setref_315106(p, LOC30, b);
	}
	goto LA1;
	LA24: ;
	{
		NIM_BOOL LOC32;
		Rstnode313008* a;
		Rstnode313008* b;
		NimStringDesc* LOC49;
		LOC32 = 0;
		LOC32 = match_315327((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2761));
		if (!LOC32) goto LA33;
		(*p).idx += ((NI) 2);
		a = getreferencename_315182(p, ((NimStringDesc*) &TMP2645));
		b = 0;
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA37;
			(*p).idx += ((NI) 1);
		}
		LA37: ;
		{
			NI LOC41;
			LOC41 = 0;
			LOC41 = nsuCmpIgnoreStyle((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2762));
			if (!(LOC41 == ((NI) 0))) goto LA42;
			(*p).idx += ((NI) 1);
			expect_315234(p, ((NimStringDesc*) &TMP2641));
			b = untileol_315208(p);
		}
		goto LA39;
		LA42: ;
		{
			NI LOC45;
			LOC45 = 0;
			LOC45 = nsuCmpIgnoreStyle((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2663));
			if (!(LOC45 == ((NI) 0))) goto LA46;
			(*p).idx += ((NI) 1);
			b = dirimage_320001(p);
		}
		goto LA39;
		LA46: ;
		{
			rstmessage_314719((&(*p)), ((NU8) 5), (*p).tok->data[(*p).idx].symbol);
		}
		LA39: ;
		LOC49 = 0;
		LOC49 = addnodes_314052(a);
		setsub_315061(p, LOC49, b);
	}
	goto LA1;
	LA33: ;
	{
		NIM_BOOL LOC51;
		Rstnode313008* a;
		Rstnode313008* b;
		NimStringDesc* LOC58;
		LOC51 = 0;
		LOC51 = match_315327((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2763));
		if (!LOC51) goto LA52;
		(*p).idx += ((NI) 2);
		a = getreferencename_315182(p, ((NimStringDesc*) &TMP2764));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA56;
			(*p).idx += ((NI) 1);
		}
		LA56: ;
		b = untileol_315208(p);
		LOC58 = 0;
		LOC58 = rstnodetorefname_314049(a);
		setref_315106(p, LOC58, b);
	}
	goto LA1;
	LA52: ;
	{
		result = parsecomment_316544(p);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode313008*, parseenumlist_318883)(Rstparser314482* p) {
	Rstnode313008* result;
	NI w;
	result = 0;
	result = NIM_NIL;
	w = ((NI) 0);
	{
		while (1) {
			if (!(w <= ((NI) 2))) goto LA2;
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = match_315327((&(*p)), (*p).idx, wildcards_318888[(w)- 0]);
				if (!LOC5) goto LA6;
				goto LA1;
			}
			LA6: ;
			w += ((NI) 1);
		} LA2: ;
	} LA1: ;
	{
		NI col;
		NI j;
		if (!(w <= ((NI) 2))) goto LA10;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_313093(((NU8) 7));
		(*p).idx += (NI)(wildpos_318893[(w)- 0] + ((NI) 3));
		j = tokenafternewline_317550((&(*p)));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = ((*p).tok->data[j].col == (*p).tok->data[(*p).idx].col);
			if (LOC14) goto LA15;
			LOC14 = match_315327((&(*p)), j, wildcards_318888[(w)- 0]);
			LA15: ;
			if (!LOC14) goto LA16;
			pushind_314805(p, (*p).tok->data[(*p).idx].col);
			{
				while (1) {
					Rstnode313008* item;
					item = newrstnode_313093(((NU8) 8));
					parsesection_316696(p, item);
					add_313138(result, item);
					{
						NIM_BOOL LOC22;
						NIM_BOOL LOC23;
						LOC22 = 0;
						LOC23 = 0;
						LOC23 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
						if (!(LOC23)) goto LA24;
						LOC23 = ((*p).tok->data[(*p).idx].ival == col);
						LA24: ;
						LOC22 = LOC23;
						if (!(LOC22)) goto LA25;
						LOC22 = match_315327((&(*p)), (NI)((*p).idx + ((NI) 1)), wildcards_318888[(w)- 0]);
						LA25: ;
						if (!LOC22) goto LA26;
						(*p).idx += (NI)(wildpos_318893[(w)- 0] + ((NI) 4));
					}
					goto LA20;
					LA26: ;
					{
						goto LA18;
					}
					LA20: ;
				}
			} LA18: ;
			popind_314820(p);
		}
		goto LA12;
		LA16: ;
		{
			(*p).idx -= (NI)(wildpos_318893[(w)- 0] + ((NI) 3));
			result = NIM_NIL;
		}
		LA12: ;
	}
	LA10: ;
	return result;
}

N_NIMCALL(Rstnode313008*, parsedefinitionlist_318807)(Rstparser314482* p) {
	Rstnode313008* result;
	NI j;
	NI LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = tokenafternewline_317550((&(*p)));
	j = (NI)(LOC1 - ((NI) 1));
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NI LOC9;
		NI col;
		LOC4 = 0;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = (((NI) 1) <= j);
		if (!(LOC6)) goto LA7;
		LOC6 = ((*p).tok->data[j].kind == ((NU8) 1));
		LA7: ;
		LOC5 = LOC6;
		if (!(LOC5)) goto LA8;
		LOC9 = 0;
		LOC9 = currind_314801((&(*p)));
		LOC5 = (LOC9 < (*p).tok->data[j].ival);
		LA8: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA10;
		LOC4 = !(eqStrings((*p).tok->data[(NI)(j - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2641)));
		LA10: ;
		if (!LOC4) goto LA11;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_313093(((NU8) 9));
		{
			while (1) {
				Rstnode313008* a;
				j = (*p).idx;
				a = newrstnode_313093(((NU8) 11));
				parseline_316684(p, a);
				{
					NIM_BOOL LOC17;
					NIM_BOOL LOC18;
					NIM_BOOL LOC19;
					NI LOC21;
					Rstnode313008* b;
					Rstnode313008* c;
					LOC17 = 0;
					LOC18 = 0;
					LOC19 = 0;
					LOC19 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC19)) goto LA20;
					LOC21 = 0;
					LOC21 = currind_314801((&(*p)));
					LOC19 = (LOC21 < (*p).tok->data[(*p).idx].ival);
					LA20: ;
					LOC18 = LOC19;
					if (!(LOC18)) goto LA22;
					LOC18 = !(eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2641)));
					LA22: ;
					LOC17 = LOC18;
					if (!(LOC17)) goto LA23;
					LOC17 = !(((3 &(1U<<((NU)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7U)))!=0));
					LA23: ;
					if (!LOC17) goto LA24;
					pushind_314805(p, (*p).tok->data[(*p).idx].ival);
					b = newrstnode_313093(((NU8) 12));
					parsesection_316696(p, b);
					c = newrstnode_313093(((NU8) 10));
					add_313138(c, a);
					add_313138(c, b);
					add_313138(result, c);
					popind_314820(p);
				}
				goto LA15;
				LA24: ;
				{
					(*p).idx = j;
					goto LA13;
				}
				LA15: ;
				{
					NIM_BOOL LOC29;
					NI LOC33;
					LOC29 = 0;
					LOC29 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC29)) goto LA30;
					LOC29 = ((*p).tok->data[(*p).idx].ival == col);
					LA30: ;
					if (!LOC29) goto LA31;
					(*p).idx += ((NI) 1);
					LOC33 = 0;
					LOC33 = tokenafternewline_317550((&(*p)));
					j = (NI)(LOC33 - ((NI) 1));
					{
						NIM_BOOL LOC36;
						NIM_BOOL LOC37;
						NIM_BOOL LOC38;
						NIM_BOOL LOC39;
						LOC36 = 0;
						LOC37 = 0;
						LOC38 = 0;
						LOC39 = 0;
						LOC39 = (((NI) 1) <= j);
						if (!(LOC39)) goto LA40;
						LOC39 = ((*p).tok->data[j].kind == ((NU8) 1));
						LA40: ;
						LOC38 = LOC39;
						if (!(LOC38)) goto LA41;
						LOC38 = (col < (*p).tok->data[j].ival);
						LA41: ;
						LOC37 = LOC38;
						if (!(LOC37)) goto LA42;
						LOC37 = !(eqStrings((*p).tok->data[(NI)(j - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2641)));
						LA42: ;
						LOC36 = LOC37;
						if (!(LOC36)) goto LA43;
						LOC36 = !(((*p).tok->data[(NI)(j + ((NI) 1))].kind == ((NU8) 1)));
						LA43: ;
						if (!LOC36) goto LA44;
					}
					goto LA34;
					LA44: ;
					{
						goto LA13;
					}
					LA34: ;
				}
				LA31: ;
			}
		} LA13: ;
		{
			NI LOC49;
			LOC49 = 0;
			LOC49 = len_313081(result);
			if (!(LOC49 == ((NI) 0))) goto LA50;
			result = NIM_NIL;
		}
		LA50: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(Rstnode313008*, parsetransition_318546)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = newrstnode_313093(((NU8) 3));
	(*p).idx += ((NI) 1);
	{
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA3;
		(*p).idx += ((NI) 1);
	}
	LA3: ;
	{
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA7;
		(*p).idx += ((NI) 1);
	}
	LA7: ;
	return result;
}

N_NIMCALL(void, parseuntilnewline_316690)(Rstparser314482* p, Rstnode313008* father) {
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			case ((NU8) 5):
			{
				parseinline_316328(p, father);
			}
			break;
			case ((NU8) 0):
			case ((NU8) 1):
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NI, getlevel_317533)(NI* map, NI* lvl, NIM_CHAR c) {
	NI result;
	result = 0;
	{
		if (!(map[(((NU8)(c)))- 0] == ((NI) 0))) goto LA3;
		(*lvl) += ((NI) 1);
		map[(((NU8)(c)))- 0] = (*lvl);
	}
	LA3: ;
	result = map[(((NU8)(c)))- 0];
	return result;
}

N_NIMCALL(Rstnode313008*, parseheadline_317728)(Rstparser314482* p) {
	Rstnode313008* result;
	NIM_CHAR c;
	result = 0;
	result = newrstnode_313093(((NU8) 1));
	parseuntilnewline_316690(p, result);
	c = (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	(*result).level = getlevel_317533((*(*p).s).underlinetolevel, (&(*(*p).s).ulevel), c);
	return result;
}

N_NIMCALL(Rstnode313008*, parseoverline_318596)(Rstparser314482* p) {
	Rstnode313008* result;
	NIM_CHAR c;
	result = 0;
	c = (*p).tok->data[(*p).idx].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	result = newrstnode_313093(((NU8) 2));
	{
		while (1) {
			parseuntilnewline_316690(p, result);
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA5;
				(*p).idx += ((NI) 1);
				{
					NI LOC9;
					Rstnode313008* LOC12;
					LOC9 = 0;
					LOC9 = currind_314801((&(*p)));
					if (!(LOC9 < (*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival)) goto LA10;
					LOC12 = 0;
					LOC12 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2674));
					add_313138(result, LOC12);
				}
				goto LA7;
				LA10: ;
				{
					goto LA1;
				}
				LA7: ;
			}
			goto LA3;
			LA5: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	(*result).level = getlevel_317533((*(*p).s).overlinetolevel, (&(*(*p).s).olevel), c);
	{
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 4))) goto LA17;
		(*p).idx += ((NI) 1);
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA21;
			(*p).idx += ((NI) 1);
		}
		LA21: ;
	}
	LA17: ;
	return result;
}

N_NIMCALL(NI, tokend_318016)(Rstparser314482* p) {
	NI result;
	result = 0;
	result = (NI)((NI)((*p).tok->data[(*p).idx].col + ((*p).tok->data[(*p).idx].symbol ? (*p).tok->data[(*p).idx].symbol->Sup.len : 0)) - ((NI) 1));
	return result;
}

N_NIMCALL(void, getcolumns_318020)(Rstparser314482* p, TY314503** cols) {
	NI L;
	L = ((NI) 0);
	{
		while (1) {
			L += ((NI) 1);
			(*cols) = (TY314503*) setLengthSeq(&((*cols))->Sup, sizeof(NI), ((NI) (L)));
			(*cols)->data[(NI)(L - ((NI) 1))] = tokend_318016((&(*p)));
			(*p).idx += ((NI) 1);
			{
				if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 2)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			(*p).idx += ((NI) 1);
			{
				if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 4)))) goto LA9;
				goto LA1;
			}
			LA9: ;
		}
	} LA1: ;
	{
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA13;
		(*p).idx += ((NI) 1);
	}
	LA13: ;
	(*cols)->data[(NI)(L - ((NI) 1))] = ((NI) 32000);
}

N_NIMCALL(Rstnode313008*, parsesimpletable_318261)(Rstparser314482* p) {
	Rstnode313008* result;
	TY314503* cols;
	TY125202* row;
	NI i;
	NI last;
	NI line;
	NIM_CHAR c;
	Rstparser314482 q;
	Rstnode313008* a;
	Rstnode313008* b;
	result = 0;
	cols = 0;
	row = 0;
	i = 0;
	last = 0;
	line = 0;
	c = 0;
	memset((void*)(&q), 0, sizeof(q));
	q.Sup.m_type = (&NTI314482);
	a = 0;
	b = 0;
	result = newrstnode_313093(((NU8) 29));
	cols = (TY314503*) newSeq((&NTI314503), 0);
	row = (TY125202*) newSeq((&NTI125202), 0);
	a = NIM_NIL;
	c = (*p).tok->data[(*p).idx].symbol->data[((NI) 0)];
	{
		while (1) {
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 4))) goto LA5;
				last = tokenafternewline_317550((&(*p)));
				{
					if (!((3 &(1U<<((NU)((*p).tok->data[last].kind)&7U)))!=0)) goto LA9;
					(*p).idx = last;
					goto LA1;
				}
				LA9: ;
				getcolumns_318020(p, (&cols));
				row = (TY125202*) setLengthSeq(&(row)->Sup, sizeof(NimStringDesc*), ((NI) ((cols ? cols->Sup.len : 0))));
				{
					if (!!((a == NIM_NIL))) goto LA13;
					{
						NI j_318368;
						NI HEX3Atmp_318513;
						NI LOC16;
						NI res_318516;
						j_318368 = 0;
						HEX3Atmp_318513 = 0;
						LOC16 = 0;
						LOC16 = len_313081(a);
						HEX3Atmp_318513 = (NI)(LOC16 - ((NI) 1));
						res_318516 = ((NI) 0);
						{
							while (1) {
								if (!(res_318516 <= HEX3Atmp_318513)) goto LA18;
								j_318368 = res_318516;
								(*(*a).sons->data[j_318368]).kind = ((NU8) 32);
								res_318516 += ((NI) 1);
							} LA18: ;
						}
					}
				}
				LA13: ;
			}
			LA5: ;
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 0))) goto LA21;
				goto LA1;
			}
			LA21: ;
			{
				NI j_318389;
				NI HEX3Atmp_318521;
				NI res_318524;
				j_318389 = 0;
				HEX3Atmp_318521 = 0;
				HEX3Atmp_318521 = (row ? (row->Sup.len-1) : -1);
				res_318524 = ((NI) 0);
				{
					while (1) {
						NimStringDesc* LOC26;
						if (!(res_318524 <= HEX3Atmp_318521)) goto LA25;
						j_318389 = res_318524;
						LOC26 = 0;
						LOC26 = row->data[j_318389]; row->data[j_318389] = copyStringRC1(((NimStringDesc*) &TMP2245));
						if (LOC26) nimGCunrefNoCycle(LOC26);
						res_318524 += ((NI) 1);
					} LA25: ;
				}
			}
			line = (*p).tok->data[(*p).idx].line;
			{
				while (1) {
					i = ((NI) 0);
					{
						while (1) {
							if (!!(((3 &(1U<<((NU)((*p).tok->data[(*p).idx].kind)&7U)))!=0))) goto LA30;
							{
								NI LOC33;
								LOC33 = 0;
								LOC33 = tokend_318016((&(*p)));
								if (!(LOC33 <= cols->data[i])) goto LA34;
								row->data[i] = resizeString(row->data[i], (*p).tok->data[(*p).idx].symbol->Sup.len + 0);
appendString(row->data[i], (*p).tok->data[(*p).idx].symbol);
								(*p).idx += ((NI) 1);
							}
							goto LA31;
							LA34: ;
							{
								{
									if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA39;
									(*p).idx += ((NI) 1);
								}
								LA39: ;
								i += ((NI) 1);
							}
							LA31: ;
						} LA30: ;
					}
					{
						if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA43;
						(*p).idx += ((NI) 1);
					}
					LA43: ;
					{
						NI LOC47;
						LOC47 = 0;
						LOC47 = tokend_318016((&(*p)));
						if (!(LOC47 <= cols->data[((NI) 0)])) goto LA48;
						goto LA27;
					}
					LA48: ;
					{
						if (!((17 &(1U<<((NU)((*p).tok->data[(*p).idx].kind)&7U)))!=0)) goto LA52;
						goto LA27;
					}
					LA52: ;
					{
						NI j_318477;
						NI HEX3Atmp_318531;
						NI res_318534;
						j_318477 = 0;
						HEX3Atmp_318531 = 0;
						HEX3Atmp_318531 = (row ? (row->Sup.len-1) : -1);
						res_318534 = ((NI) 1);
						{
							while (1) {
								if (!(res_318534 <= HEX3Atmp_318531)) goto LA56;
								j_318477 = res_318534;
								row->data[j_318477] = addChar(row->data[j_318477], 10);
								res_318534 += ((NI) 1);
							} LA56: ;
						}
					}
				}
			} LA27: ;
			a = newrstnode_313093(((NU8) 31));
			{
				NI j_318489;
				NI HEX3Atmp_318539;
				NI res_318542;
				j_318489 = 0;
				HEX3Atmp_318539 = 0;
				HEX3Atmp_318539 = (row ? (row->Sup.len-1) : -1);
				res_318542 = ((NI) 0);
				{
					while (1) {
						NI LOC60;
						Rstnode313008* LOC61;
						if (!(res_318542 <= HEX3Atmp_318539)) goto LA59;
						j_318489 = res_318542;
						initparser_314850((&q), (*p).s);
						q.col = cols->data[j_318489];
						q.line = (NI)(line - ((NI) 1));
						q.filename = copyString((*p).filename);
						LOC60 = 0;
						LOC60 = gettokens_314342(row->data[j_318489], NIM_FALSE, (&q.tok));
						q.col += LOC60;
						b = newrstnode_313093(((NU8) 33));
						LOC61 = 0;
						LOC61 = parsedoc_318257((&q));
						add_313138(b, LOC61);
						add_313138(a, b);
						res_318542 += ((NI) 1);
					} LA59: ;
				}
			}
			add_313138(result, a);
		}
	} LA1: ;
	return result;
}

N_NIMCALL(Rstnode313008*, parseoptionlist_318722)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = newrstnode_313093(((NU8) 17));
	{
		while (1) {
			{
				NIM_BOOL LOC5;
				Rstnode313008* a;
				Rstnode313008* b;
				Rstnode313008* c;
				NI j;
				LOC5 = 0;
				LOC5 = isoptionlist_317607((&(*p)));
				if (!LOC5) goto LA6;
				a = newrstnode_313093(((NU8) 19));
				b = newrstnode_313093(((NU8) 23));
				c = newrstnode_313093(((NU8) 18));
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = match_315327((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2653));
					if (!LOC10) goto LA11;
					(*p).idx += ((NI) 1);
				}
				LA11: ;
				{
					while (1) {
						Rstnode313008* LOC21;
						if (!!(((3 &(1U<<((NU)((*p).tok->data[(*p).idx].kind)&7U)))!=0))) goto LA14;
						{
							NIM_BOOL LOC17;
							LOC17 = 0;
							LOC17 = ((*p).tok->data[(*p).idx].kind == ((NU8) 2));
							if (!(LOC17)) goto LA18;
							LOC17 = (((NI) 1) < ((*p).tok->data[(*p).idx].symbol ? (*p).tok->data[(*p).idx].symbol->Sup.len : 0));
							LA18: ;
							if (!LOC17) goto LA19;
							(*p).idx += ((NI) 1);
							goto LA13;
						}
						LA19: ;
						LOC21 = 0;
						LOC21 = newleaf_315177(p);
						add_313138(a, LOC21);
						(*p).idx += ((NI) 1);
					} LA14: ;
				} LA13: ;
				j = tokenafternewline_317550((&(*p)));
				{
					NIM_BOOL LOC24;
					NIM_BOOL LOC25;
					NI LOC28;
					LOC24 = 0;
					LOC25 = 0;
					LOC25 = (((NI) 0) < j);
					if (!(LOC25)) goto LA26;
					LOC25 = ((*p).tok->data[(NI)(j - ((NI) 1))].kind == ((NU8) 1));
					LA26: ;
					LOC24 = LOC25;
					if (!(LOC24)) goto LA27;
					LOC28 = 0;
					LOC28 = currind_314801((&(*p)));
					LOC24 = (LOC28 < (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					LA27: ;
					if (!LOC24) goto LA29;
					pushind_314805(p, (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					parsesection_316696(p, b);
					popind_314820(p);
				}
				goto LA22;
				LA29: ;
				{
					parseline_316684(p, b);
				}
				LA22: ;
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA34;
					(*p).idx += ((NI) 1);
				}
				LA34: ;
				add_313138(c, a);
				add_313138(c, b);
				add_313138(result, c);
			}
			goto LA3;
			LA6: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(void, parseparagraph_317677)(Rstparser314482* p, Rstnode313008* result) {
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 1):
			{
				{
					if (!((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 1))) goto LA6;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA4;
				LA6: ;
				{
					NI LOC9;
					NU8 LOC12;
					LOC9 = 0;
					LOC9 = currind_314801((&(*p)));
					if (!((*p).tok->data[(*p).idx].ival == LOC9)) goto LA10;
					(*p).idx += ((NI) 1);
					LOC12 = 0;
					LOC12 = whichsection_317611((&(*p)));
					switch (LOC12) {
					case ((NU8) 4):
					case ((NU8) 64):
					case ((NU8) 1):
					case ((NU8) 2):
					case ((NU8) 40):
					{
						Rstnode313008* LOC14;
						LOC14 = 0;
						LOC14 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2674));
						add_313138(result, LOC14);
					}
					break;
					case ((NU8) 26):
					{
						Rstnode313008* LOC16;
						LOC16 = 0;
						LOC16 = parselineblock_317624(p);
						addifnotnil_313152(result, LOC16);
					}
					break;
					default:
					{
						goto LA1;
					}
					break;
					}
				}
				goto LA4;
				LA10: ;
				{
					goto LA1;
				}
				LA4: ;
			}
			break;
			case ((NU8) 5):
			{
				{
					NIM_BOOL LOC22;
					NIM_BOOL LOC23;
					NI LOC26;
					Rstnode313008* LOC29;
					Rstnode313008* LOC30;
					LOC22 = 0;
					LOC23 = 0;
					LOC23 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2641));
					if (!(LOC23)) goto LA24;
					LOC23 = ((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind == ((NU8) 1));
					LA24: ;
					LOC22 = LOC23;
					if (!(LOC22)) goto LA25;
					LOC26 = 0;
					LOC26 = currind_314801((&(*p)));
					LOC22 = (LOC26 < (*p).tok->data[(NI)((*p).idx + ((NI) 1))].ival);
					LA25: ;
					if (!LOC22) goto LA27;
					LOC29 = 0;
					LOC29 = newrstnode_313121(((NU8) 64), ((NimStringDesc*) &TMP2748));
					add_313138(result, LOC29);
					(*p).idx += ((NI) 1);
					LOC30 = 0;
					LOC30 = parseliteralblock_317468(p);
					add_313138(result, LOC30);
					goto LA1;
				}
				goto LA20;
				LA27: ;
				{
					parseinline_316328(p, result);
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			{
				parseinline_316328(p, result);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NU8, sonkind_318949)(Rstnode313008* father, NI i) {
	NU8 result;
	result = 0;
	result = ((NU8) 64);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = len_313081(father);
		if (!(i < LOC3)) goto LA4;
		result = (*(*father).sons->data[i]).kind;
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, parsesection_316696)(Rstparser314482* p, Rstnode313008* result) {
	{
		while (1) {
			NIM_BOOL leave;
			Rstnode313008* a;
			NU8 k;
			leave = NIM_FALSE;
			{
				while (1) {
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA4;
					{
						NI LOC7;
						LOC7 = 0;
						LOC7 = currind_314801((&(*p)));
						if (!(LOC7 == (*p).tok->data[(*p).idx].ival)) goto LA8;
						(*p).idx += ((NI) 1);
					}
					goto LA5;
					LA8: ;
					{
						NI LOC11;
						Rstnode313008* a;
						LOC11 = 0;
						LOC11 = currind_314801((&(*p)));
						if (!(LOC11 < (*p).tok->data[(*p).idx].ival)) goto LA12;
						pushind_314805(p, (*p).tok->data[(*p).idx].ival);
						a = newrstnode_313093(((NU8) 28));
						parsesection_316696(p, a);
						add_313138(result, a);
						popind_314820(p);
					}
					goto LA5;
					LA12: ;
					{
						leave = NIM_TRUE;
						goto LA3;
					}
					LA5: ;
				} LA4: ;
			} LA3: ;
			{
				NIM_BOOL LOC17;
				LOC17 = 0;
				LOC17 = leave;
				if (LOC17) goto LA18;
				LOC17 = ((*p).tok->data[(*p).idx].kind == ((NU8) 0));
				LA18: ;
				if (!LOC17) goto LA19;
				goto LA1;
			}
			LA19: ;
			a = NIM_NIL;
			k = whichsection_317611((&(*p)));
			switch (k) {
			case ((NU8) 24):
			{
				(*p).idx += ((NI) 1);
				a = parseliteralblock_317468(p);
			}
			break;
			case ((NU8) 5):
			{
				a = parsebulletlist_318668(p);
			}
			break;
			case ((NU8) 26):
			{
				a = parselineblock_317624(p);
			}
			break;
			case ((NU8) 40):
			{
				a = parsedotdot_317464(p);
			}
			break;
			case ((NU8) 7):
			{
				a = parseenumlist_318883(p);
			}
			break;
			case ((NU8) 64):
			{
				rstmessage_314731((&(*p)), ((NU8) 3));
			}
			break;
			case ((NU8) 4):
			{
			}
			break;
			case ((NU8) 9):
			{
				a = parsedefinitionlist_318807(p);
			}
			break;
			case ((NU8) 13):
			{
				{
					if (!(((NI) 0) < (*p).idx)) goto LA32;
					(*p).idx -= ((NI) 1);
				}
				LA32: ;
				a = parsefields_316728(p);
			}
			break;
			case ((NU8) 3):
			{
				a = parsetransition_318546(p);
			}
			break;
			case ((NU8) 1):
			{
				a = parseheadline_317728(p);
			}
			break;
			case ((NU8) 2):
			{
				a = parseoverline_318596(p);
			}
			break;
			case ((NU8) 29):
			{
				a = parsesimpletable_318261(p);
			}
			break;
			case ((NU8) 17):
			{
				a = parseoptionlist_318722(p);
			}
			break;
			default:
			{
			}
			break;
			}
			{
				NIM_BOOL LOC42;
				LOC42 = 0;
				LOC42 = (a == NIM_NIL);
				if (!(LOC42)) goto LA43;
				LOC42 = !((k == ((NU8) 40)));
				LA43: ;
				if (!LOC42) goto LA44;
				a = newrstnode_313093(((NU8) 4));
				parseparagraph_317677(p, a);
			}
			LA44: ;
			addifnotnil_313152(result, a);
		}
	} LA1: ;
	{
		NIM_BOOL LOC48;
		NU8 LOC49;
		NU8 LOC51;
		LOC48 = 0;
		LOC49 = 0;
		LOC49 = sonkind_318949(result, ((NI) 0));
		LOC48 = (LOC49 == ((NU8) 4));
		if (!(LOC48)) goto LA50;
		LOC51 = 0;
		LOC51 = sonkind_318949(result, ((NI) 1));
		LOC48 = !((LOC51 == ((NU8) 4)));
		LA50: ;
		if (!LOC48) goto LA52;
		(*(*result).sons->data[((NI) 0)]).kind = ((NU8) 0);
	}
	LA52: ;
}

N_NIMCALL(Rstnode313008*, parsesectionwrapper_319091)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = newrstnode_313093(((NU8) 0));
	parsesection_316696(p, result);
	{
		while (1) {
			NIM_BOOL LOC3;
			NI LOC5;
			LOC3 = 0;
			LOC3 = ((*result).kind == ((NU8) 0));
			if (!(LOC3)) goto LA4;
			LOC5 = 0;
			LOC5 = len_313081(result);
			LOC3 = (LOC5 == ((NI) 1));
			LA4: ;
			if (!LOC3) goto LA2;
			result = (*result).sons->data[((NI) 0)];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(Rstnode313008*, parsedoc_318257)(Rstparser314482* p) {
	Rstnode313008* result;
	result = 0;
	result = parsesectionwrapper_319091(p);
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA3;
		rstmessage_314731((&(*p)), ((NU8) 4));
	}
	LA3: ;
	return result;
}

N_NIMCALL(Rstnode313008*, rstparse_320250)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, Findfilehandler314014 findfile, Msghandler314012 msghandler) {
	Rstnode313008* result;
	Rstparser314482 p;
	Sharedstate314478* LOC1;
	NI LOC2;
	Rstnode313008* LOC3;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI314482);
	LOC1 = 0;
	LOC1 = newsharedstate_314659(options, findfile, msghandler);
	initparser_314850((&p), LOC1);
	p.filename = copyString(filename);
	p.line = line;
	LOC2 = 0;
	LOC2 = gettokens_314342(text, ((options &(1U<<((NU)(((NU8) 0))&7U)))!=0), (&p.tok));
	p.col = (NI)(column + LOC2);
	LOC3 = 0;
	LOC3 = parsedoc_318257((&p));
	result = resolvesubs_320196((&p), LOC3);
	(*hastoc) = p.hastoc;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, docutils_rstInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, docutils_rstDatInit000)(void) {
static TNimNode* TMP2591[8];
static TNimNode* TMP2592[5];
static TNimNode* TMP2593[7];
NI TMP2595;
static char* NIM_CONST TMP2594[7] = {
"tkEof", 
"tkIndent", 
"tkWhite", 
"tkWord", 
"tkAdornment", 
"tkPunct", 
"tkOther"};
static TNimNode* TMP2597[9];
static TNimNode* TMP2598[4];
NI TMP2600;
static char* NIM_CONST TMP2599[4] = {
"roSkipPounds", 
"roSupportSmilies", 
"roSupportRawDirective", 
"roSupportMarkdown"};
static TNimNode* TMP2601[2];
static TNimNode* TMP2613[10];
NI TMP2615;
static char* NIM_CONST TMP2614[10] = {
"meCannotOpenFile", 
"meExpected", 
"meGridTableNotImplemented", 
"meNewSectionExpected", 
"meGeneralParseError", 
"meInvalidDirective", 
"mwRedefinitionOfLabel", 
"mwUnknownSubstitution", 
"mwUnsupportedLanguage", 
"mwUnsupportedField"};
static TNimNode* TMP2627[3];
NI TMP2629;
static char* NIM_CONST TMP2628[3] = {
"Hint", 
"Warning", 
"Error"};
static TNimNode* TMP2632[6];
static TNimNode TMP971[65];
NTI314482.size = sizeof(Rstparser314482);
NTI314482.kind = 17;
NTI314482.base = (&NTI3608);
TMP2591[0] = &TMP971[1];
TMP971[1].kind = 1;
TMP971[1].offset = offsetof(Rstparser314482, idx);
TMP971[1].typ = (&NTI104);
TMP971[1].name = "idx";
TMP2591[1] = &TMP971[2];
NTI314108.size = sizeof(Token314108);
NTI314108.kind = 18;
NTI314108.base = 0;
NTI314108.flags = 2;
TMP2592[0] = &TMP971[4];
NTI314106.size = sizeof(NU8);
NTI314106.kind = 14;
NTI314106.base = 0;
NTI314106.flags = 3;
for (TMP2595 = 0; TMP2595 < 7; TMP2595++) {
TMP971[TMP2595+5].kind = 1;
TMP971[TMP2595+5].offset = TMP2595;
TMP971[TMP2595+5].name = TMP2594[TMP2595];
TMP2593[TMP2595] = &TMP971[TMP2595+5];
}
TMP971[12].len = 7; TMP971[12].kind = 2; TMP971[12].sons = &TMP2593[0];
NTI314106.node = &TMP971[12];
TMP971[4].kind = 1;
TMP971[4].offset = offsetof(Token314108, kind);
TMP971[4].typ = (&NTI314106);
TMP971[4].name = "kind";
TMP2592[1] = &TMP971[13];
TMP971[13].kind = 1;
TMP971[13].offset = offsetof(Token314108, ival);
TMP971[13].typ = (&NTI104);
TMP971[13].name = "ival";
TMP2592[2] = &TMP971[14];
TMP971[14].kind = 1;
TMP971[14].offset = offsetof(Token314108, symbol);
TMP971[14].typ = (&NTI138);
TMP971[14].name = "symbol";
TMP2592[3] = &TMP971[15];
TMP971[15].kind = 1;
TMP971[15].offset = offsetof(Token314108, line);
TMP971[15].typ = (&NTI104);
TMP971[15].name = "line";
TMP2592[4] = &TMP971[16];
TMP971[16].kind = 1;
TMP971[16].offset = offsetof(Token314108, col);
TMP971[16].typ = (&NTI104);
TMP971[16].name = "col";
TMP971[3].len = 5; TMP971[3].kind = 2; TMP971[3].sons = &TMP2592[0];
NTI314108.node = &TMP971[3];
NTI314110.size = sizeof(Tokenseq314110*);
NTI314110.kind = 24;
NTI314110.base = (&NTI314108);
NTI314110.flags = 2;
NTI314110.marker = TMP2596;
TMP971[2].kind = 1;
TMP971[2].offset = offsetof(Rstparser314482, tok);
TMP971[2].typ = (&NTI314110);
TMP971[2].name = "tok";
TMP2591[2] = &TMP971[17];
NTI314478.size = sizeof(Sharedstate314478);
NTI314478.kind = 18;
NTI314478.base = 0;
NTI314478.flags = 2;
TMP2597[0] = &TMP971[19];
NTI314004.size = sizeof(NU8);
NTI314004.kind = 14;
NTI314004.base = 0;
NTI314004.flags = 3;
for (TMP2600 = 0; TMP2600 < 4; TMP2600++) {
TMP971[TMP2600+20].kind = 1;
TMP971[TMP2600+20].offset = TMP2600;
TMP971[TMP2600+20].name = TMP2599[TMP2600];
TMP2598[TMP2600] = &TMP971[TMP2600+20];
}
TMP971[24].len = 4; TMP971[24].kind = 2; TMP971[24].sons = &TMP2598[0];
NTI314004.node = &TMP971[24];
NTI314006.size = sizeof(NU8);
NTI314006.kind = 19;
NTI314006.base = (&NTI314004);
NTI314006.flags = 3;
TMP971[25].len = 0; TMP971[25].kind = 0;
NTI314006.node = &TMP971[25];
TMP971[19].kind = 1;
TMP971[19].offset = offsetof(Sharedstate314478, options);
TMP971[19].typ = (&NTI314006);
TMP971[19].name = "options";
TMP2597[1] = &TMP971[26];
TMP971[26].kind = 1;
TMP971[26].offset = offsetof(Sharedstate314478, ulevel);
TMP971[26].typ = (&NTI104);
TMP971[26].name = "uLevel";
TMP2597[2] = &TMP971[27];
TMP971[27].kind = 1;
TMP971[27].offset = offsetof(Sharedstate314478, olevel);
TMP971[27].typ = (&NTI104);
TMP971[27].name = "oLevel";
TMP2597[3] = &TMP971[28];
NTI314476.size = sizeof(Substitution314476);
NTI314476.kind = 18;
NTI314476.base = 0;
NTI314476.flags = 2;
TMP2601[0] = &TMP971[30];
TMP971[30].kind = 1;
TMP971[30].offset = offsetof(Substitution314476, key);
TMP971[30].typ = (&NTI138);
TMP971[30].name = "key";
TMP2601[1] = &TMP971[31];
TMP971[31].kind = 1;
TMP971[31].offset = offsetof(Substitution314476, value);
TMP971[31].typ = (&NTI313004);
TMP971[31].name = "value";
TMP971[29].len = 2; TMP971[29].kind = 2; TMP971[29].sons = &TMP2601[0];
NTI314476.node = &TMP971[29];
NTI314492.size = sizeof(TY314492*);
NTI314492.kind = 24;
NTI314492.base = (&NTI314476);
NTI314492.flags = 2;
NTI314492.marker = TMP2608;
TMP971[28].kind = 1;
TMP971[28].offset = offsetof(Sharedstate314478, subs);
TMP971[28].typ = (&NTI314492);
TMP971[28].name = "subs";
TMP2597[4] = &TMP971[32];
TMP971[32].kind = 1;
TMP971[32].offset = offsetof(Sharedstate314478, refs);
TMP971[32].typ = (&NTI314492);
TMP971[32].name = "refs";
TMP2597[5] = &TMP971[33];
TMP971[33].kind = 1;
TMP971[33].offset = offsetof(Sharedstate314478, underlinetolevel);
TMP971[33].typ = (&NTI100505);
TMP971[33].name = "underlineToLevel";
TMP2597[6] = &TMP971[34];
TMP971[34].kind = 1;
TMP971[34].offset = offsetof(Sharedstate314478, overlinetolevel);
TMP971[34].typ = (&NTI100505);
TMP971[34].name = "overlineToLevel";
TMP2597[7] = &TMP971[35];
NTI314012.size = sizeof(Msghandler314012);
NTI314012.kind = 25;
NTI314012.base = 0;
NTI314012.flags = 3;
TMP971[35].kind = 1;
TMP971[35].offset = offsetof(Sharedstate314478, msghandler);
TMP971[35].typ = (&NTI314012);
TMP971[35].name = "msgHandler";
TMP2597[8] = &TMP971[36];
NTI314014.size = sizeof(Findfilehandler314014);
NTI314014.kind = 25;
NTI314014.base = 0;
NTI314014.flags = 3;
TMP971[36].kind = 1;
TMP971[36].offset = offsetof(Sharedstate314478, findfile);
TMP971[36].typ = (&NTI314014);
TMP971[36].name = "findFile";
TMP971[18].len = 9; TMP971[18].kind = 2; TMP971[18].sons = &TMP2597[0];
NTI314478.node = &TMP971[18];
NTI314480.size = sizeof(Sharedstate314478*);
NTI314480.kind = 22;
NTI314480.base = (&NTI314478);
NTI314480.flags = 2;
NTI314480.marker = TMP2609;
TMP971[17].kind = 1;
TMP971[17].offset = offsetof(Rstparser314482, s);
TMP971[17].typ = (&NTI314480);
TMP971[17].name = "s";
TMP2591[3] = &TMP971[37];
NTI314503.size = sizeof(TY314503*);
NTI314503.kind = 24;
NTI314503.base = (&NTI104);
NTI314503.flags = 2;
NTI314503.marker = TMP2610;
TMP971[37].kind = 1;
TMP971[37].offset = offsetof(Rstparser314482, indentstack);
TMP971[37].typ = (&NTI314503);
TMP971[37].name = "indentStack";
TMP2591[4] = &TMP971[38];
TMP971[38].kind = 1;
TMP971[38].offset = offsetof(Rstparser314482, filename);
TMP971[38].typ = (&NTI138);
TMP971[38].name = "filename";
TMP2591[5] = &TMP971[39];
TMP971[39].kind = 1;
TMP971[39].offset = offsetof(Rstparser314482, line);
TMP971[39].typ = (&NTI104);
TMP971[39].name = "line";
TMP2591[6] = &TMP971[40];
TMP971[40].kind = 1;
TMP971[40].offset = offsetof(Rstparser314482, col);
TMP971[40].typ = (&NTI104);
TMP971[40].name = "col";
TMP2591[7] = &TMP971[41];
TMP971[41].kind = 1;
TMP971[41].offset = offsetof(Rstparser314482, hastoc);
TMP971[41].typ = (&NTI130);
TMP971[41].name = "hasToc";
TMP971[0].len = 8; TMP971[0].kind = 2; TMP971[0].sons = &TMP2591[0];
NTI314482.node = &TMP971[0];
NTI314010.size = sizeof(NU8);
NTI314010.kind = 14;
NTI314010.base = 0;
NTI314010.flags = 3;
for (TMP2615 = 0; TMP2615 < 10; TMP2615++) {
TMP971[TMP2615+42].kind = 1;
TMP971[TMP2615+42].offset = TMP2615;
TMP971[TMP2615+42].name = TMP2614[TMP2615];
TMP2613[TMP2615] = &TMP971[TMP2615+42];
}
TMP971[52].len = 10; TMP971[52].kind = 2; TMP971[52].sons = &TMP2613[0];
NTI314010.node = &TMP971[52];
NTI314008.size = sizeof(NU8);
NTI314008.kind = 14;
NTI314008.base = 0;
NTI314008.flags = 3;
for (TMP2629 = 0; TMP2629 < 3; TMP2629++) {
TMP971[TMP2629+53].kind = 1;
TMP971[TMP2629+53].offset = TMP2629;
TMP971[TMP2629+53].name = TMP2628[TMP2629];
TMP2627[TMP2629] = &TMP971[TMP2629+53];
}
TMP971[56].len = 3; TMP971[56].kind = 2; TMP971[56].sons = &TMP2627[0];
NTI314008.node = &TMP971[56];
NTI314484.size = sizeof(Eparseerror314484);
NTI314484.kind = 17;
NTI314484.base = (&NTI3646);
TMP971[57].len = 0; TMP971[57].kind = 2;
NTI314484.node = &TMP971[57];
NTI314633.size = sizeof(Eparseerror314484*);
NTI314633.kind = 22;
NTI314633.base = (&NTI314484);
NTI314633.marker = TMP2630;
NTI314112.size = sizeof(Lexer314112);
NTI314112.kind = 17;
NTI314112.base = (&NTI3608);
NTI314112.flags = 1;
TMP2632[0] = &TMP971[59];
TMP971[59].kind = 1;
TMP971[59].offset = offsetof(Lexer314112, buf);
TMP971[59].typ = (&NTI140);
TMP971[59].name = "buf";
TMP2632[1] = &TMP971[60];
TMP971[60].kind = 1;
TMP971[60].offset = offsetof(Lexer314112, bufpos);
TMP971[60].typ = (&NTI104);
TMP971[60].name = "bufpos";
TMP2632[2] = &TMP971[61];
TMP971[61].kind = 1;
TMP971[61].offset = offsetof(Lexer314112, line);
TMP971[61].typ = (&NTI104);
TMP971[61].name = "line";
TMP2632[3] = &TMP971[62];
TMP971[62].kind = 1;
TMP971[62].offset = offsetof(Lexer314112, col);
TMP971[62].typ = (&NTI104);
TMP971[62].name = "col";
TMP2632[4] = &TMP971[63];
TMP971[63].kind = 1;
TMP971[63].offset = offsetof(Lexer314112, baseindent);
TMP971[63].typ = (&NTI104);
TMP971[63].name = "baseIndent";
TMP2632[5] = &TMP971[64];
TMP971[64].kind = 1;
TMP971[64].offset = offsetof(Lexer314112, skippounds);
TMP971[64].typ = (&NTI130);
TMP971[64].name = "skipPounds";
TMP971[58].len = 6; TMP971[58].kind = 2; TMP971[58].sons = &TMP2632[0];
NTI314112.node = &TMP971[58];
}

