/* Generated by Nim Compiler v0.12.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 Rstnode330011 Rstnode330011;
typedef struct Rstnodeseq330009 Rstnodeseq330009;
typedef struct Rstparser331587 Rstparser331587;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tokenseq331143 Tokenseq331143;
typedef struct Sharedstate331583 Sharedstate331583;
typedef struct TY331608 TY331608;
typedef struct Token331141 Token331141;
typedef struct TY331597 TY331597;
typedef struct Substitution331581 Substitution331581;
typedef struct Cell48947 Cell48947;
typedef struct Cellseq48963 Cellseq48963;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellset48959 Cellset48959;
typedef struct Pagedesc48955 Pagedesc48955;
typedef struct Memregion30891 Memregion30891;
typedef struct Smallchunk30843 Smallchunk30843;
typedef struct Llchunk30885 Llchunk30885;
typedef struct Bigchunk30845 Bigchunk30845;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30889 Avlnode30889;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Eparseerror331589 Eparseerror331589;
typedef struct Valueerror4049 Valueerror4049;
typedef struct Exception Exception;
typedef struct Lexer331145 Lexer331145;
typedef struct Keyvaluepair144208 Keyvaluepair144208;
typedef struct TY129408 TY129408;
typedef struct Basechunk30841 Basechunk30841;
typedef struct Freecell30833 Freecell30833;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Rstnode330011  {
NU8 kind;
NimStringDesc* text;
NI level;
Rstnodeseq330009* sons;
};
typedef NU8 TY211407[32];
typedef N_NIMCALL_PTR(NimStringDesc*, Findfilehandler331023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, Msghandler331021) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef N_NIMCALL_PTR(void, TY3889) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3894) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3889 marker;
TY3894 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Rstparser331587  {
  TNimObject Sup;
NI idx;
Tokenseq331143* tok;
Sharedstate331583* s;
TY331608* 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  Token331141  {
NU8 kind;
NI ival;
NimStringDesc* symbol;
NI line;
NI col;
};
typedef NI Skiptable103393[256];
struct  Sharedstate331583  {
NU8 options;
NI ulevel;
NI olevel;
TY331597* subs;
TY331597* refs;
Skiptable103393 underlinetolevel;
Skiptable103393 overlinetolevel;
Msghandler331021 msghandler;
Findfilehandler331023 findfile;
};
struct  Substitution331581  {
NimStringDesc* key;
Rstnode330011* value;
};
struct  Cell48947  {
NI refcount;
TNimType* typ;
};
struct  Cellseq48963  {
NI len;
NI cap;
Cell48947** d;
};
struct  Cellset48959  {
NI counter;
NI max;
Pagedesc48955* head;
Pagedesc48955** data;
};
typedef Smallchunk30843* TY30906[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30891  {
NI minlargeobj;
NI maxlargeobj;
TY30906 freesmallchunks;
Llchunk30885* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30845* freechunkslist;
Intset30817 chunkstarts;
Avlnode30889* root;
Avlnode30889* deleted;
Avlnode30889* last;
Avlnode30889* freeavlnodes;
};
struct  Gcstat51014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap51018  {
Gcstack51016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq48963 zct;
Cellseq48963 decstack;
Cellset48959 cycleroots;
Cellseq48963 tempstack;
NI recgclock;
Memregion30891 region;
Gcstat51014 stat;
};
typedef NimStringDesc* TY331061[10];
typedef NimStringDesc* TY331816[5];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror4049  {
  Exception Sup;
};
struct  Eparseerror331589  {
  Valueerror4049 Sup;
};
typedef NimStringDesc* TY190421[1];
struct  Lexer331145  {
  TNimObject Sup;
NCSTRING buf;
NI bufpos;
NI line;
NI col;
NI baseindent;
NIM_BOOL skippounds;
};
typedef NimStringDesc* TY334092[13];
typedef N_NIMCALL_PTR(Rstnode330011*, Sectionparser337212) (Rstparser331587* p);
struct Keyvaluepair144208 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef Keyvaluepair144208 TY331099[34];
typedef NimStringDesc* TY336829[3];
typedef NI TY336834[3];
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30822[8];
struct  Pagedesc48955  {
Pagedesc48955* next;
NI key;
TY30822 bits;
};
struct  Basechunk30841  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30843  {
  Basechunk30841 Sup;
Smallchunk30843* next;
Smallchunk30843* prev;
Freecell30833* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30885  {
NI size;
NI acc;
Llchunk30885* next;
};
struct  Bigchunk30845  {
  Basechunk30841 Sup;
Bigchunk30845* next;
Bigchunk30845* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30822 bits;
};
typedef Avlnode30889* TY30896[2];
struct  Avlnode30889  {
TY30896 link;
NI key;
NI upperbound;
NI level;
};
struct  Freecell30833  {
Freecell30833* next;
NI zerofield;
};
struct Tokenseq331143 {
  TGenericSeq Sup;
  Token331141 data[SEQ_DECL_SIZE];
};
struct TY331597 {
  TGenericSeq Sup;
  Substitution331581 data[SEQ_DECL_SIZE];
};
struct TY331608 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY129408 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct Rstnodeseq330009 {
  TGenericSeq Sup;
  Rstnode330011* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, rstnodetorefnameaux_332169)(Rstnode330011* n, NimStringDesc** r, NIM_BOOL* b);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, len_330090)(Rstnode330011* n);
N_NIMCALL(void, addnodesaux_332108)(Rstnode330011* 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_331073)(Rstnode330011* n);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing, TY211407 chars);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2554)(void* p, NI op);
N_NIMCALL(void, TMP2566)(void* p, NI op);
N_NIMCALL(void, TMP2567)(void* p, NI op);
N_NIMCALL(void, TMP2568)(void* p, NI op);
N_NIMCALL(void, initparser_332068)(Rstparser331587* p, Sharedstate331583* sharedstate);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_85804, TNimType* mt);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Sharedstate331583*, newsharedstate_331877)(NU8 options, Findfilehandler331023 findfile, Msghandler331021 msghandler);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(Cell48947*, usrtocell_52646)(void* usr);
static N_INLINE(void, rtladdzct_54204)(Cell48947* c);
N_NOINLINE(void, addzct_52617)(Cellseq48963* s, Cell48947* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, defaultmsghandler_331807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(NU8, whichmsgclass_331627)(NU8 k);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_86859, 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, TMP2588)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
static N_INLINE(void, writeline_166405)(FILE* f, NimStringDesc** x, NI xLen0);
N_NIMCALL(void, write_16895)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, defaultfindfile_331867)(NimStringDesc* filename);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(NI, gettokens_331429)(NimStringDesc* buffer, NIM_BOOL skippounds, Tokenseq331143** tokens);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, rawgettok_331382)(Lexer331145* L, Token331141* tok);
N_NIMCALL(void, getthing_331174)(Lexer331145* L, Token331141* tok, TY211407 s);
N_NIMCALL(void, getindent_331357)(Lexer331145* L, Token331141* tok);
N_NIMCALL(NI, getindentaux_331263)(Lexer331145* L, NI start);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, getadornment_331224)(Lexer331145* L, Token331141* tok);
N_NIMCALL(Rstnode330011*, resolvesubs_338250)(Rstparser331587* p, Rstnode330011* n);
N_NIMCALL(NI, findsub_332292)(Rstparser331587* p, Rstnode330011* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, getenv_130044)(NimStringDesc* key);
N_NIMCALL(Rstnode330011*, newrstnode_330142)(NU8 kind, NimStringDesc* s);
N_NIMCALL(void, rstmessage_331943)(Rstparser331587* p, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(Rstnode330011*, findref_332487)(Rstparser331587* p, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, rstnodetorefname_331067)(Rstnode330011* n);
N_NIMCALL(Rstnode330011*, newrstnode_330108)(NU8 kind);
N_NIMCALL(void, add_330171)(Rstnode330011* father, Rstnode330011* son);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Rstnode330011*, parsedoc_336069)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsesectionwrapper_337109)(Rstparser331587* p);
N_NIMCALL(void, parsesection_334217)(Rstparser331587* p, Rstnode330011* result);
N_NIMCALL(NI, currind_332001)(Rstparser331587* p);
N_NIMCALL(void, pushind_332011)(Rstparser331587* p, NI ind);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, popind_332032)(Rstparser331587* p);
N_NIMCALL(NU8, whichsection_335302)(Rstparser331587* p);
N_NIMCALL(NIM_BOOL, match_332727)(Rstparser331587* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, allcharsinset_103130)(NimStringDesc* s, TY211407 theset);
N_NIMCALL(NI, tokenafternewline_335205)(Rstparser331587* p);
N_NIMCALL(NIM_BOOL, prednl_335251)(Rstparser331587* p);
N_NIMCALL(NIM_BOOL, islineblock_335240)(Rstparser331587* p);
N_NIMCALL(void, rstmessage_331967)(Rstparser331587* p, NU8 msgkind);
N_NIMCALL(NIM_BOOL, isdeflist_335270)(Rstparser331587* p);
N_NIMCALL(NIM_BOOL, isoptionlist_335292)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parseliteralblock_335099)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsebulletlist_336565)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parselineblock_335321)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsedotdot_335092)(Rstparser331587* p);
N_NIMCALL(NimStringDesc*, getdirective_333866)(Rstparser331587* p);
N_NIMCALL(NU8, getdirkind_334098)(NimStringDesc* s);
static N_INLINE(NI, find_334103)(TY334092 a, NimStringDesc* item);
N_NIMCALL(Rstnode330011*, dirinclude_337405)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsedirective_337372)(Rstparser331587* p, NU8 flags, Sectionparser337212 contentparser);
N_NIMCALL(Rstnode330011*, parsedirective_337229)(Rstparser331587* p, NU8 flags);
N_NIMCALL(Rstnode330011*, newleaf_332529)(Rstparser331587* p);
N_NIMCALL(void, parseline_334181)(Rstparser331587* p, Rstnode330011* father);
N_NIMCALL(void, parseinline_333752)(Rstparser331587* p, Rstnode330011* father);
N_NIMCALL(NIM_BOOL, isinlinemarkupstart_332680)(Rstparser331587* p, NimStringDesc* markup);
N_NIMCALL(void, parseuntil_333601)(Rstparser331587* p, Rstnode330011* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash);
N_NIMCALL(NIM_BOOL, isinlinemarkupend_332636)(Rstparser331587* p, NimStringDesc* markup);
N_NIMCALL(void, parsebackslash_333330)(Rstparser331587* p, Rstnode330011* father);
N_NIMCALL(void, rstmessage_331954)(Rstparser331587* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col);
N_NIMCALL(Rstnode330011*, parsemarkdowncodeblock_333686)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsepostfix_332992)(Rstparser331587* p, Rstnode330011* n);
N_NIMCALL(void, fixupembeddedref_332889)(Rstnode330011* n, Rstnode330011* a, Rstnode330011* b);
N_NIMCALL(void, setref_332426)(Rstparser331587* p, NimStringDesc* key, Rstnode330011* value);
N_NIMCALL(Rstnode330011*, parsesmiley_333079)(Rstparser331587* p);
N_NIMCALL(NI, matchverbatim_333033)(Rstparser331587* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_NIMCALL(void, parseurl_333281)(Rstparser331587* p, Rstnode330011* father);
N_NIMCALL(NIM_BOOL, isurl_333201)(Rstparser331587* p, NI i);
static N_INLINE(NIM_BOOL, contains_333219)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
static N_INLINE(NI, find_333229)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
N_NIMCALL(Rstnode330011*, parsefields_334258)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsefield_334225)(Rstparser331587* p);
N_NIMCALL(NIM_BOOL, indfollows_337353)(Rstparser331587* p);
N_NIMCALL(NimStringDesc*, getfieldvalue_331079)(Rstnode330011* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, readfile_16872)(NimStringDesc* filename);
N_NIMCALL(Rstnode330011*, dirimage_338007)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, dirfigure_338019)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, dirtitle_338031)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, dircontainer_337608)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, dircontents_338043)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, dirraw_338085)(Rstparser331587* p);
N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, dirrawaux_338068)(Rstparser331587* p, Rstnode330011** result, NU8 kind, Sectionparser337212 contentparser);
N_NIMCALL(Rstnode330011*, parsedirbody_337393)(Rstparser331587* p, Sectionparser337212 contentparser);
N_NIMCALL(Rstnode330011*, dircodeblock_337434)(Rstparser331587* p, NIM_BOOL nimrodextension);
N_NIMCALL(Rstnode330011*, dirindex_338055)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, getreferencename_332540)(Rstparser331587* p, NimStringDesc* endstr);
N_NIMCALL(Rstnode330011*, untileol_332578)(Rstparser331587* p);
N_NIMCALL(void, expect_332616)(Rstparser331587* p, NimStringDesc* tok);
N_NIMCALL(void, setsub_332365)(Rstparser331587* p, NimStringDesc* key, Rstnode330011* value);
N_NIMCALL(Rstnode330011*, parsecomment_333986)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parseenumlist_336822)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsedefinitionlist_336734)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsetransition_336425)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parseheadline_335449)(Rstparser331587* p);
N_NIMCALL(void, parseuntilnewline_334199)(Rstparser331587* p, Rstnode330011* father);
N_NIMCALL(NI, getlevel_335182)(NI* map, NI* lvl, NIM_CHAR c);
N_NIMCALL(Rstnode330011*, parseoverline_336481)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parsesimpletable_336076)(Rstparser331587* p);
N_NIMCALL(void, getcolumns_335838)(Rstparser331587* p, TY331608** cols);
N_NIMCALL(NI, tokend_335828)(Rstparser331587* p);
N_NIMCALL(Rstnode330011*, parseoptionlist_336631)(Rstparser331587* p);
N_NIMCALL(void, parseparagraph_335386)(Rstparser331587* p, Rstnode330011* result);
N_NIMCALL(void, addifnotnil_330191)(Rstnode330011* father, Rstnode330011* son);
N_NIMCALL(NU8, sonkind_336906)(Rstnode330011* father, NI i);
STRING_LITERAL(TMP2203, "", 0);
STRING_LITERAL(TMP2293, "\001\001", 2);
static NIM_CONST TY211407 TMP2314 = {
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];
} CNSTSEQ2571 = {{1, 1}, {((NI) 0)}};
NIM_CONST TY331608* TMP2569 = ((TY331608*)&CNSTSEQ2571);
STRING_LITERAL(TMP2574, "cannot open \'$1\'", 16);
STRING_LITERAL(TMP2575, "\'$1\' expected", 13);
STRING_LITERAL(TMP2576, "grid table is not implemented", 29);
STRING_LITERAL(TMP2577, "new section expected", 20);
STRING_LITERAL(TMP2578, "general parse error", 19);
STRING_LITERAL(TMP2579, "invalid directive: \'$1\'", 23);
STRING_LITERAL(TMP2580, "redefinition of label \'$1\'", 26);
STRING_LITERAL(TMP2581, "unknown substitution \'$1\'", 25);
STRING_LITERAL(TMP2582, "language \'$1\' not supported", 27);
STRING_LITERAL(TMP2583, "field \'$1\' not supported", 24);
NIM_CONST TY331061 messages_331058 = {((NimStringDesc*) &TMP2574),
((NimStringDesc*) &TMP2575),
((NimStringDesc*) &TMP2576),
((NimStringDesc*) &TMP2577),
((NimStringDesc*) &TMP2578),
((NimStringDesc*) &TMP2579),
((NimStringDesc*) &TMP2580),
((NimStringDesc*) &TMP2581),
((NimStringDesc*) &TMP2582),
((NimStringDesc*) &TMP2583)}
;
STRING_LITERAL(TMP2584, "$1($2, $3) $4: $5", 17);
STRING_LITERAL(TMP2589, "\012", 1);
static NIM_CONST TY211407 TMP2591 = {
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 TY211407 TMP2592 = {
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(TMP2593, "#", 1);
static NIM_CONST TY211407 TMP2594 = {
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(TMP2595, "ii", 2);
STRING_LITERAL(TMP2596, " a", 2);
STRING_LITERAL(TMP2597, "i", 1);
STRING_LITERAL(TMP2598, "ai", 2);
STRING_LITERAL(TMP2599, "::", 2);
STRING_LITERAL(TMP2600, "+", 1);
STRING_LITERAL(TMP2601, "*", 1);
STRING_LITERAL(TMP2602, "-", 1);
STRING_LITERAL(TMP2603, "|", 1);
STRING_LITERAL(TMP2604, "..", 2);
STRING_LITERAL(TMP2605, ":w:", 3);
STRING_LITERAL(TMP2606, "(e) ", 4);
STRING_LITERAL(TMP2607, "+a+", 3);
STRING_LITERAL(TMP2608, "-w", 2);
STRING_LITERAL(TMP2609, "--w", 3);
STRING_LITERAL(TMP2610, "/w", 2);
STRING_LITERAL(TMP2611, "//w", 3);
STRING_LITERAL(TMP2612, "e) ", 3);
STRING_LITERAL(TMP2613, "e. ", 3);
STRING_LITERAL(TMP2614, "author", 6);
STRING_LITERAL(TMP2615, "authors", 7);
STRING_LITERAL(TMP2616, "code", 4);
STRING_LITERAL(TMP2617, "code-block", 10);
STRING_LITERAL(TMP2618, "container", 9);
STRING_LITERAL(TMP2619, "contents", 8);
STRING_LITERAL(TMP2620, "figure", 6);
STRING_LITERAL(TMP2621, "image", 5);
STRING_LITERAL(TMP2622, "include", 7);
STRING_LITERAL(TMP2623, "index", 5);
STRING_LITERAL(TMP2624, "raw", 3);
STRING_LITERAL(TMP2625, "title", 5);
NIM_CONST TY334092 Dirids_334090 = {((NimStringDesc*) &TMP2203),
((NimStringDesc*) &TMP2614),
((NimStringDesc*) &TMP2615),
((NimStringDesc*) &TMP2616),
((NimStringDesc*) &TMP2617),
((NimStringDesc*) &TMP2618),
((NimStringDesc*) &TMP2619),
((NimStringDesc*) &TMP2620),
((NimStringDesc*) &TMP2621),
((NimStringDesc*) &TMP2622),
((NimStringDesc*) &TMP2623),
((NimStringDesc*) &TMP2624),
((NimStringDesc*) &TMP2625)}
;
static NIM_CONST TY211407 TMP2626 = {
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(TMP2627, "\\", 1);
STRING_LITERAL(TMP2628, "***", 3);
static NIM_CONST TY211407 TMP2629 = {
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(TMP2630, "``", 2);
STRING_LITERAL(TMP2631, "\\\\", 2);
STRING_LITERAL(TMP2632, " ", 1);
STRING_LITERAL(TMP2633, "**", 2);
STRING_LITERAL(TMP2634, "```", 3);
STRING_LITERAL(TMP2635, "`", 1);
STRING_LITERAL(TMP2636, "_", 1);
STRING_LITERAL(TMP2637, "__", 2);
STRING_LITERAL(TMP2638, ">", 1);
STRING_LITERAL(TMP2639, "<", 1);
STRING_LITERAL(TMP2640, "idx", 3);
STRING_LITERAL(TMP2641, "literal", 7);
STRING_LITERAL(TMP2642, "strong", 6);
STRING_LITERAL(TMP2643, "emphasis", 8);
STRING_LITERAL(TMP2644, "sub", 3);
STRING_LITERAL(TMP2645, "subscript", 9);
STRING_LITERAL(TMP2646, "sup", 3);
STRING_LITERAL(TMP2647, "supscript", 9);
STRING_LITERAL(TMP2648, ":D", 2);
STRING_LITERAL(TMP2649, "icon_e_biggrin", 14);
STRING_LITERAL(TMP2650, ":-D", 3);
STRING_LITERAL(TMP2651, ":)", 2);
STRING_LITERAL(TMP2652, "icon_e_smile", 12);
STRING_LITERAL(TMP2653, ":-)", 3);
STRING_LITERAL(TMP2654, ";)", 2);
STRING_LITERAL(TMP2655, "icon_e_wink", 11);
STRING_LITERAL(TMP2656, ";-)", 3);
STRING_LITERAL(TMP2657, ":(", 2);
STRING_LITERAL(TMP2658, "icon_e_sad", 10);
STRING_LITERAL(TMP2659, ":-(", 3);
STRING_LITERAL(TMP2660, ":o", 2);
STRING_LITERAL(TMP2661, "icon_e_surprised", 16);
STRING_LITERAL(TMP2662, ":-o", 3);
STRING_LITERAL(TMP2663, ":shock:", 7);
STRING_LITERAL(TMP2664, "icon_eek", 8);
STRING_LITERAL(TMP2665, ":?", 2);
STRING_LITERAL(TMP2666, "icon_e_confused", 15);
STRING_LITERAL(TMP2667, ":-?", 3);
STRING_LITERAL(TMP2668, ":-/", 3);
STRING_LITERAL(TMP2669, "8-)", 3);
STRING_LITERAL(TMP2670, "icon_cool", 9);
STRING_LITERAL(TMP2671, ":lol:", 5);
STRING_LITERAL(TMP2672, "icon_lol", 8);
STRING_LITERAL(TMP2673, ":x", 2);
STRING_LITERAL(TMP2674, "icon_mad", 8);
STRING_LITERAL(TMP2675, ":-x", 3);
STRING_LITERAL(TMP2676, ":P", 2);
STRING_LITERAL(TMP2677, "icon_razz", 9);
STRING_LITERAL(TMP2678, ":-P", 3);
STRING_LITERAL(TMP2679, ":oops:", 6);
STRING_LITERAL(TMP2680, "icon_redface", 12);
STRING_LITERAL(TMP2681, ":cry:", 5);
STRING_LITERAL(TMP2682, "icon_cry", 8);
STRING_LITERAL(TMP2683, ":evil:", 6);
STRING_LITERAL(TMP2684, "icon_evil", 9);
STRING_LITERAL(TMP2685, ":twisted:", 9);
STRING_LITERAL(TMP2686, "icon_twisted", 12);
STRING_LITERAL(TMP2687, ":roll:", 6);
STRING_LITERAL(TMP2688, "icon_rolleyes", 13);
STRING_LITERAL(TMP2689, ":!:", 3);
STRING_LITERAL(TMP2690, "icon_exclaim", 12);
STRING_LITERAL(TMP2691, ":?:", 3);
STRING_LITERAL(TMP2692, "icon_question", 13);
STRING_LITERAL(TMP2693, ":idea:", 6);
STRING_LITERAL(TMP2694, "icon_idea", 9);
STRING_LITERAL(TMP2695, ":arrow:", 7);
STRING_LITERAL(TMP2696, "icon_arrow", 10);
STRING_LITERAL(TMP2697, ":|", 2);
STRING_LITERAL(TMP2698, "icon_neutral", 12);
STRING_LITERAL(TMP2699, ":-|", 3);
STRING_LITERAL(TMP2700, ":mrgreen:", 9);
STRING_LITERAL(TMP2701, "icon_mrgreen", 12);
STRING_LITERAL(TMP2702, ":geek:", 6);
STRING_LITERAL(TMP2703, "icon_e_geek", 11);
STRING_LITERAL(TMP2704, ":ugeek:", 7);
STRING_LITERAL(TMP2705, "icon_e_ugeek", 12);
NIM_CONST TY331099 Smilies_331098 = {{((NimStringDesc*) &TMP2648),
((NimStringDesc*) &TMP2649)}
,
{((NimStringDesc*) &TMP2650),
((NimStringDesc*) &TMP2649)}
,
{((NimStringDesc*) &TMP2651),
((NimStringDesc*) &TMP2652)}
,
{((NimStringDesc*) &TMP2653),
((NimStringDesc*) &TMP2652)}
,
{((NimStringDesc*) &TMP2654),
((NimStringDesc*) &TMP2655)}
,
{((NimStringDesc*) &TMP2656),
((NimStringDesc*) &TMP2655)}
,
{((NimStringDesc*) &TMP2657),
((NimStringDesc*) &TMP2658)}
,
{((NimStringDesc*) &TMP2659),
((NimStringDesc*) &TMP2658)}
,
{((NimStringDesc*) &TMP2660),
((NimStringDesc*) &TMP2661)}
,
{((NimStringDesc*) &TMP2662),
((NimStringDesc*) &TMP2661)}
,
{((NimStringDesc*) &TMP2663),
((NimStringDesc*) &TMP2664)}
,
{((NimStringDesc*) &TMP2665),
((NimStringDesc*) &TMP2666)}
,
{((NimStringDesc*) &TMP2667),
((NimStringDesc*) &TMP2666)}
,
{((NimStringDesc*) &TMP2668),
((NimStringDesc*) &TMP2666)}
,
{((NimStringDesc*) &TMP2669),
((NimStringDesc*) &TMP2670)}
,
{((NimStringDesc*) &TMP2671),
((NimStringDesc*) &TMP2672)}
,
{((NimStringDesc*) &TMP2673),
((NimStringDesc*) &TMP2674)}
,
{((NimStringDesc*) &TMP2675),
((NimStringDesc*) &TMP2674)}
,
{((NimStringDesc*) &TMP2676),
((NimStringDesc*) &TMP2677)}
,
{((NimStringDesc*) &TMP2678),
((NimStringDesc*) &TMP2677)}
,
{((NimStringDesc*) &TMP2679),
((NimStringDesc*) &TMP2680)}
,
{((NimStringDesc*) &TMP2681),
((NimStringDesc*) &TMP2682)}
,
{((NimStringDesc*) &TMP2683),
((NimStringDesc*) &TMP2684)}
,
{((NimStringDesc*) &TMP2685),
((NimStringDesc*) &TMP2686)}
,
{((NimStringDesc*) &TMP2687),
((NimStringDesc*) &TMP2688)}
,
{((NimStringDesc*) &TMP2689),
((NimStringDesc*) &TMP2690)}
,
{((NimStringDesc*) &TMP2691),
((NimStringDesc*) &TMP2692)}
,
{((NimStringDesc*) &TMP2693),
((NimStringDesc*) &TMP2694)}
,
{((NimStringDesc*) &TMP2695),
((NimStringDesc*) &TMP2696)}
,
{((NimStringDesc*) &TMP2697),
((NimStringDesc*) &TMP2698)}
,
{((NimStringDesc*) &TMP2699),
((NimStringDesc*) &TMP2698)}
,
{((NimStringDesc*) &TMP2700),
((NimStringDesc*) &TMP2701)}
,
{((NimStringDesc*) &TMP2702),
((NimStringDesc*) &TMP2703)}
,
{((NimStringDesc*) &TMP2704),
((NimStringDesc*) &TMP2705)}
}
;
STRING_LITERAL(TMP2706, ":", 1);
STRING_LITERAL(TMP2707, "//", 2);
STRING_LITERAL(TMP2709, "http", 4);
STRING_LITERAL(TMP2710, "https", 5);
STRING_LITERAL(TMP2711, "ftp", 3);
STRING_LITERAL(TMP2712, "telnet", 6);
STRING_LITERAL(TMP2713, "file", 4);
NIM_CONST TY331816 TMP2708 = {((NimStringDesc*) &TMP2709),
((NimStringDesc*) &TMP2710),
((NimStringDesc*) &TMP2711),
((NimStringDesc*) &TMP2712),
((NimStringDesc*) &TMP2713)}
;
STRING_LITERAL(TMP2714, "html", 4);
STRING_LITERAL(TMP2715, "latex", 5);
STRING_LITERAL(TMP2716, "default-language", 16);
STRING_LITERAL(TMP2717, "Nimrod", 6);
STRING_LITERAL(TMP2718, " _", 2);
STRING_LITERAL(TMP2719, " |", 2);
STRING_LITERAL(TMP2720, "replace", 7);
STRING_LITERAL(TMP2721, " [", 2);
STRING_LITERAL(TMP2722, "]", 1);
NIM_CONST TY336829 wildcards_336827 = {((NimStringDesc*) &TMP2606),
((NimStringDesc*) &TMP2612),
((NimStringDesc*) &TMP2613)}
;
NIM_CONST TY336834 wildpos_336832 = {((NI) 1),
((NI) 0),
((NI) 0)}
;
extern TNimType NTI4011; /* RootObj */
TNimType NTI331587; /* RstParser */
extern TNimType NTI108; /* int */
TNimType NTI331141; /* Token */
TNimType NTI331139; /* TokType */
extern TNimType NTI149; /* string */
TNimType NTI331143; /* TokenSeq */
TNimType NTI331583; /* SharedState */
TNimType NTI331013; /* RstParseOption */
TNimType NTI331015; /* RstParseOptions */
TNimType NTI331581; /* Substitution */
extern TNimType NTI330007; /* PRstNode */
TNimType NTI331597; /* seq[Substitution] */
extern TNimType NTI103393; /* SkipTable */
TNimType NTI331021; /* MsgHandler */
TNimType NTI331023; /* FindFileHandler */
TNimType NTI331585; /* PSharedState */
TNimType NTI331608; /* seq[int] */
extern TNimType NTI138; /* bool */
extern Gcheap51018 gch_51059;
TNimType NTI331019; /* MsgKind */
TNimType NTI331017; /* MsgClass */
extern TNimType NTI4049; /* ValueError */
TNimType NTI331589; /* EParseError */
TNimType NTI331839; /* ref EParseError */
TNimType NTI331145; /* Lexer */
extern TNimType NTI151; /* cstring */
extern TNimType NTI129408; /* seq[string] */

N_NIMCALL(void, rstnodetorefnameaux_332169)(Rstnode330011* n, NimStringDesc** r, NIM_BOOL* b) {
	{
		if (!((*n).kind == ((NU8) 64))) goto LA3;
		{
			NI i_332197;
			NI HEX3Atmp_332240;
			NI res_332243;
			i_332197 = 0;
			HEX3Atmp_332240 = 0;
			HEX3Atmp_332240 = (NI)(((*n).text ? (*n).text->Sup.len : 0) - ((NI) 1));
			res_332243 = ((NI) 0);
			{
				while (1) {
					if (!(res_332243 <= HEX3Atmp_332240)) goto LA7;
					i_332197 = res_332243;
					switch (((NU8)((*n).text->data[i_332197]))) {
					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_332197]);
					}
					break;
					case 97 ... 122:
					{
						{
							if (!(*b)) goto LA20;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA20: ;
						(*r) = addChar((*r), (*n).text->data[i_332197]);
					}
					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_332197])))) - ((NI) 65)))) + ((NI) 97)))))));
					}
					break;
					default:
					{
						{
							if (!(((NI) 0) < ((*r) ? (*r)->Sup.len : 0))) goto LA30;
							(*b) = NIM_TRUE;
						}
						LA30: ;
					}
					break;
					}
					res_332243 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_332238;
			NI HEX3Atmp_332248;
			NI LOC34;
			NI res_332251;
			i_332238 = 0;
			HEX3Atmp_332248 = 0;
			LOC34 = 0;
			LOC34 = len_330090(n);
			HEX3Atmp_332248 = (NI)(LOC34 - ((NI) 1));
			res_332251 = ((NI) 0);
			{
				while (1) {
					if (!(res_332251 <= HEX3Atmp_332248)) goto LA36;
					i_332238 = res_332251;
					rstnodetorefnameaux_332169((*n).sons->data[i_332238], r, b);
					res_332251 += ((NI) 1);
				} LA36: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, rstnodetorefname_331067)(Rstnode330011* n) {
	NimStringDesc* result;
	NIM_BOOL b;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2203));
	b = NIM_FALSE;
	rstnodetorefnameaux_332169(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_332108)(Rstnode330011* 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_332134;
			NI HEX3Atmp_332136;
			NI LOC7;
			NI res_332139;
			i_332134 = 0;
			HEX3Atmp_332136 = 0;
			LOC7 = 0;
			LOC7 = len_330090(n);
			HEX3Atmp_332136 = (NI)(LOC7 - ((NI) 1));
			res_332139 = ((NI) 0);
			{
				while (1) {
					if (!(res_332139 <= HEX3Atmp_332136)) goto LA9;
					i_332134 = res_332139;
					addnodesaux_332108((*n).sons->data[i_332134], result);
					res_332139 += ((NI) 1);
				} LA9: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, addnodes_331073)(Rstnode330011* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2203));
	addnodesaux_332108(n, (&result));
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_331079)(Rstnode330011* n, NimStringDesc* fieldname) {
	NimStringDesc* result;
{	result = 0;
	result = copyString(((NimStringDesc*) &TMP2203));
	{
		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_335045;
		NI HEX3Atmp_335048;
		NI LOC10;
		NI res_335051;
		i_335045 = 0;
		HEX3Atmp_335048 = 0;
		LOC10 = 0;
		LOC10 = len_330090((*n).sons->data[((NI) 1)]);
		HEX3Atmp_335048 = (NI)(LOC10 - ((NI) 1));
		res_335051 = ((NI) 0);
		{
			while (1) {
				Rstnode330011* f;
				if (!(res_335051 <= HEX3Atmp_335048)) goto LA12;
				i_335045 = res_335051;
				f = (*(*n).sons->data[((NI) 1)]).sons->data[i_335045];
				{
					NimStringDesc* LOC15;
					NI LOC16;
					LOC15 = 0;
					LOC15 = addnodes_331073((*f).sons->data[((NI) 0)]);
					LOC16 = 0;
					LOC16 = nsuCmpIgnoreStyle(LOC15, fieldname);
					if (!(LOC16 == ((NI) 0))) goto LA17;
					result = addnodes_331073((*f).sons->data[((NI) 1)]);
					{
						if (!((result) && (result)->Sup.len == 0)) goto LA21;
						result = copyString(((NimStringDesc*) &TMP2293));
					}
					LA21: ;
					goto BeforeRet;
				}
				LA17: ;
				res_335051 += ((NI) 1);
			} LA12: ;
		}
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getargument_331086)(Rstnode330011* n) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*n).sons->data[((NI) 0)] == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP2203));
	}
	goto LA1;
	LA3: ;
	{
		result = addnodes_331073((*n).sons->data[((NI) 0)]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_334314)(Rstnode330011* n) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = addnodes_331073((*n).sons->data[((NI) 1)]);
	result = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2314);
	return result;
}
N_NIMCALL(void, TMP2554)(void* p, NI op) {
	Tokenseq331143* a;
	NI LOC1;
	a = (Tokenseq331143*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].symbol, op);
	}
}
N_NIMCALL(void, TMP2566)(void* p, NI op) {
	TY331597* a;
	NI LOC1;
	a = (TY331597*)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, TMP2567)(void* p, NI op) {
	Sharedstate331583* a;
	NI LOC1;
	NI LOC2;
	a = (Sharedstate331583*)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, TMP2568)(void* p, NI op) {
	TY331608* a;
	NI LOC1;
	a = (TY331608*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, initparser_332068)(Rstparser331587* p, Sharedstate331583* sharedstate) {
	genericSeqAssign((&(*p).indentstack), TMP2569, (&NTI331608));
	unsureAsgnRef((void**) (&(*p).tok), (Tokenseq331143*) newSeq((&NTI331143), 0));
	(*p).idx = ((NI) 0);
	unsureAsgnRef((void**) (&(*p).filename), copyString(((NimStringDesc*) &TMP2203)));
	(*p).hastoc = NIM_FALSE;
	(*p).col = ((NI) 0);
	(*p).line = ((NI) 1);
	unsureAsgnRef((void**) (&(*p).s), sharedstate);
}

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

static N_INLINE(void, rtladdzct_54204)(Cell48947* c) {
	addzct_52617((&gch_51059.zct), c);
}

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

N_NIMCALL(NU8, whichmsgclass_331627)(NU8 k) {
	NU8 result;
	result = 0;
	switch (((NU8)(reprEnum(k, (&NTI331019))->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, TMP2588)(void* p, NI op) {
	Eparseerror331589* a;
	a = (Eparseerror331589*)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_166405)(FILE* f, NimStringDesc** x, NI xLen0) {
	{
		NimStringDesc* i_166421;
		NI i_166429;
		i_166421 = 0;
		i_166429 = ((NI) 0);
		{
			while (1) {
				if (!(i_166429 < xLen0)) goto LA3;
				i_166421 = x[i_166429];
				write_16895(f, i_166421);
				i_166429 += ((NI) 1);
			} LA3: ;
		}
	}
	write_16895(f, ((NimStringDesc*) &TMP2589));
}

N_NIMCALL(void, defaultmsghandler_331807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU8 mc;
	NimStringDesc* a;
	NimStringDesc* message;
	TY331816 LOC1;
	mc = whichmsgclass_331627(msgkind);
	a = nsuFormatSingleElem(messages_331058[(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, (&NTI331017)));
	LOC1[4] = copyString(a);
	message = nsuFormatOpenArray(((NimStringDesc*) &TMP2584), LOC1, 5);
	{
		Eparseerror331589* e_331838;
		NimStringDesc* LOC6;
		if (!(mc == ((NU8) 2))) goto LA4;
		e_331838 = 0;
		e_331838 = (Eparseerror331589*) newObj((&NTI331839), sizeof(Eparseerror331589));
		(*e_331838).Sup.Sup.Sup.m_type = (&NTI331589);
		LOC6 = 0;
		LOC6 = (*e_331838).Sup.Sup.message; (*e_331838).Sup.Sup.message = copyStringRC1(message);
		if (LOC6) nimGCunrefNoCycle(LOC6);
		raiseException((Exception*)e_331838, "EParseError");
	}
	goto LA2;
	LA4: ;
	{
		TY190421 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(message);
		writeline_166405(stdout, LOC8, 1);
	}
	LA2: ;
}

N_NIMCALL(NimStringDesc*, defaultfindfile_331867)(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*) &TMP2203));
	}
	LA1: ;
	return result;
}

N_NIMCALL(Sharedstate331583*, newsharedstate_331877)(NU8 options, Findfilehandler331023 findfile, Msghandler331021 msghandler) {
	Sharedstate331583* result;
	result = 0;
	result = (Sharedstate331583*) newObj((&NTI331585), sizeof(Sharedstate331583));
	if ((*result).subs) nimGCunrefNoCycle((*result).subs);
	(*result).subs = (TY331597*) newSeqRC1((&NTI331597), 0);
	if ((*result).refs) nimGCunrefNoCycle((*result).refs);
	(*result).refs = (TY331597*) newSeqRC1((&NTI331597), 0);
	(*result).options = options;
	{
		if (!!(msghandler == 0)) goto LA3;
		(*result).msghandler = msghandler;
	}
	goto LA1;
	LA3: ;
	{
		(*result).msghandler = defaultmsghandler_331807;
	}
	LA1: ;
	{
		if (!!(findfile == 0)) goto LA8;
		(*result).findfile = findfile;
	}
	goto LA6;
	LA8: ;
	{
		(*result).findfile = defaultfindfile_331867;
	}
	LA6: ;
	return result;
}

N_NIMCALL(void, getthing_331174)(Lexer331145* L, Token331141* tok, TY211407 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[((NU8)((*L).buf[pos]))/8] &(1<<(((NU8)((*L).buf[pos]))%8)))!=0))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*L).col += (NI)(pos - (*L).bufpos);
	(*L).bufpos = pos;
}

N_NIMCALL(NI, getindentaux_331263)(Lexer331145* 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_331263(L, pos);
	}
	goto LA30;
	LA37: ;
	LA30: ;
	(*L).bufpos = pos;
	return result;
}

N_NIMCALL(void, getindent_331357)(Lexer331145* L, Token331141* tok) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	(*tok).col = ((NI) 0);
	(*tok).kind = ((NU8) 1);
	(*tok).ival = getindentaux_331263(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*) &TMP2589));
appendString(LOC1, LOC2);
	unsureAsgnRef((void**) (&(*tok).symbol), LOC1);
}

N_NIMCALL(void, getadornment_331224)(Lexer331145* L, Token331141* 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_331382)(Lexer331145* L, Token331141* tok) {
	NIM_CHAR c;
	unsureAsgnRef((void**) (&(*tok).symbol), copyString(((NimStringDesc*) &TMP2203)));
	(*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_331174(L, tok, TMP2591);
	}
	break;
	case 32:
	case 9:
	case 11:
	case 12:
	{
		getthing_331174(L, tok, TMP2592);
		(*tok).kind = ((NU8) 2);
		{
			if (!(((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(13)) || ((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(10)))) goto LA5;
			rawgettok_331382(L, tok);
		}
		LA5: ;
	}
	break;
	case 13:
	case 10:
	{
		getindent_331357(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_331224(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_331429)(NimStringDesc* buffer, NIM_BOOL skippounds, Tokenseq331143** tokens) {
	NI result;
	Lexer331145 L;
	NI length;
	result = 0;
	memset((void*)(&L), 0, sizeof(L));
	L.Sup.m_type = (&NTI331145);
	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) = (Tokenseq331143*) setLengthSeq(&((*tokens))->Sup, sizeof(Token331141), ((NI) (length)));
			rawgettok_331382((&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_332292)(Rstparser331587* p, Rstnode330011* n) {
	NI result;
	NimStringDesc* key;
{	result = 0;
	key = addnodes_331073(n);
	{
		NI i_332311;
		NI HEX3Atmp_332326;
		NI res_332329;
		i_332311 = 0;
		HEX3Atmp_332326 = 0;
		HEX3Atmp_332326 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_332329 = ((NI) 0);
		{
			while (1) {
				if (!(res_332329 <= HEX3Atmp_332326)) goto LA3;
				i_332311 = res_332329;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_332311].key)) goto LA6;
					result = i_332311;
					goto BeforeRet;
				}
				LA6: ;
				res_332329 += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NI i_332324;
		NI HEX3Atmp_332334;
		NI res_332337;
		i_332324 = 0;
		HEX3Atmp_332334 = 0;
		HEX3Atmp_332334 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_332337 = ((NI) 0);
		{
			while (1) {
				if (!(res_332337 <= HEX3Atmp_332334)) goto LA10;
				i_332324 = res_332337;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = nsuCmpIgnoreStyle(key, (*(*p).s).subs->data[i_332324].key);
					if (!(LOC13 == ((NI) 0))) goto LA14;
					result = i_332324;
					goto BeforeRet;
				}
				LA14: ;
				res_332337 += ((NI) 1);
			} LA10: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rstmessage_331943)(Rstparser331587* 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(Rstnode330011*, findref_332487)(Rstparser331587* p, NimStringDesc* key) {
	Rstnode330011* result;
{	result = 0;
	{
		NI i_332505;
		NI HEX3Atmp_332507;
		NI res_332510;
		i_332505 = 0;
		HEX3Atmp_332507 = 0;
		HEX3Atmp_332507 = ((*(*p).s).refs ? ((*(*p).s).refs->Sup.len-1) : -1);
		res_332510 = ((NI) 0);
		{
			while (1) {
				if (!(res_332510 <= HEX3Atmp_332507)) goto LA3;
				i_332505 = res_332510;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_332505].key)) goto LA6;
					result = (*(*p).s).refs->data[i_332505].value;
					goto BeforeRet;
				}
				LA6: ;
				res_332510 += ((NI) 1);
			} LA3: ;
		}
	}
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(Rstnode330011*, resolvesubs_338250)(Rstparser331587* p, Rstnode330011* n) {
	Rstnode330011* result;
{	result = 0;
	result = n;
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).kind) {
	case ((NU8) 62):
	{
		NI x;
		x = findsub_332292(p, n);
		{
			if (!(((NI) 0) <= x)) goto LA8;
			result = (*(*p).s).subs->data[x].value;
		}
		goto LA6;
		LA8: ;
		{
			NimStringDesc* key;
			NimStringDesc* e;
			key = addnodes_331073(n);
			e = getenv_130044(key);
			{
				if (!!(((e) && (e)->Sup.len == 0))) goto LA13;
				result = newrstnode_330142(((NU8) 64), e);
			}
			goto LA11;
			LA13: ;
			{
				rstmessage_331943((&(*p)), ((NU8) 7), key);
			}
			LA11: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 39):
	{
		Rstnode330011* y;
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rstnodetorefname_331067(n);
		y = findref_332487(p, LOC17);
		{
			if (!!((y == NIM_NIL))) goto LA20;
			result = newrstnode_330108(((NU8) 38));
			(*n).kind = ((NU8) 0);
			add_330171(result, n);
			add_330171(result, y);
		}
		LA20: ;
	}
	break;
	case ((NU8) 64):
	{
	}
	break;
	case ((NU8) 44):
	{
		(*p).hastoc = NIM_TRUE;
	}
	break;
	default:
	{
		{
			NI i_338296;
			NI HEX3Atmp_338298;
			NI LOC26;
			NI res_338301;
			i_338296 = 0;
			HEX3Atmp_338298 = 0;
			LOC26 = 0;
			LOC26 = len_330090(n);
			HEX3Atmp_338298 = (NI)(LOC26 - ((NI) 1));
			res_338301 = ((NI) 0);
			{
				while (1) {
					if (!(res_338301 <= HEX3Atmp_338298)) goto LA28;
					i_338296 = res_338301;
					asgnRefNoCycle((void**) (&(*n).sons->data[i_338296]), resolvesubs_338250(p, (*n).sons->data[i_338296]));
					res_338301 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

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

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

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

N_NIMCALL(NIM_BOOL, match_332727)(Rstparser331587* 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 &(1<<(((*p).tok->data[j].kind)&7)))!=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*) &TMP2593));
				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_103130((*p).tok->data[j].symbol, TMP2594);
					}
					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 &(1<<(((*p).tok->data[j].kind)&7)))!=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_335205)(Rstparser331587* 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_335251)(Rstparser331587* 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_332001(p);
		LOC5 = ((*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival == LOC7);
		LA6: ;
		result = LOC5;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, islineblock_335240)(Rstparser331587* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_335205(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*) &TMP2603));
	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_331967)(Rstparser331587* 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_335270)(Rstparser331587* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_335205(p);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*p).tok->data[(*p).idx].col < (*p).tok->data[j].col);
	if (!(LOC2)) goto LA3;
	LOC2 = ((104 &(1<<(((*p).tok->data[j].kind)&7)))!=0);
	LA3: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA4;
	LOC1 = !(eqStrings((*p).tok->data[(NI)(j - ((NI) 2))].symbol, ((NimStringDesc*) &TMP2599)));
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, isoptionlist_335292)(Rstparser331587* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2608));
	if (LOC3) goto LA4;
	LOC3 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2609));
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2610));
	LA5: ;
	LOC1 = LOC2;
	if (LOC1) goto LA6;
	LOC1 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2611));
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, whichsection_335302)(Rstparser331587* p) {
	NU8 result;
	result = 0;
	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 4):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_332727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2595));
			if (!LOC4) goto LA5;
			result = ((NU8) 3);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = match_332727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2596));
			if (!LOC8) goto LA9;
			result = ((NU8) 29);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = match_332727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2597));
			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_335205(p);
			LOC20 = 0;
			LOC20 = match_332727(p, LOC19, ((NimStringDesc*) &TMP2598));
			if (!LOC20) goto LA21;
			result = ((NU8) 1);
		}
		goto LA17;
		LA21: ;
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2599))) 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_335251(p);
			if (!(LOC28)) goto LA29;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2600));
			if (LOC31) goto LA32;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2601));
			LA32: ;
			LOC30 = LOC31;
			if (LOC30) goto LA33;
			LOC30 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2602));
			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*) &TMP2603));
			if (!(LOC38)) goto LA39;
			LOC38 = islineblock_335240(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*) &TMP2604));
			if (!(LOC43)) goto LA44;
			LOC43 = prednl_335251(p);
			LA44: ;
			if (!LOC43) goto LA45;
			result = ((NU8) 40);
		}
		goto LA17;
		LA45: ;
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2605));
			if (!(LOC48)) goto LA49;
			LOC48 = prednl_335251(p);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 13);
		}
		goto LA17;
		LA50: ;
		{
			NIM_BOOL LOC53;
			LOC53 = 0;
			LOC53 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2606));
			if (!LOC53) goto LA54;
			result = ((NU8) 7);
		}
		goto LA17;
		LA54: ;
		{
			NIM_BOOL LOC57;
			LOC57 = 0;
			LOC57 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2607));
			if (!LOC57) goto LA58;
			result = ((NU8) 30);
			rstmessage_331967(p, ((NU8) 2));
		}
		goto LA17;
		LA58: ;
		{
			NIM_BOOL LOC61;
			LOC61 = 0;
			LOC61 = isdeflist_335270(p);
			if (!LOC61) goto LA62;
			result = ((NU8) 9);
		}
		goto LA17;
		LA62: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = isoptionlist_335292(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_335205(p);
			LOC73 = 0;
			LOC73 = match_332727(p, LOC72, ((NimStringDesc*) &TMP2598));
			if (!LOC73) goto LA74;
			result = ((NU8) 1);
		}
		goto LA70;
		LA74: ;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2612));
			if (LOC77) goto LA78;
			LOC77 = match_332727(p, (*p).idx, ((NimStringDesc*) &TMP2613));
			LA78: ;
			if (!LOC77) goto LA79;
			result = ((NU8) 7);
		}
		goto LA70;
		LA79: ;
		{
			NIM_BOOL LOC82;
			LOC82 = 0;
			LOC82 = isdeflist_335270(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(Rstnode330011*, parseliteralblock_335099)(Rstparser331587* p) {
	Rstnode330011* result;
	Rstnode330011* n;
	result = 0;
	result = newrstnode_330108(((NU8) 24));
	n = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2203));
	{
		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*) &TMP2589));
						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 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=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_330171(result, n);
	return result;
}

N_NIMCALL(Rstnode330011*, parsebulletlist_336565)(Rstparser331587* p) {
	Rstnode330011* 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_330108(((NU8) 5));
		pushind_332011(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Rstnode330011* item;
				item = newrstnode_330108(((NU8) 6));
				parsesection_334217(p, item);
				add_330171(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_332032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(Rstnode330011*, parselineblock_335321)(Rstparser331587* p) {
	Rstnode330011* 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_330108(((NU8) 26));
		pushind_332011(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Rstnode330011* item;
				item = newrstnode_330108(((NU8) 27));
				parsesection_334217(p, item);
				add_330171(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*) &TMP2603));
					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_332032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdirective_333866)(Rstparser331587* 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 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0)) goto LA8;
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2599))) 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*) &TMP2599))) 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*) &TMP2203));
		}
		LA17: ;
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP2203));
	}
	LA1: ;
	return result;
}

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

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

N_NIMCALL(Rstnode330011*, newleaf_332529)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = newrstnode_330142(((NU8) 64), (*p).tok->data[(*p).idx].symbol);
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupstart_332680)(Rstparser331587* 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 &(1<<(((*p).tok->data[(NI)((*p).idx - ((NI) 1))].kind)&7)))!=0);
	LA7: ;
	LOC5 = LOC6;
	if (LOC5) goto LA8;
	LOC5 = ((TMP2626[((NU8)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 0)]))/8] &(1<<(((NU8)((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol->data[((NI) 0)]))%8)))!=0);
	LA8: ;
	result = LOC5;
	{
		if (!!(result)) goto LA11;
		goto BeforeRet;
	}
	LA11: ;
	result = !(((7 &(1<<(((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=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*) &TMP2627))) 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_332636)(Rstparser331587* 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 &(1<<(((*p).tok->data[(NI)((*p).idx - ((NI) 1))].kind)&7)))!=0));
	{
		if (!!(result)) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	LOC9 = 0;
	LOC9 = ((7 &(1<<(((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=0);
	if (LOC9) goto LA10;
	LOC9 = ((TMP2629[((NU8)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)]))/8] &(1<<(((NU8)((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)]))%8)))!=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*) &TMP2630)));
			if (!(LOC21)) goto LA22;
			LOC21 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2627));
			LA22: ;
			if (!LOC21) goto LA23;
			result = NIM_FALSE;
		}
		LA23: ;
	}
	LA17: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, parsebackslash_333330)(Rstparser331587* p, Rstnode330011* father) {
	{
		Rstnode330011* LOC5;
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2631))) goto LA3;
		LOC5 = 0;
		LOC5 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2627));
		add_330171(father, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2627))) goto LA7;
		(*p).idx += ((NI) 1);
		{
			Rstnode330011* LOC13;
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 2)))) goto LA11;
			LOC13 = 0;
			LOC13 = newleaf_332529(p);
			add_330171(father, LOC13);
		}
		LA11: ;
		{
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA16;
			(*p).idx += ((NI) 1);
		}
		LA16: ;
	}
	goto LA1;
	LA7: ;
	{
		Rstnode330011* LOC19;
		LOC19 = 0;
		LOC19 = newleaf_332529(p);
		add_330171(father, LOC19);
		(*p).idx += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, rstmessage_331954)(Rstparser331587* 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_333601)(Rstparser331587* p, Rstnode330011* 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_332636((&(*p)), postfix);
					if (!LOC6) goto LA7;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA4;
				LA7: ;
				{
					if (!interpretbackslash) goto LA10;
					parsebackslash_333330(p, father);
				}
				goto LA4;
				LA10: ;
				{
					Rstnode330011* LOC13;
					LOC13 = 0;
					LOC13 = newleaf_332529(p);
					add_330171(father, LOC13);
					(*p).idx += ((NI) 1);
				}
				LA4: ;
			}
			break;
			case ((NU8) 4):
			case ((NU8) 3):
			case ((NU8) 6):
			{
				Rstnode330011* LOC15;
				LOC15 = 0;
				LOC15 = newleaf_332529(p);
				add_330171(father, LOC15);
				(*p).idx += ((NI) 1);
			}
			break;
			case ((NU8) 1):
			{
				Rstnode330011* LOC17;
				LOC17 = 0;
				LOC17 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2632));
				add_330171(father, LOC17);
				(*p).idx += ((NI) 1);
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA20;
					rstmessage_331954((&(*p)), ((NU8) 1), postfix, line, col);
					goto LA1;
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			{
				Rstnode330011* LOC23;
				LOC23 = 0;
				LOC23 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2632));
				add_330171(father, LOC23);
				(*p).idx += ((NI) 1);
			}
			break;
			default:
			{
				rstmessage_331954((&(*p)), ((NU8) 1), postfix, line, col);
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(Rstnode330011*, parsemarkdowncodeblock_333686)(Rstparser331587* p) {
	Rstnode330011* result;
	Rstnode330011* args;
	Rstnode330011* n;
	Rstnode330011* lb;
	result = 0;
	args = newrstnode_330108(((NU8) 41));
	{
		Rstnode330011* LOC5;
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA3;
		LOC5 = 0;
		LOC5 = newleaf_332529(p);
		add_330171(args, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		args = NIM_NIL;
	}
	LA1: ;
	n = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2203));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 0):
			{
				rstmessage_331943((&(*p)), ((NU8) 1), ((NimStringDesc*) &TMP2634));
				goto LA7;
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2634))) 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_330108(((NU8) 24));
	add_330171(lb, n);
	result = newrstnode_330108(((NU8) 47));
	add_330171(result, args);
	add_330171(result, NIM_NIL);
	add_330171(result, lb);
	return result;
}

N_NIMCALL(void, fixupembeddedref_332889)(Rstnode330011* n, Rstnode330011* a, Rstnode330011* b) {
	NI sep;
	NI incr;
	sep = ((NI) -1);
	{
		NI i_332906;
		NI HEX3Atmp_332935;
		NI LOC2;
		NI res_332938;
		i_332906 = 0;
		HEX3Atmp_332935 = 0;
		LOC2 = 0;
		LOC2 = len_330090(n);
		HEX3Atmp_332935 = (NI)(LOC2 - ((NI) 2));
		res_332938 = HEX3Atmp_332935;
		{
			while (1) {
				if (!(((NI) 0) <= res_332938)) goto LA4;
				i_332906 = res_332938;
				{
					if (!eqStrings((*(*n).sons->data[i_332906]).text, ((NimStringDesc*) &TMP2639))) goto LA7;
					sep = i_332906;
					goto LA1;
				}
				LA7: ;
				res_332938 -= ((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_332920;
		NI HEX3Atmp_332943;
		NI res_332946;
		i_332920 = 0;
		HEX3Atmp_332943 = 0;
		HEX3Atmp_332943 = (NI)(sep - incr);
		res_332946 = ((NI) 0);
		{
			while (1) {
				if (!(res_332946 <= HEX3Atmp_332943)) goto LA18;
				i_332920 = res_332946;
				add_330171(a, (*n).sons->data[i_332920]);
				res_332946 += ((NI) 1);
			} LA18: ;
		}
	}
	{
		NI i_332933;
		NI HEX3Atmp_332951;
		NI HEX3Atmp_332952;
		NI LOC20;
		NI res_332955;
		i_332933 = 0;
		HEX3Atmp_332951 = 0;
		HEX3Atmp_332952 = 0;
		HEX3Atmp_332951 = (NI)(sep + ((NI) 1));
		LOC20 = 0;
		LOC20 = len_330090(n);
		HEX3Atmp_332952 = (NI)(LOC20 - ((NI) 2));
		res_332955 = HEX3Atmp_332951;
		{
			while (1) {
				if (!(res_332955 <= HEX3Atmp_332952)) goto LA22;
				i_332933 = res_332955;
				add_330171(b, (*n).sons->data[i_332933]);
				res_332955 += ((NI) 1);
			} LA22: ;
		}
	}
}

N_NIMCALL(void, setref_332426)(Rstparser331587* p, NimStringDesc* key, Rstnode330011* value) {
	NI length;
	NimStringDesc* LOC14;
{	length = ((*(*p).s).refs ? (*(*p).s).refs->Sup.len : 0);
	{
		NI i_332453;
		NI HEX3Atmp_332465;
		NI res_332468;
		i_332453 = 0;
		HEX3Atmp_332465 = 0;
		HEX3Atmp_332465 = (NI)(length - ((NI) 1));
		res_332468 = ((NI) 0);
		{
			while (1) {
				if (!(res_332468 <= HEX3Atmp_332465)) goto LA3;
				i_332453 = res_332468;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_332453].key)) goto LA6;
					{
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						LOC10 = 0;
						LOC10 = addnodes_331073((*(*p).s).refs->data[i_332453].value);
						LOC11 = 0;
						LOC11 = addnodes_331073(value);
						if (!!(eqStrings(LOC10, LOC11))) goto LA12;
						rstmessage_331943((&(*p)), ((NU8) 6), key);
					}
					LA12: ;
					asgnRefNoCycle((void**) (&(*(*p).s).refs->data[i_332453].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_332468 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).refs = (TY331597*) setLengthSeq(&((*(*p).s).refs)->Sup, sizeof(Substitution331581), ((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(Rstnode330011*, parsepostfix_332992)(Rstparser331587* p, Rstnode330011* n) {
	Rstnode330011* result;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isinlinemarkupend_332636((&(*p)), ((NimStringDesc*) &TMP2636));
		if (LOC3) goto LA4;
		LOC3 = isinlinemarkupend_332636((&(*p)), ((NimStringDesc*) &TMP2637));
		LA4: ;
		if (!LOC3) goto LA5;
		(*p).idx += ((NI) 1);
		{
			NIM_BOOL LOC9;
			Rstnode330011* a;
			Rstnode330011* b;
			LOC9 = 0;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 2))].symbol, ((NimStringDesc*) &TMP2635));
			if (!(LOC9)) goto LA10;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 3))].symbol, ((NimStringDesc*) &TMP2638));
			LA10: ;
			if (!LOC9) goto LA11;
			a = newrstnode_330108(((NU8) 0));
			b = newrstnode_330108(((NU8) 0));
			fixupembeddedref_332889(n, a, b);
			{
				NI LOC15;
				LOC15 = 0;
				LOC15 = len_330090(a);
				if (!(LOC15 == ((NI) 0))) goto LA16;
				result = newrstnode_330108(((NU8) 37));
				add_330171(result, b);
			}
			goto LA13;
			LA16: ;
			{
				NimStringDesc* LOC19;
				result = newrstnode_330108(((NU8) 38));
				add_330171(result, a);
				add_330171(result, b);
				LOC19 = 0;
				LOC19 = rstnodetorefname_331067(a);
				setref_332426(p, LOC19, b);
			}
			LA13: ;
		}
		goto LA7;
		LA11: ;
		{
			if (!((*n).kind == ((NU8) 60))) goto LA21;
			(*n).kind = ((NU8) 39);
		}
		goto LA7;
		LA21: ;
		{
			result = newrstnode_330108(((NU8) 39));
			add_330171(result, n);
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC25;
		LOC25 = 0;
		LOC25 = match_332727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2605));
		if (!LOC25) goto LA26;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2640))) goto LA30;
			(*n).kind = ((NU8) 56);
		}
		goto LA28;
		LA30: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2641))) goto LA33;
			(*n).kind = ((NU8) 61);
		}
		goto LA28;
		LA33: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2642))) goto LA36;
			(*n).kind = ((NU8) 58);
		}
		goto LA28;
		LA36: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2643))) 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*) &TMP2644));
			if (LOC42) goto LA43;
			LOC42 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2645));
			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*) &TMP2646));
			if (LOC47) goto LA48;
			LOC47 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2647));
			LA48: ;
			if (!LOC47) goto LA49;
			(*n).kind = ((NU8) 55);
		}
		goto LA28;
		LA49: ;
		{
			Rstnode330011* LOC52;
			result = newrstnode_330108(((NU8) 53));
			(*n).kind = ((NU8) 0);
			add_330171(result, n);
			LOC52 = 0;
			LOC52 = newrstnode_330142(((NU8) 64), (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol);
			add_330171(result, LOC52);
		}
		LA28: ;
		(*p).idx += ((NI) 3);
	}
	goto LA1;
	LA26: ;
	LA1: ;
	return result;
}

N_NIMCALL(NI, matchverbatim_333033)(Rstparser331587* 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(Rstnode330011*, parsesmiley_333079)(Rstparser331587* p) {
	Rstnode330011* 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_333131;
		NimStringDesc* val_333132;
		NI i_333137;
		key_333131 = 0;
		val_333132 = 0;
		i_333137 = ((NI) 0);
		{
			if (!(((NI) (i_333137)) <= ((NI) 33))) goto LA8;
			{
				while (1) {
					NI m;
					key_333131 = copyString(Smilies_331098[(i_333137)- 0].Field0);
					val_333132 = copyString(Smilies_331098[(i_333137)- 0].Field1);
					m = matchverbatim_333033((&(*p)), (*p).idx, key_333131);
					{
						NimStringDesc* LOC16;
						if (!(((NI) 0) < m)) goto LA14;
						(*p).idx = m;
						result = newrstnode_330108(((NU8) 63));
						LOC16 = 0;
						LOC16 = (*result).text; (*result).text = copyStringRC1(val_333132);
						if (LOC16) nimGCunrefNoCycle(LOC16);
						goto BeforeRet;
					}
					LA14: ;
					{
						if (!(((NI) 33) <= ((NI) (i_333137)))) goto LA19;
						goto LA10;
					}
					LA19: ;
					i_333137 += ((NI) 1);
				}
			} LA10: ;
		}
		LA8: ;
	}
	}BeforeRet: ;
	return result;
}

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

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

N_NIMCALL(NIM_BOOL, isurl_333201)(Rstparser331587* 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*) &TMP2706));
	if (!(LOC3)) goto LA4;
	LOC3 = eqStrings((*p).tok->data[(NI)(i + ((NI) 2))].symbol, ((NimStringDesc*) &TMP2707));
	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_333219(TMP2708, 5, (*p).tok->data[i].symbol);
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseurl_333281)(Rstparser331587* p, Rstnode330011* father) {
	{
		NIM_BOOL LOC3;
		Rstnode330011* n;
		LOC3 = 0;
		LOC3 = isurl_333201((&(*p)), (*p).idx);
		if (!LOC3) goto LA4;
		n = newrstnode_330108(((NU8) 37));
		{
			while (1) {
				Rstnode330011* LOC15;
				switch ((*p).tok->data[(*p).idx].kind) {
				case ((NU8) 3):
				case ((NU8) 4):
				case ((NU8) 6):
				{
				}
				break;
				case ((NU8) 5):
				{
					{
						if (!!(((120 &(1<<(((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=0))) goto LA12;
						goto LA6;
					}
					LA12: ;
				}
				break;
				default:
				{
					goto LA6;
				}
				break;
				}
				LOC15 = 0;
				LOC15 = newleaf_332529(p);
				add_330171(n, LOC15);
				(*p).idx += ((NI) 1);
			}
		} LA6: ;
		add_330171(father, n);
	}
	goto LA1;
	LA4: ;
	{
		Rstnode330011* n;
		n = newleaf_332529(p);
		(*p).idx += ((NI) 1);
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2636))) goto LA19;
			n = parsepostfix_332992(p, n);
		}
		LA19: ;
		add_330171(father, n);
	}
	LA1: ;
}

N_NIMCALL(void, parseinline_333752)(Rstparser331587* p, Rstnode330011* father) {
{	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			Rstnode330011* n;
			LOC4 = 0;
			LOC4 = isinlinemarkupstart_332680((&(*p)), ((NimStringDesc*) &TMP2628));
			if (!LOC4) goto LA5;
			n = newrstnode_330108(((NU8) 59));
			parseuntil_333601(p, n, ((NimStringDesc*) &TMP2628), NIM_TRUE);
			add_330171(father, n);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			Rstnode330011* n;
			LOC8 = 0;
			LOC8 = isinlinemarkupstart_332680((&(*p)), ((NimStringDesc*) &TMP2633));
			if (!LOC8) goto LA9;
			n = newrstnode_330108(((NU8) 58));
			parseuntil_333601(p, n, ((NimStringDesc*) &TMP2633), NIM_TRUE);
			add_330171(father, n);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			Rstnode330011* n;
			LOC12 = 0;
			LOC12 = isinlinemarkupstart_332680((&(*p)), ((NimStringDesc*) &TMP2601));
			if (!LOC12) goto LA13;
			n = newrstnode_330108(((NU8) 57));
			parseuntil_333601(p, n, ((NimStringDesc*) &TMP2601), NIM_TRUE);
			add_330171(father, n);
		}
		goto LA2;
		LA13: ;
		{
			NIM_BOOL LOC16;
			Rstnode330011* LOC20;
			LOC16 = 0;
			LOC16 = (((*(*p).s).options &(1<<((((NU8) 3))&7)))!=0);
			if (!(LOC16)) goto LA17;
			LOC16 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2634));
			LA17: ;
			if (!LOC16) goto LA18;
			(*p).idx += ((NI) 1);
			LOC20 = 0;
			LOC20 = parsemarkdowncodeblock_333686(p);
			add_330171(father, LOC20);
		}
		goto LA2;
		LA18: ;
		{
			NIM_BOOL LOC22;
			Rstnode330011* n;
			LOC22 = 0;
			LOC22 = isinlinemarkupstart_332680((&(*p)), ((NimStringDesc*) &TMP2630));
			if (!LOC22) goto LA23;
			n = newrstnode_330108(((NU8) 61));
			parseuntil_333601(p, n, ((NimStringDesc*) &TMP2630), NIM_FALSE);
			add_330171(father, n);
		}
		goto LA2;
		LA23: ;
		{
			NIM_BOOL LOC26;
			Rstnode330011* n;
			LOC26 = 0;
			LOC26 = isinlinemarkupstart_332680((&(*p)), ((NimStringDesc*) &TMP2635));
			if (!LOC26) goto LA27;
			n = newrstnode_330108(((NU8) 60));
			parseuntil_333601(p, n, ((NimStringDesc*) &TMP2635), NIM_TRUE);
			n = parsepostfix_332992(p, n);
			add_330171(father, n);
		}
		goto LA2;
		LA27: ;
		{
			NIM_BOOL LOC30;
			Rstnode330011* n;
			LOC30 = 0;
			LOC30 = isinlinemarkupstart_332680((&(*p)), ((NimStringDesc*) &TMP2603));
			if (!LOC30) goto LA31;
			n = newrstnode_330108(((NU8) 62));
			parseuntil_333601(p, n, ((NimStringDesc*) &TMP2603), NIM_FALSE);
			add_330171(father, n);
		}
		goto LA2;
		LA31: ;
		{
			{
				Rstnode330011* n;
				if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA36;
				n = parsesmiley_333079(p);
				{
					if (!!((n == NIM_NIL))) goto LA40;
					add_330171(father, n);
					goto BeforeRet;
				}
				LA40: ;
			}
			LA36: ;
			parsebackslash_333330(p, father);
		}
		LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			Rstnode330011* n;
			if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA45;
			n = parsesmiley_333079(p);
			{
				if (!!((n == NIM_NIL))) goto LA49;
				add_330171(father, n);
				goto BeforeRet;
			}
			LA49: ;
		}
		LA45: ;
		parseurl_333281(p, father);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		Rstnode330011* LOC60;
		{
			Rstnode330011* n;
			if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA54;
			n = parsesmiley_333079(p);
			{
				if (!!((n == NIM_NIL))) goto LA58;
				add_330171(father, n);
				goto BeforeRet;
			}
			LA58: ;
		}
		LA54: ;
		LOC60 = 0;
		LOC60 = newleaf_332529(p);
		add_330171(father, LOC60);
		(*p).idx += ((NI) 1);
	}
	break;
	default:
	{
	}
	break;
	}
	}BeforeRet: ;
}

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

N_NIMCALL(Rstnode330011*, parsefield_334225)(Rstparser331587* p) {
	Rstnode330011* result;
	NI col;
	Rstnode330011* fieldname;
	Rstnode330011* fieldbody;
	result = 0;
	result = newrstnode_330108(((NU8) 14));
	col = (*p).tok->data[(*p).idx].col;
	fieldname = newrstnode_330108(((NU8) 15));
	parseuntil_333601(p, fieldname, ((NimStringDesc*) &TMP2706), NIM_FALSE);
	fieldbody = newrstnode_330108(((NU8) 16));
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 1)))) goto LA3;
		parseline_334181(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_332011(p, indent);
			parsesection_334217(p, fieldbody);
			popind_332032(p);
		}
		LA11: ;
	}
	LA7: ;
	add_330171(result, fieldname);
	add_330171(result, fieldbody);
	return result;
}

N_NIMCALL(Rstnode330011*, parsefields_334258)(Rstparser331587* p) {
	Rstnode330011* 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*) &TMP2706));
	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*) &TMP2706));
		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_330108(((NU8) 13));
		{
			if (!!(atstart)) goto LA18;
			(*p).idx += ((NI) 1);
		}
		LA18: ;
		{
			while (1) {
				Rstnode330011* LOC22;
				LOC22 = 0;
				LOC22 = parsefield_334225(p);
				add_330171(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*) &TMP2706));
					LA28: ;
					if (!LOC25) goto LA29;
					(*p).idx += ((NI) 1);
				}
				goto LA23;
				LA29: ;
				{
					goto LA20;
				}
				LA23: ;
			}
		} LA20: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(Rstnode330011*, parsedirective_337229)(Rstparser331587* p, NU8 flags) {
	Rstnode330011* result;
	Rstnode330011* args;
	Rstnode330011* options;
	result = 0;
	result = newrstnode_330108(((NU8) 40));
	args = NIM_NIL;
	options = NIM_NIL;
	{
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA3;
		args = newrstnode_330108(((NU8) 41));
		{
			if (!((flags &(1<<((((NU8) 2))&7)))!=0)) goto LA7;
			{
				while (1) {
					switch ((*p).tok->data[(*p).idx].kind) {
					case ((NU8) 3):
					case ((NU8) 6):
					case ((NU8) 5):
					case ((NU8) 4):
					{
						Rstnode330011* LOC12;
						LOC12 = 0;
						LOC12 = newleaf_332529(p);
						add_330171(args, LOC12);
						(*p).idx += ((NI) 1);
					}
					break;
					default:
					{
						goto LA9;
					}
					break;
					}
				}
			} LA9: ;
		}
		goto LA5;
		LA7: ;
		{
			if (!((flags &(1<<((((NU8) 3))&7)))!=0)) goto LA15;
			{
				while (1) {
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA18;
					(*p).idx += ((NI) 1);
				} LA18: ;
			}
			{
				Rstnode330011* LOC23;
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA21;
				LOC23 = 0;
				LOC23 = newleaf_332529(p);
				add_330171(args, LOC23);
				(*p).idx += ((NI) 1);
			}
			goto LA19;
			LA21: ;
			{
				args = NIM_NIL;
			}
			LA19: ;
		}
		goto LA5;
		LA15: ;
		{
			parseline_334181(p, args);
		}
		LA5: ;
	}
	LA3: ;
	add_330171(result, args);
	{
		if (!((flags &(1<<((((NU8) 1))&7)))!=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*) &TMP2706));
			LA35: ;
			if (!LOC32) goto LA36;
			options = parsefields_334258(p);
		}
		LA36: ;
	}
	LA28: ;
	add_330171(result, options);
	return result;
}

N_NIMCALL(NIM_BOOL, indfollows_337353)(Rstparser331587* 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_332001(p);
	LOC1 = (LOC3 < (*p).tok->data[(*p).idx].ival);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(Rstnode330011*, parsedirective_337372)(Rstparser331587* p, NU8 flags, Sectionparser337212 contentparser) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337229(p, flags);
	{
		NIM_BOOL LOC3;
		Rstnode330011* content;
		LOC3 = 0;
		LOC3 = !(contentparser == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = indfollows_337353((&(*p)));
		LA4: ;
		if (!LOC3) goto LA5;
		pushind_332011(p, (*p).tok->data[(*p).idx].ival);
		content = contentparser(p);
		popind_332032(p);
		add_330171(result, content);
	}
	goto LA1;
	LA5: ;
	{
		add_330171(result, NIM_NIL);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode330011*, dirinclude_337405)(Rstparser331587* p) {
	Rstnode330011* result;
	Rstnode330011* n;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	NimStringDesc* path;
	result = 0;
	result = NIM_NIL;
	n = parsedirective_337372(p, 7, NIM_NIL);
	LOC1 = 0;
	LOC1 = addnodes_331073((*n).sons->data[((NI) 0)]);
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2314);
	path = (*(*p).s).findfile(filename);
	{
		if (!((path) && (path)->Sup.len == 0)) goto LA4;
		rstmessage_331943((&(*p)), ((NU8) 0), filename);
	}
	goto LA2;
	LA4: ;
	{
		{
			NimStringDesc* LOC9;
			NimStringDesc* LOC12;
			Rstnode330011* LOC13;
			LOC9 = 0;
			LOC9 = getfieldvalue_331079(n, ((NimStringDesc*) &TMP2641));
			if (!!(((LOC9) && (LOC9)->Sup.len == 0))) goto LA10;
			result = newrstnode_330108(((NU8) 24));
			LOC12 = 0;
			LOC12 = readfile_16872(path);
			LOC13 = 0;
			LOC13 = newrstnode_330142(((NU8) 64), LOC12);
			add_330171(result, LOC13);
		}
		goto LA7;
		LA10: ;
		{
			Rstparser331587 q;
			NimStringDesc* LOC15;
			NI LOC16;
			memset((void*)(&q), 0, sizeof(q));
			q.Sup.m_type = (&NTI331587);
			initparser_332068((&q), (*p).s);
			q.filename = copyString(filename);
			LOC15 = 0;
			LOC15 = readfile_16872(path);
			LOC16 = 0;
			LOC16 = gettokens_331429(LOC15, NIM_FALSE, (&q.tok));
			q.col += LOC16;
			result = parsedoc_336069((&q));
		}
		LA7: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(Rstnode330011*, dirimage_338007)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337372(p, 7, NIM_NIL);
	(*result).kind = ((NU8) 45);
	return result;
}

N_NIMCALL(Rstnode330011*, dirfigure_338019)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337372(p, 7, parsesectionwrapper_337109);
	(*result).kind = ((NU8) 46);
	return result;
}

N_NIMCALL(Rstnode330011*, dirtitle_338031)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337372(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 43);
	return result;
}

N_NIMCALL(Rstnode330011*, dircontainer_337608)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337372(p, 1, parsesectionwrapper_337109);
	(*result).kind = ((NU8) 50);
	return result;
}

N_NIMCALL(Rstnode330011*, dircontents_338043)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337372(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 44);
	return result;
}

N_NIMCALL(Rstnode330011*, parsedirbody_337393)(Rstparser331587* p, Sectionparser337212 contentparser) {
	Rstnode330011* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = indfollows_337353((&(*p)));
		if (!LOC3) goto LA4;
		pushind_332011(p, (*p).tok->data[(*p).idx].ival);
		result = contentparser(p);
		popind_332032(p);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, dirrawaux_338068)(Rstparser331587* p, Rstnode330011** result, NU8 kind, Sectionparser337212 contentparser) {
	NimStringDesc* filename;
	filename = getfieldvalue_331079((*result), ((NimStringDesc*) &TMP2713));
	{
		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_331943((&(*p)), ((NU8) 0), filename);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* f;
			Rstnode330011* LOC10;
			f = readfile_16872(path);
			unsureAsgnRef((void**) (&(*result)), newrstnode_330108(kind));
			LOC10 = 0;
			LOC10 = newrstnode_330142(((NU8) 64), f);
			add_330171((*result), LOC10);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		Rstnode330011* LOC12;
		(*(*result)).kind = kind;
		LOC12 = 0;
		LOC12 = parsedirbody_337393(p, contentparser);
		add_330171((*result), LOC12);
	}
	LA1: ;
}

N_NIMCALL(Rstnode330011*, dirraw_338085)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337229(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*) &TMP2714));
			if (!(LOC7 == ((NI) 0))) goto LA8;
			dirrawaux_338068(p, &result, ((NU8) 48), parseliteralblock_335099);
		}
		goto LA5;
		LA8: ;
		{
			NI LOC11;
			LOC11 = 0;
			LOC11 = nsuCmpIgnoreCase((*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text, ((NimStringDesc*) &TMP2715));
			if (!(LOC11 == ((NI) 0))) goto LA12;
			dirrawaux_338068(p, &result, ((NU8) 49), parseliteralblock_335099);
		}
		goto LA5;
		LA12: ;
		{
			rstmessage_331943((&(*p)), ((NU8) 5), (*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		dirrawaux_338068(p, &result, ((NU8) 42), parsesectionwrapper_337109);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode330011*, dircodeblock_337434)(Rstparser331587* p, NIM_BOOL nimrodextension) {
	Rstnode330011* result;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	result = 0;
	result = parsedirective_337372(p, 3, parseliteralblock_335099);
	LOC1 = 0;
	LOC1 = getfieldvalue_331079(result, ((NimStringDesc*) &TMP2713));
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2314);
	{
		NimStringDesc* path;
		Rstnode330011* n;
		NimStringDesc* LOC10;
		Rstnode330011* LOC11;
		if (!!(((filename) && (filename)->Sup.len == 0))) goto LA4;
		path = (*(*p).s).findfile(filename);
		{
			if (!((path) && (path)->Sup.len == 0)) goto LA8;
			rstmessage_331943((&(*p)), ((NU8) 0), filename);
		}
		LA8: ;
		n = newrstnode_330108(((NU8) 24));
		LOC10 = 0;
		LOC10 = readfile_16872(path);
		LOC11 = 0;
		LOC11 = newrstnode_330142(((NU8) 64), LOC10);
		add_330171(n, LOC11);
		asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 2)]), n);
	}
	LA4: ;
	{
		Rstnode330011* extranode;
		Rstnode330011* LOC20;
		Rstnode330011* LOC21;
		Rstnode330011* LOC22;
		Rstnode330011* LOC23;
		if (!nimrodextension) goto LA14;
		{
			if (!(*result).sons->data[((NI) 1)] == 0) goto LA18;
			asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 1)]), newrstnode_330108(((NU8) 13)));
		}
		LA18: ;
		extranode = newrstnode_330108(((NU8) 14));
		LOC20 = 0;
		LOC20 = newrstnode_330108(((NU8) 15));
		add_330171(extranode, LOC20);
		LOC21 = 0;
		LOC21 = newrstnode_330108(((NU8) 16));
		add_330171(extranode, LOC21);
		LOC22 = 0;
		LOC22 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2716));
		add_330171((*extranode).sons->data[((NI) 0)], LOC22);
		LOC23 = 0;
		LOC23 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2717));
		add_330171((*extranode).sons->data[((NI) 1)], LOC23);
		add_330171((*result).sons->data[((NI) 1)], extranode);
	}
	LA14: ;
	(*result).kind = ((NU8) 47);
	return result;
}

N_NIMCALL(Rstnode330011*, dirindex_338055)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsedirective_337372(p, 0, parsesectionwrapper_337109);
	(*result).kind = ((NU8) 51);
	return result;
}

N_NIMCALL(Rstnode330011*, getreferencename_332540)(Rstparser331587* p, NimStringDesc* endstr) {
	Rstnode330011* result;
	Rstnode330011* res;
	result = 0;
	res = newrstnode_330108(((NU8) 0));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 2):
			{
				Rstnode330011* LOC4;
				LOC4 = 0;
				LOC4 = newleaf_332529(p);
				add_330171(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: ;
				{
					Rstnode330011* LOC11;
					LOC11 = 0;
					LOC11 = newleaf_332529(p);
					add_330171(res, LOC11);
				}
				LA6: ;
			}
			break;
			default:
			{
				rstmessage_331943((&(*p)), ((NU8) 1), endstr);
				goto LA1;
			}
			break;
			}
			(*p).idx += ((NI) 1);
		}
	} LA1: ;
	result = res;
	return result;
}

N_NIMCALL(Rstnode330011*, untileol_332578)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = newrstnode_330108(((NU8) 0));
	{
		while (1) {
			Rstnode330011* LOC3;
			if (!!(((3 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0))) goto LA2;
			LOC3 = 0;
			LOC3 = newleaf_332529(p);
			add_330171(result, LOC3);
			(*p).idx += ((NI) 1);
		} LA2: ;
	}
	return result;
}

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

N_NIMCALL(void, setsub_332365)(Rstparser331587* p, NimStringDesc* key, Rstnode330011* value) {
	NI length;
	NimStringDesc* LOC8;
{	length = ((*(*p).s).subs ? (*(*p).s).subs->Sup.len : 0);
	{
		NI i_332392;
		NI HEX3Atmp_332404;
		NI res_332407;
		i_332392 = 0;
		HEX3Atmp_332404 = 0;
		HEX3Atmp_332404 = (NI)(length - ((NI) 1));
		res_332407 = ((NI) 0);
		{
			while (1) {
				if (!(res_332407 <= HEX3Atmp_332404)) goto LA3;
				i_332392 = res_332407;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_332392].key)) goto LA6;
					asgnRefNoCycle((void**) (&(*(*p).s).subs->data[i_332392].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_332407 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).subs = (TY331597*) setLengthSeq(&((*(*p).s).subs)->Sup, sizeof(Substitution331581), ((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(Rstnode330011*, parsecomment_333986)(Rstparser331587* p) {
	Rstnode330011* 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 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0))) goto LA20;
				(*p).idx += ((NI) 1);
			} LA20: ;
		}
	}
	break;
	}
	result = NIM_NIL;
	return result;
}

N_NIMCALL(Rstnode330011*, parsedotdot_335092)(Rstparser331587* p) {
	Rstnode330011* result;
	NI col;
	NimStringDesc* d;
	result = 0;
	result = NIM_NIL;
	col = (*p).tok->data[(*p).idx].col;
	(*p).idx += ((NI) 1);
	d = getdirective_333866(p);
	{
		NU8 LOC5;
		if (!!(((d) && (d)->Sup.len == 0))) goto LA3;
		pushind_332011(p, col);
		LOC5 = 0;
		LOC5 = getdirkind_334098(d);
		switch (LOC5) {
		case ((NU8) 9):
		{
			result = dirinclude_337405(p);
		}
		break;
		case ((NU8) 8):
		{
			result = dirimage_338007(p);
		}
		break;
		case ((NU8) 7):
		{
			result = dirfigure_338019(p);
		}
		break;
		case ((NU8) 12):
		{
			result = dirtitle_338031(p);
		}
		break;
		case ((NU8) 5):
		{
			result = dircontainer_337608(p);
		}
		break;
		case ((NU8) 6):
		{
			result = dircontents_338043(p);
		}
		break;
		case ((NU8) 11):
		{
			{
				if (!(((*(*p).s).options &(1<<((((NU8) 2))&7)))!=0)) goto LA15;
				result = dirraw_338085(p);
			}
			goto LA13;
			LA15: ;
			{
				rstmessage_331943((&(*p)), ((NU8) 5), d);
			}
			LA13: ;
		}
		break;
		case ((NU8) 3):
		{
			result = dircodeblock_337434(p, NIM_FALSE);
		}
		break;
		case ((NU8) 4):
		{
			result = dircodeblock_337434(p, NIM_TRUE);
		}
		break;
		case ((NU8) 10):
		{
			result = dirindex_338055(p);
		}
		break;
		default:
		{
			rstmessage_331943((&(*p)), ((NU8) 5), d);
		}
		break;
		}
		popind_332032(p);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC23;
		Rstnode330011* a;
		Rstnode330011* b;
		NimStringDesc* LOC30;
		LOC23 = 0;
		LOC23 = match_332727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2718));
		if (!LOC23) goto LA24;
		(*p).idx += ((NI) 2);
		a = getreferencename_332540(p, ((NimStringDesc*) &TMP2706));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA28;
			(*p).idx += ((NI) 1);
		}
		LA28: ;
		b = untileol_332578(p);
		LOC30 = 0;
		LOC30 = rstnodetorefname_331067(a);
		setref_332426(p, LOC30, b);
	}
	goto LA1;
	LA24: ;
	{
		NIM_BOOL LOC32;
		Rstnode330011* a;
		Rstnode330011* b;
		NimStringDesc* LOC49;
		LOC32 = 0;
		LOC32 = match_332727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2719));
		if (!LOC32) goto LA33;
		(*p).idx += ((NI) 2);
		a = getreferencename_332540(p, ((NimStringDesc*) &TMP2603));
		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*) &TMP2720));
			if (!(LOC41 == ((NI) 0))) goto LA42;
			(*p).idx += ((NI) 1);
			expect_332616(p, ((NimStringDesc*) &TMP2599));
			b = untileol_332578(p);
		}
		goto LA39;
		LA42: ;
		{
			NI LOC45;
			LOC45 = 0;
			LOC45 = nsuCmpIgnoreStyle((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2621));
			if (!(LOC45 == ((NI) 0))) goto LA46;
			(*p).idx += ((NI) 1);
			b = dirimage_338007(p);
		}
		goto LA39;
		LA46: ;
		{
			rstmessage_331943((&(*p)), ((NU8) 5), (*p).tok->data[(*p).idx].symbol);
		}
		LA39: ;
		LOC49 = 0;
		LOC49 = addnodes_331073(a);
		setsub_332365(p, LOC49, b);
	}
	goto LA1;
	LA33: ;
	{
		NIM_BOOL LOC51;
		Rstnode330011* a;
		Rstnode330011* b;
		NimStringDesc* LOC58;
		LOC51 = 0;
		LOC51 = match_332727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2721));
		if (!LOC51) goto LA52;
		(*p).idx += ((NI) 2);
		a = getreferencename_332540(p, ((NimStringDesc*) &TMP2722));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA56;
			(*p).idx += ((NI) 1);
		}
		LA56: ;
		b = untileol_332578(p);
		LOC58 = 0;
		LOC58 = rstnodetorefname_331067(a);
		setref_332426(p, LOC58, b);
	}
	goto LA1;
	LA52: ;
	{
		result = parsecomment_333986(p);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode330011*, parseenumlist_336822)(Rstparser331587* p) {
	Rstnode330011* 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_332727((&(*p)), (*p).idx, wildcards_336827[(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_330108(((NU8) 7));
		(*p).idx += (NI)(wildpos_336832[(w)- 0] + ((NI) 3));
		j = tokenafternewline_335205((&(*p)));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = ((*p).tok->data[j].col == (*p).tok->data[(*p).idx].col);
			if (LOC14) goto LA15;
			LOC14 = match_332727((&(*p)), j, wildcards_336827[(w)- 0]);
			LA15: ;
			if (!LOC14) goto LA16;
			pushind_332011(p, (*p).tok->data[(*p).idx].col);
			{
				while (1) {
					Rstnode330011* item;
					item = newrstnode_330108(((NU8) 8));
					parsesection_334217(p, item);
					add_330171(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_332727((&(*p)), (NI)((*p).idx + ((NI) 1)), wildcards_336827[(w)- 0]);
						LA25: ;
						if (!LOC22) goto LA26;
						(*p).idx += (NI)(wildpos_336832[(w)- 0] + ((NI) 4));
					}
					goto LA20;
					LA26: ;
					{
						goto LA18;
					}
					LA20: ;
				}
			} LA18: ;
			popind_332032(p);
		}
		goto LA12;
		LA16: ;
		{
			(*p).idx -= (NI)(wildpos_336832[(w)- 0] + ((NI) 3));
			result = NIM_NIL;
		}
		LA12: ;
	}
	LA10: ;
	return result;
}

N_NIMCALL(Rstnode330011*, parsedefinitionlist_336734)(Rstparser331587* p) {
	Rstnode330011* result;
	NI j;
	NI LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = tokenafternewline_335205((&(*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_332001((&(*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*) &TMP2599)));
		LA10: ;
		if (!LOC4) goto LA11;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_330108(((NU8) 9));
		{
			while (1) {
				Rstnode330011* a;
				j = (*p).idx;
				a = newrstnode_330108(((NU8) 11));
				parseline_334181(p, a);
				{
					NIM_BOOL LOC17;
					NIM_BOOL LOC18;
					NIM_BOOL LOC19;
					NI LOC21;
					Rstnode330011* b;
					Rstnode330011* c;
					LOC17 = 0;
					LOC18 = 0;
					LOC19 = 0;
					LOC19 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC19)) goto LA20;
					LOC21 = 0;
					LOC21 = currind_332001((&(*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*) &TMP2599)));
					LA22: ;
					LOC17 = LOC18;
					if (!(LOC17)) goto LA23;
					LOC17 = !(((3 &(1<<(((*p).tok->data[(NI)((*p).idx + ((NI) 1))].kind)&7)))!=0));
					LA23: ;
					if (!LOC17) goto LA24;
					pushind_332011(p, (*p).tok->data[(*p).idx].ival);
					b = newrstnode_330108(((NU8) 12));
					parsesection_334217(p, b);
					c = newrstnode_330108(((NU8) 10));
					add_330171(c, a);
					add_330171(c, b);
					add_330171(result, c);
					popind_332032(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_335205((&(*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*) &TMP2599)));
						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_330090(result);
			if (!(LOC49 == ((NI) 0))) goto LA50;
			result = NIM_NIL;
		}
		LA50: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(Rstnode330011*, parsetransition_336425)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = newrstnode_330108(((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_334199)(Rstparser331587* p, Rstnode330011* 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_333752(p, father);
			}
			break;
			case ((NU8) 0):
			case ((NU8) 1):
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NI, getlevel_335182)(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(Rstnode330011*, parseheadline_335449)(Rstparser331587* p) {
	Rstnode330011* result;
	NIM_CHAR c;
	result = 0;
	result = newrstnode_330108(((NU8) 1));
	parseuntilnewline_334199(p, result);
	c = (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	(*result).level = getlevel_335182((*(*p).s).underlinetolevel, (&(*(*p).s).ulevel), c);
	return result;
}

N_NIMCALL(Rstnode330011*, parseoverline_336481)(Rstparser331587* p) {
	Rstnode330011* result;
	NIM_CHAR c;
	result = 0;
	c = (*p).tok->data[(*p).idx].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	result = newrstnode_330108(((NU8) 2));
	{
		while (1) {
			parseuntilnewline_334199(p, result);
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA5;
				(*p).idx += ((NI) 1);
				{
					NI LOC9;
					Rstnode330011* LOC12;
					LOC9 = 0;
					LOC9 = currind_332001((&(*p)));
					if (!(LOC9 < (*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival)) goto LA10;
					LOC12 = 0;
					LOC12 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2632));
					add_330171(result, LOC12);
				}
				goto LA7;
				LA10: ;
				{
					goto LA1;
				}
				LA7: ;
			}
			goto LA3;
			LA5: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	(*result).level = getlevel_335182((*(*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_335828)(Rstparser331587* 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_335838)(Rstparser331587* p, TY331608** cols) {
	NI L;
	L = ((NI) 0);
	{
		while (1) {
			L += ((NI) 1);
			(*cols) = (TY331608*) setLengthSeq(&((*cols))->Sup, sizeof(NI), ((NI) (L)));
			(*cols)->data[(NI)(L - ((NI) 1))] = tokend_335828((&(*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(Rstnode330011*, parsesimpletable_336076)(Rstparser331587* p) {
	Rstnode330011* result;
	TY331608* cols;
	TY129408* row;
	NI i;
	NI last;
	NI line;
	NIM_CHAR c;
	Rstparser331587 q;
	Rstnode330011* a;
	Rstnode330011* 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 = (&NTI331587);
	a = 0;
	b = 0;
	result = newrstnode_330108(((NU8) 29));
	cols = (TY331608*) newSeq((&NTI331608), 0);
	row = (TY129408*) newSeq((&NTI129408), 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_335205((&(*p)));
				{
					if (!((3 &(1<<(((*p).tok->data[last].kind)&7)))!=0)) goto LA9;
					(*p).idx = last;
					goto LA1;
				}
				LA9: ;
				getcolumns_335838(p, (&cols));
				row = (TY129408*) setLengthSeq(&(row)->Sup, sizeof(NimStringDesc*), ((NI) ((cols ? cols->Sup.len : 0))));
				{
					if (!!((a == NIM_NIL))) goto LA13;
					{
						NI j_336184;
						NI HEX3Atmp_336332;
						NI LOC16;
						NI res_336335;
						j_336184 = 0;
						HEX3Atmp_336332 = 0;
						LOC16 = 0;
						LOC16 = len_330090(a);
						HEX3Atmp_336332 = (NI)(LOC16 - ((NI) 1));
						res_336335 = ((NI) 0);
						{
							while (1) {
								if (!(res_336335 <= HEX3Atmp_336332)) goto LA18;
								j_336184 = res_336335;
								(*(*a).sons->data[j_336184]).kind = ((NU8) 32);
								res_336335 += ((NI) 1);
							} LA18: ;
						}
					}
				}
				LA13: ;
			}
			LA5: ;
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 0))) goto LA21;
				goto LA1;
			}
			LA21: ;
			{
				NI j_336206;
				NI HEX3Atmp_336340;
				NI res_336343;
				j_336206 = 0;
				HEX3Atmp_336340 = 0;
				HEX3Atmp_336340 = (row ? (row->Sup.len-1) : -1);
				res_336343 = ((NI) 0);
				{
					while (1) {
						NimStringDesc* LOC26;
						if (!(res_336343 <= HEX3Atmp_336340)) goto LA25;
						j_336206 = res_336343;
						LOC26 = 0;
						LOC26 = row->data[j_336206]; row->data[j_336206] = copyStringRC1(((NimStringDesc*) &TMP2203));
						if (LOC26) nimGCunrefNoCycle(LOC26);
						res_336343 += ((NI) 1);
					} LA25: ;
				}
			}
			line = (*p).tok->data[(*p).idx].line;
			{
				while (1) {
					i = ((NI) 0);
					{
						while (1) {
							if (!!(((3 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0))) goto LA30;
							{
								NI LOC33;
								LOC33 = 0;
								LOC33 = tokend_335828((&(*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_335828((&(*p)));
						if (!(LOC47 <= cols->data[((NI) 0)])) goto LA48;
						goto LA27;
					}
					LA48: ;
					{
						if (!((17 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0)) goto LA52;
						goto LA27;
					}
					LA52: ;
					{
						NI j_336295;
						NI HEX3Atmp_336350;
						NI res_336353;
						j_336295 = 0;
						HEX3Atmp_336350 = 0;
						HEX3Atmp_336350 = (row ? (row->Sup.len-1) : -1);
						res_336353 = ((NI) 1);
						{
							while (1) {
								if (!(res_336353 <= HEX3Atmp_336350)) goto LA56;
								j_336295 = res_336353;
								row->data[j_336295] = addChar(row->data[j_336295], 10);
								res_336353 += ((NI) 1);
							} LA56: ;
						}
					}
				}
			} LA27: ;
			a = newrstnode_330108(((NU8) 31));
			{
				NI j_336308;
				NI HEX3Atmp_336358;
				NI res_336361;
				j_336308 = 0;
				HEX3Atmp_336358 = 0;
				HEX3Atmp_336358 = (row ? (row->Sup.len-1) : -1);
				res_336361 = ((NI) 0);
				{
					while (1) {
						NI LOC60;
						Rstnode330011* LOC61;
						if (!(res_336361 <= HEX3Atmp_336358)) goto LA59;
						j_336308 = res_336361;
						initparser_332068((&q), (*p).s);
						q.col = cols->data[j_336308];
						q.line = (NI)(line - ((NI) 1));
						q.filename = copyString((*p).filename);
						LOC60 = 0;
						LOC60 = gettokens_331429(row->data[j_336308], NIM_FALSE, (&q.tok));
						q.col += LOC60;
						b = newrstnode_330108(((NU8) 33));
						LOC61 = 0;
						LOC61 = parsedoc_336069((&q));
						add_330171(b, LOC61);
						add_330171(a, b);
						res_336361 += ((NI) 1);
					} LA59: ;
				}
			}
			add_330171(result, a);
		}
	} LA1: ;
	return result;
}

N_NIMCALL(Rstnode330011*, parseoptionlist_336631)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = newrstnode_330108(((NU8) 17));
	{
		while (1) {
			{
				NIM_BOOL LOC5;
				Rstnode330011* a;
				Rstnode330011* b;
				Rstnode330011* c;
				NI j;
				LOC5 = 0;
				LOC5 = isoptionlist_335292((&(*p)));
				if (!LOC5) goto LA6;
				a = newrstnode_330108(((NU8) 19));
				b = newrstnode_330108(((NU8) 23));
				c = newrstnode_330108(((NU8) 18));
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = match_332727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2611));
					if (!LOC10) goto LA11;
					(*p).idx += ((NI) 1);
				}
				LA11: ;
				{
					while (1) {
						Rstnode330011* LOC21;
						if (!!(((3 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=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_332529(p);
						add_330171(a, LOC21);
						(*p).idx += ((NI) 1);
					} LA14: ;
				} LA13: ;
				j = tokenafternewline_335205((&(*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_332001((&(*p)));
					LOC24 = (LOC28 < (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					LA27: ;
					if (!LOC24) goto LA29;
					pushind_332011(p, (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					parsesection_334217(p, b);
					popind_332032(p);
				}
				goto LA22;
				LA29: ;
				{
					parseline_334181(p, b);
				}
				LA22: ;
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA34;
					(*p).idx += ((NI) 1);
				}
				LA34: ;
				add_330171(c, a);
				add_330171(c, b);
				add_330171(result, c);
			}
			goto LA3;
			LA6: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(void, parseparagraph_335386)(Rstparser331587* p, Rstnode330011* 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_332001((&(*p)));
					if (!((*p).tok->data[(*p).idx].ival == LOC9)) goto LA10;
					(*p).idx += ((NI) 1);
					LOC12 = 0;
					LOC12 = whichsection_335302((&(*p)));
					switch (LOC12) {
					case ((NU8) 4):
					case ((NU8) 64):
					case ((NU8) 1):
					case ((NU8) 2):
					case ((NU8) 40):
					{
						Rstnode330011* LOC14;
						LOC14 = 0;
						LOC14 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2632));
						add_330171(result, LOC14);
					}
					break;
					case ((NU8) 26):
					{
						Rstnode330011* LOC16;
						LOC16 = 0;
						LOC16 = parselineblock_335321(p);
						addifnotnil_330191(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;
					Rstnode330011* LOC29;
					Rstnode330011* LOC30;
					LOC22 = 0;
					LOC23 = 0;
					LOC23 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2599));
					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_332001((&(*p)));
					LOC22 = (LOC26 < (*p).tok->data[(NI)((*p).idx + ((NI) 1))].ival);
					LA25: ;
					if (!LOC22) goto LA27;
					LOC29 = 0;
					LOC29 = newrstnode_330142(((NU8) 64), ((NimStringDesc*) &TMP2706));
					add_330171(result, LOC29);
					(*p).idx += ((NI) 1);
					LOC30 = 0;
					LOC30 = parseliteralblock_335099(p);
					add_330171(result, LOC30);
					goto LA1;
				}
				goto LA20;
				LA27: ;
				{
					parseinline_333752(p, result);
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			{
				parseinline_333752(p, result);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

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

N_NIMCALL(void, parsesection_334217)(Rstparser331587* p, Rstnode330011* result) {
	{
		while (1) {
			NIM_BOOL leave;
			Rstnode330011* 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_332001((&(*p)));
						if (!(LOC7 == (*p).tok->data[(*p).idx].ival)) goto LA8;
						(*p).idx += ((NI) 1);
					}
					goto LA5;
					LA8: ;
					{
						NI LOC11;
						Rstnode330011* a;
						LOC11 = 0;
						LOC11 = currind_332001((&(*p)));
						if (!(LOC11 < (*p).tok->data[(*p).idx].ival)) goto LA12;
						pushind_332011(p, (*p).tok->data[(*p).idx].ival);
						a = newrstnode_330108(((NU8) 28));
						parsesection_334217(p, a);
						add_330171(result, a);
						popind_332032(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_335302((&(*p)));
			switch (k) {
			case ((NU8) 24):
			{
				(*p).idx += ((NI) 1);
				a = parseliteralblock_335099(p);
			}
			break;
			case ((NU8) 5):
			{
				a = parsebulletlist_336565(p);
			}
			break;
			case ((NU8) 26):
			{
				a = parselineblock_335321(p);
			}
			break;
			case ((NU8) 40):
			{
				a = parsedotdot_335092(p);
			}
			break;
			case ((NU8) 7):
			{
				a = parseenumlist_336822(p);
			}
			break;
			case ((NU8) 64):
			{
				rstmessage_331967((&(*p)), ((NU8) 3));
			}
			break;
			case ((NU8) 4):
			{
			}
			break;
			case ((NU8) 9):
			{
				a = parsedefinitionlist_336734(p);
			}
			break;
			case ((NU8) 13):
			{
				{
					if (!(((NI) 0) < (*p).idx)) goto LA32;
					(*p).idx -= ((NI) 1);
				}
				LA32: ;
				a = parsefields_334258(p);
			}
			break;
			case ((NU8) 3):
			{
				a = parsetransition_336425(p);
			}
			break;
			case ((NU8) 1):
			{
				a = parseheadline_335449(p);
			}
			break;
			case ((NU8) 2):
			{
				a = parseoverline_336481(p);
			}
			break;
			case ((NU8) 29):
			{
				a = parsesimpletable_336076(p);
			}
			break;
			case ((NU8) 17):
			{
				a = parseoptionlist_336631(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_330108(((NU8) 4));
				parseparagraph_335386(p, a);
			}
			LA44: ;
			addifnotnil_330191(result, a);
		}
	} LA1: ;
	{
		NIM_BOOL LOC48;
		NU8 LOC49;
		NU8 LOC51;
		LOC48 = 0;
		LOC49 = 0;
		LOC49 = sonkind_336906(result, ((NI) 0));
		LOC48 = (LOC49 == ((NU8) 4));
		if (!(LOC48)) goto LA50;
		LOC51 = 0;
		LOC51 = sonkind_336906(result, ((NI) 1));
		LOC48 = !((LOC51 == ((NU8) 4)));
		LA50: ;
		if (!LOC48) goto LA52;
		(*(*result).sons->data[((NI) 0)]).kind = ((NU8) 0);
	}
	LA52: ;
}

N_NIMCALL(Rstnode330011*, parsesectionwrapper_337109)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = newrstnode_330108(((NU8) 0));
	parsesection_334217(p, result);
	{
		while (1) {
			NIM_BOOL LOC3;
			NI LOC5;
			LOC3 = 0;
			LOC3 = ((*result).kind == ((NU8) 0));
			if (!(LOC3)) goto LA4;
			LOC5 = 0;
			LOC5 = len_330090(result);
			LOC3 = (LOC5 == ((NI) 1));
			LA4: ;
			if (!LOC3) goto LA2;
			result = (*result).sons->data[((NI) 0)];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(Rstnode330011*, parsedoc_336069)(Rstparser331587* p) {
	Rstnode330011* result;
	result = 0;
	result = parsesectionwrapper_337109(p);
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA3;
		rstmessage_331967((&(*p)), ((NU8) 4));
	}
	LA3: ;
	return result;
}

N_NIMCALL(Rstnode330011*, rstparse_338320)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, Findfilehandler331023 findfile, Msghandler331021 msghandler) {
	Rstnode330011* result;
	Rstparser331587 p;
	Sharedstate331583* LOC1;
	NI LOC2;
	Rstnode330011* LOC3;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI331587);
	LOC1 = 0;
	LOC1 = newsharedstate_331877(options, findfile, msghandler);
	initparser_332068((&p), LOC1);
	p.filename = copyString(filename);
	p.line = line;
	LOC2 = 0;
	LOC2 = gettokens_331429(text, ((options &(1<<((((NU8) 0))&7)))!=0), (&p.tok));
	p.col = (NI)(column + LOC2);
	LOC3 = 0;
	LOC3 = parsedoc_336069((&p));
	result = resolvesubs_338250((&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* TMP2549[8];
static TNimNode* TMP2550[5];
static TNimNode* TMP2551[7];
NI TMP2553;
static char* NIM_CONST TMP2552[7] = {
"tkEof", 
"tkIndent", 
"tkWhite", 
"tkWord", 
"tkAdornment", 
"tkPunct", 
"tkOther"};
static TNimNode* TMP2555[9];
static TNimNode* TMP2556[4];
NI TMP2558;
static char* NIM_CONST TMP2557[4] = {
"roSkipPounds", 
"roSupportSmilies", 
"roSupportRawDirective", 
"roSupportMarkdown"};
static TNimNode* TMP2559[2];
static TNimNode* TMP2571[10];
NI TMP2573;
static char* NIM_CONST TMP2572[10] = {
"meCannotOpenFile", 
"meExpected", 
"meGridTableNotImplemented", 
"meNewSectionExpected", 
"meGeneralParseError", 
"meInvalidDirective", 
"mwRedefinitionOfLabel", 
"mwUnknownSubstitution", 
"mwUnsupportedLanguage", 
"mwUnsupportedField"};
static TNimNode* TMP2585[3];
NI TMP2587;
static char* NIM_CONST TMP2586[3] = {
"Hint", 
"Warning", 
"Error"};
static TNimNode* TMP2590[6];
static TNimNode TMP967[65];
NTI331587.size = sizeof(Rstparser331587);
NTI331587.kind = 17;
NTI331587.base = (&NTI4011);
TMP2549[0] = &TMP967[1];
TMP967[1].kind = 1;
TMP967[1].offset = offsetof(Rstparser331587, idx);
TMP967[1].typ = (&NTI108);
TMP967[1].name = "idx";
TMP2549[1] = &TMP967[2];
NTI331141.size = sizeof(Token331141);
NTI331141.kind = 18;
NTI331141.base = 0;
NTI331141.flags = 2;
TMP2550[0] = &TMP967[4];
NTI331139.size = sizeof(NU8);
NTI331139.kind = 14;
NTI331139.base = 0;
NTI331139.flags = 3;
for (TMP2553 = 0; TMP2553 < 7; TMP2553++) {
TMP967[TMP2553+5].kind = 1;
TMP967[TMP2553+5].offset = TMP2553;
TMP967[TMP2553+5].name = TMP2552[TMP2553];
TMP2551[TMP2553] = &TMP967[TMP2553+5];
}
TMP967[12].len = 7; TMP967[12].kind = 2; TMP967[12].sons = &TMP2551[0];
NTI331139.node = &TMP967[12];
TMP967[4].kind = 1;
TMP967[4].offset = offsetof(Token331141, kind);
TMP967[4].typ = (&NTI331139);
TMP967[4].name = "kind";
TMP2550[1] = &TMP967[13];
TMP967[13].kind = 1;
TMP967[13].offset = offsetof(Token331141, ival);
TMP967[13].typ = (&NTI108);
TMP967[13].name = "ival";
TMP2550[2] = &TMP967[14];
TMP967[14].kind = 1;
TMP967[14].offset = offsetof(Token331141, symbol);
TMP967[14].typ = (&NTI149);
TMP967[14].name = "symbol";
TMP2550[3] = &TMP967[15];
TMP967[15].kind = 1;
TMP967[15].offset = offsetof(Token331141, line);
TMP967[15].typ = (&NTI108);
TMP967[15].name = "line";
TMP2550[4] = &TMP967[16];
TMP967[16].kind = 1;
TMP967[16].offset = offsetof(Token331141, col);
TMP967[16].typ = (&NTI108);
TMP967[16].name = "col";
TMP967[3].len = 5; TMP967[3].kind = 2; TMP967[3].sons = &TMP2550[0];
NTI331141.node = &TMP967[3];
NTI331143.size = sizeof(Tokenseq331143*);
NTI331143.kind = 24;
NTI331143.base = (&NTI331141);
NTI331143.flags = 2;
NTI331143.marker = TMP2554;
TMP967[2].kind = 1;
TMP967[2].offset = offsetof(Rstparser331587, tok);
TMP967[2].typ = (&NTI331143);
TMP967[2].name = "tok";
TMP2549[2] = &TMP967[17];
NTI331583.size = sizeof(Sharedstate331583);
NTI331583.kind = 18;
NTI331583.base = 0;
NTI331583.flags = 2;
TMP2555[0] = &TMP967[19];
NTI331013.size = sizeof(NU8);
NTI331013.kind = 14;
NTI331013.base = 0;
NTI331013.flags = 3;
for (TMP2558 = 0; TMP2558 < 4; TMP2558++) {
TMP967[TMP2558+20].kind = 1;
TMP967[TMP2558+20].offset = TMP2558;
TMP967[TMP2558+20].name = TMP2557[TMP2558];
TMP2556[TMP2558] = &TMP967[TMP2558+20];
}
TMP967[24].len = 4; TMP967[24].kind = 2; TMP967[24].sons = &TMP2556[0];
NTI331013.node = &TMP967[24];
NTI331015.size = sizeof(NU8);
NTI331015.kind = 19;
NTI331015.base = (&NTI331013);
NTI331015.flags = 3;
TMP967[25].len = 0; TMP967[25].kind = 0;
NTI331015.node = &TMP967[25];
TMP967[19].kind = 1;
TMP967[19].offset = offsetof(Sharedstate331583, options);
TMP967[19].typ = (&NTI331015);
TMP967[19].name = "options";
TMP2555[1] = &TMP967[26];
TMP967[26].kind = 1;
TMP967[26].offset = offsetof(Sharedstate331583, ulevel);
TMP967[26].typ = (&NTI108);
TMP967[26].name = "uLevel";
TMP2555[2] = &TMP967[27];
TMP967[27].kind = 1;
TMP967[27].offset = offsetof(Sharedstate331583, olevel);
TMP967[27].typ = (&NTI108);
TMP967[27].name = "oLevel";
TMP2555[3] = &TMP967[28];
NTI331581.size = sizeof(Substitution331581);
NTI331581.kind = 18;
NTI331581.base = 0;
NTI331581.flags = 2;
TMP2559[0] = &TMP967[30];
TMP967[30].kind = 1;
TMP967[30].offset = offsetof(Substitution331581, key);
TMP967[30].typ = (&NTI149);
TMP967[30].name = "key";
TMP2559[1] = &TMP967[31];
TMP967[31].kind = 1;
TMP967[31].offset = offsetof(Substitution331581, value);
TMP967[31].typ = (&NTI330007);
TMP967[31].name = "value";
TMP967[29].len = 2; TMP967[29].kind = 2; TMP967[29].sons = &TMP2559[0];
NTI331581.node = &TMP967[29];
NTI331597.size = sizeof(TY331597*);
NTI331597.kind = 24;
NTI331597.base = (&NTI331581);
NTI331597.flags = 2;
NTI331597.marker = TMP2566;
TMP967[28].kind = 1;
TMP967[28].offset = offsetof(Sharedstate331583, subs);
TMP967[28].typ = (&NTI331597);
TMP967[28].name = "subs";
TMP2555[4] = &TMP967[32];
TMP967[32].kind = 1;
TMP967[32].offset = offsetof(Sharedstate331583, refs);
TMP967[32].typ = (&NTI331597);
TMP967[32].name = "refs";
TMP2555[5] = &TMP967[33];
TMP967[33].kind = 1;
TMP967[33].offset = offsetof(Sharedstate331583, underlinetolevel);
TMP967[33].typ = (&NTI103393);
TMP967[33].name = "underlineToLevel";
TMP2555[6] = &TMP967[34];
TMP967[34].kind = 1;
TMP967[34].offset = offsetof(Sharedstate331583, overlinetolevel);
TMP967[34].typ = (&NTI103393);
TMP967[34].name = "overlineToLevel";
TMP2555[7] = &TMP967[35];
NTI331021.size = sizeof(Msghandler331021);
NTI331021.kind = 25;
NTI331021.base = 0;
NTI331021.flags = 3;
TMP967[35].kind = 1;
TMP967[35].offset = offsetof(Sharedstate331583, msghandler);
TMP967[35].typ = (&NTI331021);
TMP967[35].name = "msgHandler";
TMP2555[8] = &TMP967[36];
NTI331023.size = sizeof(Findfilehandler331023);
NTI331023.kind = 25;
NTI331023.base = 0;
NTI331023.flags = 3;
TMP967[36].kind = 1;
TMP967[36].offset = offsetof(Sharedstate331583, findfile);
TMP967[36].typ = (&NTI331023);
TMP967[36].name = "findFile";
TMP967[18].len = 9; TMP967[18].kind = 2; TMP967[18].sons = &TMP2555[0];
NTI331583.node = &TMP967[18];
NTI331585.size = sizeof(Sharedstate331583*);
NTI331585.kind = 22;
NTI331585.base = (&NTI331583);
NTI331585.flags = 2;
NTI331585.marker = TMP2567;
TMP967[17].kind = 1;
TMP967[17].offset = offsetof(Rstparser331587, s);
TMP967[17].typ = (&NTI331585);
TMP967[17].name = "s";
TMP2549[3] = &TMP967[37];
NTI331608.size = sizeof(TY331608*);
NTI331608.kind = 24;
NTI331608.base = (&NTI108);
NTI331608.flags = 2;
NTI331608.marker = TMP2568;
TMP967[37].kind = 1;
TMP967[37].offset = offsetof(Rstparser331587, indentstack);
TMP967[37].typ = (&NTI331608);
TMP967[37].name = "indentStack";
TMP2549[4] = &TMP967[38];
TMP967[38].kind = 1;
TMP967[38].offset = offsetof(Rstparser331587, filename);
TMP967[38].typ = (&NTI149);
TMP967[38].name = "filename";
TMP2549[5] = &TMP967[39];
TMP967[39].kind = 1;
TMP967[39].offset = offsetof(Rstparser331587, line);
TMP967[39].typ = (&NTI108);
TMP967[39].name = "line";
TMP2549[6] = &TMP967[40];
TMP967[40].kind = 1;
TMP967[40].offset = offsetof(Rstparser331587, col);
TMP967[40].typ = (&NTI108);
TMP967[40].name = "col";
TMP2549[7] = &TMP967[41];
TMP967[41].kind = 1;
TMP967[41].offset = offsetof(Rstparser331587, hastoc);
TMP967[41].typ = (&NTI138);
TMP967[41].name = "hasToc";
TMP967[0].len = 8; TMP967[0].kind = 2; TMP967[0].sons = &TMP2549[0];
NTI331587.node = &TMP967[0];
NTI331019.size = sizeof(NU8);
NTI331019.kind = 14;
NTI331019.base = 0;
NTI331019.flags = 3;
for (TMP2573 = 0; TMP2573 < 10; TMP2573++) {
TMP967[TMP2573+42].kind = 1;
TMP967[TMP2573+42].offset = TMP2573;
TMP967[TMP2573+42].name = TMP2572[TMP2573];
TMP2571[TMP2573] = &TMP967[TMP2573+42];
}
TMP967[52].len = 10; TMP967[52].kind = 2; TMP967[52].sons = &TMP2571[0];
NTI331019.node = &TMP967[52];
NTI331017.size = sizeof(NU8);
NTI331017.kind = 14;
NTI331017.base = 0;
NTI331017.flags = 3;
for (TMP2587 = 0; TMP2587 < 3; TMP2587++) {
TMP967[TMP2587+53].kind = 1;
TMP967[TMP2587+53].offset = TMP2587;
TMP967[TMP2587+53].name = TMP2586[TMP2587];
TMP2585[TMP2587] = &TMP967[TMP2587+53];
}
TMP967[56].len = 3; TMP967[56].kind = 2; TMP967[56].sons = &TMP2585[0];
NTI331017.node = &TMP967[56];
NTI331589.size = sizeof(Eparseerror331589);
NTI331589.kind = 17;
NTI331589.base = (&NTI4049);
TMP967[57].len = 0; TMP967[57].kind = 2;
NTI331589.node = &TMP967[57];
NTI331839.size = sizeof(Eparseerror331589*);
NTI331839.kind = 22;
NTI331839.base = (&NTI331589);
NTI331839.marker = TMP2588;
NTI331145.size = sizeof(Lexer331145);
NTI331145.kind = 17;
NTI331145.base = (&NTI4011);
NTI331145.flags = 1;
TMP2590[0] = &TMP967[59];
TMP967[59].kind = 1;
TMP967[59].offset = offsetof(Lexer331145, buf);
TMP967[59].typ = (&NTI151);
TMP967[59].name = "buf";
TMP2590[1] = &TMP967[60];
TMP967[60].kind = 1;
TMP967[60].offset = offsetof(Lexer331145, bufpos);
TMP967[60].typ = (&NTI108);
TMP967[60].name = "bufpos";
TMP2590[2] = &TMP967[61];
TMP967[61].kind = 1;
TMP967[61].offset = offsetof(Lexer331145, line);
TMP967[61].typ = (&NTI108);
TMP967[61].name = "line";
TMP2590[3] = &TMP967[62];
TMP967[62].kind = 1;
TMP967[62].offset = offsetof(Lexer331145, col);
TMP967[62].typ = (&NTI108);
TMP967[62].name = "col";
TMP2590[4] = &TMP967[63];
TMP967[63].kind = 1;
TMP967[63].offset = offsetof(Lexer331145, baseindent);
TMP967[63].typ = (&NTI108);
TMP967[63].name = "baseIndent";
TMP2590[5] = &TMP967[64];
TMP967[64].kind = 1;
TMP967[64].offset = offsetof(Lexer331145, skippounds);
TMP967[64].typ = (&NTI138);
TMP967[64].name = "skipPounds";
TMP967[58].len = 6; TMP967[58].kind = 2; TMP967[58].sons = &TMP2590[0];
NTI331145.node = &TMP967[58];
}

