/* 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 Rstnode331011 Rstnode331011;
typedef struct Rstnodeseq331009 Rstnodeseq331009;
typedef struct Rstparser332587 Rstparser332587;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tokenseq332143 Tokenseq332143;
typedef struct Sharedstate332583 Sharedstate332583;
typedef struct TY332608 TY332608;
typedef struct Token332141 Token332141;
typedef struct TY332597 TY332597;
typedef struct Substitution332581 Substitution332581;
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 Eparseerror332589 Eparseerror332589;
typedef struct Valueerror4049 Valueerror4049;
typedef struct Exception Exception;
typedef struct Lexer332145 Lexer332145;
typedef struct Keyvaluepair145208 Keyvaluepair145208;
typedef struct TY130408 TY130408;
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  Rstnode331011  {
NU8 kind;
NimStringDesc* text;
NI level;
Rstnodeseq331009* sons;
};
typedef NU8 TY212407[32];
typedef N_NIMCALL_PTR(NimStringDesc*, Findfilehandler332023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, Msghandler332021) (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  Rstparser332587  {
  TNimObject Sup;
NI idx;
Tokenseq332143* tok;
Sharedstate332583* s;
TY332608* 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  Token332141  {
NU8 kind;
NI ival;
NimStringDesc* symbol;
NI line;
NI col;
};
typedef NI Skiptable103393[256];
struct  Sharedstate332583  {
NU8 options;
NI ulevel;
NI olevel;
TY332597* subs;
TY332597* refs;
Skiptable103393 underlinetolevel;
Skiptable103393 overlinetolevel;
Msghandler332021 msghandler;
Findfilehandler332023 findfile;
};
struct  Substitution332581  {
NimStringDesc* key;
Rstnode331011* 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* TY332061[10];
typedef NimStringDesc* TY332816[5];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror4049  {
  Exception Sup;
};
struct  Eparseerror332589  {
  Valueerror4049 Sup;
};
typedef NimStringDesc* TY191421[1];
struct  Lexer332145  {
  TNimObject Sup;
NCSTRING buf;
NI bufpos;
NI line;
NI col;
NI baseindent;
NIM_BOOL skippounds;
};
typedef NimStringDesc* TY335092[13];
typedef N_NIMCALL_PTR(Rstnode331011*, Sectionparser338212) (Rstparser332587* p);
struct Keyvaluepair145208 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef Keyvaluepair145208 TY332099[34];
typedef NimStringDesc* TY337829[3];
typedef NI TY337834[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 Tokenseq332143 {
  TGenericSeq Sup;
  Token332141 data[SEQ_DECL_SIZE];
};
struct TY332597 {
  TGenericSeq Sup;
  Substitution332581 data[SEQ_DECL_SIZE];
};
struct TY332608 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY130408 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct Rstnodeseq331009 {
  TGenericSeq Sup;
  Rstnode331011* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, rstnodetorefnameaux_333169)(Rstnode331011* n, NimStringDesc** r, NIM_BOOL* b);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NI, len_331090)(Rstnode331011* n);
N_NIMCALL(void, addnodesaux_333108)(Rstnode331011* 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_332073)(Rstnode331011* n);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing, TY212407 chars);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2555)(void* p, NI op);
N_NIMCALL(void, TMP2567)(void* p, NI op);
N_NIMCALL(void, TMP2568)(void* p, NI op);
N_NIMCALL(void, TMP2569)(void* p, NI op);
N_NIMCALL(void, initparser_333068)(Rstparser332587* p, Sharedstate332583* 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(Sharedstate332583*, newsharedstate_332877)(NU8 options, Findfilehandler332023 findfile, Msghandler332021 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_332807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(NU8, whichmsgclass_332627)(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, TMP2589)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
static N_INLINE(void, writeline_167405)(FILE* f, NimStringDesc** x, NI xLen0);
N_NIMCALL(void, write_16895)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, defaultfindfile_332867)(NimStringDesc* filename);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(NI, gettokens_332429)(NimStringDesc* buffer, NIM_BOOL skippounds, Tokenseq332143** tokens);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, rawgettok_332382)(Lexer332145* L, Token332141* tok);
N_NIMCALL(void, getthing_332174)(Lexer332145* L, Token332141* tok, TY212407 s);
N_NIMCALL(void, getindent_332357)(Lexer332145* L, Token332141* tok);
N_NIMCALL(NI, getindentaux_332263)(Lexer332145* L, NI start);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, getadornment_332224)(Lexer332145* L, Token332141* tok);
N_NIMCALL(Rstnode331011*, resolvesubs_339250)(Rstparser332587* p, Rstnode331011* n);
N_NIMCALL(NI, findsub_333292)(Rstparser332587* p, Rstnode331011* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, getenv_131044)(NimStringDesc* key);
N_NIMCALL(Rstnode331011*, newrstnode_331142)(NU8 kind, NimStringDesc* s);
N_NIMCALL(void, rstmessage_332943)(Rstparser332587* p, NU8 msgkind, NimStringDesc* arg);
N_NIMCALL(Rstnode331011*, findref_333487)(Rstparser332587* p, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, rstnodetorefname_332067)(Rstnode331011* n);
N_NIMCALL(Rstnode331011*, newrstnode_331108)(NU8 kind);
N_NIMCALL(void, add_331171)(Rstnode331011* father, Rstnode331011* son);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Rstnode331011*, parsedoc_337069)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsesectionwrapper_338109)(Rstparser332587* p);
N_NIMCALL(void, parsesection_335217)(Rstparser332587* p, Rstnode331011* result);
N_NIMCALL(NI, currind_333001)(Rstparser332587* p);
N_NIMCALL(void, pushind_333011)(Rstparser332587* p, NI ind);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, popind_333032)(Rstparser332587* p);
N_NIMCALL(NU8, whichsection_336302)(Rstparser332587* p);
N_NIMCALL(NIM_BOOL, match_333727)(Rstparser332587* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, allcharsinset_103130)(NimStringDesc* s, TY212407 theset);
N_NIMCALL(NI, tokenafternewline_336205)(Rstparser332587* p);
N_NIMCALL(NIM_BOOL, prednl_336251)(Rstparser332587* p);
N_NIMCALL(NIM_BOOL, islineblock_336240)(Rstparser332587* p);
N_NIMCALL(void, rstmessage_332967)(Rstparser332587* p, NU8 msgkind);
N_NIMCALL(NIM_BOOL, isdeflist_336270)(Rstparser332587* p);
N_NIMCALL(NIM_BOOL, isoptionlist_336292)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parseliteralblock_336099)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsebulletlist_337565)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parselineblock_336321)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsedotdot_336092)(Rstparser332587* p);
N_NIMCALL(NimStringDesc*, getdirective_334866)(Rstparser332587* p);
N_NIMCALL(NU8, getdirkind_335098)(NimStringDesc* s);
static N_INLINE(NI, find_335103)(TY335092 a, NimStringDesc* item);
N_NIMCALL(Rstnode331011*, dirinclude_338405)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsedirective_338372)(Rstparser332587* p, NU8 flags, Sectionparser338212 contentparser);
N_NIMCALL(Rstnode331011*, parsedirective_338229)(Rstparser332587* p, NU8 flags);
N_NIMCALL(Rstnode331011*, newleaf_333529)(Rstparser332587* p);
N_NIMCALL(void, parseline_335181)(Rstparser332587* p, Rstnode331011* father);
N_NIMCALL(void, parseinline_334752)(Rstparser332587* p, Rstnode331011* father);
N_NIMCALL(NIM_BOOL, isinlinemarkupstart_333680)(Rstparser332587* p, NimStringDesc* markup);
N_NIMCALL(void, parseuntil_334601)(Rstparser332587* p, Rstnode331011* father, NimStringDesc* postfix, NIM_BOOL interpretbackslash);
N_NIMCALL(NIM_BOOL, isinlinemarkupend_333636)(Rstparser332587* p, NimStringDesc* markup);
N_NIMCALL(void, parsebackslash_334330)(Rstparser332587* p, Rstnode331011* father);
N_NIMCALL(void, rstmessage_332954)(Rstparser332587* p, NU8 msgkind, NimStringDesc* arg, NI line, NI col);
N_NIMCALL(Rstnode331011*, parsemarkdowncodeblock_334686)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsepostfix_333992)(Rstparser332587* p, Rstnode331011* n);
N_NIMCALL(void, fixupembeddedref_333889)(Rstnode331011* n, Rstnode331011* a, Rstnode331011* b);
N_NIMCALL(void, setref_333426)(Rstparser332587* p, NimStringDesc* key, Rstnode331011* value);
N_NIMCALL(Rstnode331011*, parsesmiley_334079)(Rstparser332587* p);
N_NIMCALL(NI, matchverbatim_334033)(Rstparser332587* p, NI start, NimStringDesc* expr);
N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_NIMCALL(void, parseurl_334281)(Rstparser332587* p, Rstnode331011* father);
N_NIMCALL(NIM_BOOL, isurl_334201)(Rstparser332587* p, NI i);
static N_INLINE(NIM_BOOL, contains_334219)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
static N_INLINE(NI, find_334229)(NimStringDesc** a, NI aLen0, NimStringDesc* item);
N_NIMCALL(Rstnode331011*, parsefields_335258)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsefield_335225)(Rstparser332587* p);
N_NIMCALL(NIM_BOOL, indfollows_338353)(Rstparser332587* p);
N_NIMCALL(NimStringDesc*, getfieldvalue_332079)(Rstnode331011* n, NimStringDesc* fieldname);
N_NIMCALL(NimStringDesc*, readfile_16872)(NimStringDesc* filename);
N_NIMCALL(Rstnode331011*, dirimage_339007)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, dirfigure_339019)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, dirtitle_339031)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, dircontainer_338608)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, dircontents_339043)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, dirraw_339085)(Rstparser332587* p);
N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, dirrawaux_339068)(Rstparser332587* p, Rstnode331011** result, NU8 kind, Sectionparser338212 contentparser);
N_NIMCALL(Rstnode331011*, parsedirbody_338393)(Rstparser332587* p, Sectionparser338212 contentparser);
N_NIMCALL(Rstnode331011*, dircodeblock_338434)(Rstparser332587* p, NIM_BOOL nimrodextension);
N_NIMCALL(Rstnode331011*, dirindex_339055)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, getreferencename_333540)(Rstparser332587* p, NimStringDesc* endstr);
N_NIMCALL(Rstnode331011*, untileol_333578)(Rstparser332587* p);
N_NIMCALL(void, expect_333616)(Rstparser332587* p, NimStringDesc* tok);
N_NIMCALL(void, setsub_333365)(Rstparser332587* p, NimStringDesc* key, Rstnode331011* value);
N_NIMCALL(Rstnode331011*, parsecomment_334986)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parseenumlist_337822)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsedefinitionlist_337734)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsetransition_337425)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parseheadline_336449)(Rstparser332587* p);
N_NIMCALL(void, parseuntilnewline_335199)(Rstparser332587* p, Rstnode331011* father);
N_NIMCALL(NI, getlevel_336182)(NI* map, NI* lvl, NIM_CHAR c);
N_NIMCALL(Rstnode331011*, parseoverline_337481)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parsesimpletable_337076)(Rstparser332587* p);
N_NIMCALL(void, getcolumns_336838)(Rstparser332587* p, TY332608** cols);
N_NIMCALL(NI, tokend_336828)(Rstparser332587* p);
N_NIMCALL(Rstnode331011*, parseoptionlist_337631)(Rstparser332587* p);
N_NIMCALL(void, parseparagraph_336386)(Rstparser332587* p, Rstnode331011* result);
N_NIMCALL(void, addifnotnil_331191)(Rstnode331011* father, Rstnode331011* son);
N_NIMCALL(NU8, sonkind_337906)(Rstnode331011* father, NI i);
STRING_LITERAL(TMP2204, "", 0);
STRING_LITERAL(TMP2294, "\001\001", 2);
static NIM_CONST TY212407 TMP2315 = {
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];
} CNSTSEQ2572 = {{1, 1}, {((NI) 0)}};
NIM_CONST TY332608* TMP2570 = ((TY332608*)&CNSTSEQ2572);
STRING_LITERAL(TMP2575, "cannot open \'$1\'", 16);
STRING_LITERAL(TMP2576, "\'$1\' expected", 13);
STRING_LITERAL(TMP2577, "grid table is not implemented", 29);
STRING_LITERAL(TMP2578, "new section expected", 20);
STRING_LITERAL(TMP2579, "general parse error", 19);
STRING_LITERAL(TMP2580, "invalid directive: \'$1\'", 23);
STRING_LITERAL(TMP2581, "redefinition of label \'$1\'", 26);
STRING_LITERAL(TMP2582, "unknown substitution \'$1\'", 25);
STRING_LITERAL(TMP2583, "language \'$1\' not supported", 27);
STRING_LITERAL(TMP2584, "field \'$1\' not supported", 24);
NIM_CONST TY332061 messages_332058 = {((NimStringDesc*) &TMP2575),
((NimStringDesc*) &TMP2576),
((NimStringDesc*) &TMP2577),
((NimStringDesc*) &TMP2578),
((NimStringDesc*) &TMP2579),
((NimStringDesc*) &TMP2580),
((NimStringDesc*) &TMP2581),
((NimStringDesc*) &TMP2582),
((NimStringDesc*) &TMP2583),
((NimStringDesc*) &TMP2584)}
;
STRING_LITERAL(TMP2585, "$1($2, $3) $4: $5", 17);
STRING_LITERAL(TMP2590, "\012", 1);
static NIM_CONST TY212407 TMP2592 = {
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 TY212407 TMP2593 = {
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(TMP2594, "#", 1);
static NIM_CONST TY212407 TMP2595 = {
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(TMP2596, "ii", 2);
STRING_LITERAL(TMP2597, " a", 2);
STRING_LITERAL(TMP2598, "i", 1);
STRING_LITERAL(TMP2599, "ai", 2);
STRING_LITERAL(TMP2600, "::", 2);
STRING_LITERAL(TMP2601, "+", 1);
STRING_LITERAL(TMP2602, "*", 1);
STRING_LITERAL(TMP2603, "-", 1);
STRING_LITERAL(TMP2604, "|", 1);
STRING_LITERAL(TMP2605, "..", 2);
STRING_LITERAL(TMP2606, ":w:", 3);
STRING_LITERAL(TMP2607, "(e) ", 4);
STRING_LITERAL(TMP2608, "+a+", 3);
STRING_LITERAL(TMP2609, "-w", 2);
STRING_LITERAL(TMP2610, "--w", 3);
STRING_LITERAL(TMP2611, "/w", 2);
STRING_LITERAL(TMP2612, "//w", 3);
STRING_LITERAL(TMP2613, "e) ", 3);
STRING_LITERAL(TMP2614, "e. ", 3);
STRING_LITERAL(TMP2615, "author", 6);
STRING_LITERAL(TMP2616, "authors", 7);
STRING_LITERAL(TMP2617, "code", 4);
STRING_LITERAL(TMP2618, "code-block", 10);
STRING_LITERAL(TMP2619, "container", 9);
STRING_LITERAL(TMP2620, "contents", 8);
STRING_LITERAL(TMP2621, "figure", 6);
STRING_LITERAL(TMP2622, "image", 5);
STRING_LITERAL(TMP2623, "include", 7);
STRING_LITERAL(TMP2624, "index", 5);
STRING_LITERAL(TMP2625, "raw", 3);
STRING_LITERAL(TMP2626, "title", 5);
NIM_CONST TY335092 Dirids_335090 = {((NimStringDesc*) &TMP2204),
((NimStringDesc*) &TMP2615),
((NimStringDesc*) &TMP2616),
((NimStringDesc*) &TMP2617),
((NimStringDesc*) &TMP2618),
((NimStringDesc*) &TMP2619),
((NimStringDesc*) &TMP2620),
((NimStringDesc*) &TMP2621),
((NimStringDesc*) &TMP2622),
((NimStringDesc*) &TMP2623),
((NimStringDesc*) &TMP2624),
((NimStringDesc*) &TMP2625),
((NimStringDesc*) &TMP2626)}
;
static NIM_CONST TY212407 TMP2627 = {
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(TMP2628, "\\", 1);
STRING_LITERAL(TMP2629, "***", 3);
static NIM_CONST TY212407 TMP2630 = {
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(TMP2631, "``", 2);
STRING_LITERAL(TMP2632, "\\\\", 2);
STRING_LITERAL(TMP2633, " ", 1);
STRING_LITERAL(TMP2634, "**", 2);
STRING_LITERAL(TMP2635, "```", 3);
STRING_LITERAL(TMP2636, "`", 1);
STRING_LITERAL(TMP2637, "_", 1);
STRING_LITERAL(TMP2638, "__", 2);
STRING_LITERAL(TMP2639, ">", 1);
STRING_LITERAL(TMP2640, "<", 1);
STRING_LITERAL(TMP2641, "idx", 3);
STRING_LITERAL(TMP2642, "literal", 7);
STRING_LITERAL(TMP2643, "strong", 6);
STRING_LITERAL(TMP2644, "emphasis", 8);
STRING_LITERAL(TMP2645, "sub", 3);
STRING_LITERAL(TMP2646, "subscript", 9);
STRING_LITERAL(TMP2647, "sup", 3);
STRING_LITERAL(TMP2648, "supscript", 9);
STRING_LITERAL(TMP2649, ":D", 2);
STRING_LITERAL(TMP2650, "icon_e_biggrin", 14);
STRING_LITERAL(TMP2651, ":-D", 3);
STRING_LITERAL(TMP2652, ":)", 2);
STRING_LITERAL(TMP2653, "icon_e_smile", 12);
STRING_LITERAL(TMP2654, ":-)", 3);
STRING_LITERAL(TMP2655, ";)", 2);
STRING_LITERAL(TMP2656, "icon_e_wink", 11);
STRING_LITERAL(TMP2657, ";-)", 3);
STRING_LITERAL(TMP2658, ":(", 2);
STRING_LITERAL(TMP2659, "icon_e_sad", 10);
STRING_LITERAL(TMP2660, ":-(", 3);
STRING_LITERAL(TMP2661, ":o", 2);
STRING_LITERAL(TMP2662, "icon_e_surprised", 16);
STRING_LITERAL(TMP2663, ":-o", 3);
STRING_LITERAL(TMP2664, ":shock:", 7);
STRING_LITERAL(TMP2665, "icon_eek", 8);
STRING_LITERAL(TMP2666, ":?", 2);
STRING_LITERAL(TMP2667, "icon_e_confused", 15);
STRING_LITERAL(TMP2668, ":-?", 3);
STRING_LITERAL(TMP2669, ":-/", 3);
STRING_LITERAL(TMP2670, "8-)", 3);
STRING_LITERAL(TMP2671, "icon_cool", 9);
STRING_LITERAL(TMP2672, ":lol:", 5);
STRING_LITERAL(TMP2673, "icon_lol", 8);
STRING_LITERAL(TMP2674, ":x", 2);
STRING_LITERAL(TMP2675, "icon_mad", 8);
STRING_LITERAL(TMP2676, ":-x", 3);
STRING_LITERAL(TMP2677, ":P", 2);
STRING_LITERAL(TMP2678, "icon_razz", 9);
STRING_LITERAL(TMP2679, ":-P", 3);
STRING_LITERAL(TMP2680, ":oops:", 6);
STRING_LITERAL(TMP2681, "icon_redface", 12);
STRING_LITERAL(TMP2682, ":cry:", 5);
STRING_LITERAL(TMP2683, "icon_cry", 8);
STRING_LITERAL(TMP2684, ":evil:", 6);
STRING_LITERAL(TMP2685, "icon_evil", 9);
STRING_LITERAL(TMP2686, ":twisted:", 9);
STRING_LITERAL(TMP2687, "icon_twisted", 12);
STRING_LITERAL(TMP2688, ":roll:", 6);
STRING_LITERAL(TMP2689, "icon_rolleyes", 13);
STRING_LITERAL(TMP2690, ":!:", 3);
STRING_LITERAL(TMP2691, "icon_exclaim", 12);
STRING_LITERAL(TMP2692, ":?:", 3);
STRING_LITERAL(TMP2693, "icon_question", 13);
STRING_LITERAL(TMP2694, ":idea:", 6);
STRING_LITERAL(TMP2695, "icon_idea", 9);
STRING_LITERAL(TMP2696, ":arrow:", 7);
STRING_LITERAL(TMP2697, "icon_arrow", 10);
STRING_LITERAL(TMP2698, ":|", 2);
STRING_LITERAL(TMP2699, "icon_neutral", 12);
STRING_LITERAL(TMP2700, ":-|", 3);
STRING_LITERAL(TMP2701, ":mrgreen:", 9);
STRING_LITERAL(TMP2702, "icon_mrgreen", 12);
STRING_LITERAL(TMP2703, ":geek:", 6);
STRING_LITERAL(TMP2704, "icon_e_geek", 11);
STRING_LITERAL(TMP2705, ":ugeek:", 7);
STRING_LITERAL(TMP2706, "icon_e_ugeek", 12);
NIM_CONST TY332099 Smilies_332098 = {{((NimStringDesc*) &TMP2649),
((NimStringDesc*) &TMP2650)}
,
{((NimStringDesc*) &TMP2651),
((NimStringDesc*) &TMP2650)}
,
{((NimStringDesc*) &TMP2652),
((NimStringDesc*) &TMP2653)}
,
{((NimStringDesc*) &TMP2654),
((NimStringDesc*) &TMP2653)}
,
{((NimStringDesc*) &TMP2655),
((NimStringDesc*) &TMP2656)}
,
{((NimStringDesc*) &TMP2657),
((NimStringDesc*) &TMP2656)}
,
{((NimStringDesc*) &TMP2658),
((NimStringDesc*) &TMP2659)}
,
{((NimStringDesc*) &TMP2660),
((NimStringDesc*) &TMP2659)}
,
{((NimStringDesc*) &TMP2661),
((NimStringDesc*) &TMP2662)}
,
{((NimStringDesc*) &TMP2663),
((NimStringDesc*) &TMP2662)}
,
{((NimStringDesc*) &TMP2664),
((NimStringDesc*) &TMP2665)}
,
{((NimStringDesc*) &TMP2666),
((NimStringDesc*) &TMP2667)}
,
{((NimStringDesc*) &TMP2668),
((NimStringDesc*) &TMP2667)}
,
{((NimStringDesc*) &TMP2669),
((NimStringDesc*) &TMP2667)}
,
{((NimStringDesc*) &TMP2670),
((NimStringDesc*) &TMP2671)}
,
{((NimStringDesc*) &TMP2672),
((NimStringDesc*) &TMP2673)}
,
{((NimStringDesc*) &TMP2674),
((NimStringDesc*) &TMP2675)}
,
{((NimStringDesc*) &TMP2676),
((NimStringDesc*) &TMP2675)}
,
{((NimStringDesc*) &TMP2677),
((NimStringDesc*) &TMP2678)}
,
{((NimStringDesc*) &TMP2679),
((NimStringDesc*) &TMP2678)}
,
{((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*) &TMP2700),
((NimStringDesc*) &TMP2699)}
,
{((NimStringDesc*) &TMP2701),
((NimStringDesc*) &TMP2702)}
,
{((NimStringDesc*) &TMP2703),
((NimStringDesc*) &TMP2704)}
,
{((NimStringDesc*) &TMP2705),
((NimStringDesc*) &TMP2706)}
}
;
STRING_LITERAL(TMP2707, ":", 1);
STRING_LITERAL(TMP2708, "//", 2);
STRING_LITERAL(TMP2710, "http", 4);
STRING_LITERAL(TMP2711, "https", 5);
STRING_LITERAL(TMP2712, "ftp", 3);
STRING_LITERAL(TMP2713, "telnet", 6);
STRING_LITERAL(TMP2714, "file", 4);
NIM_CONST TY332816 TMP2709 = {((NimStringDesc*) &TMP2710),
((NimStringDesc*) &TMP2711),
((NimStringDesc*) &TMP2712),
((NimStringDesc*) &TMP2713),
((NimStringDesc*) &TMP2714)}
;
STRING_LITERAL(TMP2715, "html", 4);
STRING_LITERAL(TMP2716, "latex", 5);
STRING_LITERAL(TMP2717, "default-language", 16);
STRING_LITERAL(TMP2718, "Nimrod", 6);
STRING_LITERAL(TMP2719, " _", 2);
STRING_LITERAL(TMP2720, " |", 2);
STRING_LITERAL(TMP2721, "replace", 7);
STRING_LITERAL(TMP2722, " [", 2);
STRING_LITERAL(TMP2723, "]", 1);
NIM_CONST TY337829 wildcards_337827 = {((NimStringDesc*) &TMP2607),
((NimStringDesc*) &TMP2613),
((NimStringDesc*) &TMP2614)}
;
NIM_CONST TY337834 wildpos_337832 = {((NI) 1),
((NI) 0),
((NI) 0)}
;
extern TNimType NTI4011; /* RootObj */
TNimType NTI332587; /* RstParser */
extern TNimType NTI108; /* int */
TNimType NTI332141; /* Token */
TNimType NTI332139; /* TokType */
extern TNimType NTI149; /* string */
TNimType NTI332143; /* TokenSeq */
TNimType NTI332583; /* SharedState */
TNimType NTI332013; /* RstParseOption */
TNimType NTI332015; /* RstParseOptions */
TNimType NTI332581; /* Substitution */
extern TNimType NTI331007; /* PRstNode */
TNimType NTI332597; /* seq[Substitution] */
extern TNimType NTI103393; /* SkipTable */
TNimType NTI332021; /* MsgHandler */
TNimType NTI332023; /* FindFileHandler */
TNimType NTI332585; /* PSharedState */
TNimType NTI332608; /* seq[int] */
extern TNimType NTI138; /* bool */
extern Gcheap51018 gch_51059;
TNimType NTI332019; /* MsgKind */
TNimType NTI332017; /* MsgClass */
extern TNimType NTI4049; /* ValueError */
TNimType NTI332589; /* EParseError */
TNimType NTI332839; /* ref EParseError */
TNimType NTI332145; /* Lexer */
extern TNimType NTI151; /* cstring */
extern TNimType NTI130408; /* seq[string] */

N_NIMCALL(void, rstnodetorefnameaux_333169)(Rstnode331011* n, NimStringDesc** r, NIM_BOOL* b) {
	{
		if (!((*n).kind == ((NU8) 64))) goto LA3;
		{
			NI i_333197;
			NI HEX3Atmp_333240;
			NI res_333243;
			i_333197 = 0;
			HEX3Atmp_333240 = 0;
			HEX3Atmp_333240 = (NI)(((*n).text ? (*n).text->Sup.len : 0) - ((NI) 1));
			res_333243 = ((NI) 0);
			{
				while (1) {
					if (!(res_333243 <= HEX3Atmp_333240)) goto LA7;
					i_333197 = res_333243;
					switch (((NU8)((*n).text->data[i_333197]))) {
					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_333197]);
					}
					break;
					case 97 ... 122:
					{
						{
							if (!(*b)) goto LA20;
							(*r) = addChar((*r), 45);
							(*b) = NIM_FALSE;
						}
						LA20: ;
						(*r) = addChar((*r), (*n).text->data[i_333197]);
					}
					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_333197])))) - ((NI) 65)))) + ((NI) 97)))))));
					}
					break;
					default:
					{
						{
							if (!(((NI) 0) < ((*r) ? (*r)->Sup.len : 0))) goto LA30;
							(*b) = NIM_TRUE;
						}
						LA30: ;
					}
					break;
					}
					res_333243 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_333238;
			NI HEX3Atmp_333248;
			NI LOC34;
			NI res_333251;
			i_333238 = 0;
			HEX3Atmp_333248 = 0;
			LOC34 = 0;
			LOC34 = len_331090(n);
			HEX3Atmp_333248 = (NI)(LOC34 - ((NI) 1));
			res_333251 = ((NI) 0);
			{
				while (1) {
					if (!(res_333251 <= HEX3Atmp_333248)) goto LA36;
					i_333238 = res_333251;
					rstnodetorefnameaux_333169((*n).sons->data[i_333238], r, b);
					res_333251 += ((NI) 1);
				} LA36: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, rstnodetorefname_332067)(Rstnode331011* n) {
	NimStringDesc* result;
	NIM_BOOL b;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2204));
	b = NIM_FALSE;
	rstnodetorefnameaux_333169(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_333108)(Rstnode331011* 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_333134;
			NI HEX3Atmp_333136;
			NI LOC7;
			NI res_333139;
			i_333134 = 0;
			HEX3Atmp_333136 = 0;
			LOC7 = 0;
			LOC7 = len_331090(n);
			HEX3Atmp_333136 = (NI)(LOC7 - ((NI) 1));
			res_333139 = ((NI) 0);
			{
				while (1) {
					if (!(res_333139 <= HEX3Atmp_333136)) goto LA9;
					i_333134 = res_333139;
					addnodesaux_333108((*n).sons->data[i_333134], result);
					res_333139 += ((NI) 1);
				} LA9: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, addnodes_332073)(Rstnode331011* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2204));
	addnodesaux_333108(n, (&result));
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_332079)(Rstnode331011* n, NimStringDesc* fieldname) {
	NimStringDesc* result;
{	result = 0;
	result = copyString(((NimStringDesc*) &TMP2204));
	{
		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_336045;
		NI HEX3Atmp_336048;
		NI LOC10;
		NI res_336051;
		i_336045 = 0;
		HEX3Atmp_336048 = 0;
		LOC10 = 0;
		LOC10 = len_331090((*n).sons->data[((NI) 1)]);
		HEX3Atmp_336048 = (NI)(LOC10 - ((NI) 1));
		res_336051 = ((NI) 0);
		{
			while (1) {
				Rstnode331011* f;
				if (!(res_336051 <= HEX3Atmp_336048)) goto LA12;
				i_336045 = res_336051;
				f = (*(*n).sons->data[((NI) 1)]).sons->data[i_336045];
				{
					NimStringDesc* LOC15;
					NI LOC16;
					LOC15 = 0;
					LOC15 = addnodes_332073((*f).sons->data[((NI) 0)]);
					LOC16 = 0;
					LOC16 = nsuCmpIgnoreStyle(LOC15, fieldname);
					if (!(LOC16 == ((NI) 0))) goto LA17;
					result = addnodes_332073((*f).sons->data[((NI) 1)]);
					{
						if (!((result) && (result)->Sup.len == 0)) goto LA21;
						result = copyString(((NimStringDesc*) &TMP2294));
					}
					LA21: ;
					goto BeforeRet;
				}
				LA17: ;
				res_336051 += ((NI) 1);
			} LA12: ;
		}
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getargument_332086)(Rstnode331011* n) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*n).sons->data[((NI) 0)] == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP2204));
	}
	goto LA1;
	LA3: ;
	{
		result = addnodes_332073((*n).sons->data[((NI) 0)]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getfieldvalue_335314)(Rstnode331011* n) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = addnodes_332073((*n).sons->data[((NI) 1)]);
	result = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2315);
	return result;
}
N_NIMCALL(void, TMP2555)(void* p, NI op) {
	Tokenseq332143* a;
	NI LOC1;
	a = (Tokenseq332143*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].symbol, op);
	}
}
N_NIMCALL(void, TMP2567)(void* p, NI op) {
	TY332597* a;
	NI LOC1;
	a = (TY332597*)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, TMP2568)(void* p, NI op) {
	Sharedstate332583* a;
	NI LOC1;
	NI LOC2;
	a = (Sharedstate332583*)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, TMP2569)(void* p, NI op) {
	TY332608* a;
	NI LOC1;
	a = (TY332608*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, initparser_333068)(Rstparser332587* p, Sharedstate332583* sharedstate) {
	genericSeqAssign((&(*p).indentstack), TMP2570, (&NTI332608));
	unsureAsgnRef((void**) (&(*p).tok), (Tokenseq332143*) newSeq((&NTI332143), 0));
	(*p).idx = ((NI) 0);
	unsureAsgnRef((void**) (&(*p).filename), copyString(((NimStringDesc*) &TMP2204)));
	(*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_332627)(NU8 k) {
	NU8 result;
	result = 0;
	switch (((NU8)(reprEnum(k, (&NTI332019))->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, TMP2589)(void* p, NI op) {
	Eparseerror332589* a;
	a = (Eparseerror332589*)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_167405)(FILE* f, NimStringDesc** x, NI xLen0) {
	{
		NimStringDesc* i_167421;
		NI i_167429;
		i_167421 = 0;
		i_167429 = ((NI) 0);
		{
			while (1) {
				if (!(i_167429 < xLen0)) goto LA3;
				i_167421 = x[i_167429];
				write_16895(f, i_167421);
				i_167429 += ((NI) 1);
			} LA3: ;
		}
	}
	write_16895(f, ((NimStringDesc*) &TMP2590));
}

N_NIMCALL(void, defaultmsghandler_332807)(NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg) {
	NU8 mc;
	NimStringDesc* a;
	NimStringDesc* message;
	TY332816 LOC1;
	mc = whichmsgclass_332627(msgkind);
	a = nsuFormatSingleElem(messages_332058[(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, (&NTI332017)));
	LOC1[4] = copyString(a);
	message = nsuFormatOpenArray(((NimStringDesc*) &TMP2585), LOC1, 5);
	{
		Eparseerror332589* e_332838;
		NimStringDesc* LOC6;
		if (!(mc == ((NU8) 2))) goto LA4;
		e_332838 = 0;
		e_332838 = (Eparseerror332589*) newObj((&NTI332839), sizeof(Eparseerror332589));
		(*e_332838).Sup.Sup.Sup.m_type = (&NTI332589);
		LOC6 = 0;
		LOC6 = (*e_332838).Sup.Sup.message; (*e_332838).Sup.Sup.message = copyStringRC1(message);
		if (LOC6) nimGCunrefNoCycle(LOC6);
		raiseException((Exception*)e_332838, "EParseError");
	}
	goto LA2;
	LA4: ;
	{
		TY191421 LOC8;
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = copyString(message);
		writeline_167405(stdout, LOC8, 1);
	}
	LA2: ;
}

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

N_NIMCALL(Sharedstate332583*, newsharedstate_332877)(NU8 options, Findfilehandler332023 findfile, Msghandler332021 msghandler) {
	Sharedstate332583* result;
	result = 0;
	result = (Sharedstate332583*) newObj((&NTI332585), sizeof(Sharedstate332583));
	if ((*result).subs) nimGCunrefNoCycle((*result).subs);
	(*result).subs = (TY332597*) newSeqRC1((&NTI332597), 0);
	if ((*result).refs) nimGCunrefNoCycle((*result).refs);
	(*result).refs = (TY332597*) newSeqRC1((&NTI332597), 0);
	(*result).options = options;
	{
		if (!!(msghandler == 0)) goto LA3;
		(*result).msghandler = msghandler;
	}
	goto LA1;
	LA3: ;
	{
		(*result).msghandler = defaultmsghandler_332807;
	}
	LA1: ;
	{
		if (!!(findfile == 0)) goto LA8;
		(*result).findfile = findfile;
	}
	goto LA6;
	LA8: ;
	{
		(*result).findfile = defaultfindfile_332867;
	}
	LA6: ;
	return result;
}

N_NIMCALL(void, getthing_332174)(Lexer332145* L, Token332141* tok, TY212407 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_332263)(Lexer332145* 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_332263(L, pos);
	}
	goto LA30;
	LA37: ;
	LA30: ;
	(*L).bufpos = pos;
	return result;
}

N_NIMCALL(void, getindent_332357)(Lexer332145* L, Token332141* tok) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	(*tok).col = ((NI) 0);
	(*tok).kind = ((NU8) 1);
	(*tok).ival = getindentaux_332263(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*) &TMP2590));
appendString(LOC1, LOC2);
	unsureAsgnRef((void**) (&(*tok).symbol), LOC1);
}

N_NIMCALL(void, getadornment_332224)(Lexer332145* L, Token332141* 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_332382)(Lexer332145* L, Token332141* tok) {
	NIM_CHAR c;
	unsureAsgnRef((void**) (&(*tok).symbol), copyString(((NimStringDesc*) &TMP2204)));
	(*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_332174(L, tok, TMP2592);
	}
	break;
	case 32:
	case 9:
	case 11:
	case 12:
	{
		getthing_332174(L, tok, TMP2593);
		(*tok).kind = ((NU8) 2);
		{
			if (!(((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(13)) || ((NU8)((*L).buf[(*L).bufpos])) == ((NU8)(10)))) goto LA5;
			rawgettok_332382(L, tok);
		}
		LA5: ;
	}
	break;
	case 13:
	case 10:
	{
		getindent_332357(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_332224(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_332429)(NimStringDesc* buffer, NIM_BOOL skippounds, Tokenseq332143** tokens) {
	NI result;
	Lexer332145 L;
	NI length;
	result = 0;
	memset((void*)(&L), 0, sizeof(L));
	L.Sup.m_type = (&NTI332145);
	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) = (Tokenseq332143*) setLengthSeq(&((*tokens))->Sup, sizeof(Token332141), ((NI) (length)));
			rawgettok_332382((&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_333292)(Rstparser332587* p, Rstnode331011* n) {
	NI result;
	NimStringDesc* key;
{	result = 0;
	key = addnodes_332073(n);
	{
		NI i_333311;
		NI HEX3Atmp_333326;
		NI res_333329;
		i_333311 = 0;
		HEX3Atmp_333326 = 0;
		HEX3Atmp_333326 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_333329 = ((NI) 0);
		{
			while (1) {
				if (!(res_333329 <= HEX3Atmp_333326)) goto LA3;
				i_333311 = res_333329;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_333311].key)) goto LA6;
					result = i_333311;
					goto BeforeRet;
				}
				LA6: ;
				res_333329 += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NI i_333324;
		NI HEX3Atmp_333334;
		NI res_333337;
		i_333324 = 0;
		HEX3Atmp_333334 = 0;
		HEX3Atmp_333334 = ((*(*p).s).subs ? ((*(*p).s).subs->Sup.len-1) : -1);
		res_333337 = ((NI) 0);
		{
			while (1) {
				if (!(res_333337 <= HEX3Atmp_333334)) goto LA10;
				i_333324 = res_333337;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = nsuCmpIgnoreStyle(key, (*(*p).s).subs->data[i_333324].key);
					if (!(LOC13 == ((NI) 0))) goto LA14;
					result = i_333324;
					goto BeforeRet;
				}
				LA14: ;
				res_333337 += ((NI) 1);
			} LA10: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rstmessage_332943)(Rstparser332587* 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(Rstnode331011*, findref_333487)(Rstparser332587* p, NimStringDesc* key) {
	Rstnode331011* result;
{	result = 0;
	{
		NI i_333505;
		NI HEX3Atmp_333507;
		NI res_333510;
		i_333505 = 0;
		HEX3Atmp_333507 = 0;
		HEX3Atmp_333507 = ((*(*p).s).refs ? ((*(*p).s).refs->Sup.len-1) : -1);
		res_333510 = ((NI) 0);
		{
			while (1) {
				if (!(res_333510 <= HEX3Atmp_333507)) goto LA3;
				i_333505 = res_333510;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_333505].key)) goto LA6;
					result = (*(*p).s).refs->data[i_333505].value;
					goto BeforeRet;
				}
				LA6: ;
				res_333510 += ((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(Rstnode331011*, resolvesubs_339250)(Rstparser332587* p, Rstnode331011* n) {
	Rstnode331011* result;
{	result = 0;
	result = n;
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).kind) {
	case ((NU8) 62):
	{
		NI x;
		x = findsub_333292(p, n);
		{
			if (!(((NI) 0) <= x)) goto LA8;
			result = (*(*p).s).subs->data[x].value;
		}
		goto LA6;
		LA8: ;
		{
			NimStringDesc* key;
			NimStringDesc* e;
			key = addnodes_332073(n);
			e = getenv_131044(key);
			{
				if (!!(((e) && (e)->Sup.len == 0))) goto LA13;
				result = newrstnode_331142(((NU8) 64), e);
			}
			goto LA11;
			LA13: ;
			{
				rstmessage_332943((&(*p)), ((NU8) 7), key);
			}
			LA11: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 39):
	{
		Rstnode331011* y;
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rstnodetorefname_332067(n);
		y = findref_333487(p, LOC17);
		{
			if (!!((y == NIM_NIL))) goto LA20;
			result = newrstnode_331108(((NU8) 38));
			(*n).kind = ((NU8) 0);
			add_331171(result, n);
			add_331171(result, y);
		}
		LA20: ;
	}
	break;
	case ((NU8) 64):
	{
	}
	break;
	case ((NU8) 44):
	{
		(*p).hastoc = NIM_TRUE;
	}
	break;
	default:
	{
		{
			NI i_339296;
			NI HEX3Atmp_339298;
			NI LOC26;
			NI res_339301;
			i_339296 = 0;
			HEX3Atmp_339298 = 0;
			LOC26 = 0;
			LOC26 = len_331090(n);
			HEX3Atmp_339298 = (NI)(LOC26 - ((NI) 1));
			res_339301 = ((NI) 0);
			{
				while (1) {
					if (!(res_339301 <= HEX3Atmp_339298)) goto LA28;
					i_339296 = res_339301;
					asgnRefNoCycle((void**) (&(*n).sons->data[i_339296]), resolvesubs_339250(p, (*n).sons->data[i_339296]));
					res_339301 += ((NI) 1);
				} LA28: ;
			}
		}
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

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

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

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

N_NIMCALL(NIM_BOOL, match_333727)(Rstparser332587* 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*) &TMP2594));
				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, TMP2595);
					}
					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_336205)(Rstparser332587* 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_336251)(Rstparser332587* 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_333001(p);
		LOC5 = ((*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival == LOC7);
		LA6: ;
		result = LOC5;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, islineblock_336240)(Rstparser332587* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_336205(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*) &TMP2604));
	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_332967)(Rstparser332587* 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_336270)(Rstparser332587* p) {
	NIM_BOOL result;
	NI j;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	j = tokenafternewline_336205(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*) &TMP2600)));
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, isoptionlist_336292)(Rstparser332587* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2609));
	if (LOC3) goto LA4;
	LOC3 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2610));
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2611));
	LA5: ;
	LOC1 = LOC2;
	if (LOC1) goto LA6;
	LOC1 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2612));
	LA6: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, whichsection_336302)(Rstparser332587* p) {
	NU8 result;
	result = 0;
	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 4):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = match_333727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2596));
			if (!LOC4) goto LA5;
			result = ((NU8) 3);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = match_333727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2597));
			if (!LOC8) goto LA9;
			result = ((NU8) 29);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = match_333727(p, (NI)((*p).idx + ((NI) 1)), ((NimStringDesc*) &TMP2598));
			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_336205(p);
			LOC20 = 0;
			LOC20 = match_333727(p, LOC19, ((NimStringDesc*) &TMP2599));
			if (!LOC20) goto LA21;
			result = ((NU8) 1);
		}
		goto LA17;
		LA21: ;
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2600))) 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_336251(p);
			if (!(LOC28)) goto LA29;
			LOC30 = 0;
			LOC31 = 0;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2601));
			if (LOC31) goto LA32;
			LOC31 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2602));
			LA32: ;
			LOC30 = LOC31;
			if (LOC30) goto LA33;
			LOC30 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2603));
			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*) &TMP2604));
			if (!(LOC38)) goto LA39;
			LOC38 = islineblock_336240(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*) &TMP2605));
			if (!(LOC43)) goto LA44;
			LOC43 = prednl_336251(p);
			LA44: ;
			if (!LOC43) goto LA45;
			result = ((NU8) 40);
		}
		goto LA17;
		LA45: ;
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2606));
			if (!(LOC48)) goto LA49;
			LOC48 = prednl_336251(p);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 13);
		}
		goto LA17;
		LA50: ;
		{
			NIM_BOOL LOC53;
			LOC53 = 0;
			LOC53 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2607));
			if (!LOC53) goto LA54;
			result = ((NU8) 7);
		}
		goto LA17;
		LA54: ;
		{
			NIM_BOOL LOC57;
			LOC57 = 0;
			LOC57 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2608));
			if (!LOC57) goto LA58;
			result = ((NU8) 30);
			rstmessage_332967(p, ((NU8) 2));
		}
		goto LA17;
		LA58: ;
		{
			NIM_BOOL LOC61;
			LOC61 = 0;
			LOC61 = isdeflist_336270(p);
			if (!LOC61) goto LA62;
			result = ((NU8) 9);
		}
		goto LA17;
		LA62: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = isoptionlist_336292(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_336205(p);
			LOC73 = 0;
			LOC73 = match_333727(p, LOC72, ((NimStringDesc*) &TMP2599));
			if (!LOC73) goto LA74;
			result = ((NU8) 1);
		}
		goto LA70;
		LA74: ;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2613));
			if (LOC77) goto LA78;
			LOC77 = match_333727(p, (*p).idx, ((NimStringDesc*) &TMP2614));
			LA78: ;
			if (!LOC77) goto LA79;
			result = ((NU8) 7);
		}
		goto LA70;
		LA79: ;
		{
			NIM_BOOL LOC82;
			LOC82 = 0;
			LOC82 = isdeflist_336270(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(Rstnode331011*, parseliteralblock_336099)(Rstparser332587* p) {
	Rstnode331011* result;
	Rstnode331011* n;
	result = 0;
	result = newrstnode_331108(((NU8) 24));
	n = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2204));
	{
		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*) &TMP2590));
						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_331171(result, n);
	return result;
}

N_NIMCALL(Rstnode331011*, parsebulletlist_337565)(Rstparser332587* p) {
	Rstnode331011* 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_331108(((NU8) 5));
		pushind_333011(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Rstnode331011* item;
				item = newrstnode_331108(((NU8) 6));
				parsesection_335217(p, item);
				add_331171(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_333032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(Rstnode331011*, parselineblock_336321)(Rstparser332587* p) {
	Rstnode331011* 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_331108(((NU8) 26));
		pushind_333011(p, (*p).tok->data[(NI)((*p).idx + ((NI) 2))].col);
		(*p).idx += ((NI) 2);
		{
			while (1) {
				Rstnode331011* item;
				item = newrstnode_331108(((NU8) 27));
				parsesection_335217(p, item);
				add_331171(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*) &TMP2604));
					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_333032(p);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdirective_334866)(Rstparser332587* 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*) &TMP2600))) 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*) &TMP2600))) 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*) &TMP2204));
		}
		LA17: ;
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP2204));
	}
	LA1: ;
	return result;
}

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

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

N_NIMCALL(Rstnode331011*, newleaf_333529)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = newrstnode_331142(((NU8) 64), (*p).tok->data[(*p).idx].symbol);
	return result;
}

N_NIMCALL(NIM_BOOL, isinlinemarkupstart_333680)(Rstparser332587* 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 = ((TMP2627[((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*) &TMP2628))) 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_333636)(Rstparser332587* 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 = ((TMP2630[((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*) &TMP2631)));
			if (!(LOC21)) goto LA22;
			LOC21 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 1))].symbol, ((NimStringDesc*) &TMP2628));
			LA22: ;
			if (!LOC21) goto LA23;
			result = NIM_FALSE;
		}
		LA23: ;
	}
	LA17: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, parsebackslash_334330)(Rstparser332587* p, Rstnode331011* father) {
	{
		Rstnode331011* LOC5;
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2632))) goto LA3;
		LOC5 = 0;
		LOC5 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2628));
		add_331171(father, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2628))) goto LA7;
		(*p).idx += ((NI) 1);
		{
			Rstnode331011* LOC13;
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 2)))) goto LA11;
			LOC13 = 0;
			LOC13 = newleaf_333529(p);
			add_331171(father, LOC13);
		}
		LA11: ;
		{
			if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA16;
			(*p).idx += ((NI) 1);
		}
		LA16: ;
	}
	goto LA1;
	LA7: ;
	{
		Rstnode331011* LOC19;
		LOC19 = 0;
		LOC19 = newleaf_333529(p);
		add_331171(father, LOC19);
		(*p).idx += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, rstmessage_332954)(Rstparser332587* 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_334601)(Rstparser332587* p, Rstnode331011* 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_333636((&(*p)), postfix);
					if (!LOC6) goto LA7;
					(*p).idx += ((NI) 1);
					goto LA1;
				}
				goto LA4;
				LA7: ;
				{
					if (!interpretbackslash) goto LA10;
					parsebackslash_334330(p, father);
				}
				goto LA4;
				LA10: ;
				{
					Rstnode331011* LOC13;
					LOC13 = 0;
					LOC13 = newleaf_333529(p);
					add_331171(father, LOC13);
					(*p).idx += ((NI) 1);
				}
				LA4: ;
			}
			break;
			case ((NU8) 4):
			case ((NU8) 3):
			case ((NU8) 6):
			{
				Rstnode331011* LOC15;
				LOC15 = 0;
				LOC15 = newleaf_333529(p);
				add_331171(father, LOC15);
				(*p).idx += ((NI) 1);
			}
			break;
			case ((NU8) 1):
			{
				Rstnode331011* LOC17;
				LOC17 = 0;
				LOC17 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2633));
				add_331171(father, LOC17);
				(*p).idx += ((NI) 1);
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA20;
					rstmessage_332954((&(*p)), ((NU8) 1), postfix, line, col);
					goto LA1;
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			{
				Rstnode331011* LOC23;
				LOC23 = 0;
				LOC23 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2633));
				add_331171(father, LOC23);
				(*p).idx += ((NI) 1);
			}
			break;
			default:
			{
				rstmessage_332954((&(*p)), ((NU8) 1), postfix, line, col);
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(Rstnode331011*, parsemarkdowncodeblock_334686)(Rstparser332587* p) {
	Rstnode331011* result;
	Rstnode331011* args;
	Rstnode331011* n;
	Rstnode331011* lb;
	result = 0;
	args = newrstnode_331108(((NU8) 41));
	{
		Rstnode331011* LOC5;
		if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA3;
		LOC5 = 0;
		LOC5 = newleaf_333529(p);
		add_331171(args, LOC5);
		(*p).idx += ((NI) 1);
	}
	goto LA1;
	LA3: ;
	{
		args = NIM_NIL;
	}
	LA1: ;
	n = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2204));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 0):
			{
				rstmessage_332943((&(*p)), ((NU8) 1), ((NimStringDesc*) &TMP2635));
				goto LA7;
			}
			break;
			case ((NU8) 5):
			{
				{
					if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2635))) 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_331108(((NU8) 24));
	add_331171(lb, n);
	result = newrstnode_331108(((NU8) 47));
	add_331171(result, args);
	add_331171(result, NIM_NIL);
	add_331171(result, lb);
	return result;
}

N_NIMCALL(void, fixupembeddedref_333889)(Rstnode331011* n, Rstnode331011* a, Rstnode331011* b) {
	NI sep;
	NI incr;
	sep = ((NI) -1);
	{
		NI i_333906;
		NI HEX3Atmp_333935;
		NI LOC2;
		NI res_333938;
		i_333906 = 0;
		HEX3Atmp_333935 = 0;
		LOC2 = 0;
		LOC2 = len_331090(n);
		HEX3Atmp_333935 = (NI)(LOC2 - ((NI) 2));
		res_333938 = HEX3Atmp_333935;
		{
			while (1) {
				if (!(((NI) 0) <= res_333938)) goto LA4;
				i_333906 = res_333938;
				{
					if (!eqStrings((*(*n).sons->data[i_333906]).text, ((NimStringDesc*) &TMP2640))) goto LA7;
					sep = i_333906;
					goto LA1;
				}
				LA7: ;
				res_333938 -= ((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_333920;
		NI HEX3Atmp_333943;
		NI res_333946;
		i_333920 = 0;
		HEX3Atmp_333943 = 0;
		HEX3Atmp_333943 = (NI)(sep - incr);
		res_333946 = ((NI) 0);
		{
			while (1) {
				if (!(res_333946 <= HEX3Atmp_333943)) goto LA18;
				i_333920 = res_333946;
				add_331171(a, (*n).sons->data[i_333920]);
				res_333946 += ((NI) 1);
			} LA18: ;
		}
	}
	{
		NI i_333933;
		NI HEX3Atmp_333951;
		NI HEX3Atmp_333952;
		NI LOC20;
		NI res_333955;
		i_333933 = 0;
		HEX3Atmp_333951 = 0;
		HEX3Atmp_333952 = 0;
		HEX3Atmp_333951 = (NI)(sep + ((NI) 1));
		LOC20 = 0;
		LOC20 = len_331090(n);
		HEX3Atmp_333952 = (NI)(LOC20 - ((NI) 2));
		res_333955 = HEX3Atmp_333951;
		{
			while (1) {
				if (!(res_333955 <= HEX3Atmp_333952)) goto LA22;
				i_333933 = res_333955;
				add_331171(b, (*n).sons->data[i_333933]);
				res_333955 += ((NI) 1);
			} LA22: ;
		}
	}
}

N_NIMCALL(void, setref_333426)(Rstparser332587* p, NimStringDesc* key, Rstnode331011* value) {
	NI length;
	NimStringDesc* LOC14;
{	length = ((*(*p).s).refs ? (*(*p).s).refs->Sup.len : 0);
	{
		NI i_333453;
		NI HEX3Atmp_333465;
		NI res_333468;
		i_333453 = 0;
		HEX3Atmp_333465 = 0;
		HEX3Atmp_333465 = (NI)(length - ((NI) 1));
		res_333468 = ((NI) 0);
		{
			while (1) {
				if (!(res_333468 <= HEX3Atmp_333465)) goto LA3;
				i_333453 = res_333468;
				{
					if (!eqStrings(key, (*(*p).s).refs->data[i_333453].key)) goto LA6;
					{
						NimStringDesc* LOC10;
						NimStringDesc* LOC11;
						LOC10 = 0;
						LOC10 = addnodes_332073((*(*p).s).refs->data[i_333453].value);
						LOC11 = 0;
						LOC11 = addnodes_332073(value);
						if (!!(eqStrings(LOC10, LOC11))) goto LA12;
						rstmessage_332943((&(*p)), ((NU8) 6), key);
					}
					LA12: ;
					asgnRefNoCycle((void**) (&(*(*p).s).refs->data[i_333453].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_333468 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).refs = (TY332597*) setLengthSeq(&((*(*p).s).refs)->Sup, sizeof(Substitution332581), ((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(Rstnode331011*, parsepostfix_333992)(Rstparser332587* p, Rstnode331011* n) {
	Rstnode331011* result;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isinlinemarkupend_333636((&(*p)), ((NimStringDesc*) &TMP2637));
		if (LOC3) goto LA4;
		LOC3 = isinlinemarkupend_333636((&(*p)), ((NimStringDesc*) &TMP2638));
		LA4: ;
		if (!LOC3) goto LA5;
		(*p).idx += ((NI) 1);
		{
			NIM_BOOL LOC9;
			Rstnode331011* a;
			Rstnode331011* b;
			LOC9 = 0;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 2))].symbol, ((NimStringDesc*) &TMP2636));
			if (!(LOC9)) goto LA10;
			LOC9 = eqStrings((*p).tok->data[(NI)((*p).idx - ((NI) 3))].symbol, ((NimStringDesc*) &TMP2639));
			LA10: ;
			if (!LOC9) goto LA11;
			a = newrstnode_331108(((NU8) 0));
			b = newrstnode_331108(((NU8) 0));
			fixupembeddedref_333889(n, a, b);
			{
				NI LOC15;
				LOC15 = 0;
				LOC15 = len_331090(a);
				if (!(LOC15 == ((NI) 0))) goto LA16;
				result = newrstnode_331108(((NU8) 37));
				add_331171(result, b);
			}
			goto LA13;
			LA16: ;
			{
				NimStringDesc* LOC19;
				result = newrstnode_331108(((NU8) 38));
				add_331171(result, a);
				add_331171(result, b);
				LOC19 = 0;
				LOC19 = rstnodetorefname_332067(a);
				setref_333426(p, LOC19, b);
			}
			LA13: ;
		}
		goto LA7;
		LA11: ;
		{
			if (!((*n).kind == ((NU8) 60))) goto LA21;
			(*n).kind = ((NU8) 39);
		}
		goto LA7;
		LA21: ;
		{
			result = newrstnode_331108(((NU8) 39));
			add_331171(result, n);
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC25;
		LOC25 = 0;
		LOC25 = match_333727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2606));
		if (!LOC25) goto LA26;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2641))) goto LA30;
			(*n).kind = ((NU8) 56);
		}
		goto LA28;
		LA30: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2642))) goto LA33;
			(*n).kind = ((NU8) 61);
		}
		goto LA28;
		LA33: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2643))) goto LA36;
			(*n).kind = ((NU8) 58);
		}
		goto LA28;
		LA36: ;
		{
			if (!eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2644))) 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*) &TMP2645));
			if (LOC42) goto LA43;
			LOC42 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2646));
			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*) &TMP2647));
			if (LOC47) goto LA48;
			LOC47 = eqStrings((*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol, ((NimStringDesc*) &TMP2648));
			LA48: ;
			if (!LOC47) goto LA49;
			(*n).kind = ((NU8) 55);
		}
		goto LA28;
		LA49: ;
		{
			Rstnode331011* LOC52;
			result = newrstnode_331108(((NU8) 53));
			(*n).kind = ((NU8) 0);
			add_331171(result, n);
			LOC52 = 0;
			LOC52 = newrstnode_331142(((NU8) 64), (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol);
			add_331171(result, LOC52);
		}
		LA28: ;
		(*p).idx += ((NI) 3);
	}
	goto LA1;
	LA26: ;
	LA1: ;
	return result;
}

N_NIMCALL(NI, matchverbatim_334033)(Rstparser332587* 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(Rstnode331011*, parsesmiley_334079)(Rstparser332587* p) {
	Rstnode331011* 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_334131;
		NimStringDesc* val_334132;
		NI i_334137;
		key_334131 = 0;
		val_334132 = 0;
		i_334137 = ((NI) 0);
		{
			if (!(((NI) (i_334137)) <= ((NI) 33))) goto LA8;
			{
				while (1) {
					NI m;
					key_334131 = copyString(Smilies_332098[(i_334137)- 0].Field0);
					val_334132 = copyString(Smilies_332098[(i_334137)- 0].Field1);
					m = matchverbatim_334033((&(*p)), (*p).idx, key_334131);
					{
						NimStringDesc* LOC16;
						if (!(((NI) 0) < m)) goto LA14;
						(*p).idx = m;
						result = newrstnode_331108(((NU8) 63));
						LOC16 = 0;
						LOC16 = (*result).text; (*result).text = copyStringRC1(val_334132);
						if (LOC16) nimGCunrefNoCycle(LOC16);
						goto BeforeRet;
					}
					LA14: ;
					{
						if (!(((NI) 33) <= ((NI) (i_334137)))) goto LA19;
						goto LA10;
					}
					LA19: ;
					i_334137 += ((NI) 1);
				}
			} LA10: ;
		}
		LA8: ;
	}
	}BeforeRet: ;
	return result;
}

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

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

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

N_NIMCALL(void, parseurl_334281)(Rstparser332587* p, Rstnode331011* father) {
	{
		NIM_BOOL LOC3;
		Rstnode331011* n;
		LOC3 = 0;
		LOC3 = isurl_334201((&(*p)), (*p).idx);
		if (!LOC3) goto LA4;
		n = newrstnode_331108(((NU8) 37));
		{
			while (1) {
				Rstnode331011* 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_333529(p);
				add_331171(n, LOC15);
				(*p).idx += ((NI) 1);
			}
		} LA6: ;
		add_331171(father, n);
	}
	goto LA1;
	LA4: ;
	{
		Rstnode331011* n;
		n = newleaf_333529(p);
		(*p).idx += ((NI) 1);
		{
			if (!eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2637))) goto LA19;
			n = parsepostfix_333992(p, n);
		}
		LA19: ;
		add_331171(father, n);
	}
	LA1: ;
}

N_NIMCALL(void, parseinline_334752)(Rstparser332587* p, Rstnode331011* father) {
{	switch ((*p).tok->data[(*p).idx].kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			Rstnode331011* n;
			LOC4 = 0;
			LOC4 = isinlinemarkupstart_333680((&(*p)), ((NimStringDesc*) &TMP2629));
			if (!LOC4) goto LA5;
			n = newrstnode_331108(((NU8) 59));
			parseuntil_334601(p, n, ((NimStringDesc*) &TMP2629), NIM_TRUE);
			add_331171(father, n);
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC8;
			Rstnode331011* n;
			LOC8 = 0;
			LOC8 = isinlinemarkupstart_333680((&(*p)), ((NimStringDesc*) &TMP2634));
			if (!LOC8) goto LA9;
			n = newrstnode_331108(((NU8) 58));
			parseuntil_334601(p, n, ((NimStringDesc*) &TMP2634), NIM_TRUE);
			add_331171(father, n);
		}
		goto LA2;
		LA9: ;
		{
			NIM_BOOL LOC12;
			Rstnode331011* n;
			LOC12 = 0;
			LOC12 = isinlinemarkupstart_333680((&(*p)), ((NimStringDesc*) &TMP2602));
			if (!LOC12) goto LA13;
			n = newrstnode_331108(((NU8) 57));
			parseuntil_334601(p, n, ((NimStringDesc*) &TMP2602), NIM_TRUE);
			add_331171(father, n);
		}
		goto LA2;
		LA13: ;
		{
			NIM_BOOL LOC16;
			Rstnode331011* 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*) &TMP2635));
			LA17: ;
			if (!LOC16) goto LA18;
			(*p).idx += ((NI) 1);
			LOC20 = 0;
			LOC20 = parsemarkdowncodeblock_334686(p);
			add_331171(father, LOC20);
		}
		goto LA2;
		LA18: ;
		{
			NIM_BOOL LOC22;
			Rstnode331011* n;
			LOC22 = 0;
			LOC22 = isinlinemarkupstart_333680((&(*p)), ((NimStringDesc*) &TMP2631));
			if (!LOC22) goto LA23;
			n = newrstnode_331108(((NU8) 61));
			parseuntil_334601(p, n, ((NimStringDesc*) &TMP2631), NIM_FALSE);
			add_331171(father, n);
		}
		goto LA2;
		LA23: ;
		{
			NIM_BOOL LOC26;
			Rstnode331011* n;
			LOC26 = 0;
			LOC26 = isinlinemarkupstart_333680((&(*p)), ((NimStringDesc*) &TMP2636));
			if (!LOC26) goto LA27;
			n = newrstnode_331108(((NU8) 60));
			parseuntil_334601(p, n, ((NimStringDesc*) &TMP2636), NIM_TRUE);
			n = parsepostfix_333992(p, n);
			add_331171(father, n);
		}
		goto LA2;
		LA27: ;
		{
			NIM_BOOL LOC30;
			Rstnode331011* n;
			LOC30 = 0;
			LOC30 = isinlinemarkupstart_333680((&(*p)), ((NimStringDesc*) &TMP2604));
			if (!LOC30) goto LA31;
			n = newrstnode_331108(((NU8) 62));
			parseuntil_334601(p, n, ((NimStringDesc*) &TMP2604), NIM_FALSE);
			add_331171(father, n);
		}
		goto LA2;
		LA31: ;
		{
			{
				Rstnode331011* n;
				if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA36;
				n = parsesmiley_334079(p);
				{
					if (!!((n == NIM_NIL))) goto LA40;
					add_331171(father, n);
					goto BeforeRet;
				}
				LA40: ;
			}
			LA36: ;
			parsebackslash_334330(p, father);
		}
		LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			Rstnode331011* n;
			if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA45;
			n = parsesmiley_334079(p);
			{
				if (!!((n == NIM_NIL))) goto LA49;
				add_331171(father, n);
				goto BeforeRet;
			}
			LA49: ;
		}
		LA45: ;
		parseurl_334281(p, father);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 6):
	case ((NU8) 2):
	{
		Rstnode331011* LOC60;
		{
			Rstnode331011* n;
			if (!(((*(*p).s).options &(1<<((((NU8) 1))&7)))!=0)) goto LA54;
			n = parsesmiley_334079(p);
			{
				if (!!((n == NIM_NIL))) goto LA58;
				add_331171(father, n);
				goto BeforeRet;
			}
			LA58: ;
		}
		LA54: ;
		LOC60 = 0;
		LOC60 = newleaf_333529(p);
		add_331171(father, LOC60);
		(*p).idx += ((NI) 1);
	}
	break;
	default:
	{
	}
	break;
	}
	}BeforeRet: ;
}

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

N_NIMCALL(Rstnode331011*, parsefield_335225)(Rstparser332587* p) {
	Rstnode331011* result;
	NI col;
	Rstnode331011* fieldname;
	Rstnode331011* fieldbody;
	result = 0;
	result = newrstnode_331108(((NU8) 14));
	col = (*p).tok->data[(*p).idx].col;
	fieldname = newrstnode_331108(((NU8) 15));
	parseuntil_334601(p, fieldname, ((NimStringDesc*) &TMP2707), NIM_FALSE);
	fieldbody = newrstnode_331108(((NU8) 16));
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 1)))) goto LA3;
		parseline_335181(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_333011(p, indent);
			parsesection_335217(p, fieldbody);
			popind_333032(p);
		}
		LA11: ;
	}
	LA7: ;
	add_331171(result, fieldname);
	add_331171(result, fieldbody);
	return result;
}

N_NIMCALL(Rstnode331011*, parsefields_335258)(Rstparser332587* p) {
	Rstnode331011* 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*) &TMP2707));
	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*) &TMP2707));
		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_331108(((NU8) 13));
		{
			if (!!(atstart)) goto LA18;
			(*p).idx += ((NI) 1);
		}
		LA18: ;
		{
			while (1) {
				Rstnode331011* LOC22;
				LOC22 = 0;
				LOC22 = parsefield_335225(p);
				add_331171(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*) &TMP2707));
					LA28: ;
					if (!LOC25) goto LA29;
					(*p).idx += ((NI) 1);
				}
				goto LA23;
				LA29: ;
				{
					goto LA20;
				}
				LA23: ;
			}
		} LA20: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(Rstnode331011*, parsedirective_338229)(Rstparser332587* p, NU8 flags) {
	Rstnode331011* result;
	Rstnode331011* args;
	Rstnode331011* options;
	result = 0;
	result = newrstnode_331108(((NU8) 40));
	args = NIM_NIL;
	options = NIM_NIL;
	{
		if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA3;
		args = newrstnode_331108(((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):
					{
						Rstnode331011* LOC12;
						LOC12 = 0;
						LOC12 = newleaf_333529(p);
						add_331171(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: ;
			}
			{
				Rstnode331011* LOC23;
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 3))) goto LA21;
				LOC23 = 0;
				LOC23 = newleaf_333529(p);
				add_331171(args, LOC23);
				(*p).idx += ((NI) 1);
			}
			goto LA19;
			LA21: ;
			{
				args = NIM_NIL;
			}
			LA19: ;
		}
		goto LA5;
		LA15: ;
		{
			parseline_335181(p, args);
		}
		LA5: ;
	}
	LA3: ;
	add_331171(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*) &TMP2707));
			LA35: ;
			if (!LOC32) goto LA36;
			options = parsefields_335258(p);
		}
		LA36: ;
	}
	LA28: ;
	add_331171(result, options);
	return result;
}

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

N_NIMCALL(Rstnode331011*, parsedirective_338372)(Rstparser332587* p, NU8 flags, Sectionparser338212 contentparser) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338229(p, flags);
	{
		NIM_BOOL LOC3;
		Rstnode331011* content;
		LOC3 = 0;
		LOC3 = !(contentparser == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = indfollows_338353((&(*p)));
		LA4: ;
		if (!LOC3) goto LA5;
		pushind_333011(p, (*p).tok->data[(*p).idx].ival);
		content = contentparser(p);
		popind_333032(p);
		add_331171(result, content);
	}
	goto LA1;
	LA5: ;
	{
		add_331171(result, NIM_NIL);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode331011*, dirinclude_338405)(Rstparser332587* p) {
	Rstnode331011* result;
	Rstnode331011* n;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	NimStringDesc* path;
	result = 0;
	result = NIM_NIL;
	n = parsedirective_338372(p, 7, NIM_NIL);
	LOC1 = 0;
	LOC1 = addnodes_332073((*n).sons->data[((NI) 0)]);
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2315);
	path = (*(*p).s).findfile(filename);
	{
		if (!((path) && (path)->Sup.len == 0)) goto LA4;
		rstmessage_332943((&(*p)), ((NU8) 0), filename);
	}
	goto LA2;
	LA4: ;
	{
		{
			NimStringDesc* LOC9;
			NimStringDesc* LOC12;
			Rstnode331011* LOC13;
			LOC9 = 0;
			LOC9 = getfieldvalue_332079(n, ((NimStringDesc*) &TMP2642));
			if (!!(((LOC9) && (LOC9)->Sup.len == 0))) goto LA10;
			result = newrstnode_331108(((NU8) 24));
			LOC12 = 0;
			LOC12 = readfile_16872(path);
			LOC13 = 0;
			LOC13 = newrstnode_331142(((NU8) 64), LOC12);
			add_331171(result, LOC13);
		}
		goto LA7;
		LA10: ;
		{
			Rstparser332587 q;
			NimStringDesc* LOC15;
			NI LOC16;
			memset((void*)(&q), 0, sizeof(q));
			q.Sup.m_type = (&NTI332587);
			initparser_333068((&q), (*p).s);
			q.filename = copyString(filename);
			LOC15 = 0;
			LOC15 = readfile_16872(path);
			LOC16 = 0;
			LOC16 = gettokens_332429(LOC15, NIM_FALSE, (&q.tok));
			q.col += LOC16;
			result = parsedoc_337069((&q));
		}
		LA7: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(Rstnode331011*, dirimage_339007)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338372(p, 7, NIM_NIL);
	(*result).kind = ((NU8) 45);
	return result;
}

N_NIMCALL(Rstnode331011*, dirfigure_339019)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338372(p, 7, parsesectionwrapper_338109);
	(*result).kind = ((NU8) 46);
	return result;
}

N_NIMCALL(Rstnode331011*, dirtitle_339031)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338372(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 43);
	return result;
}

N_NIMCALL(Rstnode331011*, dircontainer_338608)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338372(p, 1, parsesectionwrapper_338109);
	(*result).kind = ((NU8) 50);
	return result;
}

N_NIMCALL(Rstnode331011*, dircontents_339043)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338372(p, 1, NIM_NIL);
	(*result).kind = ((NU8) 44);
	return result;
}

N_NIMCALL(Rstnode331011*, parsedirbody_338393)(Rstparser332587* p, Sectionparser338212 contentparser) {
	Rstnode331011* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = indfollows_338353((&(*p)));
		if (!LOC3) goto LA4;
		pushind_333011(p, (*p).tok->data[(*p).idx].ival);
		result = contentparser(p);
		popind_333032(p);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, dirrawaux_339068)(Rstparser332587* p, Rstnode331011** result, NU8 kind, Sectionparser338212 contentparser) {
	NimStringDesc* filename;
	filename = getfieldvalue_332079((*result), ((NimStringDesc*) &TMP2714));
	{
		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_332943((&(*p)), ((NU8) 0), filename);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* f;
			Rstnode331011* LOC10;
			f = readfile_16872(path);
			unsureAsgnRef((void**) (&(*result)), newrstnode_331108(kind));
			LOC10 = 0;
			LOC10 = newrstnode_331142(((NU8) 64), f);
			add_331171((*result), LOC10);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		Rstnode331011* LOC12;
		(*(*result)).kind = kind;
		LOC12 = 0;
		LOC12 = parsedirbody_338393(p, contentparser);
		add_331171((*result), LOC12);
	}
	LA1: ;
}

N_NIMCALL(Rstnode331011*, dirraw_339085)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338229(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*) &TMP2715));
			if (!(LOC7 == ((NI) 0))) goto LA8;
			dirrawaux_339068(p, &result, ((NU8) 48), parseliteralblock_336099);
		}
		goto LA5;
		LA8: ;
		{
			NI LOC11;
			LOC11 = 0;
			LOC11 = nsuCmpIgnoreCase((*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text, ((NimStringDesc*) &TMP2716));
			if (!(LOC11 == ((NI) 0))) goto LA12;
			dirrawaux_339068(p, &result, ((NU8) 49), parseliteralblock_336099);
		}
		goto LA5;
		LA12: ;
		{
			rstmessage_332943((&(*p)), ((NU8) 5), (*(*(*result).sons->data[((NI) 0)]).sons->data[((NI) 0)]).text);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		dirrawaux_339068(p, &result, ((NU8) 42), parsesectionwrapper_338109);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode331011*, dircodeblock_338434)(Rstparser332587* p, NIM_BOOL nimrodextension) {
	Rstnode331011* result;
	NimStringDesc* filename;
	NimStringDesc* LOC1;
	result = 0;
	result = parsedirective_338372(p, 3, parseliteralblock_336099);
	LOC1 = 0;
	LOC1 = getfieldvalue_332079(result, ((NimStringDesc*) &TMP2714));
	filename = nsuStrip(LOC1, NIM_TRUE, NIM_TRUE, TMP2315);
	{
		NimStringDesc* path;
		Rstnode331011* n;
		NimStringDesc* LOC10;
		Rstnode331011* LOC11;
		if (!!(((filename) && (filename)->Sup.len == 0))) goto LA4;
		path = (*(*p).s).findfile(filename);
		{
			if (!((path) && (path)->Sup.len == 0)) goto LA8;
			rstmessage_332943((&(*p)), ((NU8) 0), filename);
		}
		LA8: ;
		n = newrstnode_331108(((NU8) 24));
		LOC10 = 0;
		LOC10 = readfile_16872(path);
		LOC11 = 0;
		LOC11 = newrstnode_331142(((NU8) 64), LOC10);
		add_331171(n, LOC11);
		asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 2)]), n);
	}
	LA4: ;
	{
		Rstnode331011* extranode;
		Rstnode331011* LOC20;
		Rstnode331011* LOC21;
		Rstnode331011* LOC22;
		Rstnode331011* LOC23;
		if (!nimrodextension) goto LA14;
		{
			if (!(*result).sons->data[((NI) 1)] == 0) goto LA18;
			asgnRefNoCycle((void**) (&(*result).sons->data[((NI) 1)]), newrstnode_331108(((NU8) 13)));
		}
		LA18: ;
		extranode = newrstnode_331108(((NU8) 14));
		LOC20 = 0;
		LOC20 = newrstnode_331108(((NU8) 15));
		add_331171(extranode, LOC20);
		LOC21 = 0;
		LOC21 = newrstnode_331108(((NU8) 16));
		add_331171(extranode, LOC21);
		LOC22 = 0;
		LOC22 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2717));
		add_331171((*extranode).sons->data[((NI) 0)], LOC22);
		LOC23 = 0;
		LOC23 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2718));
		add_331171((*extranode).sons->data[((NI) 1)], LOC23);
		add_331171((*result).sons->data[((NI) 1)], extranode);
	}
	LA14: ;
	(*result).kind = ((NU8) 47);
	return result;
}

N_NIMCALL(Rstnode331011*, dirindex_339055)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsedirective_338372(p, 0, parsesectionwrapper_338109);
	(*result).kind = ((NU8) 51);
	return result;
}

N_NIMCALL(Rstnode331011*, getreferencename_333540)(Rstparser332587* p, NimStringDesc* endstr) {
	Rstnode331011* result;
	Rstnode331011* res;
	result = 0;
	res = newrstnode_331108(((NU8) 0));
	{
		while (1) {
			switch ((*p).tok->data[(*p).idx].kind) {
			case ((NU8) 3):
			case ((NU8) 6):
			case ((NU8) 2):
			{
				Rstnode331011* LOC4;
				LOC4 = 0;
				LOC4 = newleaf_333529(p);
				add_331171(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: ;
				{
					Rstnode331011* LOC11;
					LOC11 = 0;
					LOC11 = newleaf_333529(p);
					add_331171(res, LOC11);
				}
				LA6: ;
			}
			break;
			default:
			{
				rstmessage_332943((&(*p)), ((NU8) 1), endstr);
				goto LA1;
			}
			break;
			}
			(*p).idx += ((NI) 1);
		}
	} LA1: ;
	result = res;
	return result;
}

N_NIMCALL(Rstnode331011*, untileol_333578)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = newrstnode_331108(((NU8) 0));
	{
		while (1) {
			Rstnode331011* LOC3;
			if (!!(((3 &(1<<(((*p).tok->data[(*p).idx].kind)&7)))!=0))) goto LA2;
			LOC3 = 0;
			LOC3 = newleaf_333529(p);
			add_331171(result, LOC3);
			(*p).idx += ((NI) 1);
		} LA2: ;
	}
	return result;
}

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

N_NIMCALL(void, setsub_333365)(Rstparser332587* p, NimStringDesc* key, Rstnode331011* value) {
	NI length;
	NimStringDesc* LOC8;
{	length = ((*(*p).s).subs ? (*(*p).s).subs->Sup.len : 0);
	{
		NI i_333392;
		NI HEX3Atmp_333404;
		NI res_333407;
		i_333392 = 0;
		HEX3Atmp_333404 = 0;
		HEX3Atmp_333404 = (NI)(length - ((NI) 1));
		res_333407 = ((NI) 0);
		{
			while (1) {
				if (!(res_333407 <= HEX3Atmp_333404)) goto LA3;
				i_333392 = res_333407;
				{
					if (!eqStrings(key, (*(*p).s).subs->data[i_333392].key)) goto LA6;
					asgnRefNoCycle((void**) (&(*(*p).s).subs->data[i_333392].value), value);
					goto BeforeRet;
				}
				LA6: ;
				res_333407 += ((NI) 1);
			} LA3: ;
		}
	}
	(*(*p).s).subs = (TY332597*) setLengthSeq(&((*(*p).s).subs)->Sup, sizeof(Substitution332581), ((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(Rstnode331011*, parsecomment_334986)(Rstparser332587* p) {
	Rstnode331011* 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(Rstnode331011*, parsedotdot_336092)(Rstparser332587* p) {
	Rstnode331011* result;
	NI col;
	NimStringDesc* d;
	result = 0;
	result = NIM_NIL;
	col = (*p).tok->data[(*p).idx].col;
	(*p).idx += ((NI) 1);
	d = getdirective_334866(p);
	{
		NU8 LOC5;
		if (!!(((d) && (d)->Sup.len == 0))) goto LA3;
		pushind_333011(p, col);
		LOC5 = 0;
		LOC5 = getdirkind_335098(d);
		switch (LOC5) {
		case ((NU8) 9):
		{
			result = dirinclude_338405(p);
		}
		break;
		case ((NU8) 8):
		{
			result = dirimage_339007(p);
		}
		break;
		case ((NU8) 7):
		{
			result = dirfigure_339019(p);
		}
		break;
		case ((NU8) 12):
		{
			result = dirtitle_339031(p);
		}
		break;
		case ((NU8) 5):
		{
			result = dircontainer_338608(p);
		}
		break;
		case ((NU8) 6):
		{
			result = dircontents_339043(p);
		}
		break;
		case ((NU8) 11):
		{
			{
				if (!(((*(*p).s).options &(1<<((((NU8) 2))&7)))!=0)) goto LA15;
				result = dirraw_339085(p);
			}
			goto LA13;
			LA15: ;
			{
				rstmessage_332943((&(*p)), ((NU8) 5), d);
			}
			LA13: ;
		}
		break;
		case ((NU8) 3):
		{
			result = dircodeblock_338434(p, NIM_FALSE);
		}
		break;
		case ((NU8) 4):
		{
			result = dircodeblock_338434(p, NIM_TRUE);
		}
		break;
		case ((NU8) 10):
		{
			result = dirindex_339055(p);
		}
		break;
		default:
		{
			rstmessage_332943((&(*p)), ((NU8) 5), d);
		}
		break;
		}
		popind_333032(p);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC23;
		Rstnode331011* a;
		Rstnode331011* b;
		NimStringDesc* LOC30;
		LOC23 = 0;
		LOC23 = match_333727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2719));
		if (!LOC23) goto LA24;
		(*p).idx += ((NI) 2);
		a = getreferencename_333540(p, ((NimStringDesc*) &TMP2707));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA28;
			(*p).idx += ((NI) 1);
		}
		LA28: ;
		b = untileol_333578(p);
		LOC30 = 0;
		LOC30 = rstnodetorefname_332067(a);
		setref_333426(p, LOC30, b);
	}
	goto LA1;
	LA24: ;
	{
		NIM_BOOL LOC32;
		Rstnode331011* a;
		Rstnode331011* b;
		NimStringDesc* LOC49;
		LOC32 = 0;
		LOC32 = match_333727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2720));
		if (!LOC32) goto LA33;
		(*p).idx += ((NI) 2);
		a = getreferencename_333540(p, ((NimStringDesc*) &TMP2604));
		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*) &TMP2721));
			if (!(LOC41 == ((NI) 0))) goto LA42;
			(*p).idx += ((NI) 1);
			expect_333616(p, ((NimStringDesc*) &TMP2600));
			b = untileol_333578(p);
		}
		goto LA39;
		LA42: ;
		{
			NI LOC45;
			LOC45 = 0;
			LOC45 = nsuCmpIgnoreStyle((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2622));
			if (!(LOC45 == ((NI) 0))) goto LA46;
			(*p).idx += ((NI) 1);
			b = dirimage_339007(p);
		}
		goto LA39;
		LA46: ;
		{
			rstmessage_332943((&(*p)), ((NU8) 5), (*p).tok->data[(*p).idx].symbol);
		}
		LA39: ;
		LOC49 = 0;
		LOC49 = addnodes_332073(a);
		setsub_333365(p, LOC49, b);
	}
	goto LA1;
	LA33: ;
	{
		NIM_BOOL LOC51;
		Rstnode331011* a;
		Rstnode331011* b;
		NimStringDesc* LOC58;
		LOC51 = 0;
		LOC51 = match_333727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2722));
		if (!LOC51) goto LA52;
		(*p).idx += ((NI) 2);
		a = getreferencename_333540(p, ((NimStringDesc*) &TMP2723));
		{
			if (!((*p).tok->data[(*p).idx].kind == ((NU8) 2))) goto LA56;
			(*p).idx += ((NI) 1);
		}
		LA56: ;
		b = untileol_333578(p);
		LOC58 = 0;
		LOC58 = rstnodetorefname_332067(a);
		setref_333426(p, LOC58, b);
	}
	goto LA1;
	LA52: ;
	{
		result = parsecomment_334986(p);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Rstnode331011*, parseenumlist_337822)(Rstparser332587* p) {
	Rstnode331011* 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_333727((&(*p)), (*p).idx, wildcards_337827[(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_331108(((NU8) 7));
		(*p).idx += (NI)(wildpos_337832[(w)- 0] + ((NI) 3));
		j = tokenafternewline_336205((&(*p)));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = ((*p).tok->data[j].col == (*p).tok->data[(*p).idx].col);
			if (LOC14) goto LA15;
			LOC14 = match_333727((&(*p)), j, wildcards_337827[(w)- 0]);
			LA15: ;
			if (!LOC14) goto LA16;
			pushind_333011(p, (*p).tok->data[(*p).idx].col);
			{
				while (1) {
					Rstnode331011* item;
					item = newrstnode_331108(((NU8) 8));
					parsesection_335217(p, item);
					add_331171(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_333727((&(*p)), (NI)((*p).idx + ((NI) 1)), wildcards_337827[(w)- 0]);
						LA25: ;
						if (!LOC22) goto LA26;
						(*p).idx += (NI)(wildpos_337832[(w)- 0] + ((NI) 4));
					}
					goto LA20;
					LA26: ;
					{
						goto LA18;
					}
					LA20: ;
				}
			} LA18: ;
			popind_333032(p);
		}
		goto LA12;
		LA16: ;
		{
			(*p).idx -= (NI)(wildpos_337832[(w)- 0] + ((NI) 3));
			result = NIM_NIL;
		}
		LA12: ;
	}
	LA10: ;
	return result;
}

N_NIMCALL(Rstnode331011*, parsedefinitionlist_337734)(Rstparser332587* p) {
	Rstnode331011* result;
	NI j;
	NI LOC1;
	result = 0;
	result = NIM_NIL;
	LOC1 = 0;
	LOC1 = tokenafternewline_336205((&(*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_333001((&(*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*) &TMP2600)));
		LA10: ;
		if (!LOC4) goto LA11;
		col = (*p).tok->data[(*p).idx].col;
		result = newrstnode_331108(((NU8) 9));
		{
			while (1) {
				Rstnode331011* a;
				j = (*p).idx;
				a = newrstnode_331108(((NU8) 11));
				parseline_335181(p, a);
				{
					NIM_BOOL LOC17;
					NIM_BOOL LOC18;
					NIM_BOOL LOC19;
					NI LOC21;
					Rstnode331011* b;
					Rstnode331011* c;
					LOC17 = 0;
					LOC18 = 0;
					LOC19 = 0;
					LOC19 = ((*p).tok->data[(*p).idx].kind == ((NU8) 1));
					if (!(LOC19)) goto LA20;
					LOC21 = 0;
					LOC21 = currind_333001((&(*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*) &TMP2600)));
					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_333011(p, (*p).tok->data[(*p).idx].ival);
					b = newrstnode_331108(((NU8) 12));
					parsesection_335217(p, b);
					c = newrstnode_331108(((NU8) 10));
					add_331171(c, a);
					add_331171(c, b);
					add_331171(result, c);
					popind_333032(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_336205((&(*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*) &TMP2600)));
						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_331090(result);
			if (!(LOC49 == ((NI) 0))) goto LA50;
			result = NIM_NIL;
		}
		LA50: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(Rstnode331011*, parsetransition_337425)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = newrstnode_331108(((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_335199)(Rstparser332587* p, Rstnode331011* 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_334752(p, father);
			}
			break;
			case ((NU8) 0):
			case ((NU8) 1):
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

N_NIMCALL(NI, getlevel_336182)(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(Rstnode331011*, parseheadline_336449)(Rstparser332587* p) {
	Rstnode331011* result;
	NIM_CHAR c;
	result = 0;
	result = newrstnode_331108(((NU8) 1));
	parseuntilnewline_335199(p, result);
	c = (*p).tok->data[(NI)((*p).idx + ((NI) 1))].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	(*result).level = getlevel_336182((*(*p).s).underlinetolevel, (&(*(*p).s).ulevel), c);
	return result;
}

N_NIMCALL(Rstnode331011*, parseoverline_337481)(Rstparser332587* p) {
	Rstnode331011* result;
	NIM_CHAR c;
	result = 0;
	c = (*p).tok->data[(*p).idx].symbol->data[((NI) 0)];
	(*p).idx += ((NI) 2);
	result = newrstnode_331108(((NU8) 2));
	{
		while (1) {
			parseuntilnewline_335199(p, result);
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA5;
				(*p).idx += ((NI) 1);
				{
					NI LOC9;
					Rstnode331011* LOC12;
					LOC9 = 0;
					LOC9 = currind_333001((&(*p)));
					if (!(LOC9 < (*p).tok->data[(NI)((*p).idx - ((NI) 1))].ival)) goto LA10;
					LOC12 = 0;
					LOC12 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2633));
					add_331171(result, LOC12);
				}
				goto LA7;
				LA10: ;
				{
					goto LA1;
				}
				LA7: ;
			}
			goto LA3;
			LA5: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	(*result).level = getlevel_336182((*(*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_336828)(Rstparser332587* 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_336838)(Rstparser332587* p, TY332608** cols) {
	NI L;
	L = ((NI) 0);
	{
		while (1) {
			L += ((NI) 1);
			(*cols) = (TY332608*) setLengthSeq(&((*cols))->Sup, sizeof(NI), ((NI) (L)));
			(*cols)->data[(NI)(L - ((NI) 1))] = tokend_336828((&(*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(Rstnode331011*, parsesimpletable_337076)(Rstparser332587* p) {
	Rstnode331011* result;
	TY332608* cols;
	TY130408* row;
	NI i;
	NI last;
	NI line;
	NIM_CHAR c;
	Rstparser332587 q;
	Rstnode331011* a;
	Rstnode331011* 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 = (&NTI332587);
	a = 0;
	b = 0;
	result = newrstnode_331108(((NU8) 29));
	cols = (TY332608*) newSeq((&NTI332608), 0);
	row = (TY130408*) newSeq((&NTI130408), 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_336205((&(*p)));
				{
					if (!((3 &(1<<(((*p).tok->data[last].kind)&7)))!=0)) goto LA9;
					(*p).idx = last;
					goto LA1;
				}
				LA9: ;
				getcolumns_336838(p, (&cols));
				row = (TY130408*) setLengthSeq(&(row)->Sup, sizeof(NimStringDesc*), ((NI) ((cols ? cols->Sup.len : 0))));
				{
					if (!!((a == NIM_NIL))) goto LA13;
					{
						NI j_337184;
						NI HEX3Atmp_337332;
						NI LOC16;
						NI res_337335;
						j_337184 = 0;
						HEX3Atmp_337332 = 0;
						LOC16 = 0;
						LOC16 = len_331090(a);
						HEX3Atmp_337332 = (NI)(LOC16 - ((NI) 1));
						res_337335 = ((NI) 0);
						{
							while (1) {
								if (!(res_337335 <= HEX3Atmp_337332)) goto LA18;
								j_337184 = res_337335;
								(*(*a).sons->data[j_337184]).kind = ((NU8) 32);
								res_337335 += ((NI) 1);
							} LA18: ;
						}
					}
				}
				LA13: ;
			}
			LA5: ;
			{
				if (!((*p).tok->data[(*p).idx].kind == ((NU8) 0))) goto LA21;
				goto LA1;
			}
			LA21: ;
			{
				NI j_337206;
				NI HEX3Atmp_337340;
				NI res_337343;
				j_337206 = 0;
				HEX3Atmp_337340 = 0;
				HEX3Atmp_337340 = (row ? (row->Sup.len-1) : -1);
				res_337343 = ((NI) 0);
				{
					while (1) {
						NimStringDesc* LOC26;
						if (!(res_337343 <= HEX3Atmp_337340)) goto LA25;
						j_337206 = res_337343;
						LOC26 = 0;
						LOC26 = row->data[j_337206]; row->data[j_337206] = copyStringRC1(((NimStringDesc*) &TMP2204));
						if (LOC26) nimGCunrefNoCycle(LOC26);
						res_337343 += ((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_336828((&(*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_336828((&(*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_337295;
						NI HEX3Atmp_337350;
						NI res_337353;
						j_337295 = 0;
						HEX3Atmp_337350 = 0;
						HEX3Atmp_337350 = (row ? (row->Sup.len-1) : -1);
						res_337353 = ((NI) 1);
						{
							while (1) {
								if (!(res_337353 <= HEX3Atmp_337350)) goto LA56;
								j_337295 = res_337353;
								row->data[j_337295] = addChar(row->data[j_337295], 10);
								res_337353 += ((NI) 1);
							} LA56: ;
						}
					}
				}
			} LA27: ;
			a = newrstnode_331108(((NU8) 31));
			{
				NI j_337308;
				NI HEX3Atmp_337358;
				NI res_337361;
				j_337308 = 0;
				HEX3Atmp_337358 = 0;
				HEX3Atmp_337358 = (row ? (row->Sup.len-1) : -1);
				res_337361 = ((NI) 0);
				{
					while (1) {
						NI LOC60;
						Rstnode331011* LOC61;
						if (!(res_337361 <= HEX3Atmp_337358)) goto LA59;
						j_337308 = res_337361;
						initparser_333068((&q), (*p).s);
						q.col = cols->data[j_337308];
						q.line = (NI)(line - ((NI) 1));
						q.filename = copyString((*p).filename);
						LOC60 = 0;
						LOC60 = gettokens_332429(row->data[j_337308], NIM_FALSE, (&q.tok));
						q.col += LOC60;
						b = newrstnode_331108(((NU8) 33));
						LOC61 = 0;
						LOC61 = parsedoc_337069((&q));
						add_331171(b, LOC61);
						add_331171(a, b);
						res_337361 += ((NI) 1);
					} LA59: ;
				}
			}
			add_331171(result, a);
		}
	} LA1: ;
	return result;
}

N_NIMCALL(Rstnode331011*, parseoptionlist_337631)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = newrstnode_331108(((NU8) 17));
	{
		while (1) {
			{
				NIM_BOOL LOC5;
				Rstnode331011* a;
				Rstnode331011* b;
				Rstnode331011* c;
				NI j;
				LOC5 = 0;
				LOC5 = isoptionlist_336292((&(*p)));
				if (!LOC5) goto LA6;
				a = newrstnode_331108(((NU8) 19));
				b = newrstnode_331108(((NU8) 23));
				c = newrstnode_331108(((NU8) 18));
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = match_333727((&(*p)), (*p).idx, ((NimStringDesc*) &TMP2612));
					if (!LOC10) goto LA11;
					(*p).idx += ((NI) 1);
				}
				LA11: ;
				{
					while (1) {
						Rstnode331011* 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_333529(p);
						add_331171(a, LOC21);
						(*p).idx += ((NI) 1);
					} LA14: ;
				} LA13: ;
				j = tokenafternewline_336205((&(*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_333001((&(*p)));
					LOC24 = (LOC28 < (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					LA27: ;
					if (!LOC24) goto LA29;
					pushind_333011(p, (*p).tok->data[(NI)(j - ((NI) 1))].ival);
					parsesection_335217(p, b);
					popind_333032(p);
				}
				goto LA22;
				LA29: ;
				{
					parseline_335181(p, b);
				}
				LA22: ;
				{
					if (!((*p).tok->data[(*p).idx].kind == ((NU8) 1))) goto LA34;
					(*p).idx += ((NI) 1);
				}
				LA34: ;
				add_331171(c, a);
				add_331171(c, b);
				add_331171(result, c);
			}
			goto LA3;
			LA6: ;
			{
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(void, parseparagraph_336386)(Rstparser332587* p, Rstnode331011* 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_333001((&(*p)));
					if (!((*p).tok->data[(*p).idx].ival == LOC9)) goto LA10;
					(*p).idx += ((NI) 1);
					LOC12 = 0;
					LOC12 = whichsection_336302((&(*p)));
					switch (LOC12) {
					case ((NU8) 4):
					case ((NU8) 64):
					case ((NU8) 1):
					case ((NU8) 2):
					case ((NU8) 40):
					{
						Rstnode331011* LOC14;
						LOC14 = 0;
						LOC14 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2633));
						add_331171(result, LOC14);
					}
					break;
					case ((NU8) 26):
					{
						Rstnode331011* LOC16;
						LOC16 = 0;
						LOC16 = parselineblock_336321(p);
						addifnotnil_331191(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;
					Rstnode331011* LOC29;
					Rstnode331011* LOC30;
					LOC22 = 0;
					LOC23 = 0;
					LOC23 = eqStrings((*p).tok->data[(*p).idx].symbol, ((NimStringDesc*) &TMP2600));
					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_333001((&(*p)));
					LOC22 = (LOC26 < (*p).tok->data[(NI)((*p).idx + ((NI) 1))].ival);
					LA25: ;
					if (!LOC22) goto LA27;
					LOC29 = 0;
					LOC29 = newrstnode_331142(((NU8) 64), ((NimStringDesc*) &TMP2707));
					add_331171(result, LOC29);
					(*p).idx += ((NI) 1);
					LOC30 = 0;
					LOC30 = parseliteralblock_336099(p);
					add_331171(result, LOC30);
					goto LA1;
				}
				goto LA20;
				LA27: ;
				{
					parseinline_334752(p, result);
				}
				LA20: ;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			case ((NU8) 4):
			case ((NU8) 6):
			{
				parseinline_334752(p, result);
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
}

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

N_NIMCALL(void, parsesection_335217)(Rstparser332587* p, Rstnode331011* result) {
	{
		while (1) {
			NIM_BOOL leave;
			Rstnode331011* 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_333001((&(*p)));
						if (!(LOC7 == (*p).tok->data[(*p).idx].ival)) goto LA8;
						(*p).idx += ((NI) 1);
					}
					goto LA5;
					LA8: ;
					{
						NI LOC11;
						Rstnode331011* a;
						LOC11 = 0;
						LOC11 = currind_333001((&(*p)));
						if (!(LOC11 < (*p).tok->data[(*p).idx].ival)) goto LA12;
						pushind_333011(p, (*p).tok->data[(*p).idx].ival);
						a = newrstnode_331108(((NU8) 28));
						parsesection_335217(p, a);
						add_331171(result, a);
						popind_333032(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_336302((&(*p)));
			switch (k) {
			case ((NU8) 24):
			{
				(*p).idx += ((NI) 1);
				a = parseliteralblock_336099(p);
			}
			break;
			case ((NU8) 5):
			{
				a = parsebulletlist_337565(p);
			}
			break;
			case ((NU8) 26):
			{
				a = parselineblock_336321(p);
			}
			break;
			case ((NU8) 40):
			{
				a = parsedotdot_336092(p);
			}
			break;
			case ((NU8) 7):
			{
				a = parseenumlist_337822(p);
			}
			break;
			case ((NU8) 64):
			{
				rstmessage_332967((&(*p)), ((NU8) 3));
			}
			break;
			case ((NU8) 4):
			{
			}
			break;
			case ((NU8) 9):
			{
				a = parsedefinitionlist_337734(p);
			}
			break;
			case ((NU8) 13):
			{
				{
					if (!(((NI) 0) < (*p).idx)) goto LA32;
					(*p).idx -= ((NI) 1);
				}
				LA32: ;
				a = parsefields_335258(p);
			}
			break;
			case ((NU8) 3):
			{
				a = parsetransition_337425(p);
			}
			break;
			case ((NU8) 1):
			{
				a = parseheadline_336449(p);
			}
			break;
			case ((NU8) 2):
			{
				a = parseoverline_337481(p);
			}
			break;
			case ((NU8) 29):
			{
				a = parsesimpletable_337076(p);
			}
			break;
			case ((NU8) 17):
			{
				a = parseoptionlist_337631(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_331108(((NU8) 4));
				parseparagraph_336386(p, a);
			}
			LA44: ;
			addifnotnil_331191(result, a);
		}
	} LA1: ;
	{
		NIM_BOOL LOC48;
		NU8 LOC49;
		NU8 LOC51;
		LOC48 = 0;
		LOC49 = 0;
		LOC49 = sonkind_337906(result, ((NI) 0));
		LOC48 = (LOC49 == ((NU8) 4));
		if (!(LOC48)) goto LA50;
		LOC51 = 0;
		LOC51 = sonkind_337906(result, ((NI) 1));
		LOC48 = !((LOC51 == ((NU8) 4)));
		LA50: ;
		if (!LOC48) goto LA52;
		(*(*result).sons->data[((NI) 0)]).kind = ((NU8) 0);
	}
	LA52: ;
}

N_NIMCALL(Rstnode331011*, parsesectionwrapper_338109)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = newrstnode_331108(((NU8) 0));
	parsesection_335217(p, result);
	{
		while (1) {
			NIM_BOOL LOC3;
			NI LOC5;
			LOC3 = 0;
			LOC3 = ((*result).kind == ((NU8) 0));
			if (!(LOC3)) goto LA4;
			LOC5 = 0;
			LOC5 = len_331090(result);
			LOC3 = (LOC5 == ((NI) 1));
			LA4: ;
			if (!LOC3) goto LA2;
			result = (*result).sons->data[((NI) 0)];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(Rstnode331011*, parsedoc_337069)(Rstparser332587* p) {
	Rstnode331011* result;
	result = 0;
	result = parsesectionwrapper_338109(p);
	{
		if (!!(((*p).tok->data[(*p).idx].kind == ((NU8) 0)))) goto LA3;
		rstmessage_332967((&(*p)), ((NU8) 4));
	}
	LA3: ;
	return result;
}

N_NIMCALL(Rstnode331011*, rstparse_339320)(NimStringDesc* text, NimStringDesc* filename, NI line, NI column, NIM_BOOL* hastoc, NU8 options, Findfilehandler332023 findfile, Msghandler332021 msghandler) {
	Rstnode331011* result;
	Rstparser332587 p;
	Sharedstate332583* LOC1;
	NI LOC2;
	Rstnode331011* LOC3;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI332587);
	LOC1 = 0;
	LOC1 = newsharedstate_332877(options, findfile, msghandler);
	initparser_333068((&p), LOC1);
	p.filename = copyString(filename);
	p.line = line;
	LOC2 = 0;
	LOC2 = gettokens_332429(text, ((options &(1<<((((NU8) 0))&7)))!=0), (&p.tok));
	p.col = (NI)(column + LOC2);
	LOC3 = 0;
	LOC3 = parsedoc_337069((&p));
	result = resolvesubs_339250((&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* TMP2550[8];
static TNimNode* TMP2551[5];
static TNimNode* TMP2552[7];
NI TMP2554;
static char* NIM_CONST TMP2553[7] = {
"tkEof", 
"tkIndent", 
"tkWhite", 
"tkWord", 
"tkAdornment", 
"tkPunct", 
"tkOther"};
static TNimNode* TMP2556[9];
static TNimNode* TMP2557[4];
NI TMP2559;
static char* NIM_CONST TMP2558[4] = {
"roSkipPounds", 
"roSupportSmilies", 
"roSupportRawDirective", 
"roSupportMarkdown"};
static TNimNode* TMP2560[2];
static TNimNode* TMP2572[10];
NI TMP2574;
static char* NIM_CONST TMP2573[10] = {
"meCannotOpenFile", 
"meExpected", 
"meGridTableNotImplemented", 
"meNewSectionExpected", 
"meGeneralParseError", 
"meInvalidDirective", 
"mwRedefinitionOfLabel", 
"mwUnknownSubstitution", 
"mwUnsupportedLanguage", 
"mwUnsupportedField"};
static TNimNode* TMP2586[3];
NI TMP2588;
static char* NIM_CONST TMP2587[3] = {
"Hint", 
"Warning", 
"Error"};
static TNimNode* TMP2591[6];
static TNimNode TMP967[65];
NTI332587.size = sizeof(Rstparser332587);
NTI332587.kind = 17;
NTI332587.base = (&NTI4011);
TMP2550[0] = &TMP967[1];
TMP967[1].kind = 1;
TMP967[1].offset = offsetof(Rstparser332587, idx);
TMP967[1].typ = (&NTI108);
TMP967[1].name = "idx";
TMP2550[1] = &TMP967[2];
NTI332141.size = sizeof(Token332141);
NTI332141.kind = 18;
NTI332141.base = 0;
NTI332141.flags = 2;
TMP2551[0] = &TMP967[4];
NTI332139.size = sizeof(NU8);
NTI332139.kind = 14;
NTI332139.base = 0;
NTI332139.flags = 3;
for (TMP2554 = 0; TMP2554 < 7; TMP2554++) {
TMP967[TMP2554+5].kind = 1;
TMP967[TMP2554+5].offset = TMP2554;
TMP967[TMP2554+5].name = TMP2553[TMP2554];
TMP2552[TMP2554] = &TMP967[TMP2554+5];
}
TMP967[12].len = 7; TMP967[12].kind = 2; TMP967[12].sons = &TMP2552[0];
NTI332139.node = &TMP967[12];
TMP967[4].kind = 1;
TMP967[4].offset = offsetof(Token332141, kind);
TMP967[4].typ = (&NTI332139);
TMP967[4].name = "kind";
TMP2551[1] = &TMP967[13];
TMP967[13].kind = 1;
TMP967[13].offset = offsetof(Token332141, ival);
TMP967[13].typ = (&NTI108);
TMP967[13].name = "ival";
TMP2551[2] = &TMP967[14];
TMP967[14].kind = 1;
TMP967[14].offset = offsetof(Token332141, symbol);
TMP967[14].typ = (&NTI149);
TMP967[14].name = "symbol";
TMP2551[3] = &TMP967[15];
TMP967[15].kind = 1;
TMP967[15].offset = offsetof(Token332141, line);
TMP967[15].typ = (&NTI108);
TMP967[15].name = "line";
TMP2551[4] = &TMP967[16];
TMP967[16].kind = 1;
TMP967[16].offset = offsetof(Token332141, col);
TMP967[16].typ = (&NTI108);
TMP967[16].name = "col";
TMP967[3].len = 5; TMP967[3].kind = 2; TMP967[3].sons = &TMP2551[0];
NTI332141.node = &TMP967[3];
NTI332143.size = sizeof(Tokenseq332143*);
NTI332143.kind = 24;
NTI332143.base = (&NTI332141);
NTI332143.flags = 2;
NTI332143.marker = TMP2555;
TMP967[2].kind = 1;
TMP967[2].offset = offsetof(Rstparser332587, tok);
TMP967[2].typ = (&NTI332143);
TMP967[2].name = "tok";
TMP2550[2] = &TMP967[17];
NTI332583.size = sizeof(Sharedstate332583);
NTI332583.kind = 18;
NTI332583.base = 0;
NTI332583.flags = 2;
TMP2556[0] = &TMP967[19];
NTI332013.size = sizeof(NU8);
NTI332013.kind = 14;
NTI332013.base = 0;
NTI332013.flags = 3;
for (TMP2559 = 0; TMP2559 < 4; TMP2559++) {
TMP967[TMP2559+20].kind = 1;
TMP967[TMP2559+20].offset = TMP2559;
TMP967[TMP2559+20].name = TMP2558[TMP2559];
TMP2557[TMP2559] = &TMP967[TMP2559+20];
}
TMP967[24].len = 4; TMP967[24].kind = 2; TMP967[24].sons = &TMP2557[0];
NTI332013.node = &TMP967[24];
NTI332015.size = sizeof(NU8);
NTI332015.kind = 19;
NTI332015.base = (&NTI332013);
NTI332015.flags = 3;
TMP967[25].len = 0; TMP967[25].kind = 0;
NTI332015.node = &TMP967[25];
TMP967[19].kind = 1;
TMP967[19].offset = offsetof(Sharedstate332583, options);
TMP967[19].typ = (&NTI332015);
TMP967[19].name = "options";
TMP2556[1] = &TMP967[26];
TMP967[26].kind = 1;
TMP967[26].offset = offsetof(Sharedstate332583, ulevel);
TMP967[26].typ = (&NTI108);
TMP967[26].name = "uLevel";
TMP2556[2] = &TMP967[27];
TMP967[27].kind = 1;
TMP967[27].offset = offsetof(Sharedstate332583, olevel);
TMP967[27].typ = (&NTI108);
TMP967[27].name = "oLevel";
TMP2556[3] = &TMP967[28];
NTI332581.size = sizeof(Substitution332581);
NTI332581.kind = 18;
NTI332581.base = 0;
NTI332581.flags = 2;
TMP2560[0] = &TMP967[30];
TMP967[30].kind = 1;
TMP967[30].offset = offsetof(Substitution332581, key);
TMP967[30].typ = (&NTI149);
TMP967[30].name = "key";
TMP2560[1] = &TMP967[31];
TMP967[31].kind = 1;
TMP967[31].offset = offsetof(Substitution332581, value);
TMP967[31].typ = (&NTI331007);
TMP967[31].name = "value";
TMP967[29].len = 2; TMP967[29].kind = 2; TMP967[29].sons = &TMP2560[0];
NTI332581.node = &TMP967[29];
NTI332597.size = sizeof(TY332597*);
NTI332597.kind = 24;
NTI332597.base = (&NTI332581);
NTI332597.flags = 2;
NTI332597.marker = TMP2567;
TMP967[28].kind = 1;
TMP967[28].offset = offsetof(Sharedstate332583, subs);
TMP967[28].typ = (&NTI332597);
TMP967[28].name = "subs";
TMP2556[4] = &TMP967[32];
TMP967[32].kind = 1;
TMP967[32].offset = offsetof(Sharedstate332583, refs);
TMP967[32].typ = (&NTI332597);
TMP967[32].name = "refs";
TMP2556[5] = &TMP967[33];
TMP967[33].kind = 1;
TMP967[33].offset = offsetof(Sharedstate332583, underlinetolevel);
TMP967[33].typ = (&NTI103393);
TMP967[33].name = "underlineToLevel";
TMP2556[6] = &TMP967[34];
TMP967[34].kind = 1;
TMP967[34].offset = offsetof(Sharedstate332583, overlinetolevel);
TMP967[34].typ = (&NTI103393);
TMP967[34].name = "overlineToLevel";
TMP2556[7] = &TMP967[35];
NTI332021.size = sizeof(Msghandler332021);
NTI332021.kind = 25;
NTI332021.base = 0;
NTI332021.flags = 3;
TMP967[35].kind = 1;
TMP967[35].offset = offsetof(Sharedstate332583, msghandler);
TMP967[35].typ = (&NTI332021);
TMP967[35].name = "msgHandler";
TMP2556[8] = &TMP967[36];
NTI332023.size = sizeof(Findfilehandler332023);
NTI332023.kind = 25;
NTI332023.base = 0;
NTI332023.flags = 3;
TMP967[36].kind = 1;
TMP967[36].offset = offsetof(Sharedstate332583, findfile);
TMP967[36].typ = (&NTI332023);
TMP967[36].name = "findFile";
TMP967[18].len = 9; TMP967[18].kind = 2; TMP967[18].sons = &TMP2556[0];
NTI332583.node = &TMP967[18];
NTI332585.size = sizeof(Sharedstate332583*);
NTI332585.kind = 22;
NTI332585.base = (&NTI332583);
NTI332585.flags = 2;
NTI332585.marker = TMP2568;
TMP967[17].kind = 1;
TMP967[17].offset = offsetof(Rstparser332587, s);
TMP967[17].typ = (&NTI332585);
TMP967[17].name = "s";
TMP2550[3] = &TMP967[37];
NTI332608.size = sizeof(TY332608*);
NTI332608.kind = 24;
NTI332608.base = (&NTI108);
NTI332608.flags = 2;
NTI332608.marker = TMP2569;
TMP967[37].kind = 1;
TMP967[37].offset = offsetof(Rstparser332587, indentstack);
TMP967[37].typ = (&NTI332608);
TMP967[37].name = "indentStack";
TMP2550[4] = &TMP967[38];
TMP967[38].kind = 1;
TMP967[38].offset = offsetof(Rstparser332587, filename);
TMP967[38].typ = (&NTI149);
TMP967[38].name = "filename";
TMP2550[5] = &TMP967[39];
TMP967[39].kind = 1;
TMP967[39].offset = offsetof(Rstparser332587, line);
TMP967[39].typ = (&NTI108);
TMP967[39].name = "line";
TMP2550[6] = &TMP967[40];
TMP967[40].kind = 1;
TMP967[40].offset = offsetof(Rstparser332587, col);
TMP967[40].typ = (&NTI108);
TMP967[40].name = "col";
TMP2550[7] = &TMP967[41];
TMP967[41].kind = 1;
TMP967[41].offset = offsetof(Rstparser332587, hastoc);
TMP967[41].typ = (&NTI138);
TMP967[41].name = "hasToc";
TMP967[0].len = 8; TMP967[0].kind = 2; TMP967[0].sons = &TMP2550[0];
NTI332587.node = &TMP967[0];
NTI332019.size = sizeof(NU8);
NTI332019.kind = 14;
NTI332019.base = 0;
NTI332019.flags = 3;
for (TMP2574 = 0; TMP2574 < 10; TMP2574++) {
TMP967[TMP2574+42].kind = 1;
TMP967[TMP2574+42].offset = TMP2574;
TMP967[TMP2574+42].name = TMP2573[TMP2574];
TMP2572[TMP2574] = &TMP967[TMP2574+42];
}
TMP967[52].len = 10; TMP967[52].kind = 2; TMP967[52].sons = &TMP2572[0];
NTI332019.node = &TMP967[52];
NTI332017.size = sizeof(NU8);
NTI332017.kind = 14;
NTI332017.base = 0;
NTI332017.flags = 3;
for (TMP2588 = 0; TMP2588 < 3; TMP2588++) {
TMP967[TMP2588+53].kind = 1;
TMP967[TMP2588+53].offset = TMP2588;
TMP967[TMP2588+53].name = TMP2587[TMP2588];
TMP2586[TMP2588] = &TMP967[TMP2588+53];
}
TMP967[56].len = 3; TMP967[56].kind = 2; TMP967[56].sons = &TMP2586[0];
NTI332017.node = &TMP967[56];
NTI332589.size = sizeof(Eparseerror332589);
NTI332589.kind = 17;
NTI332589.base = (&NTI4049);
TMP967[57].len = 0; TMP967[57].kind = 2;
NTI332589.node = &TMP967[57];
NTI332839.size = sizeof(Eparseerror332589*);
NTI332839.kind = 22;
NTI332839.base = (&NTI332589);
NTI332839.marker = TMP2589;
NTI332145.size = sizeof(Lexer332145);
NTI332145.kind = 17;
NTI332145.base = (&NTI4011);
NTI332145.flags = 1;
TMP2591[0] = &TMP967[59];
TMP967[59].kind = 1;
TMP967[59].offset = offsetof(Lexer332145, buf);
TMP967[59].typ = (&NTI151);
TMP967[59].name = "buf";
TMP2591[1] = &TMP967[60];
TMP967[60].kind = 1;
TMP967[60].offset = offsetof(Lexer332145, bufpos);
TMP967[60].typ = (&NTI108);
TMP967[60].name = "bufpos";
TMP2591[2] = &TMP967[61];
TMP967[61].kind = 1;
TMP967[61].offset = offsetof(Lexer332145, line);
TMP967[61].typ = (&NTI108);
TMP967[61].name = "line";
TMP2591[3] = &TMP967[62];
TMP967[62].kind = 1;
TMP967[62].offset = offsetof(Lexer332145, col);
TMP967[62].typ = (&NTI108);
TMP967[62].name = "col";
TMP2591[4] = &TMP967[63];
TMP967[63].kind = 1;
TMP967[63].offset = offsetof(Lexer332145, baseindent);
TMP967[63].typ = (&NTI108);
TMP967[63].name = "baseIndent";
TMP2591[5] = &TMP967[64];
TMP967[64].kind = 1;
TMP967[64].offset = offsetof(Lexer332145, skippounds);
TMP967[64].typ = (&NTI138);
TMP967[64].name = "skipPounds";
TMP967[58].len = 6; TMP967[58].kind = 2; TMP967[58].sons = &TMP2591[0];
NTI332145.node = &TMP967[58];
}

