/* Generated by Nim Compiler v1.0.6 */
/*   (c) 2019 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32

#include "nimbase.h"
#include <string.h>
#include <setjmp.h>
#include <stdio.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
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q;
typedef struct tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ;
typedef struct tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw;
typedef struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
typedef struct tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg;
typedef struct tySequence__MlAD6nAPq9bHKla9cWiIZP0g tySequence__MlAD6nAPq9bHKla9cWiIZP0g;
typedef struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ tySequence__oLpBKXzW3hF9aCVMo5EymfQ;
typedef struct tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ;
typedef struct tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ;
typedef struct tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg;
typedef struct tySequence__Ih0V9cYug0VPJyBBGvgEH7Q tySequence__Ih0V9cYug0VPJyBBGvgEH7Q;
typedef struct TSafePoint TSafePoint;
typedef struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA;
typedef struct tyTuple__awOivLjlO76sGdHY7nQUjQ tyTuple__awOivLjlO76sGdHY7nQUjQ;
typedef struct tyTuple__jq7X5k7hWG0tdTZTDkiyGQ tyTuple__jq7X5k7hWG0tdTZTDkiyGQ;
typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 tyEnum_FileMode__ZJfK20XeZ9bv2j1pZjw9aswg;
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct RootObj {
TNimType* m_type;
};
struct Exception {
  RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
NU raiseId;
Exception* up;
};
struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
  Exception Sup;
};
struct tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw {
  tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA Sup;
};
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
NI refcount;
TNimType* typ;
};
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SiRwrEKZdLgxqz9a9aoVBglg[512];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
};
typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
tyArray__0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
NI Field1;
};
typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
NI len;
tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
};
struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
NI minLargeObj;
NI maxLargeObj;
tyArray__SiRwrEKZdLgxqz9a9aoVBglg freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
};
struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
NI counter;
NI max;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
};
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
NI zctThreshold;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
NI gcThreadId;
};
typedef NU8 tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg;
struct tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg {
tySequence__MlAD6nAPq9bHKla9cWiIZP0g* data;
NI counter;
NI first;
NI last;
};
struct tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q {
tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg kind;
union{
struct {NimStringDesc* str;
};
struct {NI64 num;
};
struct {NF fnum;
};
struct {NIM_BOOL bval;
};
struct {tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg fields;
};
struct {tySequence__oLpBKXzW3hF9aCVMo5EymfQ* elems;
};
};
};
typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
struct tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg {
  RootObj Sup;
NI bufpos;
NimStringDesc* buf;
tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input;
NI lineNumber;
NI sentinel;
NI lineStart;
NI offsetBase;
tySet_tyChar__nmiMWKVIe46vacnhAFrQvw refillChars;
};
typedef NU8 tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw;
typedef NU8 tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA;
typedef NU8 tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew;
struct tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ {
  tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg Sup;
NimStringDesc* a;
tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw tok;
tyEnum_JsonEventKind__0zjE9c54eTrq224F5wMcaFA kind;
tyEnum_JsonError__G9cw5MrJXJrcpID5JXaplew err;
tySequence__Ih0V9cYug0VPJyBBGvgEH7Q* state;
NimStringDesc* filename;
NIM_BOOL rawStringLiterals;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClP_0) (Exception* e, void* ClE_0);
void* ClE_0;
} tyProc__NT9bSe2DDkjdtx7j9aov2Z6g;
struct TSafePoint {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
tyProc__NT9bSe2DDkjdtx7j9aov2Z6g raiseAction;
};
typedef N_NIMCALL_PTR(void, tyProc__JQrsH08b4uPTH9cyFPlVOZg) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__9bmhFrLahRsL2hltfRDVtlQ) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s);
typedef N_NIMCALL_PTR(void, tyProc__3svSoGIUJIsHkaBL7q4DAQ) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NI pos);
typedef N_NIMCALL_PTR(NI, tyProc__xflqkf2D1uVClg70czEDHA) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s);
typedef N_NIMCALL_PTR(NI, tyProc__c9c0f59ak4YGQ6neEym8LPKw) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc** buffer, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA slice);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__7jFfqMk9ajToCz6Hv9atCA4A) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc** line);
typedef N_NIMCALL_PTR(NI, tyProc__2VVzVL9bOnKhj1eZKkf9cEuA) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, void* buffer, NI bufLen);
typedef N_NIMCALL_PTR(void, tyProc__ki6p1QyfOkJLQJ9aw5NI0AQ) (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, void* buffer, NI bufLen);
struct tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ {
  RootObj Sup;
tyProc__JQrsH08b4uPTH9cyFPlVOZg closeImpl;
tyProc__9bmhFrLahRsL2hltfRDVtlQ atEndImpl;
tyProc__3svSoGIUJIsHkaBL7q4DAQ setPositionImpl;
tyProc__xflqkf2D1uVClg70czEDHA getPositionImpl;
tyProc__c9c0f59ak4YGQ6neEym8LPKw readDataStrImpl;
tyProc__7jFfqMk9ajToCz6Hv9atCA4A readLineImpl;
tyProc__2VVzVL9bOnKhj1eZKkf9cEuA readDataImpl;
tyProc__2VVzVL9bOnKhj1eZKkf9cEuA peekDataImpl;
tyProc__ki6p1QyfOkJLQJ9aw5NI0AQ writeDataImpl;
tyProc__JQrsH08b4uPTH9cyFPlVOZg flushImpl;
};
struct tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ {
  tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ Sup;
FILE* f;
};
struct tyTuple__awOivLjlO76sGdHY7nQUjQ {
NI Field0;
NI Field1;
NimStringDesc* Field2;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* Field3;
};
struct tyTuple__jq7X5k7hWG0tdTZTDkiyGQ {
NimStringDesc* Field0;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* Field1;
};
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
NCSTRING procname;
NI line;
NCSTRING filename;
};
typedef NU8 tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ;
struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA {
NI a;
NI b;
};
struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ {
  TGenericSeq Sup;
  tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* data[SEQ_DECL_SIZE];
};
struct tySequence__uB9b75OUPRENsBAu4AnoePA {
  TGenericSeq Sup;
  tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
};
struct tySequence__MlAD6nAPq9bHKla9cWiIZP0g {
  TGenericSeq Sup;
  tyTuple__awOivLjlO76sGdHY7nQUjQ data[SEQ_DECL_SIZE];
};
struct tySequence__Ih0V9cYug0VPJyBBGvgEH7Q {
  TGenericSeq Sup;
  tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
static N_INLINE(NI, addInt)(NI a, NI b);
N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NI, chckRange)(NI i, NI a, NI b);
N_NOINLINE(void, raiseRangeError)(NI64 val);
N_LIB_PRIVATE N_NIMCALL(void, escapeJson__YID1CO5Pb6vZOjpjrUt6Lw)(NimStringDesc* s, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__M04YC71iJg1N7gBF3HZTngsystem)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_LIB_PRIVATE N_NIMCALL(void, escapeJsonUnquoted__YID1CO5Pb6vZOjpjrUt6Lw_2)(NimStringDesc* s, NimStringDesc** result);
N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x, NI len);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ*, newFileStream__cwYJiP3D7DOTCJxCdBqBZQ)(NimStringDesc* filename, tyEnum_FileMode__ZJfK20XeZ9bv2j1pZjw9aswg mode, NI bufSize);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef__AT1eRuflKWyTTBdLjEDZbg_3system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr);
static N_INLINE(void, decRef__AT1eRuflKWyTTBdLjEDZbgsystem)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(void, rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__Y66tOYFjgwJ0k4aLz4bc0Q)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__WzaWBorCQCRzsZmH9bGowsQ)(tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc* filename);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__JE6t4x7Z3v2iVz27Nx0MRAmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(void, open__caSf5pJv2JnMMpxc9bAhdpA)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my, tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input, NimStringDesc* filename, NIM_BOOL rawStringLiterals);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_LIB_PRIVATE N_NIMCALL(tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw, getTok__9cGllg9a4hN9cmfjsUw6zu39bQ)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__djUCXAtTZaoCKdBhcNKguQ)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJStringMove__19ag6cl4fMjxytc9arHmLIbw)(NimStringDesc* s);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
static N_NIMCALL(void, Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ)(void* p, NI op);
static N_NIMCALL(void, Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg)(void* p, NI op);
N_NOINLINE(void, raiseFieldError)(NimStringDesc* f);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJInt__kuRQ9bONMtpC9bToqIhX9cETA)(NI64 n);
N_LIB_PRIVATE N_NIMCALL(NI64, nsuParseBiggestInt)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJFloat__OmZ5rJGcoSWuPXnB4XrVzw)(NF n);
N_LIB_PRIVATE N_NIMCALL(NF, nsuParseFloat)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJBool__cUNUWspDCIapW3x6fFYyZQ)(NIM_BOOL b);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJNull__nXwnFPu9beTnGPwglrr7ztA)(void);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJObject__nXwnFPu9beTnGPwglrr7ztA_2)(void);
N_LIB_PRIVATE N_NIMCALL(void, initOrderedTable__Xnq4D4mCe8fymnuh9c7PQlw)(NI initialSize, tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* Result);
N_LIB_PRIVATE N_NOINLINE(void, raiseParseErr__VeBRAkMdST9cPQW1Rqk8vwA)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, NimStringDesc* msg) __attribute__((noreturn));
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_LIB_PRIVATE N_NIMCALL(void, eat__mMX9c3cw7Tuh0xvz23drvSg)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw tok);
static N_INLINE(void, X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* obj, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___vlnBr1uIbtu0ntnZh6Askg)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJArray__nXwnFPu9beTnGPwglrr7ztA_3)(void);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_LIB_PRIVATE N_NIMCALL(void, add__8FFZVkexaQ73y9aREGlrY9bQ)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* father, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child);
N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
static N_INLINE(void, popSafePoint)(void);
static N_INLINE(void, close__8dle9apIE9cTJGDlKOnqgjgAparsejson)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
N_LIB_PRIVATE N_NIMCALL(void, close__m9bpQUVeRkyuyv4zAGVgY9bw_3)(tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* L);
N_NIMCALL(void, reraiseException)(void);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasKey__UX29cFESnmC3SpxKAQuMIcg)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg t, NimStringDesc* key);
static N_INLINE(NI, len__dGleB9bNysrQUN9cReogzNpQtables)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg t);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, equalMem__Bj9c9cm9cBM9coLsuNsT5BvZ9awsystem)(void* a, void* b, NI size);
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___WUEoyFlf3ou2qTAgb1SQ9ag)(tySequence__oLpBKXzW3hF9aCVMo5EymfQ* x, tySequence__oLpBKXzW3hF9aCVMo5EymfQ* y);
static N_INLINE(NIM_BOOL, isFilled__5Qpmu5QqwDY0esVXn6wf7wtables)(NI hcode);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___ufBNJwWgb20cY5Bv3NMT7A)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* a, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* b);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**, X5BX5D___l9atGRY9bA25fn4p5uueZfUQ)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_LIB_PRIVATE N_NIMCALL(NI, len__Og3BmQpaL5V6gYg5JnWK3Q)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n);
N_LIB_PRIVATE N_NIMCALL(void, toUgly__6GftN2FLfP2Tuz9csidVHFA)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node);
N_LIB_PRIVATE N_NIMCALL(void, addInt__mftMOxbyu0h4yByfs3sqjA)(NimStringDesc** result, NI64 x);
N_LIB_PRIVATE N_NIMCALL(void, addFloat__R7rBahgTSmBayFrvvbK9bKQ)(NimStringDesc** result, NF x);
N_LIB_PRIVATE N_NIMCALL(void, toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent, NIM_BOOL ml, NIM_BOOL lstArr, NI currIndent);
N_LIB_PRIVATE N_NIMCALL(void, indent__5gehovIFYjiBH1k6tFdATg)(NimStringDesc** s, NI i);
static N_INLINE(NimStringDesc*, spaces__zuWfkBFTPm31FNfSpe2HQQstrutils)(NI n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_LIB_PRIVATE N_NIMCALL(void, nl__cdUf7ymWwwJY69aiEWqMGfg)(NimStringDesc** s, NIM_BOOL ml);
N_LIB_PRIVATE N_NIMCALL(NI, newIndent__8dltImVNwFyjNtT9boLnYdg)(NI curr, NI indent, NIM_BOOL ml);
static N_INLINE(NI, subInt)(NI a, NI b);
extern TNimType NTI__HMIVdYjdZYWskTmTQVo5BQ_;
extern TNimType NTI__iLZrPn9anoh9ad1MmO0RczFw_;
extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__IcYaEuuWivYAS86vFMTS3Q;
extern TNimType NTI__KWIQnzXEOUqdWsnCUL9atyQ_;
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
TNimType NTI__df9bshXB7C9cTiWPIOtX3j1Q_;
TNimType NTI__RUngo7nCHe6O8aBGIcrhtg_;
extern TNimType NTI__77mFvmsOLKik79ci2hXkHEg_;
extern TNimType NTI__Aav8dQoMlCFnZRxA0IhTHQ_;
extern TNimType NTI__w9bl9a1ul9ctRJWiMl9cNnIMvg_;
extern TNimType NTI__VaVACK0bpYmqIQ0mKcHfQQ_;
extern TNimType NTI__ZZvSdVkA2s2sIyifu4cpkg_;
TNimType NTI__oLpBKXzW3hF9aCVMo5EymfQ_;
TNimType NTI__zfzzuQ8txrdZAYK0WGWpHg_;
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_3, "\"", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_4, "\\n", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_5, "\\b", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_6, "\\f", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_7, "\\t", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_8, "\\v", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_9, "\\r", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_10, "\\\"", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_11, "\\u000", 5);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_12, "\\u00", 4);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_13, "\\\\", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_15, "iterators.nim(207, 11) `len(a) == L` the length of the string c"
"hanged while iterating over it", 93);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_16, "cannot read from file: ", 23);
TNimNode* NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[8];
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_21, "\'str\' is not accessible using discriminant \'kind\' of type \'Json"
"NodeObj\'", 71);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_22, "string literal as key", 21);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_23, "json.nim(358, 9) `obj.kind == JObject` ", 39);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_24, "\'fields\' is not accessible using discriminant \'kind\' of type \'J"
"sonNodeObj\'", 74);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_25, "json.nim(284, 10) `father.kind == JArray` ", 42);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_26, "\'elems\' is not accessible using discriminant \'kind\' of type \'Js"
"onNodeObj\'", 73);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_27, "{", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_28, "json.nim(492, 9) `node.kind == JObject` ", 40);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_29, "\'num\' is not accessible using discriminant \'kind\' of type \'Json"
"NodeObj\'", 71);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_30, "\'fnum\' is not accessible using discriminant \'kind\' of type \'Jso"
"nNodeObj\'", 72);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_31, "\'bval\' is not accessible using discriminant \'kind\' of type \'Jso"
"nNodeObj\'", 72);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_32, "tables.nim(1650, 11) `len(t) ==\012    L` the length of the table "
"changed while iterating over it", 94);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_34, "[", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_35, ",", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_37, "iterators.nim(189, 11) `len(a) == L` the length of the seq chan"
"ged while iterating over it", 90);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_38, "]", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_39, ":", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_40, "}", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_41, "true", 4);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_42, "false", 5);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_43, "null", 4);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_44, "\012", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_45, " ", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_48, ": ", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_49, "{}", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_52, "[]", 2);
static N_INLINE(NI, addInt)(NI a, NI b) {	NI result;
{	result = (NI)0;
	result = (NI)((NU32)(a) + (NU32)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI) 0) <= (NI)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (((NI) 0) <= (NI)(result ^ b));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, chckRange)(NI i, NI a, NI b) {	NI result;
{	result = (NI)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (a <= i);
		if (!(T3_)) goto LA4_;
		T3_ = (i <= b);
		LA4_: ;
		if (!T3_) goto LA5_;
		result = i;
		goto BeforeRet_;
	}
	goto LA1_;
	LA5_: ;
	{
		raiseRangeError(((NI64) (i)));
	}
	LA1_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest, source, ((size_t) (size)));
}
static N_INLINE(void, copyMem__M04YC71iJg1N7gBF3HZTngsystem)(void* dest, void* source, NI size) {	nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {	{
		if (!!((src == NIM_NIL))) goto LA3_;
		copyMem__M04YC71iJg1N7gBF3HZTngsystem(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
		(*dest).Sup.len += (*src).Sup.len;
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, escapeJsonUnquoted__YID1CO5Pb6vZOjpjrUt6Lw_2)(NimStringDesc* s, NimStringDesc** result) {	{
		NIM_CHAR c;
		NI i;
		NI L;
		c = (NIM_CHAR)0;
		i = ((NI) 0);
		L = (s ? s->Sup.len : 0);
		{
			while (1) {
				NI TM__9b9bytt1stv9cZ8uqII7HFgew_14;
				if (!(i < L)) goto LA3;
				if ((NU)(i) >= (NU)(s ? s->Sup.len : 0)) raiseIndexError2(i,(s ? s->Sup.len : 0)-1);
				c = s->data[i];
				switch (((NU8)(c))) {
				case 10:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_4));
				}
				break;
				case 8:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_5));
				}
				break;
				case 12:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_6));
				}
				break;
				case 9:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_7));
				}
				break;
				case 11:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_8));
				}
				break;
				case 13:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_9));
				}
				break;
				case 34:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_10));
				}
				break;
				case 0 ... 7:
				{
					NimStringDesc* T12_;
					NimStringDesc* T13_;
					T12_ = (NimStringDesc*)0;
					T13_ = (NimStringDesc*)0;
					T13_ = nimIntToStr(((NU8)(c)));
					T12_ = rawNewString((T13_ ? T13_->Sup.len : 0) + 5);
appendString(T12_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_11));
appendString(T12_, T13_);
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T12_ ? T12_->Sup.len : 0) + 0));
appendString((*result), T12_);
				}
				break;
				case 14 ... 31:
				{
					NimStringDesc* T15_;
					NimStringDesc* T16_;
					T15_ = (NimStringDesc*)0;
					T16_ = (NimStringDesc*)0;
					T16_ = nsuToHex(((NI64) (((NU8)(c)))), ((NI) 2));
					T15_ = rawNewString((T16_ ? T16_->Sup.len : 0) + 4);
appendString(T15_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_12));
appendString(T15_, T16_);
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T15_ ? T15_->Sup.len : 0) + 0));
appendString((*result), T15_);
				}
				break;
				case 92:
				{
					unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_13));
				}
				break;
				default:
				{
					unsureAsgnRef((void**) (&(*result)), addChar((*result), c));
				}
				break;
				}
				TM__9b9bytt1stv9cZ8uqII7HFgew_14 = addInt(i, ((NI) 1));
				i = (NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_14);
				{
					if (!!(((s ? s->Sup.len : 0) == L))) goto LA21_;
					failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_15));
				}
				LA21_: ;
			} LA3: ;
		}
	}
}
N_LIB_PRIVATE N_NIMCALL(void, escapeJson__YID1CO5Pb6vZOjpjrUt6Lw)(NimStringDesc* s, NimStringDesc** result) {	unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_3));
	escapeJsonUnquoted__YID1CO5Pb6vZOjpjrUt6Lw_2(s, result);
	unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_3));
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, escapeJson__NGTWHwdUy0ADNv9alK3ECRA)(NimStringDesc* s) {	NimStringDesc* result;
	NI TM__9b9bytt1stv9cZ8uqII7HFgew_2;
	result = (NimStringDesc*)0;
	TM__9b9bytt1stv9cZ8uqII7HFgew_2 = addInt((s ? s->Sup.len : 0), (NI)((NI32)((s ? s->Sup.len : 0)) >> (NU32)(((NI) 3))));
	result = rawNewString(((NI)chckRange((NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_2), ((NI) 0), ((NI) 2147483647))));
	escapeJson__YID1CO5Pb6vZOjpjrUt6Lw(s, (&result));
	return result;
}
static N_INLINE(void, incRef__AT1eRuflKWyTTBdLjEDZbg_3system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
}
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr) {	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
	result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
	result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) ((NI)((NU32)(((NI) (ptrdiff_t) (usr))) - (NU32)(((NI) 8)))));
	return result;
}
static N_INLINE(void, rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {	addZCT__Y66tOYFjgwJ0k4aLz4bc0Q((&gch__IcYaEuuWivYAS86vFMTS3Q.zct), c);
}
static N_INLINE(void, decRef__AT1eRuflKWyTTBdLjEDZbgsystem)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {	(*c).refcount = (NI)((NU32)((*c).refcount) - (NU32)(((NI) 8)));
	{
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3_;
		rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system(c);
	}
	LA3_: ;
}
static N_INLINE(void, asgnRef)(void** dest, void* src) {	{
		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T5_ = usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem(src);
		incRef__AT1eRuflKWyTTBdLjEDZbg_3system(T5_);
	}
	LA3_: ;
	{
		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
		if (!!(((*dest) == NIM_NIL))) goto LA8_;
		T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T10_ = usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem((*dest));
		decRef__AT1eRuflKWyTTBdLjEDZbgsystem(T10_);
	}
	LA8_: ;
	(*dest) = src;
}
static N_INLINE(void, nimSetMem__JE6t4x7Z3v2iVz27Nx0MRAmemory)(void* a, int v, NI size) {	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {	nimSetMem__JE6t4x7Z3v2iVz27Nx0MRAmemory(p, ((int) 0), size);
}
static N_INLINE(void, pushSafePoint)(TSafePoint* s) {	(*s).hasRaiseAction = NIM_FALSE;
	(*s).prev = excHandler__rqLlY5bs9atDw2OXYqJEn5g;
	excHandler__rqLlY5bs9atDw2OXYqJEn5g = s;
}
static N_NIMCALL(void, Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ)(void* p, NI op) {
	tySequence__oLpBKXzW3hF9aCVMo5EymfQ* a;
	NI T1_;
	a = (tySequence__oLpBKXzW3hF9aCVMo5EymfQ*)p;
	T1_ = (NI)0;
	for (T1_ = 0; T1_ < (a ? a->Sup.len : 0); T1_++) {
	nimGCvisit((void*)a->data[T1_], op);
	}
}
static N_NIMCALL(void, Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg)(void* p, NI op) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* a;
	a = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)p;
	switch ((*a).kind) {
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
	nimGCvisit((void*)(*a).str, op);
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
	nimGCvisit((void*)(*a).fields.data, op);
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
	nimGCvisit((void*)(*a).elems, op);
	break;
	} 
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJStringMove__19ag6cl4fMjxytc9arHmLIbw)(NimStringDesc* s) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4);
	result = T1_;
	if (!(((16 &(1U<<((NU)((*result).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
	asgnRef((void**) (&(*result).str), s);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJInt__kuRQ9bONMtpC9bToqIhX9cETA)(NI64 n) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2);
	(*T1_).num = n;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJFloat__OmZ5rJGcoSWuPXnB4XrVzw)(NF n) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3);
	(*T1_).fnum = n;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJBool__cUNUWspDCIapW3x6fFYyZQ)(NIM_BOOL b) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1);
	(*T1_).bval = b;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJNull__nXwnFPu9beTnGPwglrr7ztA)(void) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0);
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJObject__nXwnFPu9beTnGPwglrr7ztA_2)(void) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5);
	initOrderedTable__Xnq4D4mCe8fymnuh9c7PQlw(((NI) 4), (&(*T1_).fields));
	result = T1_;
	return result;
}
static N_INLINE(void, X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* obj, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val) {	{
		if (!!(((*obj).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5)))) goto LA3_;
		failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_23));
	}
	LA3_: ;
	if (!(((32 &(1U<<((NU)((*obj).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
	X5BX5Deq___vlnBr1uIbtu0ntnZh6Askg((&(*obj).fields), key, val);
}
static N_INLINE(void, nimGCunrefNoCycle)(void* p) {	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_;
	T1_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
	T1_ = usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem(p);
	decRef__AT1eRuflKWyTTBdLjEDZbgsystem(T1_);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJArray__nXwnFPu9beTnGPwglrr7ztA_3)(void) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6);
	if ((*T1_).elems) { nimGCunrefNoCycle((*T1_).elems); (*T1_).elems = NIM_NIL; }
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, add__8FFZVkexaQ73y9aREGlrY9bQ)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* father, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child) {	NI T5_;
	{
		if (!!(((*father).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6)))) goto LA3_;
		failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_25));
	}
	LA3_: ;
	if (!(((64 &(1U<<((NU)((*father).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
	asgnRef((void**) (&(*father).elems), (tySequence__oLpBKXzW3hF9aCVMo5EymfQ*) incrSeqV3((TGenericSeq*)((*father).elems), (&NTI__oLpBKXzW3hF9aCVMo5EymfQ_)));
	T5_ = (*father).elems->Sup.len++;
	asgnRef((void**) (&(*father).elems->data[T5_]), child);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__djUCXAtTZaoCKdBhcNKguQ)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	switch ((*p).tok) {
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T2_;
		result = newJStringMove__19ag6cl4fMjxytc9arHmLIbw((*p).a);
		unsureAsgnRef((void**) (&(*p).a), ((NimStringDesc*) NIM_NIL));
		T2_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T2_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T2_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3):
	{
		NI64 T4_;
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T5_;
		T4_ = (NI64)0;
		T4_ = nsuParseBiggestInt((*p).a);
		result = newJInt__kuRQ9bONMtpC9bToqIhX9cETA(T4_);
		T5_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T5_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T5_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4):
	{
		NF T7_;
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T8_;
		T7_ = (NF)0;
		T7_ = nsuParseFloat((*p).a);
		result = newJFloat__OmZ5rJGcoSWuPXnB4XrVzw(T7_);
		T8_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T8_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T8_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T10_;
		result = newJBool__cUNUWspDCIapW3x6fFYyZQ(NIM_TRUE);
		T10_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T10_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T10_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T12_;
		result = newJBool__cUNUWspDCIapW3x6fFYyZQ(NIM_FALSE);
		T12_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T12_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T12_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T14_;
		result = newJNull__nXwnFPu9beTnGPwglrr7ztA();
		T14_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T14_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T14_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T16_;
		result = newJObject__nXwnFPu9beTnGPwglrr7ztA_2();
		T16_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T16_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T16_);
		{
			while (1) {
				NimStringDesc* key;
				tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T23_;
				tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val;
				tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T28_;
				if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9)))) goto LA18;
				{
					if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2)))) goto LA21_;
					raiseParseErr__VeBRAkMdST9cPQW1Rqk8vwA((&(*p)), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_22));
				}
				LA21_: ;
				key = copyString((*p).a);
				T23_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
				T23_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
				(void)(T23_);
				eat__mMX9c3cw7Tuh0xvz23drvSg(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 12));
				val = parseJson__djUCXAtTZaoCKdBhcNKguQ(p);
				X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson(result, key, val);
				{
					if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13)))) goto LA26_;
					goto LA17;
				}
				LA26_: ;
				T28_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
				T28_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
				(void)(T28_);
			} LA18: ;
		} LA17: ;
		eat__mMX9c3cw7Tuh0xvz23drvSg(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9));
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T30_;
		result = newJArray__nXwnFPu9beTnGPwglrr7ztA_3();
		T30_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T30_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		(void)(T30_);
		{
			while (1) {
				tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T33_;
				tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T38_;
				if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11)))) goto LA32;
				T33_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
				T33_ = parseJson__djUCXAtTZaoCKdBhcNKguQ(p);
				add__8FFZVkexaQ73y9aREGlrY9bQ(result, T33_);
				{
					if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13)))) goto LA36_;
					goto LA31;
				}
				LA36_: ;
				T38_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
				T38_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
				(void)(T38_);
			} LA32: ;
		} LA31: ;
		eat__mMX9c3cw7Tuh0xvz23drvSg(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11));
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 0):
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9):
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11):
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 12):
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13):
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1):
	{
		raiseParseErr__VeBRAkMdST9cPQW1Rqk8vwA((&(*p)), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_27));
	}
	break;
	}
	return result;
}
static N_INLINE(void, popSafePoint)(void) {	excHandler__rqLlY5bs9atDw2OXYqJEn5g = (*excHandler__rqLlY5bs9atDw2OXYqJEn5g).prev;
}
static N_INLINE(void, close__8dle9apIE9cTJGDlKOnqgjgAparsejson)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {	tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* T1_;
	T1_ = (tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg*)0;
	T1_ = &my->Sup;
	close__m9bpQUVeRkyuyv4zAGVgY9bw_3(T1_);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__WzaWBorCQCRzsZmH9bGowsQ)(tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc* filename) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* volatile result;
	tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ p;
	TSafePoint TM__9b9bytt1stv9cZ8uqII7HFgew_17;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	nimZeroMem((void*)(&p), sizeof(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ));
	p.Sup.Sup.m_type = (&NTI__KWIQnzXEOUqdWsnCUL9atyQ_);
	open__caSf5pJv2JnMMpxc9bAhdpA((&p), s, filename, NIM_FALSE);
	pushSafePoint(&TM__9b9bytt1stv9cZ8uqII7HFgew_17);
	TM__9b9bytt1stv9cZ8uqII7HFgew_17.status = setjmp(TM__9b9bytt1stv9cZ8uqII7HFgew_17.context);
	if (TM__9b9bytt1stv9cZ8uqII7HFgew_17.status == 0) {
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T2_;
		T2_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T2_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ((&p));
		(void)(T2_);
		result = parseJson__djUCXAtTZaoCKdBhcNKguQ((&p));
		eat__mMX9c3cw7Tuh0xvz23drvSg((&p), ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1));
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		close__8dle9apIE9cTJGDlKOnqgjgAparsejson((&p));
	}
	if (TM__9b9bytt1stv9cZ8uqII7HFgew_17.status != 0) reraiseException();
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseFile__Q9bbQtVlwjGc4S8fnWe9b3YA)(NimStringDesc* filename) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_FileStreamObj__9bEVSsOIpkY9cf5lCtaS39bPQ* stream;
	tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* T6_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	stream = newFileStream__cwYJiP3D7DOTCJxCdBqBZQ(filename, ((tyEnum_FileMode__ZJfK20XeZ9bv2j1pZjw9aswg) 0), ((NI) -1));
	{
		tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw* eX60gensym466802_;
		NimStringDesc* T5_;
		if (!(stream == NIM_NIL)) goto LA3_;
		eX60gensym466802_ = (tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw*)0;
		eX60gensym466802_ = (tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw*) newObj((&NTI__HMIVdYjdZYWskTmTQVo5BQ_), sizeof(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw));
		(*eX60gensym466802_).Sup.Sup.Sup.m_type = (&NTI__iLZrPn9anoh9ad1MmO0RczFw_);
		(*eX60gensym466802_).Sup.Sup.name = "IOError";
		T5_ = (NimStringDesc*)0;
		T5_ = rawNewString((filename ? filename->Sup.len : 0) + 23);
appendString(T5_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_16));
appendString(T5_, filename);
		asgnRef((void**) (&(*eX60gensym466802_).Sup.Sup.message), T5_);
		asgnRef((void**) (&(*eX60gensym466802_).Sup.Sup.parent), NIM_NIL);
		raiseExceptionEx((Exception*)eX60gensym466802_, "IOError", "parseFile", "json.nim", 877);
	}
	LA3_: ;
	T6_ = (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ*)0;
	T6_ = &stream->Sup;
	result = parseJson__WzaWBorCQCRzsZmH9bGowsQ(T6_, filename);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasKey__zrDHfVBiQiPv9bNJ29c1ZINg)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NimStringDesc* key) {	NIM_BOOL result;
	result = (NIM_BOOL)0;
	{
		if (!!(((*node).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5)))) goto LA3_;
		failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_28));
	}
	LA3_: ;
	if (!(((32 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
	result = hasKey__UX29cFESnmC3SpxKAQuMIcg((*node).fields, key);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getStr__QeJX1ptVmfOrOg9cwOVpcAA)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n, NimStringDesc* default_0) {	NimStringDesc* result;
{	result = (NimStringDesc*)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (n == 0);
		if (T3_) goto LA4_;
		T3_ = !(((*n).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4)));
		LA4_: ;
		if (!T3_) goto LA5_;
		result = copyString(default_0);
		goto BeforeRet_;
	}
	goto LA1_;
	LA5_: ;
	{
		if (!(((16 &(1U<<((NU)((*n).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
		result = copyString((*n).str);
		goto BeforeRet_;
	}
	LA1_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, len__dGleB9bNysrQUN9cReogzNpQtables)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg t) {	NI result;
	result = (NI)0;
	result = t.counter;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, len__Og3BmQpaL5V6gYg5JnWK3Q)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n) {	NI result;
	result = (NI)0;
	switch ((*n).kind) {
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
	{
		NI T2_;
		if (!(((64 &(1U<<((NU)((*n).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
		T2_ = ((*n).elems ? (*n).elems->Sup.len : 0);
		result = T2_;
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
	{
		if (!(((32 &(1U<<((NU)((*n).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
		result = len__dGleB9bNysrQUN9cReogzNpQtables((*n).fields);
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {	int result;
	result = (int)0;
	result = memcmp(a, b, ((size_t) (size)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__Bj9c9cm9cBM9coLsuNsT5BvZ9awsystem)(void* a, void* b, NI size) {	NIM_BOOL result;
	int T1_;
	result = (NIM_BOOL)0;
	T1_ = (int)0;
	T1_ = nimCmpMem(a, b, size);
	result = (T1_ == ((NI32) 0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {	NIM_BOOL result;
	NI alen;
	NI blen;
{	result = (NIM_BOOL)0;
	alen = (a ? a->Sup.len : 0);
	blen = (b ? b->Sup.len : 0);
	{
		if (!(alen == blen)) goto LA3_;
		{
			if (!(alen == ((NI) 0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
		LA7_: ;
		result = equalMem__Bj9c9cm9cBM9coLsuNsT5BvZ9awsystem(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
		goto BeforeRet_;
	}
	LA3_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, isFilled__5Qpmu5QqwDY0esVXn6wf7wtables)(NI hcode) {	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = !((hcode == ((NI) 0)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___ufBNJwWgb20cY5Bv3NMT7A)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* a, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* b) {	NIM_BOOL result;
{	result = (NIM_BOOL)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 T10_;
		T10_ = (NIM_BOOL)0;
		T10_ = (b == 0);
		if (T10_) goto LA11_;
		T10_ = !(((*a).kind == (*b).kind));
		LA11_: ;
		if (!T10_) goto LA12_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	goto LA1_;
	LA12_: ;
	{
		switch ((*a).kind) {
		case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
		{
			if (!(((16 &(1U<<((NU)((*a).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
			if (!(((16 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
			result = eqStrings((*a).str, (*b).str);
		}
		break;
		case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
		{
			if (!(((4 &(1U<<((NU)((*a).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_29));
			if (!(((4 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_29));
			result = ((*a).num == (*b).num);
		}
		break;
		case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
		{
			if (!(((8 &(1U<<((NU)((*a).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_30));
			if (!(((8 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_30));
			result = ((*a).fnum == (*b).fnum);
		}
		break;
		case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
		{
			if (!(((2 &(1U<<((NU)((*a).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_31));
			if (!(((2 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_31));
			result = ((*a).bval == (*b).bval);
		}
		break;
		case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
		{
			result = NIM_TRUE;
		}
		break;
		case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
		{
			if (!(((64 &(1U<<((NU)((*a).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
			if (!(((64 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
			result = eqeq___WUEoyFlf3ou2qTAgb1SQ9ag((*a).elems, (*b).elems);
		}
		break;
		case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
		{
			{
				NI T24_;
				NI T25_;
				if (!(((32 &(1U<<((NU)((*a).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
				T24_ = (NI)0;
				T24_ = len__dGleB9bNysrQUN9cReogzNpQtables((*a).fields);
				if (!(((32 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
				T25_ = (NI)0;
				T25_ = len__dGleB9bNysrQUN9cReogzNpQtables((*b).fields);
				if (!!((T24_ == T25_))) goto LA26_;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
			LA26_: ;
			{
				NimStringDesc* key;
				tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val;
				tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg colontmp_;
				NI L;
				key = (NimStringDesc*)0;
				val = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
				nimZeroMem((void*)(&colontmp_), sizeof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg));
				if (!(((32 &(1U<<((NU)((*a).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
				colontmp_.data = (*a).fields.data;
				colontmp_.counter = (*a).fields.counter;
				colontmp_.first = (*a).fields.first;
				colontmp_.last = (*a).fields.last;
				L = len__dGleB9bNysrQUN9cReogzNpQtables(colontmp_);
				{
					NI h;
					if (!(((NI) 0) < colontmp_.counter)) goto LA31_;
					h = colontmp_.first;
					{
						while (1) {
							NI nxt;
							if (!(((NI) 0) <= h)) goto LA34;
							if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
							nxt = colontmp_.data->data[h].Field1;
							{
								NIM_BOOL T37_;
								if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
								T37_ = (NIM_BOOL)0;
								T37_ = isFilled__5Qpmu5QqwDY0esVXn6wf7wtables(colontmp_.data->data[h].Field0);
								if (!T37_) goto LA38_;
								if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
								key = colontmp_.data->data[h].Field2;
								if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
								val = colontmp_.data->data[h].Field3;
								{
									NIM_BOOL T42_;
									if (!(((32 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
									T42_ = (NIM_BOOL)0;
									T42_ = hasKey__UX29cFESnmC3SpxKAQuMIcg((*b).fields, key);
									if (!!(T42_)) goto LA43_;
									result = NIM_FALSE;
									goto BeforeRet_;
								}
								LA43_: ;
								{
									tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q** T47_;
									NIM_BOOL T48_;
									if (!(((32 &(1U<<((NU)((*b).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
									T47_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**)0;
									T47_ = X5BX5D___l9atGRY9bA25fn4p5uueZfUQ((&(*b).fields), key);
									T48_ = (NIM_BOOL)0;
									T48_ = eqeq___ufBNJwWgb20cY5Bv3NMT7A((*T47_), val);
									if (!!(T48_)) goto LA49_;
									result = NIM_FALSE;
									goto BeforeRet_;
								}
								LA49_: ;
								{
									NI T53_;
									T53_ = (NI)0;
									T53_ = len__dGleB9bNysrQUN9cReogzNpQtables(colontmp_);
									if (!!((T53_ == L))) goto LA54_;
									failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_32));
								}
								LA54_: ;
							}
							LA38_: ;
							h = nxt;
						} LA34: ;
					}
				}
				LA31_: ;
			}
			result = NIM_TRUE;
		}
		break;
		}
	}
	LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___HoVDUa0lAOcINNYBrrSTiA)(tyTuple__jq7X5k7hWG0tdTZTDkiyGQ* keyVals, NI keyValsLen_0) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
{	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	{
		if (!(keyValsLen_0 == ((NI) 0))) goto LA3_;
		result = newJArray__nXwnFPu9beTnGPwglrr7ztA_3();
		goto BeforeRet_;
	}
	LA3_: ;
	result = newJObject__nXwnFPu9beTnGPwglrr7ztA_2();
	{
		NimStringDesc* key;
		tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val;
		NI i;
		key = (NimStringDesc*)0;
		val = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
		i = ((NI) 0);
		{
			while (1) {
				NI TM__9b9bytt1stv9cZ8uqII7HFgew_33;
				if (!(i < keyValsLen_0)) goto LA7;
				if ((NU)(i) >= (NU)(keyValsLen_0)) raiseIndexError2(i,keyValsLen_0-1);
				key = keyVals[i].Field0;
				if ((NU)(i) >= (NU)(keyValsLen_0)) raiseIndexError2(i,keyValsLen_0-1);
				val = keyVals[i].Field1;
				if (!(((32 &(1U<<((NU)((*result).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
				X5BX5Deq___vlnBr1uIbtu0ntnZh6Askg((&(*result).fields), key, val);
				TM__9b9bytt1stv9cZ8uqII7HFgew_33 = addInt(i, ((NI) 1));
				i = (NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_33);
			} LA7: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___19ag6cl4fMjxytc9arHmLIbw_2)(NimStringDesc* s) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	NimStringDesc* T2_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4);
	T2_ = (NimStringDesc*)0;
	T2_ = (*T1_).str; (*T1_).str = copyStringRC1(s);
	if (T2_) nimGCunrefNoCycle(T2_);
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___NSr46Qz23yGk4m9csPSbQBQ)(NI n) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2);
	(*T1_).num = ((NI64) (n));
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, toUgly__6GftN2FLfP2Tuz9csidVHFA)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node) {	NIM_BOOL comma;
	comma = NIM_FALSE;
	switch ((*node).kind) {
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
	{
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_34));
		{
			tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child;
			tySequence__oLpBKXzW3hF9aCVMo5EymfQ* colontmp_;
			NI i;
			NI L;
			NI T3_;
			child = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
			colontmp_ = (tySequence__oLpBKXzW3hF9aCVMo5EymfQ*)0;
			if (!(((64 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
			colontmp_ = (*node).elems;
			i = ((NI) 0);
			T3_ = (colontmp_ ? colontmp_->Sup.len : 0);
			L = T3_;
			{
				while (1) {
					NI TM__9b9bytt1stv9cZ8uqII7HFgew_36;
					if (!(i < L)) goto LA5;
					if ((NU)(i) >= (NU)(colontmp_ ? colontmp_->Sup.len : 0)) raiseIndexError2(i,(colontmp_ ? colontmp_->Sup.len : 0)-1);
					child = colontmp_->data[i];
					{
						if (!comma) goto LA8_;
						unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_35));
					}
					goto LA6_;
					LA8_: ;
					{
						comma = NIM_TRUE;
					}
					LA6_: ;
					toUgly__6GftN2FLfP2Tuz9csidVHFA(result, child);
					TM__9b9bytt1stv9cZ8uqII7HFgew_36 = addInt(i, ((NI) 1));
					i = (NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_36);
					{
						NI T13_;
						T13_ = (colontmp_ ? colontmp_->Sup.len : 0);
						if (!!((T13_ == L))) goto LA14_;
						failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_37));
					}
					LA14_: ;
				} LA5: ;
			}
		}
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_38));
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
	{
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_27));
		{
			NimStringDesc* key;
			tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* value;
			tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg colontmp__2;
			NI L_2;
			key = (NimStringDesc*)0;
			value = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
			nimZeroMem((void*)(&colontmp__2), sizeof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg));
			if (!(((32 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
			colontmp__2.data = (*node).fields.data;
			colontmp__2.counter = (*node).fields.counter;
			colontmp__2.first = (*node).fields.first;
			colontmp__2.last = (*node).fields.last;
			L_2 = len__dGleB9bNysrQUN9cReogzNpQtables(colontmp__2);
			{
				NI h;
				if (!(((NI) 0) < colontmp__2.counter)) goto LA20_;
				h = colontmp__2.first;
				{
					while (1) {
						NI nxt;
						if (!(((NI) 0) <= h)) goto LA23;
						if ((NU)(h) >= (NU)(colontmp__2.data ? colontmp__2.data->Sup.len : 0)) raiseIndexError2(h,(colontmp__2.data ? colontmp__2.data->Sup.len : 0)-1);
						nxt = colontmp__2.data->data[h].Field1;
						{
							NIM_BOOL T26_;
							if ((NU)(h) >= (NU)(colontmp__2.data ? colontmp__2.data->Sup.len : 0)) raiseIndexError2(h,(colontmp__2.data ? colontmp__2.data->Sup.len : 0)-1);
							T26_ = (NIM_BOOL)0;
							T26_ = isFilled__5Qpmu5QqwDY0esVXn6wf7wtables(colontmp__2.data->data[h].Field0);
							if (!T26_) goto LA27_;
							if ((NU)(h) >= (NU)(colontmp__2.data ? colontmp__2.data->Sup.len : 0)) raiseIndexError2(h,(colontmp__2.data ? colontmp__2.data->Sup.len : 0)-1);
							key = colontmp__2.data->data[h].Field2;
							if ((NU)(h) >= (NU)(colontmp__2.data ? colontmp__2.data->Sup.len : 0)) raiseIndexError2(h,(colontmp__2.data ? colontmp__2.data->Sup.len : 0)-1);
							value = colontmp__2.data->data[h].Field3;
							{
								if (!comma) goto LA31_;
								unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_35));
							}
							goto LA29_;
							LA31_: ;
							{
								comma = NIM_TRUE;
							}
							LA29_: ;
							escapeJson__YID1CO5Pb6vZOjpjrUt6Lw(key, result);
							unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_39));
							toUgly__6GftN2FLfP2Tuz9csidVHFA(result, value);
							{
								NI T36_;
								T36_ = (NI)0;
								T36_ = len__dGleB9bNysrQUN9cReogzNpQtables(colontmp__2);
								if (!!((T36_ == L_2))) goto LA37_;
								failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_32));
							}
							LA37_: ;
						}
						LA27_: ;
						h = nxt;
					} LA23: ;
				}
			}
			LA20_: ;
		}
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_40));
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
	{
		if (!(((16 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
		escapeJson__YID1CO5Pb6vZOjpjrUt6Lw((*node).str, result);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
	{
		if (!(((4 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_29));
		addInt__mftMOxbyu0h4yByfs3sqjA(result, (*node).num);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
	{
		if (!(((8 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_30));
		addFloat__R7rBahgTSmBayFrvvbK9bKQ(result, (*node).fnum);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
	{
		NimStringDesc* T43_;
		T43_ = (NimStringDesc*)0;
		{
			if (!(((2 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_31));
			if (!(*node).bval) goto LA46_;
			T43_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_41));
		}
		goto LA44_;
		LA46_: ;
		{
			T43_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_42));
		}
		LA44_: ;
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T43_ ? T43_->Sup.len : 0) + 0));
appendString((*result), T43_);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
	{
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 4));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_43));
	}
	break;
	}
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___79aIqF5QC8ZRJgu2hlv9bdjw)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node) {	NimStringDesc* result;
	NI T1_;
	result = (NimStringDesc*)0;
	T1_ = (NI)0;
	T1_ = len__Og3BmQpaL5V6gYg5JnWK3Q(node);
	result = rawNewString(((NI)chckRange((NI)((NU32)(T1_) << (NU32)(((NI) 1))), ((NI) 0), ((NI) 2147483647))));
	toUgly__6GftN2FLfP2Tuz9csidVHFA((&result), node);
	return result;
}
static N_INLINE(NimStringDesc*, spaces__zuWfkBFTPm31FNfSpe2HQQstrutils)(NI n) {	NimStringDesc* result;
	result = (NimStringDesc*)0;
	result = nsuRepeatChar(32, n);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, indent__5gehovIFYjiBH1k6tFdATg)(NimStringDesc** s, NI i) {	NimStringDesc* T1_;
	T1_ = (NimStringDesc*)0;
	T1_ = spaces__zuWfkBFTPm31FNfSpe2HQQstrutils(((NI)chckRange(i, ((NI) 0), ((NI) 2147483647))));
	unsureAsgnRef((void**) (&(*s)), resizeString((*s), (T1_ ? T1_->Sup.len : 0) + 0));
appendString((*s), T1_);
}
N_LIB_PRIVATE N_NIMCALL(void, nl__cdUf7ymWwwJY69aiEWqMGfg)(NimStringDesc** s, NIM_BOOL ml) {	NimStringDesc* T1_;
	T1_ = (NimStringDesc*)0;
	{
		if (!ml) goto LA4_;
		T1_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_44));
	}
	goto LA2_;
	LA4_: ;
	{
		T1_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_45));
	}
	LA2_: ;
	unsureAsgnRef((void**) (&(*s)), resizeString((*s), (T1_ ? T1_->Sup.len : 0) + 0));
appendString((*s), T1_);
}
N_LIB_PRIVATE N_NIMCALL(NI, newIndent__8dltImVNwFyjNtT9boLnYdg)(NI curr, NI indent, NIM_BOOL ml) {	NI result;
{	result = (NI)0;
	{
		NI TM__9b9bytt1stv9cZ8uqII7HFgew_47;
		if (!ml) goto LA3_;
		TM__9b9bytt1stv9cZ8uqII7HFgew_47 = addInt(curr, indent);
		result = (NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_47);
		goto BeforeRet_;
	}
	goto LA1_;
	LA3_: ;
	{
		result = indent;
		goto BeforeRet_;
	}
	LA1_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, subInt)(NI a, NI b) {	NI result;
{	result = (NI)0;
	result = (NI)((NU32)(a) - (NU32)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI) 0) <= (NI)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (((NI) 0) <= (NI)(result ^ (NI)((NU32) ~(b))));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent, NIM_BOOL ml, NIM_BOOL lstArr, NI currIndent) {	switch ((*node).kind) {
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
	{
		{
			if (!lstArr) goto LA4_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
		}
		LA4_: ;
		{
			NI T8_;
			NI i;
			if (!(((32 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
			T8_ = (NI)0;
			T8_ = len__dGleB9bNysrQUN9cReogzNpQtables((*node).fields);
			if (!(((NI) 0) < T8_)) goto LA9_;
			unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_27));
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			i = ((NI) 0);
			{
				NimStringDesc* key;
				tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val;
				tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg colontmp_;
				NI L;
				key = (NimStringDesc*)0;
				val = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
				nimZeroMem((void*)(&colontmp_), sizeof(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg));
				if (!(((32 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
				colontmp_.data = (*node).fields.data;
				colontmp_.counter = (*node).fields.counter;
				colontmp_.first = (*node).fields.first;
				colontmp_.last = (*node).fields.last;
				L = len__dGleB9bNysrQUN9cReogzNpQtables(colontmp_);
				{
					NI h;
					if (!(((NI) 0) < colontmp_.counter)) goto LA14_;
					h = colontmp_.first;
					{
						while (1) {
							NI nxt;
							if (!(((NI) 0) <= h)) goto LA17;
							if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
							nxt = colontmp_.data->data[h].Field1;
							{
								NIM_BOOL T20_;
								NI TM__9b9bytt1stv9cZ8uqII7HFgew_46;
								NI T27_;
								NI T28_;
								if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
								T20_ = (NIM_BOOL)0;
								T20_ = isFilled__5Qpmu5QqwDY0esVXn6wf7wtables(colontmp_.data->data[h].Field0);
								if (!T20_) goto LA21_;
								if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
								key = colontmp_.data->data[h].Field2;
								if ((NU)(h) >= (NU)(colontmp_.data ? colontmp_.data->Sup.len : 0)) raiseIndexError2(h,(colontmp_.data ? colontmp_.data->Sup.len : 0)-1);
								val = colontmp_.data->data[h].Field3;
								{
									if (!(((NI) 0) < i)) goto LA25_;
									unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_35));
									nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
								}
								LA25_: ;
								TM__9b9bytt1stv9cZ8uqII7HFgew_46 = addInt(i, ((NI) 1));
								i = (NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_46);
								T27_ = (NI)0;
								T27_ = newIndent__8dltImVNwFyjNtT9boLnYdg(currIndent, indent, ml);
								indent__5gehovIFYjiBH1k6tFdATg(result, T27_);
								escapeJson__YID1CO5Pb6vZOjpjrUt6Lw(key, result);
								unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_48));
								T28_ = (NI)0;
								T28_ = newIndent__8dltImVNwFyjNtT9boLnYdg(currIndent, indent, ml);
								toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ(result, val, indent, ml, NIM_FALSE, T28_);
								{
									NI T31_;
									T31_ = (NI)0;
									T31_ = len__dGleB9bNysrQUN9cReogzNpQtables(colontmp_);
									if (!!((T31_ == L))) goto LA32_;
									failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_32));
								}
								LA32_: ;
							}
							LA21_: ;
							h = nxt;
						} LA17: ;
					}
				}
				LA14_: ;
			}
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_40));
		}
		goto LA6_;
		LA9_: ;
		{
			unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_49));
		}
		LA6_: ;
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
	{
		{
			if (!lstArr) goto LA38_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
		}
		LA38_: ;
		if (!(((16 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
		escapeJson__YID1CO5Pb6vZOjpjrUt6Lw((*node).str, result);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
	{
		{
			if (!lstArr) goto LA43_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
		}
		LA43_: ;
		if (!(((4 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_29));
		addInt__mftMOxbyu0h4yByfs3sqjA(result, (*node).num);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
	{
		{
			if (!lstArr) goto LA48_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
		}
		LA48_: ;
		if (!(((8 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_30));
		addFloat__R7rBahgTSmBayFrvvbK9bKQ(result, (*node).fnum);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
	{
		NimStringDesc* T55_;
		{
			if (!lstArr) goto LA53_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
		}
		LA53_: ;
		T55_ = (NimStringDesc*)0;
		{
			if (!(((2 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_31));
			if (!(*node).bval) goto LA58_;
			T55_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_41));
		}
		goto LA56_;
		LA58_: ;
		{
			T55_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_42));
		}
		LA56_: ;
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), (T55_ ? T55_->Sup.len : 0) + 0));
appendString((*result), T55_);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
	{
		{
			if (!lstArr) goto LA64_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
		}
		LA64_: ;
		{
			NI T68_;
			if (!(((64 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
			T68_ = ((*node).elems ? (*node).elems->Sup.len : 0);
			if (!!((T68_ == ((NI) 0)))) goto LA69_;
			unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_34));
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			{
				NI i_2;
				NI colontmp__2;
				NI T72_;
				NI TM__9b9bytt1stv9cZ8uqII7HFgew_50;
				NI res;
				i_2 = (NI)0;
				colontmp__2 = (NI)0;
				if (!(((64 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
				T72_ = ((*node).elems ? (*node).elems->Sup.len : 0);
				TM__9b9bytt1stv9cZ8uqII7HFgew_50 = subInt(T72_, ((NI) 1));
				colontmp__2 = (NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_50);
				res = ((NI) 0);
				{
					while (1) {
						NI T79_;
						NI TM__9b9bytt1stv9cZ8uqII7HFgew_51;
						if (!(res <= colontmp__2)) goto LA74;
						i_2 = res;
						{
							if (!(((NI) 0) < i_2)) goto LA77_;
							unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_35));
							nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
						}
						LA77_: ;
						if (!(((64 &(1U<<((NU)((*node).kind)&7U)))!=0))) raiseFieldError(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
						if ((NU)(i_2) >= (NU)((*node).elems ? (*node).elems->Sup.len : 0)) raiseIndexError2(i_2,((*node).elems ? (*node).elems->Sup.len : 0)-1);
						T79_ = (NI)0;
						T79_ = newIndent__8dltImVNwFyjNtT9boLnYdg(currIndent, indent, ml);
						toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ(result, (*node).elems->data[i_2], indent, ml, NIM_TRUE, T79_);
						TM__9b9bytt1stv9cZ8uqII7HFgew_51 = addInt(res, ((NI) 1));
						res = (NI)(TM__9b9bytt1stv9cZ8uqII7HFgew_51);
					} LA74: ;
				}
			}
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_38));
		}
		goto LA66_;
		LA69_: ;
		{
			unsureAsgnRef((void**) (&(*result)), resizeString((*result), 2));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_52));
		}
		LA66_: ;
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
	{
		{
			if (!lstArr) goto LA84_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
		}
		LA84_: ;
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 4));
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_43));
	}
	break;
	}
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, pretty__6ucoq7dFiVhOGmHlWNWbTg)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent) {	NimStringDesc* result;
	result = (NimStringDesc*)0;
	result = ((NimStringDesc*) NIM_NIL);
	toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ((&result), node, indent, NIM_TRUE, NIM_FALSE, ((NI) 0));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___cUNUWspDCIapW3x6fFYyZQ_2)(NIM_BOOL b) {	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*) newObj((&NTI__zfzzuQ8txrdZAYK0WGWpHg_), sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q));
	(*T1_).kind = ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1);
	(*T1_).bval = b;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, stdlib_jsonDatInit000)(void) {
static TNimNode* TM__9b9bytt1stv9cZ8uqII7HFgew_18_7[7];
NI TM__9b9bytt1stv9cZ8uqII7HFgew_20;
static char* NIM_CONST TM__9b9bytt1stv9cZ8uqII7HFgew_19[7] = {
"JNull", 
"JBool", 
"JInt", 
"JFloat", 
"JString", 
"JObject", 
"JArray"};
static TNimNode TM__9b9bytt1stv9cZ8uqII7HFgew_0[16];
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.size = sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q);
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.kind = 18;
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.base = 0;
NTI__RUngo7nCHe6O8aBGIcrhtg_.size = sizeof(tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg);
NTI__RUngo7nCHe6O8aBGIcrhtg_.kind = 14;
NTI__RUngo7nCHe6O8aBGIcrhtg_.base = 0;
NTI__RUngo7nCHe6O8aBGIcrhtg_.flags = 3;
for (TM__9b9bytt1stv9cZ8uqII7HFgew_20 = 0; TM__9b9bytt1stv9cZ8uqII7HFgew_20 < 7; TM__9b9bytt1stv9cZ8uqII7HFgew_20++) {
TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_20+1].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_20+1].offset = TM__9b9bytt1stv9cZ8uqII7HFgew_20;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_20+1].name = TM__9b9bytt1stv9cZ8uqII7HFgew_19[TM__9b9bytt1stv9cZ8uqII7HFgew_20];
TM__9b9bytt1stv9cZ8uqII7HFgew_18_7[TM__9b9bytt1stv9cZ8uqII7HFgew_20] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_20+1];
}
TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].len = 7; TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].kind = 2; TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].sons = &TM__9b9bytt1stv9cZ8uqII7HFgew_18_7[0];
NTI__RUngo7nCHe6O8aBGIcrhtg_.node = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[8];
TM__9b9bytt1stv9cZ8uqII7HFgew_0[0].kind = 3;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[0].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, kind);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[0].typ = (&NTI__RUngo7nCHe6O8aBGIcrhtg_);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[0].name = "kind";
TM__9b9bytt1stv9cZ8uqII7HFgew_0[0].sons = &NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[0];
TM__9b9bytt1stv9cZ8uqII7HFgew_0[0].len = 7;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, str);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].typ = (&NTI__77mFvmsOLKik79ci2hXkHEg_);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[9].name = "str";
NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[4] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[9];
TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, num);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].typ = (&NTI__Aav8dQoMlCFnZRxA0IhTHQ_);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[10].name = "num";
NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[2] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[10];
TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, fnum);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].typ = (&NTI__w9bl9a1ul9ctRJWiMl9cNnIMvg_);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[11].name = "fnum";
NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[3] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[11];
TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, bval);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].typ = (&NTI__VaVACK0bpYmqIQ0mKcHfQQ_);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[12].name = "bval";
NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[1] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[12];
TM__9b9bytt1stv9cZ8uqII7HFgew_0[13].len = 0; TM__9b9bytt1stv9cZ8uqII7HFgew_0[13].kind = 2;
NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[0] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[13];
TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, fields);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].typ = (&NTI__ZZvSdVkA2s2sIyifu4cpkg_);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[14].name = "fields";
NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[5] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[14];
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.size = sizeof(tySequence__oLpBKXzW3hF9aCVMo5EymfQ*);
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.kind = 24;
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.base = (&NTI__zfzzuQ8txrdZAYK0WGWpHg_);
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.marker = Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, elems);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].typ = (&NTI__oLpBKXzW3hF9aCVMo5EymfQ_);
TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].name = "elems";
NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[6] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[15];
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.node = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[0];
NTI__zfzzuQ8txrdZAYK0WGWpHg_.size = sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*);
NTI__zfzzuQ8txrdZAYK0WGWpHg_.kind = 22;
NTI__zfzzuQ8txrdZAYK0WGWpHg_.base = (&NTI__df9bshXB7C9cTiWPIOtX3j1Q_);
NTI__zfzzuQ8txrdZAYK0WGWpHg_.marker = Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg;
}

