/* Generated by Nim Compiler v2.2.10 */
#define NIM_INTBITS 64

#include "nimbase.h"
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg;
typedef struct RootObj RootObj;
typedef struct tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w;
typedef struct tySequence__GyTgETkn69b26Etj2zBgjMw tySequence__GyTgETkn69b26Etj2zBgjMw;
typedef struct tySequence__GyTgETkn69b26Etj2zBgjMw_Content tySequence__GyTgETkn69b26Etj2zBgjMw_Content;
typedef struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A;
typedef struct tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w;
typedef struct tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg;
typedef struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q tyTuple__N4J9cV4JZGem3ljqqj5rT0Q;
typedef struct tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg;
typedef struct tyTuple__DTRsWi2kgTewbhN2TT5mbA tyTuple__DTRsWi2kgTewbhN2TT5mbA;
typedef struct tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g;
typedef struct tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA;
typedef struct tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg;
typedef struct Exception Exception;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ tySequence__S89cE01OvNjsN9c71FKsSrqQ;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content;
typedef struct tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ;
typedef struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA;
struct TNimTypeV2 {
	void* destructor;
	NI size;
	NI16 align;
	NI16 depth;
	NU32* display;
	void* traceImpl;
	void* typeInfoV1;
	NI flags;
	void* vTable[SEQ_DECL_SIZE];
};
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct RootObj {
	TNimTypeV2* m_type;
};
typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
struct tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg {
	RootObj Sup;
	NI bufpos;
	NimStringV2 buf;
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* input;
	NI lineNumber;
	NI sentinel;
	NI lineStart;
	NI offsetBase;
	tySet_tyChar__nmiMWKVIe46vacnhAFrQvw refillChars;
};
typedef NU8 tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw;
typedef NU8 tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA;
typedef NU8 tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg;
struct tySequence__GyTgETkn69b26Etj2zBgjMw {
  NI len; tySequence__GyTgETkn69b26Etj2zBgjMw_Content* p;
};
struct tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg {
	tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg Sup;
	NimStringV2 a;
	tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw tok;
	tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA kind;
	tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg err;
	tySequence__GyTgETkn69b26Etj2zBgjMw state;
	NimStringV2 filename;
	NIM_BOOL rawStringLiterals;
};
typedef NU8 tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw;
struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A {
	NI rc;
	NI rootIdx;
};
struct tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg {
	NI len;
	NI cap;
	tyTuple__N4J9cV4JZGem3ljqqj5rT0Q* d;
};
struct tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg {
	NI len;
	NI cap;
	tyTuple__DTRsWi2kgTewbhN2TT5mbA* d;
};
struct tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w {
	tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg traceStack;
	tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg toFree;
	NI freed;
	NI touched;
	NI edges;
	NI rcSum;
	NIM_BOOL keepThreshold;
};
struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q {
	void** Field0;
	TNimTypeV2* Field1;
};
struct tySequence__S89cE01OvNjsN9c71FKsSrqQ {
  NI len; tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content* p;
};
struct Exception {
	RootObj Sup;
	Exception* parent;
	NCSTRING name;
	NimStringV2 message;
	tySequence__S89cE01OvNjsN9c71FKsSrqQ trace;
	Exception* up;
};
struct tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg {
	Exception Sup;
};
struct tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA {
	tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg Sup;
};
struct tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g {
	tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA Sup;
};
typedef NimStringV2 tyArray__Seu7uK9aaOSN0BK3EAjjSHw[4];
struct tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ {
	tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA Sup;
};
typedef NimStringV2 tyArray__c7iwaZJC8kGyz1XhqzIPBQ[14];
struct tySequence__GyTgETkn69b26Etj2zBgjMw_Content { NI cap; tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw data[SEQ_DECL_SIZE]; };
struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA {
	NCSTRING procname;
	NI line;
	NCSTRING filename;
};
struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content { NI cap; tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZparsejson_u966)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZparsejson_u128)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u2691)(NimStringV2 dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZparsejson_u158)(tySequence__GyTgETkn69b26Etj2zBgjMw dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3497)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* s_p1, TNimTypeV2* desc_p2);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZparsejson_u140)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* dest_p0, void* env_p1);
static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1);
static N_INLINE(void, add__system_u3018)(tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg* s_p0, void** c_p1, TNimTypeV2* t_p2);
N_LIB_PRIVATE N_NIMCALL(void, resize__system_u3026)(tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg* s_p0);
static N_INLINE(NI, pluspercent___system_u785)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, open__pureZlexbase_u131)(tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg* L_p0, tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* input_p1, NI bufLen_p2, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw refillChars_p3);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2694)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZparsejson_u167)(tySequence__GyTgETkn69b26Etj2zBgjMw* dest_p0, tySequence__GyTgETkn69b26Etj2zBgjMw src_p1);
N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2700)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw, getTok__pureZparsejson_u626)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
N_LIB_PRIVATE N_NIMCALL(void, setLengthStrV2)(NimStringV2* s_p0, NI newLen_p1);
N_LIB_PRIVATE N_NIMCALL(void, skip__pureZparsejson_u509)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
N_LIB_PRIVATE N_NIMCALL(NI, handleCR__pureZlexbase_u84)(tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg* L_p0, NI pos_p1);
N_LIB_PRIVATE N_NIMCALL(NI, handleLF__pureZlexbase_u96)(tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg* L_p0, NI pos_p1);
N_LIB_PRIVATE N_NIMCALL(void, parseNumber__pureZparsejson_u547)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1);
N_LIB_PRIVATE N_NIMCALL(void, prepareAdd)(NimStringV2* s_p0, NI addLen_p1);
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, copyMem__system_u1742)(void* dest_p0, void* source_p1, NI size_p2);
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_u1837)(NimStringV2 s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p1);
N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw, parseString__pureZparsejson_u385)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
N_LIB_PRIVATE N_NIMCALL(NI, parseEscapedUTF16__pureZparsejson_u371)(NCSTRING buf_p0, NI* pos_p1);
static N_INLINE(NIM_BOOL, handleHexChar__stdZprivateZdecode95helpers_u1)(NIM_CHAR c_p0, NI* x_p1);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nuctoUTF8)(NI32 c_p0);
N_LIB_PRIVATE N_NIMCALL(void, parseName__pureZparsejson_u610)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1);
static N_INLINE(NIM_BOOL, equalMem__system_u1750)(void* a_p0, void* b_p1, NI size_p2);
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(void, add__pureZparsejson_u680)(tySequence__GyTgETkn69b26Etj2zBgjMw* x_p0, tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw y_p1);
static N_INLINE(tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw, pop__pureZparsejson_u727)(tySequence__GyTgETkn69b26Etj2zBgjMw* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___pureZparsejson_u742)(tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, shrink__pureZparsejson_u186)(tySequence__GyTgETkn69b26Etj2zBgjMw* x_p0, NI newLen_p1);
N_LIB_PRIVATE N_NIMCALL(void, next__pureZparsejson_u664)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZparsejson_u983)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZparsejson_u827)(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u3699)(tySequence__S89cE01OvNjsN9c71FKsSrqQ dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZparsejson_u839)(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g* dest_p0, void* env_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, errorMsgExpected__pureZparsejson_u367)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0, NimStringV2 e_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuFormatOpenArray)(NimStringV2 formatstr_p0, NimStringV2* a_p1, NI a_p1Len_0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___systemZdollars_u9)(NI xX60gensym0__p0);
static N_INLINE(NI, getLine__pureZparsejson_u351)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
static N_INLINE(NI, getColumn__pureZparsejson_u348)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0);
N_LIB_PRIVATE N_NIMCALL(NI, getColNumber__pureZlexbase_u146)(tyObject_BaseLexer__ZspOFmN5MjfhmGOKIrGMRg* L_p0, NI pos_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, rawNewString)(NI space_p0);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e_p0, NCSTRING ename_p1, NCSTRING procname_p2, NCSTRING filename_p3, NI line_p4);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZparsejson_u988)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZjson_u5784)(tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZjson_u5796)(tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ* dest_p0, void* env_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseParseErr__pureZparsejson_u820)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* p_p0, NimStringV2 msg_p1);
N_LIB_PRIVATE TNimTypeV2 NTIv2__izA0qNVok9bbh6yzMr1imlg_;
static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__nIinruGrC8EPIfjL3PuTvA_3 = {
0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__nIinruGrC8EPIfjL3PuTvA_4 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__nIinruGrC8EPIfjL3PuTvA_5 = {0, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_4};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__nIinruGrC8EPIfjL3PuTvA_6 = { 2 | NIM_STRLIT_FLAG, "0." };
static const NimStringV2 TM__nIinruGrC8EPIfjL3PuTvA_7 = {2, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_6};
static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__nIinruGrC8EPIfjL3PuTvA_8 = {
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}
;
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__nIinruGrC8EPIfjL3PuTvA_9 = { 4 | NIM_STRLIT_FLAG, "null" };
static const NimStringV2 TM__nIinruGrC8EPIfjL3PuTvA_10 = {4, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_9};
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__nIinruGrC8EPIfjL3PuTvA_11 = { 4 | NIM_STRLIT_FLAG, "true" };
static const NimStringV2 TM__nIinruGrC8EPIfjL3PuTvA_12 = {4, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_11};
static const struct {
  NI cap; NIM_CHAR data[5+1];
} TM__nIinruGrC8EPIfjL3PuTvA_13 = { 5 | NIM_STRLIT_FLAG, "false" };
static const NimStringV2 TM__nIinruGrC8EPIfjL3PuTvA_14 = {5, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_13};
N_LIB_PRIVATE TNimTypeV2 NTIv2__Is5Bw7MecUR7E9bj5J9c9a47g_;
static const struct {
  NI cap; NIM_CHAR data[20+1];
} TM__nIinruGrC8EPIfjL3PuTvA_16 = { 20 | NIM_STRLIT_FLAG, "$1($2, $3) Error: $4" };
static const NimStringV2 TM__nIinruGrC8EPIfjL3PuTvA_17 = {20, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_16};
static const struct {
  NI cap; NIM_CHAR data[9+1];
} TM__nIinruGrC8EPIfjL3PuTvA_18 = { 9 | NIM_STRLIT_FLAG, " expected" };
static const NimStringV2 TM__nIinruGrC8EPIfjL3PuTvA_19 = {9, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_18};
N_LIB_PRIVATE TNimTypeV2 NTIv2__f7emiekcTJHxgTtsNnPypQ_;
static const struct {
  NI cap; NIM_CHAR data[13+1];
} TM__nIinruGrC8EPIfjL3PuTvA_21 = { 13 | NIM_STRLIT_FLAG, "invalid token" };
static const struct {
  NI cap; NIM_CHAR data[3+1];
} TM__nIinruGrC8EPIfjL3PuTvA_22 = { 3 | NIM_STRLIT_FLAG, "EOF" };
static const struct {
  NI cap; NIM_CHAR data[14+1];
} TM__nIinruGrC8EPIfjL3PuTvA_23 = { 14 | NIM_STRLIT_FLAG, "string literal" };
static const struct {
  NI cap; NIM_CHAR data[11+1];
} TM__nIinruGrC8EPIfjL3PuTvA_24 = { 11 | NIM_STRLIT_FLAG, "int literal" };
static const struct {
  NI cap; NIM_CHAR data[13+1];
} TM__nIinruGrC8EPIfjL3PuTvA_25 = { 13 | NIM_STRLIT_FLAG, "float literal" };
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__nIinruGrC8EPIfjL3PuTvA_26 = { 1 | NIM_STRLIT_FLAG, "{" };
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__nIinruGrC8EPIfjL3PuTvA_27 = { 1 | NIM_STRLIT_FLAG, "}" };
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__nIinruGrC8EPIfjL3PuTvA_28 = { 1 | NIM_STRLIT_FLAG, "[" };
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__nIinruGrC8EPIfjL3PuTvA_29 = { 1 | NIM_STRLIT_FLAG, "]" };
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__nIinruGrC8EPIfjL3PuTvA_30 = { 1 | NIM_STRLIT_FLAG, ":" };
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__nIinruGrC8EPIfjL3PuTvA_31 = { 1 | NIM_STRLIT_FLAG, "," };
N_LIB_PRIVATE NIM_CONST tyArray__c7iwaZJC8kGyz1XhqzIPBQ tokToStr__pureZparsejson_u79 = {{13, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_21},
{3, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_22},
{14, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_23},
{11, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_24},
{13, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_25},
{4, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_11},
{5, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_13},
{4, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_9},
{1, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_26},
{1, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_27},
{1, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_28},
{1, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_29},
{1, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_30},
{1, (NimStrPayload*)&TM__nIinruGrC8EPIfjL3PuTvA_31}}
;
static NIM_CONST NU32 TM__nIinruGrC8EPIfjL3PuTvA_2[3] = {3701606400, 3394115072, 808757248};
N_LIB_PRIVATE TNimTypeV2 NTIv2__izA0qNVok9bbh6yzMr1imlg_ = {.destructor = (void*)rttiDestroy__pureZparsejson_u966, .size = sizeof(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg), .align = (NI16) NIM_ALIGNOF(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg), .depth = 2, .display = TM__nIinruGrC8EPIfjL3PuTvA_2, .traceImpl = (void*)eqtrace___pureZparsejson_u140, .flags = 0};
extern NIM_BOOL nimInErrorMode__system_u4143;
static NIM_CONST NU32 TM__nIinruGrC8EPIfjL3PuTvA_15[5] = {3701606400, 1285336064, 561960192, 1871340544, 3460416256};
N_LIB_PRIVATE TNimTypeV2 NTIv2__Is5Bw7MecUR7E9bj5J9c9a47g_ = {.destructor = (void*)rttiDestroy__pureZparsejson_u983, .size = sizeof(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g), .align = (NI16) NIM_ALIGNOF(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g), .depth = 4, .display = TM__nIinruGrC8EPIfjL3PuTvA_15, .traceImpl = (void*)eqtrace___pureZparsejson_u839, .flags = 0};
static NIM_CONST NU32 TM__nIinruGrC8EPIfjL3PuTvA_20[5] = {3701606400, 1285336064, 561960192, 1871340544, 3081144576};
N_LIB_PRIVATE TNimTypeV2 NTIv2__f7emiekcTJHxgTtsNnPypQ_ = {.destructor = (void*)rttiDestroy__pureZparsejson_u988, .size = sizeof(tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ), .align = (NI16) NIM_ALIGNOF(tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ), .depth = 4, .display = TM__nIinruGrC8EPIfjL3PuTvA_20, .traceImpl = (void*)eqtrace___pureZjson_u5796, .flags = 0};
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZparsejson_u158)(tySequence__GyTgETkn69b26Etj2zBgjMw dest_p0) {
	if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
 alignedDealloc(dest_p0.p, NIM_ALIGNOF(tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw));
}
}
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
	NIM_BOOL result;
	result = NIM_FALSE;
	{
		tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* cell_1;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u805(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
		cell_1 = ((tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A*) (T5_));
		{
			if (!((NI)((*cell_1).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell_1).rc = minuspercent___system_u805((*cell_1).rc, ((NI)16));
		}
LA6_: ;
		rememberCycle__system_u3497(result, cell_1, (*((TNimTypeV2**) (p_p0))));
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZparsejson_u128)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* dest_p0) {
	eqdestroy___system_u2691((*dest_p0).filename);
	eqdestroy___pureZparsejson_u158((*dest_p0).state);
	eqdestroy___system_u2691((*dest_p0).a);
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.input);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).Sup.input);
	}
LA4_: ;
	eqdestroy___system_u2691((*dest_p0).Sup.buf);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZparsejson_u966)(void* dest_p0) {
	eqdestroy___pureZparsejson_u128((&(*((tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg*) (dest_p0)))));
}
static N_INLINE(NI, pluspercent___system_u785)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU64)(((NU) (x_p0))) + (NU64)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(void, add__system_u3018)(tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg* s_p0, void** c_p1, TNimTypeV2* t_p2) {
	void** colontmp_;
	TNimTypeV2* colontmp__2;
	{
		if (!((*s_p0).cap <= (*s_p0).len)) goto LA3_;
		resize__system_u3026(s_p0);
	}
LA3_: ;
	colontmp_ = c_p1;
	colontmp__2 = t_p2;
	(*s_p0).d[(*s_p0).len].Field0 = colontmp_;
	(*s_p0).d[(*s_p0).len].Field1 = colontmp__2;
	(*s_p0).len = pluspercent___system_u785((*s_p0).len, ((NI)1));
}
static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1) {
	void** p_1;
	p_1 = ((void**) (q_p0));
	{
		tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w* j_1;
		if (!!(((*p_1) == NIM_NIL))) goto LA3_;
		j_1 = ((tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w*) (env_p1));
		add__system_u3018((&(*j_1).traceStack), p_1, (*((TNimTypeV2**) ((*p_1)))));
	}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZparsejson_u140)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* dest_p0, void* env_p1) {
	nimTraceRefDyn(&(*dest_p0).Sup.input, env_p1);
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZparsejson_u167)(tySequence__GyTgETkn69b26Etj2zBgjMw* dest_p0, tySequence__GyTgETkn69b26Etj2zBgjMw src_p1) {
	if ((*dest_p0).p != src_p1.p) {	eqdestroy___pureZparsejson_u158((*dest_p0));
	}
(*dest_p0).len = src_p1.len; (*dest_p0).p = src_p1.p;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4143);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, open__pureZparsejson_u80)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0, tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* input_p1, NimStringV2 filename_p2, NIM_BOOL rawStringLiterals_p3) {
	tySequence__GyTgETkn69b26Etj2zBgjMw T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	open__pureZlexbase_u131(&my_p0->Sup, input_p1, ((NI)8192), TM__nIinruGrC8EPIfjL3PuTvA_3);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	eqcopy___system_u2694((&(*my_p0).filename), filename_p2);
	T1_.len = 0; T1_.p = NIM_NIL;
	T1_.len = 1; T1_.p = (tySequence__GyTgETkn69b26Etj2zBgjMw_Content*) newSeqPayload(1, sizeof(tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw), NIM_ALIGNOF(tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw));
	T1_.p->data[0] = ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)1);
	eqsink___pureZparsejson_u167((&(*my_p0).state), T1_);
	(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
	eqsink___system_u2700((&(*my_p0).a), TM__nIinruGrC8EPIfjL3PuTvA_5);
	(*my_p0).rawStringLiterals = rawStringLiterals_p3;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, skip__pureZparsejson_u509)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	NI pos_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	pos_1 = (*my_p0).Sup.bufpos;
	{
		while (1) {
			switch (((NU8)((*my_p0).Sup.buf.p->data[pos_1]))) {
			case 47:
			{
				{
					if (!((NU8)((*my_p0).Sup.buf.p->data[(NI)(pos_1 + ((NI)1))]) == (NU8)(47))) goto LA6_;
					pos_1 += ((NI)2);
					{
						while (1) {
							switch (((NU8)((*my_p0).Sup.buf.p->data[pos_1]))) {
							case 0:
							{
								goto LA8;
							}
							break;
							case 13:
							{
								pos_1 = handleCR__pureZlexbase_u84(&my_p0->Sup, pos_1);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								goto LA8;
							}
							break;
							case 10:
							{
								pos_1 = handleLF__pureZlexbase_u96(&my_p0->Sup, pos_1);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								goto LA8;
							}
							break;
							default:
							{
								pos_1 += ((NI)1);
							}
							break;
							}
						}
					} LA8: ;
				}
				goto LA4_;
LA6_: ;
				{
					if (!((NU8)((*my_p0).Sup.buf.p->data[(NI)(pos_1 + ((NI)1))]) == (NU8)(42))) goto LA15_;
					pos_1 += ((NI)2);
					{
						while (1) {
							switch (((NU8)((*my_p0).Sup.buf.p->data[pos_1]))) {
							case 0:
							{
								(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)8);
								goto LA17;
							}
							break;
							case 13:
							{
								pos_1 = handleCR__pureZlexbase_u84(&my_p0->Sup, pos_1);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							}
							break;
							case 10:
							{
								pos_1 = handleLF__pureZlexbase_u96(&my_p0->Sup, pos_1);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							}
							break;
							case 42:
							{
								pos_1 += ((NI)1);
								{
									if (!((NU8)((*my_p0).Sup.buf.p->data[pos_1]) == (NU8)(47))) goto LA25_;
									pos_1 += ((NI)1);
									goto LA17;
								}
LA25_: ;
							}
							break;
							default:
							{
								pos_1 += ((NI)1);
							}
							break;
							}
						}
					} LA17: ;
				}
				goto LA4_;
LA15_: ;
				{
					goto LA1;
				}
LA4_: ;
			}
			break;
			case 32:
			case 9:
			{
				pos_1 += ((NI)1);
			}
			break;
			case 13:
			{
				pos_1 = handleCR__pureZlexbase_u84(&my_p0->Sup, pos_1);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			}
			break;
			case 10:
			{
				pos_1 = handleLF__pureZlexbase_u96(&my_p0->Sup, pos_1);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
	(*my_p0).Sup.bufpos = pos_1;
	}BeforeRet_: ;
}
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1) {
	prepareAdd(s_p0, ((NI)1));
	(*(*s_p0).p).data[(*s_p0).len] = c_p1;
	(*s_p0).len += ((NI)1);
	(*(*s_p0).p).data[(*s_p0).len] = 0;
}
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest_p0, source_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, copyMem__system_u1742)(void* dest_p0, void* source_p1, NI size_p2) {
	nimCopyMem(dest_p0, source_p1, size_p2);
}
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1) {
	{
		if (!(((NI)0) < src_p1.len)) goto LA3_;
		copyMem__system_u1742(((void*) ((&(*(*dest_p0).p).data[(*dest_p0).len]))), ((void*) ((&(*src_p1.p).data[((NI)0)]))), (src_p1.len));
		(*dest_p0).len += src_p1.len;
		(*(*dest_p0).p).data[(*dest_p0).len] = 0;
	}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, parseNumber__pureZparsejson_u547)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	NI pos_1;
	pos_1 = (*my_p0).Sup.bufpos;
	{
		if (!((NU8)((*my_p0).Sup.buf.p->data[pos_1]) == (NU8)(45))) goto LA3_;
		nimAddCharV1((&(*my_p0).a), 45);
		pos_1 += ((NI)1);
	}
LA3_: ;
	{
		if (!((NU8)((*my_p0).Sup.buf.p->data[pos_1]) == (NU8)(46))) goto LA7_;
		prepareAdd((&(*my_p0).a), 2);
appendString((&(*my_p0).a), TM__nIinruGrC8EPIfjL3PuTvA_7);
		pos_1 += ((NI)1);
	}
	goto LA5_;
LA7_: ;
	{
		{
			while (1) {
				if (!(((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(48)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(57)))) goto LA11;
				nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
				pos_1 += ((NI)1);
			} LA11: ;
		}
		{
			if (!((NU8)((*my_p0).Sup.buf.p->data[pos_1]) == (NU8)(46))) goto LA14_;
			nimAddCharV1((&(*my_p0).a), 46);
			pos_1 += ((NI)1);
		}
LA14_: ;
	}
LA5_: ;
	{
		while (1) {
			if (!(((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(48)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(57)))) goto LA17;
			nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
			pos_1 += ((NI)1);
		} LA17: ;
	}
	{
		if (!(((NU8)((*my_p0).Sup.buf.p->data[pos_1])) == ((NU8)(69)) || ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) == ((NU8)(101)))) goto LA20_;
		nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
		pos_1 += ((NI)1);
		{
			if (!(((NU8)((*my_p0).Sup.buf.p->data[pos_1])) == ((NU8)(43)) || ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) == ((NU8)(45)))) goto LA24_;
			nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
			pos_1 += ((NI)1);
		}
LA24_: ;
		{
			while (1) {
				if (!(((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(48)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(57)))) goto LA27;
				nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
				pos_1 += ((NI)1);
			} LA27: ;
		}
	}
LA20_: ;
	(*my_p0).Sup.bufpos = pos_1;
}
static N_INLINE(NIM_BOOL, handleHexChar__stdZprivateZdecode95helpers_u1)(NIM_CHAR c_p0, NI* x_p1) {
	NIM_BOOL result;
	result = NIM_TRUE;
	switch (((NU8)(c_p0))) {
	case 48 ... 57:
	{
		(*x_p1) = (NI)((NI)((NU64)((*x_p1)) << (NU64)(((NI)4) & (64 - 1))) | (NI)(((NU8)(c_p0)) - ((NI)48)));
	}
	break;
	case 97 ... 102:
	{
		(*x_p1) = (NI)((NI)((NU64)((*x_p1)) << (NU64)(((NI)4) & (64 - 1))) | (NI)((NI)(((NU8)(c_p0)) - ((NI)97)) + ((NI)10)));
	}
	break;
	case 65 ... 70:
	{
		(*x_p1) = (NI)((NI)((NU64)((*x_p1)) << (NU64)(((NI)4) & (64 - 1))) | (NI)((NI)(((NU8)(c_p0)) - ((NI)65)) + ((NI)10)));
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseEscapedUTF16__pureZparsejson_u371)(NCSTRING buf_p0, NI* pos_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((NI)0);
	{
		NI __1;
		NI res_1;
		__1 = (NI)0;
		res_1 = ((NI)0);
		{
			while (1) {
				if (!(res_1 <= ((NI)3))) goto LA3;
				__1 = ((NI) (res_1));
				{
					NIM_BOOL T6_;
					T6_ = (NIM_BOOL)0;
					T6_ = handleHexChar__stdZprivateZdecode95helpers_u1(buf_p0[(*pos_p1)], (&result));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					if (!T6_) goto LA7_;
					(*pos_p1) += ((NI)1);
				}
				goto LA4_;
LA7_: ;
				{
					result = ((NI)-1);
					goto BeforeRet_;
				}
LA4_: ;
				res_1 += ((NI)1);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0) {
	NCSTRING result;
	{
		if (!(s_p0.len == ((NI)0))) goto LA3_;
		result = "";
	}
	goto LA1_;
LA3_: ;
	{
		result = ((NCSTRING) ((*s_p0.p).data));
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw, parseString__pureZparsejson_u385)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw result;
	NI pos_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)2);
	pos_1 = (NI)((*my_p0).Sup.bufpos + ((NI)1));
	{
		if (!(*my_p0).rawStringLiterals) goto LA3_;
		nimAddCharV1((&(*my_p0).a), 34);
	}
LA3_: ;
	{
		while (1) {
			switch (((NU8)((*my_p0).Sup.buf.p->data[pos_1]))) {
			case 0:
			{
				(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)7);
				result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)0);
				goto LA5;
			}
			break;
			case 34:
			{
				{
					if (!(*my_p0).rawStringLiterals) goto LA11_;
					nimAddCharV1((&(*my_p0).a), 34);
				}
LA11_: ;
				pos_1 += ((NI)1);
				goto LA5;
			}
			break;
			case 92:
			{
				{
					if (!(*my_p0).rawStringLiterals) goto LA16_;
					nimAddCharV1((&(*my_p0).a), 92);
				}
LA16_: ;
				switch (((NU8)((*my_p0).Sup.buf.p->data[(NI)(pos_1 + ((NI)1))]))) {
				case 92:
				case 34:
				case 39:
				case 47:
				{
					nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[(NI)(pos_1 + ((NI)1))]);
					pos_1 += ((NI)2);
				}
				break;
				case 98:
				{
					nimAddCharV1((&(*my_p0).a), 8);
					pos_1 += ((NI)2);
				}
				break;
				case 102:
				{
					nimAddCharV1((&(*my_p0).a), 12);
					pos_1 += ((NI)2);
				}
				break;
				case 110:
				{
					nimAddCharV1((&(*my_p0).a), 10);
					pos_1 += ((NI)2);
				}
				break;
				case 114:
				{
					nimAddCharV1((&(*my_p0).a), 13);
					pos_1 += ((NI)2);
				}
				break;
				case 116:
				{
					nimAddCharV1((&(*my_p0).a), 9);
					pos_1 += ((NI)2);
				}
				break;
				case 118:
				{
					nimAddCharV1((&(*my_p0).a), 11);
					pos_1 += ((NI)2);
				}
				break;
				case 117:
				{
					NI pos2_1;
					NI r_1;
					{
						if (!(*my_p0).rawStringLiterals) goto LA28_;
						nimAddCharV1((&(*my_p0).a), 117);
					}
LA28_: ;
					pos_1 += ((NI)2);
					pos2_1 = pos_1;
					r_1 = parseEscapedUTF16__pureZparsejson_u371(nimToCStringConv((*my_p0).Sup.buf), (&pos_1));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					{
						if (!(r_1 < ((NI)0))) goto LA32_;
						(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)1);
						goto LA5;
					}
LA32_: ;
					{
						NI s_1;
						if (!((NI)(r_1 & ((NI)64512)) == ((NI)55296))) goto LA36_;
						{
							NIM_BOOL T40_;
							T40_ = (NIM_BOOL)0;
							T40_ = !(((NU8)((*my_p0).Sup.buf.p->data[pos_1]) == (NU8)(92)));
							if (T40_) goto LA41_;
							T40_ = !(((NU8)((*my_p0).Sup.buf.p->data[(NI)(pos_1 + ((NI)1))]) == (NU8)(117)));
LA41_: ;
							if (!T40_) goto LA42_;
							(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)1);
							goto LA5;
						}
LA42_: ;
						pos_1 += ((NI)2);
						s_1 = parseEscapedUTF16__pureZparsejson_u371(nimToCStringConv((*my_p0).Sup.buf), (&pos_1));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						{
							NIM_BOOL T46_;
							T46_ = (NIM_BOOL)0;
							T46_ = ((NI)(s_1 & ((NI)64512)) == ((NI)56320));
							if (!(T46_)) goto LA47_;
							T46_ = (((NI)0) < s_1);
LA47_: ;
							if (!T46_) goto LA48_;
							r_1 = (NI)(((NI)65536) + (NI)((NI)((NU64)((NI)(r_1 - ((NI)55296))) << (NU64)(((NI)10) & (64 - 1))) | (NI)(s_1 - ((NI)56320))));
						}
						goto LA44_;
LA48_: ;
						{
							(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)1);
							goto LA5;
						}
LA44_: ;
					}
LA36_: ;
					{
						NI length_1;
						if (!(*my_p0).rawStringLiterals) goto LA53_;
						length_1 = (NI)(pos_1 - pos2_1);
						{
							NI i_1;
							NI res_1;
							i_1 = (NI)0;
							res_1 = ((NI)1);
							{
								while (1) {
									if (!(res_1 <= length_1)) goto LA57;
									i_1 = ((NI) (res_1));
									{
										if (!(((NU8)((*my_p0).Sup.buf.p->data[pos2_1])) >= ((NU8)(48)) && ((NU8)((*my_p0).Sup.buf.p->data[pos2_1])) <= ((NU8)(57)) || ((NU8)((*my_p0).Sup.buf.p->data[pos2_1])) >= ((NU8)(65)) && ((NU8)((*my_p0).Sup.buf.p->data[pos2_1])) <= ((NU8)(70)) || ((NU8)((*my_p0).Sup.buf.p->data[pos2_1])) >= ((NU8)(97)) && ((NU8)((*my_p0).Sup.buf.p->data[pos2_1])) <= ((NU8)(102)))) goto LA60_;
										nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos2_1]);
										pos2_1 += ((NI)1);
									}
									goto LA58_;
LA60_: ;
									{
										goto LA55;
									}
LA58_: ;
									res_1 += ((NI)1);
								} LA57: ;
							}
						} LA55: ;
					}
					goto LA51_;
LA53_: ;
					{
						NimStringV2 colontmpD_;
						colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
						colontmpD_ = nuctoUTF8(((NI32) (r_1)));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						prepareAdd((&(*my_p0).a), colontmpD_.len + 0);
appendString((&(*my_p0).a), colontmpD_);
						eqdestroy___system_u2691(colontmpD_);
					}
LA51_: ;
				}
				break;
				default:
				{
					nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
					pos_1 += ((NI)1);
				}
				break;
				}
			}
			break;
			case 13:
			{
				pos_1 = handleCR__pureZlexbase_u84(&my_p0->Sup, pos_1);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				nimAddCharV1((&(*my_p0).a), 13);
			}
			break;
			case 10:
			{
				pos_1 = handleLF__pureZlexbase_u96(&my_p0->Sup, pos_1);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				nimAddCharV1((&(*my_p0).a), 10);
			}
			break;
			default:
			{
				nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
				pos_1 += ((NI)1);
			}
			break;
			}
		}
	} LA5: ;
	(*my_p0).Sup.bufpos = pos_1;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, parseName__pureZparsejson_u610)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	NI pos_1;
	pos_1 = (*my_p0).Sup.bufpos;
	{
		if (!(((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(97)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(122)) || ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(65)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(90)) || ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) == ((NU8)(95)))) goto LA3_;
		{
			while (1) {
				if (!(((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(97)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(122)) || ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(65)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(90)) || ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) >= ((NU8)(48)) && ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) <= ((NU8)(57)) || ((NU8)((*my_p0).Sup.buf.p->data[pos_1])) == ((NU8)(95)))) goto LA6;
				nimAddCharV1((&(*my_p0).a), (*my_p0).Sup.buf.p->data[pos_1]);
				pos_1 += ((NI)1);
			} LA6: ;
		}
	}
LA3_: ;
	(*my_p0).Sup.bufpos = pos_1;
}
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2) {
	int result;
	result = memcmp(a_p0, b_p1, ((size_t) (size_p2)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__system_u1750)(void* a_p0, void* b_p1, NI size_p2) {
	NIM_BOOL result;
	int T1_;
	T1_ = (int)0;
	T1_ = nimCmpMem(a_p0, b_p1, size_p2);
	result = (T1_ == ((NI32)0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1) {
	NIM_BOOL result;
	NI alen_1;
	NI blen_1;
{	result = NIM_FALSE;
	alen_1 = a_p0.len;
	blen_1 = b_p1.len;
	{
		if (!(alen_1 == blen_1)) goto LA3_;
		{
			if (!(alen_1 == ((NI)0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
LA7_: ;
		result = equalMem__system_u1750(((void*) ((&a_p0.p->data[((NI)0)]))), ((void*) ((&b_p1.p->data[((NI)0)]))), (alen_1));
		goto BeforeRet_;
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw, getTok__pureZparsejson_u626)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)0;
	setLengthStrV2((&(*my_p0).a), ((NI)0));
	skip__pureZparsejson_u509(my_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	switch (((NU8)((*my_p0).Sup.buf.p->data[(*my_p0).Sup.bufpos]))) {
	case 45:
	case 46:
	case 48 ... 57:
	{
		parseNumber__pureZparsejson_u547(my_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		{
			NIM_BOOL T4_;
			T4_ = (NIM_BOOL)0;
			T4_ = contains__pureZstrutils_u1837((*my_p0).a, TM__nIinruGrC8EPIfjL3PuTvA_8);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!T4_) goto LA5_;
			result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)4);
		}
		goto LA2_;
LA5_: ;
		{
			result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)3);
		}
LA2_: ;
	}
	break;
	case 34:
	{
		result = parseString__pureZparsejson_u385(my_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	break;
	case 91:
	{
		(*my_p0).Sup.bufpos += ((NI)1);
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)10);
	}
	break;
	case 123:
	{
		(*my_p0).Sup.bufpos += ((NI)1);
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)8);
	}
	break;
	case 93:
	{
		(*my_p0).Sup.bufpos += ((NI)1);
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)11);
	}
	break;
	case 125:
	{
		(*my_p0).Sup.bufpos += ((NI)1);
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)9);
	}
	break;
	case 44:
	{
		(*my_p0).Sup.bufpos += ((NI)1);
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)13);
	}
	break;
	case 58:
	{
		(*my_p0).Sup.bufpos += ((NI)1);
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)12);
	}
	break;
	case 0:
	{
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)1);
	}
	break;
	case 97 ... 122:
	case 65 ... 90:
	case 95:
	{
		parseName__pureZparsejson_u610(my_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (eqStrings((*my_p0).a, TM__nIinruGrC8EPIfjL3PuTvA_10)) goto LA17_;
		if (eqStrings((*my_p0).a, TM__nIinruGrC8EPIfjL3PuTvA_12)) goto LA18_;
		if (eqStrings((*my_p0).a, TM__nIinruGrC8EPIfjL3PuTvA_14)) goto LA19_;
		goto LA20_;
		LA17_: ;
		{
			result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)7);
		}
		goto LA21_;
		LA18_: ;
		{
			result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)5);
		}
		goto LA21_;
		LA19_: ;
		{
			result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)6);
		}
		goto LA21_;
		LA20_: ;
		{
			result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)0);
		}
LA21_: ;
	}
	break;
	default:
	{
		(*my_p0).Sup.bufpos += ((NI)1);
		result = ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)0);
	}
	break;
	}
	(*my_p0).tok = result;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___pureZparsejson_u742)(tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw* dest_p0) {
	(*dest_p0) = 0;
}
static N_INLINE(tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw, pop__pureZparsejson_u727)(tySequence__GyTgETkn69b26Etj2zBgjMw* s_p0) {
	tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw result;
	NI L_1;
	NI T1_;
	T1_ = (*s_p0).len;
	L_1 = (NI)(T1_ - ((NI)1));
	result = (*s_p0).p->data[L_1];
	eqwasMoved___pureZparsejson_u742((&(*s_p0).p->data[L_1]));
	shrink__pureZparsejson_u186(s_p0, (L_1));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, next__pureZparsejson_u664)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw tk_1;
	NI i_1;
	NI T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	tk_1 = getTok__pureZparsejson_u626(my_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T1_ = (*my_p0).state.len;
	i_1 = (NI)(T1_ - ((NI)1));
	switch ((*my_p0).state.p->data[i_1]) {
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0):
	{
		{
			if (!(tk_1 == ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)1))) goto LA5_;
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)1);
		}
		goto LA3_;
LA5_: ;
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)9);
		}
LA3_: ;
	}
	break;
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)1):
	{
		switch (tk_1) {
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)2):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)3):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)4):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)5):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)6):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)7):
		{
			(*my_p0).state.p->data[i_1] = ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0);
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA) (tk_1));
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)10):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)3));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)10);
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)8):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)2));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)8);
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)1):
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)1);
		}
		break;
		default:
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)9);
		}
		break;
		}
	}
	break;
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)2):
	{
		switch (tk_1) {
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)2):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)3):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)4):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)5):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)6):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)7):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)6));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA) (tk_1));
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)10):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)6));
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)3));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)10);
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)8):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)6));
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)2));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)8);
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)9):
		{
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T19_;
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)9);
			T19_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T19_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T19_);
		}
		break;
		default:
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)6);
		}
		break;
		}
	}
	break;
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)3):
	{
		switch (tk_1) {
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)2):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)3):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)4):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)5):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)6):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)7):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)4));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA) (tk_1));
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)10):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)4));
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)3));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)10);
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)8):
		{
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)4));
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)2));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)8);
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)11):
		{
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T26_;
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)11);
			T26_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T26_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T26_);
		}
		break;
		default:
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)5);
		}
		break;
		}
	}
	break;
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)4):
	{
		switch (tk_1) {
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)13):
		{
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T30_;
			T30_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T30_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T30_);
			next__pureZparsejson_u664(my_p0);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)11):
		{
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T32_;
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T33_;
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)11);
			T32_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T32_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T32_);
			T33_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T33_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T33_);
		}
		break;
		default:
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)5);
		}
		break;
		}
	}
	break;
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)5):
	{
		switch (tk_1) {
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)13):
		{
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T37_;
			T37_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T37_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T37_);
			next__pureZparsejson_u664(my_p0);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)9):
		{
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T39_;
			tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw T40_;
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)9);
			T39_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T39_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T39_);
			T40_ = (tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)0;
			T40_ = pop__pureZparsejson_u727((&(*my_p0).state));
			(void)(T40_);
		}
		break;
		default:
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)6);
		}
		break;
		}
	}
	break;
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)6):
	{
		switch (tk_1) {
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)12):
		{
			(*my_p0).state.p->data[i_1] = ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)7);
			next__pureZparsejson_u664(my_p0);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		break;
		default:
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)3);
		}
		break;
		}
	}
	break;
	case ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)7):
	{
		switch (tk_1) {
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)2):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)3):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)4):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)5):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)6):
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)7):
		{
			(*my_p0).state.p->data[i_1] = ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)5);
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA) (tk_1));
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)10):
		{
			(*my_p0).state.p->data[i_1] = ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)5);
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)3));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)10);
		}
		break;
		case ((tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)8):
		{
			(*my_p0).state.p->data[i_1] = ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)5);
			add__pureZparsejson_u680((&(*my_p0).state), ((tyEnum_ParserState__0xxCjL29aD8tzUEg49aPYfOw)2));
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)8);
		}
		break;
		default:
		{
			(*my_p0).kind = ((tyEnum_JsonEventKind__vmhy79b8cI3QhdCUo55hPOA)0);
			(*my_p0).err = ((tyEnum_JsonError__xIIO5nJTV4O1P02ldc1GWg)10);
		}
		break;
		}
	}
	break;
	default: __builtin_unreachable();
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZparsejson_u827)(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.up);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.up);
	}
LA4_: ;
	eqdestroy___system_u3699((*dest_p0).Sup.Sup.Sup.trace);
	eqdestroy___system_u2691((*dest_p0).Sup.Sup.Sup.message);
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.parent);
		if (!T8_) goto LA9_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.parent);
	}
LA9_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZparsejson_u983)(void* dest_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	eqdestroy___pureZparsejson_u827((&(*((tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g*) (dest_p0)))));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZparsejson_u839)(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g* dest_p0, void* env_p1) {
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.parent, env_p1);
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.up, env_p1);
}
static N_INLINE(NI, getLine__pureZparsejson_u351)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	NI result;
	result = (*my_p0).Sup.lineNumber;
	return result;
}
static N_INLINE(NI, getColumn__pureZparsejson_u348)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = getColNumber__pureZlexbase_u146((&(*my_p0).Sup), (*my_p0).Sup.bufpos);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, errorMsgExpected__pureZparsejson_u367)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* my_p0, NimStringV2 e_p1) {
	NimStringV2 result;
	NimStringV2 colontmpD_;
	NimStringV2 colontmpD__2;
	NimStringV2 colontmpD__3;
	tyArray__Seu7uK9aaOSN0BK3EAjjSHw T2_;
	NI T3_;
	NI T4_;
	NimStringV2 T5_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
	colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
	T2_[0] = (*my_p0).filename;
	T3_ = (NI)0;
	T3_ = getLine__pureZparsejson_u351(my_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	colontmpD_ = dollar___systemZdollars_u9(T3_);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	T2_[1] = colontmpD_;
	T4_ = (NI)0;
	T4_ = getColumn__pureZparsejson_u348(my_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	colontmpD__2 = dollar___systemZdollars_u9(T4_);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	T2_[2] = colontmpD__2;
	T5_.len = 0; T5_.p = NIM_NIL;
	T5_ = rawNewString(e_p1.len + 9);
appendString((&T5_), e_p1);
appendString((&T5_), TM__nIinruGrC8EPIfjL3PuTvA_19);
	colontmpD__3 = T5_;
	T2_[3] = colontmpD__3;
	result = nsuFormatOpenArray(TM__nIinruGrC8EPIfjL3PuTvA_17, T2_, 4);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		LA1_:;
	}
	{
		eqdestroy___system_u2691(colontmpD__3);
		eqdestroy___system_u2691(colontmpD__2);
		eqdestroy___system_u2691(colontmpD_);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NOINLINE(void, raiseParseErr__pureZparsejson_u820)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* p_p0, NimStringV2 msg_p1) {
	tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g* T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	T1_ = NIM_NIL;
	T1_ = (tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g*) nimNewObj(sizeof(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g), NIM_ALIGNOF(tyObject_JsonParsingError__Is5Bw7MecUR7E9bj5J9c9a47g));
	(*T1_).Sup.Sup.Sup.Sup.m_type = (&NTIv2__Is5Bw7MecUR7E9bj5J9c9a47g_);
	(*T1_).Sup.Sup.Sup.name = "JsonParsingError";
	(*T1_).Sup.Sup.Sup.message = errorMsgExpected__pureZparsejson_u367(p_p0, msg_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(*T1_).Sup.Sup.Sup.parent = ((Exception*) NIM_NIL);
	raiseExceptionEx((Exception*)T1_, "JsonParsingError", "raiseParseErr", "parsejson.nim", 518);
goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZjson_u5784)(tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.up);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.up);
	}
LA4_: ;
	eqdestroy___system_u3699((*dest_p0).Sup.Sup.Sup.trace);
	eqdestroy___system_u2691((*dest_p0).Sup.Sup.Sup.message);
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.parent);
		if (!T8_) goto LA9_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.parent);
	}
LA9_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZparsejson_u988)(void* dest_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	eqdestroy___pureZjson_u5784((&(*((tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ*) (dest_p0)))));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZjson_u5796)(tyObject_JsonKindError__f7emiekcTJHxgTtsNnPypQ* dest_p0, void* env_p1) {
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.parent, env_p1);
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.up, env_p1);
}
N_LIB_PRIVATE N_NIMCALL(void, eat__pureZparsejson_u885)(tyObject_JsonParser__izA0qNVok9bbh6yzMr1imlg* p_p0, tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw tok_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw T5_;
		if (!((*p_p0).tok == tok_p1)) goto LA3_;
		T5_ = (tyEnum_TokKind__fY817iOTRu9c9btMadTqhgkw)0;
		T5_ = getTok__pureZparsejson_u626(p_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(void)(T5_);
	}
	goto LA1_;
LA3_: ;
	{
		raiseParseErr__pureZparsejson_u820((&(*p_p0)), tokToStr__pureZparsejson_u79[(tok_p1)- 0]);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA1_: ;
	}BeforeRet_: ;
}
