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

#include "nimbase.h"
typedef struct Tnode225809 Tnode225809;
typedef struct Ttype225847 Ttype225847;
typedef struct Tlineinfo190352 Tlineinfo190352;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tsym225841 Tsym225841;
typedef struct Tident198021 Tident198021;
typedef struct Tnodeseq225803 Tnodeseq225803;
typedef struct Tbitset275012 Tbitset275012;
typedef struct Tidobj198015 Tidobj198015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Ttypeseq225843 Ttypeseq225843;
typedef struct Tloc225823 Tloc225823;
typedef struct Ropeobj176009 Ropeobj176009;
typedef struct Cell48947 Cell48947;
typedef struct Cellseq48963 Cellseq48963;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellset48959 Cellset48959;
typedef struct Pagedesc48955 Pagedesc48955;
typedef struct Memregion30891 Memregion30891;
typedef struct Smallchunk30843 Smallchunk30843;
typedef struct Llchunk30885 Llchunk30885;
typedef struct Bigchunk30845 Bigchunk30845;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30889 Avlnode30889;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Tscope225835 Tscope225835;
typedef struct TY225944 TY225944;
typedef struct Tstrtable225813 Tstrtable225813;
typedef struct Tsymseq225811 Tsymseq225811;
typedef struct Tlib225827 Tlib225827;
typedef struct Basechunk30841 Basechunk30841;
typedef struct Freecell30833 Freecell30833;
typedef struct Tinstantiation225831 Tinstantiation225831;
typedef struct Tlistentry140022 Tlistentry140022;
typedef struct TY225932 TY225932;
struct  Tlineinfo190352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tnode225809  {
Ttype225847* typ;
Tlineinfo190352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym225841* sym;
} S4;
struct {Tident198021* ident;
} S5;
struct {Tnodeseq225803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
typedef N_NIMCALL_PTR(void, TY3889) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3894) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3889 marker;
TY3894 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tidobj198015  {
  TNimObject Sup;
NI id;
};
struct  Tloc225823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype225847* t;
Ropeobj176009* r;
Ropeobj176009* heaproot;
};
struct  Ttype225847  {
  Tidobj198015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq225843* sons;
Tnode225809* n;
Tsym225841* owner;
Tsym225841* sym;
Tsym225841* destructor;
Tsym225841* deepcopy;
Tsym225841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc225823 loc;
};
struct  Cell48947  {
NI refcount;
TNimType* typ;
};
struct  Cellseq48963  {
NI len;
NI cap;
Cell48947** d;
};
struct  Cellset48959  {
NI counter;
NI max;
Pagedesc48955* head;
Pagedesc48955** data;
};
typedef Smallchunk30843* TY30906[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30891  {
NI minlargeobj;
NI maxlargeobj;
TY30906 freesmallchunks;
Llchunk30885* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30845* freechunkslist;
Intset30817 chunkstarts;
Avlnode30889* root;
Avlnode30889* deleted;
Avlnode30889* last;
Avlnode30889* freeavlnodes;
};
struct  Gcstat51014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap51018  {
Gcstack51016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq48963 zct;
Cellseq48963 decstack;
Cellset48959 cycleroots;
Cellseq48963 tempstack;
NI recgclock;
Memregion30891 region;
Gcstat51014 stat;
};
struct  Tstrtable225813  {
NI counter;
Tsymseq225811* data;
};
struct  Tsym225841  {
  Tidobj198015 Sup;
NU8 kind;
union{
struct {Ttypeseq225843* typeinstcache;
Tscope225835* typscope;
} S1;
struct {TY225944* procinstcache;
Tsym225841* gcunsafetyreason;
} S2;
struct {TY225944* usedgenerics;
Tstrtable225813 tab;
} S3;
struct {Tsym225841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype225847* typ;
Tident198021* name;
Tlineinfo190352 info;
Tsym225841* owner;
NU32 flags;
Tnode225809* ast;
NU32 options;
NI position;
NI offset;
Tloc225823 loc;
Tlib225827* annex;
Tnode225809* constraint;
};
struct  Tident198021  {
  Tidobj198015 Sup;
NimStringDesc* s;
Tident198021* next;
NI h;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Ropeobj176009  {
  TNimObject Sup;
Ropeobj176009* left;
Ropeobj176009* right;
NI length;
NimStringDesc* data;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30822[8];
struct  Pagedesc48955  {
Pagedesc48955* next;
NI key;
TY30822 bits;
};
struct  Basechunk30841  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30843  {
  Basechunk30841 Sup;
Smallchunk30843* next;
Smallchunk30843* prev;
Freecell30833* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30885  {
NI size;
NI acc;
Llchunk30885* next;
};
struct  Bigchunk30845  {
  Basechunk30841 Sup;
Bigchunk30845* next;
Bigchunk30845* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30822 bits;
};
typedef Avlnode30889* TY30896[2];
struct  Avlnode30889  {
TY30896 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope225835  {
NI depthlevel;
Tstrtable225813 symbols;
Tnodeseq225803* usingsyms;
Tscope225835* parent;
};
struct  Tlistentry140022  {
  TNimObject Sup;
Tlistentry140022* prev;
Tlistentry140022* next;
};
struct  Tlib225827  {
  Tlistentry140022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj176009* name;
Tnode225809* path;
};
struct  Freecell30833  {
Freecell30833* next;
NI zerofield;
};
struct  Tinstantiation225831  {
Tsym225841* sym;
Ttypeseq225843* concretetypes;
TY225932* usedby;
NI compilesid;
};
struct Tbitset275012 {
  TGenericSeq Sup;
  NI8 data[SEQ_DECL_SIZE];
};
struct Tnodeseq225803 {
  TGenericSeq Sup;
  Tnode225809* data[SEQ_DECL_SIZE];
};
struct Ttypeseq225843 {
  TGenericSeq Sup;
  Ttype225847* data[SEQ_DECL_SIZE];
};
struct TY225944 {
  TGenericSeq Sup;
  Tinstantiation225831* data[SEQ_DECL_SIZE];
};
struct Tsymseq225811 {
  TGenericSeq Sup;
  Tsym225841* data[SEQ_DECL_SIZE];
};
struct TY225932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, internalerror_196172)(Tlineinfo190352 info, NimStringDesc* errmsg);
N_NIMCALL(NI, sonslen_228387)(Tnode225809* n);
N_NIMCALL(NIM_BOOL, levalue_233374)(Tnode225809* a, Tnode225809* b);
N_NIMCALL(NIM_BOOL, samevalue_233324)(Tnode225809* a, Tnode225809* b);
N_NIMCALL(void, tobitset_276004)(Tnode225809* s, Tbitset275012** b);
N_NIMCALL(NI64, firstord_255004)(Ttype225847* t);
N_NIMCALL(void, bitsetinit_275021)(Tbitset275012** b, NI length);
N_NIMCALL(NI64, getsize_255190)(Ttype225847* typ);
N_NIMCALL(NI64, getordvalue_255178)(Tnode225809* n);
N_NIMCALL(void, bitsetincl_275061)(Tbitset275012** x, NI64 elem);
N_NIMCALL(void, bitsetdiff_275037)(Tbitset275012** x, Tbitset275012* y);
N_NIMCALL(Tnode225809*, totreeset_276354)(Tbitset275012* s, Ttype225847* settype, Tlineinfo190352 info);
N_NIMCALL(Tnode225809*, newnodei_227351)(NU8 kind, Tlineinfo190352 info);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(Cell48947*, usrtocell_52646)(void* usr);
static N_INLINE(void, rtladdzct_54204)(Cell48947* c);
N_NOINLINE(void, addzct_52617)(Cellseq48963* s, Cell48947* c);
N_NIMCALL(NIM_BOOL, bitsetin_275077)(Tbitset275012* x, NI64 e);
N_NIMCALL(void, addson_227819)(Tnode225809* father, Tnode225809* son);
N_NIMCALL(Tnode225809*, newinttypenode_226619)(NU8 kind, NI64 intval, Ttype225847* typ);
N_NIMCALL(NIM_BOOL, bitsetcontains_275091)(Tbitset275012* x, Tbitset275012* y);
N_NIMCALL(NIM_BOOL, bitsetequals_275084)(Tbitset275012* x, Tbitset275012* y);
N_NIMCALL(void, bitsetintersect_275053)(Tbitset275012** x, Tbitset275012* y);
N_NIMCALL(void, bitsetunion_275029)(Tbitset275012** x, Tbitset275012* y);
N_NIMCALL(void, bitsetsymdiff_275045)(Tbitset275012** x, Tbitset275012* y);
STRING_LITERAL(TMP2924, "inSet", 5);
extern Gcheap51018 gch_51059;

N_NIMCALL(NIM_BOOL, inset_276019)(Tnode225809* s, Tnode225809* elem) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!!(((*s).kind == ((NU8) 39)))) goto LA3;
		internalerror_196172((*s).info, ((NimStringDesc*) &TMP2924));
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NI i_276121;
		NI HEX3Atmp_276138;
		NI LOC6;
		NI res_276141;
		i_276121 = 0;
		HEX3Atmp_276138 = 0;
		LOC6 = 0;
		LOC6 = sonslen_228387(s);
		HEX3Atmp_276138 = (NI)(LOC6 - ((NI) 1));
		res_276141 = ((NI) 0);
		{
			while (1) {
				if (!(res_276141 <= HEX3Atmp_276138)) goto LA8;
				i_276121 = res_276141;
				{
					if (!((*(*s).kindU.S6.sons->data[i_276121]).kind == ((NU8) 44))) goto LA11;
					{
						NIM_BOOL LOC15;
						LOC15 = 0;
						LOC15 = levalue_233374((*(*s).kindU.S6.sons->data[i_276121]).kindU.S6.sons->data[((NI) 0)], elem);
						if (!(LOC15)) goto LA16;
						LOC15 = levalue_233374(elem, (*(*s).kindU.S6.sons->data[i_276121]).kindU.S6.sons->data[((NI) 1)]);
						LA16: ;
						if (!LOC15) goto LA17;
						result = NIM_TRUE;
						goto BeforeRet;
					}
					LA17: ;
				}
				goto LA9;
				LA11: ;
				{
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = samevalue_233324((*s).kindU.S6.sons->data[i_276121], elem);
						if (!LOC22) goto LA23;
						result = NIM_TRUE;
						goto BeforeRet;
					}
					LA23: ;
				}
				LA9: ;
				res_276141 += ((NI) 1);
			} LA8: ;
		}
	}
	result = NIM_FALSE;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, tobitset_276004)(Tnode225809* s, Tbitset275012** b) {
	NI64 first;
	NI64 j;
	NI64 LOC1;
	first = 0;
	j = 0;
	first = firstord_255004((*(*s).typ).sons->data[((NI) 0)]);
	LOC1 = 0;
	LOC1 = getsize_255190((*s).typ);
	bitsetinit_275021(b, ((NI) (LOC1)));
	{
		NI i_276296;
		NI HEX3Atmp_276326;
		NI LOC3;
		NI res_276329;
		i_276296 = 0;
		HEX3Atmp_276326 = 0;
		LOC3 = 0;
		LOC3 = sonslen_228387(s);
		HEX3Atmp_276326 = (NI)(LOC3 - ((NI) 1));
		res_276329 = ((NI) 0);
		{
			while (1) {
				if (!(res_276329 <= HEX3Atmp_276326)) goto LA5;
				i_276296 = res_276329;
				{
					if (!((*(*s).kindU.S6.sons->data[i_276296]).kind == ((NU8) 44))) goto LA8;
					j = getordvalue_255178((*(*s).kindU.S6.sons->data[i_276296]).kindU.S6.sons->data[((NI) 0)]);
					{
						while (1) {
							NI64 LOC12;
							LOC12 = 0;
							LOC12 = getordvalue_255178((*(*s).kindU.S6.sons->data[i_276296]).kindU.S6.sons->data[((NI) 1)]);
							if (!(j <= LOC12)) goto LA11;
							bitsetincl_275061(b, (NI64)(j - first));
							j += ((NI) 1);
						} LA11: ;
					}
				}
				goto LA6;
				LA8: ;
				{
					NI64 LOC14;
					LOC14 = 0;
					LOC14 = getordvalue_255178((*s).kindU.S6.sons->data[i_276296]);
					bitsetincl_275061(b, (NI64)(LOC14 - first));
				}
				LA6: ;
				res_276329 += ((NI) 1);
			} LA5: ;
		}
	}
}

static N_INLINE(Cell48947*, usrtocell_52646)(void* usr) {
	Cell48947* result;
	result = 0;
	result = ((Cell48947*) ((NI)((NU64)(((NI) (usr))) - (NU64)(((NI)sizeof(Cell48947))))));
	return result;
}

static N_INLINE(void, rtladdzct_54204)(Cell48947* c) {
	addzct_52617((&gch_51059.zct), c);
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Cell48947* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_52646(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Cell48947* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_52646((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA11;
			rtladdzct_54204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(Tnode225809*, totreeset_276354)(Tbitset275012* s, Ttype225847* settype, Tlineinfo190352 info) {
	Tnode225809* result;
	NI64 a;
	NI64 b;
	NI64 e;
	NI64 first;
	Ttype225847* elemtype;
	Tnode225809* n;
	result = 0;
	a = 0;
	b = 0;
	e = 0;
	first = 0;
	elemtype = 0;
	n = 0;
	elemtype = (*settype).sons->data[((NI) 0)];
	first = firstord_255004(elemtype);
	result = newnodei_227351(((NU8) 39), info);
	asgnRefNoCycle((void**) (&(*result).typ), settype);
	(*result).info = info;
	e = IL64(0);
	{
		while (1) {
			if (!(e < ((NI64) ((NI)((s ? s->Sup.len : 0) * ((NI) 8)))))) goto LA2;
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = bitsetin_275077(s, e);
				if (!LOC5) goto LA6;
				a = e;
				b = e;
				{
					while (1) {
						b += ((NI) 1);
						{
							NIM_BOOL LOC12;
							NIM_BOOL LOC14;
							LOC12 = 0;
							LOC12 = (((NI64) ((NI)((s ? s->Sup.len : 0) * ((NI) 8)))) <= b);
							if (LOC12) goto LA13;
							LOC14 = 0;
							LOC14 = bitsetin_275077(s, b);
							LOC12 = !(LOC14);
							LA13: ;
							if (!LOC12) goto LA15;
							goto LA8;
						}
						LA15: ;
					}
				} LA8: ;
				b -= ((NI) 1);
				{
					Tnode225809* LOC21;
					if (!(a == b)) goto LA19;
					LOC21 = 0;
					LOC21 = newinttypenode_226619(((NU8) 6), (NI64)(a + first), elemtype);
					addson_227819(result, LOC21);
				}
				goto LA17;
				LA19: ;
				{
					Tnode225809* LOC23;
					Tnode225809* LOC24;
					n = newnodei_227351(((NU8) 44), info);
					asgnRefNoCycle((void**) (&(*n).typ), elemtype);
					LOC23 = 0;
					LOC23 = newinttypenode_226619(((NU8) 6), (NI64)(a + first), elemtype);
					addson_227819(n, LOC23);
					LOC24 = 0;
					LOC24 = newinttypenode_226619(((NU8) 6), (NI64)(b + first), elemtype);
					addson_227819(n, LOC24);
					addson_227819(result, n);
				}
				LA17: ;
				e = b;
			}
			LA6: ;
			e += ((NI) 1);
		} LA2: ;
	}
	return result;
}

N_NIMCALL(Tnode225809*, diffsets_276054)(Tnode225809* a, Tnode225809* b) {
	Tnode225809* result;
	Tbitset275012* x;
	Tbitset275012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_276004(a, (&x));
	tobitset_276004(b, (&y));
	bitsetdiff_275037((&x), y);
	result = totreeset_276354(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(NI64, cardset_276089)(Tnode225809* s) {
	NI64 result;
	result = 0;
	result = IL64(0);
	{
		NI i_276609;
		NI HEX3Atmp_276634;
		NI LOC2;
		NI res_276637;
		i_276609 = 0;
		HEX3Atmp_276634 = 0;
		LOC2 = 0;
		LOC2 = sonslen_228387(s);
		HEX3Atmp_276634 = (NI)(LOC2 - ((NI) 1));
		res_276637 = ((NI) 0);
		{
			while (1) {
				if (!(res_276637 <= HEX3Atmp_276634)) goto LA4;
				i_276609 = res_276637;
				{
					NI64 LOC9;
					NI64 LOC10;
					if (!((*(*s).kindU.S6.sons->data[i_276609]).kind == ((NU8) 44))) goto LA7;
					LOC9 = 0;
					LOC9 = getordvalue_255178((*(*s).kindU.S6.sons->data[i_276609]).kindU.S6.sons->data[((NI) 1)]);
					LOC10 = 0;
					LOC10 = getordvalue_255178((*(*s).kindU.S6.sons->data[i_276609]).kindU.S6.sons->data[((NI) 0)]);
					result = (NI64)((NI64)((NI64)(result + LOC9) - LOC10) + IL64(1));
				}
				goto LA5;
				LA7: ;
				{
					result += ((NI) 1);
				}
				LA5: ;
				res_276637 += ((NI) 1);
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(NIM_BOOL, containssets_276075)(Tnode225809* a, Tnode225809* b) {
	NIM_BOOL result;
	Tbitset275012* x;
	Tbitset275012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_276004(a, (&x));
	tobitset_276004(b, (&y));
	result = bitsetcontains_275091(x, y);
	return result;
}

N_NIMCALL(NIM_BOOL, equalsets_276082)(Tnode225809* a, Tnode225809* b) {
	NIM_BOOL result;
	Tbitset275012* x;
	Tbitset275012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_276004(a, (&x));
	tobitset_276004(b, (&y));
	result = bitsetequals_275084(x, y);
	return result;
}

N_NIMCALL(Tnode225809*, intersectsets_276061)(Tnode225809* a, Tnode225809* b) {
	Tnode225809* result;
	Tbitset275012* x;
	Tbitset275012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_276004(a, (&x));
	tobitset_276004(b, (&y));
	bitsetintersect_275053((&x), y);
	result = totreeset_276354(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(Tnode225809*, unionsets_276047)(Tnode225809* a, Tnode225809* b) {
	Tnode225809* result;
	Tbitset275012* x;
	Tbitset275012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_276004(a, (&x));
	tobitset_276004(b, (&y));
	bitsetunion_275029((&x), y);
	result = totreeset_276354(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(Tnode225809*, symdiffsets_276068)(Tnode225809* a, Tnode225809* b) {
	Tnode225809* result;
	Tbitset275012* x;
	Tbitset275012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_276004(a, (&x));
	tobitset_276004(b, (&y));
	bitsetsymdiff_275045((&x), y);
	result = totreeset_276354(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(NIM_BOOL, overlap_276012)(Tnode225809* a, Tnode225809* b) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*a).kind == ((NU8) 44))) goto LA3;
		{
			NIM_BOOL LOC9;
			if (!((*b).kind == ((NU8) 44))) goto LA7;
			LOC9 = 0;
			LOC9 = levalue_233374((*a).kindU.S6.sons->data[((NI) 0)], (*b).kindU.S6.sons->data[((NI) 1)]);
			if (!(LOC9)) goto LA10;
			LOC9 = levalue_233374((*b).kindU.S6.sons->data[((NI) 0)], (*a).kindU.S6.sons->data[((NI) 1)]);
			LA10: ;
			result = LOC9;
		}
		goto LA5;
		LA7: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = levalue_233374((*a).kindU.S6.sons->data[((NI) 0)], b);
			if (!(LOC12)) goto LA13;
			LOC12 = levalue_233374(b, (*a).kindU.S6.sons->data[((NI) 1)]);
			LA13: ;
			result = LOC12;
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC19;
			if (!((*b).kind == ((NU8) 44))) goto LA17;
			LOC19 = 0;
			LOC19 = levalue_233374((*b).kindU.S6.sons->data[((NI) 0)], a);
			if (!(LOC19)) goto LA20;
			LOC19 = levalue_233374(a, (*b).kindU.S6.sons->data[((NI) 1)]);
			LA20: ;
			result = LOC19;
		}
		goto LA15;
		LA17: ;
		{
			result = samevalue_233324(a, b);
		}
		LA15: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tnode225809*, complement_276550)(Tnode225809* a) {
	Tnode225809* result;
	Tbitset275012* x;
	result = 0;
	x = 0;
	tobitset_276004(a, (&x));
	{
		NI i_276568;
		NI HEX3Atmp_276571;
		NI res_276574;
		i_276568 = 0;
		HEX3Atmp_276571 = 0;
		HEX3Atmp_276571 = (x ? (x->Sup.len-1) : -1);
		res_276574 = ((NI) 0);
		{
			while (1) {
				if (!(res_276574 <= HEX3Atmp_276571)) goto LA3;
				i_276568 = res_276574;
				x->data[i_276568] = (NI8)((NU8) ~(x->data[i_276568]));
				res_276574 += ((NI) 1);
			} LA3: ;
		}
	}
	result = totreeset_276354(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(NIM_BOOL, emptyrange_276034)(Tnode225809* a, Tnode225809* b) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = levalue_233374(a, b);
	result = !(LOC1);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, compiler_nimsetsInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, compiler_nimsetsDatInit000)(void) {
}

