/* Generated by Nim Compiler v0.11.2 */
/*   (c) 2015 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Jsonparser288013 Jsonparser288013;
typedef struct Baselexer246024 Baselexer246024;
typedef struct TNimObject TNimObject;
typedef struct Streamobj138027 Streamobj138027;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TY288063 TY288063;
typedef struct Jsonparsingerror289728 Jsonparsingerror289728;
typedef struct Valueerror3449 Valueerror3449;
typedef struct Exception Exception;
typedef struct Tcell46547 Tcell46547;
typedef struct Tcellseq46563 Tcellseq46563;
typedef struct Tgcheap48416 Tgcheap48416;
typedef struct Tcellset46559 Tcellset46559;
typedef struct Tpagedesc46555 Tpagedesc46555;
typedef struct Tmemregion28410 Tmemregion28410;
typedef struct Tsmallchunk27640 Tsmallchunk27640;
typedef struct Tllchunk28404 Tllchunk28404;
typedef struct Tbigchunk27642 Tbigchunk27642;
typedef struct Tintset27617 Tintset27617;
typedef struct Ttrunk27613 Ttrunk27613;
typedef struct Tavlnode28408 Tavlnode28408;
typedef struct Tgcstat48414 Tgcstat48414;
typedef struct Jsonnodeobj289726 Jsonnodeobj289726;
typedef struct TY290209 TY290209;
typedef struct TY289741 TY289741;
typedef struct TY289746 TY289746;
typedef struct Tbasechunk27638 Tbasechunk27638;
typedef struct Tfreecell27630 Tfreecell27630;
typedef N_NIMCALL_PTR(void, TY3289) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3294) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3289 marker;
TY3294 deepcopy;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Baselexer246024  {
  TNimObject Sup;
NI bufpos;
NCSTRING buf;
NI buflen;
Streamobj138027* input;
NI linenumber;
NI sentinel;
NI linestart;
NIM_BOOL fileopened;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Jsonparser288013  {
  Baselexer246024 Sup;
NimStringDesc* a;
NU8 tok;
NU8 kind;
NU8 err;
TY288063* state;
NimStringDesc* filename;
};
typedef NU8 TY178407[32];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror3449  {
  Exception Sup;
};
struct  Jsonparsingerror289728  {
  Valueerror3449 Sup;
};
typedef NimStringDesc* TY164825[4];
struct  Tcell46547  {
NI refcount;
TNimType* typ;
};
struct  Tcellseq46563  {
NI len;
NI cap;
Tcell46547** d;
};
struct  Tcellset46559  {
NI counter;
NI max;
Tpagedesc46555* head;
Tpagedesc46555** data;
};
typedef Tsmallchunk27640* TY28422[512];
typedef Ttrunk27613* Ttrunkbuckets27615[256];
struct  Tintset27617  {
Ttrunkbuckets27615 data;
};
struct  Tmemregion28410  {
NI minlargeobj;
NI maxlargeobj;
TY28422 freesmallchunks;
Tllchunk28404* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27642* freechunkslist;
Tintset27617 chunkstarts;
Tavlnode28408* root;
Tavlnode28408* deleted;
Tavlnode28408* last;
Tavlnode28408* freeavlnodes;
};
struct  Tgcstat48414  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48416  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46563 zct;
Tcellseq46563 decstack;
Tcellset46559 cycleroots;
Tcellseq46563 tempstack;
NI recgclock;
Tmemregion28410 region;
Tgcstat48414 stat;
};
struct TY290209 {
NimStringDesc* Field0;
Jsonnodeobj289726* Field1;
};
struct  Jsonnodeobj289726  {
NU8 kind;
union{
struct {NimStringDesc* str;
} S1;
struct {NI64 num;
} S2;
struct {NF fnum;
} S3;
struct {NIM_BOOL bval;
} S4;
struct {TY289741* fields;
} S6;
struct {TY289746* elems;
} S7;
} kindU;
};
typedef N_NIMCALL_PTR(void, TY138028) (Streamobj138027* s);
typedef N_NIMCALL_PTR(NIM_BOOL, TY138032) (Streamobj138027* s);
typedef N_NIMCALL_PTR(void, TY138036) (Streamobj138027* s, NI pos);
typedef N_NIMCALL_PTR(NI, TY138041) (Streamobj138027* s);
typedef N_NIMCALL_PTR(NI, TY138045) (Streamobj138027* s, void* buffer, NI buflen);
typedef N_NIMCALL_PTR(void, TY138051) (Streamobj138027* s, void* buffer, NI buflen);
typedef N_NIMCALL_PTR(void, TY138057) (Streamobj138027* s);
struct  Streamobj138027  {
  TNimObject Sup;
TY138028 closeimpl;
TY138032 atendimpl;
TY138036 setpositionimpl;
TY138041 getpositionimpl;
TY138045 readdataimpl;
TY138051 writedataimpl;
TY138057 flushimpl;
};
typedef NI TY27620[16];
struct  Tpagedesc46555  {
Tpagedesc46555* next;
NI key;
TY27620 bits;
};
struct  Tbasechunk27638  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27640  {
  Tbasechunk27638 Sup;
Tsmallchunk27640* next;
Tsmallchunk27640* prev;
Tfreecell27630* freelist;
NI free;
NI acc;
NF data;
};
struct  Tllchunk28404  {
NI size;
NI acc;
Tllchunk28404* next;
};
struct  Tbigchunk27642  {
  Tbasechunk27638 Sup;
Tbigchunk27642* next;
Tbigchunk27642* prev;
NI align;
NF data;
};
struct  Ttrunk27613  {
Ttrunk27613* next;
NI key;
TY27620 bits;
};
typedef Tavlnode28408* TY28414[2];
struct  Tavlnode28408  {
TY28414 link;
NI key;
NI upperbound;
NI level;
};
struct  Tfreecell27630  {
Tfreecell27630* next;
NI zerofield;
};
struct TY288063 {
  TGenericSeq Sup;
  NU8 data[SEQ_DECL_SIZE];
};
struct TY289741 {
  TGenericSeq Sup;
  TY290209 data[SEQ_DECL_SIZE];
};
struct TY289746 {
  TGenericSeq Sup;
  Jsonnodeobj289726* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, TMP2928)(void* p, NI op);
N_NIMCALL(void, open_246040)(Baselexer246024* L, Streamobj138027* input, NI buflen);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_81404, TNimType* mt);
N_NIMCALL(NU8, gettok_289343)(Jsonparser288013* my);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(void, skip_289042)(Jsonparser288013* my);
N_NIMCALL(NI, handlecr_246071)(Baselexer246024* L, NI pos);
N_NIMCALL(NI, handlelf_246079)(Baselexer246024* L, NI pos);
N_NIMCALL(void, parsenumber_289138)(Jsonparser288013* my);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NIM_BOOL, contains_99373)(NimStringDesc* s, TY178407 chars);
N_NIMCALL(NU8, parsestring_288889)(Jsonparser288013* my);
N_NIMCALL(NIM_BOOL, handlehexchar_288822)(NIM_CHAR c, NI* x);
N_NIMCALL(NimStringDesc*, nuctoUTF8)(NI c);
N_NIMCALL(void, parsename_289295)(Jsonparser288013* my);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
static N_INLINE(NU8, pop_289528)(TY288063** s);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, next_289418)(Jsonparser288013* my);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2940)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(NimStringDesc*, errormsgexpected_288809)(Jsonparser288013* my, NimStringDesc* e);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
static N_INLINE(NI, getline_288627)(Jsonparser288013* my);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
static N_INLINE(NI, getcolumn_288617)(Jsonparser288013* my);
N_NIMCALL(NI, getcolnumber_246064)(Baselexer246024* L, NI pos);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(Tcell46547*, usrtocell_50046)(void* usr);
static N_INLINE(void, rtladdzct_51604)(Tcell46547* c);
N_NOINLINE(void, addzct_50017)(Tcellseq46563* s, Tcell46547* c);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x, NI len);
N_NIMCALL(void, TMP4893)(void* p, NI op);
N_NIMCALL(void, TMP4894)(void* p, NI op);
N_NIMCALL(void, TMP4895)(void* p, NI op);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290713)(TY289746* x, TY289746* y);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290817)(TY289741* x, TY289741* y);
N_NIMCALL(void, topretty_293332)(NimStringDesc** result, Jsonnodeobj289726* node, NI indent, NIM_BOOL ml, NIM_BOOL lstarr, NI currindent);
N_NIMCALL(void, nl_293284)(NimStringDesc** s, NIM_BOOL ml);
N_NIMCALL(void, indent_293261)(NimStringDesc** s, NI i);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_NIMCALL(NI, newindent_293272)(NI curr, NI indent, NIM_BOOL ml);
N_NIMCALL(NimStringDesc*, escapejson_293295)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x);
N_NIMCALL(NimStringDesc*, nimFloatToStr)(NF f);
N_NIMCALL(NimStringDesc*, nimBoolToStr)(NIM_BOOL x);
NIM_CONST struct {
  TGenericSeq Sup;
  NU8 data[1];
} CNSTSEQ2931 = {{1, 1}, {((NU8) 1)}};
NIM_CONST TY288063* TMP2929 = ((TY288063*)&CNSTSEQ2931);
STRING_LITERAL(TMP2931, "", 0);
STRING_LITERAL(TMP2935, "0.", 2);
static NIM_CONST TY178407 TMP2936 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2937, "null", 4);
STRING_LITERAL(TMP2938, "true", 4);
STRING_LITERAL(TMP2939, "false", 5);
STRING_LITERAL(TMP2941, "$1($2, $3) Error: $4", 20);
STRING_LITERAL(TMP2942, " expected", 9);
STRING_LITERAL(TMP2969, "\"", 1);
STRING_LITERAL(TMP2970, "\\\"", 2);
STRING_LITERAL(TMP2971, "\\\\", 2);
STRING_LITERAL(TMP2972, "\\u", 2);
TNimNode* NimDT_289726_kind[8];
STRING_LITERAL(TMP4900, "\012", 1);
STRING_LITERAL(TMP4901, "{", 1);
STRING_LITERAL(TMP4902, ", ", 2);
STRING_LITERAL(TMP4903, ": ", 2);
STRING_LITERAL(TMP4904, "}", 1);
STRING_LITERAL(TMP4905, "{}", 2);
STRING_LITERAL(TMP4906, "[", 1);
STRING_LITERAL(TMP4907, "]", 1);
STRING_LITERAL(TMP4908, "[]", 2);
extern TNimType NTI246024; /* BaseLexer */
TNimType NTI288013; /* JsonParser */
extern TNimType NTI149; /* string */
TNimType NTI288007; /* TTokKind */
TNimType NTI288005; /* JsonEventKind */
TNimType NTI288009; /* JsonError */
TNimType NTI288011; /* ParserState */
TNimType NTI288063; /* seq[ParserState] */
extern TNimType NTI3449; /* ValueError */
TNimType NTI289728; /* JsonParsingError */
TNimType NTI289765; /* ref JsonParsingError */
extern Tgcheap48416 gch_48444;
TNimType NTI289726; /* JsonNodeObj */
TNimType NTI289722; /* JsonNodeKind */
extern TNimType NTI5710; /* BiggestInt */
extern TNimType NTI128; /* float */
extern TNimType NTI138; /* bool */
TNimType NTI290209; /* tuple[key: string, val: JsonNode] */
TNimType NTI289741; /* seq[tuple[key: string, val: JsonNode]] */
TNimType NTI289746; /* seq[JsonNode] */
TNimType NTI289724; /* JsonNode */
N_NIMCALL(void, TMP2928)(void* p, NI op) {
	TY288063* a;
	NI LOC1;
	a = (TY288063*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, open_288090)(Jsonparser288013* my, Streamobj138027* input, NimStringDesc* filename) {
	Baselexer246024* LOC1;
	LOC1 = 0;
	LOC1 = &my->Sup;
	open_246040(LOC1, input, ((NI) 8192));
	unsureAsgnRef((void**) (&(*my).filename), copyString(filename));
	genericSeqAssign((&(*my).state), TMP2929, (&NTI288063));
	(*my).kind = ((NU8) 0);
	unsureAsgnRef((void**) (&(*my).a), copyString(((NimStringDesc*) &TMP2931)));
}

N_NIMCALL(void, skip_289042)(Jsonparser288013* my) {
	NI pos;
	NCSTRING buf;
	pos = (*my).Sup.bufpos;
	buf = (*my).Sup.buf;
	{
		while (1) {
			switch (((NU8)(buf[pos]))) {
			case 47:
			{
				{
					if (!((NU8)(buf[(NI)(pos + ((NI) 1))]) == (NU8)(47))) goto LA6;
					pos += ((NI) 2);
					{
						while (1) {
							switch (((NU8)(buf[pos]))) {
							case 0:
							{
								goto LA8;
							}
							break;
							case 13:
							{
								Baselexer246024* LOC12;
								LOC12 = 0;
								LOC12 = &my->Sup;
								pos = handlecr_246071(LOC12, pos);
								buf = (*my).Sup.buf;
								goto LA8;
							}
							break;
							case 10:
							{
								Baselexer246024* LOC14;
								LOC14 = 0;
								LOC14 = &my->Sup;
								pos = handlelf_246079(LOC14, pos);
								buf = (*my).Sup.buf;
								goto LA8;
							}
							break;
							default:
							{
								pos += ((NI) 1);
							}
							break;
							}
						}
					} LA8: ;
				}
				goto LA4;
				LA6: ;
				{
					if (!((NU8)(buf[(NI)(pos + ((NI) 1))]) == (NU8)(42))) goto LA17;
					pos += ((NI) 2);
					{
						while (1) {
							switch (((NU8)(buf[pos]))) {
							case 0:
							{
								(*my).err = ((NU8) 8);
								goto LA19;
							}
							break;
							case 13:
							{
								Baselexer246024* LOC23;
								LOC23 = 0;
								LOC23 = &my->Sup;
								pos = handlecr_246071(LOC23, pos);
								buf = (*my).Sup.buf;
							}
							break;
							case 10:
							{
								Baselexer246024* LOC25;
								LOC25 = 0;
								LOC25 = &my->Sup;
								pos = handlelf_246079(LOC25, pos);
								buf = (*my).Sup.buf;
							}
							break;
							case 42:
							{
								pos += ((NI) 1);
								{
									if (!((NU8)(buf[pos]) == (NU8)(47))) goto LA29;
									pos += ((NI) 1);
									goto LA19;
								}
								LA29: ;
							}
							break;
							default:
							{
								pos += ((NI) 1);
							}
							break;
							}
						}
					} LA19: ;
				}
				goto LA4;
				LA17: ;
				{
					goto LA1;
				}
				LA4: ;
			}
			break;
			case 32:
			case 9:
			{
				pos += ((NI) 1);
			}
			break;
			case 13:
			{
				Baselexer246024* LOC35;
				LOC35 = 0;
				LOC35 = &my->Sup;
				pos = handlecr_246071(LOC35, pos);
				buf = (*my).Sup.buf;
			}
			break;
			case 10:
			{
				Baselexer246024* LOC37;
				LOC37 = 0;
				LOC37 = &my->Sup;
				pos = handlelf_246079(LOC37, pos);
				buf = (*my).Sup.buf;
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
	(*my).Sup.bufpos = pos;
}

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, parsenumber_289138)(Jsonparser288013* my) {
	NI pos;
	NCSTRING buf;
	pos = (*my).Sup.bufpos;
	buf = (*my).Sup.buf;
	{
		if (!((NU8)(buf[pos]) == (NU8)(45))) goto LA3;
		(*my).a = addChar((*my).a, 45);
		pos += ((NI) 1);
	}
	LA3: ;
	{
		if (!((NU8)(buf[pos]) == (NU8)(46))) goto LA7;
		(*my).a = resizeString((*my).a, 2);
appendString((*my).a, ((NimStringDesc*) &TMP2935));
		pos += ((NI) 1);
	}
	goto LA5;
	LA7: ;
	{
		{
			while (1) {
				if (!(((NU8)(buf[pos])) >= ((NU8)(48)) && ((NU8)(buf[pos])) <= ((NU8)(57)))) goto LA11;
				(*my).a = addChar((*my).a, buf[pos]);
				pos += ((NI) 1);
			} LA11: ;
		}
		{
			if (!((NU8)(buf[pos]) == (NU8)(46))) goto LA14;
			(*my).a = addChar((*my).a, 46);
			pos += ((NI) 1);
		}
		LA14: ;
	}
	LA5: ;
	{
		while (1) {
			if (!(((NU8)(buf[pos])) >= ((NU8)(48)) && ((NU8)(buf[pos])) <= ((NU8)(57)))) goto LA17;
			(*my).a = addChar((*my).a, buf[pos]);
			pos += ((NI) 1);
		} LA17: ;
	}
	{
		if (!(((NU8)(buf[pos])) == ((NU8)(69)) || ((NU8)(buf[pos])) == ((NU8)(101)))) goto LA20;
		(*my).a = addChar((*my).a, buf[pos]);
		pos += ((NI) 1);
		{
			if (!(((NU8)(buf[pos])) == ((NU8)(43)) || ((NU8)(buf[pos])) == ((NU8)(45)))) goto LA24;
			(*my).a = addChar((*my).a, buf[pos]);
			pos += ((NI) 1);
		}
		LA24: ;
		{
			while (1) {
				if (!(((NU8)(buf[pos])) >= ((NU8)(48)) && ((NU8)(buf[pos])) <= ((NU8)(57)))) goto LA27;
				(*my).a = addChar((*my).a, buf[pos]);
				pos += ((NI) 1);
			} LA27: ;
		}
	}
	LA20: ;
	(*my).Sup.bufpos = pos;
}

N_NIMCALL(NIM_BOOL, handlehexchar_288822)(NIM_CHAR c, NI* x) {
	NIM_BOOL result;
	result = 0;
	result = NIM_TRUE;
	switch (((NU8)(c))) {
	case 48 ... 57:
	{
		(*x) = (NI)((NI)((NU32)((*x)) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) (((NU8)(c)))) - ((NI) 48)))));
	}
	break;
	case 97 ... 102:
	{
		(*x) = (NI)((NI)((NU32)((*x)) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)(c)))) - ((NI) 97)))) + ((NI) 10)))));
	}
	break;
	case 65 ... 70:
	{
		(*x) = (NI)((NI)((NU32)((*x)) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)(c)))) - ((NI) 65)))) + ((NI) 10)))));
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, parsestring_288889)(Jsonparser288013* my) {
	NU8 result;
	NI pos;
	NCSTRING buf;
	result = 0;
	result = ((NU8) 2);
	pos = (NI)((*my).Sup.bufpos + ((NI) 1));
	buf = (*my).Sup.buf;
	{
		while (1) {
			switch (((NU8)(buf[pos]))) {
			case 0:
			{
				(*my).err = ((NU8) 7);
				result = ((NU8) 0);
				goto LA1;
			}
			break;
			case 34:
			{
				pos += ((NI) 1);
				goto LA1;
			}
			break;
			case 92:
			{
				switch (((NU8)(buf[(NI)(pos + ((NI) 1))]))) {
				case 92:
				case 34:
				case 39:
				case 47:
				{
					(*my).a = addChar((*my).a, buf[(NI)(pos + ((NI) 1))]);
					pos += ((NI) 2);
				}
				break;
				case 98:
				{
					(*my).a = addChar((*my).a, 8);
					pos += ((NI) 2);
				}
				break;
				case 102:
				{
					(*my).a = addChar((*my).a, 12);
					pos += ((NI) 2);
				}
				break;
				case 110:
				{
					(*my).a = addChar((*my).a, 10);
					pos += ((NI) 2);
				}
				break;
				case 114:
				{
					(*my).a = addChar((*my).a, 13);
					pos += ((NI) 2);
				}
				break;
				case 116:
				{
					(*my).a = addChar((*my).a, 9);
					pos += ((NI) 2);
				}
				break;
				case 117:
				{
					NI r;
					NimStringDesc* LOC33;
					pos += ((NI) 2);
					r = 0;
					{
						NIM_BOOL LOC15;
						LOC15 = 0;
						LOC15 = handlehexchar_288822(buf[pos], (&r));
						if (!LOC15) goto LA16;
						pos += ((NI) 1);
					}
					LA16: ;
					{
						NIM_BOOL LOC20;
						LOC20 = 0;
						LOC20 = handlehexchar_288822(buf[pos], (&r));
						if (!LOC20) goto LA21;
						pos += ((NI) 1);
					}
					LA21: ;
					{
						NIM_BOOL LOC25;
						LOC25 = 0;
						LOC25 = handlehexchar_288822(buf[pos], (&r));
						if (!LOC25) goto LA26;
						pos += ((NI) 1);
					}
					LA26: ;
					{
						NIM_BOOL LOC30;
						LOC30 = 0;
						LOC30 = handlehexchar_288822(buf[pos], (&r));
						if (!LOC30) goto LA31;
						pos += ((NI) 1);
					}
					LA31: ;
					LOC33 = 0;
					LOC33 = nuctoUTF8(r);
					(*my).a = resizeString((*my).a, LOC33->Sup.len + 0);
appendString((*my).a, LOC33);
				}
				break;
				default:
				{
					(*my).a = addChar((*my).a, buf[pos]);
					pos += ((NI) 1);
				}
				break;
				}
			}
			break;
			case 13:
			{
				Baselexer246024* LOC36;
				LOC36 = 0;
				LOC36 = &my->Sup;
				pos = handlecr_246071(LOC36, pos);
				buf = (*my).Sup.buf;
				(*my).a = addChar((*my).a, 13);
			}
			break;
			case 10:
			{
				Baselexer246024* LOC38;
				LOC38 = 0;
				LOC38 = &my->Sup;
				pos = handlelf_246079(LOC38, pos);
				buf = (*my).Sup.buf;
				(*my).a = addChar((*my).a, 10);
			}
			break;
			default:
			{
				(*my).a = addChar((*my).a, buf[pos]);
				pos += ((NI) 1);
			}
			break;
			}
		}
	} LA1: ;
	(*my).Sup.bufpos = pos;
	return result;
}

N_NIMCALL(void, parsename_289295)(Jsonparser288013* my) {
	NI pos;
	NCSTRING buf;
	pos = (*my).Sup.bufpos;
	buf = (*my).Sup.buf;
	{
		if (!(((NU8)(buf[pos])) >= ((NU8)(97)) && ((NU8)(buf[pos])) <= ((NU8)(122)) || ((NU8)(buf[pos])) >= ((NU8)(65)) && ((NU8)(buf[pos])) <= ((NU8)(90)) || ((NU8)(buf[pos])) == ((NU8)(95)))) goto LA3;
		{
			while (1) {
				if (!(((NU8)(buf[pos])) >= ((NU8)(97)) && ((NU8)(buf[pos])) <= ((NU8)(122)) || ((NU8)(buf[pos])) >= ((NU8)(65)) && ((NU8)(buf[pos])) <= ((NU8)(90)) || ((NU8)(buf[pos])) >= ((NU8)(48)) && ((NU8)(buf[pos])) <= ((NU8)(57)) || ((NU8)(buf[pos])) == ((NU8)(95)))) goto LA6;
				(*my).a = addChar((*my).a, buf[pos]);
				pos += ((NI) 1);
			} LA6: ;
		}
	}
	LA3: ;
	(*my).Sup.bufpos = pos;
}

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(NU8, gettok_289343)(Jsonparser288013* my) {
	NU8 result;
	result = 0;
	(*my).a = setLengthStr((*my).a, ((NI) 0));
	skip_289042(my);
	switch (((NU8)((*my).Sup.buf[(*my).Sup.bufpos]))) {
	case 45:
	case 46:
	case 48 ... 57:
	{
		parsenumber_289138(my);
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = contains_99373((*my).a, TMP2936);
			if (!LOC4) goto LA5;
			result = ((NU8) 4);
		}
		goto LA2;
		LA5: ;
		{
			result = ((NU8) 3);
		}
		LA2: ;
	}
	break;
	case 34:
	{
		result = parsestring_288889(my);
	}
	break;
	case 91:
	{
		(*my).Sup.bufpos += ((NI) 1);
		result = ((NU8) 10);
	}
	break;
	case 123:
	{
		(*my).Sup.bufpos += ((NI) 1);
		result = ((NU8) 8);
	}
	break;
	case 93:
	{
		(*my).Sup.bufpos += ((NI) 1);
		result = ((NU8) 11);
	}
	break;
	case 125:
	{
		(*my).Sup.bufpos += ((NI) 1);
		result = ((NU8) 9);
	}
	break;
	case 44:
	{
		(*my).Sup.bufpos += ((NI) 1);
		result = ((NU8) 13);
	}
	break;
	case 58:
	{
		(*my).Sup.bufpos += ((NI) 1);
		result = ((NU8) 12);
	}
	break;
	case 0:
	{
		result = ((NU8) 1);
	}
	break;
	case 97 ... 122:
	case 65 ... 90:
	case 95:
	{
		parsename_289295(my);
		if (eqStrings((*my).a, ((NimStringDesc*) &TMP2937))) goto LA17;
		if (eqStrings((*my).a, ((NimStringDesc*) &TMP2938))) goto LA18;
		if (eqStrings((*my).a, ((NimStringDesc*) &TMP2939))) goto LA19;
		goto LA20;
		LA17: ;
		{
			result = ((NU8) 7);
		}
		goto LA21;
		LA18: ;
		{
			result = ((NU8) 5);
		}
		goto LA21;
		LA19: ;
		{
			result = ((NU8) 6);
		}
		goto LA21;
		LA20: ;
		{
			result = ((NU8) 0);
		}
		LA21: ;
	}
	break;
	default:
	{
		(*my).Sup.bufpos += ((NI) 1);
		result = ((NU8) 0);
	}
	break;
	}
	(*my).tok = result;
	return result;
}

static N_INLINE(NU8, pop_289528)(TY288063** s) {
	NU8 result;
	NI L;
	result = 0;
	L = (NI)(((*s) ? (*s)->Sup.len : 0) - ((NI) 1));
	result = (*s)->data[L];
	(*s) = (TY288063*) setLengthSeq(&((*s))->Sup, sizeof(NU8), ((NI) (L)));
	return result;
}

N_NIMCALL(void, next_289418)(Jsonparser288013* my) {
	NU8 tk;
	NI i;
	tk = gettok_289343(my);
	i = (NI)(((*my).state ? (*my).state->Sup.len : 0) - ((NI) 1));
	switch ((*my).state->data[i]) {
	case ((NU8) 0):
	{
		{
			if (!(tk == ((NU8) 1))) goto LA4;
			(*my).kind = ((NU8) 1);
		}
		goto LA2;
		LA4: ;
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 9);
		}
		LA2: ;
	}
	break;
	case ((NU8) 1):
	{
		switch (tk) {
		case ((NU8) 2):
		case ((NU8) 3):
		case ((NU8) 4):
		case ((NU8) 5):
		case ((NU8) 6):
		case ((NU8) 7):
		{
			(*my).state->data[i] = ((NU8) 0);
			(*my).kind = ((NU8) (tk));
		}
		break;
		case ((NU8) 10):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 3);
			(*my).kind = ((NU8) 10);
		}
		break;
		case ((NU8) 8):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 2);
			(*my).kind = ((NU8) 8);
		}
		break;
		case ((NU8) 1):
		{
			(*my).kind = ((NU8) 1);
		}
		break;
		default:
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 9);
		}
		break;
		}
	}
	break;
	case ((NU8) 2):
	{
		switch (tk) {
		case ((NU8) 2):
		case ((NU8) 3):
		case ((NU8) 4):
		case ((NU8) 5):
		case ((NU8) 6):
		case ((NU8) 7):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 6);
			(*my).kind = ((NU8) (tk));
		}
		break;
		case ((NU8) 10):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 6);
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 3);
			(*my).kind = ((NU8) 10);
		}
		break;
		case ((NU8) 8):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 6);
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 2);
			(*my).kind = ((NU8) 8);
		}
		break;
		case ((NU8) 9):
		{
			NU8 LOC18;
			(*my).kind = ((NU8) 9);
			LOC18 = 0;
			LOC18 = pop_289528((&(*my).state));
		}
		break;
		default:
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 6);
		}
		break;
		}
	}
	break;
	case ((NU8) 3):
	{
		switch (tk) {
		case ((NU8) 2):
		case ((NU8) 3):
		case ((NU8) 4):
		case ((NU8) 5):
		case ((NU8) 6):
		case ((NU8) 7):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 4);
			(*my).kind = ((NU8) (tk));
		}
		break;
		case ((NU8) 10):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 4);
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 3);
			(*my).kind = ((NU8) 10);
		}
		break;
		case ((NU8) 8):
		{
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 4);
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 2);
			(*my).kind = ((NU8) 8);
		}
		break;
		case ((NU8) 11):
		{
			NU8 LOC25;
			(*my).kind = ((NU8) 11);
			LOC25 = 0;
			LOC25 = pop_289528((&(*my).state));
		}
		break;
		default:
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 5);
		}
		break;
		}
	}
	break;
	case ((NU8) 4):
	{
		switch (tk) {
		case ((NU8) 13):
		{
			NU8 LOC29;
			LOC29 = 0;
			LOC29 = pop_289528((&(*my).state));
			next_289418(my);
		}
		break;
		case ((NU8) 11):
		{
			NU8 LOC31;
			NU8 LOC32;
			(*my).kind = ((NU8) 11);
			LOC31 = 0;
			LOC31 = pop_289528((&(*my).state));
			LOC32 = 0;
			LOC32 = pop_289528((&(*my).state));
		}
		break;
		default:
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 5);
		}
		break;
		}
	}
	break;
	case ((NU8) 5):
	{
		switch (tk) {
		case ((NU8) 13):
		{
			NU8 LOC36;
			LOC36 = 0;
			LOC36 = pop_289528((&(*my).state));
			next_289418(my);
		}
		break;
		case ((NU8) 9):
		{
			NU8 LOC38;
			NU8 LOC39;
			(*my).kind = ((NU8) 9);
			LOC38 = 0;
			LOC38 = pop_289528((&(*my).state));
			LOC39 = 0;
			LOC39 = pop_289528((&(*my).state));
		}
		break;
		default:
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 6);
		}
		break;
		}
	}
	break;
	case ((NU8) 6):
	{
		switch (tk) {
		case ((NU8) 12):
		{
			(*my).state->data[i] = ((NU8) 7);
			next_289418(my);
		}
		break;
		default:
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 3);
		}
		break;
		}
	}
	break;
	case ((NU8) 7):
	{
		switch (tk) {
		case ((NU8) 2):
		case ((NU8) 3):
		case ((NU8) 4):
		case ((NU8) 5):
		case ((NU8) 6):
		case ((NU8) 7):
		{
			(*my).state->data[i] = ((NU8) 5);
			(*my).kind = ((NU8) (tk));
		}
		break;
		case ((NU8) 10):
		{
			(*my).state->data[i] = ((NU8) 5);
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 3);
			(*my).kind = ((NU8) 10);
		}
		break;
		case ((NU8) 8):
		{
			(*my).state->data[i] = ((NU8) 5);
			(*my).state = (TY288063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 2);
			(*my).kind = ((NU8) 8);
		}
		break;
		default:
		{
			(*my).kind = ((NU8) 0);
			(*my).err = ((NU8) 10);
		}
		break;
		}
	}
	break;
	}
}
N_NIMCALL(void, TMP2940)(void* p, NI op) {
	Jsonparsingerror289728* a;
	a = (Jsonparsingerror289728*)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(NI, getline_288627)(Jsonparser288013* my) {
	NI result;
	result = 0;
	result = (*my).Sup.linenumber;
	return result;
}

static N_INLINE(NI, getcolumn_288617)(Jsonparser288013* my) {
	NI result;
	result = 0;
	result = getcolnumber_246064((&(*my).Sup), (*my).Sup.bufpos);
	return result;
}

N_NIMCALL(NimStringDesc*, errormsgexpected_288809)(Jsonparser288013* my, NimStringDesc* e) {
	NimStringDesc* result;
	TY164825 LOC1;
	NI LOC2;
	NI LOC3;
	NimStringDesc* LOC4;
	result = 0;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString((*my).filename);
	LOC2 = 0;
	LOC2 = getline_288627(my);
	LOC1[1] = nimIntToStr(LOC2);
	LOC3 = 0;
	LOC3 = getcolumn_288617(my);
	LOC1[2] = nimIntToStr(LOC3);
	LOC4 = 0;
	LOC4 = rawNewString(e->Sup.len + 9);
appendString(LOC4, e);
appendString(LOC4, ((NimStringDesc*) &TMP2942));
	LOC1[3] = LOC4;
	result = nsuFormatOpenArray(((NimStringDesc*) &TMP2941), LOC1, 4);
	return result;
}

static N_INLINE(Tcell46547*, usrtocell_50046)(void* usr) {
	Tcell46547* result;
	result = 0;
	result = ((Tcell46547*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(Tcell46547))))));
	return result;
}

static N_INLINE(void, rtladdzct_51604)(Tcell46547* c) {
	addzct_50017((&gch_48444.zct), c);
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Tcell46547* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_50046(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Tcell46547* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_50046((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_51604(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NOINLINE(void, raiseparseerr_289758)(Jsonparser288013* p, NimStringDesc* msg) {
	Jsonparsingerror289728* e_289764;
	e_289764 = 0;
	e_289764 = (Jsonparsingerror289728*) newObj((&NTI289765), sizeof(Jsonparsingerror289728));
	(*e_289764).Sup.Sup.Sup.m_type = (&NTI289728);
	asgnRefNoCycle((void**) (&(*e_289764).Sup.Sup.message), errormsgexpected_288809(p, msg));
	raiseException((Exception*)e_289764, "JsonParsingError");
}

N_NIMCALL(NimStringDesc*, escapejson_293295)(NimStringDesc* s) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(((NI) ((NI)((s ? s->Sup.len : 0) + (NI)((NU32)((s ? s->Sup.len : 0)) >> (NU32)(((NI) 3)))))));
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP2969));
	{
		NI x_293299;
		NI i_293307;
		NI result_293309;
		x_293299 = 0;
		i_293307 = ((NI) 0);
		result_293309 = 0;
		{
			while (1) {
				NI r;
				if (!(i_293307 < (s ? s->Sup.len : 0))) goto LA3;
				{
					if (!((NU32)(((NI) (((NU8)(s->data[i_293307]))))) <= (NU32)(((NI) 127)))) goto LA6;
					result_293309 = ((NI) (((NU8)(s->data[i_293307]))));
					i_293307 += ((NI) 1);
				}
				goto LA4;
				LA6: ;
				{
					if (!((NI)((NU32)(((NI) (((NU8)(s->data[i_293307]))))) >> (NU32)(((NI) 5))) == ((NI) 6))) goto LA9;
					result_293309 = (NI)((NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[i_293307])))) & ((NI) 31))))) << (NU32)(((NI) 6))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 1))])))) & ((NI) 63)))));
					i_293307 += ((NI) 2);
				}
				goto LA4;
				LA9: ;
				{
					if (!((NI)((NU32)(((NI) (((NU8)(s->data[i_293307]))))) >> (NU32)(((NI) 4))) == ((NI) 14))) goto LA12;
					result_293309 = (NI)((NI)((NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[i_293307])))) & ((NI) 15))))) << (NU32)(((NI) 12))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 1))])))) & ((NI) 63))))) << (NU32)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 2))])))) & ((NI) 63)))));
					i_293307 += ((NI) 3);
				}
				goto LA4;
				LA12: ;
				{
					if (!((NI)((NU32)(((NI) (((NU8)(s->data[i_293307]))))) >> (NU32)(((NI) 3))) == ((NI) 30))) goto LA15;
					result_293309 = (NI)((NI)((NI)((NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[i_293307])))) & ((NI) 7))))) << (NU32)(((NI) 18))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 1))])))) & ((NI) 63))))) << (NU32)(((NI) 12)))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 2))])))) & ((NI) 63))))) << (NU32)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 3))])))) & ((NI) 63)))));
					i_293307 += ((NI) 4);
				}
				goto LA4;
				LA15: ;
				{
					if (!((NI)((NU32)(((NI) (((NU8)(s->data[i_293307]))))) >> (NU32)(((NI) 2))) == ((NI) 62))) goto LA18;
					result_293309 = (NI)((NI)((NI)((NI)((NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[i_293307])))) & ((NI) 3))))) << (NU32)(((NI) 24))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 1))])))) & ((NI) 63))))) << (NU32)(((NI) 18)))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 2))])))) & ((NI) 63))))) << (NU32)(((NI) 12)))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 3))])))) & ((NI) 63))))) << (NU32)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 4))])))) & ((NI) 63)))));
					i_293307 += ((NI) 5);
				}
				goto LA4;
				LA18: ;
				{
					if (!((NI)((NU32)(((NI) (((NU8)(s->data[i_293307]))))) >> (NU32)(((NI) 1))) == ((NI) 126))) goto LA21;
					result_293309 = (NI)((NI)((NI)((NI)((NI)((NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[i_293307])))) & ((NI) 1))))) << (NU32)(((NI) 30))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 1))])))) & ((NI) 63))))) << (NU32)(((NI) 24)))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 2))])))) & ((NI) 63))))) << (NU32)(((NI) 18)))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 3))])))) & ((NI) 63))))) << (NU32)(((NI) 12)))) | (NI)((NU32)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 4))])))) & ((NI) 63))))) << (NU32)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_293307 + ((NI) 5))])))) & ((NI) 63)))));
					i_293307 += ((NI) 6);
				}
				goto LA4;
				LA21: ;
				{
					result_293309 = ((NI) (((NU8)(s->data[i_293307]))));
					i_293307 += ((NI) 1);
				}
				LA4: ;
				x_293299 = result_293309;
				r = x_293299;
				{
					NIM_BOOL LOC26;
					NIM_CHAR c;
					LOC26 = 0;
					LOC26 = (((NI) 32) <= r);
					if (!(LOC26)) goto LA27;
					LOC26 = (r <= ((NI) 127));
					LA27: ;
					if (!LOC26) goto LA28;
					c = ((NIM_CHAR) (((NI) (r))));
					switch (((NU8)(c))) {
					case 34:
					{
						result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2970));
					}
					break;
					case 92:
					{
						result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2971));
					}
					break;
					default:
					{
						result = addChar(result, c);
					}
					break;
					}
				}
				goto LA24;
				LA28: ;
				{
					NimStringDesc* LOC34;
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2972));
					LOC34 = 0;
					LOC34 = nsuToHex(((NI64) (r)), ((NI) 4));
					result = resizeString(result, LOC34->Sup.len + 0);
appendString(result, LOC34);
				}
				LA24: ;
			} LA3: ;
		}
	}
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP2969));
	return result;
}
N_NIMCALL(void, TMP4893)(void* p, NI op) {
	TY289741* a;
	NI LOC1;
	a = (TY289741*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field0, op);
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}
N_NIMCALL(void, TMP4894)(void* p, NI op) {
	TY289746* a;
	NI LOC1;
	a = (TY289746*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1], op);
	}
}
N_NIMCALL(void, TMP4895)(void* p, NI op) {
	Jsonnodeobj289726* a;
	a = (Jsonnodeobj289726*)p;
	switch ((*a).kind) {
	case ((NU8) 4):
	nimGCvisit((void*)(*a).kindU.S1.str, op);
	break;
	case ((NU8) 2):
	break;
	case ((NU8) 3):
	break;
	case ((NU8) 1):
	break;
	case ((NU8) 0):
	break;
	case ((NU8) 5):
	nimGCvisit((void*)(*a).kindU.S6.fields, op);
	break;
	case ((NU8) 6):
	nimGCvisit((void*)(*a).kindU.S7.elems, op);
	break;
	} 
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Tcell46547* c;
	c = usrtocell_50046(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_51604(c);
	}
	LA3: ;
}

N_NIMCALL(Jsonnodeobj289726*, HEX25_290206)(TY290209* keyvals, NI keyvalsLen0) {
	Jsonnodeobj289726* result;
	result = 0;
	result = (Jsonnodeobj289726*) newObj((&NTI289724), sizeof(Jsonnodeobj289726));
	(*result).kind = ((NU8) 5);
	if ((*result).kindU.S6.fields) nimGCunrefNoCycle((*result).kindU.S6.fields);
	(*result).kindU.S6.fields = (TY289741*) newSeqRC1((&NTI289741), ((NI) (keyvalsLen0)));
	{
		NI i_290281;
		TY290209 p_290282;
		NI i_290287;
		i_290281 = 0;
		memset((void*)(&p_290282), 0, sizeof(p_290282));
		i_290287 = ((NI) 0);
		{
			while (1) {
				NimStringDesc* LOC4;
				if (!(i_290287 < keyvalsLen0)) goto LA3;
				i_290281 = i_290287;
				p_290282.Field0 = keyvals[i_290287].Field0;
				p_290282.Field1 = keyvals[i_290287].Field1;
				LOC4 = 0;
				LOC4 = (*result).kindU.S6.fields->data[i_290281].Field0; (*result).kindU.S6.fields->data[i_290281].Field0 = copyStringRC1(p_290282.Field0);
				if (LOC4) nimGCunrefNoCycle(LOC4);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.fields->data[i_290281].Field1), p_290282.Field1);
				i_290287 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(Jsonnodeobj289726*, HEX25_290130)(NimStringDesc* s) {
	Jsonnodeobj289726* result;
	NimStringDesc* LOC1;
	result = 0;
	result = (Jsonnodeobj289726*) newObj((&NTI289724), sizeof(Jsonnodeobj289726));
	(*result).kind = ((NU8) 4);
	LOC1 = 0;
	LOC1 = (*result).kindU.S1.str; (*result).kindU.S1.str = copyStringRC1(s);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	return result;
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_292619)(Jsonnodeobj289726* obj, NimStringDesc* key, Jsonnodeobj289726* val) {
	TY290209 LOC8;
	NimStringDesc* LOC9;
{	{
		NI i_292820;
		NI HEX3Atmp_292836;
		NI res_292839;
		i_292820 = 0;
		HEX3Atmp_292836 = 0;
		HEX3Atmp_292836 = (NI)(((*obj).kindU.S6.fields ? (*obj).kindU.S6.fields->Sup.len : 0) - ((NI) 1));
		res_292839 = ((NI) 0);
		{
			while (1) {
				if (!(res_292839 <= HEX3Atmp_292836)) goto LA3;
				i_292820 = res_292839;
				{
					if (!eqStrings((*obj).kindU.S6.fields->data[i_292820].Field0, key)) goto LA6;
					asgnRefNoCycle((void**) (&(*obj).kindU.S6.fields->data[i_292820].Field1), val);
					goto BeforeRet;
				}
				LA6: ;
				res_292839 += ((NI) 1);
			} LA3: ;
		}
	}
	memset((void*)(&LOC8), 0, sizeof(LOC8));
	LOC8.Field0 = copyString(key);
	LOC8.Field1 = val;
	(*obj).kindU.S6.fields = (TY289741*) incrSeq(&((*obj).kindU.S6.fields)->Sup, sizeof(TY290209));
	LOC9 = 0;
	LOC9 = (*obj).kindU.S6.fields->data[(*obj).kindU.S6.fields->Sup.len-1].Field0; (*obj).kindU.S6.fields->data[(*obj).kindU.S6.fields->Sup.len-1].Field0 = copyStringRC1(LOC8.Field0);
	if (LOC9) nimGCunrefNoCycle(LOC9);
	asgnRefNoCycle((void**) (&(*obj).kindU.S6.fields->data[(*obj).kindU.S6.fields->Sup.len-1].Field1), LOC8.Field1);
	}BeforeRet: ;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290661)(Jsonnodeobj289726* a, Jsonnodeobj289726* b) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!a == 0) goto LA3;
		{
			if (!b == 0) goto LA7;
			result = NIM_TRUE;
			goto BeforeRet;
		}
		LA7: ;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC10;
		LOC10 = 0;
		LOC10 = b == 0;
		if (LOC10) goto LA11;
		LOC10 = !(((*a).kind == (*b).kind));
		LA11: ;
		if (!LOC10) goto LA12;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	goto LA1;
	LA12: ;
	{
		switch ((*a).kind) {
		case ((NU8) 4):
		{
			result = eqStrings((*a).kindU.S1.str, (*b).kindU.S1.str);
		}
		break;
		case ((NU8) 2):
		{
			result = ((*a).kindU.S2.num == (*b).kindU.S2.num);
		}
		break;
		case ((NU8) 3):
		{
			result = ((*a).kindU.S3.fnum == (*b).kindU.S3.fnum);
		}
		break;
		case ((NU8) 1):
		{
			result = ((*a).kindU.S4.bval == (*b).kindU.S4.bval);
		}
		break;
		case ((NU8) 0):
		{
			result = NIM_TRUE;
		}
		break;
		case ((NU8) 6):
		{
			result = HEX3DHEX3D_290713((*a).kindU.S7.elems, (*b).kindU.S7.elems);
		}
		break;
		case ((NU8) 5):
		{
			result = HEX3DHEX3D_290817((*a).kindU.S6.fields, (*b).kindU.S6.fields);
		}
		break;
		}
		goto BeforeRet;
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Jsonnodeobj289726*, newjarray_289927)(void) {
	Jsonnodeobj289726* result;
	result = 0;
	result = (Jsonnodeobj289726*) newObj((&NTI289724), sizeof(Jsonnodeobj289726));
	(*result).kind = ((NU8) 6);
	if ((*result).kindU.S7.elems) nimGCunrefNoCycle((*result).kindU.S7.elems);
	(*result).kindU.S7.elems = (TY289746*) newSeqRC1((&NTI289746), 0);
	return result;
}

N_NIMCALL(void, add_292247)(Jsonnodeobj289726* father, Jsonnodeobj289726* child) {
	(*father).kindU.S7.elems = (TY289746*) incrSeq(&((*father).kindU.S7.elems)->Sup, sizeof(Jsonnodeobj289726*));
	asgnRefNoCycle((void**) (&(*father).kindU.S7.elems->data[(*father).kindU.S7.elems->Sup.len-1]), child);
}

N_NIMCALL(void, nl_293284)(NimStringDesc** s, NIM_BOOL ml) {
	{
		if (!ml) goto LA3;
		(*s) = resizeString((*s), 1);
appendString((*s), ((NimStringDesc*) &TMP4900));
	}
	LA3: ;
}

N_NIMCALL(void, indent_293261)(NimStringDesc** s, NI i) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = nsuRepeatChar(32, ((NI) (i)));
	(*s) = resizeString((*s), LOC1->Sup.len + 0);
appendString((*s), LOC1);
}

N_NIMCALL(NI, newindent_293272)(NI curr, NI indent, NIM_BOOL ml) {
	NI result;
{	result = 0;
	{
		if (!ml) goto LA3;
		result = (NI)(curr + indent);
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		result = indent;
		goto BeforeRet;
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, topretty_293332)(NimStringDesc** result, Jsonnodeobj289726* node, NI indent, NIM_BOOL ml, NIM_BOOL lstarr, NI currindent) {
	switch ((*node).kind) {
	case ((NU8) 5):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = !((currindent == ((NI) 0)));
			if (!(LOC4)) goto LA5;
			LOC4 = !(lstarr);
			LA5: ;
			if (!LOC4) goto LA6;
			nl_293284(result, ml);
		}
		LA6: ;
		indent_293261(result, currindent);
		{
			if (!(((NI) 0) < ((*node).kindU.S6.fields ? (*node).kindU.S6.fields->Sup.len : 0))) goto LA10;
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP4901));
			nl_293284(result, ml);
			{
				NI i_293369;
				NI HEX3Atmp_293407;
				NI res_293410;
				i_293369 = 0;
				HEX3Atmp_293407 = 0;
				HEX3Atmp_293407 = (NI)(((*node).kindU.S6.fields ? (*node).kindU.S6.fields->Sup.len : 0) - ((NI) 1));
				res_293410 = ((NI) 0);
				{
					while (1) {
						NI LOC19;
						NimStringDesc* LOC20;
						NI LOC21;
						if (!(res_293410 <= HEX3Atmp_293407)) goto LA14;
						i_293369 = res_293410;
						{
							if (!(((NI) 0) < i_293369)) goto LA17;
							(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4902));
							nl_293284(result, ml);
						}
						LA17: ;
						LOC19 = 0;
						LOC19 = newindent_293272(currindent, indent, ml);
						indent_293261(result, LOC19);
						LOC20 = 0;
						LOC20 = escapejson_293295((*node).kindU.S6.fields->data[i_293369].Field0);
						(*result) = resizeString((*result), LOC20->Sup.len + 0);
appendString((*result), LOC20);
						(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4903));
						LOC21 = 0;
						LOC21 = newindent_293272(currindent, indent, ml);
						topretty_293332(result, (*node).kindU.S6.fields->data[i_293369].Field1, indent, ml, NIM_FALSE, LOC21);
						res_293410 += ((NI) 1);
					} LA14: ;
				}
			}
			nl_293284(result, ml);
			indent_293261(result, currindent);
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP4904));
		}
		goto LA8;
		LA10: ;
		{
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4905));
		}
		LA8: ;
	}
	break;
	case ((NU8) 4):
	{
		NimStringDesc* LOC28;
		{
			if (!lstarr) goto LA26;
			indent_293261(result, currindent);
		}
		LA26: ;
		LOC28 = 0;
		LOC28 = escapejson_293295((*node).kindU.S1.str);
		(*result) = resizeString((*result), LOC28->Sup.len + 0);
appendString((*result), LOC28);
	}
	break;
	case ((NU8) 2):
	{
		NimStringDesc* LOC34;
		{
			if (!lstarr) goto LA32;
			indent_293261(result, currindent);
		}
		LA32: ;
		LOC34 = 0;
		LOC34 = nimInt64ToStr((*node).kindU.S2.num);
		(*result) = resizeString((*result), LOC34->Sup.len + 0);
appendString((*result), LOC34);
	}
	break;
	case ((NU8) 3):
	{
		NimStringDesc* LOC40;
		{
			if (!lstarr) goto LA38;
			indent_293261(result, currindent);
		}
		LA38: ;
		LOC40 = 0;
		LOC40 = nimFloatToStr((*node).kindU.S3.fnum);
		(*result) = resizeString((*result), LOC40->Sup.len + 0);
appendString((*result), LOC40);
	}
	break;
	case ((NU8) 1):
	{
		NimStringDesc* LOC46;
		{
			if (!lstarr) goto LA44;
			indent_293261(result, currindent);
		}
		LA44: ;
		LOC46 = 0;
		LOC46 = nimBoolToStr((*node).kindU.S4.bval);
		(*result) = resizeString((*result), LOC46->Sup.len + 0);
appendString((*result), LOC46);
	}
	break;
	case ((NU8) 6):
	{
		{
			if (!lstarr) goto LA50;
			indent_293261(result, currindent);
		}
		LA50: ;
		{
			if (!!((((*node).kindU.S7.elems ? (*node).kindU.S7.elems->Sup.len : 0) == ((NI) 0)))) goto LA54;
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP4906));
			nl_293284(result, ml);
			{
				NI i_293404;
				NI HEX3Atmp_293415;
				NI res_293418;
				i_293404 = 0;
				HEX3Atmp_293415 = 0;
				HEX3Atmp_293415 = (NI)(((*node).kindU.S7.elems ? (*node).kindU.S7.elems->Sup.len : 0) - ((NI) 1));
				res_293418 = ((NI) 0);
				{
					while (1) {
						NI LOC63;
						if (!(res_293418 <= HEX3Atmp_293415)) goto LA58;
						i_293404 = res_293418;
						{
							if (!(((NI) 0) < i_293404)) goto LA61;
							(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4902));
							nl_293284(result, ml);
						}
						LA61: ;
						LOC63 = 0;
						LOC63 = newindent_293272(currindent, indent, ml);
						topretty_293332(result, (*node).kindU.S7.elems->data[i_293404], indent, ml, NIM_TRUE, LOC63);
						res_293418 += ((NI) 1);
					} LA58: ;
				}
			}
			nl_293284(result, ml);
			indent_293261(result, currindent);
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP4907));
		}
		goto LA52;
		LA54: ;
		{
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4908));
		}
		LA52: ;
	}
	break;
	case ((NU8) 0):
	{
		{
			if (!lstarr) goto LA68;
			indent_293261(result, currindent);
		}
		LA68: ;
		(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TMP2937));
	}
	break;
	}
}

N_NIMCALL(NimStringDesc*, pretty_293446)(Jsonnodeobj289726* node, NI indent) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2931));
	topretty_293332((&result), node, indent, NIM_TRUE, NIM_FALSE, ((NI) 0));
	return result;
}

N_NIMCALL(NimStringDesc*, HEX24_293458)(Jsonnodeobj289726* node) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2931));
	topretty_293332((&result), node, ((NI) 0), NIM_FALSE, NIM_FALSE, ((NI) 0));
	return result;
}
NIM_EXTERNC N_NOINLINE(void, stdlib_jsonInit)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_jsonDatInit)(void) {
static TNimNode* TMP2915[6];
static TNimNode* TMP2916[14];
NI TMP2918;
static char* NIM_CONST TMP2917[14] = {
"tkError", 
"tkEof", 
"tkString", 
"tkInt", 
"tkFloat", 
"tkTrue", 
"tkFalse", 
"tkNull", 
"tkCurlyLe", 
"tkCurlyRi", 
"tkBracketLe", 
"tkBracketRi", 
"tkColon", 
"tkComma"};
static TNimNode* TMP2919[12];
NI TMP2921;
static char* NIM_CONST TMP2920[12] = {
"jsonError", 
"jsonEof", 
"jsonString", 
"jsonInt", 
"jsonFloat", 
"jsonTrue", 
"jsonFalse", 
"jsonNull", 
"jsonObjectStart", 
"jsonObjectEnd", 
"jsonArrayStart", 
"jsonArrayEnd"};
static TNimNode* TMP2922[11];
NI TMP2924;
static char* NIM_CONST TMP2923[11] = {
"errNone", 
"errInvalidToken", 
"errStringExpected", 
"errColonExpected", 
"errCommaExpected", 
"errBracketRiExpected", 
"errCurlyRiExpected", 
"errQuoteExpected", 
"errEOC_Expected", 
"errEofExpected", 
"errExprExpected"};
static TNimNode* TMP2925[8];
NI TMP2927;
static char* NIM_CONST TMP2926[8] = {
"stateEof", 
"stateStart", 
"stateObject", 
"stateArray", 
"stateExpectArrayComma", 
"stateExpectObjectComma", 
"stateExpectColon", 
"stateExpectValue"};
static TNimNode* TMP4889[7];
NI TMP4891;
static char* NIM_CONST TMP4890[7] = {
"JNull", 
"JBool", 
"JInt", 
"JFloat", 
"JString", 
"JObject", 
"JArray"};
static TNimNode* TMP4892[2];
static TNimNode TMP882[76];
NTI288013.size = sizeof(Jsonparser288013);
NTI288013.kind = 17;
NTI288013.base = (&NTI246024);
TMP2915[0] = &TMP882[1];
TMP882[1].kind = 1;
TMP882[1].offset = offsetof(Jsonparser288013, a);
TMP882[1].typ = (&NTI149);
TMP882[1].name = "a";
TMP2915[1] = &TMP882[2];
NTI288007.size = sizeof(NU8);
NTI288007.kind = 14;
NTI288007.base = 0;
NTI288007.flags = 3;
for (TMP2918 = 0; TMP2918 < 14; TMP2918++) {
TMP882[TMP2918+3].kind = 1;
TMP882[TMP2918+3].offset = TMP2918;
TMP882[TMP2918+3].name = TMP2917[TMP2918];
TMP2916[TMP2918] = &TMP882[TMP2918+3];
}
TMP882[17].len = 14; TMP882[17].kind = 2; TMP882[17].sons = &TMP2916[0];
NTI288007.node = &TMP882[17];
TMP882[2].kind = 1;
TMP882[2].offset = offsetof(Jsonparser288013, tok);
TMP882[2].typ = (&NTI288007);
TMP882[2].name = "tok";
TMP2915[2] = &TMP882[18];
NTI288005.size = sizeof(NU8);
NTI288005.kind = 14;
NTI288005.base = 0;
NTI288005.flags = 3;
for (TMP2921 = 0; TMP2921 < 12; TMP2921++) {
TMP882[TMP2921+19].kind = 1;
TMP882[TMP2921+19].offset = TMP2921;
TMP882[TMP2921+19].name = TMP2920[TMP2921];
TMP2919[TMP2921] = &TMP882[TMP2921+19];
}
TMP882[31].len = 12; TMP882[31].kind = 2; TMP882[31].sons = &TMP2919[0];
NTI288005.node = &TMP882[31];
TMP882[18].kind = 1;
TMP882[18].offset = offsetof(Jsonparser288013, kind);
TMP882[18].typ = (&NTI288005);
TMP882[18].name = "kind";
TMP2915[3] = &TMP882[32];
NTI288009.size = sizeof(NU8);
NTI288009.kind = 14;
NTI288009.base = 0;
NTI288009.flags = 3;
for (TMP2924 = 0; TMP2924 < 11; TMP2924++) {
TMP882[TMP2924+33].kind = 1;
TMP882[TMP2924+33].offset = TMP2924;
TMP882[TMP2924+33].name = TMP2923[TMP2924];
TMP2922[TMP2924] = &TMP882[TMP2924+33];
}
TMP882[44].len = 11; TMP882[44].kind = 2; TMP882[44].sons = &TMP2922[0];
NTI288009.node = &TMP882[44];
TMP882[32].kind = 1;
TMP882[32].offset = offsetof(Jsonparser288013, err);
TMP882[32].typ = (&NTI288009);
TMP882[32].name = "err";
TMP2915[4] = &TMP882[45];
NTI288011.size = sizeof(NU8);
NTI288011.kind = 14;
NTI288011.base = 0;
NTI288011.flags = 3;
for (TMP2927 = 0; TMP2927 < 8; TMP2927++) {
TMP882[TMP2927+46].kind = 1;
TMP882[TMP2927+46].offset = TMP2927;
TMP882[TMP2927+46].name = TMP2926[TMP2927];
TMP2925[TMP2927] = &TMP882[TMP2927+46];
}
TMP882[54].len = 8; TMP882[54].kind = 2; TMP882[54].sons = &TMP2925[0];
NTI288011.node = &TMP882[54];
NTI288063.size = sizeof(TY288063*);
NTI288063.kind = 24;
NTI288063.base = (&NTI288011);
NTI288063.flags = 2;
NTI288063.marker = TMP2928;
TMP882[45].kind = 1;
TMP882[45].offset = offsetof(Jsonparser288013, state);
TMP882[45].typ = (&NTI288063);
TMP882[45].name = "state";
TMP2915[5] = &TMP882[55];
TMP882[55].kind = 1;
TMP882[55].offset = offsetof(Jsonparser288013, filename);
TMP882[55].typ = (&NTI149);
TMP882[55].name = "filename";
TMP882[0].len = 6; TMP882[0].kind = 2; TMP882[0].sons = &TMP2915[0];
NTI288013.node = &TMP882[0];
NTI289728.size = sizeof(Jsonparsingerror289728);
NTI289728.kind = 17;
NTI289728.base = (&NTI3449);
TMP882[56].len = 0; TMP882[56].kind = 2;
NTI289728.node = &TMP882[56];
NTI289765.size = sizeof(Jsonparsingerror289728*);
NTI289765.kind = 22;
NTI289765.base = (&NTI289728);
NTI289765.marker = TMP2940;
NTI289726.size = sizeof(Jsonnodeobj289726);
NTI289726.kind = 18;
NTI289726.base = 0;
NTI289726.flags = 2;
NTI289722.size = sizeof(NU8);
NTI289722.kind = 14;
NTI289722.base = 0;
NTI289722.flags = 3;
for (TMP4891 = 0; TMP4891 < 7; TMP4891++) {
TMP882[TMP4891+58].kind = 1;
TMP882[TMP4891+58].offset = TMP4891;
TMP882[TMP4891+58].name = TMP4890[TMP4891];
TMP4889[TMP4891] = &TMP882[TMP4891+58];
}
TMP882[65].len = 7; TMP882[65].kind = 2; TMP882[65].sons = &TMP4889[0];
NTI289722.node = &TMP882[65];
TMP882[57].kind = 3;
TMP882[57].offset = offsetof(Jsonnodeobj289726, kind);
TMP882[57].typ = (&NTI289722);
TMP882[57].name = "kind";
TMP882[57].sons = &NimDT_289726_kind[0];
TMP882[57].len = 7;
TMP882[66].kind = 1;
TMP882[66].offset = offsetof(Jsonnodeobj289726, kindU.S1.str);
TMP882[66].typ = (&NTI149);
TMP882[66].name = "str";
NimDT_289726_kind[4] = &TMP882[66];
TMP882[67].kind = 1;
TMP882[67].offset = offsetof(Jsonnodeobj289726, kindU.S2.num);
TMP882[67].typ = (&NTI5710);
TMP882[67].name = "num";
NimDT_289726_kind[2] = &TMP882[67];
TMP882[68].kind = 1;
TMP882[68].offset = offsetof(Jsonnodeobj289726, kindU.S3.fnum);
TMP882[68].typ = (&NTI128);
TMP882[68].name = "fnum";
NimDT_289726_kind[3] = &TMP882[68];
TMP882[69].kind = 1;
TMP882[69].offset = offsetof(Jsonnodeobj289726, kindU.S4.bval);
TMP882[69].typ = (&NTI138);
TMP882[69].name = "bval";
NimDT_289726_kind[1] = &TMP882[69];
TMP882[70].len = 0; TMP882[70].kind = 2;
NimDT_289726_kind[0] = &TMP882[70];
NTI290209.size = sizeof(TY290209);
NTI290209.kind = 18;
NTI290209.base = 0;
NTI290209.flags = 2;
TMP4892[0] = &TMP882[73];
TMP882[73].kind = 1;
TMP882[73].offset = offsetof(TY290209, Field0);
TMP882[73].typ = (&NTI149);
TMP882[73].name = "Field0";
TMP4892[1] = &TMP882[74];
TMP882[74].kind = 1;
TMP882[74].offset = offsetof(TY290209, Field1);
TMP882[74].typ = (&NTI289724);
TMP882[74].name = "Field1";
TMP882[72].len = 2; TMP882[72].kind = 2; TMP882[72].sons = &TMP4892[0];
NTI290209.node = &TMP882[72];
NTI289741.size = sizeof(TY289741*);
NTI289741.kind = 24;
NTI289741.base = (&NTI290209);
NTI289741.flags = 2;
NTI289741.marker = TMP4893;
TMP882[71].kind = 1;
TMP882[71].offset = offsetof(Jsonnodeobj289726, kindU.S6.fields);
TMP882[71].typ = (&NTI289741);
TMP882[71].name = "fields";
NimDT_289726_kind[5] = &TMP882[71];
NTI289746.size = sizeof(TY289746*);
NTI289746.kind = 24;
NTI289746.base = (&NTI289724);
NTI289746.flags = 2;
NTI289746.marker = TMP4894;
TMP882[75].kind = 1;
TMP882[75].offset = offsetof(Jsonnodeobj289726, kindU.S7.elems);
TMP882[75].typ = (&NTI289746);
TMP882[75].name = "elems";
NimDT_289726_kind[6] = &TMP882[75];
NTI289726.node = &TMP882[57];
NTI289724.size = sizeof(Jsonnodeobj289726*);
NTI289724.kind = 22;
NTI289724.base = (&NTI289726);
NTI289724.flags = 2;
NTI289724.marker = TMP4895;
}

