/* Generated by Nim Compiler v1.9.0 */ #define NIM_INTBITS 64 #include "nimbase.h" #include #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_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA; typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A; typedef struct tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA; typedef struct tySequence__Bre9bNyuQOg1EJKitjSzn8w tySequence__Bre9bNyuQOg1EJKitjSzn8w; typedef struct tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content; struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A { NI rc; NI rootIdx; }; typedef NU tyArray__VqSA39cBDWnwnJySTumCdjw[8]; struct tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* next; NI key; tyArray__VqSA39cBDWnwnJySTumCdjw bits; }; struct tySequence__Bre9bNyuQOg1EJKitjSzn8w { NI len; tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content* p; }; typedef NI tyArray__emiAJ8okywrJw7ZHLzlXbQ[34]; struct tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA { NI elems; NI counter; NI max; tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* head; tySequence__Bre9bNyuQOg1EJKitjSzn8w data; tyArray__emiAJ8okywrJw7ZHLzlXbQ a; }; #ifndef tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content_PP #define tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content_PP struct tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content { NI cap; tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* data[SEQ_DECL_SIZE];}; #endif #ifndef tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content_PP #define tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content_PP struct tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content { NI cap; tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* data[SEQ_DECL_SIZE];}; #endif #ifndef tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content_PP #define tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content_PP struct tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content { NI cap; tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* data[SEQ_DECL_SIZE];}; #endif static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p); static N_INLINE(NI, minuspercent___system_790)(NI x, NI y); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_36)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* dest); N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p, NI alignment); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_56)(tySequence__Bre9bNyuQOg1EJKitjSzn8w* dest); static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size); static N_INLINE(void, nimZeroMem)(void* p, NI size); static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size); N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap, NI elemSize, NI elemAlign); N_LIB_PRIVATE N_NIMCALL(void, newSeq__pureZcollectionsZintsets_237)(tySequence__Bre9bNyuQOg1EJKitjSzn8w* s, NI len); static N_INLINE(void, bitincl__pureZcollectionsZintsets_254)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key); N_LIB_PRIVATE N_NIMCALL(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*, intSetPut__pureZcollectionsZintsets_263)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t, NI key); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZcollectionsZintsets_27)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA** dest, tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* src); static N_INLINE(void, nimIncRef)(void* p); static N_INLINE(NI, nextTry__stdZpackedsets_42)(NI h, NI maxHash, NI* perturb); static N_INLINE(NIM_BOOL, mustRehash__pureZcollectionsZintsets_274)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t); N_LIB_PRIVATE N_NIMCALL(void, intSetEnlarge__pureZcollectionsZintsets_282)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t); N_LIB_PRIVATE N_NIMCALL(void, intSetRawInsert__pureZcollectionsZintsets_301)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t, tySequence__Bre9bNyuQOg1EJKitjSzn8w* data, tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* desc); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_24)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA** dest); N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size, NI alignment); N_LIB_PRIVATE N_NIMCALL(void, incl__pureZcollectionsZintsets_202)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key); N_LIB_PRIVATE N_NIMCALL(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*, packedSetGet__astalgo_433)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t, NI key); N_LIB_PRIVATE N_NIMCALL(void, exclImpl__reorder_452)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZcollectionsZintsets_59)(tySequence__Bre9bNyuQOg1EJKitjSzn8w* dest, tySequence__Bre9bNyuQOg1EJKitjSzn8w src); N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZcollectionsZintsets_62)(tySequence__Bre9bNyuQOg1EJKitjSzn8w* dest, tySequence__Bre9bNyuQOg1EJKitjSzn8w src); N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZcollectionsZintsets_30)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA** dest, tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* src); N_LIB_PRIVATE N_NIMCALL(void, initPackedSet__pureZcollectionsZintsets_16)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* Result); N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__astalgo_3655)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key); static N_INLINE(NI, pluspercent___system_770)(NI x, NI y); extern NIM_BOOL nimInErrorMode__system_3980; static N_INLINE(NI, minuspercent___system_790)(NI x, NI y) { NI result; result = (NI)0; result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y)))))); return result; } static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p) { NIM_BOOL result; result = (NIM_BOOL)0; { tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell; NI T5_; if (!!((p == NIM_NIL))) goto LA3_; T5_ = (NI)0; T5_ = minuspercent___system_790(((NI) (ptrdiff_t) (p)), ((NI)16)); cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_)); { if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_; result = NIM_TRUE; } goto LA6_; LA8_: ; { (*cell).rc -= ((NI)16); } LA6_: ; } LA3_: ; return result; } static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; result = (NIM_BOOL*)0; result = (&nimInErrorMode__system_3980); return result; } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_36)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* dest) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = nimDecRefIsLast((*dest).next); if (!T3_) goto LA4_; eqdestroy___pureZcollectionsZintsets_36((*dest).next); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; nimRawDispose((*dest).next, ((NI)8)); } LA4_: ; }BeforeRet_: ; } static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) { void* T1_; T1_ = (void*)0; T1_ = memcpy(dest, source, ((size_t) (size))); } N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZcollectionsZintsets_187)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* dest, tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* src) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); (*dest).elems = (*src).elems; (*dest).counter = (*src).counter; (*dest).max = (*src).max; { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = nimDecRefIsLast((*dest).head); if (!T3_) goto LA4_; eqdestroy___pureZcollectionsZintsets_36((*dest).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; nimRawDispose((*dest).head, ((NI)8)); } LA4_: ; (*dest).head = (*src).head; if ((*dest).data.p != (*src).data.p) { eqdestroy___pureZcollectionsZintsets_56((&(*dest).data)); } (*dest).data.len = (*src).data.len; (*dest).data.p = (*src).data.p; nimCopyMem((void*)(*dest).a, (NIM_CONST void*)(*src).a, sizeof(tyArray__emiAJ8okywrJw7ZHLzlXbQ)); }BeforeRet_: ; } static N_INLINE(void, nimSetMem__systemZmemory_7)(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__systemZmemory_7(p, ((int)0), size); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, initPackedSet__pureZcollectionsZintsets_16)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* Result) { nimZeroMem((void*)Result, sizeof(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA)); (*Result).elems = ((NI)0); (*Result).counter = ((NI)0); (*Result).max = ((NI)0); (*Result).head = ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL); (*Result).data.len = 0; (*Result).data.p = (tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content*) newSeqPayload(0, sizeof(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*), NIM_ALIGNOF(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*)); } N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZcollectionsZintsets_30)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA** dest, tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* src) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = nimDecRefIsLast((*dest)); if (!T3_) goto LA4_; eqdestroy___pureZcollectionsZintsets_36((*dest)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; nimRawDispose((*dest), ((NI)8)); } LA4_: ; (*dest) = src; }BeforeRet_: ; } static N_INLINE(void, nimIncRef)(void* p) { NI T1_; T1_ = (NI)0; T1_ = minuspercent___system_790(((NI) (ptrdiff_t) (p)), ((NI)16)); (*((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_))).rc += ((NI)16); } N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZcollectionsZintsets_27)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA** dest, tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* src) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { if (!src) goto LA3_; nimIncRef(src); } LA3_: ; { NIM_BOOL T7_; T7_ = (NIM_BOOL)0; T7_ = nimDecRefIsLast((*dest)); if (!T7_) goto LA8_; eqdestroy___pureZcollectionsZintsets_36((*dest)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; nimRawDispose((*dest), ((NI)8)); } LA8_: ; (*dest) = src; }BeforeRet_: ; } static N_INLINE(NI, nextTry__stdZpackedsets_42)(NI h, NI maxHash, NI* perturb) { NI result; NU perturb2; result = (NI)0; perturb2 = (NU)((NU64)(((NU) ((*perturb)))) >> (NU64)(((NI)5))); (*perturb) = ((NI) (perturb2)); result = (NI)((NI)((NI)((NI)(((NI)5) * h) + ((NI)1)) + (*perturb)) & maxHash); return result; } static N_INLINE(NIM_BOOL, mustRehash__pureZcollectionsZintsets_274)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t) { NIM_BOOL result; NI length; NIM_BOOL T1_; result = (NIM_BOOL)0; length = (NI)((*t).max + ((NI)1)); T1_ = (NIM_BOOL)0; T1_ = ((NI)(length * ((NI)2)) < (NI)((*t).counter * ((NI)3))); if (T1_) goto LA2_; T1_ = ((NI)(length - (*t).counter) < ((NI)4)); LA2_: ; result = T1_; return result; } N_LIB_PRIVATE N_NIMCALL(void, intSetRawInsert__pureZcollectionsZintsets_301)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t, tySequence__Bre9bNyuQOg1EJKitjSzn8w* data, tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* desc) { NI h; NI perturb; NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); h = (NI)((*desc).key & (*t).max); perturb = (*desc).key; { while (1) { if (!!(((*data).p->data[h] == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA2 ; h = nextTry__stdZpackedsets_42(h, (*t).max, (&perturb)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA2: ; } eqcopy___pureZcollectionsZintsets_27(&(*data).p->data[h], desc); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, intSetEnlarge__pureZcollectionsZintsets_282)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t) { tySequence__Bre9bNyuQOg1EJKitjSzn8w n; NI oldMax; tySequence__Bre9bNyuQOg1EJKitjSzn8w T8_; NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); n.len = 0; n.p = NIM_NIL; oldMax = (*t).max; (*t).max = (NI)((NI)((NI)((*t).max + ((NI)1)) * ((NI)2)) - ((NI)1)); newSeq__pureZcollectionsZintsets_237((&n), ((NI) ((NI)((*t).max + ((NI)1))))); { NI i; NI res; i = (NI)0; res = ((NI)0); { while (1) { if (!(res <= oldMax)) goto LA3 ; i = res; { if (!!(((*t).data.p->data[i] == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA6_; intSetRawInsert__pureZcollectionsZintsets_301((&(*t)), (&n), (*t).data.p->data[i]); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA6_: ; res += ((NI)1); } LA3: ; } } T8_.len = 0; T8_.p = NIM_NIL; T8_ = (*t).data; (*t).data = n; n = T8_; eqdestroy___pureZcollectionsZintsets_56((&n)); }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_24)(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA** dest) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = nimDecRefIsLast((*dest)); if (!T3_) goto LA4_; eqdestroy___pureZcollectionsZintsets_36((*dest)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; nimRawDispose((*dest), ((NI)8)); } LA4_: ; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*, intSetPut__pureZcollectionsZintsets_263)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t, NI key) { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* result; NI h; NI perturb; NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); result = NIM_NIL; h = (NI)(key & (*t).max); perturb = key; { while (1) { if (!!(((*t).data.p->data[h] == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA2 ; { if (!((*(*t).data.p->data[h]).key == key)) goto LA5_; eqcopy___pureZcollectionsZintsets_27(&result, (*t).data.p->data[h]); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; goto BeforeRet_; } LA5_: ; h = nextTry__stdZpackedsets_42(h, (*t).max, (&perturb)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA2: ; } { NIM_BOOL T9_; T9_ = (NIM_BOOL)0; T9_ = mustRehash__pureZcollectionsZintsets_274((&(*t))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; if (!T9_) goto LA10_; intSetEnlarge__pureZcollectionsZintsets_282(t); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA10_: ; (*t).counter += ((NI)1); h = (NI)(key & (*t).max); perturb = key; { while (1) { if (!!(((*t).data.p->data[h] == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA13 ; h = nextTry__stdZpackedsets_42(h, (*t).max, (&perturb)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA13: ; } eqdestroy___pureZcollectionsZintsets_24(&result); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; result = (tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) nimNewObj(sizeof(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA), NIM_ALIGNOF(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA)); eqcopy___pureZcollectionsZintsets_27(&(*result).next, (*t).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; (*result).key = key; eqcopy___pureZcollectionsZintsets_27(&(*t).head, result); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; eqcopy___pureZcollectionsZintsets_27(&(*t).data.p->data[h], result); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; return result; } static N_INLINE(void, bitincl__pureZcollectionsZintsets_254)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key) { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* ret; tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* t; NI u; NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); ret = NIM_NIL; t = NIM_NIL; t = intSetPut__pureZcollectionsZintsets_263(s, (NI)((NI64)(key) >> (NU64)(((NI)9)))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; u = (NI)(key & ((NI)511)); (*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] = (NU)((*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] | (NU)((NU64)(((NU)1)) << (NU64)((NI)(u & ((NI)63))))); eqdestroy___pureZcollectionsZintsets_24(&t); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, incl__pureZcollectionsZintsets_202)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { if (!((*s).elems <= ((NI)34))) goto LA3_; { NI i; NI i_2; i = (NI)0; i_2 = ((NI)0); { while (1) { if (!(i_2 < (*s).elems)) goto LA7 ; i = i_2; { if (!((*s).a[(i)- 0] == key)) goto LA10_; goto BeforeRet_; } LA10_: ; i_2 += ((NI)1); } LA7: ; } } { if (!((*s).elems < ((NI)34))) goto LA14_; (*s).a[((*s).elems)- 0] = key; (*s).elems += ((NI)1); goto BeforeRet_; } LA14_: ; newSeq__pureZcollectionsZintsets_237((&(*s).data), ((NI)8)); (*s).max = ((NI)7); { NI i_3; NI i_4; i_3 = (NI)0; i_4 = ((NI)0); { while (1) { if (!(i_4 < (*s).elems)) goto LA18 ; i_3 = i_4; bitincl__pureZcollectionsZintsets_254(s, (*s).a[(i_3)- 0]); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; i_4 += ((NI)1); } LA18: ; } } (*s).elems = ((NI)35); } LA3_: ; bitincl__pureZcollectionsZintsets_254(s, key); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZcollectionsZintsets_181)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* dest) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { NIM_BOOL T3_; T3_ = (NIM_BOOL)0; T3_ = nimDecRefIsLast((*dest).head); if (!T3_) goto LA4_; eqdestroy___pureZcollectionsZintsets_36((*dest).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; nimRawDispose((*dest).head, ((NI)8)); } LA4_: ; eqdestroy___pureZcollectionsZintsets_56((&(*dest).data)); }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*, packedSetGet__astalgo_433)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* t, NI key) { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* result; NI h; NI perturb; NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); result = NIM_NIL; h = (NI)(key & (*t).max); perturb = key; { while (1) { if (!!(((*t).data.p->data[h] == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA2 ; { if (!((*(*t).data.p->data[h]).key == key)) goto LA5_; eqcopy___pureZcollectionsZintsets_27(&result, (*t).data.p->data[h]); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; goto BeforeRet_; } LA5_: ; h = nextTry__stdZpackedsets_42(h, (*t).max, (&perturb)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA2: ; } result = ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL); }BeforeRet_: ; return result; } N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, containsOrIncl__astalgo_402)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key) { NIM_BOOL result; NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); result = (NIM_BOOL)0; { if (!((*s).elems <= ((NI)34))) goto LA3_; { NI i; NI i_2; i = (NI)0; i_2 = ((NI)0); { while (1) { if (!(i_2 < (*s).elems)) goto LA7 ; i = i_2; { if (!((*s).a[(i)- 0] == key)) goto LA10_; result = NIM_TRUE; goto BeforeRet_; } LA10_: ; i_2 += ((NI)1); } LA7: ; } } incl__pureZcollectionsZintsets_202(s, key); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; result = NIM_FALSE; } goto LA1_; LA3_: ; { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* t; t = NIM_NIL; t = packedSetGet__astalgo_433((&(*s)), (NI)((NI64)(key) >> (NU64)(((NI)9)))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; { NI u; if (!!((t == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA15_; u = (NI)(key & ((NI)511)); result = !(((NU)((*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] & (NU)((NU64)(((NU)1)) << (NU64)((NI)(u & ((NI)63))))) == ((NU)0))); { if (!!(result)) goto LA19_; (*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] = (NU)((*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] | (NU)((NU64)(((NU)1)) << (NU64)((NI)(u & ((NI)63))))); } LA19_: ; } goto LA13_; LA15_: ; { incl__pureZcollectionsZintsets_202(s, key); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; result = NIM_FALSE; } LA13_: ; eqdestroy___pureZcollectionsZintsets_24(&t); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA1_: ; }BeforeRet_: ; return result; } N_LIB_PRIVATE N_NIMCALL(void, exclImpl__reorder_452)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { if (!((*s).elems <= ((NI)34))) goto LA3_; { NI i; NI i_2; i = (NI)0; i_2 = ((NI)0); { while (1) { if (!(i_2 < (*s).elems)) goto LA7 ; i = i_2; { if (!((*s).a[(i)- 0] == key)) goto LA10_; (*s).a[(i)- 0] = (*s).a[((NI)((*s).elems - ((NI)1)))- 0]; (*s).elems -= ((NI)1); goto BeforeRet_; } LA10_: ; i_2 += ((NI)1); } LA7: ; } } } goto LA1_; LA3_: ; { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* t; t = NIM_NIL; t = packedSetGet__astalgo_433((&(*s)), (NI)((NI64)(key) >> (NU64)(((NI)9)))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; { NI u; if (!!((t == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA15_; u = (NI)(key & ((NI)511)); (*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] = (NU)((*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] & (NU)((NU64) ~((NU)((NU64)(((NU)1)) << (NU64)((NI)(u & ((NI)63))))))); } LA15_: ; eqdestroy___pureZcollectionsZintsets_24(&t); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA1_: ; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, excl__reorder_448)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); exclImpl__reorder_452(s, key); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZcollectionsZintsets_184)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* dest, tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* src) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); (*dest).elems = (*src).elems; (*dest).counter = (*src).counter; (*dest).max = (*src).max; { if (!(*src).head) goto LA3_; nimIncRef((*src).head); } LA3_: ; { NIM_BOOL T7_; T7_ = (NIM_BOOL)0; T7_ = nimDecRefIsLast((*dest).head); if (!T7_) goto LA8_; eqdestroy___pureZcollectionsZintsets_36((*dest).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; nimRawDispose((*dest).head, ((NI)8)); } LA8_: ; (*dest).head = (*src).head; eqcopy___pureZcollectionsZintsets_59((&(*dest).data), (*src).data); nimCopyMem((void*)(*dest).a, (NIM_CONST void*)(*src).a, sizeof(tyArray__emiAJ8okywrJw7ZHLzlXbQ)); }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__astalgo_3655)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, NI key) { NIM_BOOL result; NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); result = (NIM_BOOL)0; { if (!((*s).elems <= ((NI)34))) goto LA3_; { NI i; NI i_2; i = (NI)0; i_2 = ((NI)0); { while (1) { if (!(i_2 < (*s).elems)) goto LA7 ; i = i_2; { if (!((*s).a[(i)- 0] == key)) goto LA10_; result = NIM_TRUE; goto BeforeRet_; } LA10_: ; i_2 += ((NI)1); } LA7: ; } } } goto LA1_; LA3_: ; { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* t; t = NIM_NIL; t = packedSetGet__astalgo_433(s, (NI)((NI64)(key) >> (NU64)(((NI)9)))); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; { NI u; if (!!((t == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA15_; u = (NI)(key & ((NI)511)); result = !(((NU)((*t).bits[((NI)((NI64)(u) >> (NU64)(((NI)6))))- 0] & (NU)((NU64)(((NU)1)) << (NU64)((NI)(u & ((NI)63))))) == ((NU)0))); } goto LA13_; LA15_: ; { result = NIM_FALSE; } LA13_: ; eqdestroy___pureZcollectionsZintsets_24(&t); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA1_: ; }BeforeRet_: ; return result; } N_LIB_PRIVATE N_NIMCALL(void, assign__types_4199)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* dest, tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* src) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { tySequence__Bre9bNyuQOg1EJKitjSzn8w T5_; if (!((*src).elems <= ((NI)34))) goto LA3_; T5_.len = 0; T5_.p = NIM_NIL; T5_.len = 0; T5_.p = (tySequence__Bre9bNyuQOg1EJKitjSzn8w_Content*) newSeqPayload(0, sizeof(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*), NIM_ALIGNOF(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*)); eqsink___pureZcollectionsZintsets_62((&(*dest).data), T5_); (*dest).max = ((NI)0); (*dest).counter = (*src).counter; eqsink___pureZcollectionsZintsets_30(&(*dest).head, ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; (*dest).elems = (*src).elems; nimCopyMem((void*)(*dest).a, (NIM_CONST void*)(*src).a, sizeof(tyArray__emiAJ8okywrJw7ZHLzlXbQ)); } goto LA1_; LA3_: ; { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* it; NI T7_; it = NIM_NIL; (*dest).counter = (*src).counter; (*dest).max = (*src).max; (*dest).elems = (*src).elems; T7_ = (*src).data.len; newSeq__pureZcollectionsZintsets_237((&(*dest).data), ((NI) (T7_))); eqcopy___pureZcollectionsZintsets_27(&it, (*src).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; { while (1) { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* n; NI h; NI perturb; if (!!((it == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA9 ; n = NIM_NIL; h = (NI)((*it).key & (*dest).max); perturb = (*it).key; { while (1) { if (!!(((*dest).data.p->data[h] == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA11 ; h = nextTry__stdZpackedsets_42(h, (*dest).max, (&perturb)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA11: ; } n = 0; eqdestroy___pureZcollectionsZintsets_24(&n); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; n = (tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) nimNewObj(sizeof(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA), NIM_ALIGNOF(tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA)); eqcopy___pureZcollectionsZintsets_27(&(*n).next, (*dest).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; (*n).key = (*it).key; nimCopyMem((void*)(*n).bits, (NIM_CONST void*)(*it).bits, sizeof(tyArray__VqSA39cBDWnwnJySTumCdjw)); eqcopy___pureZcollectionsZintsets_27(&(*dest).head, n); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; eqsink___pureZcollectionsZintsets_30(&(*dest).data.p->data[h], n); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; eqcopy___pureZcollectionsZintsets_27(&it, (*it).next); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA9: ; } eqdestroy___pureZcollectionsZintsets_24(&it); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA1_: ; }BeforeRet_: ; } static N_INLINE(NI, pluspercent___system_770)(NI x, NI y) { NI result; result = (NI)0; result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y)))))); return result; } N_LIB_PRIVATE N_NIMCALL(void, difference__sem_4518)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s1, tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s2, tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* Result) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); initPackedSet__pureZcollectionsZintsets_16(Result); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; { NI item; item = (NI)0; { if (!((*s1).elems <= ((NI)34))) goto LA4_; { NI i; NI i_2; i = (NI)0; i_2 = ((NI)0); { while (1) { if (!(i_2 < (*s1).elems)) goto LA8 ; i = i_2; item = (*s1).a[(i)- 0]; { NIM_BOOL T11_; T11_ = (NIM_BOOL)0; T11_ = contains__astalgo_3655(s2, item); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; if (!!(T11_)) goto LA12_; incl__pureZcollectionsZintsets_202(Result, item); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA12_: ; i_2 += ((NI)1); } LA8: ; } } } goto LA2_; LA4_: ; { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* r; r = NIM_NIL; eqcopy___pureZcollectionsZintsets_27(&r, (*s1).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; { while (1) { NI i_3; if (!!((r == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA16 ; i_3 = ((NI)0); { while (1) { NU w; NI j; if (!(i_3 <= ((NI)7))) goto LA18 ; w = (*r).bits[(i_3)- 0]; j = ((NI)0); { while (1) { if (!!((w == ((NU)0)))) goto LA20 ; { NI T25_; if (!!(((NU)(w & ((NU)1)) == ((NU)0)))) goto LA23_; T25_ = (NI)0; T25_ = pluspercent___system_770((NI)((NU64)(i_3) << (NU64)(((NI)6))), j); item = (NI)((NI)((NU64)((*r).key) << (NU64)(((NI)9))) | T25_); { NIM_BOOL T28_; T28_ = (NIM_BOOL)0; T28_ = contains__astalgo_3655(s2, item); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; if (!!(T28_)) goto LA29_; incl__pureZcollectionsZintsets_202(Result, item); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA29_: ; } LA23_: ; j += ((NI)1); w = (NU)((NU64)(w) >> (NU64)(((NI)1))); } LA20: ; } i_3 += ((NI)1); } LA18: ; } eqcopy___pureZcollectionsZintsets_27(&r, (*r).next); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA16: ; } eqdestroy___pureZcollectionsZintsets_24(&r); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA2_: ; } }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(void, incl__importer_1622)(tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* s, tyObject_PackedSet__IhxwDBRi51nGrosBGFKcsA* other) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { NI item; item = (NI)0; { if (!((*other).elems <= ((NI)34))) goto LA4_; { NI i; NI i_2; i = (NI)0; i_2 = ((NI)0); { while (1) { if (!(i_2 < (*other).elems)) goto LA8 ; i = i_2; item = (*other).a[(i)- 0]; incl__pureZcollectionsZintsets_202(s, item); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; i_2 += ((NI)1); } LA8: ; } } } goto LA2_; LA4_: ; { tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA* r; r = NIM_NIL; eqcopy___pureZcollectionsZintsets_27(&r, (*other).head); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; { while (1) { NI i_3; if (!!((r == ((tyObject_TrunkcolonObjectType___POcWT53G7t0BSUjc31o0iA*) NIM_NIL)))) goto LA11 ; i_3 = ((NI)0); { while (1) { NU w; NI j; if (!(i_3 <= ((NI)7))) goto LA13 ; w = (*r).bits[(i_3)- 0]; j = ((NI)0); { while (1) { if (!!((w == ((NU)0)))) goto LA15 ; { NI T20_; if (!!(((NU)(w & ((NU)1)) == ((NU)0)))) goto LA18_; T20_ = (NI)0; T20_ = pluspercent___system_770((NI)((NU64)(i_3) << (NU64)(((NI)6))), j); item = (NI)((NI)((NU64)((*r).key) << (NU64)(((NI)9))) | T20_); incl__pureZcollectionsZintsets_202(s, item); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA18_: ; j += ((NI)1); w = (NU)((NU64)(w) >> (NU64)(((NI)1))); } LA15: ; } i_3 += ((NI)1); } LA13: ; } eqcopy___pureZcollectionsZintsets_27(&r, (*r).next); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA11: ; } eqdestroy___pureZcollectionsZintsets_24(&r); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA2_: ; } }BeforeRet_: ; }