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

#include "nimbase.h"
typedef struct Tnode224809 Tnode224809;
typedef struct Ttype224847 Ttype224847;
typedef struct Tlineinfo189352 Tlineinfo189352;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tsym224841 Tsym224841;
typedef struct Tident197021 Tident197021;
typedef struct Tnodeseq224803 Tnodeseq224803;
typedef struct Tbitset274012 Tbitset274012;
typedef struct Tidobj197015 Tidobj197015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Ttypeseq224843 Ttypeseq224843;
typedef struct Tloc224823 Tloc224823;
typedef struct Ropeobj175009 Ropeobj175009;
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 Memregion30890 Memregion30890;
typedef struct Smallchunk30842 Smallchunk30842;
typedef struct Llchunk30884 Llchunk30884;
typedef struct Bigchunk30844 Bigchunk30844;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30888 Avlnode30888;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Tscope224835 Tscope224835;
typedef struct TY224944 TY224944;
typedef struct Tstrtable224813 Tstrtable224813;
typedef struct Tsymseq224811 Tsymseq224811;
typedef struct Tlib224827 Tlib224827;
typedef struct Basechunk30840 Basechunk30840;
typedef struct Freecell30832 Freecell30832;
typedef struct Tinstantiation224831 Tinstantiation224831;
typedef struct Tlistentry140022 Tlistentry140022;
typedef struct TY224932 TY224932;
struct  Tlineinfo189352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tnode224809  {
Ttype224847* typ;
Tlineinfo189352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym224841* sym;
} S4;
struct {Tident197021* ident;
} S5;
struct {Tnodeseq224803* 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  Tidobj197015  {
  TNimObject Sup;
NI id;
};
struct  Tloc224823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype224847* t;
Ropeobj175009* r;
Ropeobj175009* heaproot;
};
struct  Ttype224847  {
  Tidobj197015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq224843* sons;
Tnode224809* n;
Tsym224841* owner;
Tsym224841* sym;
Tsym224841* destructor;
Tsym224841* deepcopy;
Tsym224841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc224823 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 Smallchunk30842* TY30905[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30890  {
NI minlargeobj;
NI maxlargeobj;
TY30905 freesmallchunks;
Llchunk30884* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30844* freechunkslist;
Intset30817 chunkstarts;
Avlnode30888* root;
Avlnode30888* deleted;
Avlnode30888* last;
Avlnode30888* 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;
Memregion30890 region;
Gcstat51014 stat;
};
struct  Tstrtable224813  {
NI counter;
Tsymseq224811* data;
};
struct  Tsym224841  {
  Tidobj197015 Sup;
NU8 kind;
union{
struct {Ttypeseq224843* typeinstcache;
Tscope224835* typscope;
} S1;
struct {TY224944* procinstcache;
Tsym224841* gcunsafetyreason;
} S2;
struct {TY224944* usedgenerics;
Tstrtable224813 tab;
} S3;
struct {Tsym224841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype224847* typ;
Tident197021* name;
Tlineinfo189352 info;
Tsym224841* owner;
NU32 flags;
Tnode224809* ast;
NU32 options;
NI position;
NI offset;
Tloc224823 loc;
Tlib224827* annex;
Tnode224809* constraint;
};
struct  Tident197021  {
  Tidobj197015 Sup;
NimStringDesc* s;
Tident197021* next;
NI h;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Ropeobj175009  {
  TNimObject Sup;
Ropeobj175009* left;
Ropeobj175009* right;
NI length;
NimStringDesc* data;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30821[16];
struct  Pagedesc48955  {
Pagedesc48955* next;
NI key;
TY30821 bits;
};
struct  Basechunk30840  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30842  {
  Basechunk30840 Sup;
Smallchunk30842* next;
Smallchunk30842* prev;
Freecell30832* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30884  {
NI size;
NI acc;
Llchunk30884* next;
};
struct  Bigchunk30844  {
  Basechunk30840 Sup;
Bigchunk30844* next;
Bigchunk30844* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30821 bits;
};
typedef Avlnode30888* TY30895[2];
struct  Avlnode30888  {
TY30895 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope224835  {
NI depthlevel;
Tstrtable224813 symbols;
Tnodeseq224803* usingsyms;
Tscope224835* parent;
};
struct  Tlistentry140022  {
  TNimObject Sup;
Tlistentry140022* prev;
Tlistentry140022* next;
};
struct  Tlib224827  {
  Tlistentry140022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj175009* name;
Tnode224809* path;
};
struct  Freecell30832  {
Freecell30832* next;
NI zerofield;
};
struct  Tinstantiation224831  {
Tsym224841* sym;
Ttypeseq224843* concretetypes;
TY224932* usedby;
NI compilesid;
};
struct Tbitset274012 {
  TGenericSeq Sup;
  NI8 data[SEQ_DECL_SIZE];
};
struct Tnodeseq224803 {
  TGenericSeq Sup;
  Tnode224809* data[SEQ_DECL_SIZE];
};
struct Ttypeseq224843 {
  TGenericSeq Sup;
  Ttype224847* data[SEQ_DECL_SIZE];
};
struct TY224944 {
  TGenericSeq Sup;
  Tinstantiation224831* data[SEQ_DECL_SIZE];
};
struct Tsymseq224811 {
  TGenericSeq Sup;
  Tsym224841* data[SEQ_DECL_SIZE];
};
struct TY224932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, internalerror_195172)(Tlineinfo189352 info, NimStringDesc* errmsg);
N_NIMCALL(NI, sonslen_227387)(Tnode224809* n);
N_NIMCALL(NIM_BOOL, levalue_232374)(Tnode224809* a, Tnode224809* b);
N_NIMCALL(NIM_BOOL, samevalue_232324)(Tnode224809* a, Tnode224809* b);
N_NIMCALL(void, tobitset_275004)(Tnode224809* s, Tbitset274012** b);
N_NIMCALL(NI64, firstord_254004)(Ttype224847* t);
N_NIMCALL(void, bitsetinit_274021)(Tbitset274012** b, NI length);
N_NIMCALL(NI64, getsize_254190)(Ttype224847* typ);
N_NIMCALL(NI64, getordvalue_254178)(Tnode224809* n);
N_NIMCALL(void, bitsetincl_274061)(Tbitset274012** x, NI64 elem);
N_NIMCALL(void, bitsetdiff_274037)(Tbitset274012** x, Tbitset274012* y);
N_NIMCALL(Tnode224809*, totreeset_275353)(Tbitset274012* s, Ttype224847* settype, Tlineinfo189352 info);
N_NIMCALL(Tnode224809*, newnodei_226351)(NU8 kind, Tlineinfo189352 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_274077)(Tbitset274012* x, NI64 e);
N_NIMCALL(void, addson_226819)(Tnode224809* father, Tnode224809* son);
N_NIMCALL(Tnode224809*, newinttypenode_225620)(NU8 kind, NI64 intval, Ttype224847* typ);
N_NIMCALL(NIM_BOOL, bitsetcontains_274091)(Tbitset274012* x, Tbitset274012* y);
N_NIMCALL(NIM_BOOL, bitsetequals_274084)(Tbitset274012* x, Tbitset274012* y);
N_NIMCALL(void, bitsetintersect_274053)(Tbitset274012** x, Tbitset274012* y);
N_NIMCALL(void, bitsetunion_274029)(Tbitset274012** x, Tbitset274012* y);
N_NIMCALL(void, bitsetsymdiff_274045)(Tbitset274012** x, Tbitset274012* y);
STRING_LITERAL(TMP2923, "inSet", 5);
extern Gcheap51018 gch_51059;

N_NIMCALL(NIM_BOOL, inset_275019)(Tnode224809* s, Tnode224809* elem) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!!(((*s).kind == ((NU8) 39)))) goto LA3;
		internalerror_195172((*s).info, ((NimStringDesc*) &TMP2923));
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NI i_275121;
		NI HEX3Atmp_275138;
		NI LOC6;
		NI res_275141;
		i_275121 = 0;
		HEX3Atmp_275138 = 0;
		LOC6 = 0;
		LOC6 = sonslen_227387(s);
		HEX3Atmp_275138 = (NI)(LOC6 - ((NI) 1));
		res_275141 = ((NI) 0);
		{
			while (1) {
				if (!(res_275141 <= HEX3Atmp_275138)) goto LA8;
				i_275121 = res_275141;
				{
					if (!((*(*s).kindU.S6.sons->data[i_275121]).kind == ((NU8) 44))) goto LA11;
					{
						NIM_BOOL LOC15;
						LOC15 = 0;
						LOC15 = levalue_232374((*(*s).kindU.S6.sons->data[i_275121]).kindU.S6.sons->data[((NI) 0)], elem);
						if (!(LOC15)) goto LA16;
						LOC15 = levalue_232374(elem, (*(*s).kindU.S6.sons->data[i_275121]).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_232324((*s).kindU.S6.sons->data[i_275121], elem);
						if (!LOC22) goto LA23;
						result = NIM_TRUE;
						goto BeforeRet;
					}
					LA23: ;
				}
				LA9: ;
				res_275141 += ((NI) 1);
			} LA8: ;
		}
	}
	result = NIM_FALSE;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, tobitset_275004)(Tnode224809* s, Tbitset274012** b) {
	NI64 first;
	NI64 j;
	NI64 LOC1;
	first = 0;
	j = 0;
	first = firstord_254004((*(*s).typ).sons->data[((NI) 0)]);
	LOC1 = 0;
	LOC1 = getsize_254190((*s).typ);
	bitsetinit_274021(b, ((NI) (LOC1)));
	{
		NI i_275296;
		NI HEX3Atmp_275325;
		NI LOC3;
		NI res_275328;
		i_275296 = 0;
		HEX3Atmp_275325 = 0;
		LOC3 = 0;
		LOC3 = sonslen_227387(s);
		HEX3Atmp_275325 = (NI)(LOC3 - ((NI) 1));
		res_275328 = ((NI) 0);
		{
			while (1) {
				if (!(res_275328 <= HEX3Atmp_275325)) goto LA5;
				i_275296 = res_275328;
				{
					if (!((*(*s).kindU.S6.sons->data[i_275296]).kind == ((NU8) 44))) goto LA8;
					j = getordvalue_254178((*(*s).kindU.S6.sons->data[i_275296]).kindU.S6.sons->data[((NI) 0)]);
					{
						while (1) {
							NI64 LOC12;
							LOC12 = 0;
							LOC12 = getordvalue_254178((*(*s).kindU.S6.sons->data[i_275296]).kindU.S6.sons->data[((NI) 1)]);
							if (!(j <= LOC12)) goto LA11;
							bitsetincl_274061(b, (NI64)(j - first));
							j += ((NI) 1);
						} LA11: ;
					}
				}
				goto LA6;
				LA8: ;
				{
					NI64 LOC14;
					LOC14 = 0;
					LOC14 = getordvalue_254178((*s).kindU.S6.sons->data[i_275296]);
					bitsetincl_274061(b, (NI64)(LOC14 - first));
				}
				LA6: ;
				res_275328 += ((NI) 1);
			} LA5: ;
		}
	}
}

static N_INLINE(Cell48947*, usrtocell_52646)(void* usr) {
	Cell48947* result;
	result = 0;
	result = ((Cell48947*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((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 (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_54204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(Tnode224809*, totreeset_275353)(Tbitset274012* s, Ttype224847* settype, Tlineinfo189352 info) {
	Tnode224809* result;
	NI64 a;
	NI64 b;
	NI64 e;
	NI64 first;
	Ttype224847* elemtype;
	Tnode224809* n;
	result = 0;
	a = 0;
	b = 0;
	e = 0;
	first = 0;
	elemtype = 0;
	n = 0;
	elemtype = (*settype).sons->data[((NI) 0)];
	first = firstord_254004(elemtype);
	result = newnodei_226351(((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_274077(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_274077(s, b);
							LOC12 = !(LOC14);
							LA13: ;
							if (!LOC12) goto LA15;
							goto LA8;
						}
						LA15: ;
					}
				} LA8: ;
				b -= ((NI) 1);
				{
					Tnode224809* LOC21;
					if (!(a == b)) goto LA19;
					LOC21 = 0;
					LOC21 = newinttypenode_225620(((NU8) 6), (NI64)(a + first), elemtype);
					addson_226819(result, LOC21);
				}
				goto LA17;
				LA19: ;
				{
					Tnode224809* LOC23;
					Tnode224809* LOC24;
					n = newnodei_226351(((NU8) 44), info);
					asgnRefNoCycle((void**) (&(*n).typ), elemtype);
					LOC23 = 0;
					LOC23 = newinttypenode_225620(((NU8) 6), (NI64)(a + first), elemtype);
					addson_226819(n, LOC23);
					LOC24 = 0;
					LOC24 = newinttypenode_225620(((NU8) 6), (NI64)(b + first), elemtype);
					addson_226819(n, LOC24);
					addson_226819(result, n);
				}
				LA17: ;
				e = b;
			}
			LA6: ;
			e += ((NI) 1);
		} LA2: ;
	}
	return result;
}

N_NIMCALL(Tnode224809*, diffsets_275054)(Tnode224809* a, Tnode224809* b) {
	Tnode224809* result;
	Tbitset274012* x;
	Tbitset274012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_275004(a, (&x));
	tobitset_275004(b, (&y));
	bitsetdiff_274037((&x), y);
	result = totreeset_275353(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(NI64, cardset_275089)(Tnode224809* s) {
	NI64 result;
	result = 0;
	result = IL64(0);
	{
		NI i_275608;
		NI HEX3Atmp_275633;
		NI LOC2;
		NI res_275636;
		i_275608 = 0;
		HEX3Atmp_275633 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227387(s);
		HEX3Atmp_275633 = (NI)(LOC2 - ((NI) 1));
		res_275636 = ((NI) 0);
		{
			while (1) {
				if (!(res_275636 <= HEX3Atmp_275633)) goto LA4;
				i_275608 = res_275636;
				{
					NI64 LOC9;
					NI64 LOC10;
					if (!((*(*s).kindU.S6.sons->data[i_275608]).kind == ((NU8) 44))) goto LA7;
					LOC9 = 0;
					LOC9 = getordvalue_254178((*(*s).kindU.S6.sons->data[i_275608]).kindU.S6.sons->data[((NI) 1)]);
					LOC10 = 0;
					LOC10 = getordvalue_254178((*(*s).kindU.S6.sons->data[i_275608]).kindU.S6.sons->data[((NI) 0)]);
					result = (NI64)((NI64)((NI64)(result + LOC9) - LOC10) + IL64(1));
				}
				goto LA5;
				LA7: ;
				{
					result += ((NI) 1);
				}
				LA5: ;
				res_275636 += ((NI) 1);
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(NIM_BOOL, containssets_275075)(Tnode224809* a, Tnode224809* b) {
	NIM_BOOL result;
	Tbitset274012* x;
	Tbitset274012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_275004(a, (&x));
	tobitset_275004(b, (&y));
	result = bitsetcontains_274091(x, y);
	return result;
}

N_NIMCALL(NIM_BOOL, equalsets_275082)(Tnode224809* a, Tnode224809* b) {
	NIM_BOOL result;
	Tbitset274012* x;
	Tbitset274012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_275004(a, (&x));
	tobitset_275004(b, (&y));
	result = bitsetequals_274084(x, y);
	return result;
}

N_NIMCALL(Tnode224809*, intersectsets_275061)(Tnode224809* a, Tnode224809* b) {
	Tnode224809* result;
	Tbitset274012* x;
	Tbitset274012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_275004(a, (&x));
	tobitset_275004(b, (&y));
	bitsetintersect_274053((&x), y);
	result = totreeset_275353(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(Tnode224809*, unionsets_275047)(Tnode224809* a, Tnode224809* b) {
	Tnode224809* result;
	Tbitset274012* x;
	Tbitset274012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_275004(a, (&x));
	tobitset_275004(b, (&y));
	bitsetunion_274029((&x), y);
	result = totreeset_275353(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(Tnode224809*, symdiffsets_275068)(Tnode224809* a, Tnode224809* b) {
	Tnode224809* result;
	Tbitset274012* x;
	Tbitset274012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_275004(a, (&x));
	tobitset_275004(b, (&y));
	bitsetsymdiff_274045((&x), y);
	result = totreeset_275353(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(NIM_BOOL, overlap_275012)(Tnode224809* a, Tnode224809* 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_232374((*a).kindU.S6.sons->data[((NI) 0)], (*b).kindU.S6.sons->data[((NI) 1)]);
			if (!(LOC9)) goto LA10;
			LOC9 = levalue_232374((*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_232374((*a).kindU.S6.sons->data[((NI) 0)], b);
			if (!(LOC12)) goto LA13;
			LOC12 = levalue_232374(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_232374((*b).kindU.S6.sons->data[((NI) 0)], a);
			if (!(LOC19)) goto LA20;
			LOC19 = levalue_232374(a, (*b).kindU.S6.sons->data[((NI) 1)]);
			LA20: ;
			result = LOC19;
		}
		goto LA15;
		LA17: ;
		{
			result = samevalue_232324(a, b);
		}
		LA15: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tnode224809*, complement_275549)(Tnode224809* a) {
	Tnode224809* result;
	Tbitset274012* x;
	result = 0;
	x = 0;
	tobitset_275004(a, (&x));
	{
		NI i_275567;
		NI HEX3Atmp_275570;
		NI res_275573;
		i_275567 = 0;
		HEX3Atmp_275570 = 0;
		HEX3Atmp_275570 = (x ? (x->Sup.len-1) : -1);
		res_275573 = ((NI) 0);
		{
			while (1) {
				if (!(res_275573 <= HEX3Atmp_275570)) goto LA3;
				i_275567 = res_275573;
				x->data[i_275567] = (NI8)((NU8) ~(x->data[i_275567]));
				res_275573 += ((NI) 1);
			} LA3: ;
		}
	}
	result = totreeset_275353(x, (*a).typ, (*a).info);
	return result;
}

N_NIMCALL(NIM_BOOL, emptyrange_275034)(Tnode224809* a, Tnode224809* b) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = levalue_232374(a, b);
	result = !(LOC1);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, compiler_nimsetsInit000)(void) {
}

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

