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

/* section: NIM_merge_HEADERS */

#include "nimbase.h"
#include <string.h>
#include <windows.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

/* section: NIM_merge_FRAME_DEFINES */
#define nimfr_(x, y)
#define nimln_(x, y)

/* section: NIM_merge_FORWARD_TYPES */
typedef struct tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg;
typedef struct tySequence__MlAD6nAPq9bHKla9cWiIZP0g tySequence__MlAD6nAPq9bHKla9cWiIZP0g;
typedef struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ tySequence__oLpBKXzW3hF9aCVMo5EymfQ;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg;
typedef struct tyTuple__awOivLjlO76sGdHY7nQUjQ tyTuple__awOivLjlO76sGdHY7nQUjQ;
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 RootObj RootObj;
typedef struct tySequence__Ih0V9cYug0VPJyBBGvgEH7Q tySequence__Ih0V9cYug0VPJyBBGvgEH7Q;
typedef struct tyObject_StringStreamObj__Olau5FPRehZBBEB77FHnfw tyObject_StringStreamObj__Olau5FPRehZBBEB77FHnfw;
typedef struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA;
typedef struct tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA;
typedef struct tyObject_Table__qagh2zcXAhSb9aRfetCb26g tyObject_Table__qagh2zcXAhSb9aRfetCb26g;
typedef struct tySequence__JiteSJxrvz63iP2o9bcn2Sg tySequence__JiteSJxrvz63iP2o9bcn2Sg;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tyTuple__g1w83cyyBYiVU9c8WEJWnjQ tyTuple__g1w83cyyBYiVU9c8WEJWnjQ;
typedef struct Exception Exception;
typedef struct tySequence__aNpJjaoUowCQc7fBn3wtDQ tySequence__aNpJjaoUowCQc7fBn3wtDQ;
typedef struct TSafePoint TSafePoint;
typedef struct GcFrameHeader GcFrameHeader;
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
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_SharedList__JI9cx34TL8n3aOKF6tSMBUw tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw;
typedef struct tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg;
typedef struct tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw;
typedef struct tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg;
typedef struct tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w;

/* section: NIM_merge_TYPES */
typedef NU8 tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
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;
} _kind_1;
struct {NI64 num;
} _kind_2;
struct {NF fnum;
} _kind_3;
struct {NIM_BOOL bval;
} _kind_4;
struct {tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg fields;
} _kind_6;
struct {tySequence__oLpBKXzW3hF9aCVMo5EymfQ* elems;
} _kind_7;
};
};
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;
NI align;
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef NF tyArray__iV2wVpdhi9coq9cstlcqapXg[2001];
struct tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg {
tyArray__iV2wVpdhi9coq9cstlcqapXg tls;
};
struct tyTuple__awOivLjlO76sGdHY7nQUjQ {
NI Field0;
NI Field1;
NimStringDesc* Field2;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* Field3;
};
struct RootObj {
TNimType* m_type;
};
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 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_StringStreamObj__Olau5FPRehZBBEB77FHnfw {
  tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ Sup;
NimStringDesc* data;
NI pos;
};
struct tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA {
tyObject_Table__qagh2zcXAhSb9aRfetCb26g* table;
NIM_BOOL isTitleCase;
};
struct tyObject_Table__qagh2zcXAhSb9aRfetCb26g {
tySequence__JiteSJxrvz63iP2o9bcn2Sg* data;
NI counter;
};
struct tyTuple__g1w83cyyBYiVU9c8WEJWnjQ {
NI Field0;
NimStringDesc* Field1;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* Field2;
};
typedef NU8 tyEnum_ParserState__Na0rM2Zdr3RpxeNeXbvLrQ;
struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA {
NI a;
NI b;
};
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__9axCnCRMUx32AHzFgBrzSMg) (Exception* e);
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (void* ClE_0);
void* ClE_0;
} tyProc__HzVCwACFYM9cx9aV62PdjtuA;
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
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__SPr7N6UKfuF549bNPiUvSRw 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 collections;
NI maxThreshold;
NI maxStackSize;
NI freedObjects;
};
struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw {
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* head;
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* tail;
CRITICAL_SECTION lock;
};
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw toDispose;
NI gcThreadId;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
};
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (tyProc__HzVCwACFYM9cx9aV62PdjtuA cbproc, void* ClE_0);
void* ClE_0;
} tyProc__VHS3NdmbwcdcZKmKV1JWhw;

/* section: NIM_merge_SEQ_TYPES */
struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ {
  TGenericSeq Sup;
  tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* data[SEQ_DECL_SIZE];
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* 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];
};
struct tySequence__JiteSJxrvz63iP2o9bcn2Sg {
  TGenericSeq Sup;
  tyTuple__g1w83cyyBYiVU9c8WEJWnjQ data[SEQ_DECL_SIZE];
};
struct tySequence__aNpJjaoUowCQc7fBn3wtDQ {
  TGenericSeq Sup;
  tyProc__HzVCwACFYM9cx9aV62PdjtuA data[SEQ_DECL_SIZE];
};
typedef struct {tyProc__9axCnCRMUx32AHzFgBrzSMg localRaiseHook__EIvMhANBvB9cp2Ezvt29cADg;
NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
tySequence__aNpJjaoUowCQc7fBn3wtDQ* threadDestructionHandlers__8OmU3x0fNdA0DLtOmU3kWw;
NI threadId__wzrdPYhtL9czkCWS4o9an9cRw;
TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
Exception* currException__9bVPeDJlYTi9bQApZpfH8wjg;
GcFrameHeader* gcFramePtr__ot48iojqko9aFxGhyjjjVaA;
tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__IcYaEuuWivYAS86vFMTS3Q;
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* utcInstance__oeKVHn4dFpBJO35HhEkelw;
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* localInstance__cLtN9cK9bCe6IPhJ3UFNLNKA;
NIM_BOOL envComputed__LLyFo9bsdu1ZXMDvAe8DhrQ;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* environment__mlhK49b6YMgc9cgrcYkKq9a3g;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* ownArgv__WVJ54JSHy7VxacV39bwBPFA;
NIM_BOOL ownParsedArgv__9btHydaUC5pNXxitEZsyzIg;
tyProc__VHS3NdmbwcdcZKmKV1JWhw callSoonProc__9b9b4iUSd60RO2UqC52ifJ6A;
tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg* gDisp__yIbBArLUsg2pBJkilx4yvg;
tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w* defaultSslContext__3GZQajZtKdLpqTTN2RjTzw;
NIM_BOOL isSlave__t9a8wsVVRYqGEKhg1vb49b3g;
NIM_BOOL pyThreadFrameInited__0LBR4zzVR5uWvgtv8SrMjg;
NIM_BOOL gcInited__uuy3PWTwb5gov9ao9bXJYBPg;
} NimThreadVars;

/* section: NIM_merge_PROC_HEADERS */
N_LIB_PRIVATE 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_LIB_PRIVATE N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_LIB_PRIVATE N_NIMCALL(void, initOrderedTable__Xnq4D4mCe8fymnuh9c7PQlw)(NI initialSize, tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* Result);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(void*, GetThreadLocalVars)(void);
N_LIB_PRIVATE N_NIMCALL(void*, threadVarGetValue__O8VJSmwa3WY6y9bP6Ht9b7hw)(NI32 dwTlsIndex);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___vlnBr1uIbtu0ntnZh6Askg)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_LIB_PRIVATE N_NIMCALL(void, toUgly__6GftN2FLfP2Tuz9csidVHFA)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
static N_INLINE(NI, len__dGleB9bNysrQUN9cReogzNpQtables)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t);
static N_INLINE(NIM_BOOL, isFilled__5Qpmu5QqwDY0esVXn6wf7wtables)(NI hcode);
N_LIB_PRIVATE N_NIMCALL(void, escapeJson__YID1CO5Pb6vZOjpjrUt6Lw)(NimStringDesc* s, NimStringDesc** result);
N_LIB_PRIVATE N_NIMCALL(void, escapeJsonUnquoted__YID1CO5Pb6vZOjpjrUt6Lw_2)(NimStringDesc* s, NimStringDesc** result);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x, NI len);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
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__rssDy7zs9cDeoYTeCoIy0Wgstrutils)(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);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__WzaWBorCQCRzsZmH9bGowsQ)(tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc* filename);
N_LIB_PRIVATE N_NIMCALL(void, open__caSf5pJv2JnMMpxc9bAhdpA)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my, tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* input, NimStringDesc* filename, NIM_BOOL rawStringLiterals);
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_2)(NimStringDesc* s);
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_2)(void);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJObject__nXwnFPu9beTnGPwglrr7ztA)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseParseErr__VeBRAkMdST9cPQW1Rqk8vwA)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p, NimStringDesc* msg);
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(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJArray__nXwnFPu9beTnGPwglrr7ztA_3)(void);
N_LIB_PRIVATE N_NIMCALL(void, add__8FFZVkexaQ73y9aREGlrY9bQ)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* father, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child);
N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
static N_INLINE(void, close__8dle9apIE9cTJGDlKOnqgjgAparsejson)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my);
N_LIB_PRIVATE N_NIMCALL(void, close__m9bpQUVeRkyuyv4zAGVgY9bw_3)(tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* L);
N_LIB_PRIVATE N_NIMCALL(tyObject_StringStreamObj__Olau5FPRehZBBEB77FHnfw*, newStringStream__9aLRtgEYeRMrZKrObtoOslQ)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___UypyWQYgs0HwDiqUF1vrHQ)(tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA o);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___zAYTtCDuaYNZmKecWBRf2A)(tyObject_Table__qagh2zcXAhSb9aRfetCb26g* o);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___YtQkMrfaEce2dkYChPRJoA)(tyObject_Table__qagh2zcXAhSb9aRfetCb26g table);
N_LIB_PRIVATE N_NIMCALL(NI, len__vWKh7OTj2N7dU9ahk9aKyicQ)(tyObject_Table__qagh2zcXAhSb9aRfetCb26g t);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___I6r3ll22EMgXToNIadEMNg)(NimStringDesc** elements, NI elementsLen_0);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___19ag6cl4fMjxytc9arHmLIbw)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___cUNUWspDCIapW3x6fFYyZQ_2)(NIM_BOOL b);

/* section: NIM_merge_DATA */
N_LIB_PRIVATE TNimType NTI__df9bshXB7C9cTiWPIOtX3j1Q_;
N_LIB_PRIVATE TNimType NTI__RUngo7nCHe6O8aBGIcrhtg_;
TNimNode* NimDT___df9bshXB7C9cTiWPIOtX3j1Q_kind[8];
extern TNimType NTI__77mFvmsOLKik79ci2hXkHEg_;
extern TNimType NTI__Aav8dQoMlCFnZRxA0IhTHQ_;
extern TNimType NTI__w9bl9a1ul9ctRJWiMl9cNnIMvg_;
extern TNimType NTI__VaVACK0bpYmqIQ0mKcHfQQ_;
extern TNimType NTI__ZZvSdVkA2s2sIyifu4cpkg_;
N_LIB_PRIVATE TNimType NTI__oLpBKXzW3hF9aCVMo5EymfQ_;
N_LIB_PRIVATE TNimType NTI__zfzzuQ8txrdZAYK0WGWpHg_;
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_5, "[", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_6, ",", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_7, "]", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_8, "{", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_9, "\"", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_10, "\\n", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_11, "\\b", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_12, "\\f", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_13, "\\t", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_14, "\\u000b", 6);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_15, "\\r", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_16, "\\\"", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_17, "\\u000", 5);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_18, "\\u00", 4);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_19, "\\\\", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_20, ":", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_21, "}", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_22, "true", 4);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_23, "false", 5);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_24, "null", 4);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_25, "\012", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_26, " ", 1);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_27, ": ", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_28, "{}", 2);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_29, "[]", 2);
extern TNimType NTI__KWIQnzXEOUqdWsnCUL9atyQ_;
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_30, "string literal as key", 21);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_31, "input", 5);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_32, "table", 5);
STRING_LITERAL(TM__9b9bytt1stv9cZ8uqII7HFgew_33, "isTitleCase", 11);

/* section: NIM_merge_VARS */
extern NI32 globalsSlot__ciXDZu9c27pHpCRMoz4RIgw;

/* section: NIM_merge_PROCS */
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)._kind_1.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)._kind_6.fields.data, op);
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
	nimGCvisit((void*)(*a)._kind_7.elems, op);
	break;
	} 
}
static N_INLINE(void*, GetThreadLocalVars)(void) {
	void* result;
	void* T1_;
	result = (void*)0;
	T1_ = (void*)0;
	T1_ = threadVarGetValue__O8VJSmwa3WY6y9bP6Ht9b7hw(globalsSlot__ciXDZu9c27pHpCRMoz4RIgw);
	result = ((void*) ((*((tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg*) (T1_))).tls));
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	NimThreadVars* NimTV_;
	NimTV_ = (NimThreadVars*) GetThreadLocalVars();
	result = (NIM_BOOL*)0;
	result = (&NimTV_->nimInErrorMode__759bT87luu8XGcbkw13FUjA);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJObject__nXwnFPu9beTnGPwglrr7ztA)(void) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	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) 2), (&(*T1_)._kind_6.fields));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	result = T1_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, add__dO3MQSMpDh4RGT3IbIah7w)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* obj, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	X5BX5Deq___vlnBr1uIbtu0ntnZh6Askg((&(*obj)._kind_6.fields), key, val);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___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);
	(*T1_)._kind_1.str = copyString(s);
	result = T1_;
	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__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) {
	nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	{
		void* T5_;
		void* T6_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (void*)0;
		T5_ = ((void*) ((&(*dest).data[(*dest).Sup.len])));
		T6_ = (void*)0;
		T6_ = ((void*) ((*src).data));
		copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T5_, T6_, ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
		(*dest).Sup.len += (*src).Sup.len;
	}
	LA3_: ;
}
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(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) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(NI, len__dGleB9bNysrQUN9cReogzNpQtables)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t) {
	NI result;
	result = (NI)0;
	result = (*t).counter;
	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(void, escapeJsonUnquoted__YID1CO5Pb6vZOjpjrUt6Lw_2)(NimStringDesc* s, NimStringDesc** result) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		NIM_CHAR c;
		NI i;
		NI L;
		c = (NIM_CHAR)0;
		i = ((NI) 0);
		L = (s ? s->Sup.len : 0);
		{
			while (1) {
				if (!(i < L)) goto LA3;
				c = s->data[i];
				switch (((NU8)(c))) {
				case 10:
				{
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_10));
				}
				break;
				case 8:
				{
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_11));
				}
				break;
				case 12:
				{
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_12));
				}
				break;
				case 9:
				{
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_13));
				}
				break;
				case 11:
				{
					(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_14));
				}
				break;
				case 13:
				{
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_15));
				}
				break;
				case 34:
				{
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_16));
				}
				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_17));
appendString(T12_, T13_);
					(*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));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					T15_ = rawNewString((T16_ ? T16_->Sup.len : 0) + 4);
appendString(T15_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_18));
appendString(T15_, T16_);
					(*result) = resizeString((*result), (T15_ ? T15_->Sup.len : 0) + 0);
appendString((*result), T15_);
				}
				break;
				case 92:
				{
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_19));
				}
				break;
				default:
				{
					(*result) = addChar((*result), c);
				}
				break;
				}
				i += ((NI) 1);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, escapeJson__YID1CO5Pb6vZOjpjrUt6Lw)(NimStringDesc* s, NimStringDesc** result) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_9));
	escapeJsonUnquoted__YID1CO5Pb6vZOjpjrUt6Lw_2(s, result);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_9));
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, toUgly__6GftN2FLfP2Tuz9csidVHFA)(NimStringDesc** result, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node) {
	NIM_BOOL comma;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	comma = NIM_FALSE;
	switch ((*node).kind) {
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
	{
		(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_5));
		{
			tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q** child;
			tySequence__oLpBKXzW3hF9aCVMo5EymfQ* colontmp_;
			NI i;
			NI L;
			NI T3_;
			child = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**)0;
			colontmp_ = (tySequence__oLpBKXzW3hF9aCVMo5EymfQ*)0;
			colontmp_ = (*node)._kind_7.elems;
			i = ((NI) 0);
			T3_ = (colontmp_ ? colontmp_->Sup.len : 0);
			L = T3_;
			{
				while (1) {
					if (!(i < L)) goto LA5;
					child = &colontmp_->data[i];
					{
						if (!comma) goto LA8_;
						(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_6));
					}
					goto LA6_;
					LA8_: ;
					{
						comma = NIM_TRUE;
					}
					LA6_: ;
					toUgly__6GftN2FLfP2Tuz9csidVHFA(result, (*child));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					i += ((NI) 1);
				} LA5: ;
			}
		}
		(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_7));
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
	{
		(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_8));
		{
			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));
			colontmp__2.data = (*node)._kind_6.fields.data;
			colontmp__2.counter = (*node)._kind_6.fields.counter;
			colontmp__2.first = (*node)._kind_6.fields.first;
			colontmp__2.last = (*node)._kind_6.fields.last;
			L_2 = len__dGleB9bNysrQUN9cReogzNpQtables((&colontmp__2));
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			{
				NI h;
				if (!(((NI) 0) < colontmp__2.counter)) goto LA15_;
				h = colontmp__2.first;
				{
					while (1) {
						NI nxt;
						if (!(((NI) 0) <= h)) goto LA18;
						nxt = colontmp__2.data->data[h].Field1;
						{
							NIM_BOOL T21_;
							T21_ = (NIM_BOOL)0;
							T21_ = isFilled__5Qpmu5QqwDY0esVXn6wf7wtables(colontmp__2.data->data[h].Field0);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							if (!T21_) goto LA22_;
							key = colontmp__2.data->data[h].Field2;
							value = colontmp__2.data->data[h].Field3;
							{
								if (!comma) goto LA26_;
								(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_6));
							}
							goto LA24_;
							LA26_: ;
							{
								comma = NIM_TRUE;
							}
							LA24_: ;
							escapeJson__YID1CO5Pb6vZOjpjrUt6Lw(key, result);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_20));
							toUgly__6GftN2FLfP2Tuz9csidVHFA(result, value);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						}
						LA22_: ;
						h = nxt;
					} LA18: ;
				}
			}
			LA15_: ;
		}
		(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
	{
		escapeJson__YID1CO5Pb6vZOjpjrUt6Lw((*node)._kind_1.str, result);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
	{
		addInt__mftMOxbyu0h4yByfs3sqjA(result, (*node)._kind_2.num);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
	{
		addFloat__R7rBahgTSmBayFrvvbK9bKQ(result, (*node)._kind_3.fnum);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
	{
		NimStringDesc* T33_;
		T33_ = (NimStringDesc*)0;
		{
			if (!(*node)._kind_4.bval) goto LA36_;
			T33_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_22));
		}
		goto LA34_;
		LA36_: ;
		{
			T33_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_23));
		}
		LA34_: ;
		(*result) = resizeString((*result), (T33_ ? T33_->Sup.len : 0) + 0);
appendString((*result), T33_);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
	{
		(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
	}
	break;
	}
	}BeforeRet_: ;
}
static N_INLINE(NimStringDesc*, spaces__rssDy7zs9cDeoYTeCoIy0Wgstrutils)(NI n) {
	NimStringDesc* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NimStringDesc*)0;
	result = nsuRepeatChar(32, n);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, indent__5gehovIFYjiBH1k6tFdATg)(NimStringDesc** s, NI i) {
	NimStringDesc* T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	T1_ = (NimStringDesc*)0;
	T1_ = spaces__rssDy7zs9cDeoYTeCoIy0Wgstrutils(((NI) (i)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(*s) = resizeString((*s), (T1_ ? T1_->Sup.len : 0) + 0);
appendString((*s), T1_);
	}BeforeRet_: ;
}
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_25));
	}
	goto LA2_;
	LA4_: ;
	{
		T1_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_26));
	}
	LA2_: ;
	(*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;
	{
		if (!ml) goto LA3_;
		result = (NI)(curr + indent);
		goto BeforeRet_;
	}
	goto LA1_;
	LA3_: ;
	{
		result = indent;
		goto BeforeRet_;
	}
	LA1_: ;
	}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) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	switch ((*node).kind) {
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5):
	{
		{
			if (!lstArr) goto LA4_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA4_: ;
		{
			NI T8_;
			NI i;
			T8_ = (NI)0;
			T8_ = len__dGleB9bNysrQUN9cReogzNpQtables((&(*node)._kind_6.fields));
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!(((NI) 0) < T8_)) goto LA9_;
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_8));
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			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));
				colontmp_.data = (*node)._kind_6.fields.data;
				colontmp_.counter = (*node)._kind_6.fields.counter;
				colontmp_.first = (*node)._kind_6.fields.first;
				colontmp_.last = (*node)._kind_6.fields.last;
				L = len__dGleB9bNysrQUN9cReogzNpQtables((&colontmp_));
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				{
					NI h;
					if (!(((NI) 0) < colontmp_.counter)) goto LA14_;
					h = colontmp_.first;
					{
						while (1) {
							NI nxt;
							if (!(((NI) 0) <= h)) goto LA17;
							nxt = colontmp_.data->data[h].Field1;
							{
								NIM_BOOL T20_;
								NI T27_;
								NI T28_;
								NIM_BOOL T29_;
								NI T30_;
								T20_ = (NIM_BOOL)0;
								T20_ = isFilled__5Qpmu5QqwDY0esVXn6wf7wtables(colontmp_.data->data[h].Field0);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								if (!T20_) goto LA21_;
								key = colontmp_.data->data[h].Field2;
								val = colontmp_.data->data[h].Field3;
								{
									if (!(((NI) 0) < i)) goto LA25_;
									(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_6));
									nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
									if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								}
								LA25_: ;
								i += ((NI) 1);
								T27_ = (NI)0;
								T27_ = newIndent__8dltImVNwFyjNtT9boLnYdg(currIndent, indent, ml);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								indent__5gehovIFYjiBH1k6tFdATg(result, T27_);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								escapeJson__YID1CO5Pb6vZOjpjrUt6Lw(key, result);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_27));
								T28_ = (NI)0;
								T28_ = indent;
								T29_ = (NIM_BOOL)0;
								T29_ = ml;
								T30_ = (NI)0;
								T30_ = newIndent__8dltImVNwFyjNtT9boLnYdg(currIndent, indent, ml);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ(result, val, T28_, T29_, NIM_FALSE, T30_);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							}
							LA21_: ;
							h = nxt;
						} LA17: ;
					}
				}
				LA14_: ;
			}
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_21));
		}
		goto LA6_;
		LA9_: ;
		{
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_28));
		}
		LA6_: ;
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 4):
	{
		{
			if (!lstArr) goto LA35_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA35_: ;
		escapeJson__YID1CO5Pb6vZOjpjrUt6Lw((*node)._kind_1.str, result);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 2):
	{
		{
			if (!lstArr) goto LA40_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA40_: ;
		addInt__mftMOxbyu0h4yByfs3sqjA(result, (*node)._kind_2.num);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 3):
	{
		{
			if (!lstArr) goto LA45_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA45_: ;
		addFloat__R7rBahgTSmBayFrvvbK9bKQ(result, (*node)._kind_3.fnum);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 1):
	{
		NimStringDesc* T52_;
		{
			if (!lstArr) goto LA50_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA50_: ;
		T52_ = (NimStringDesc*)0;
		{
			if (!(*node)._kind_4.bval) goto LA55_;
			T52_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_22));
		}
		goto LA53_;
		LA55_: ;
		{
			T52_ = copyString(((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_23));
		}
		LA53_: ;
		(*result) = resizeString((*result), (T52_ ? T52_->Sup.len : 0) + 0);
appendString((*result), T52_);
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6):
	{
		{
			if (!lstArr) goto LA61_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA61_: ;
		{
			NI T65_;
			T65_ = ((*node)._kind_7.elems ? (*node)._kind_7.elems->Sup.len : 0);
			if (!!((T65_ == ((NI) 0)))) goto LA66_;
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_5));
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			{
				NI i_2;
				NI colontmp__2;
				NI T69_;
				NI res;
				i_2 = (NI)0;
				colontmp__2 = (NI)0;
				T69_ = ((*node)._kind_7.elems ? (*node)._kind_7.elems->Sup.len : 0);
				colontmp__2 = (NI)(T69_ - ((NI) 1));
				res = ((NI) 0);
				{
					while (1) {
						NI T76_;
						NIM_BOOL T77_;
						NI T78_;
						if (!(res <= colontmp__2)) goto LA71;
						i_2 = res;
						{
							if (!(((NI) 0) < i_2)) goto LA74_;
							(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_6));
							nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						}
						LA74_: ;
						T76_ = (NI)0;
						T76_ = indent;
						T77_ = (NIM_BOOL)0;
						T77_ = ml;
						T78_ = (NI)0;
						T78_ = newIndent__8dltImVNwFyjNtT9boLnYdg(currIndent, indent, ml);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ(result, (*node)._kind_7.elems->data[i_2], T76_, T77_, NIM_TRUE, T78_);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						res += ((NI) 1);
					} LA71: ;
				}
			}
			nl__cdUf7ymWwwJY69aiEWqMGfg(result, ml);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_7));
		}
		goto LA63_;
		LA66_: ;
		{
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_29));
		}
		LA63_: ;
	}
	break;
	case ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 0):
	{
		{
			if (!lstArr) goto LA83_;
			indent__5gehovIFYjiBH1k6tFdATg(result, currIndent);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA83_: ;
		(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_24));
	}
	break;
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, pretty__6ucoq7dFiVhOGmHlWNWbTg)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent) {
	NimStringDesc* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NimStringDesc*)0;
	result = ((NimStringDesc*) NIM_NIL);
	toPretty__T9c9a1po9b6rWzf9b9b4cv2n9aUQ((&result), node, indent, NIM_TRUE, NIM_FALSE, ((NI) 0));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJStringMove__19ag6cl4fMjxytc9arHmLIbw_2)(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_;
	(*result)._kind_1.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_)._kind_2.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_)._kind_3.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_)._kind_4.bval = b;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJNull__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) 0);
	result = T1_;
	return result;
}
static N_INLINE(void, X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* obj, NimStringDesc* key, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* val) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	X5BX5Deq___vlnBr1uIbtu0ntnZh6Askg((&(*obj)._kind_6.fields), key, val);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
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);
	(*T1_)._kind_7.elems = NIM_NIL;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, add__8FFZVkexaQ73y9aREGlrY9bQ)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* father, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child) {
	NI T1_;
	(*father)._kind_7.elems = (tySequence__oLpBKXzW3hF9aCVMo5EymfQ*) incrSeqV3((TGenericSeq*)((*father)._kind_7.elems), (&NTI__oLpBKXzW3hF9aCVMo5EymfQ_));
	T1_ = (*father)._kind_7.elems->Sup.len++;
	(*father)._kind_7.elems->data[T1_] = child;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__djUCXAtTZaoCKdBhcNKguQ)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* p) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	switch ((*p).tok) {
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 2):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T2_;
		result = newJStringMove__19ag6cl4fMjxytc9arHmLIbw_2((*p).a);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(*p).a = ((NimStringDesc*) NIM_NIL);
		T2_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T2_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(void)(T2_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 3):
	{
		NI64 T4_;
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T5_;
		T4_ = (NI64)0;
		T4_ = nsuParseBiggestInt((*p).a);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = newJInt__kuRQ9bONMtpC9bToqIhX9cETA(T4_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T5_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T5_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(void)(T5_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 4):
	{
		NF T7_;
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T8_;
		T7_ = (NF)0;
		T7_ = nsuParseFloat((*p).a);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = newJFloat__OmZ5rJGcoSWuPXnB4XrVzw(T7_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T8_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T8_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(void)(T8_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 5):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T10_;
		result = newJBool__cUNUWspDCIapW3x6fFYyZQ(NIM_TRUE);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T10_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T10_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(void)(T10_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 6):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T12_;
		result = newJBool__cUNUWspDCIapW3x6fFYyZQ(NIM_FALSE);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T12_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T12_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(void)(T12_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 7):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T14_;
		result = newJNull__nXwnFPu9beTnGPwglrr7ztA_2();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T14_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T14_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(void)(T14_);
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 8):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T16_;
		result = newJObject__nXwnFPu9beTnGPwglrr7ztA();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T16_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T16_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(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_30));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
				LA21_: ;
				key = copyString((*p).a);
				T23_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
				T23_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				(void)(T23_);
				eat__mMX9c3cw7Tuh0xvz23drvSg(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 12));
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				val = parseJson__djUCXAtTZaoCKdBhcNKguQ(p);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson(result, key, val);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				{
					if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13)))) goto LA26_;
					goto LA17;
				}
				LA26_: ;
				T28_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
				T28_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				(void)(T28_);
			} LA18: ;
		} LA17: ;
		eat__mMX9c3cw7Tuh0xvz23drvSg(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 9));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	break;
	case ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 10):
	{
		tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T30_;
		result = newJArray__nXwnFPu9beTnGPwglrr7ztA_3();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T30_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
		T30_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(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);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				add__8FFZVkexaQ73y9aREGlrY9bQ(result, T33_);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				{
					if (!!(((*p).tok == ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 13)))) goto LA36_;
					goto LA31;
				}
				LA36_: ;
				T38_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
				T38_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ(p);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				(void)(T38_);
			} LA32: ;
		} LA31: ;
		eat__mMX9c3cw7Tuh0xvz23drvSg(p, ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 11));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	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_8));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	break;
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, close__8dle9apIE9cTJGDlKOnqgjgAparsejson)(tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ* my) {
	tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg* T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	T1_ = (tyObject_BaseLexer__MAw8rJZtJ279bVV3TWMtXSg*)0;
	T1_ = &my->Sup;
	close__m9bpQUVeRkyuyv4zAGVgY9bw_3(T1_);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__WzaWBorCQCRzsZmH9bGowsQ)(tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* s, NimStringDesc* filename) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonParser__KWIQnzXEOUqdWsnCUL9atyQ p;
	tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw T2_;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	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);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T2_ = (tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw)0;
	T2_ = getTok__9cGllg9a4hN9cmfjsUw6zu39bQ((&p));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	(void)(T2_);
	result = parseJson__djUCXAtTZaoCKdBhcNKguQ((&p));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	eat__mMX9c3cw7Tuh0xvz23drvSg((&p), ((tyEnum_TokKind__Q9c4KaNqJU4PbXaGht0C7iw) 1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		LA1_:;
	}
	{
		oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
		close__8dle9apIE9cTJGDlKOnqgjgAparsejson((&p));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		*nimErr_ = oldNimErrFin1_;
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__Y9cImsF2VGDWROPSsgTGewQ)(NimStringDesc* buffer) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_StringStreamObj__Olau5FPRehZBBEB77FHnfw* T1_;
	tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* T2_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = (tyObject_StringStreamObj__Olau5FPRehZBBEB77FHnfw*)0;
	T1_ = newStringStream__9aLRtgEYeRMrZKrObtoOslQ(buffer);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T2_ = (tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ*)0;
	T2_ = &T1_->Sup;
	result = parseJson__WzaWBorCQCRzsZmH9bGowsQ(T2_, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_31));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___I6r3ll22EMgXToNIadEMNg)(NimStringDesc** elements, NI elementsLen_0) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	result = newJArray__nXwnFPu9beTnGPwglrr7ztA_3();
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NimStringDesc** elem;
		NI i;
		elem = (NimStringDesc**)0;
		i = ((NI) 0);
		{
			while (1) {
				tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T4_;
				if (!(i < elementsLen_0)) goto LA3;
				elem = (&elements[i]);
				T4_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
				T4_ = percent___19ag6cl4fMjxytc9arHmLIbw((*elem));
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				add__8FFZVkexaQ73y9aREGlrY9bQ(result, T4_);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				i += ((NI) 1);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___YtQkMrfaEce2dkYChPRJoA)(tyObject_Table__qagh2zcXAhSb9aRfetCb26g table) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	result = newJObject__nXwnFPu9beTnGPwglrr7ztA();
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NimStringDesc* k;
		tySequence__sM4lkSb7zS6F7OVMvW9cffQ* v;
		NI L;
		k = (NimStringDesc*)0;
		v = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*)0;
		L = len__vWKh7OTj2N7dU9ahk9aKyicQ(table);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		{
			NI h;
			NI colontmp_;
			NI T3_;
			NI res;
			h = (NI)0;
			colontmp_ = (NI)0;
			T3_ = ((table.data ? table.data->Sup.len : 0)-1);
			colontmp_ = T3_;
			res = ((NI) 0);
			{
				while (1) {
					if (!(res <= colontmp_)) goto LA5;
					h = res;
					{
						NIM_BOOL T8_;
						tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T11_;
						T8_ = (NIM_BOOL)0;
						T8_ = isFilled__5Qpmu5QqwDY0esVXn6wf7wtables(table.data->data[h].Field0);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						if (!T8_) goto LA9_;
						k = table.data->data[h].Field1;
						v = table.data->data[h].Field2;
						T11_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
						T11_ = percent___I6r3ll22EMgXToNIadEMNg(v->data, (v ? v->Sup.len : 0));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson(result, k, T11_);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					}
					LA9_: ;
					res += ((NI) 1);
				} LA5: ;
			}
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___zAYTtCDuaYNZmKecWBRf2A)(tyObject_Table__qagh2zcXAhSb9aRfetCb26g* o) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	{
		if (!(o == 0)) goto LA3_;
		result = newJNull__nXwnFPu9beTnGPwglrr7ztA_2();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	goto LA1_;
	LA3_: ;
	{
		result = percent___YtQkMrfaEce2dkYChPRJoA((*o));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	LA1_: ;
	}BeforeRet_: ;
	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_)._kind_4.bval = b;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___UypyWQYgs0HwDiqUF1vrHQ)(tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA o) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T1_;
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T2_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	result = newJObject__nXwnFPu9beTnGPwglrr7ztA();
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T1_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T1_ = percent___zAYTtCDuaYNZmKecWBRf2A(o.table);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson(result, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_32), T1_);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T2_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	T2_ = percent___cUNUWspDCIapW3x6fFYyZQ_2(o.isTitleCase);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	X5BX5Deq___WmQhibcOp3ZlzI9bgifjalAjson(result, ((NimStringDesc*) &TM__9b9bytt1stv9cZ8uqII7HFgew_33), T2_);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___3LSe79aZ8Y51OuAffyqjb9cQ)(tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA* o) {
	tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*)0;
	{
		if (!(o == 0)) goto LA3_;
		result = newJNull__nXwnFPu9beTnGPwglrr7ztA_2();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	goto LA1_;
	LA3_: ;
	{
		result = percent___UypyWQYgs0HwDiqUF1vrHQ((*o));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, stdlib_jsonDatInit000)(void) {

/* section: NIM_merge_TYPE_INIT1 */
static TNimNode* TM__9b9bytt1stv9cZ8uqII7HFgew_2_7[7];
NI TM__9b9bytt1stv9cZ8uqII7HFgew_4;
static char* NIM_CONST TM__9b9bytt1stv9cZ8uqII7HFgew_3[7] = {
"JNull", 
"JBool", 
"JInt", 
"JFloat", 
"JString", 
"JObject", 
"JArray"};
static TNimNode TM__9b9bytt1stv9cZ8uqII7HFgew_0[16];

/* section: NIM_merge_TYPE_INIT3 */
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.size = sizeof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q);
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.align = NIM_ALIGNOF(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q);
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.kind = 18;
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.base = 0;
NTI__df9bshXB7C9cTiWPIOtX3j1Q_.flags = 2;
NTI__RUngo7nCHe6O8aBGIcrhtg_.size = sizeof(tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg);
NTI__RUngo7nCHe6O8aBGIcrhtg_.align = NIM_ALIGNOF(tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg);
NTI__RUngo7nCHe6O8aBGIcrhtg_.kind = 14;
NTI__RUngo7nCHe6O8aBGIcrhtg_.base = 0;
NTI__RUngo7nCHe6O8aBGIcrhtg_.flags = 3;
for (TM__9b9bytt1stv9cZ8uqII7HFgew_4 = 0; TM__9b9bytt1stv9cZ8uqII7HFgew_4 < 7; TM__9b9bytt1stv9cZ8uqII7HFgew_4++) {
TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_4+1].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_4+1].offset = TM__9b9bytt1stv9cZ8uqII7HFgew_4;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_4+1].name = TM__9b9bytt1stv9cZ8uqII7HFgew_3[TM__9b9bytt1stv9cZ8uqII7HFgew_4];
TM__9b9bytt1stv9cZ8uqII7HFgew_2_7[TM__9b9bytt1stv9cZ8uqII7HFgew_4] = &TM__9b9bytt1stv9cZ8uqII7HFgew_0[TM__9b9bytt1stv9cZ8uqII7HFgew_4+1];
}
TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].len = 7; TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].kind = 2; TM__9b9bytt1stv9cZ8uqII7HFgew_0[8].sons = &TM__9b9bytt1stv9cZ8uqII7HFgew_2_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, _kind_1.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, _kind_2.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, _kind_3.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, _kind_4.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, _kind_6.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_.align = NIM_ALIGNOF(tySequence__oLpBKXzW3hF9aCVMo5EymfQ*);
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.kind = 24;
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.base = (&NTI__zfzzuQ8txrdZAYK0WGWpHg_);
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.flags = 2;
NTI__oLpBKXzW3hF9aCVMo5EymfQ_.marker = Marker_tySequence__oLpBKXzW3hF9aCVMo5EymfQ;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].kind = 1;
TM__9b9bytt1stv9cZ8uqII7HFgew_0[15].offset = offsetof(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q, _kind_7.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_.align = NIM_ALIGNOF(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*);
NTI__zfzzuQ8txrdZAYK0WGWpHg_.kind = 22;
NTI__zfzzuQ8txrdZAYK0WGWpHg_.base = (&NTI__df9bshXB7C9cTiWPIOtX3j1Q_);
NTI__zfzzuQ8txrdZAYK0WGWpHg_.flags = 2;
NTI__zfzzuQ8txrdZAYK0WGWpHg_.marker = Marker_tyRef__zfzzuQ8txrdZAYK0WGWpHg;
}

