/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/nimsets.o compiler/nimcache/nimsets.c */
#define NIM_INTBITS 32
#include "nimbase.h"
typedef struct tnode188803 tnode188803;
typedef struct ttype188837 ttype188837;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tsym188833 tsym188833;
typedef struct tident167019 tident167019;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct tbitset243012 tbitset243012;
typedef struct tidobj167013 tidobj167013;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tcell41090 tcell41090;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tlib188821 tlib188821;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
typedef struct TY188922 TY188922;
typedef struct tlistentry118017 tlistentry118017;
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tnode188803  {
ttype188837* Typ;
tlineinfo163527 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym188833* Sym;
} S4;
struct {tident167019* Ident;
} S5;
struct {tnodeseq188797* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct tbitset243012 {
  TGenericSeq Sup;
  NI8 data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, internalerror_165591)(tlineinfo163527 info, NimStringDesc* errmsg);
static N_INLINE(NI, sonslen_189181)(tnode188803* n);
N_NIMCALL(NIM_BOOL, levalue_197404)(tnode188803* a, tnode188803* b);
N_NIMCALL(NIM_BOOL, samevalue_197271)(tnode188803* a, tnode188803* b);
N_NIMCALL(void, tobitset_244002)(tnode188803* s, tbitset243012** b);
N_NIMCALL(NI64, firstord_223002)(ttype188837* t);
N_NIMCALL(void, bitsetinit_243017)(tbitset243012** b, NI length);
N_NIMCALL(NI64, getsize_223158)(ttype188837* typ);
N_NIMCALL(NI64, getordvalue_223150)(tnode188803* n);
N_NIMCALL(void, bitsetincl_243047)(tbitset243012** x, NI64 elem);
N_NIMCALL(void, bitsetdiff_243029)(tbitset243012** x, tbitset243012* y);
N_NIMCALL(tnode188803*, totreeset_244678)(tbitset243012* s, ttype188837* settype, tlineinfo163527 info);
N_NIMCALL(tnode188803*, newnodei_189099)(NU8 kind, tlineinfo163527 info);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
N_NIMCALL(NIM_BOOL, bitsetin_243059)(tbitset243012* x, NI64 e);
N_NIMCALL(void, addson_189207)(tnode188803* father, tnode188803* son);
N_NIMCALL(tnode188803*, newinttypenode_189074)(NU8 kind, NI64 intval, ttype188837* typ);
N_NIMCALL(NIM_BOOL, bitsetcontains_243069)(tbitset243012* x, tbitset243012* y);
N_NIMCALL(NIM_BOOL, bitsetequals_243064)(tbitset243012* x, tbitset243012* y);
N_NIMCALL(void, bitsetintersect_243041)(tbitset243012** x, tbitset243012* y);
N_NIMCALL(void, bitsetunion_243023)(tbitset243012** x, tbitset243012* y);
N_NIMCALL(void, bitsetsymdiff_243035)(tbitset243012** x, tbitset243012* y);
STRING_LITERAL(TMP2611, "inSet", 5);
extern tgcheap43016 gch_43044;

static N_INLINE(NI, sonslen_189181)(tnode188803* n) {
	NI result;
	result = 0;
	{
		if (!(*n).kindU.S6.Sons == 0) goto LA3;
		result = 0;
	}
	goto LA1;
	LA3: ;
	{
		result = (*n).kindU.S6.Sons->Sup.len;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, inset_244013)(tnode188803* s, tnode188803* elem) {
	NIM_BOOL result;
	NI i_244094;
	NI HEX3Atmp_244188;
	NI LOC5;
	NI res_244190;
	result = 0;
	{
		if (!!(((*s).Kind == ((NU8) 39)))) goto LA3;
		internalerror_165591((*s).Info, ((NimStringDesc*) &TMP2611));
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	i_244094 = 0;
	HEX3Atmp_244188 = 0;
	LOC5 = 0;
	LOC5 = sonslen_189181(s);
	HEX3Atmp_244188 = (NI32)(LOC5 - 1);
	res_244190 = 0;
	while (1) {
		if (!(res_244190 <= HEX3Atmp_244188)) goto LA6;
		i_244094 = res_244190;
		{
			if (!((*(*s).kindU.S6.Sons->data[i_244094]).Kind == ((NU8) 44))) goto LA9;
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = levalue_197404((*(*s).kindU.S6.Sons->data[i_244094]).kindU.S6.Sons->data[0], elem);
				if (!(LOC13)) goto LA14;
				LOC13 = levalue_197404(elem, (*(*s).kindU.S6.Sons->data[i_244094]).kindU.S6.Sons->data[1]);
				LA14: ;
				if (!LOC13) goto LA15;
				result = NIM_TRUE;
				goto BeforeRet;
			}
			LA15: ;
		}
		goto LA7;
		LA9: ;
		{
			{
				NIM_BOOL LOC20;
				LOC20 = 0;
				LOC20 = samevalue_197271((*s).kindU.S6.Sons->data[i_244094], elem);
				if (!LOC20) goto LA21;
				result = NIM_TRUE;
				goto BeforeRet;
			}
			LA21: ;
		}
		LA7: ;
		res_244190 += 1;
	} LA6: ;
	result = NIM_FALSE;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, tobitset_244002)(tnode188803* s, tbitset243012** b) {
	NI64 first;
	NI64 j;
	NI64 LOC1;
	NI i_244558;
	NI HEX3Atmp_244670;
	NI LOC2;
	NI res_244672;
	first = 0;
	j = 0;
	first = firstord_223002((*(*s).Typ).Sons->data[0]);
	LOC1 = 0;
	LOC1 = getsize_223158((*s).Typ);
	bitsetinit_243017(b, ((NI) (LOC1)));
	i_244558 = 0;
	HEX3Atmp_244670 = 0;
	LOC2 = 0;
	LOC2 = sonslen_189181(s);
	HEX3Atmp_244670 = (NI32)(LOC2 - 1);
	res_244672 = 0;
	while (1) {
		if (!(res_244672 <= HEX3Atmp_244670)) goto LA3;
		i_244558 = res_244672;
		{
			if (!((*(*s).kindU.S6.Sons->data[i_244558]).Kind == ((NU8) 44))) goto LA6;
			j = getordvalue_223150((*(*s).kindU.S6.Sons->data[i_244558]).kindU.S6.Sons->data[0]);
			while (1) {
				NI64 LOC9;
				LOC9 = 0;
				LOC9 = getordvalue_223150((*(*s).kindU.S6.Sons->data[i_244558]).kindU.S6.Sons->data[1]);
				if (!(j <= LOC9)) goto LA8;
				bitsetincl_243047(b, (NI64)(j - first));
				j += 1;
			} LA8: ;
		}
		goto LA4;
		LA6: ;
		{
			NI64 LOC11;
			LOC11 = 0;
			LOC11 = getordvalue_223150((*s).kindU.S6.Sons->data[i_244558]);
			bitsetincl_243047(b, (NI64)(LOC11 - first));
		}
		LA4: ;
		res_244672 += 1;
	} LA3: ;
}

static N_INLINE(tcell41090*, usrtocell_44443)(void* usr) {
	tcell41090* result;
	result = 0;
	result = ((tcell41090*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(tcell41090))))));
	return result;
}

static N_INLINE(void, rtladdzct_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell41090* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_44443(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell41090* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_44443((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			rtladdzct_46002(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(tnode188803*, totreeset_244678)(tbitset243012* s, ttype188837* settype, tlineinfo163527 info) {
	tnode188803* result;
	NI64 a;
	NI64 b;
	NI64 e;
	NI64 first;
	ttype188837* elemtype;
	tnode188803* n;
	result = 0;
	a = 0;
	b = 0;
	e = 0;
	first = 0;
	elemtype = 0;
	n = 0;
	elemtype = (*settype).Sons->data[0];
	first = firstord_223002(elemtype);
	result = newnodei_189099(((NU8) 39), info);
	asgnRefNoCycle((void**) &(*result).Typ, settype);
	(*result).Info = info;
	e = 0;
	while (1) {
		if (!(e < ((NI64) ((NI32)(s->Sup.len * 8))))) goto LA1;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = bitsetin_243059(s, e);
			if (!LOC4) goto LA5;
			a = e;
			b = e;
			while (1) {
				b += 1;
				{
					NIM_BOOL LOC10;
					NIM_BOOL LOC12;
					LOC10 = 0;
					LOC10 = (((NI64) ((NI32)(s->Sup.len * 8))) <= b);
					if (LOC10) goto LA11;
					LOC12 = 0;
					LOC12 = bitsetin_243059(s, b);
					LOC10 = !(LOC12);
					LA11: ;
					if (!LOC10) goto LA13;
					goto LA7;
				}
				LA13: ;
			} LA7: ;
			b -= 1;
			{
				tnode188803* LOC19;
				if (!(a == b)) goto LA17;
				LOC19 = 0;
				LOC19 = newinttypenode_189074(((NU8) 6), (NI64)(a + first), elemtype);
				addson_189207(result, LOC19);
			}
			goto LA15;
			LA17: ;
			{
				tnode188803* LOC21;
				tnode188803* LOC22;
				n = newnodei_189099(((NU8) 44), info);
				asgnRefNoCycle((void**) &(*n).Typ, elemtype);
				LOC21 = 0;
				LOC21 = newinttypenode_189074(((NU8) 6), (NI64)(a + first), elemtype);
				addson_189207(n, LOC21);
				LOC22 = 0;
				LOC22 = newinttypenode_189074(((NU8) 6), (NI64)(b + first), elemtype);
				addson_189207(n, LOC22);
				addson_189207(result, n);
			}
			LA15: ;
			e = b;
		}
		LA5: ;
		e += 1;
	} LA1: ;
	return result;
}

N_NIMCALL(tnode188803*, diffsets_244038)(tnode188803* a, tnode188803* b) {
	tnode188803* result;
	tbitset243012* x;
	tbitset243012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_244002(a, &x);
	tobitset_244002(b, &y);
	bitsetdiff_243029(&x, y);
	result = totreeset_244678(x, (*a).Typ, (*a).Info);
	return result;
}

N_NIMCALL(NI64, cardset_244063)(tnode188803* s) {
	NI64 result;
	NI i_244903;
	NI HEX3Atmp_244999;
	NI LOC1;
	NI res_245001;
	result = 0;
	result = 0;
	i_244903 = 0;
	HEX3Atmp_244999 = 0;
	LOC1 = 0;
	LOC1 = sonslen_189181(s);
	HEX3Atmp_244999 = (NI32)(LOC1 - 1);
	res_245001 = 0;
	while (1) {
		if (!(res_245001 <= HEX3Atmp_244999)) goto LA2;
		i_244903 = res_245001;
		{
			NI64 LOC7;
			NI64 LOC8;
			if (!((*(*s).kindU.S6.Sons->data[i_244903]).Kind == ((NU8) 44))) goto LA5;
			LOC7 = 0;
			LOC7 = getordvalue_223150((*(*s).kindU.S6.Sons->data[i_244903]).kindU.S6.Sons->data[1]);
			LOC8 = 0;
			LOC8 = getordvalue_223150((*(*s).kindU.S6.Sons->data[i_244903]).kindU.S6.Sons->data[0]);
			result = (NI64)((NI64)((NI64)(result + LOC7) - LOC8) + 1);
		}
		goto LA3;
		LA5: ;
		{
			result += 1;
		}
		LA3: ;
		res_245001 += 1;
	} LA2: ;
	return result;
}

N_NIMCALL(NIM_BOOL, containssets_244053)(tnode188803* a, tnode188803* b) {
	NIM_BOOL result;
	tbitset243012* x;
	tbitset243012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_244002(a, &x);
	tobitset_244002(b, &y);
	result = bitsetcontains_243069(x, y);
	return result;
}

N_NIMCALL(NIM_BOOL, equalsets_244058)(tnode188803* a, tnode188803* b) {
	NIM_BOOL result;
	tbitset243012* x;
	tbitset243012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_244002(a, &x);
	tobitset_244002(b, &y);
	result = bitsetequals_243064(x, y);
	return result;
}

N_NIMCALL(tnode188803*, intersectsets_244043)(tnode188803* a, tnode188803* b) {
	tnode188803* result;
	tbitset243012* x;
	tbitset243012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_244002(a, &x);
	tobitset_244002(b, &y);
	bitsetintersect_243041(&x, y);
	result = totreeset_244678(x, (*a).Typ, (*a).Info);
	return result;
}

N_NIMCALL(tnode188803*, unionsets_244033)(tnode188803* a, tnode188803* b) {
	tnode188803* result;
	tbitset243012* x;
	tbitset243012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_244002(a, &x);
	tobitset_244002(b, &y);
	bitsetunion_243023(&x, y);
	result = totreeset_244678(x, (*a).Typ, (*a).Info);
	return result;
}

N_NIMCALL(tnode188803*, symdiffsets_244048)(tnode188803* a, tnode188803* b) {
	tnode188803* result;
	tbitset243012* x;
	tbitset243012* y;
	result = 0;
	x = 0;
	y = 0;
	tobitset_244002(a, &x);
	tobitset_244002(b, &y);
	bitsetsymdiff_243035(&x, y);
	result = totreeset_244678(x, (*a).Typ, (*a).Info);
	return result;
}

N_NIMCALL(NIM_BOOL, overlap_244008)(tnode188803* a, tnode188803* 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_197404((*a).kindU.S6.Sons->data[0], (*b).kindU.S6.Sons->data[1]);
			if (!(LOC9)) goto LA10;
			LOC9 = levalue_197404((*b).kindU.S6.Sons->data[0], (*a).kindU.S6.Sons->data[1]);
			LA10: ;
			result = LOC9;
		}
		goto LA5;
		LA7: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = levalue_197404((*a).kindU.S6.Sons->data[0], b);
			if (!(LOC12)) goto LA13;
			LOC12 = levalue_197404(b, (*a).kindU.S6.Sons->data[1]);
			LA13: ;
			result = LOC12;
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC19;
			if (!((*b).Kind == ((NU8) 44))) goto LA17;
			LOC19 = 0;
			LOC19 = levalue_197404((*b).kindU.S6.Sons->data[0], a);
			if (!(LOC19)) goto LA20;
			LOC19 = levalue_197404(a, (*b).kindU.S6.Sons->data[1]);
			LA20: ;
			result = LOC19;
		}
		goto LA15;
		LA17: ;
		{
			result = samevalue_197271(a, b);
		}
		LA15: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode188803*, complement_244860)(tnode188803* a) {
	tnode188803* result;
	tbitset243012* x;
	NI i_244878;
	NI HEX3Atmp_244880;
	NI res_244882;
	result = 0;
	x = 0;
	tobitset_244002(a, &x);
	i_244878 = 0;
	HEX3Atmp_244880 = 0;
	HEX3Atmp_244880 = (x->Sup.len-1);
	res_244882 = 0;
	while (1) {
		if (!(res_244882 <= HEX3Atmp_244880)) goto LA1;
		i_244878 = res_244882;
		x->data[i_244878] = (NI8)((NU8) ~(x->data[i_244878]));
		res_244882 += 1;
	} LA1: ;
	result = totreeset_244678(x, (*a).Typ, (*a).Info);
	return result;
}

N_NIMCALL(NIM_BOOL, emptyrange_244024)(tnode188803* a, tnode188803* b) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = levalue_197404(a, b);
	result = !(LOC1);
	return result;
}
N_NOINLINE(void, nimsetsInit)(void) {
}

N_NOINLINE(void, nimsetsDatInit)(void) {
}

