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

#include "nimbase.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 tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw;
typedef struct tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw;
typedef struct tySequence_pxbIse2JUQkJU0n9blV9bY5g tySequence_pxbIse2JUQkJU0n9blV9bY5g;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ;
typedef struct tyObject_TLineInfo_WGx4rAexNXnczy1Avn646Q tyObject_TLineInfo_WGx4rAexNXnczy1Avn646Q;
typedef struct NimStringDesc NimStringDesc;
typedef struct tyObject_TSym_JpsEh5i1AcKChGYbg7aV4w tyObject_TSym_JpsEh5i1AcKChGYbg7aV4w;
typedef struct tyObject_TIdent_GufRQq9c0miSybX3zBD4tyA tyObject_TIdent_GufRQq9c0miSybX3zBD4tyA;
typedef struct tySequence_ehmV9bTklH2Gt9cXHV9c0HLeQ tySequence_ehmV9bTklH2Gt9cXHV9c0HLeQ;
typedef struct tyObject_TIdObj_iIXPrEsiKHiioLj0HSkQhA tyObject_TIdObj_iIXPrEsiKHiioLj0HSkQhA;
typedef struct RootObj RootObj;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tySequence_Ef05srmQTDulnBdXR4Ja6Q tySequence_Ef05srmQTDulnBdXR4Ja6Q;
typedef struct tySequence_MvZmat48bhe9b6x9aUD58D5Q tySequence_MvZmat48bhe9b6x9aUD58D5Q;
typedef struct tyObject_TLoc_EtHNvCB0bgfu9bFjzx9cb6aA tyObject_TLoc_EtHNvCB0bgfu9bFjzx9cb6aA;
typedef struct tyObject_RopeObj_OFzf0kSiPTcNreUIeJgWVA tyObject_RopeObj_OFzf0kSiPTcNreUIeJgWVA;
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 tyTuple_zwpS6d6iewrdlBSTNFoyVA tyTuple_zwpS6d6iewrdlBSTNFoyVA;
struct TGenericSeq {
NI len;
NI reserved;
};
struct tyObject_TLineInfo_WGx4rAexNXnczy1Avn646Q {
NU16 line;
NI16 col;
NI32 fileIndex;
};
typedef NU32 tySet_tyEnum_TNodeFlag_jyh9acXHkhZANSSvPIY7ZLg;
typedef NU8 tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw;
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw {
tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* typ;
tyObject_TLineInfo_WGx4rAexNXnczy1Avn646Q info;
tySet_tyEnum_TNodeFlag_jyh9acXHkhZANSSvPIY7ZLg flags;
tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw kind;
union{
struct {NI64 intVal;
};
struct {NF floatVal;
};
struct {NimStringDesc* strVal;
};
struct {tyObject_TSym_JpsEh5i1AcKChGYbg7aV4w* sym;
};
struct {tyObject_TIdent_GufRQq9c0miSybX3zBD4tyA* ident;
};
struct {tySequence_ehmV9bTklH2Gt9cXHV9c0HLeQ* sons;
};
};
NimStringDesc* comment;
};
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 tyObject_TIdObj_iIXPrEsiKHiioLj0HSkQhA {
  RootObj Sup;
NI id;
};
typedef NU8 tyEnum_TTypeKind_9a3YiReNVD0IJHWFKgXRe9ag;
typedef NU8 tyEnum_TCallingConvention_yjAJ8w0h1PBaSwSGJ3P7IA;
typedef NU64 tySet_tyEnum_TTypeFlag_x2m5g1NpbmDig4wLT3Ylhw;
typedef tyObject_TSym_JpsEh5i1AcKChGYbg7aV4w* tyArray_PsPyPA45AAjHu4uDGHNjTg[4];
typedef NU8 tyEnum_TLocKind_O7PRFZKuiBBWbku09cayVBg;
typedef NU8 tyEnum_TStorageLoc_JK9cKMX3XnqHaUky9b6gkGEw;
typedef NU16 tySet_tyEnum_TLocFlag_o2bqJgR4ceIupnUSpxiudA;
struct tyObject_TLoc_EtHNvCB0bgfu9bFjzx9cb6aA {
tyEnum_TLocKind_O7PRFZKuiBBWbku09cayVBg k;
tyEnum_TStorageLoc_JK9cKMX3XnqHaUky9b6gkGEw storage;
tySet_tyEnum_TLocFlag_o2bqJgR4ceIupnUSpxiudA flags;
tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* lode;
tyObject_RopeObj_OFzf0kSiPTcNreUIeJgWVA* r;
};
struct tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ {
  tyObject_TIdObj_iIXPrEsiKHiioLj0HSkQhA Sup;
tyEnum_TTypeKind_9a3YiReNVD0IJHWFKgXRe9ag kind;
tyEnum_TCallingConvention_yjAJ8w0h1PBaSwSGJ3P7IA callConv;
tySet_tyEnum_TTypeFlag_x2m5g1NpbmDig4wLT3Ylhw flags;
tySequence_Ef05srmQTDulnBdXR4Ja6Q* sons;
tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* n;
tyObject_TSym_JpsEh5i1AcKChGYbg7aV4w* owner;
tyObject_TSym_JpsEh5i1AcKChGYbg7aV4w* sym;
tyArray_PsPyPA45AAjHu4uDGHNjTg attachedOps;
tySequence_MvZmat48bhe9b6x9aUD58D5Q* methods;
NI64 size;
NI16 align;
NI16 lockLevel;
tyObject_TLoc_EtHNvCB0bgfu9bFjzx9cb6aA loc;
tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* typeInst;
NI uniqueId;
};
typedef NU8 tySet_tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw[21];
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;
};
struct tyTuple_zwpS6d6iewrdlBSTNFoyVA {
NI Field0;
tyObject_TSym_JpsEh5i1AcKChGYbg7aV4w* Field1;
};
struct tySequence_pxbIse2JUQkJU0n9blV9bY5g {
  TGenericSeq Sup;
  NI8 data[SEQ_DECL_SIZE];
};
struct tySequence_ehmV9bTklH2Gt9cXHV9c0HLeQ {
  TGenericSeq Sup;
  tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* data[SEQ_DECL_SIZE];
};
struct tySequence_Ef05srmQTDulnBdXR4Ja6Q {
  TGenericSeq Sup;
  tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* data[SEQ_DECL_SIZE];
};
struct tySequence_MvZmat48bhe9b6x9aUD58D5Q {
  TGenericSeq Sup;
  tyTuple_zwpS6d6iewrdlBSTNFoyVA data[SEQ_DECL_SIZE];
};
N_LIB_PRIVATE N_NIMCALL(void, toBitSet_NZsBRVngLBw9c79cEt9a4qOHg)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* s, tySequence_pxbIse2JUQkJU0n9blV9bY5g** b);
N_LIB_PRIVATE N_NIMCALL(NI64, firstOrd_4cSIntenL9aBXY6LAFsvXdQ)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* t);
N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NIMCALL(void, bitSetInit_T39bKtX2JHdvNWWk0TfFpmg)(tySequence_pxbIse2JUQkJU0n9blV9bY5g** b, NI length);
N_LIB_PRIVATE N_NIMCALL(NI64, getSize_vCG1GF2Iu043oALVyuJfOw)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* typ);
N_NIMCALL(NI64, chckRange64)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(NI, sonsLen_zOB1gNtXypybIzLxxB9cyWQ)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* n);
N_NOINLINE(void, raiseFieldError)(NimStringDesc* f);
N_LIB_PRIVATE N_NIMCALL(NI64, getOrdValue_MzTDl1zEXJLD4sql7PhCwA)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* n);
N_LIB_PRIVATE N_NIMCALL(void, bitSetIncl_9awEOMXe4r2cReUAL9aRMpXw)(tySequence_pxbIse2JUQkJU0n9blV9bY5g** x, NI64 elem);
static N_INLINE(NI64, subInt64)(NI64 a, NI64 b);
N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NI64, addInt64)(NI64 a, NI64 b);
static N_INLINE(NI, addInt)(NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(NI64, bitSetCard_ZHQdTirDV7alskgSUx3Scw)(tySequence_pxbIse2JUQkJU0n9blV9bY5g* x);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, bitSetContains_mzORTSY4gMvODHf4n9auNeA)(tySequence_pxbIse2JUQkJU0n9blV9bY5g* x, tySequence_pxbIse2JUQkJU0n9blV9bY5g* y);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, bitSetEquals_mzORTSY4gMvODHf4n9auNeA_2)(tySequence_pxbIse2JUQkJU0n9blV9bY5g* x, tySequence_pxbIse2JUQkJU0n9blV9bY5g* y);
N_LIB_PRIVATE N_NIMCALL(void, bitSetIntersect_qWxhxHmkYQCr0oikq8R6uQ)(tySequence_pxbIse2JUQkJU0n9blV9bY5g** x, tySequence_pxbIse2JUQkJU0n9blV9bY5g* y);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, toTreeSet_cAKtKbFbz2NiBcybvkS0iQ)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tySequence_pxbIse2JUQkJU0n9blV9bY5g* s, tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* settype, tyObject_TLineInfo_WGx4rAexNXnczy1Avn646Q info);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, newNodeI_vokyXY9cZDshCSxFKChhG9bg)(tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw kind, tyObject_TLineInfo_WGx4rAexNXnczy1Avn646Q info);
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(NI, mulInt)(NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, bitSetIn_hXUeZ7hM1IMvaWWfkipuzQ)(tySequence_pxbIse2JUQkJU0n9blV9bY5g* x, NI64 e);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, newIntTypeNode_mZbgs79bpqpV9awU62kdPZ1A)(tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw kind, NI64 intVal, tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* typ);
N_LIB_PRIVATE N_NIMCALL(void, addSon_P8dDSotTW25BkfbyspojGg_2)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* father, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* son);
N_LIB_PRIVATE N_NIMCALL(void, bitSetUnion_qWxhxHmkYQCr0oikq8R6uQ_2)(tySequence_pxbIse2JUQkJU0n9blV9bY5g** x, tySequence_pxbIse2JUQkJU0n9blV9bY5g* y);
N_LIB_PRIVATE N_NIMCALL(void, bitSetDiff_qWxhxHmkYQCr0oikq8R6uQ_3)(tySequence_pxbIse2JUQkJU0n9blV9bY5g** x, tySequence_pxbIse2JUQkJU0n9blV9bY5g* y);
N_LIB_PRIVATE N_NIMCALL(void, bitSetSymDiff_qWxhxHmkYQCr0oikq8R6uQ_4)(tySequence_pxbIse2JUQkJU0n9blV9bY5g** x, tySequence_pxbIse2JUQkJU0n9blV9bY5g* y);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl_W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, leValue_uOYuOsiCZAbEPMGwBL8r8g_2)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, sameValue_uOYuOsiCZAbEPMGwBL8r8g)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b);
extern tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ gch_IcYaEuuWivYAS86vFMTS3Q;
static NIM_CONST tySet_tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw TM_RCpa9aHGGIKsR9cKRKvszwow_2 = {
0xEC, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TM_RCpa9aHGGIKsR9cKRKvszwow_3, "sons", 4);
STRING_LITERAL(TM_RCpa9aHGGIKsR9cKRKvszwow_15, "/Users/travis/build/nim-lang/nightlies/nim/e7471cebae2a404f3e42"
"39f199f5a0c422484aac/compiler/nimsets.nim(17, 10) `s.kind == nkC"
"urly` ", 133);

static N_INLINE(NI64, subInt64)(NI64 a, NI64 b) {
	NI64 result;
{	result = (NI64)0;
	result = (NI64)((NU64)(a) - (NU64)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (IL64(0) <= (NI64)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (IL64(0) <= (NI64)(result ^ (NI64)((NU64) ~(b))));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}

static N_INLINE(NI64, addInt64)(NI64 a, NI64 b) {
	NI64 result;
{	result = (NI64)0;
	result = (NI64)((NU64)(a) + (NU64)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (IL64(0) <= (NI64)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (IL64(0) <= (NI64)(result ^ b));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}

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;
}

N_LIB_PRIVATE N_NIMCALL(void, toBitSet_NZsBRVngLBw9c79cEt9a4qOHg)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* s, tySequence_pxbIse2JUQkJU0n9blV9bY5g** b) {
	NI64 first;
	NI64 j;
	NI64 T1_;
	first = (NI64)0;
	j = (NI64)0;
	if ((NU)(((NI) 0)) >= (NU)((*(*s).typ).sons ? (*(*s).typ).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*(*s).typ).sons ? (*(*s).typ).sons->Sup.len : 0)-1);
	first = firstOrd_4cSIntenL9aBXY6LAFsvXdQ(conf, (*(*s).typ).sons->data[((NI) 0)]);
	T1_ = (NI64)0;
	T1_ = getSize_vCG1GF2Iu043oALVyuJfOw(conf, (*s).typ);
	bitSetInit_T39bKtX2JHdvNWWk0TfFpmg(b, ((NI)chckRange64(T1_, ((NI) (-2147483647 -1)), ((NI) 2147483647))));
	{
		NI i;
		NI colontmp_;
		NI i_2;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = sonsLen_zOB1gNtXypybIzLxxB9cyWQ(s);
		i_2 = ((NI) 0);
		{
			while (1) {
				NI TM_RCpa9aHGGIKsR9cKRKvszwow_7;
				if (!(i_2 < colontmp_)) goto LA4;
				i = i_2;
				{
					if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
					if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
					if (!((*(*s).sons->data[i]).kind == ((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 44))) goto LA7_;
					if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
					if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
					if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*(*s).sons->data[i]).kind)>>3] &(1U<<((NU)((*(*s).sons->data[i]).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
					if ((NU)(((NI) 0)) >= (NU)((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)-1);
					j = getOrdValue_MzTDl1zEXJLD4sql7PhCwA((*(*s).sons->data[i]).sons->data[((NI) 0)]);
					{
						while (1) {
							NI64 T11_;
							NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_4;
							NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_5;
							if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
							if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
							if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*(*s).sons->data[i]).kind)>>3] &(1U<<((NU)((*(*s).sons->data[i]).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
							if ((NU)(((NI) 1)) >= (NU)((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)) raiseIndexError2(((NI) 1),((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)-1);
							T11_ = (NI64)0;
							T11_ = getOrdValue_MzTDl1zEXJLD4sql7PhCwA((*(*s).sons->data[i]).sons->data[((NI) 1)]);
							if (!(j <= T11_)) goto LA10;
							TM_RCpa9aHGGIKsR9cKRKvszwow_4 = subInt64(j, first);
							bitSetIncl_9awEOMXe4r2cReUAL9aRMpXw(b, (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_4));
							TM_RCpa9aHGGIKsR9cKRKvszwow_5 = addInt64(j, ((NI) 1));
							j = (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_5);
						} LA10: ;
					}
				}
				goto LA5_;
				LA7_: ;
				{
					NI64 T13_;
					NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_6;
					if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
					if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
					T13_ = (NI64)0;
					T13_ = getOrdValue_MzTDl1zEXJLD4sql7PhCwA((*s).sons->data[i]);
					TM_RCpa9aHGGIKsR9cKRKvszwow_6 = subInt64(T13_, first);
					bitSetIncl_9awEOMXe4r2cReUAL9aRMpXw(b, (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_6));
				}
				LA5_: ;
				TM_RCpa9aHGGIKsR9cKRKvszwow_7 = addInt(i_2, ((NI) 1));
				i_2 = (NI)(TM_RCpa9aHGGIKsR9cKRKvszwow_7);
			} LA4: ;
		}
	}
}

N_LIB_PRIVATE N_NIMCALL(NI64, cardSet_rIy8FkZfgdui9cmJlRrbtNA)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a) {
	NI64 result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	result = (NI64)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	result = bitSetCard_ZHQdTirDV7alskgSUx3Scw(x);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, containsSets_Jr5d2PbcnAZ0pFa4Ny88lg)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	NIM_BOOL result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* y;
	result = (NIM_BOOL)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	y = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, b, (&y));
	result = bitSetContains_mzORTSY4gMvODHf4n9auNeA(x, y);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, equalSets_Jr5d2PbcnAZ0pFa4Ny88lg_2)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	NIM_BOOL result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* y;
	result = (NIM_BOOL)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	y = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, b, (&y));
	result = bitSetEquals_mzORTSY4gMvODHf4n9auNeA_2(x, y);
	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;
}

N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, toTreeSet_cAKtKbFbz2NiBcybvkS0iQ)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tySequence_pxbIse2JUQkJU0n9blV9bY5g* s, tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* settype, tyObject_TLineInfo_WGx4rAexNXnczy1Avn646Q info) {
	tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* result;
	NI64 a;
	NI64 b;
	NI64 e;
	NI64 first;
	tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ* elemType;
	tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* n;
	result = (tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*)0;
	a = (NI64)0;
	b = (NI64)0;
	e = (NI64)0;
	first = (NI64)0;
	elemType = (tyObject_TType_v9ae2Dpu13OW2ZJ2U9bNMd9cQ*)0;
	n = (tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*)0;
	if ((NU)(((NI) 0)) >= (NU)((*settype).sons ? (*settype).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*settype).sons ? (*settype).sons->Sup.len : 0)-1);
	elemType = (*settype).sons->data[((NI) 0)];
	first = firstOrd_4cSIntenL9aBXY6LAFsvXdQ(conf, elemType);
	result = newNodeI_vokyXY9cZDshCSxFKChhG9bg(((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 39), info);
	asgnRef((void**) (&(*result).typ), settype);
	(*result).info = info;
	e = IL64(0);
	{
		while (1) {
			NI T3_;
			NI TM_RCpa9aHGGIKsR9cKRKvszwow_8;
			NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_14;
			T3_ = (s ? s->Sup.len : 0);
			TM_RCpa9aHGGIKsR9cKRKvszwow_8 = mulInt(T3_, ((NI) 8));
			if (!(e < ((NI64) ((NI)(TM_RCpa9aHGGIKsR9cKRKvszwow_8))))) goto LA2;
			{
				NIM_BOOL T6_;
				NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_11;
				tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* aa;
				NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_12;
				T6_ = (NIM_BOOL)0;
				T6_ = bitSetIn_hXUeZ7hM1IMvaWWfkipuzQ(s, e);
				if (!T6_) goto LA7_;
				a = e;
				b = e;
				{
					while (1) {
						NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_9;
						TM_RCpa9aHGGIKsR9cKRKvszwow_9 = addInt64(b, ((NI) 1));
						b = (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_9);
						{
							NIM_BOOL T13_;
							NI T14_;
							NI TM_RCpa9aHGGIKsR9cKRKvszwow_10;
							NIM_BOOL T16_;
							T13_ = (NIM_BOOL)0;
							T14_ = (s ? s->Sup.len : 0);
							TM_RCpa9aHGGIKsR9cKRKvszwow_10 = mulInt(T14_, ((NI) 8));
							T13_ = (((NI64) ((NI)(TM_RCpa9aHGGIKsR9cKRKvszwow_10))) <= b);
							if (T13_) goto LA15_;
							T16_ = (NIM_BOOL)0;
							T16_ = bitSetIn_hXUeZ7hM1IMvaWWfkipuzQ(s, b);
							T13_ = !(T16_);
							LA15_: ;
							if (!T13_) goto LA17_;
							goto LA9;
						}
						LA17_: ;
					}
				} LA9: ;
				TM_RCpa9aHGGIKsR9cKRKvszwow_11 = subInt64(b, ((NI) 1));
				b = (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_11);
				TM_RCpa9aHGGIKsR9cKRKvszwow_12 = addInt64(a, first);
				aa = newIntTypeNode_mZbgs79bpqpV9awU62kdPZ1A(((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 6), (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_12), elemType);
				(*aa).info = info;
				{
					if (!(a == b)) goto LA21_;
					addSon_P8dDSotTW25BkfbyspojGg_2(result, aa);
				}
				goto LA19_;
				LA21_: ;
				{
					tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* bb;
					NI64 TM_RCpa9aHGGIKsR9cKRKvszwow_13;
					n = newNodeI_vokyXY9cZDshCSxFKChhG9bg(((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 44), info);
					asgnRef((void**) (&(*n).typ), elemType);
					addSon_P8dDSotTW25BkfbyspojGg_2(n, aa);
					TM_RCpa9aHGGIKsR9cKRKvszwow_13 = addInt64(b, first);
					bb = newIntTypeNode_mZbgs79bpqpV9awU62kdPZ1A(((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 6), (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_13), elemType);
					(*bb).info = info;
					addSon_P8dDSotTW25BkfbyspojGg_2(n, bb);
					addSon_P8dDSotTW25BkfbyspojGg_2(result, n);
				}
				LA19_: ;
				e = b;
			}
			LA7_: ;
			TM_RCpa9aHGGIKsR9cKRKvszwow_14 = addInt64(e, ((NI) 1));
			e = (NI64)(TM_RCpa9aHGGIKsR9cKRKvszwow_14);
		} LA2: ;
	}
	return result;
}

N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, intersectSets_DJXyM0ZYUUgI9bAP6orixDA)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* y;
	result = (tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	y = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, b, (&y));
	bitSetIntersect_qWxhxHmkYQCr0oikq8R6uQ((&x), y);
	result = toTreeSet_cAKtKbFbz2NiBcybvkS0iQ(conf, x, (*a).typ, (*a).info);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, unionSets_DJXyM0ZYUUgI9bAP6orixDA_2)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* y;
	result = (tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	y = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, b, (&y));
	bitSetUnion_qWxhxHmkYQCr0oikq8R6uQ_2((&x), y);
	result = toTreeSet_cAKtKbFbz2NiBcybvkS0iQ(conf, x, (*a).typ, (*a).info);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, diffSets_DJXyM0ZYUUgI9bAP6orixDA_3)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* y;
	result = (tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	y = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, b, (&y));
	bitSetDiff_qWxhxHmkYQCr0oikq8R6uQ_3((&x), y);
	result = toTreeSet_cAKtKbFbz2NiBcybvkS0iQ(conf, x, (*a).typ, (*a).info);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, symdiffSets_DJXyM0ZYUUgI9bAP6orixDA_4)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* y;
	result = (tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	y = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, b, (&y));
	bitSetSymDiff_qWxhxHmkYQCr0oikq8R6uQ_4((&x), y);
	result = toTreeSet_cAKtKbFbz2NiBcybvkS0iQ(conf, x, (*a).typ, (*a).info);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, inSet_b4nxsJCvqXRlyalSWskgNA)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* s, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* elem) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	{
		if (!!(((*s).kind == ((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 39)))) goto LA3_;
		failedAssertImpl_W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_15));
	}
	LA3_: ;
	{
		if (!!(((*s).kind == ((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 39)))) goto LA7_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	LA7_: ;
	{
		NI i;
		NI colontmp_;
		NI i_2;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = sonsLen_zOB1gNtXypybIzLxxB9cyWQ(s);
		i_2 = ((NI) 0);
		{
			while (1) {
				NI TM_RCpa9aHGGIKsR9cKRKvszwow_16;
				if (!(i_2 < colontmp_)) goto LA11;
				i = i_2;
				{
					if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
					if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
					if (!((*(*s).sons->data[i]).kind == ((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 44))) goto LA14_;
					{
						NIM_BOOL T18_;
						T18_ = (NIM_BOOL)0;
						if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
						if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
						if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*(*s).sons->data[i]).kind)>>3] &(1U<<((NU)((*(*s).sons->data[i]).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
						if ((NU)(((NI) 0)) >= (NU)((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)-1);
						T18_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2((*(*s).sons->data[i]).sons->data[((NI) 0)], elem);
						if (!(T18_)) goto LA19_;
						if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
						if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
						if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*(*s).sons->data[i]).kind)>>3] &(1U<<((NU)((*(*s).sons->data[i]).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
						if ((NU)(((NI) 1)) >= (NU)((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)) raiseIndexError2(((NI) 1),((*(*s).sons->data[i]).sons ? (*(*s).sons->data[i]).sons->Sup.len : 0)-1);
						T18_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2(elem, (*(*s).sons->data[i]).sons->data[((NI) 1)]);
						LA19_: ;
						if (!T18_) goto LA20_;
						result = NIM_TRUE;
						goto BeforeRet_;
					}
					LA20_: ;
				}
				goto LA12_;
				LA14_: ;
				{
					{
						NIM_BOOL T25_;
						if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*s).kind)>>3] &(1U<<((NU)((*s).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
						if ((NU)(i) >= (NU)((*s).sons ? (*s).sons->Sup.len : 0)) raiseIndexError2(i,((*s).sons ? (*s).sons->Sup.len : 0)-1);
						T25_ = (NIM_BOOL)0;
						T25_ = sameValue_uOYuOsiCZAbEPMGwBL8r8g((*s).sons->data[i], elem);
						if (!T25_) goto LA26_;
						result = NIM_TRUE;
						goto BeforeRet_;
					}
					LA26_: ;
				}
				LA12_: ;
				TM_RCpa9aHGGIKsR9cKRKvszwow_16 = addInt(i_2, ((NI) 1));
				i_2 = (NI)(TM_RCpa9aHGGIKsR9cKRKvszwow_16);
			} LA11: ;
		}
	}
	result = NIM_FALSE;
	}BeforeRet_: ;
	return result;
}

N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, overlap_tlIBRycg3YyKwtO2aPbGGg)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	{
		if (!((*a).kind == ((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 44))) goto LA3_;
		{
			NIM_BOOL T9_;
			if (!((*b).kind == ((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 44))) goto LA7_;
			T9_ = (NIM_BOOL)0;
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*a).kind)>>3] &(1U<<((NU)((*a).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 0)) >= (NU)((*a).sons ? (*a).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*a).sons ? (*a).sons->Sup.len : 0)-1);
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*b).kind)>>3] &(1U<<((NU)((*b).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 1)) >= (NU)((*b).sons ? (*b).sons->Sup.len : 0)) raiseIndexError2(((NI) 1),((*b).sons ? (*b).sons->Sup.len : 0)-1);
			T9_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2((*a).sons->data[((NI) 0)], (*b).sons->data[((NI) 1)]);
			if (!(T9_)) goto LA10_;
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*b).kind)>>3] &(1U<<((NU)((*b).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 0)) >= (NU)((*b).sons ? (*b).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*b).sons ? (*b).sons->Sup.len : 0)-1);
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*a).kind)>>3] &(1U<<((NU)((*a).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 1)) >= (NU)((*a).sons ? (*a).sons->Sup.len : 0)) raiseIndexError2(((NI) 1),((*a).sons ? (*a).sons->Sup.len : 0)-1);
			T9_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2((*b).sons->data[((NI) 0)], (*a).sons->data[((NI) 1)]);
			LA10_: ;
			result = T9_;
		}
		goto LA5_;
		LA7_: ;
		{
			NIM_BOOL T12_;
			T12_ = (NIM_BOOL)0;
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*a).kind)>>3] &(1U<<((NU)((*a).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 0)) >= (NU)((*a).sons ? (*a).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*a).sons ? (*a).sons->Sup.len : 0)-1);
			T12_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2((*a).sons->data[((NI) 0)], b);
			if (!(T12_)) goto LA13_;
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*a).kind)>>3] &(1U<<((NU)((*a).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 1)) >= (NU)((*a).sons ? (*a).sons->Sup.len : 0)) raiseIndexError2(((NI) 1),((*a).sons ? (*a).sons->Sup.len : 0)-1);
			T12_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2(b, (*a).sons->data[((NI) 1)]);
			LA13_: ;
			result = T12_;
		}
		LA5_: ;
	}
	goto LA1_;
	LA3_: ;
	{
		{
			NIM_BOOL T19_;
			if (!((*b).kind == ((tyEnum_TNodeKind_G4E4Gxe7oI2Cm03rkiOzQw) 44))) goto LA17_;
			T19_ = (NIM_BOOL)0;
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*b).kind)>>3] &(1U<<((NU)((*b).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 0)) >= (NU)((*b).sons ? (*b).sons->Sup.len : 0)) raiseIndexError2(((NI) 0),((*b).sons ? (*b).sons->Sup.len : 0)-1);
			T19_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2((*b).sons->data[((NI) 0)], a);
			if (!(T19_)) goto LA20_;
			if (((TM_RCpa9aHGGIKsR9cKRKvszwow_2[(NU)((*b).kind)>>3] &(1U<<((NU)((*b).kind)&7U)))!=0)) raiseFieldError(((NimStringDesc*) &TM_RCpa9aHGGIKsR9cKRKvszwow_3));
			if ((NU)(((NI) 1)) >= (NU)((*b).sons ? (*b).sons->Sup.len : 0)) raiseIndexError2(((NI) 1),((*b).sons ? (*b).sons->Sup.len : 0)-1);
			T19_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2(a, (*b).sons->data[((NI) 1)]);
			LA20_: ;
			result = T19_;
		}
		goto LA15_;
		LA17_: ;
		{
			result = sameValue_uOYuOsiCZAbEPMGwBL8r8g(a, b);
		}
		LA15_: ;
	}
	LA1_: ;
	return result;
}

N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, emptyRange_tlIBRycg3YyKwtO2aPbGGg_2)(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* b) {
	NIM_BOOL result;
	NIM_BOOL T1_;
	result = (NIM_BOOL)0;
	T1_ = (NIM_BOOL)0;
	T1_ = leValue_uOYuOsiCZAbEPMGwBL8r8g_2(a, b);
	result = !(T1_);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*, deduplicate_npqksG7nXsyGRBfJK1db1g)(tyObject_ConfigRefcolonObjectType__LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* a) {
	tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* result;
	tySequence_pxbIse2JUQkJU0n9blV9bY5g* x;
	result = (tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw*)0;
	x = (tySequence_pxbIse2JUQkJU0n9blV9bY5g*)0;
	toBitSet_NZsBRVngLBw9c79cEt9a4qOHg(conf, a, (&x));
	result = toTreeSet_cAKtKbFbz2NiBcybvkS0iQ(conf, x, (*a).typ, (*a).info);
	return result;
}
