/* 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/guards.o compiler/nimcache/guards.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>
typedef struct tsym188833 tsym188833;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tident167019 tident167019;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct tidobj167013 tidobj167013;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct ttype188837 ttype188837;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tnode188803 tnode188803;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tlib188821 tlib188821;
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 tnodeseq188797 tnodeseq188797;
typedef struct TY227866 TY227866;
typedef struct TY79484 TY79484;
typedef struct TY188922 TY188922;
typedef struct tlistentry118017 tlistentry118017;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
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  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
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  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  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;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct TY227866 {
NI Field0;
NI Field1;
};
struct TY79484 {
NimStringDesc* Field0;
NI Field1;
};
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  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
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  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
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 tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(tsym188833*, getmagicop_312355)(NimStringDesc* name, NU16 m);
N_NIMCALL(tsym188833*, newsym_189053)(NU8 symkind, tident167019* name, tsym188833* owner, tlineinfo163527 info);
N_NIMCALL(tident167019*, getident_167456)(NimStringDesc* identifier);
N_NIMCALL(tlineinfo163527, unknownlineinfo_164203)(void);
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(NU8, doesimply_315881)(tnodeseq188797* facts, tnode188803* prop);
N_NIMCALL(NU8, factimplies_315657)(tnode188803* fact, tnode188803* prop);
N_NIMCALL(NU16, getmagic_221775)(tnode188803* op);
N_NIMCALL(NU8, HEX7E_315651)(NU8 x);
N_NIMCALL(void, internalerror_165591)(tlineinfo163527 info, NimStringDesc* errmsg);
N_NIMCALL(NU8, impliesisnil_314879)(tnode188803* fact, tnode188803* eq);
N_NIMCALL(NIM_BOOL, sametree_313509)(tnode188803* a, tnode188803* b);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NI, sonslen_189181)(tnode188803* n);
N_NIMCALL(NU8, valueisnil_314850)(tnode188803* n);
N_NIMCALL(tnode188803*, skipconv_197231)(tnode188803* n);
N_NIMCALL(NU8, implieseq_313943)(tnode188803* fact, tnode188803* eq);
N_NIMCALL(NIM_BOOL, islocation_312042)(tnode188803* n);
N_NIMCALL(NIM_BOOL, isvalue_312022)(tnode188803* n);
N_NIMCALL(NIM_BOOL, valuesunequal_313870)(tnode188803* a, tnode188803* b);
N_NIMCALL(NIM_BOOL, samevalue_197271)(tnode188803* a, tnode188803* b);
N_NIMCALL(NIM_BOOL, inset_244013)(tnode188803* s, tnode188803* elem);
N_NIMCALL(NU8, impliesle_315321)(tnode188803* fact, tnode188803* x, tnode188803* c);
N_NIMCALL(NU8, impliesge_315026)(tnode188803* fact, tnode188803* x, tnode188803* c);
N_NIMCALL(void, internalerror_165606)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_165714)(TY79484 x_165718);
N_NIMCALL(NIM_BOOL, levalue_197404)(tnode188803* a, tnode188803* b);
N_NIMCALL(tnode188803*, pred_313877)(tnode188803* n);
N_NIMCALL(tnode188803*, copynode_189233)(tnode188803* src);
N_NIMCALL(NU8, implieslt_315609)(tnode188803* fact, tnode188803* x, tnode188803* c);
N_NIMCALL(NU8, impliesin_314562)(tnode188803* fact, tnode188803* loc, tnode188803* aset);
N_NIMCALL(NU8, comparesets_314555)(tnode188803* a, tnode188803* b);
N_NIMCALL(NIM_BOOL, equalsets_244058)(tnode188803* a, tnode188803* b);
static N_INLINE(NI, len_189264)(tnode188803* n);
N_NIMCALL(tnode188803*, intersectsets_244043)(tnode188803* a, tnode188803* b);
N_NIMCALL(NU8, leimpliesin_314234)(tnode188803* x, tnode188803* c, tnode188803* aset);
N_NIMCALL(tnode188803*, newintnode_189069)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, firstord_223002)(ttype188837* t);
N_NIMCALL(NU8, geimpliesin_314401)(tnode188803* x, tnode188803* c, tnode188803* aset);
N_NIMCALL(NI64, lastord_223006)(ttype188837* t);
N_NIMCALL(tnode188803*, neg_312448)(tnode188803* n);
N_NIMCALL(tnode188803*, swapargs_312371)(tnode188803* fact, tsym188833* newop);
N_NIMCALL(tnode188803*, newnodei_190803)(NU8 kind, tlineinfo163527 info, NI children);
N_NIMCALL(tnode188803*, newsymnode_189095)(tsym188833* sym);
N_NIMCALL(ttype188837*, skiptypes_192793)(ttype188837* t, NU64 kinds);
N_NIMCALL(tnode188803*, newnodeit_189104)(NU8 kind, tlineinfo163527 info, ttype188837* typ);
N_NIMCALL(void, add_189390)(tnode188803* father, tnode188803* son);
N_NIMCALL(NI64, lengthord_223010)(ttype188837* t);
N_NIMCALL(tnode188803*, complement_244860)(tnode188803* a);
N_NIMCALL(tnode188803*, buildisnil_312854)(tnode188803* arg);
N_NIMCALL(tnode188803*, buildproperfieldcheck_316741)(tnode188803* access, tnode188803* check);
N_NIMCALL(tnode188803*, copytree_189237)(tnode188803* src);
N_NIMCALL(void, message_165584)(tlineinfo163527 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, rendertree_211051)(tnode188803* n, NU8 renderflags);
N_NIMCALL(NIM_BOOL, hassubtree_313793)(tnode188803* n, tnode188803* x);
static N_INLINE(NI, safelen_189320)(tnode188803* n);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NIM_BOOL, isletlocation_312231)(tnode188803* m, NIM_BOOL isapprox);
N_NIMCALL(NIM_BOOL, isconstexpr_221843)(tnode188803* n);
N_NIMCALL(NIM_BOOL, islet_312048)(tnode188803* n);
N_NIMCALL(NIM_BOOL, isvar_312137)(tnode188803* n);
N_NIMCALL(tnode188803*, buildof_316054)(tnode188803* it, tnode188803* loc);
N_NIMCALL(ttype188837*, settype_316048)(tnode188803* n);
N_NIMCALL(ttype188837*, newtype_189060)(NU8 kind, tsym188833* owner);
N_NIMCALL(void, addsonskipintlit_242461)(ttype188837* father, ttype188837* son);
N_NIMCALL(tnode188803*, buildelse_316148)(tnode188803* n);
N_NIMCALL(tnode188803*, usefulfact_312888)(tnode188803* n);
static N_INLINE(tnode188803*, lastson_189189)(tnode188803* n);
N_NIMCALL(void, addfact_313441)(tnodeseq188797** m, tnode188803* n_313445);
STRING_LITERAL(TMP881, "<=", 2);
STRING_LITERAL(TMP882, "<", 1);
STRING_LITERAL(TMP883, "and", 3);
STRING_LITERAL(TMP884, "or", 2);
STRING_LITERAL(TMP885, "not", 3);
STRING_LITERAL(TMP886, "isnil", 5);
STRING_LITERAL(TMP887, "contains", 8);
STRING_LITERAL(TMP888, "==", 2);
STRING_LITERAL(TMP2994, "invalid fact", 12);
STRING_LITERAL(TMP2995, "impliesIsNil", 12);
NIM_CONST TY227866 TMP2996 = {1,
2}
;
NIM_CONST TY227866 TMP2997 = {2,
1}
;
STRING_LITERAL(TMP2998, "impliesEq", 9);
STRING_LITERAL(TMP3000, "compiler/guards.nim", 19);
NIM_CONST TY79484 TMP2999 = {((NimStringDesc*) &TMP3000),
379}
;
STRING_LITERAL(TMP3001, "impliesGe", 9);
STRING_LITERAL(TMP3002, "impliesLe", 9);
STRING_LITERAL(TMP3003, "impliesIn", 9);
STRING_LITERAL(TMP3004, "invalid proposition", 19);
tsym188833* ople_312362;
extern tgcheap43016 gch_43044;
tsym188833* oplt_312363;
tsym188833* opand_312364;
tsym188833* opor_312365;
tsym188833* opnot_312366;
tsym188833* opisnil_312367;
tsym188833* opcontains_312368;
tsym188833* opeq_312369;

N_NIMCALL(tsym188833*, getmagicop_312355)(NimStringDesc* name, NU16 m) {
	tsym188833* result;
	tident167019* LOC1;
	tlineinfo163527 LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_167456(name);
	LOC2 = unknownlineinfo_164203();
	result = newsym_189053(((NU8) 12), LOC1, NIM_NIL, LOC2);
	(*result).Magic = m;
	return result;
}

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(NU8, HEX7E_315651)(NU8 x) {
	NU8 result;
	result = 0;
	switch (x) {
	case ((NU8) 0):
	{
		result = ((NU8) 0);
	}
	break;
	case ((NU8) 1):
	{
		result = ((NU8) 2);
	}
	break;
	case ((NU8) 2):
	{
		result = ((NU8) 1);
	}
	break;
	}
	return result;
}

static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NIM_BOOL LOC11;
	int LOC13;
	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == NIM_NIL);
		if (LOC7) goto LA8;
		LOC7 = (b == NIM_NIL);
		LA8: ;
		if (!LOC7) goto LA9;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA9: ;
	LOC11 = 0;
	LOC11 = ((*a).Sup.len == (*b).Sup.len);
	if (!(LOC11)) goto LA12;
	LOC13 = 0;
	LOC13 = memcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)), (NI32)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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, sametree_313509)(tnode188803* a, tnode188803* b) {
	NIM_BOOL result;
	result = 0;
	result = NIM_FALSE;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		NIM_BOOL LOC7;
		LOC6 = 0;
		LOC7 = 0;
		LOC7 = !((a == NIM_NIL));
		if (!(LOC7)) goto LA8;
		LOC7 = !((b == NIM_NIL));
		LA8: ;
		LOC6 = LOC7;
		if (!(LOC6)) goto LA9;
		LOC6 = ((*a).Kind == (*b).Kind);
		LA9: ;
		if (!LOC6) goto LA10;
		switch ((*a).Kind) {
		case ((NU8) 3):
		{
			result = ((*a).kindU.S4.Sym == (*b).kindU.S4.Sym);
		}
		break;
		case ((NU8) 2):
		{
			result = ((*(*a).kindU.S5.Ident).Sup.Id == (*(*b).kindU.S5.Ident).Sup.Id);
		}
		break;
		case ((NU8) 5) ... ((NU8) 10):
		{
			result = ((*a).kindU.S1.Intval == (*b).kindU.S1.Intval);
		}
		break;
		case ((NU8) 16) ... ((NU8) 18):
		{
			result = ((*a).kindU.S2.Floatval == (*b).kindU.S2.Floatval);
		}
		break;
		case ((NU8) 20) ... ((NU8) 22):
		{
			result = eqStrings((*a).kindU.S3.Strval, (*b).kindU.S3.Strval);
		}
		break;
		case ((NU8) 4):
		{
			result = ((*a).Typ == (*b).Typ);
		}
		break;
		case ((NU8) 1):
		case ((NU8) 23):
		{
			result = NIM_TRUE;
		}
		break;
		default:
		{
			{
				NI LOC22;
				NI LOC23;
				NI i_313757;
				NI HEX3Atmp_313786;
				NI LOC26;
				NI res_313788;
				LOC22 = 0;
				LOC22 = sonslen_189181(a);
				LOC23 = 0;
				LOC23 = sonslen_189181(b);
				if (!(LOC22 == LOC23)) goto LA24;
				i_313757 = 0;
				HEX3Atmp_313786 = 0;
				LOC26 = 0;
				LOC26 = sonslen_189181(a);
				HEX3Atmp_313786 = (NI32)(LOC26 - 1);
				res_313788 = 0;
				while (1) {
					if (!(res_313788 <= HEX3Atmp_313786)) goto LA27;
					i_313757 = res_313788;
					{
						NIM_BOOL LOC30;
						LOC30 = 0;
						LOC30 = sametree_313509((*a).kindU.S6.Sons->data[i_313757], (*b).kindU.S6.Sons->data[i_313757]);
						if (!!(LOC30)) goto LA31;
						goto BeforeRet;
					}
					LA31: ;
					res_313788 += 1;
				} LA27: ;
				result = NIM_TRUE;
			}
			LA24: ;
		}
		break;
		}
	}
	goto LA1;
	LA10: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, valueisnil_314850)(tnode188803* n) {
	NU8 result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 23))) goto LA3;
		result = ((NU8) 2);
	}
	goto LA1;
	LA3: ;
	{
		if (!((*n).Kind >= ((NU8) 20) && (*n).Kind <= ((NU8) 22) || (*n).Kind == ((NU8) 41) || (*n).Kind == ((NU8) 38))) goto LA6;
		result = ((NU8) 1);
	}
	goto LA1;
	LA6: ;
	{
		result = ((NU8) 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, impliesisnil_314879)(tnode188803* fact, tnode188803* eq) {
	NU8 result;
	result = 0;
	switch ((*(*(*fact).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic) {
	case ((NU16) 168):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = sametree_313509((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[1]);
			if (!LOC4) goto LA5;
			result = ((NU8) 2);
		}
		LA5: ;
	}
	break;
	case ((NU16) 72):
	case ((NU16) 75):
	case ((NU16) 78):
	case ((NU16) 85):
	case ((NU16) 88):
	case ((NU16) 91):
	case ((NU16) 94):
	case ((NU16) 100):
	case ((NU16) 95):
	case ((NU16) 136):
	case ((NU16) 139):
	case ((NU16) 98):
	{
		{
			NIM_BOOL LOC10;
			tnode188803* LOC13;
			LOC10 = 0;
			LOC10 = sametree_313509((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[1]);
			if (!LOC10) goto LA11;
			LOC13 = 0;
			LOC13 = skipconv_197231((*fact).kindU.S6.Sons->data[2]);
			result = valueisnil_314850(LOC13);
		}
		goto LA8;
		LA11: ;
		{
			NIM_BOOL LOC15;
			tnode188803* LOC18;
			LOC15 = 0;
			LOC15 = sametree_313509((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[1]);
			if (!LOC15) goto LA16;
			LOC18 = 0;
			LOC18 = skipconv_197231((*fact).kindU.S6.Sons->data[1]);
			result = valueisnil_314850(LOC18);
		}
		goto LA8;
		LA16: ;
		LA8: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_165591((*eq).Info, ((NimStringDesc*) &TMP2995));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(NIM_BOOL, isvalue_312022)(tnode188803* n) {
	NIM_BOOL result;
	result = 0;
	result = ((*n).Kind >= ((NU8) 5) && (*n).Kind <= ((NU8) 23));
	return result;
}

N_NIMCALL(NIM_BOOL, islocation_312042)(tnode188803* n) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = isvalue_312022(n);
	result = !(LOC1);
	return result;
}

N_NIMCALL(NIM_BOOL, valuesunequal_313870)(tnode188803* a, tnode188803* b) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC7;
		LOC3 = 0;
		LOC3 = isvalue_312022(a);
		if (!(LOC3)) goto LA4;
		LOC3 = isvalue_312022(b);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = samevalue_197271(a, b);
		result = !(LOC7);
	}
	LA5: ;
	return result;
}

N_NIMCALL(NU8, implieseq_313943)(tnode188803* fact, tnode188803* eq) {
	NU8 result;
	TY227866 LOC1;
	NI loc;
	NI val;
	result = 0;
	{
		NIM_BOOL LOC4;
		LOC4 = 0;
		LOC4 = islocation_312042((*eq).kindU.S6.Sons->data[1]);
		if (!LOC4) goto LA5;
		LOC1 = TMP2996;
	}
	goto LA2;
	LA5: ;
	{
		LOC1 = TMP2997;
	}
	LA2: ;
	loc = LOC1.Field0;
	val = LOC1.Field1;
	switch ((*(*(*fact).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic) {
	case ((NU16) 72):
	case ((NU16) 75):
	case ((NU16) 78):
	case ((NU16) 85):
	case ((NU16) 88):
	case ((NU16) 91):
	case ((NU16) 94):
	case ((NU16) 100):
	case ((NU16) 95):
	case ((NU16) 136):
	case ((NU16) 139):
	case ((NU16) 98):
	{
		{
			NIM_BOOL LOC11;
			LOC11 = 0;
			LOC11 = sametree_313509((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[loc]);
			if (!LOC11) goto LA12;
			{
				NIM_BOOL LOC16;
				LOC16 = 0;
				LOC16 = sametree_313509((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[val]);
				if (!LOC16) goto LA17;
				result = ((NU8) 2);
			}
			goto LA14;
			LA17: ;
			{
				NIM_BOOL LOC20;
				LOC20 = 0;
				LOC20 = valuesunequal_313870((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[val]);
				if (!LOC20) goto LA21;
				result = ((NU8) 1);
			}
			goto LA14;
			LA21: ;
			LA14: ;
		}
		goto LA9;
		LA12: ;
		{
			NIM_BOOL LOC24;
			LOC24 = 0;
			LOC24 = sametree_313509((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[loc]);
			if (!LOC24) goto LA25;
			{
				NIM_BOOL LOC29;
				LOC29 = 0;
				LOC29 = sametree_313509((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[val]);
				if (!LOC29) goto LA30;
				result = ((NU8) 2);
			}
			goto LA27;
			LA30: ;
			{
				NIM_BOOL LOC33;
				LOC33 = 0;
				LOC33 = valuesunequal_313870((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[val]);
				if (!LOC33) goto LA34;
				result = ((NU8) 1);
			}
			goto LA27;
			LA34: ;
			LA27: ;
		}
		goto LA9;
		LA25: ;
		LA9: ;
	}
	break;
	case ((NU16) 159):
	{
		{
			NIM_BOOL LOC39;
			LOC39 = 0;
			LOC39 = sametree_313509((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[loc]);
			if (!(LOC39)) goto LA40;
			LOC39 = isvalue_312022((*eq).kindU.S6.Sons->data[val]);
			LA40: ;
			if (!LOC39) goto LA41;
			{
				NIM_BOOL LOC45;
				LOC45 = 0;
				LOC45 = inset_244013((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[val]);
				if (!LOC45) goto LA46;
				result = ((NU8) 2);
			}
			goto LA43;
			LA46: ;
			{
				result = ((NU8) 1);
			}
			LA43: ;
		}
		LA41: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_165591((*eq).Info, ((NimStringDesc*) &TMP2998));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode188803*, pred_313877)(tnode188803* n) {
	tnode188803* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*n).Kind >= ((NU8) 5) && (*n).Kind <= ((NU8) 15));
		if (!(LOC3)) goto LA4;
		LOC3 = !(((*n).kindU.S1.Intval == (IL64(-9223372036854775807) - IL64(1))));
		LA4: ;
		if (!LOC3) goto LA5;
		result = copynode_189233(n);
		(*result).kindU.S1.Intval -= 1;
	}
	goto LA1;
	LA5: ;
	{
		result = n;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, impliesge_315026)(tnode188803* fact, tnode188803* x, tnode188803* c) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = islocation_312042(x);
		if (!!(LOC3)) goto LA4;
		LOC6 = 0;
		LOC6 = HEX24_165714(TMP2999);
		internalerror_165606(LOC6);
	}
	LA4: ;
	switch ((*(*(*fact).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic) {
	case ((NU16) 72):
	case ((NU16) 75):
	case ((NU16) 78):
	case ((NU16) 85):
	case ((NU16) 88):
	case ((NU16) 91):
	case ((NU16) 94):
	case ((NU16) 100):
	case ((NU16) 95):
	case ((NU16) 136):
	case ((NU16) 139):
	case ((NU16) 98):
	{
		{
			NIM_BOOL LOC10;
			LOC10 = 0;
			LOC10 = sametree_313509((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC10) goto LA11;
			{
				NIM_BOOL LOC15;
				LOC15 = 0;
				LOC15 = isvalue_312022((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC15)) goto LA16;
				LOC15 = isvalue_312022(c);
				LA16: ;
				if (!LOC15) goto LA17;
				{
					NIM_BOOL LOC21;
					LOC21 = 0;
					LOC21 = levalue_197404(c, (*fact).kindU.S6.Sons->data[2]);
					if (!LOC21) goto LA22;
					result = ((NU8) 2);
				}
				goto LA19;
				LA22: ;
				{
					result = ((NU8) 1);
				}
				LA19: ;
			}
			LA17: ;
		}
		goto LA8;
		LA11: ;
		{
			NIM_BOOL LOC26;
			LOC26 = 0;
			LOC26 = sametree_313509((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC26) goto LA27;
			{
				NIM_BOOL LOC31;
				LOC31 = 0;
				LOC31 = isvalue_312022((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC31)) goto LA32;
				LOC31 = isvalue_312022(c);
				LA32: ;
				if (!LOC31) goto LA33;
				{
					NIM_BOOL LOC37;
					LOC37 = 0;
					LOC37 = levalue_197404(c, (*fact).kindU.S6.Sons->data[1]);
					if (!LOC37) goto LA38;
					result = ((NU8) 2);
				}
				goto LA35;
				LA38: ;
				{
					result = ((NU8) 1);
				}
				LA35: ;
			}
			LA33: ;
		}
		goto LA8;
		LA27: ;
		LA8: ;
	}
	break;
	case ((NU16) 74):
	case ((NU16) 77):
	case ((NU16) 80):
	case ((NU16) 82):
	case ((NU16) 84):
	case ((NU16) 87):
	case ((NU16) 90):
	case ((NU16) 93):
	case ((NU16) 97):
	case ((NU16) 138):
	{
		{
			NIM_BOOL LOC44;
			LOC44 = 0;
			LOC44 = sametree_313509((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC44) goto LA45;
			{
				NIM_BOOL LOC49;
				LOC49 = 0;
				LOC49 = isvalue_312022((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC49)) goto LA50;
				LOC49 = isvalue_312022(c);
				LA50: ;
				if (!LOC49) goto LA51;
				{
					NIM_BOOL LOC55;
					LOC55 = 0;
					LOC55 = levalue_197404((*fact).kindU.S6.Sons->data[2], c);
					if (!LOC55) goto LA56;
					result = ((NU8) 1);
				}
				LA56: ;
			}
			LA51: ;
		}
		goto LA42;
		LA45: ;
		{
			NIM_BOOL LOC59;
			LOC59 = 0;
			LOC59 = sametree_313509((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC59) goto LA60;
			{
				NIM_BOOL LOC64;
				LOC64 = 0;
				LOC64 = isvalue_312022((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC64)) goto LA65;
				LOC64 = isvalue_312022(c);
				LA65: ;
				if (!LOC64) goto LA66;
				{
					tnode188803* LOC70;
					NIM_BOOL LOC71;
					LOC70 = 0;
					LOC70 = pred_313877(c);
					LOC71 = 0;
					LOC71 = levalue_197404(LOC70, (*fact).kindU.S6.Sons->data[1]);
					if (!LOC71) goto LA72;
					result = ((NU8) 2);
				}
				LA72: ;
			}
			LA66: ;
		}
		goto LA42;
		LA60: ;
		LA42: ;
	}
	break;
	case ((NU16) 73):
	case ((NU16) 76):
	case ((NU16) 79):
	case ((NU16) 81):
	case ((NU16) 83):
	case ((NU16) 86):
	case ((NU16) 89):
	case ((NU16) 92):
	case ((NU16) 96):
	case ((NU16) 137):
	{
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = sametree_313509((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC77) goto LA78;
			{
				NIM_BOOL LOC82;
				LOC82 = 0;
				LOC82 = isvalue_312022((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC82)) goto LA83;
				LOC82 = isvalue_312022(c);
				LA83: ;
				if (!LOC82) goto LA84;
				{
					NIM_BOOL LOC88;
					LOC88 = 0;
					LOC88 = levalue_197404((*fact).kindU.S6.Sons->data[2], c);
					if (!LOC88) goto LA89;
					result = ((NU8) 1);
				}
				LA89: ;
			}
			LA84: ;
		}
		goto LA75;
		LA78: ;
		{
			NIM_BOOL LOC92;
			LOC92 = 0;
			LOC92 = sametree_313509((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC92) goto LA93;
			{
				NIM_BOOL LOC97;
				LOC97 = 0;
				LOC97 = isvalue_312022((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC97)) goto LA98;
				LOC97 = isvalue_312022(c);
				LA98: ;
				if (!LOC97) goto LA99;
				{
					NIM_BOOL LOC103;
					LOC103 = 0;
					LOC103 = levalue_197404(c, (*fact).kindU.S6.Sons->data[1]);
					if (!LOC103) goto LA104;
					result = ((NU8) 2);
				}
				LA104: ;
			}
			LA99: ;
		}
		goto LA75;
		LA93: ;
		LA75: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_165591((*x).Info, ((NimStringDesc*) &TMP3001));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, impliesle_315321)(tnode188803* fact, tnode188803* x, tnode188803* c) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = islocation_312042(x);
		if (!!(LOC3)) goto LA4;
		result = impliesge_315026(fact, c, x);
		goto BeforeRet;
	}
	LA4: ;
	switch ((*(*(*fact).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic) {
	case ((NU16) 72):
	case ((NU16) 75):
	case ((NU16) 78):
	case ((NU16) 85):
	case ((NU16) 88):
	case ((NU16) 91):
	case ((NU16) 94):
	case ((NU16) 100):
	case ((NU16) 95):
	case ((NU16) 136):
	case ((NU16) 139):
	case ((NU16) 98):
	{
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = sametree_313509((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC9) goto LA10;
			{
				NIM_BOOL LOC14;
				LOC14 = 0;
				LOC14 = isvalue_312022((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC14)) goto LA15;
				LOC14 = isvalue_312022(c);
				LA15: ;
				if (!LOC14) goto LA16;
				{
					NIM_BOOL LOC20;
					LOC20 = 0;
					LOC20 = levalue_197404((*fact).kindU.S6.Sons->data[2], c);
					if (!LOC20) goto LA21;
					result = ((NU8) 2);
				}
				goto LA18;
				LA21: ;
				{
					result = ((NU8) 1);
				}
				LA18: ;
			}
			LA16: ;
		}
		goto LA7;
		LA10: ;
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = sametree_313509((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC25) goto LA26;
			{
				NIM_BOOL LOC30;
				LOC30 = 0;
				LOC30 = isvalue_312022((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC30)) goto LA31;
				LOC30 = isvalue_312022(c);
				LA31: ;
				if (!LOC30) goto LA32;
				{
					NIM_BOOL LOC36;
					LOC36 = 0;
					LOC36 = levalue_197404((*fact).kindU.S6.Sons->data[1], c);
					if (!LOC36) goto LA37;
					result = ((NU8) 2);
				}
				goto LA34;
				LA37: ;
				{
					result = ((NU8) 1);
				}
				LA34: ;
			}
			LA32: ;
		}
		goto LA7;
		LA26: ;
		LA7: ;
	}
	break;
	case ((NU16) 74):
	case ((NU16) 77):
	case ((NU16) 80):
	case ((NU16) 82):
	case ((NU16) 84):
	case ((NU16) 87):
	case ((NU16) 90):
	case ((NU16) 93):
	case ((NU16) 97):
	case ((NU16) 138):
	{
		{
			NIM_BOOL LOC43;
			LOC43 = 0;
			LOC43 = sametree_313509((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC43) goto LA44;
			{
				NIM_BOOL LOC48;
				LOC48 = 0;
				LOC48 = isvalue_312022((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC48)) goto LA49;
				LOC48 = isvalue_312022(c);
				LA49: ;
				if (!LOC48) goto LA50;
				{
					tnode188803* LOC54;
					NIM_BOOL LOC55;
					LOC54 = 0;
					LOC54 = pred_313877(c);
					LOC55 = 0;
					LOC55 = levalue_197404((*fact).kindU.S6.Sons->data[2], LOC54);
					if (!LOC55) goto LA56;
					result = ((NU8) 2);
				}
				LA56: ;
			}
			LA50: ;
		}
		goto LA41;
		LA44: ;
		{
			NIM_BOOL LOC59;
			LOC59 = 0;
			LOC59 = sametree_313509((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC59) goto LA60;
			{
				NIM_BOOL LOC64;
				LOC64 = 0;
				LOC64 = isvalue_312022((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC64)) goto LA65;
				LOC64 = isvalue_312022(c);
				LA65: ;
				if (!LOC64) goto LA66;
				{
					NIM_BOOL LOC70;
					LOC70 = 0;
					LOC70 = levalue_197404(c, (*fact).kindU.S6.Sons->data[1]);
					if (!LOC70) goto LA71;
					result = ((NU8) 1);
				}
				LA71: ;
			}
			LA66: ;
		}
		goto LA41;
		LA60: ;
		LA41: ;
	}
	break;
	case ((NU16) 73):
	case ((NU16) 76):
	case ((NU16) 79):
	case ((NU16) 81):
	case ((NU16) 83):
	case ((NU16) 86):
	case ((NU16) 89):
	case ((NU16) 92):
	case ((NU16) 96):
	case ((NU16) 137):
	{
		{
			NIM_BOOL LOC76;
			LOC76 = 0;
			LOC76 = sametree_313509((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC76) goto LA77;
			{
				NIM_BOOL LOC81;
				LOC81 = 0;
				LOC81 = isvalue_312022((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC81)) goto LA82;
				LOC81 = isvalue_312022(c);
				LA82: ;
				if (!LOC81) goto LA83;
				{
					NIM_BOOL LOC87;
					LOC87 = 0;
					LOC87 = levalue_197404((*fact).kindU.S6.Sons->data[2], c);
					if (!LOC87) goto LA88;
					result = ((NU8) 2);
				}
				LA88: ;
			}
			LA83: ;
		}
		goto LA74;
		LA77: ;
		{
			NIM_BOOL LOC91;
			LOC91 = 0;
			LOC91 = sametree_313509((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC91) goto LA92;
			{
				NIM_BOOL LOC96;
				LOC96 = 0;
				LOC96 = isvalue_312022((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC96)) goto LA97;
				LOC96 = isvalue_312022(c);
				LA97: ;
				if (!LOC96) goto LA98;
				{
					tnode188803* LOC102;
					NIM_BOOL LOC103;
					LOC102 = 0;
					LOC102 = pred_313877((*fact).kindU.S6.Sons->data[1]);
					LOC103 = 0;
					LOC103 = levalue_197404(c, LOC102);
					if (!LOC103) goto LA104;
					result = ((NU8) 1);
				}
				LA104: ;
			}
			LA98: ;
		}
		goto LA74;
		LA92: ;
		LA74: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_165591((*x).Info, ((NimStringDesc*) &TMP3002));
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, implieslt_315609)(tnode188803* fact, tnode188803* x, tnode188803* c) {
	NU8 result;
	tnode188803* p;
	result = 0;
	p = pred_313877(c);
	{
		if (!!((p == c))) goto LA3;
		result = impliesle_315321(fact, x, p);
	}
	goto LA1;
	LA3: ;
	{
		tnode188803* q;
		q = pred_313877(x);
		{
			if (!!((q == x))) goto LA8;
			result = impliesle_315321(fact, q, c);
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, len_189264)(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(NU8, comparesets_314555)(tnode188803* a, tnode188803* b) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = equalsets_244058(a, b);
		if (!LOC3) goto LA4;
		result = ((NU8) 2);
	}
	goto LA1;
	LA4: ;
	{
		tnode188803* LOC7;
		NI LOC8;
		LOC7 = 0;
		LOC7 = intersectsets_244043(a, b);
		LOC8 = 0;
		LOC8 = len_189264(LOC7);
		if (!(LOC8 == 0)) goto LA9;
		result = ((NU8) 1);
	}
	goto LA1;
	LA9: ;
	LA1: ;
	return result;
}

N_NIMCALL(NU8, leimpliesin_314234)(tnode188803* x, tnode188803* c, tnode188803* aset) {
	NU8 result;
	result = 0;
	{
		tnode188803* value;
		NI64 LOC5;
		if (!((*c).Kind >= ((NU8) 5) && (*c).Kind <= ((NU8) 15))) goto LA3;
		LOC5 = 0;
		LOC5 = firstord_223002((*x).Typ);
		value = newintnode_189069((*c).Kind, LOC5);
		{
			NI i;
			NI pos;
			NI neg;
			if (!((NI64)((*c).kindU.S1.Intval - (*value).kindU.S1.Intval) < 1000)) goto LA8;
			i = 0;
			pos = 0;
			neg = 0;
			while (1) {
				if (!((*value).kindU.S1.Intval <= (*c).kindU.S1.Intval)) goto LA10;
				{
					NIM_BOOL LOC13;
					LOC13 = 0;
					LOC13 = inset_244013(aset, value);
					if (!LOC13) goto LA14;
					pos += 1;
				}
				goto LA11;
				LA14: ;
				{
					neg += 1;
				}
				LA11: ;
				i += 1;
				(*value).kindU.S1.Intval += 1;
			} LA10: ;
			{
				if (!(pos == i)) goto LA19;
				result = ((NU8) 2);
			}
			goto LA17;
			LA19: ;
			{
				if (!(neg == i)) goto LA22;
				result = ((NU8) 1);
			}
			goto LA17;
			LA22: ;
			LA17: ;
		}
		LA8: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NU8, geimpliesin_314401)(tnode188803* x, tnode188803* c, tnode188803* aset) {
	NU8 result;
	result = 0;
	{
		tnode188803* value;
		NI64 max;
		if (!((*c).Kind >= ((NU8) 5) && (*c).Kind <= ((NU8) 15))) goto LA3;
		value = newintnode_189069((*c).Kind, (*c).kindU.S1.Intval);
		max = lastord_223006((*x).Typ);
		{
			NI i;
			NI pos;
			NI neg;
			if (!((NI64)(max - (*value).kindU.S1.Intval) < 1000)) goto LA7;
			i = 0;
			pos = 0;
			neg = 0;
			while (1) {
				if (!((*value).kindU.S1.Intval <= max)) goto LA9;
				{
					NIM_BOOL LOC12;
					LOC12 = 0;
					LOC12 = inset_244013(aset, value);
					if (!LOC12) goto LA13;
					pos += 1;
				}
				goto LA10;
				LA13: ;
				{
					neg += 1;
				}
				LA10: ;
				i += 1;
				(*value).kindU.S1.Intval += 1;
			} LA9: ;
			{
				if (!(pos == i)) goto LA18;
				result = ((NU8) 2);
			}
			goto LA16;
			LA18: ;
			{
				if (!(neg == i)) goto LA21;
				result = ((NU8) 1);
			}
			goto LA16;
			LA21: ;
			LA16: ;
		}
		LA7: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NU8, impliesin_314562)(tnode188803* fact, tnode188803* loc, tnode188803* aset) {
	NU8 result;
	result = 0;
	switch ((*(*(*fact).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic) {
	case ((NU16) 72):
	case ((NU16) 75):
	case ((NU16) 78):
	case ((NU16) 85):
	case ((NU16) 88):
	case ((NU16) 91):
	case ((NU16) 94):
	case ((NU16) 100):
	case ((NU16) 95):
	case ((NU16) 136):
	case ((NU16) 139):
	case ((NU16) 98):
	{
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = sametree_313509((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC4) goto LA5;
			{
				NIM_BOOL LOC9;
				LOC9 = 0;
				LOC9 = inset_244013(aset, (*fact).kindU.S6.Sons->data[2]);
				if (!LOC9) goto LA10;
				result = ((NU8) 2);
			}
			goto LA7;
			LA10: ;
			{
				result = ((NU8) 1);
			}
			LA7: ;
		}
		goto LA2;
		LA5: ;
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = sametree_313509((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC14) goto LA15;
			{
				NIM_BOOL LOC19;
				LOC19 = 0;
				LOC19 = inset_244013(aset, (*fact).kindU.S6.Sons->data[1]);
				if (!LOC19) goto LA20;
				result = ((NU8) 2);
			}
			goto LA17;
			LA20: ;
			{
				result = ((NU8) 1);
			}
			LA17: ;
		}
		goto LA2;
		LA15: ;
		LA2: ;
	}
	break;
	case ((NU16) 159):
	{
		{
			NIM_BOOL LOC26;
			LOC26 = 0;
			LOC26 = sametree_313509((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC26) goto LA27;
			result = comparesets_314555((*fact).kindU.S6.Sons->data[1], aset);
		}
		LA27: ;
	}
	break;
	case ((NU16) 73):
	case ((NU16) 76):
	case ((NU16) 79):
	case ((NU16) 81):
	case ((NU16) 83):
	case ((NU16) 86):
	case ((NU16) 89):
	case ((NU16) 92):
	case ((NU16) 96):
	case ((NU16) 137):
	{
		{
			NIM_BOOL LOC32;
			LOC32 = 0;
			LOC32 = sametree_313509((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC32) goto LA33;
			result = leimpliesin_314234((*fact).kindU.S6.Sons->data[1], (*fact).kindU.S6.Sons->data[2], aset);
		}
		goto LA30;
		LA33: ;
		{
			NIM_BOOL LOC36;
			LOC36 = 0;
			LOC36 = sametree_313509((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC36) goto LA37;
			result = geimpliesin_314401((*fact).kindU.S6.Sons->data[2], (*fact).kindU.S6.Sons->data[1], aset);
		}
		goto LA30;
		LA37: ;
		LA30: ;
	}
	break;
	case ((NU16) 74):
	case ((NU16) 77):
	case ((NU16) 80):
	case ((NU16) 82):
	case ((NU16) 84):
	case ((NU16) 87):
	case ((NU16) 90):
	case ((NU16) 93):
	case ((NU16) 97):
	case ((NU16) 138):
	{
		{
			NIM_BOOL LOC42;
			tnode188803* LOC45;
			LOC42 = 0;
			LOC42 = sametree_313509((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC42) goto LA43;
			LOC45 = 0;
			LOC45 = pred_313877((*fact).kindU.S6.Sons->data[2]);
			result = leimpliesin_314234((*fact).kindU.S6.Sons->data[1], LOC45, aset);
		}
		goto LA40;
		LA43: ;
		{
			NIM_BOOL LOC47;
			tnode188803* LOC50;
			LOC47 = 0;
			LOC47 = sametree_313509((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC47) goto LA48;
			LOC50 = 0;
			LOC50 = pred_313877((*fact).kindU.S6.Sons->data[1]);
			result = geimpliesin_314401((*fact).kindU.S6.Sons->data[2], LOC50, aset);
		}
		goto LA40;
		LA48: ;
		LA40: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_165591((*loc).Info, ((NimStringDesc*) &TMP3003));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, factimplies_315657)(tnode188803* fact, tnode188803* prop) {
	NU8 result;
	NU16 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getmagic_221775(fact);
	switch (LOC1) {
	case ((NU16) 105):
	{
		tnode188803* arg;
		NU16 LOC3;
		arg = (*fact).kindU.S6.Sons->data[1];
		LOC3 = 0;
		LOC3 = getmagic_221775(arg);
		switch (LOC3) {
		case ((NU16) 168):
		{
			NU8 LOC5;
			LOC5 = 0;
			LOC5 = factimplies_315657(arg, prop);
			result = HEX7E_315651(LOC5);
			goto BeforeRet;
		}
		break;
		case ((NU16) 134):
		{
			NU8 a;
			NU8 b;
			a = factimplies_315657((*arg).kindU.S6.Sons->data[1], prop);
			b = factimplies_315657((*arg).kindU.S6.Sons->data[2], prop);
			{
				if (!(a == b)) goto LA9;
				result = HEX7E_315651(a);
				goto BeforeRet;
			}
			LA9: ;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		break;
		default:
		{
			internalerror_165591((*fact).Info, ((NimStringDesc*) &TMP2994));
		}
		break;
		}
	}
	break;
	case ((NU16) 134):
	{
		result = factimplies_315657((*fact).kindU.S6.Sons->data[1], prop);
		{
			if (!!((result == ((NU8) 0)))) goto LA15;
			goto BeforeRet;
		}
		LA15: ;
		result = factimplies_315657((*fact).kindU.S6.Sons->data[2], prop);
		goto BeforeRet;
	}
	break;
	default:
	{
	}
	break;
	}
	switch ((*(*(*prop).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic) {
	case ((NU16) 105):
	{
		NU8 LOC19;
		LOC19 = 0;
		LOC19 = factimplies_315657(fact, (*prop).kindU.S6.Sons->data[1]);
		result = HEX7E_315651(LOC19);
	}
	break;
	case ((NU16) 168):
	{
		result = impliesisnil_314879(fact, prop);
	}
	break;
	case ((NU16) 72):
	case ((NU16) 75):
	case ((NU16) 78):
	case ((NU16) 85):
	case ((NU16) 88):
	case ((NU16) 91):
	case ((NU16) 94):
	case ((NU16) 100):
	case ((NU16) 95):
	case ((NU16) 136):
	case ((NU16) 139):
	case ((NU16) 98):
	{
		result = implieseq_313943(fact, prop);
	}
	break;
	case ((NU16) 73):
	case ((NU16) 76):
	case ((NU16) 79):
	case ((NU16) 81):
	case ((NU16) 83):
	case ((NU16) 86):
	case ((NU16) 89):
	case ((NU16) 92):
	case ((NU16) 96):
	case ((NU16) 137):
	{
		result = impliesle_315321(fact, (*prop).kindU.S6.Sons->data[1], (*prop).kindU.S6.Sons->data[2]);
	}
	break;
	case ((NU16) 74):
	case ((NU16) 77):
	case ((NU16) 80):
	case ((NU16) 82):
	case ((NU16) 84):
	case ((NU16) 87):
	case ((NU16) 90):
	case ((NU16) 93):
	case ((NU16) 97):
	case ((NU16) 138):
	{
		result = implieslt_315609(fact, (*prop).kindU.S6.Sons->data[1], (*prop).kindU.S6.Sons->data[2]);
	}
	break;
	case ((NU16) 159):
	{
		result = impliesin_314562(fact, (*prop).kindU.S6.Sons->data[2], (*prop).kindU.S6.Sons->data[1]);
	}
	break;
	default:
	{
		internalerror_165591((*prop).Info, ((NimStringDesc*) &TMP3004));
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, doesimply_315881)(tnodeseq188797* facts, tnode188803* prop) {
	NU8 result;
	tnode188803* f_316013;
	NI i_316035;
	NI l_316037;
	result = 0;
	f_316013 = 0;
	i_316035 = 0;
	l_316037 = facts->Sup.len;
	while (1) {
		if (!(i_316035 < l_316037)) goto LA1;
		f_316013 = facts->data[i_316035];
		{
			if (!!(f_316013 == 0)) goto LA4;
			result = factimplies_315657(f_316013, prop);
			{
				if (!!((result == ((NU8) 0)))) goto LA8;
				goto BeforeRet;
			}
			LA8: ;
		}
		LA4: ;
		i_316035 += 1;
	} LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode188803*, swapargs_312371)(tnode188803* fact, tsym188833* newop) {
	tnode188803* result;
	result = 0;
	result = newnodei_190803(((NU8) 27), (*fact).Info, 3);
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(newop));
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], (*fact).kindU.S6.Sons->data[2]);
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], (*fact).kindU.S6.Sons->data[1]);
	return result;
}

N_NIMCALL(tnode188803*, neg_312448)(tnode188803* n) {
	tnode188803* result;
	NU16 LOC5;
	result = 0;
	{
		if (!(n == NIM_NIL)) goto LA3;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = getmagic_221775(n);
	switch (LOC5) {
	case ((NU16) 105):
	{
		result = (*n).kindU.S6.Sons->data[1];
	}
	break;
	case ((NU16) 74):
	case ((NU16) 77):
	case ((NU16) 80):
	case ((NU16) 82):
	case ((NU16) 84):
	case ((NU16) 87):
	case ((NU16) 90):
	case ((NU16) 93):
	case ((NU16) 97):
	case ((NU16) 138):
	{
		result = swapargs_312371(n, ople_312362);
	}
	break;
	case ((NU16) 73):
	case ((NU16) 76):
	case ((NU16) 79):
	case ((NU16) 81):
	case ((NU16) 83):
	case ((NU16) 86):
	case ((NU16) 89):
	case ((NU16) 92):
	case ((NU16) 96):
	case ((NU16) 137):
	{
		result = swapargs_312371(n, oplt_312363);
	}
	break;
	case ((NU16) 159):
	{
		ttype188837* t;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 39)))) goto LA12;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA12: ;
		t = skiptypes_192793((*(*n).kindU.S6.Sons->data[2]).Typ, IL64(211106232576256));
		result = newnodei_190803(((NU8) 27), (*n).Info, 3);
		asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], (*n).kindU.S6.Sons->data[0]);
		asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], (*n).kindU.S6.Sons->data[2]);
		{
			tnode188803* s;
			tnode188803* e_312601;
			tnode188803* HEX3Atmp_312844;
			NI i_312846;
			NI HEX3Atmp_312848;
			NI LOC18;
			NI res_312850;
			if (!((*t).Kind == ((NU8) 14))) goto LA16;
			s = newnodeit_189104(((NU8) 39), (*n).Info, (*(*n).kindU.S6.Sons->data[1]).Typ);
			e_312601 = 0;
			HEX3Atmp_312844 = 0;
			HEX3Atmp_312844 = (*t).N;
			i_312846 = 0;
			HEX3Atmp_312848 = 0;
			LOC18 = 0;
			LOC18 = len_189264(HEX3Atmp_312844);
			HEX3Atmp_312848 = LOC18 - 1;
			res_312850 = 0;
			while (1) {
				tnode188803* easnode;
				if (!(res_312850 <= HEX3Atmp_312848)) goto LA19;
				i_312846 = res_312850;
				e_312601 = (*HEX3Atmp_312844).kindU.S6.Sons->data[i_312846];
				easnode = newintnode_189069(((NU8) 6), ((NI64) ((*(*e_312601).kindU.S4.Sym).Position)));
				{
					NIM_BOOL LOC22;
					LOC22 = 0;
					LOC22 = inset_244013((*n).kindU.S6.Sons->data[1], easnode);
					if (!!(LOC22)) goto LA23;
					add_189390(s, easnode);
				}
				LA23: ;
				res_312850 += 1;
			} LA19: ;
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], s);
		}
		goto LA14;
		LA16: ;
		{
			NI64 LOC26;
			LOC26 = 0;
			LOC26 = lengthord_223010(t);
			if (!(LOC26 < 1000)) goto LA27;
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], complement_244860((*n).kindU.S6.Sons->data[1]));
		}
		goto LA14;
		LA27: ;
		{
			result = NIM_NIL;
		}
		LA14: ;
	}
	break;
	case ((NU16) 135):
	{
		tnode188803* a;
		tnode188803* b;
		a = neg_312448((*n).kindU.S6.Sons->data[1]);
		b = neg_312448((*n).kindU.S6.Sons->data[2]);
		{
			NIM_BOOL LOC33;
			LOC33 = 0;
			LOC33 = !((a == NIM_NIL));
			if (!(LOC33)) goto LA34;
			LOC33 = !((b == NIM_NIL));
			LA34: ;
			if (!LOC33) goto LA35;
			result = newnodei_190803(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(opand_312364));
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], a);
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], b);
		}
		goto LA31;
		LA35: ;
		{
			if (!!((a == NIM_NIL))) goto LA38;
			result = a;
		}
		goto LA31;
		LA38: ;
		{
			if (!!((b == NIM_NIL))) goto LA41;
			result = b;
		}
		goto LA31;
		LA41: ;
		LA31: ;
	}
	break;
	default:
	{
		result = newnodei_190803(((NU8) 27), (*n).Info, 2);
		asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(opnot_312366));
		asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], n);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode188803*, buildisnil_312854)(tnode188803* arg) {
	tnode188803* result;
	result = 0;
	result = newnodei_190803(((NU8) 27), (*arg).Info, 2);
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(opisnil_312367));
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], arg);
	return result;
}

N_NIMCALL(NU8, impliesnotnil_316041)(tnodeseq188797* facts, tnode188803* arg) {
	NU8 result;
	tnode188803* LOC1;
	tnode188803* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = buildisnil_312854(arg);
	LOC2 = 0;
	LOC2 = neg_312448(LOC1);
	result = doesimply_315881(facts, LOC2);
	return result;
}

N_NIMCALL(tnode188803*, buildproperfieldcheck_316741)(tnode188803* access, tnode188803* check) {
	tnode188803* result;
	result = 0;
	{
		if (!((*(*check).kindU.S6.Sons->data[1]).Kind == ((NU8) 39))) goto LA3;
		result = copytree_189237(check);
		{
			tnode188803* a;
			if (!((*access).Kind == ((NU8) 45))) goto LA7;
			a = copytree_189237(access);
			asgnRefNoCycle((void**) &(*a).kindU.S6.Sons->data[1], (*check).kindU.S6.Sons->data[2]);
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], a);
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		tnode188803* LOC10;
		LOC10 = 0;
		LOC10 = buildproperfieldcheck_316741(access, (*check).kindU.S6.Sons->data[1]);
		result = neg_312448(LOC10);
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, checkfieldaccess_317017)(tnodeseq188797* m, tnode188803* n) {
	NI i_317031;
	NI HEX3Atmp_317084;
	NI LOC1;
	NI res_317086;
	i_317031 = 0;
	HEX3Atmp_317084 = 0;
	LOC1 = 0;
	LOC1 = len_189264(n);
	HEX3Atmp_317084 = (NI32)(LOC1 - 1);
	res_317086 = 1;
	while (1) {
		tnode188803* check;
		if (!(res_317086 <= HEX3Atmp_317084)) goto LA2;
		i_317031 = res_317086;
		check = buildproperfieldcheck_316741((*n).kindU.S6.Sons->data[0], (*n).kindU.S6.Sons->data[i_317031]);
		{
			NU8 LOC5;
			NimStringDesc* LOC8;
			LOC5 = 0;
			LOC5 = doesimply_315881(m, check);
			if (!!((LOC5 == ((NU8) 2)))) goto LA6;
			LOC8 = 0;
			LOC8 = rendertree_211051((*n).kindU.S6.Sons->data[0], 0);
			message_165584((*n).Info, ((NU16) 250), LOC8);
			goto LA2;
		}
		LA6: ;
		res_317086 += 1;
	} LA2: ;
}

static N_INLINE(NI, safelen_189320)(tnode188803* n) {
	NI result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*n).Kind >= ((NU8) 0) && (*n).Kind <= ((NU8) 23));
		if (LOC3) goto LA4;
		LOC3 = (*n).kindU.S6.Sons == 0;
		LA4: ;
		if (!LOC3) goto LA5;
		result = 0;
	}
	goto LA1;
	LA5: ;
	{
		result = (*n).kindU.S6.Sons->Sup.len;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, hassubtree_313793)(tnode188803* n, tnode188803* x) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametree_313509(n, x);
		if (!LOC3) goto LA4;
		result = NIM_TRUE;
	}
	goto LA1;
	LA4: ;
	{
		NI i_313808;
		NI HEX3Atmp_313823;
		NI LOC7;
		NI res_313825;
		i_313808 = 0;
		HEX3Atmp_313823 = 0;
		LOC7 = 0;
		LOC7 = safelen_189320(n);
		HEX3Atmp_313823 = (NI32)(LOC7 - 1);
		res_313825 = 0;
		while (1) {
			if (!(res_313825 <= HEX3Atmp_313823)) goto LA8;
			i_313808 = res_313825;
			{
				NIM_BOOL LOC11;
				LOC11 = 0;
				LOC11 = hassubtree_313793((*n).kindU.S6.Sons->data[i_313808], x);
				if (!LOC11) goto LA12;
				result = NIM_TRUE;
				goto BeforeRet;
			}
			LA12: ;
			res_313825 += 1;
		} LA8: ;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, invalidatefacts_313830)(tnodeseq188797** m, tnode188803* n) {
	NI i_313845;
	NI HEX3Atmp_313863;
	NI res_313865;
	i_313845 = 0;
	HEX3Atmp_313863 = 0;
	HEX3Atmp_313863 = ((*m)->Sup.len-1);
	res_313865 = 0;
	while (1) {
		if (!(res_313865 <= HEX3Atmp_313863)) goto LA1;
		i_313845 = res_313865;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = !(((*m)->data[i_313845] == NIM_NIL));
			if (!(LOC4)) goto LA5;
			LOC4 = hassubtree_313793((*m)->data[i_313845], n);
			LA5: ;
			if (!LOC4) goto LA6;
			asgnRefNoCycle((void**) &(*m)->data[i_313845], NIM_NIL);
		}
		LA6: ;
		res_313865 += 1;
	} LA1: ;
}

N_NIMCALL(void, addasgnfact_316590)(tnodeseq188797** m, tnode188803* key, tnode188803* value) {
	tnode188803* fact;
	fact = newnodei_190803(((NU8) 27), (*key).Info, 3);
	asgnRefNoCycle((void**) &(*fact).kindU.S6.Sons->data[0], newsymnode_189095(opeq_312369));
	asgnRefNoCycle((void**) &(*fact).kindU.S6.Sons->data[1], key);
	asgnRefNoCycle((void**) &(*fact).kindU.S6.Sons->data[2], value);
	(*m) = (tnodeseq188797*) incrSeq(&((*m))->Sup, sizeof(tnode188803*));
	asgnRefNoCycle((void**) &(*m)->data[(*m)->Sup.len-1], fact);
}

N_NIMCALL(NIM_BOOL, islet_312048)(tnode188803* n) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 3))) goto LA3;
		{
			if (!((2097696 &(1<<(((*(*n).kindU.S4.Sym).Kind)&31)))!=0)) goto LA7;
			result = NIM_TRUE;
		}
		goto LA5;
		LA7: ;
		{
			NIM_BOOL LOC10;
			ttype188837* LOC12;
			LOC10 = 0;
			LOC10 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 3));
			if (!(LOC10)) goto LA11;
			LOC12 = 0;
			LOC12 = skiptypes_192793((*(*n).kindU.S4.Sym).Typ, IL64(211106232576256));
			LOC10 = !(((*LOC12).Kind == ((NU8) 23)));
			LA11: ;
			if (!LOC10) goto LA13;
			result = NIM_TRUE;
		}
		goto LA5;
		LA13: ;
		LA5: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isvar_312137)(tnode188803* n) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*n).Kind == ((NU8) 3));
	if (!(LOC2)) goto LA3;
	LOC2 = ((2304 &(1<<(((*(*n).kindU.S4.Sym).Kind)&31)))!=0);
	LA3: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA4;
	LOC1 = ((32776 & (*(*n).kindU.S4.Sym).Flags) == 0);
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, isletlocation_312231)(tnode188803* m, NIM_BOOL isapprox) {
	NIM_BOOL result;
	tnode188803* n;
	NI derefs;
	NIM_BOOL LOC14;
	result = 0;
	n = m;
	derefs = 0;
	while (1) {
		switch ((*n).Kind) {
		case ((NU8) 45):
		case ((NU8) 46):
		case ((NU8) 67):
		case ((NU8) 66):
		{
			n = (*n).kindU.S6.Sons->data[0];
		}
		break;
		case ((NU8) 47):
		case ((NU8) 65):
		{
			n = (*n).kindU.S6.Sons->data[0];
			derefs += 1;
		}
		break;
		case ((NU8) 42):
		{
			{
				NIM_BOOL LOC7;
				LOC7 = 0;
				LOC7 = isconstexpr_221843((*n).kindU.S6.Sons->data[1]);
				if (LOC7) goto LA8;
				LOC7 = islet_312048((*n).kindU.S6.Sons->data[1]);
				LA8: ;
				if (!LOC7) goto LA9;
				n = (*n).kindU.S6.Sons->data[0];
			}
			goto LA5;
			LA9: ;
			{
				goto BeforeRet;
			}
			LA5: ;
		}
		break;
		case ((NU8) 58):
		case ((NU8) 59):
		case ((NU8) 60):
		{
			n = (*n).kindU.S6.Sons->data[1];
		}
		break;
		default:
		{
			goto LA1;
		}
		break;
		}
	} LA1: ;
	LOC14 = 0;
	LOC14 = islet_312048(n);
	if (!(LOC14)) goto LA15;
	LOC14 = (derefs <= ((NI) (isapprox)));
	LA15: ;
	result = LOC14;
	{
		NIM_BOOL LOC18;
		LOC18 = 0;
		LOC18 = !(result);
		if (!(LOC18)) goto LA19;
		LOC18 = isapprox;
		LA19: ;
		if (!LOC18) goto LA20;
		result = isvar_312137(n);
	}
	LA20: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, interestingcaseexpr_312349)(tnode188803* m) {
	NIM_BOOL result;
	result = 0;
	result = isletlocation_312231(m, NIM_TRUE);
	return result;
}

N_NIMCALL(ttype188837*, settype_316048)(tnode188803* n) {
	ttype188837* result;
	result = 0;
	result = newtype_189060(((NU8) 19), (*(*n).Typ).Owner);
	addsonskipintlit_242461(result, (*n).Typ);
	return result;
}

N_NIMCALL(tnode188803*, buildof_316054)(tnode188803* it, tnode188803* loc) {
	tnode188803* result;
	tnode188803* s;
	NI LOC1;
	NI i_316070;
	NI HEX3Atmp_316141;
	NI LOC2;
	NI res_316143;
	result = 0;
	LOC1 = 0;
	LOC1 = len_189264(it);
	s = newnodei_190803(((NU8) 39), (*it).Info, (NI32)(LOC1 - 1));
	asgnRefNoCycle((void**) &(*s).Typ, settype_316048(loc));
	i_316070 = 0;
	HEX3Atmp_316141 = 0;
	LOC2 = 0;
	LOC2 = len_189264(it);
	HEX3Atmp_316141 = (NI32)(LOC2 - 2);
	res_316143 = 0;
	while (1) {
		if (!(res_316143 <= HEX3Atmp_316141)) goto LA3;
		i_316070 = res_316143;
		asgnRefNoCycle((void**) &(*s).kindU.S6.Sons->data[i_316070], (*it).kindU.S6.Sons->data[i_316070]);
		res_316143 += 1;
	} LA3: ;
	result = newnodei_190803(((NU8) 27), (*it).Info, 3);
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(opcontains_312368));
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], s);
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], loc);
	return result;
}

N_NIMCALL(tnode188803*, buildelse_316148)(tnode188803* n) {
	tnode188803* result;
	tnode188803* s;
	ttype188837* LOC1;
	NI i_316177;
	NI HEX3Atmp_316486;
	NI LOC2;
	NI res_316488;
	result = 0;
	LOC1 = 0;
	LOC1 = settype_316048((*n).kindU.S6.Sons->data[0]);
	s = newnodeit_189104(((NU8) 39), (*n).Info, LOC1);
	i_316177 = 0;
	HEX3Atmp_316486 = 0;
	LOC2 = 0;
	LOC2 = len_189264(n);
	HEX3Atmp_316486 = (NI32)(LOC2 - 2);
	res_316488 = 1;
	while (1) {
		tnode188803* branch;
		NI j_316411;
		NI HEX3Atmp_316482;
		NI LOC4;
		NI res_316484;
		if (!(res_316488 <= HEX3Atmp_316486)) goto LA3;
		i_316177 = res_316488;
		branch = (*n).kindU.S6.Sons->data[i_316177];
		j_316411 = 0;
		HEX3Atmp_316482 = 0;
		LOC4 = 0;
		LOC4 = len_189264(branch);
		HEX3Atmp_316482 = (NI32)(LOC4 - 2);
		res_316484 = 0;
		while (1) {
			if (!(res_316484 <= HEX3Atmp_316482)) goto LA5;
			j_316411 = res_316484;
			add_189390(s, (*branch).kindU.S6.Sons->data[j_316411]);
			res_316484 += 1;
		} LA5: ;
		res_316488 += 1;
	} LA3: ;
	result = newnodei_190803(((NU8) 27), (*n).Info, 3);
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(opcontains_312368));
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], s);
	asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], (*n).kindU.S6.Sons->data[0]);
	return result;
}

N_NIMCALL(void, addcasebranchfacts_316659)(tnodeseq188797** m, tnode188803* n, NI i) {
	tnode188803* branch;
	branch = (*n).kindU.S6.Sons->data[i];
	{
		tnode188803* LOC5;
		if (!((*branch).Kind == ((NU8) 85))) goto LA3;
		LOC5 = 0;
		LOC5 = buildof_316054(branch, (*n).kindU.S6.Sons->data[0]);
		(*m) = (tnodeseq188797*) incrSeq(&((*m))->Sup, sizeof(tnode188803*));
		asgnRefNoCycle((void**) &(*m)->data[(*m)->Sup.len-1], LOC5);
	}
	goto LA1;
	LA3: ;
	{
		tnode188803* LOC7;
		tnode188803* LOC8;
		LOC7 = 0;
		LOC7 = buildelse_316148(n);
		LOC8 = 0;
		LOC8 = neg_312448(LOC7);
		(*m) = (tnodeseq188797*) incrSeq(&((*m))->Sup, sizeof(tnode188803*));
		asgnRefNoCycle((void**) &(*m)->data[(*m)->Sup.len-1], LOC8);
	}
	LA1: ;
}

static N_INLINE(tnode188803*, lastson_189189)(tnode188803* n) {
	tnode188803* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_189181(n);
	result = (*n).kindU.S6.Sons->data[(NI32)(LOC1 - 1)];
	return result;
}

N_NIMCALL(tnode188803*, usefulfact_312888)(tnode188803* n) {
	tnode188803* result;
	NU16 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getmagic_221775(n);
	switch (LOC1) {
	case ((NU16) 72):
	case ((NU16) 75):
	case ((NU16) 78):
	case ((NU16) 85):
	case ((NU16) 88):
	case ((NU16) 91):
	case ((NU16) 94):
	case ((NU16) 100):
	case ((NU16) 95):
	case ((NU16) 136):
	case ((NU16) 139):
	case ((NU16) 98):
	{
		{
			NIM_BOOL LOC5;
			tnode188803* LOC6;
			NIM_BOOL LOC8;
			LOC5 = 0;
			LOC6 = 0;
			LOC6 = skipconv_197231((*n).kindU.S6.Sons->data[2]);
			LOC5 = ((*LOC6).Kind == ((NU8) 23));
			if (!(LOC5)) goto LA7;
			LOC8 = 0;
			LOC8 = isletlocation_312231((*n).kindU.S6.Sons->data[1], NIM_FALSE);
			if (LOC8) goto LA9;
			LOC8 = isvar_312137((*n).kindU.S6.Sons->data[1]);
			LA9: ;
			LOC5 = LOC8;
			LA7: ;
			if (!LOC5) goto LA10;
			result = buildisnil_312854((*n).kindU.S6.Sons->data[1]);
		}
		goto LA3;
		LA10: ;
		{
			{
				NIM_BOOL LOC15;
				LOC15 = 0;
				LOC15 = isletlocation_312231((*n).kindU.S6.Sons->data[1], NIM_TRUE);
				if (LOC15) goto LA16;
				LOC15 = isletlocation_312231((*n).kindU.S6.Sons->data[2], NIM_TRUE);
				LA16: ;
				if (!LOC15) goto LA17;
				result = n;
			}
			LA17: ;
		}
		LA3: ;
	}
	break;
	case ((NU16) 73) ... ((NU16) 74):
	case ((NU16) 76) ... ((NU16) 77):
	case ((NU16) 79) ... ((NU16) 84):
	case ((NU16) 86) ... ((NU16) 87):
	case ((NU16) 89) ... ((NU16) 90):
	case ((NU16) 92) ... ((NU16) 93):
	case ((NU16) 96) ... ((NU16) 97):
	case ((NU16) 137) ... ((NU16) 138):
	{
		{
			NIM_BOOL LOC22;
			LOC22 = 0;
			LOC22 = isletlocation_312231((*n).kindU.S6.Sons->data[1], NIM_TRUE);
			if (LOC22) goto LA23;
			LOC22 = isletlocation_312231((*n).kindU.S6.Sons->data[2], NIM_TRUE);
			LA23: ;
			if (!LOC22) goto LA24;
			result = n;
		}
		LA24: ;
	}
	break;
	case ((NU16) 168):
	{
		{
			NIM_BOOL LOC29;
			LOC29 = 0;
			LOC29 = isletlocation_312231((*n).kindU.S6.Sons->data[1], NIM_FALSE);
			if (LOC29) goto LA30;
			LOC29 = isvar_312137((*n).kindU.S6.Sons->data[1]);
			LA30: ;
			if (!LOC29) goto LA31;
			result = n;
		}
		LA31: ;
	}
	break;
	case ((NU16) 158):
	case ((NU16) 159):
	{
		{
			NIM_BOOL LOC36;
			LOC36 = 0;
			LOC36 = isletlocation_312231((*n).kindU.S6.Sons->data[1], NIM_TRUE);
			if (!LOC36) goto LA37;
			result = n;
		}
		LA37: ;
	}
	break;
	case ((NU16) 134):
	{
		tnode188803* a;
		tnode188803* b;
		a = usefulfact_312888((*n).kindU.S6.Sons->data[1]);
		b = usefulfact_312888((*n).kindU.S6.Sons->data[2]);
		{
			NIM_BOOL LOC42;
			LOC42 = 0;
			LOC42 = !((a == NIM_NIL));
			if (!(LOC42)) goto LA43;
			LOC42 = !((b == NIM_NIL));
			LA43: ;
			if (!LOC42) goto LA44;
			result = newnodei_190803(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(opand_312364));
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], a);
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], b);
		}
		goto LA40;
		LA44: ;
		{
			if (!!((a == NIM_NIL))) goto LA47;
			result = a;
		}
		goto LA40;
		LA47: ;
		{
			if (!!((b == NIM_NIL))) goto LA50;
			result = b;
		}
		goto LA40;
		LA50: ;
		LA40: ;
	}
	break;
	case ((NU16) 105):
	{
		tnode188803* a;
		a = usefulfact_312888((*n).kindU.S6.Sons->data[1]);
		{
			if (!!((a == NIM_NIL))) goto LA55;
			result = neg_312448(a);
		}
		LA55: ;
	}
	break;
	case ((NU16) 135):
	{
		tnode188803* a;
		tnode188803* LOC58;
		tnode188803* b;
		tnode188803* LOC59;
		LOC58 = 0;
		LOC58 = usefulfact_312888((*n).kindU.S6.Sons->data[1]);
		a = neg_312448(LOC58);
		LOC59 = 0;
		LOC59 = usefulfact_312888((*n).kindU.S6.Sons->data[2]);
		b = neg_312448(LOC59);
		{
			NIM_BOOL LOC62;
			LOC62 = 0;
			LOC62 = !((a == NIM_NIL));
			if (!(LOC62)) goto LA63;
			LOC62 = !((b == NIM_NIL));
			LA63: ;
			if (!LOC62) goto LA64;
			result = newnodei_190803(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[0], newsymnode_189095(opand_312364));
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[1], a);
			asgnRefNoCycle((void**) &(*result).kindU.S6.Sons->data[2], b);
			result = neg_312448(result);
		}
		LA64: ;
	}
	break;
	default:
	{
		{
			NIM_BOOL LOC69;
			LOC69 = 0;
			LOC69 = ((*n).Kind == ((NU8) 3));
			if (!(LOC69)) goto LA70;
			LOC69 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 9));
			LA70: ;
			if (!LOC69) goto LA71;
			{
				if (!!(((*(*n).kindU.S4.Sym).Ast == NIM_NIL))) goto LA75;
				result = usefulfact_312888((*(*n).kindU.S4.Sym).Ast);
			}
			LA75: ;
		}
		goto LA67;
		LA71: ;
		{
			tnode188803* LOC80;
			if (!((*n).Kind == ((NU8) 125))) goto LA78;
			LOC80 = 0;
			LOC80 = lastson_189189(n);
			result = usefulfact_312888(LOC80);
		}
		goto LA67;
		LA78: ;
		LA67: ;
	}
	break;
	}
	return result;
}

N_NIMCALL(void, addfact_313441)(tnodeseq188797** m, tnode188803* n_313445) {
	tnode188803* n;
	n = usefulfact_312888(n_313445);
	{
		if (!!((n == NIM_NIL))) goto LA3;
		(*m) = (tnodeseq188797*) incrSeq(&((*m))->Sup, sizeof(tnode188803*));
		asgnRefNoCycle((void**) &(*m)->data[(*m)->Sup.len-1], n);
	}
	LA3: ;
}

N_NIMCALL(void, addfactneg_313484)(tnodeseq188797** m, tnode188803* n_313488) {
	tnode188803* n;
	n = neg_312448(n_313488);
	{
		if (!!((n == NIM_NIL))) goto LA3;
		addfact_313441(m, n);
	}
	LA3: ;
}

N_NIMCALL(void, adddiscriminantfact_316494)(tnodeseq188797** m, tnode188803* n) {
	tnode188803* fact;
	fact = newnodei_190803(((NU8) 27), (*n).Info, 3);
	asgnRefNoCycle((void**) &(*fact).kindU.S6.Sons->data[0], newsymnode_189095(opeq_312369));
	asgnRefNoCycle((void**) &(*fact).kindU.S6.Sons->data[1], (*n).kindU.S6.Sons->data[0]);
	asgnRefNoCycle((void**) &(*fact).kindU.S6.Sons->data[2], (*n).kindU.S6.Sons->data[1]);
	(*m) = (tnodeseq188797*) incrSeq(&((*m))->Sup, sizeof(tnode188803*));
	asgnRefNoCycle((void**) &(*m)->data[(*m)->Sup.len-1], fact);
}
N_NOINLINE(void, guardsInit)(void) {
	asgnRefNoCycle((void**) &ople_312362, getmagicop_312355(((NimStringDesc*) &TMP881), ((NU16) 73)));
	asgnRefNoCycle((void**) &oplt_312363, getmagicop_312355(((NimStringDesc*) &TMP882), ((NU16) 74)));
	asgnRefNoCycle((void**) &opand_312364, getmagicop_312355(((NimStringDesc*) &TMP883), ((NU16) 134)));
	asgnRefNoCycle((void**) &opor_312365, getmagicop_312355(((NimStringDesc*) &TMP884), ((NU16) 135)));
	asgnRefNoCycle((void**) &opnot_312366, getmagicop_312355(((NimStringDesc*) &TMP885), ((NU16) 105)));
	asgnRefNoCycle((void**) &opisnil_312367, getmagicop_312355(((NimStringDesc*) &TMP886), ((NU16) 168)));
	asgnRefNoCycle((void**) &opcontains_312368, getmagicop_312355(((NimStringDesc*) &TMP887), ((NU16) 159)));
	asgnRefNoCycle((void**) &opeq_312369, getmagicop_312355(((NimStringDesc*) &TMP888), ((NU16) 72)));
}

N_NOINLINE(void, guardsDatInit)(void) {
}

