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

#include <string.h>
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Jsonparser289013 Jsonparser289013;
typedef struct Baselexer247024 Baselexer247024;
typedef struct TNimObject TNimObject;
typedef struct Streamobj138027 Streamobj138027;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TY289063 TY289063;
typedef struct Jsonparsingerror290728 Jsonparsingerror290728;
typedef struct Valueerror3449 Valueerror3449;
typedef struct Exception Exception;
typedef struct Tcell46346 Tcell46346;
typedef struct Tcellseq46362 Tcellseq46362;
typedef struct Tgcheap48216 Tgcheap48216;
typedef struct Tcellset46358 Tcellset46358;
typedef struct Tpagedesc46354 Tpagedesc46354;
typedef struct Tmemregion28210 Tmemregion28210;
typedef struct Tsmallchunk27440 Tsmallchunk27440;
typedef struct Tllchunk28204 Tllchunk28204;
typedef struct Tbigchunk27442 Tbigchunk27442;
typedef struct Tintset27417 Tintset27417;
typedef struct Ttrunk27413 Ttrunk27413;
typedef struct Tavlnode28208 Tavlnode28208;
typedef struct Tgcstat48214 Tgcstat48214;
typedef struct Jsonnodeobj290726 Jsonnodeobj290726;
typedef struct TY291209 TY291209;
typedef struct TY290741 TY290741;
typedef struct TY290746 TY290746;
typedef struct Tbasechunk27438 Tbasechunk27438;
typedef struct Tfreecell27430 Tfreecell27430;
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  Baselexer247024  {
  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  Jsonparser289013  {
  Baselexer247024 Sup;
NimStringDesc* a;
NU8 tok;
NU8 kind;
NU8 err;
TY289063* state;
NimStringDesc* filename;
};
typedef NU8 TY179407[32];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror3449  {
  Exception Sup;
};
struct  Jsonparsingerror290728  {
  Valueerror3449 Sup;
};
typedef NimStringDesc* TY165825[4];
struct  Tcell46346  {
NI refcount;
TNimType* typ;
};
struct  Tcellseq46362  {
NI len;
NI cap;
Tcell46346** d;
};
struct  Tcellset46358  {
NI counter;
NI max;
Tpagedesc46354* head;
Tpagedesc46354** data;
};
typedef Tsmallchunk27440* TY28222[512];
typedef Ttrunk27413* Ttrunkbuckets27415[256];
struct  Tintset27417  {
Ttrunkbuckets27415 data;
};
struct  Tmemregion28210  {
NI minlargeobj;
NI maxlargeobj;
TY28222 freesmallchunks;
Tllchunk28204* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27442* freechunkslist;
Tintset27417 chunkstarts;
Tavlnode28208* root;
Tavlnode28208* deleted;
Tavlnode28208* last;
Tavlnode28208* freeavlnodes;
};
struct  Tgcstat48214  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48216  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46362 zct;
Tcellseq46362 decstack;
Tcellset46358 cycleroots;
Tcellseq46362 tempstack;
NI recgclock;
Tmemregion28210 region;
Tgcstat48214 stat;
};
struct TY291209 {
NimStringDesc* Field0;
Jsonnodeobj290726* Field1;
};
struct  Jsonnodeobj290726  {
NU8 kind;
union{
struct {NimStringDesc* str;
} S1;
struct {NI64 num;
} S2;
struct {NF fnum;
} S3;
struct {NIM_BOOL bval;
} S4;
struct {TY290741* fields;
} S6;
struct {TY290746* 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 TY27420[8];
struct  Tpagedesc46354  {
Tpagedesc46354* next;
NI key;
TY27420 bits;
};
struct  Tbasechunk27438  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27440  {
  Tbasechunk27438 Sup;
Tsmallchunk27440* next;
Tsmallchunk27440* prev;
Tfreecell27430* freelist;
NI free;
NI acc;
NF data;
};
struct  Tllchunk28204  {
NI size;
NI acc;
Tllchunk28204* next;
};
struct  Tbigchunk27442  {
  Tbasechunk27438 Sup;
Tbigchunk27442* next;
Tbigchunk27442* prev;
NI align;
NF data;
};
struct  Ttrunk27413  {
Ttrunk27413* next;
NI key;
TY27420 bits;
};
typedef Tavlnode28208* TY28214[2];
struct  Tavlnode28208  {
TY28214 link;
NI key;
NI upperbound;
NI level;
};
struct  Tfreecell27430  {
Tfreecell27430* next;
NI zerofield;
};
struct TY289063 {
  TGenericSeq Sup;
  NU8 data[SEQ_DECL_SIZE];
};
struct TY290741 {
  TGenericSeq Sup;
  TY291209 data[SEQ_DECL_SIZE];
};
struct TY290746 {
  TGenericSeq Sup;
  Jsonnodeobj290726* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, TMP2933)(void* p, NI op);
N_NIMCALL(void, open_247040)(Baselexer247024* 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_81204, TNimType* mt);
N_NIMCALL(NU8, gettok_290343)(Jsonparser289013* my);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(void, skip_290042)(Jsonparser289013* my);
N_NIMCALL(NI, handlecr_247071)(Baselexer247024* L, NI pos);
N_NIMCALL(NI, handlelf_247079)(Baselexer247024* L, NI pos);
N_NIMCALL(void, parsenumber_290138)(Jsonparser289013* 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, TY179407 chars);
N_NIMCALL(NU8, parsestring_289889)(Jsonparser289013* my);
N_NIMCALL(NIM_BOOL, handlehexchar_289822)(NIM_CHAR c, NI* x);
N_NIMCALL(NimStringDesc*, nuctoUTF8)(NI c);
N_NIMCALL(void, parsename_290295)(Jsonparser289013* my);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
static N_INLINE(NU8, pop_290528)(TY289063** s);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, next_290418)(Jsonparser289013* my);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2945)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(NimStringDesc*, errormsgexpected_289809)(Jsonparser289013* my, NimStringDesc* e);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
static N_INLINE(NI, getline_289627)(Jsonparser289013* my);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
static N_INLINE(NI, getcolumn_289617)(Jsonparser289013* my);
N_NIMCALL(NI, getcolnumber_247064)(Baselexer247024* L, NI pos);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(Tcell46346*, usrtocell_49846)(void* usr);
static N_INLINE(void, rtladdzct_51404)(Tcell46346* c);
N_NOINLINE(void, addzct_49817)(Tcellseq46362* s, Tcell46346* 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, TMP4898)(void* p, NI op);
N_NIMCALL(void, TMP4899)(void* p, NI op);
N_NIMCALL(void, TMP4900)(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_291713)(TY290746* x, TY290746* y);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_291817)(TY290741* x, TY290741* y);
N_NIMCALL(void, topretty_294332)(NimStringDesc** result, Jsonnodeobj290726* node, NI indent, NIM_BOOL ml, NIM_BOOL lstarr, NI currindent);
N_NIMCALL(void, nl_294284)(NimStringDesc** s, NIM_BOOL ml);
N_NIMCALL(void, indent_294261)(NimStringDesc** s, NI i);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_NIMCALL(NI, newindent_294272)(NI curr, NI indent, NIM_BOOL ml);
N_NIMCALL(NimStringDesc*, escapejson_294295)(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];
} CNSTSEQ2936 = {{1, 1}, {((NU8) 1)}};
NIM_CONST TY289063* TMP2934 = ((TY289063*)&CNSTSEQ2936);
STRING_LITERAL(TMP2936, "", 0);
STRING_LITERAL(TMP2940, "0.", 2);
static NIM_CONST TY179407 TMP2941 = {
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(TMP2942, "null", 4);
STRING_LITERAL(TMP2943, "true", 4);
STRING_LITERAL(TMP2944, "false", 5);
STRING_LITERAL(TMP2946, "$1($2, $3) Error: $4", 20);
STRING_LITERAL(TMP2947, " expected", 9);
STRING_LITERAL(TMP2974, "\"", 1);
STRING_LITERAL(TMP2975, "\\\"", 2);
STRING_LITERAL(TMP2976, "\\\\", 2);
STRING_LITERAL(TMP2977, "\\u", 2);
TNimNode* NimDT_290726_kind[8];
STRING_LITERAL(TMP4905, "\012", 1);
STRING_LITERAL(TMP4906, "{", 1);
STRING_LITERAL(TMP4907, ", ", 2);
STRING_LITERAL(TMP4908, ": ", 2);
STRING_LITERAL(TMP4909, "}", 1);
STRING_LITERAL(TMP4910, "{}", 2);
STRING_LITERAL(TMP4911, "[", 1);
STRING_LITERAL(TMP4912, "]", 1);
STRING_LITERAL(TMP4913, "[]", 2);
extern TNimType NTI247024; /* BaseLexer */
TNimType NTI289013; /* JsonParser */
extern TNimType NTI149; /* string */
TNimType NTI289007; /* TTokKind */
TNimType NTI289005; /* JsonEventKind */
TNimType NTI289009; /* JsonError */
TNimType NTI289011; /* ParserState */
TNimType NTI289063; /* seq[ParserState] */
extern TNimType NTI3449; /* ValueError */
TNimType NTI290728; /* JsonParsingError */
TNimType NTI290765; /* ref JsonParsingError */
extern Tgcheap48216 gch_48244;
TNimType NTI290726; /* JsonNodeObj */
TNimType NTI290722; /* JsonNodeKind */
extern TNimType NTI5710; /* BiggestInt */
extern TNimType NTI128; /* float */
extern TNimType NTI138; /* bool */
TNimType NTI291209; /* tuple[key: string, val: JsonNode] */
TNimType NTI290741; /* seq[tuple[key: string, val: JsonNode]] */
TNimType NTI290746; /* seq[JsonNode] */
TNimType NTI290724; /* JsonNode */
N_NIMCALL(void, TMP2933)(void* p, NI op) {
	TY289063* a;
	NI LOC1;
	a = (TY289063*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(void, open_289090)(Jsonparser289013* my, Streamobj138027* input, NimStringDesc* filename) {
	Baselexer247024* LOC1;
	LOC1 = 0;
	LOC1 = &my->Sup;
	open_247040(LOC1, input, ((NI) 8192));
	unsureAsgnRef((void**) (&(*my).filename), copyString(filename));
	genericSeqAssign((&(*my).state), TMP2934, (&NTI289063));
	(*my).kind = ((NU8) 0);
	unsureAsgnRef((void**) (&(*my).a), copyString(((NimStringDesc*) &TMP2936)));
}

N_NIMCALL(void, skip_290042)(Jsonparser289013* 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:
							{
								Baselexer247024* LOC12;
								LOC12 = 0;
								LOC12 = &my->Sup;
								pos = handlecr_247071(LOC12, pos);
								buf = (*my).Sup.buf;
								goto LA8;
							}
							break;
							case 10:
							{
								Baselexer247024* LOC14;
								LOC14 = 0;
								LOC14 = &my->Sup;
								pos = handlelf_247079(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:
							{
								Baselexer247024* LOC23;
								LOC23 = 0;
								LOC23 = &my->Sup;
								pos = handlecr_247071(LOC23, pos);
								buf = (*my).Sup.buf;
							}
							break;
							case 10:
							{
								Baselexer247024* LOC25;
								LOC25 = 0;
								LOC25 = &my->Sup;
								pos = handlelf_247079(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:
			{
				Baselexer247024* LOC35;
				LOC35 = 0;
				LOC35 = &my->Sup;
				pos = handlecr_247071(LOC35, pos);
				buf = (*my).Sup.buf;
			}
			break;
			case 10:
			{
				Baselexer247024* LOC37;
				LOC37 = 0;
				LOC37 = &my->Sup;
				pos = handlelf_247079(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_290138)(Jsonparser289013* 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*) &TMP2940));
		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_289822)(NIM_CHAR c, NI* x) {
	NIM_BOOL result;
	result = 0;
	result = NIM_TRUE;
	switch (((NU8)(c))) {
	case 48 ... 57:
	{
		(*x) = (NI)((NI)((NU64)((*x)) << (NU64)(((NI) 4))) | ((NI) ((NI)(((NI) (((NU8)(c)))) - ((NI) 48)))));
	}
	break;
	case 97 ... 102:
	{
		(*x) = (NI)((NI)((NU64)((*x)) << (NU64)(((NI) 4))) | ((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)(c)))) - ((NI) 97)))) + ((NI) 10)))));
	}
	break;
	case 65 ... 70:
	{
		(*x) = (NI)((NI)((NU64)((*x)) << (NU64)(((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_289889)(Jsonparser289013* 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_289822(buf[pos], (&r));
						if (!LOC15) goto LA16;
						pos += ((NI) 1);
					}
					LA16: ;
					{
						NIM_BOOL LOC20;
						LOC20 = 0;
						LOC20 = handlehexchar_289822(buf[pos], (&r));
						if (!LOC20) goto LA21;
						pos += ((NI) 1);
					}
					LA21: ;
					{
						NIM_BOOL LOC25;
						LOC25 = 0;
						LOC25 = handlehexchar_289822(buf[pos], (&r));
						if (!LOC25) goto LA26;
						pos += ((NI) 1);
					}
					LA26: ;
					{
						NIM_BOOL LOC30;
						LOC30 = 0;
						LOC30 = handlehexchar_289822(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:
			{
				Baselexer247024* LOC36;
				LOC36 = 0;
				LOC36 = &my->Sup;
				pos = handlecr_247071(LOC36, pos);
				buf = (*my).Sup.buf;
				(*my).a = addChar((*my).a, 13);
			}
			break;
			case 10:
			{
				Baselexer247024* LOC38;
				LOC38 = 0;
				LOC38 = &my->Sup;
				pos = handlelf_247079(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_290295)(Jsonparser289013* 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_290343)(Jsonparser289013* my) {
	NU8 result;
	result = 0;
	(*my).a = setLengthStr((*my).a, ((NI) 0));
	skip_290042(my);
	switch (((NU8)((*my).Sup.buf[(*my).Sup.bufpos]))) {
	case 45:
	case 46:
	case 48 ... 57:
	{
		parsenumber_290138(my);
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = contains_99373((*my).a, TMP2941);
			if (!LOC4) goto LA5;
			result = ((NU8) 4);
		}
		goto LA2;
		LA5: ;
		{
			result = ((NU8) 3);
		}
		LA2: ;
	}
	break;
	case 34:
	{
		result = parsestring_289889(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_290295(my);
		if (eqStrings((*my).a, ((NimStringDesc*) &TMP2942))) goto LA17;
		if (eqStrings((*my).a, ((NimStringDesc*) &TMP2943))) goto LA18;
		if (eqStrings((*my).a, ((NimStringDesc*) &TMP2944))) 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_290528)(TY289063** s) {
	NU8 result;
	NI L;
	result = 0;
	L = (NI)(((*s) ? (*s)->Sup.len : 0) - ((NI) 1));
	result = (*s)->data[L];
	(*s) = (TY289063*) setLengthSeq(&((*s))->Sup, sizeof(NU8), ((NI) (L)));
	return result;
}

N_NIMCALL(void, next_290418)(Jsonparser289013* my) {
	NU8 tk;
	NI i;
	tk = gettok_290343(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 = (TY289063*) 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 = (TY289063*) 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 = (TY289063*) 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 = (TY289063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 6);
			(*my).state = (TY289063*) 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 = (TY289063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 6);
			(*my).state = (TY289063*) 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_290528((&(*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 = (TY289063*) 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 = (TY289063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 4);
			(*my).state = (TY289063*) 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 = (TY289063*) incrSeq(&((*my).state)->Sup, sizeof(NU8));
			(*my).state->data[(*my).state->Sup.len-1] = ((NU8) 4);
			(*my).state = (TY289063*) 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_290528((&(*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_290528((&(*my).state));
			next_290418(my);
		}
		break;
		case ((NU8) 11):
		{
			NU8 LOC31;
			NU8 LOC32;
			(*my).kind = ((NU8) 11);
			LOC31 = 0;
			LOC31 = pop_290528((&(*my).state));
			LOC32 = 0;
			LOC32 = pop_290528((&(*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_290528((&(*my).state));
			next_290418(my);
		}
		break;
		case ((NU8) 9):
		{
			NU8 LOC38;
			NU8 LOC39;
			(*my).kind = ((NU8) 9);
			LOC38 = 0;
			LOC38 = pop_290528((&(*my).state));
			LOC39 = 0;
			LOC39 = pop_290528((&(*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_290418(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 = (TY289063*) 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 = (TY289063*) 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, TMP2945)(void* p, NI op) {
	Jsonparsingerror290728* a;
	a = (Jsonparsingerror290728*)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_289627)(Jsonparser289013* my) {
	NI result;
	result = 0;
	result = (*my).Sup.linenumber;
	return result;
}

static N_INLINE(NI, getcolumn_289617)(Jsonparser289013* my) {
	NI result;
	result = 0;
	result = getcolnumber_247064((&(*my).Sup), (*my).Sup.bufpos);
	return result;
}

N_NIMCALL(NimStringDesc*, errormsgexpected_289809)(Jsonparser289013* my, NimStringDesc* e) {
	NimStringDesc* result;
	TY165825 LOC1;
	NI LOC2;
	NI LOC3;
	NimStringDesc* LOC4;
	result = 0;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString((*my).filename);
	LOC2 = 0;
	LOC2 = getline_289627(my);
	LOC1[1] = nimIntToStr(LOC2);
	LOC3 = 0;
	LOC3 = getcolumn_289617(my);
	LOC1[2] = nimIntToStr(LOC3);
	LOC4 = 0;
	LOC4 = rawNewString(e->Sup.len + 9);
appendString(LOC4, e);
appendString(LOC4, ((NimStringDesc*) &TMP2947));
	LOC1[3] = LOC4;
	result = nsuFormatOpenArray(((NimStringDesc*) &TMP2946), LOC1, 4);
	return result;
}

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

static N_INLINE(void, rtladdzct_51404)(Tcell46346* c) {
	addzct_49817((&gch_48244.zct), c);
}

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

N_NOINLINE(void, raiseparseerr_290758)(Jsonparser289013* p, NimStringDesc* msg) {
	Jsonparsingerror290728* e_290764;
	e_290764 = 0;
	e_290764 = (Jsonparsingerror290728*) newObj((&NTI290765), sizeof(Jsonparsingerror290728));
	(*e_290764).Sup.Sup.Sup.m_type = (&NTI290728);
	asgnRefNoCycle((void**) (&(*e_290764).Sup.Sup.message), errormsgexpected_289809(p, msg));
	raiseException((Exception*)e_290764, "JsonParsingError");
}

N_NIMCALL(NimStringDesc*, escapejson_294295)(NimStringDesc* s) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(((NI) ((NI)((s ? s->Sup.len : 0) + (NI)((NU64)((s ? s->Sup.len : 0)) >> (NU64)(((NI) 3)))))));
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP2974));
	{
		NI x_294299;
		NI i_294307;
		NI result_294309;
		x_294299 = 0;
		i_294307 = ((NI) 0);
		result_294309 = 0;
		{
			while (1) {
				NI r;
				if (!(i_294307 < (s ? s->Sup.len : 0))) goto LA3;
				{
					if (!((NU64)(((NI) (((NU8)(s->data[i_294307]))))) <= (NU64)(((NI) 127)))) goto LA6;
					result_294309 = ((NI) (((NU8)(s->data[i_294307]))));
					i_294307 += ((NI) 1);
				}
				goto LA4;
				LA6: ;
				{
					if (!((NI)((NU64)(((NI) (((NU8)(s->data[i_294307]))))) >> (NU64)(((NI) 5))) == ((NI) 6))) goto LA9;
					result_294309 = (NI)((NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[i_294307])))) & ((NI) 31))))) << (NU64)(((NI) 6))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 1))])))) & ((NI) 63)))));
					i_294307 += ((NI) 2);
				}
				goto LA4;
				LA9: ;
				{
					if (!((NI)((NU64)(((NI) (((NU8)(s->data[i_294307]))))) >> (NU64)(((NI) 4))) == ((NI) 14))) goto LA12;
					result_294309 = (NI)((NI)((NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[i_294307])))) & ((NI) 15))))) << (NU64)(((NI) 12))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 1))])))) & ((NI) 63))))) << (NU64)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 2))])))) & ((NI) 63)))));
					i_294307 += ((NI) 3);
				}
				goto LA4;
				LA12: ;
				{
					if (!((NI)((NU64)(((NI) (((NU8)(s->data[i_294307]))))) >> (NU64)(((NI) 3))) == ((NI) 30))) goto LA15;
					result_294309 = (NI)((NI)((NI)((NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[i_294307])))) & ((NI) 7))))) << (NU64)(((NI) 18))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 1))])))) & ((NI) 63))))) << (NU64)(((NI) 12)))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 2))])))) & ((NI) 63))))) << (NU64)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 3))])))) & ((NI) 63)))));
					i_294307 += ((NI) 4);
				}
				goto LA4;
				LA15: ;
				{
					if (!((NI)((NU64)(((NI) (((NU8)(s->data[i_294307]))))) >> (NU64)(((NI) 2))) == ((NI) 62))) goto LA18;
					result_294309 = (NI)((NI)((NI)((NI)((NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[i_294307])))) & ((NI) 3))))) << (NU64)(((NI) 24))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 1))])))) & ((NI) 63))))) << (NU64)(((NI) 18)))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 2))])))) & ((NI) 63))))) << (NU64)(((NI) 12)))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 3))])))) & ((NI) 63))))) << (NU64)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 4))])))) & ((NI) 63)))));
					i_294307 += ((NI) 5);
				}
				goto LA4;
				LA18: ;
				{
					if (!((NI)((NU64)(((NI) (((NU8)(s->data[i_294307]))))) >> (NU64)(((NI) 1))) == ((NI) 126))) goto LA21;
					result_294309 = (NI)((NI)((NI)((NI)((NI)((NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[i_294307])))) & ((NI) 1))))) << (NU64)(((NI) 30))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 1))])))) & ((NI) 63))))) << (NU64)(((NI) 24)))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 2))])))) & ((NI) 63))))) << (NU64)(((NI) 18)))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 3))])))) & ((NI) 63))))) << (NU64)(((NI) 12)))) | (NI)((NU64)(((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 4))])))) & ((NI) 63))))) << (NU64)(((NI) 6)))) | ((NI) ((NI)(((NI) (((NU8)(s->data[(NI)(i_294307 + ((NI) 5))])))) & ((NI) 63)))));
					i_294307 += ((NI) 6);
				}
				goto LA4;
				LA21: ;
				{
					result_294309 = ((NI) (((NU8)(s->data[i_294307]))));
					i_294307 += ((NI) 1);
				}
				LA4: ;
				x_294299 = result_294309;
				r = x_294299;
				{
					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*) &TMP2975));
					}
					break;
					case 92:
					{
						result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2976));
					}
					break;
					default:
					{
						result = addChar(result, c);
					}
					break;
					}
				}
				goto LA24;
				LA28: ;
				{
					NimStringDesc* LOC34;
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2977));
					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*) &TMP2974));
	return result;
}
N_NIMCALL(void, TMP4898)(void* p, NI op) {
	TY290741* a;
	NI LOC1;
	a = (TY290741*)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, TMP4899)(void* p, NI op) {
	TY290746* a;
	NI LOC1;
	a = (TY290746*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1], op);
	}
}
N_NIMCALL(void, TMP4900)(void* p, NI op) {
	Jsonnodeobj290726* a;
	a = (Jsonnodeobj290726*)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) {
	Tcell46346* c;
	c = usrtocell_49846(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	LA3: ;
}

N_NIMCALL(Jsonnodeobj290726*, HEX25_291206)(TY291209* keyvals, NI keyvalsLen0) {
	Jsonnodeobj290726* result;
	result = 0;
	result = (Jsonnodeobj290726*) newObj((&NTI290724), sizeof(Jsonnodeobj290726));
	(*result).kind = ((NU8) 5);
	if ((*result).kindU.S6.fields) nimGCunrefNoCycle((*result).kindU.S6.fields);
	(*result).kindU.S6.fields = (TY290741*) newSeqRC1((&NTI290741), ((NI) (keyvalsLen0)));
	{
		NI i_291281;
		TY291209 p_291282;
		NI i_291287;
		i_291281 = 0;
		memset((void*)(&p_291282), 0, sizeof(p_291282));
		i_291287 = ((NI) 0);
		{
			while (1) {
				NimStringDesc* LOC4;
				if (!(i_291287 < keyvalsLen0)) goto LA3;
				i_291281 = i_291287;
				p_291282.Field0 = keyvals[i_291287].Field0;
				p_291282.Field1 = keyvals[i_291287].Field1;
				LOC4 = 0;
				LOC4 = (*result).kindU.S6.fields->data[i_291281].Field0; (*result).kindU.S6.fields->data[i_291281].Field0 = copyStringRC1(p_291282.Field0);
				if (LOC4) nimGCunrefNoCycle(LOC4);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.fields->data[i_291281].Field1), p_291282.Field1);
				i_291287 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(Jsonnodeobj290726*, HEX25_291130)(NimStringDesc* s) {
	Jsonnodeobj290726* result;
	NimStringDesc* LOC1;
	result = 0;
	result = (Jsonnodeobj290726*) newObj((&NTI290724), sizeof(Jsonnodeobj290726));
	(*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_293619)(Jsonnodeobj290726* obj, NimStringDesc* key, Jsonnodeobj290726* val) {
	TY291209 LOC8;
	NimStringDesc* LOC9;
{	{
		NI i_293820;
		NI HEX3Atmp_293836;
		NI res_293839;
		i_293820 = 0;
		HEX3Atmp_293836 = 0;
		HEX3Atmp_293836 = (NI)(((*obj).kindU.S6.fields ? (*obj).kindU.S6.fields->Sup.len : 0) - ((NI) 1));
		res_293839 = ((NI) 0);
		{
			while (1) {
				if (!(res_293839 <= HEX3Atmp_293836)) goto LA3;
				i_293820 = res_293839;
				{
					if (!eqStrings((*obj).kindU.S6.fields->data[i_293820].Field0, key)) goto LA6;
					asgnRefNoCycle((void**) (&(*obj).kindU.S6.fields->data[i_293820].Field1), val);
					goto BeforeRet;
				}
				LA6: ;
				res_293839 += ((NI) 1);
			} LA3: ;
		}
	}
	memset((void*)(&LOC8), 0, sizeof(LOC8));
	LOC8.Field0 = copyString(key);
	LOC8.Field1 = val;
	(*obj).kindU.S6.fields = (TY290741*) incrSeq(&((*obj).kindU.S6.fields)->Sup, sizeof(TY291209));
	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_291661)(Jsonnodeobj290726* a, Jsonnodeobj290726* 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_291713((*a).kindU.S7.elems, (*b).kindU.S7.elems);
		}
		break;
		case ((NU8) 5):
		{
			result = HEX3DHEX3D_291817((*a).kindU.S6.fields, (*b).kindU.S6.fields);
		}
		break;
		}
		goto BeforeRet;
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Jsonnodeobj290726*, newjarray_290927)(void) {
	Jsonnodeobj290726* result;
	result = 0;
	result = (Jsonnodeobj290726*) newObj((&NTI290724), sizeof(Jsonnodeobj290726));
	(*result).kind = ((NU8) 6);
	if ((*result).kindU.S7.elems) nimGCunrefNoCycle((*result).kindU.S7.elems);
	(*result).kindU.S7.elems = (TY290746*) newSeqRC1((&NTI290746), 0);
	return result;
}

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

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

N_NIMCALL(void, indent_294261)(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_294272)(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_294332)(NimStringDesc** result, Jsonnodeobj290726* 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_294284(result, ml);
		}
		LA6: ;
		indent_294261(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*) &TMP4906));
			nl_294284(result, ml);
			{
				NI i_294369;
				NI HEX3Atmp_294407;
				NI res_294410;
				i_294369 = 0;
				HEX3Atmp_294407 = 0;
				HEX3Atmp_294407 = (NI)(((*node).kindU.S6.fields ? (*node).kindU.S6.fields->Sup.len : 0) - ((NI) 1));
				res_294410 = ((NI) 0);
				{
					while (1) {
						NI LOC19;
						NimStringDesc* LOC20;
						NI LOC21;
						if (!(res_294410 <= HEX3Atmp_294407)) goto LA14;
						i_294369 = res_294410;
						{
							if (!(((NI) 0) < i_294369)) goto LA17;
							(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4907));
							nl_294284(result, ml);
						}
						LA17: ;
						LOC19 = 0;
						LOC19 = newindent_294272(currindent, indent, ml);
						indent_294261(result, LOC19);
						LOC20 = 0;
						LOC20 = escapejson_294295((*node).kindU.S6.fields->data[i_294369].Field0);
						(*result) = resizeString((*result), LOC20->Sup.len + 0);
appendString((*result), LOC20);
						(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4908));
						LOC21 = 0;
						LOC21 = newindent_294272(currindent, indent, ml);
						topretty_294332(result, (*node).kindU.S6.fields->data[i_294369].Field1, indent, ml, NIM_FALSE, LOC21);
						res_294410 += ((NI) 1);
					} LA14: ;
				}
			}
			nl_294284(result, ml);
			indent_294261(result, currindent);
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP4909));
		}
		goto LA8;
		LA10: ;
		{
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4910));
		}
		LA8: ;
	}
	break;
	case ((NU8) 4):
	{
		NimStringDesc* LOC28;
		{
			if (!lstarr) goto LA26;
			indent_294261(result, currindent);
		}
		LA26: ;
		LOC28 = 0;
		LOC28 = escapejson_294295((*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_294261(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_294261(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_294261(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_294261(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*) &TMP4911));
			nl_294284(result, ml);
			{
				NI i_294404;
				NI HEX3Atmp_294415;
				NI res_294418;
				i_294404 = 0;
				HEX3Atmp_294415 = 0;
				HEX3Atmp_294415 = (NI)(((*node).kindU.S7.elems ? (*node).kindU.S7.elems->Sup.len : 0) - ((NI) 1));
				res_294418 = ((NI) 0);
				{
					while (1) {
						NI LOC63;
						if (!(res_294418 <= HEX3Atmp_294415)) goto LA58;
						i_294404 = res_294418;
						{
							if (!(((NI) 0) < i_294404)) goto LA61;
							(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4907));
							nl_294284(result, ml);
						}
						LA61: ;
						LOC63 = 0;
						LOC63 = newindent_294272(currindent, indent, ml);
						topretty_294332(result, (*node).kindU.S7.elems->data[i_294404], indent, ml, NIM_TRUE, LOC63);
						res_294418 += ((NI) 1);
					} LA58: ;
				}
			}
			nl_294284(result, ml);
			indent_294261(result, currindent);
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP4912));
		}
		goto LA52;
		LA54: ;
		{
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP4913));
		}
		LA52: ;
	}
	break;
	case ((NU8) 0):
	{
		{
			if (!lstarr) goto LA68;
			indent_294261(result, currindent);
		}
		LA68: ;
		(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TMP2942));
	}
	break;
	}
}

N_NIMCALL(NimStringDesc*, pretty_294446)(Jsonnodeobj290726* node, NI indent) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2936));
	topretty_294332((&result), node, indent, NIM_TRUE, NIM_FALSE, ((NI) 0));
	return result;
}

N_NIMCALL(NimStringDesc*, HEX24_294458)(Jsonnodeobj290726* node) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2936));
	topretty_294332((&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* TMP2920[6];
static TNimNode* TMP2921[14];
NI TMP2923;
static char* NIM_CONST TMP2922[14] = {
"tkError", 
"tkEof", 
"tkString", 
"tkInt", 
"tkFloat", 
"tkTrue", 
"tkFalse", 
"tkNull", 
"tkCurlyLe", 
"tkCurlyRi", 
"tkBracketLe", 
"tkBracketRi", 
"tkColon", 
"tkComma"};
static TNimNode* TMP2924[12];
NI TMP2926;
static char* NIM_CONST TMP2925[12] = {
"jsonError", 
"jsonEof", 
"jsonString", 
"jsonInt", 
"jsonFloat", 
"jsonTrue", 
"jsonFalse", 
"jsonNull", 
"jsonObjectStart", 
"jsonObjectEnd", 
"jsonArrayStart", 
"jsonArrayEnd"};
static TNimNode* TMP2927[11];
NI TMP2929;
static char* NIM_CONST TMP2928[11] = {
"errNone", 
"errInvalidToken", 
"errStringExpected", 
"errColonExpected", 
"errCommaExpected", 
"errBracketRiExpected", 
"errCurlyRiExpected", 
"errQuoteExpected", 
"errEOC_Expected", 
"errEofExpected", 
"errExprExpected"};
static TNimNode* TMP2930[8];
NI TMP2932;
static char* NIM_CONST TMP2931[8] = {
"stateEof", 
"stateStart", 
"stateObject", 
"stateArray", 
"stateExpectArrayComma", 
"stateExpectObjectComma", 
"stateExpectColon", 
"stateExpectValue"};
static TNimNode* TMP4894[7];
NI TMP4896;
static char* NIM_CONST TMP4895[7] = {
"JNull", 
"JBool", 
"JInt", 
"JFloat", 
"JString", 
"JObject", 
"JArray"};
static TNimNode* TMP4897[2];
static TNimNode TMP884[76];
NTI289013.size = sizeof(Jsonparser289013);
NTI289013.kind = 17;
NTI289013.base = (&NTI247024);
TMP2920[0] = &TMP884[1];
TMP884[1].kind = 1;
TMP884[1].offset = offsetof(Jsonparser289013, a);
TMP884[1].typ = (&NTI149);
TMP884[1].name = "a";
TMP2920[1] = &TMP884[2];
NTI289007.size = sizeof(NU8);
NTI289007.kind = 14;
NTI289007.base = 0;
NTI289007.flags = 3;
for (TMP2923 = 0; TMP2923 < 14; TMP2923++) {
TMP884[TMP2923+3].kind = 1;
TMP884[TMP2923+3].offset = TMP2923;
TMP884[TMP2923+3].name = TMP2922[TMP2923];
TMP2921[TMP2923] = &TMP884[TMP2923+3];
}
TMP884[17].len = 14; TMP884[17].kind = 2; TMP884[17].sons = &TMP2921[0];
NTI289007.node = &TMP884[17];
TMP884[2].kind = 1;
TMP884[2].offset = offsetof(Jsonparser289013, tok);
TMP884[2].typ = (&NTI289007);
TMP884[2].name = "tok";
TMP2920[2] = &TMP884[18];
NTI289005.size = sizeof(NU8);
NTI289005.kind = 14;
NTI289005.base = 0;
NTI289005.flags = 3;
for (TMP2926 = 0; TMP2926 < 12; TMP2926++) {
TMP884[TMP2926+19].kind = 1;
TMP884[TMP2926+19].offset = TMP2926;
TMP884[TMP2926+19].name = TMP2925[TMP2926];
TMP2924[TMP2926] = &TMP884[TMP2926+19];
}
TMP884[31].len = 12; TMP884[31].kind = 2; TMP884[31].sons = &TMP2924[0];
NTI289005.node = &TMP884[31];
TMP884[18].kind = 1;
TMP884[18].offset = offsetof(Jsonparser289013, kind);
TMP884[18].typ = (&NTI289005);
TMP884[18].name = "kind";
TMP2920[3] = &TMP884[32];
NTI289009.size = sizeof(NU8);
NTI289009.kind = 14;
NTI289009.base = 0;
NTI289009.flags = 3;
for (TMP2929 = 0; TMP2929 < 11; TMP2929++) {
TMP884[TMP2929+33].kind = 1;
TMP884[TMP2929+33].offset = TMP2929;
TMP884[TMP2929+33].name = TMP2928[TMP2929];
TMP2927[TMP2929] = &TMP884[TMP2929+33];
}
TMP884[44].len = 11; TMP884[44].kind = 2; TMP884[44].sons = &TMP2927[0];
NTI289009.node = &TMP884[44];
TMP884[32].kind = 1;
TMP884[32].offset = offsetof(Jsonparser289013, err);
TMP884[32].typ = (&NTI289009);
TMP884[32].name = "err";
TMP2920[4] = &TMP884[45];
NTI289011.size = sizeof(NU8);
NTI289011.kind = 14;
NTI289011.base = 0;
NTI289011.flags = 3;
for (TMP2932 = 0; TMP2932 < 8; TMP2932++) {
TMP884[TMP2932+46].kind = 1;
TMP884[TMP2932+46].offset = TMP2932;
TMP884[TMP2932+46].name = TMP2931[TMP2932];
TMP2930[TMP2932] = &TMP884[TMP2932+46];
}
TMP884[54].len = 8; TMP884[54].kind = 2; TMP884[54].sons = &TMP2930[0];
NTI289011.node = &TMP884[54];
NTI289063.size = sizeof(TY289063*);
NTI289063.kind = 24;
NTI289063.base = (&NTI289011);
NTI289063.flags = 2;
NTI289063.marker = TMP2933;
TMP884[45].kind = 1;
TMP884[45].offset = offsetof(Jsonparser289013, state);
TMP884[45].typ = (&NTI289063);
TMP884[45].name = "state";
TMP2920[5] = &TMP884[55];
TMP884[55].kind = 1;
TMP884[55].offset = offsetof(Jsonparser289013, filename);
TMP884[55].typ = (&NTI149);
TMP884[55].name = "filename";
TMP884[0].len = 6; TMP884[0].kind = 2; TMP884[0].sons = &TMP2920[0];
NTI289013.node = &TMP884[0];
NTI290728.size = sizeof(Jsonparsingerror290728);
NTI290728.kind = 17;
NTI290728.base = (&NTI3449);
TMP884[56].len = 0; TMP884[56].kind = 2;
NTI290728.node = &TMP884[56];
NTI290765.size = sizeof(Jsonparsingerror290728*);
NTI290765.kind = 22;
NTI290765.base = (&NTI290728);
NTI290765.marker = TMP2945;
NTI290726.size = sizeof(Jsonnodeobj290726);
NTI290726.kind = 18;
NTI290726.base = 0;
NTI290726.flags = 2;
NTI290722.size = sizeof(NU8);
NTI290722.kind = 14;
NTI290722.base = 0;
NTI290722.flags = 3;
for (TMP4896 = 0; TMP4896 < 7; TMP4896++) {
TMP884[TMP4896+58].kind = 1;
TMP884[TMP4896+58].offset = TMP4896;
TMP884[TMP4896+58].name = TMP4895[TMP4896];
TMP4894[TMP4896] = &TMP884[TMP4896+58];
}
TMP884[65].len = 7; TMP884[65].kind = 2; TMP884[65].sons = &TMP4894[0];
NTI290722.node = &TMP884[65];
TMP884[57].kind = 3;
TMP884[57].offset = offsetof(Jsonnodeobj290726, kind);
TMP884[57].typ = (&NTI290722);
TMP884[57].name = "kind";
TMP884[57].sons = &NimDT_290726_kind[0];
TMP884[57].len = 7;
TMP884[66].kind = 1;
TMP884[66].offset = offsetof(Jsonnodeobj290726, kindU.S1.str);
TMP884[66].typ = (&NTI149);
TMP884[66].name = "str";
NimDT_290726_kind[4] = &TMP884[66];
TMP884[67].kind = 1;
TMP884[67].offset = offsetof(Jsonnodeobj290726, kindU.S2.num);
TMP884[67].typ = (&NTI5710);
TMP884[67].name = "num";
NimDT_290726_kind[2] = &TMP884[67];
TMP884[68].kind = 1;
TMP884[68].offset = offsetof(Jsonnodeobj290726, kindU.S3.fnum);
TMP884[68].typ = (&NTI128);
TMP884[68].name = "fnum";
NimDT_290726_kind[3] = &TMP884[68];
TMP884[69].kind = 1;
TMP884[69].offset = offsetof(Jsonnodeobj290726, kindU.S4.bval);
TMP884[69].typ = (&NTI138);
TMP884[69].name = "bval";
NimDT_290726_kind[1] = &TMP884[69];
TMP884[70].len = 0; TMP884[70].kind = 2;
NimDT_290726_kind[0] = &TMP884[70];
NTI291209.size = sizeof(TY291209);
NTI291209.kind = 18;
NTI291209.base = 0;
NTI291209.flags = 2;
TMP4897[0] = &TMP884[73];
TMP884[73].kind = 1;
TMP884[73].offset = offsetof(TY291209, Field0);
TMP884[73].typ = (&NTI149);
TMP884[73].name = "Field0";
TMP4897[1] = &TMP884[74];
TMP884[74].kind = 1;
TMP884[74].offset = offsetof(TY291209, Field1);
TMP884[74].typ = (&NTI290724);
TMP884[74].name = "Field1";
TMP884[72].len = 2; TMP884[72].kind = 2; TMP884[72].sons = &TMP4897[0];
NTI291209.node = &TMP884[72];
NTI290741.size = sizeof(TY290741*);
NTI290741.kind = 24;
NTI290741.base = (&NTI291209);
NTI290741.flags = 2;
NTI290741.marker = TMP4898;
TMP884[71].kind = 1;
TMP884[71].offset = offsetof(Jsonnodeobj290726, kindU.S6.fields);
TMP884[71].typ = (&NTI290741);
TMP884[71].name = "fields";
NimDT_290726_kind[5] = &TMP884[71];
NTI290746.size = sizeof(TY290746*);
NTI290746.kind = 24;
NTI290746.base = (&NTI290724);
NTI290746.flags = 2;
NTI290746.marker = TMP4899;
TMP884[75].kind = 1;
TMP884[75].offset = offsetof(Jsonnodeobj290726, kindU.S7.elems);
TMP884[75].typ = (&NTI290746);
TMP884[75].name = "elems";
NimDT_290726_kind[6] = &TMP884[75];
NTI290726.node = &TMP884[57];
NTI290724.size = sizeof(Jsonnodeobj290726*);
NTI290724.kind = 22;
NTI290724.base = (&NTI290726);
NTI290724.flags = 2;
NTI290724.marker = TMP4900;
}

