/* Generated by Nim Compiler v0.10.2 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>
typedef struct tsym226846 tsym226846;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tident201021 tident201021;
typedef struct tlineinfo196539 tlineinfo196539;
typedef struct tidobj201015 tidobj201015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq226848 ttypeseq226848;
typedef struct ttype226852 ttype226852;
typedef struct tscope226840 tscope226840;
typedef struct TY226947 TY226947;
typedef struct tinstantiation226836 tinstantiation226836;
typedef struct tstrtable226820 tstrtable226820;
typedef struct tsymseq226818 tsymseq226818;
typedef struct tnode226816 tnode226816;
typedef struct tloc226830 tloc226830;
typedef struct trope178009 trope178009;
typedef struct tlib226834 tlib226834;
typedef struct tcell44933 tcell44933;
typedef struct tcellseq44949 tcellseq44949;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44945 tcellset44945;
typedef struct tpagedesc44941 tpagedesc44941;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcstat47014 tgcstat47014;
typedef struct tnodeseq226810 tnodeseq226810;
typedef struct TY269081 TY269081;
typedef struct TY84745 TY84745;
typedef struct treplacements374438 treplacements374438;
typedef struct TY517908 TY517908;
typedef struct TY226936 TY226936;
typedef struct tlistentry127022 tlistentry127022;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlineinfo196539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tidobj201015  {
  TNimObject Sup;
NI Id;
};
struct  tstrtable226820  {
NI Counter;
tsymseq226818* Data;
};
struct  tloc226830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype226852* T;
trope178009* R;
trope178009* Heaproot;
};
struct  tsym226846  {
  tidobj201015 Sup;
NU8 Kind;
union {
struct {ttypeseq226848* Typeinstcache;
tscope226840* Typscope;
} S1;
struct {TY226947* Procinstcache;
tscope226840* Scope;
} S2;
struct {TY226947* Usedgenerics;
tstrtable226820 Tab;
} S3;
struct {tsym226846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype226852* Typ;
tident201021* Name;
tlineinfo196539 Info;
tsym226846* Owner;
NU32 Flags;
tnode226816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc226830 Loc;
tlib226834* Annex;
tnode226816* Constraint;
};
struct  tcell44933  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44949  {
NI Len;
NI Cap;
tcell44933** D;
};
struct  tcellset44945  {
NI Counter;
NI Max;
tpagedesc44941* Head;
tpagedesc44941** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44949 Zct;
tcellseq44949 Decstack;
tcellset44945 Cycleroots;
tcellseq44949 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  tnode226816  {
ttype226852* Typ;
tlineinfo196539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym226846* Sym;
} S4;
struct {tident201021* Ident;
} S5;
struct {tnodeseq226810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  tident201021  {
  tidobj201015 Sup;
NimStringDesc* S;
tident201021* Next;
NI H;
};
struct TY269081 {
NI Field0;
NI Field1;
};
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
struct  ttype226852  {
  tidobj201015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq226848* Sons;
tnode226816* N;
tsym226846* Owner;
tsym226846* Sym;
tsym226846* Destructor;
tsym226846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc226830 Loc;
};
struct TY517908 {
tnode226816* Field0;
tnode226816* Field1;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef NU8 TY533622[33];
struct  tscope226840  {
NI Depthlevel;
tstrtable226820 Symbols;
tnodeseq226810* Usingsyms;
tscope226840* Parent;
};
struct  tinstantiation226836  {
tsym226846* Sym;
ttypeseq226848* Concretetypes;
TY226936* Usedby;
};
struct  trope178009  {
  TNimObject Sup;
trope178009* Left;
trope178009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  tlib226834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope178009* Name;
tnode226816* Path;
};
typedef NI TY26420[16];
struct  tpagedesc44941  {
tpagedesc44941* Next;
NI Key;
TY26420 Bits;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct ttypeseq226848 {
  TGenericSeq Sup;
  ttype226852* data[SEQ_DECL_SIZE];
};
struct TY226947 {
  TGenericSeq Sup;
  tinstantiation226836* data[SEQ_DECL_SIZE];
};
struct tsymseq226818 {
  TGenericSeq Sup;
  tsym226846* data[SEQ_DECL_SIZE];
};
struct tnodeseq226810 {
  TGenericSeq Sup;
  tnode226816* data[SEQ_DECL_SIZE];
};
struct treplacements374438 {
  TGenericSeq Sup;
  TY517908 data[SEQ_DECL_SIZE];
};
struct TY226936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(tsym226846*, createmagic_369405)(NimStringDesc* name, NU16 m);
N_NIMCALL(tsym226846*, newsym_227074)(NU8 symkind, tident201021* name, tsym226846* owner, tlineinfo196539 info);
N_NIMCALL(tident201021*, getident_201472)(NimStringDesc* identifier);
N_NIMCALL(tlineinfo196539, unknownlineinfo_197405)(void);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell44933*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44933* c);
N_NOINLINE(void, addzct_48617)(tcellseq44949* s, tcell44933* c);
N_NIMCALL(NU8, doesimply_373871)(tnodeseq226810* facts, tnode226816* prop);
N_NIMCALL(NU8, factimplies_373643)(tnode226816* fact, tnode226816* prop);
N_NIMCALL(NU16, getmagic_262845)(tnode226816* op);
N_NIMCALL(NU8, HEX7E_373633)(NU8 x);
N_NIMCALL(void, internalerror_198987)(tlineinfo196539 info, NimStringDesc* errmsg);
N_NIMCALL(NU8, impliesisnil_372845)(tnode226816* fact, tnode226816* eq);
N_NIMCALL(NIM_BOOL, sametree_371425)(tnode226816* a, tnode226816* b);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NI, sonslen_227249)(tnode226816* n);
N_NIMCALL(NU8, valueisnil_372812)(tnode226816* n);
N_NIMCALL(tnode226816*, skipconv_274732)(tnode226816* n);
N_NIMCALL(NU8, implieseq_371905)(tnode226816* fact, tnode226816* eq);
N_NIMCALL(NIM_BOOL, islocation_369070)(tnode226816* n);
N_NIMCALL(NIM_BOOL, isvalue_369046)(tnode226816* n);
N_NIMCALL(NIM_BOOL, valuesunequal_371828)(tnode226816* a, tnode226816* b);
N_NIMCALL(NIM_BOOL, samevalue_236350)(tnode226816* a, tnode226816* b);
N_NIMCALL(NIM_BOOL, inset_285019)(tnode226816* s, tnode226816* elem);
N_NIMCALL(NU8, impliesle_373295)(tnode226816* fact, tnode226816* x, tnode226816* c);
N_NIMCALL(NU8, impliesge_372996)(tnode226816* fact, tnode226816* x, tnode226816* c);
N_NIMCALL(void, internalerror_199006)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_199126)(TY84745 x_199130);
N_NIMCALL(NIM_BOOL, levalue_236487)(tnode226816* a, tnode226816* b);
N_NIMCALL(tnode226816*, pred_371839)(tnode226816* n);
N_NIMCALL(tnode226816*, copynode_227323)(tnode226816* src);
N_NIMCALL(NU8, implieslt_373587)(tnode226816* fact, tnode226816* x, tnode226816* c);
N_NIMCALL(NU8, impliesin_372520)(tnode226816* fact, tnode226816* loc, tnode226816* aset);
N_NIMCALL(NU8, comparesets_372509)(tnode226816* a, tnode226816* b);
N_NIMCALL(NIM_BOOL, equalsets_285082)(tnode226816* a, tnode226816* b);
static N_INLINE(NI, len_227364)(tnode226816* n);
N_NIMCALL(tnode226816*, intersectsets_285061)(tnode226816* a, tnode226816* b);
N_NIMCALL(NU8, leimpliesin_372200)(tnode226816* x, tnode226816* c, tnode226816* aset);
N_NIMCALL(tnode226816*, newintnode_227096)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, firstord_264004)(ttype226852* t);
N_NIMCALL(NU8, geimpliesin_372361)(tnode226816* x, tnode226816* c, tnode226816* aset);
N_NIMCALL(NI64, lastord_264010)(ttype226852* t);
N_NIMCALL(tnode226816*, neg_369516)(tnode226816* n);
N_NIMCALL(tnode226816*, swapargs_369435)(tnode226816* fact, tsym226846* newop);
N_NIMCALL(tnode226816*, newnodei_229007)(NU8 kind, tlineinfo196539 info, NI children);
N_NIMCALL(tnode226816*, newsymnode_227132)(tsym226846* sym);
N_NIMCALL(ttype226852*, skiptypes_231245)(ttype226852* t, NU64 kinds);
N_NIMCALL(tnode226816*, newnodeit_227145)(NU8 kind, tlineinfo196539 info, ttype226852* typ);
N_NIMCALL(void, add_227498)(tnode226816* father, tnode226816* son);
N_NIMCALL(NI64, lengthord_264016)(ttype226852* t);
N_NIMCALL(tnode226816*, complement_285965)(tnode226816* a);
N_NIMCALL(tnode226816*, buildcall_369940)(tsym226846* op, tnode226816* a);
N_NIMCALL(tnode226816*, buildproperfieldcheck_375841)(tnode226816* access, tnode226816* check);
N_NIMCALL(tnode226816*, copytree_227329)(tnode226816* src);
N_NIMCALL(void, message_198976)(tlineinfo196539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, rendertree_251058)(tnode226816* n, NU8 renderflags);
N_NIMCALL(NIM_BOOL, hassubtree_371723)(tnode226816* n, tnode226816* x);
static N_INLINE(NI, safelen_227424)(tnode226816* n);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NIM_BOOL, isletlocation_369271)(tnode226816* m, NIM_BOOL isapprox);
N_NIMCALL(NIM_BOOL, isconstexpr_262921)(tnode226816* n);
N_NIMCALL(NIM_BOOL, islet_369080)(tnode226816* n);
N_NIMCALL(NIM_BOOL, isvar_369173)(tnode226816* n);
N_NIMCALL(tnode226816*, buildof_375058)(tnode226816* it, tnode226816* loc);
N_NIMCALL(ttype226852*, settype_375048)(tnode226816* n);
N_NIMCALL(ttype226852*, newtype_227083)(NU8 kind, tsym226846* owner);
N_NIMCALL(void, addsonskipintlit_283572)(ttype226852* father, ttype226852* son);
N_NIMCALL(tnode226816*, buildelse_375166)(tnode226816* n);
N_NIMCALL(tnode226816*, usefulfact_370790)(tnode226816* n);
static N_INLINE(tnode226816*, lastson_227261)(tnode226816* n);
N_NIMCALL(void, addfact_371349)(tnodeseq226810** m, tnode226816* n_371353);
N_NIMCALL(tnode226816*, shallowcopy_232347)(tnode226816* src);
N_NIMCALL(tnode226816*, canon_370513)(tnode226816* n);
N_NIMCALL(tnode226816*, buildcall_369979)(tsym226846* op, tnode226816* a, tnode226816* b);
static N_INLINE(tnode226816*, HEX5BHEX5D_227698)(tnode226816* n, NI i);
N_NIMCALL(tnode226816*, minusone_370439)(void);
N_NIMCALL(tnode226816*, negate_370251)(tnode226816* a, tnode226816* b_370254, tnode226816* res);
N_NIMCALL(NI64, HEX7CHEX2BHEX7C_304019)(NI64 a, NI64 b);
N_NIMCALL(tnode226816*, reassociation_370477)(tnode226816* n);
N_NIMCALL(tnode226816*, HEX7CHEX2BHEX7C_370033)(tnode226816* a, tnode226816* b);
N_NIMCALL(tnode226816*, HEX7CHEX2AHEX7C_370142)(tnode226816* a, tnode226816* b);
N_NIMCALL(NI64, HEX7CHEX2AHEX7C_304078)(NI64 a, NI64 b);
N_NIMCALL(NU8, ple_374126)(tnodeseq226810* m, tnode226816* a, tnode226816* b);
N_NIMCALL(NIM_BOOL, isordinaltype_264092)(ttype226852* t);
N_NIMCALL(tnode226816*, zero_370421)(void);
N_NIMCALL(tnode226816*, one_370430)(void);
N_NIMCALL(NU8, pleviamodel_374118)(tnodeseq226810* model, tnode226816* aa, tnode226816* bb);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP3873)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(tnode226816*, applyreplacements_374512)(tnode226816* n, treplacements374438* rep);
N_NIMCALL(tnode226816*, replacesubtree_374445)(tnode226816* n, tnode226816* x, tnode226816* by);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_79604, TNimType* mt);
N_NIMCALL(NU8, pleviamodelrec_374633)(tnodeseq226810** m, tnode226816* a, tnode226816* b);
STRING_LITERAL(TMP901, "<=", 2);
STRING_LITERAL(TMP902, "<", 1);
STRING_LITERAL(TMP903, "and", 3);
STRING_LITERAL(TMP904, "or", 2);
STRING_LITERAL(TMP905, "not", 3);
STRING_LITERAL(TMP906, "isnil", 5);
STRING_LITERAL(TMP907, "contains", 8);
STRING_LITERAL(TMP908, "==", 2);
STRING_LITERAL(TMP909, "+", 1);
STRING_LITERAL(TMP910, "-", 1);
STRING_LITERAL(TMP911, "*", 1);
STRING_LITERAL(TMP912, "div", 3);
STRING_LITERAL(TMP913, "len", 3);
STRING_LITERAL(TMP3207, "invalid fact", 12);
STRING_LITERAL(TMP3208, "impliesIsNil", 12);
NIM_CONST TY269081 TMP3209 = {1,
2}
;
NIM_CONST TY269081 TMP3210 = {2,
1}
;
STRING_LITERAL(TMP3211, "impliesEq", 9);
STRING_LITERAL(TMP3213, "compiler/guards.nim", 19);
NIM_CONST TY84745 TMP3212 = {((NimStringDesc*) &TMP3213),
520}
;
STRING_LITERAL(TMP3214, "impliesGe", 9);
STRING_LITERAL(TMP3215, "impliesLe", 9);
STRING_LITERAL(TMP3216, "impliesIn", 9);
STRING_LITERAL(TMP3217, "invalid proposition", 19);
static NIM_CONST TY533622 TMP3874 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x49, 0x20, 0xC9, 0x14, 0x00, 0x00, 0x00,
0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00}
;
static NIM_CONST TY533622 TMP3875 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x92, 0x4A, 0x12, 0x01, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00}
;
tsym226846* ople_369416;
extern tgcheap47016 gch_47044;
tsym226846* oplt_369417;
tsym226846* opand_369418;
tsym226846* opor_369419;
tsym226846* opnot_369420;
tsym226846* opisnil_369421;
tsym226846* opcontains_369422;
tsym226846* opeq_369423;
tsym226846* opadd_369424;
tsym226846* opsub_369425;
tsym226846* opmul_369426;
tsym226846* opdiv_369427;
tsym226846* oplen_369428;
extern TNimType NTI517908; /* tuple[outer: PNode, inner: PNode] */
TNimType NTI374438; /* TReplacements */
extern TNimType NTI226810; /* TNodeSeq */

N_NIMCALL(tsym226846*, createmagic_369405)(NimStringDesc* name, NU16 m) {
	tsym226846* result;
	tident201021* LOC1;
	tlineinfo196539 LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_201472(name);
	LOC2 = unknownlineinfo_197405();
	result = newsym_227074(((NU8) 12), LOC1, NIM_NIL, LOC2);
	(*result).Magic = m;
	return result;
}

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

static N_INLINE(void, rtladdzct_50204)(tcell44933* c) {
	addzct_48617((&gch_47044.Zct), c);
}

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

N_NIMCALL(NU8, HEX7E_373633)(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_227249)(tnode226816* 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_371425)(tnode226816* a, tnode226816* 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;
				LOC22 = 0;
				LOC22 = sonslen_227249(a);
				LOC23 = 0;
				LOC23 = sonslen_227249(b);
				if (!(LOC22 == LOC23)) goto LA24;
				{
					NI i_371673;
					NI HEX3Atmp_371703;
					NI LOC27;
					NI res_371706;
					i_371673 = 0;
					HEX3Atmp_371703 = 0;
					LOC27 = 0;
					LOC27 = sonslen_227249(a);
					HEX3Atmp_371703 = (NI32)(LOC27 - 1);
					res_371706 = 0;
					{
						while (1) {
							if (!(res_371706 <= HEX3Atmp_371703)) goto LA29;
							i_371673 = res_371706;
							{
								NIM_BOOL LOC32;
								LOC32 = 0;
								LOC32 = sametree_371425((*a).kindU.S6.Sons->data[i_371673], (*b).kindU.S6.Sons->data[i_371673]);
								if (!!(LOC32)) goto LA33;
								goto BeforeRet;
							}
							LA33: ;
							res_371706 += 1;
						} LA29: ;
					}
				}
				result = NIM_TRUE;
			}
			LA24: ;
		}
		break;
		}
	}
	goto LA1;
	LA10: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, valueisnil_372812)(tnode226816* 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_372845)(tnode226816* fact, tnode226816* 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_371425((*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;
			tnode226816* LOC13;
			LOC10 = 0;
			LOC10 = sametree_371425((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[1]);
			if (!LOC10) goto LA11;
			LOC13 = 0;
			LOC13 = skipconv_274732((*fact).kindU.S6.Sons->data[2]);
			result = valueisnil_372812(LOC13);
		}
		goto LA8;
		LA11: ;
		{
			NIM_BOOL LOC15;
			tnode226816* LOC18;
			LOC15 = 0;
			LOC15 = sametree_371425((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[1]);
			if (!LOC15) goto LA16;
			LOC18 = 0;
			LOC18 = skipconv_274732((*fact).kindU.S6.Sons->data[1]);
			result = valueisnil_372812(LOC18);
		}
		goto LA8;
		LA16: ;
		LA8: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_198987((*eq).Info, ((NimStringDesc*) &TMP3208));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

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

N_NIMCALL(NIM_BOOL, islocation_369070)(tnode226816* n) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = isvalue_369046(n);
	result = !(LOC1);
	return result;
}

N_NIMCALL(NIM_BOOL, valuesunequal_371828)(tnode226816* a, tnode226816* b) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC7;
		LOC3 = 0;
		LOC3 = isvalue_369046(a);
		if (!(LOC3)) goto LA4;
		LOC3 = isvalue_369046(b);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = samevalue_236350(a, b);
		result = !(LOC7);
	}
	LA5: ;
	return result;
}

N_NIMCALL(NU8, implieseq_371905)(tnode226816* fact, tnode226816* eq) {
	NU8 result;
	TY269081 LOC1;
	NI loc;
	NI val;
	result = 0;
	{
		NIM_BOOL LOC4;
		LOC4 = 0;
		LOC4 = islocation_369070((*eq).kindU.S6.Sons->data[1]);
		if (!LOC4) goto LA5;
		LOC1 = TMP3209;
	}
	goto LA2;
	LA5: ;
	{
		LOC1 = TMP3210;
	}
	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_371425((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[loc]);
			if (!LOC11) goto LA12;
			{
				NIM_BOOL LOC16;
				LOC16 = 0;
				LOC16 = sametree_371425((*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_371828((*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_371425((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[loc]);
			if (!LOC24) goto LA25;
			{
				NIM_BOOL LOC29;
				LOC29 = 0;
				LOC29 = sametree_371425((*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_371828((*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_371425((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[loc]);
			if (!(LOC39)) goto LA40;
			LOC39 = isvalue_369046((*eq).kindU.S6.Sons->data[val]);
			LA40: ;
			if (!LOC39) goto LA41;
			{
				NIM_BOOL LOC45;
				LOC45 = 0;
				LOC45 = inset_285019((*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_198987((*eq).Info, ((NimStringDesc*) &TMP3211));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode226816*, pred_371839)(tnode226816* n) {
	tnode226816* 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_227323(n);
		(*result).kindU.S1.Intval -= 1;
	}
	goto LA1;
	LA5: ;
	{
		result = n;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, impliesge_372996)(tnode226816* fact, tnode226816* x, tnode226816* c) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = islocation_369070(x);
		if (!!(LOC3)) goto LA4;
		LOC6 = 0;
		LOC6 = HEX24_199126(TMP3212);
		internalerror_199006(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_371425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC10) goto LA11;
			{
				NIM_BOOL LOC15;
				LOC15 = 0;
				LOC15 = isvalue_369046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC15)) goto LA16;
				LOC15 = isvalue_369046(c);
				LA16: ;
				if (!LOC15) goto LA17;
				{
					NIM_BOOL LOC21;
					LOC21 = 0;
					LOC21 = levalue_236487(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_371425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC26) goto LA27;
			{
				NIM_BOOL LOC31;
				LOC31 = 0;
				LOC31 = isvalue_369046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC31)) goto LA32;
				LOC31 = isvalue_369046(c);
				LA32: ;
				if (!LOC31) goto LA33;
				{
					NIM_BOOL LOC37;
					LOC37 = 0;
					LOC37 = levalue_236487(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_371425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC44) goto LA45;
			{
				NIM_BOOL LOC49;
				LOC49 = 0;
				LOC49 = isvalue_369046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC49)) goto LA50;
				LOC49 = isvalue_369046(c);
				LA50: ;
				if (!LOC49) goto LA51;
				{
					NIM_BOOL LOC55;
					LOC55 = 0;
					LOC55 = levalue_236487((*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_371425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC59) goto LA60;
			{
				NIM_BOOL LOC64;
				LOC64 = 0;
				LOC64 = isvalue_369046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC64)) goto LA65;
				LOC64 = isvalue_369046(c);
				LA65: ;
				if (!LOC64) goto LA66;
				{
					tnode226816* LOC70;
					NIM_BOOL LOC71;
					LOC70 = 0;
					LOC70 = pred_371839(c);
					LOC71 = 0;
					LOC71 = levalue_236487(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_371425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC77) goto LA78;
			{
				NIM_BOOL LOC82;
				LOC82 = 0;
				LOC82 = isvalue_369046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC82)) goto LA83;
				LOC82 = isvalue_369046(c);
				LA83: ;
				if (!LOC82) goto LA84;
				{
					NIM_BOOL LOC88;
					LOC88 = 0;
					LOC88 = levalue_236487((*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_371425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC92) goto LA93;
			{
				NIM_BOOL LOC97;
				LOC97 = 0;
				LOC97 = isvalue_369046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC97)) goto LA98;
				LOC97 = isvalue_369046(c);
				LA98: ;
				if (!LOC97) goto LA99;
				{
					NIM_BOOL LOC103;
					LOC103 = 0;
					LOC103 = levalue_236487(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_198987((*x).Info, ((NimStringDesc*) &TMP3214));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, impliesle_373295)(tnode226816* fact, tnode226816* x, tnode226816* c) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = islocation_369070(x);
		if (!!(LOC3)) goto LA4;
		result = impliesge_372996(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_371425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC9) goto LA10;
			{
				NIM_BOOL LOC14;
				LOC14 = 0;
				LOC14 = isvalue_369046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC14)) goto LA15;
				LOC14 = isvalue_369046(c);
				LA15: ;
				if (!LOC14) goto LA16;
				{
					NIM_BOOL LOC20;
					LOC20 = 0;
					LOC20 = levalue_236487((*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_371425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC25) goto LA26;
			{
				NIM_BOOL LOC30;
				LOC30 = 0;
				LOC30 = isvalue_369046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC30)) goto LA31;
				LOC30 = isvalue_369046(c);
				LA31: ;
				if (!LOC30) goto LA32;
				{
					NIM_BOOL LOC36;
					LOC36 = 0;
					LOC36 = levalue_236487((*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_371425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC43) goto LA44;
			{
				NIM_BOOL LOC48;
				LOC48 = 0;
				LOC48 = isvalue_369046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC48)) goto LA49;
				LOC48 = isvalue_369046(c);
				LA49: ;
				if (!LOC48) goto LA50;
				{
					tnode226816* LOC54;
					NIM_BOOL LOC55;
					LOC54 = 0;
					LOC54 = pred_371839(c);
					LOC55 = 0;
					LOC55 = levalue_236487((*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_371425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC59) goto LA60;
			{
				NIM_BOOL LOC64;
				LOC64 = 0;
				LOC64 = isvalue_369046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC64)) goto LA65;
				LOC64 = isvalue_369046(c);
				LA65: ;
				if (!LOC64) goto LA66;
				{
					NIM_BOOL LOC70;
					LOC70 = 0;
					LOC70 = levalue_236487(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_371425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC76) goto LA77;
			{
				NIM_BOOL LOC81;
				LOC81 = 0;
				LOC81 = isvalue_369046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC81)) goto LA82;
				LOC81 = isvalue_369046(c);
				LA82: ;
				if (!LOC81) goto LA83;
				{
					NIM_BOOL LOC87;
					LOC87 = 0;
					LOC87 = levalue_236487((*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_371425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC91) goto LA92;
			{
				NIM_BOOL LOC96;
				LOC96 = 0;
				LOC96 = isvalue_369046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC96)) goto LA97;
				LOC96 = isvalue_369046(c);
				LA97: ;
				if (!LOC96) goto LA98;
				{
					tnode226816* LOC102;
					NIM_BOOL LOC103;
					LOC102 = 0;
					LOC102 = pred_371839((*fact).kindU.S6.Sons->data[1]);
					LOC103 = 0;
					LOC103 = levalue_236487(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_198987((*x).Info, ((NimStringDesc*) &TMP3215));
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, implieslt_373587)(tnode226816* fact, tnode226816* x, tnode226816* c) {
	NU8 result;
	tnode226816* p;
	result = 0;
	p = pred_371839(c);
	{
		if (!!((p == c))) goto LA3;
		result = impliesle_373295(fact, x, p);
	}
	goto LA1;
	LA3: ;
	{
		tnode226816* q;
		q = pred_371839(x);
		{
			if (!!((q == x))) goto LA8;
			result = impliesle_373295(fact, q, c);
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, len_227364)(tnode226816* 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_372509)(tnode226816* a, tnode226816* b) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = equalsets_285082(a, b);
		if (!LOC3) goto LA4;
		result = ((NU8) 2);
	}
	goto LA1;
	LA4: ;
	{
		tnode226816* LOC7;
		NI LOC8;
		LOC7 = 0;
		LOC7 = intersectsets_285061(a, b);
		LOC8 = 0;
		LOC8 = len_227364(LOC7);
		if (!(LOC8 == 0)) goto LA9;
		result = ((NU8) 1);
	}
	goto LA1;
	LA9: ;
	LA1: ;
	return result;
}

N_NIMCALL(NU8, leimpliesin_372200)(tnode226816* x, tnode226816* c, tnode226816* aset) {
	NU8 result;
	result = 0;
	{
		tnode226816* value;
		NI64 LOC5;
		if (!((*c).Kind >= ((NU8) 5) && (*c).Kind <= ((NU8) 15))) goto LA3;
		LOC5 = 0;
		LOC5 = firstord_264004((*x).Typ);
		value = newintnode_227096((*c).Kind, LOC5);
		{
			NI i;
			NI pos;
			NI neg;
			if (!((NI64)((*c).kindU.S1.Intval - (*value).kindU.S1.Intval) < IL64(1000))) goto LA8;
			i = 0;
			pos = 0;
			neg = 0;
			{
				while (1) {
					if (!((*value).kindU.S1.Intval <= (*c).kindU.S1.Intval)) goto LA11;
					{
						NIM_BOOL LOC14;
						LOC14 = 0;
						LOC14 = inset_285019(aset, value);
						if (!LOC14) goto LA15;
						pos += 1;
					}
					goto LA12;
					LA15: ;
					{
						neg += 1;
					}
					LA12: ;
					i += 1;
					(*value).kindU.S1.Intval += 1;
				} LA11: ;
			}
			{
				if (!(pos == i)) goto LA20;
				result = ((NU8) 2);
			}
			goto LA18;
			LA20: ;
			{
				if (!(neg == i)) goto LA23;
				result = ((NU8) 1);
			}
			goto LA18;
			LA23: ;
			LA18: ;
		}
		LA8: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NU8, geimpliesin_372361)(tnode226816* x, tnode226816* c, tnode226816* aset) {
	NU8 result;
	result = 0;
	{
		tnode226816* value;
		NI64 max;
		if (!((*c).Kind >= ((NU8) 5) && (*c).Kind <= ((NU8) 15))) goto LA3;
		value = newintnode_227096((*c).Kind, (*c).kindU.S1.Intval);
		max = lastord_264010((*x).Typ);
		{
			NI i;
			NI pos;
			NI neg;
			if (!((NI64)(max - (*value).kindU.S1.Intval) < IL64(1000))) goto LA7;
			i = 0;
			pos = 0;
			neg = 0;
			{
				while (1) {
					if (!((*value).kindU.S1.Intval <= max)) goto LA10;
					{
						NIM_BOOL LOC13;
						LOC13 = 0;
						LOC13 = inset_285019(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: ;
		}
		LA7: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NU8, impliesin_372520)(tnode226816* fact, tnode226816* loc, tnode226816* 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_371425((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC4) goto LA5;
			{
				NIM_BOOL LOC9;
				LOC9 = 0;
				LOC9 = inset_285019(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_371425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC14) goto LA15;
			{
				NIM_BOOL LOC19;
				LOC19 = 0;
				LOC19 = inset_285019(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_371425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC26) goto LA27;
			result = comparesets_372509((*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_371425((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC32) goto LA33;
			result = leimpliesin_372200((*fact).kindU.S6.Sons->data[1], (*fact).kindU.S6.Sons->data[2], aset);
		}
		goto LA30;
		LA33: ;
		{
			NIM_BOOL LOC36;
			LOC36 = 0;
			LOC36 = sametree_371425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC36) goto LA37;
			result = geimpliesin_372361((*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;
			tnode226816* LOC45;
			LOC42 = 0;
			LOC42 = sametree_371425((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC42) goto LA43;
			LOC45 = 0;
			LOC45 = pred_371839((*fact).kindU.S6.Sons->data[2]);
			result = leimpliesin_372200((*fact).kindU.S6.Sons->data[1], LOC45, aset);
		}
		goto LA40;
		LA43: ;
		{
			NIM_BOOL LOC47;
			tnode226816* LOC50;
			LOC47 = 0;
			LOC47 = sametree_371425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC47) goto LA48;
			LOC50 = 0;
			LOC50 = pred_371839((*fact).kindU.S6.Sons->data[1]);
			result = geimpliesin_372361((*fact).kindU.S6.Sons->data[2], LOC50, aset);
		}
		goto LA40;
		LA48: ;
		LA40: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_198987((*loc).Info, ((NimStringDesc*) &TMP3216));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, factimplies_373643)(tnode226816* fact, tnode226816* prop) {
	NU8 result;
	NU16 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getmagic_262845(fact);
	switch (LOC1) {
	case ((NU16) 105):
	{
		tnode226816* arg;
		NU16 LOC3;
		arg = (*fact).kindU.S6.Sons->data[1];
		LOC3 = 0;
		LOC3 = getmagic_262845(arg);
		switch (LOC3) {
		case ((NU16) 168):
		case ((NU16) 94):
		{
			NU8 LOC5;
			LOC5 = 0;
			LOC5 = factimplies_373643(arg, prop);
			result = HEX7E_373633(LOC5);
			goto BeforeRet;
		}
		break;
		case ((NU16) 134):
		{
			NU8 a;
			NU8 b;
			a = factimplies_373643((*arg).kindU.S6.Sons->data[1], prop);
			b = factimplies_373643((*arg).kindU.S6.Sons->data[2], prop);
			{
				if (!(a == b)) goto LA9;
				result = HEX7E_373633(a);
				goto BeforeRet;
			}
			LA9: ;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		break;
		default:
		{
			internalerror_198987((*fact).Info, ((NimStringDesc*) &TMP3207));
		}
		break;
		}
	}
	break;
	case ((NU16) 134):
	{
		result = factimplies_373643((*fact).kindU.S6.Sons->data[1], prop);
		{
			if (!!((result == ((NU8) 0)))) goto LA15;
			goto BeforeRet;
		}
		LA15: ;
		result = factimplies_373643((*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_373643(fact, (*prop).kindU.S6.Sons->data[1]);
		result = HEX7E_373633(LOC19);
	}
	break;
	case ((NU16) 168):
	{
		result = impliesisnil_372845(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_371905(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_373295(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_373587(fact, (*prop).kindU.S6.Sons->data[1], (*prop).kindU.S6.Sons->data[2]);
	}
	break;
	case ((NU16) 159):
	{
		result = impliesin_372520(fact, (*prop).kindU.S6.Sons->data[2], (*prop).kindU.S6.Sons->data[1]);
	}
	break;
	default:
	{
		internalerror_198987((*prop).Info, ((NimStringDesc*) &TMP3217));
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, doesimply_373871)(tnodeseq226810* facts, tnode226816* prop) {
	NU8 result;
	result = 0;
	{
		tnode226816* f_374013;
		NI i_374037;
		NI l_374039;
		f_374013 = 0;
		i_374037 = 0;
		l_374039 = facts->Sup.len;
		{
			while (1) {
				if (!(i_374037 < l_374039)) goto LA3;
				f_374013 = facts->data[i_374037];
				{
					if (!!(f_374013 == 0)) goto LA6;
					result = factimplies_373643(f_374013, prop);
					{
						if (!!((result == ((NU8) 0)))) goto LA10;
						goto BeforeRet;
					}
					LA10: ;
				}
				LA6: ;
				i_374037 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, swapargs_369435)(tnode226816* fact, tsym226846* newop) {
	tnode226816* result;
	result = 0;
	result = newnodei_229007(((NU8) 27), (*fact).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(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(tnode226816*, neg_369516)(tnode226816* n) {
	tnode226816* result;
	NU16 LOC5;
	result = 0;
	{
		if (!(n == NIM_NIL)) goto LA3;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = getmagic_262845(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_369435(n, ople_369416);
	}
	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_369435(n, oplt_369417);
	}
	break;
	case ((NU16) 159):
	{
		ttype226852* t;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 39)))) goto LA12;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA12: ;
		t = skiptypes_231245((*(*n).kindU.S6.Sons->data[2]).Typ, IL64(211106232576256));
		result = newnodei_229007(((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]);
		{
			tnode226816* s;
			if (!((*t).Kind == ((NU8) 14))) goto LA16;
			s = newnodeit_227145(((NU8) 39), (*n).Info, (*(*n).kindU.S6.Sons->data[1]).Typ);
			{
				tnode226816* e_369669;
				tnode226816* HEX3Atmp_369913;
				e_369669 = 0;
				HEX3Atmp_369913 = 0;
				HEX3Atmp_369913 = (*t).N;
				{
					NI i_369917;
					NI HEX3Atmp_369919;
					NI LOC20;
					NI res_369921;
					i_369917 = 0;
					HEX3Atmp_369919 = 0;
					LOC20 = 0;
					LOC20 = len_227364(HEX3Atmp_369913);
					HEX3Atmp_369919 = (LOC20 - 1);
					res_369921 = 0;
					{
						while (1) {
							tnode226816* easnode;
							if (!(res_369921 <= HEX3Atmp_369919)) goto LA22;
							i_369917 = res_369921;
							e_369669 = (*HEX3Atmp_369913).kindU.S6.Sons->data[i_369917];
							easnode = newintnode_227096(((NU8) 6), ((NI64) ((*(*e_369669).kindU.S4.Sym).Position)));
							{
								NIM_BOOL LOC25;
								LOC25 = 0;
								LOC25 = inset_285019((*n).kindU.S6.Sons->data[1], easnode);
								if (!!(LOC25)) goto LA26;
								add_227498(s, easnode);
							}
							LA26: ;
							res_369921 += 1;
						} LA22: ;
					}
				}
			}
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), s);
		}
		goto LA14;
		LA16: ;
		{
			NI64 LOC29;
			LOC29 = 0;
			LOC29 = lengthord_264016(t);
			if (!(LOC29 < IL64(1000))) goto LA30;
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), complement_285965((*n).kindU.S6.Sons->data[1]));
		}
		goto LA14;
		LA30: ;
		{
			result = NIM_NIL;
		}
		LA14: ;
	}
	break;
	case ((NU16) 135):
	{
		tnode226816* a;
		tnode226816* b;
		a = neg_369516((*n).kindU.S6.Sons->data[1]);
		b = neg_369516((*n).kindU.S6.Sons->data[2]);
		{
			NIM_BOOL LOC36;
			LOC36 = 0;
			LOC36 = !((a == NIM_NIL));
			if (!(LOC36)) goto LA37;
			LOC36 = !((b == NIM_NIL));
			LA37: ;
			if (!LOC36) goto LA38;
			result = newnodei_229007(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(opand_369418));
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), a);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), b);
		}
		goto LA34;
		LA38: ;
		{
			if (!!((a == NIM_NIL))) goto LA41;
			result = a;
		}
		goto LA34;
		LA41: ;
		{
			if (!!((b == NIM_NIL))) goto LA44;
			result = b;
		}
		goto LA34;
		LA44: ;
		LA34: ;
	}
	break;
	default:
	{
		result = newnodei_229007(((NU8) 27), (*n).Info, 2);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(opnot_369420));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), n);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, buildcall_369940)(tsym226846* op, tnode226816* a) {
	tnode226816* result;
	result = 0;
	result = newnodei_229007(((NU8) 27), (*a).Info, 2);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(op));
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), a);
	return result;
}

N_NIMCALL(NU8, impliesnotnil_374055)(tnodeseq226810* facts, tnode226816* arg) {
	NU8 result;
	tnode226816* LOC1;
	tnode226816* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = buildcall_369940(opisnil_369421, arg);
	LOC2 = 0;
	LOC2 = neg_369516(LOC1);
	result = doesimply_373871(facts, LOC2);
	return result;
}

N_NIMCALL(tnode226816*, buildproperfieldcheck_375841)(tnode226816* access, tnode226816* check) {
	tnode226816* result;
	result = 0;
	{
		if (!((*(*check).kindU.S6.Sons->data[1]).Kind == ((NU8) 39))) goto LA3;
		result = copytree_227329(check);
		{
			tnode226816* a;
			if (!((*access).Kind == ((NU8) 45))) goto LA7;
			a = copytree_227329(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: ;
	{
		tnode226816* LOC10;
		LOC10 = 0;
		LOC10 = buildproperfieldcheck_375841(access, (*check).kindU.S6.Sons->data[1]);
		result = neg_369516(LOC10);
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, checkfieldaccess_376021)(tnodeseq226810* m, tnode226816* n) {
	{
		NI i_376035;
		NI HEX3Atmp_376089;
		NI LOC2;
		NI res_376092;
		i_376035 = 0;
		HEX3Atmp_376089 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_376089 = (NI32)(LOC2 - 1);
		res_376092 = 1;
		{
			while (1) {
				tnode226816* check;
				if (!(res_376092 <= HEX3Atmp_376089)) goto LA4;
				i_376035 = res_376092;
				check = buildproperfieldcheck_375841((*n).kindU.S6.Sons->data[0], (*n).kindU.S6.Sons->data[i_376035]);
				{
					NU8 LOC7;
					NimStringDesc* LOC10;
					LOC7 = 0;
					LOC7 = doesimply_373871(m, check);
					if (!!((LOC7 == ((NU8) 2)))) goto LA8;
					LOC10 = 0;
					LOC10 = rendertree_251058((*n).kindU.S6.Sons->data[0], 0);
					message_198976((*n).Info, ((NU16) 251), LOC10);
					goto LA1;
				}
				LA8: ;
				res_376092 += 1;
			} LA4: ;
		}
	} LA1: ;
}

static N_INLINE(NI, safelen_227424)(tnode226816* 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_371723)(tnode226816* n, tnode226816* x) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametree_371425(n, x);
		if (!LOC3) goto LA4;
		result = NIM_TRUE;
	}
	goto LA1;
	LA4: ;
	{
		{
			NI i_371738;
			NI HEX3Atmp_371754;
			NI LOC8;
			NI res_371757;
			i_371738 = 0;
			HEX3Atmp_371754 = 0;
			LOC8 = 0;
			LOC8 = safelen_227424(n);
			HEX3Atmp_371754 = (NI32)(LOC8 - 1);
			res_371757 = 0;
			{
				while (1) {
					if (!(res_371757 <= HEX3Atmp_371754)) goto LA10;
					i_371738 = res_371757;
					{
						NIM_BOOL LOC13;
						LOC13 = 0;
						LOC13 = hassubtree_371723((*n).kindU.S6.Sons->data[i_371738], x);
						if (!LOC13) goto LA14;
						result = NIM_TRUE;
						goto BeforeRet;
					}
					LA14: ;
					res_371757 += 1;
				} LA10: ;
			}
		}
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, invalidatefacts_371774)(tnodeseq226810** m, tnode226816* n) {
	{
		NI i_371789;
		NI HEX3Atmp_371808;
		NI res_371811;
		i_371789 = 0;
		HEX3Atmp_371808 = 0;
		HEX3Atmp_371808 = ((*m)->Sup.len-1);
		res_371811 = 0;
		{
			while (1) {
				if (!(res_371811 <= HEX3Atmp_371808)) goto LA3;
				i_371789 = res_371811;
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = !(((*m)->data[i_371789] == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC6 = hassubtree_371723((*m)->data[i_371789], n);
					LA7: ;
					if (!LOC6) goto LA8;
					asgnRefNoCycle((void**) (&(*m)->data[i_371789]), NIM_NIL);
				}
				LA8: ;
				res_371811 += 1;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, addasgnfact_375618)(tnodeseq226810** m, tnode226816* key, tnode226816* value) {
	tnode226816* fact;
	fact = newnodei_229007(((NU8) 27), (*key).Info, 3);
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[0]), newsymnode_227132(opeq_369423));
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[1]), key);
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[2]), value);
	(*m) = (tnodeseq226810*) incrSeq(&((*m))->Sup, sizeof(tnode226816*));
	asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), fact);
}

N_NIMCALL(NIM_BOOL, islet_369080)(tnode226816* 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;
			ttype226852* LOC12;
			LOC10 = 0;
			LOC10 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 3));
			if (!(LOC10)) goto LA11;
			LOC12 = 0;
			LOC12 = skiptypes_231245((*(*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_369173)(tnode226816* 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_369271)(tnode226816* m, NIM_BOOL isapprox) {
	NIM_BOOL result;
	tnode226816* n;
	NI derefs;
	NIM_BOOL LOC15;
	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 LOC8;
					LOC8 = 0;
					LOC8 = isconstexpr_262921((*n).kindU.S6.Sons->data[1]);
					if (LOC8) goto LA9;
					LOC8 = islet_369080((*n).kindU.S6.Sons->data[1]);
					LA9: ;
					if (!LOC8) goto LA10;
					n = (*n).kindU.S6.Sons->data[0];
				}
				goto LA6;
				LA10: ;
				{
					goto BeforeRet;
				}
				LA6: ;
			}
			break;
			case ((NU8) 58):
			case ((NU8) 59):
			case ((NU8) 60):
			{
				n = (*n).kindU.S6.Sons->data[1];
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
	LOC15 = 0;
	LOC15 = islet_369080(n);
	if (!(LOC15)) goto LA16;
	LOC15 = (derefs <= ((NI) (isapprox)));
	LA16: ;
	result = LOC15;
	{
		NIM_BOOL LOC19;
		LOC19 = 0;
		LOC19 = !(result);
		if (!(LOC19)) goto LA20;
		LOC19 = isapprox;
		LA20: ;
		if (!LOC19) goto LA21;
		result = isvar_369173(n);
	}
	LA21: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, interestingcaseexpr_369395)(tnode226816* m) {
	NIM_BOOL result;
	result = 0;
	result = isletlocation_369271(m, NIM_TRUE);
	return result;
}

N_NIMCALL(ttype226852*, settype_375048)(tnode226816* n) {
	ttype226852* result;
	result = 0;
	result = newtype_227083(((NU8) 19), (*(*n).Typ).Owner);
	addsonskipintlit_283572(result, (*n).Typ);
	return result;
}

N_NIMCALL(tnode226816*, buildof_375058)(tnode226816* it, tnode226816* loc) {
	tnode226816* result;
	tnode226816* s;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = len_227364(it);
	s = newnodei_229007(((NU8) 39), (*it).Info, (NI32)(LOC1 - 1));
	asgnRefNoCycle((void**) (&(*s).Typ), settype_375048(loc));
	{
		NI i_375074;
		NI HEX3Atmp_375146;
		NI LOC3;
		NI res_375149;
		i_375074 = 0;
		HEX3Atmp_375146 = 0;
		LOC3 = 0;
		LOC3 = len_227364(it);
		HEX3Atmp_375146 = (NI32)(LOC3 - 2);
		res_375149 = 0;
		{
			while (1) {
				if (!(res_375149 <= HEX3Atmp_375146)) goto LA5;
				i_375074 = res_375149;
				asgnRefNoCycle((void**) (&(*s).kindU.S6.Sons->data[i_375074]), (*it).kindU.S6.Sons->data[i_375074]);
				res_375149 += 1;
			} LA5: ;
		}
	}
	result = newnodei_229007(((NU8) 27), (*it).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(opcontains_369422));
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), s);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), loc);
	return result;
}

N_NIMCALL(tnode226816*, buildelse_375166)(tnode226816* n) {
	tnode226816* result;
	tnode226816* s;
	ttype226852* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = settype_375048((*n).kindU.S6.Sons->data[0]);
	s = newnodeit_227145(((NU8) 39), (*n).Info, LOC1);
	{
		NI i_375195;
		NI HEX3Atmp_375489;
		NI LOC3;
		NI res_375492;
		i_375195 = 0;
		HEX3Atmp_375489 = 0;
		LOC3 = 0;
		LOC3 = len_227364(n);
		HEX3Atmp_375489 = (NI32)(LOC3 - 2);
		res_375492 = 1;
		{
			while (1) {
				tnode226816* branch;
				if (!(res_375492 <= HEX3Atmp_375489)) goto LA5;
				i_375195 = res_375492;
				branch = (*n).kindU.S6.Sons->data[i_375195];
				{
					NI j_375411;
					NI HEX3Atmp_375484;
					NI LOC7;
					NI res_375487;
					j_375411 = 0;
					HEX3Atmp_375484 = 0;
					LOC7 = 0;
					LOC7 = len_227364(branch);
					HEX3Atmp_375484 = (NI32)(LOC7 - 2);
					res_375487 = 0;
					{
						while (1) {
							if (!(res_375487 <= HEX3Atmp_375484)) goto LA9;
							j_375411 = res_375487;
							add_227498(s, (*branch).kindU.S6.Sons->data[j_375411]);
							res_375487 += 1;
						} LA9: ;
					}
				}
				res_375492 += 1;
			} LA5: ;
		}
	}
	result = newnodei_229007(((NU8) 27), (*n).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(opcontains_369422));
	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_375755)(tnodeseq226810** m, tnode226816* n, NI i) {
	tnode226816* branch;
	branch = (*n).kindU.S6.Sons->data[i];
	{
		tnode226816* LOC5;
		if (!((*branch).Kind == ((NU8) 85))) goto LA3;
		LOC5 = 0;
		LOC5 = buildof_375058(branch, (*n).kindU.S6.Sons->data[0]);
		(*m) = (tnodeseq226810*) incrSeq(&((*m))->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), LOC5);
	}
	goto LA1;
	LA3: ;
	{
		tnode226816* LOC7;
		tnode226816* LOC8;
		LOC7 = 0;
		LOC7 = buildelse_375166(n);
		LOC8 = 0;
		LOC8 = neg_369516(LOC7);
		(*m) = (tnodeseq226810*) incrSeq(&((*m))->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), LOC8);
	}
	LA1: ;
}

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

N_NIMCALL(tnode226816*, usefulfact_370790)(tnode226816* n) {
	tnode226816* result;
	NU16 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getmagic_262845(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;
			tnode226816* LOC6;
			NIM_BOOL LOC8;
			LOC5 = 0;
			LOC6 = 0;
			LOC6 = skipconv_274732((*n).kindU.S6.Sons->data[2]);
			LOC5 = ((*LOC6).Kind == ((NU8) 23));
			if (!(LOC5)) goto LA7;
			LOC8 = 0;
			LOC8 = isletlocation_369271((*n).kindU.S6.Sons->data[1], NIM_FALSE);
			if (LOC8) goto LA9;
			LOC8 = isvar_369173((*n).kindU.S6.Sons->data[1]);
			LA9: ;
			LOC5 = LOC8;
			LA7: ;
			if (!LOC5) goto LA10;
			result = buildcall_369940(opisnil_369421, (*n).kindU.S6.Sons->data[1]);
		}
		goto LA3;
		LA10: ;
		{
			{
				NIM_BOOL LOC15;
				LOC15 = 0;
				LOC15 = isletlocation_369271((*n).kindU.S6.Sons->data[1], NIM_TRUE);
				if (LOC15) goto LA16;
				LOC15 = isletlocation_369271((*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_369271((*n).kindU.S6.Sons->data[1], NIM_TRUE);
			if (LOC22) goto LA23;
			LOC22 = isletlocation_369271((*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_369271((*n).kindU.S6.Sons->data[1], NIM_FALSE);
			if (LOC29) goto LA30;
			LOC29 = isvar_369173((*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_369271((*n).kindU.S6.Sons->data[1], NIM_TRUE);
			if (!LOC36) goto LA37;
			result = n;
		}
		LA37: ;
	}
	break;
	case ((NU16) 134):
	{
		tnode226816* a;
		tnode226816* b;
		a = usefulfact_370790((*n).kindU.S6.Sons->data[1]);
		b = usefulfact_370790((*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_229007(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(opand_369418));
			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):
	{
		tnode226816* a;
		a = usefulfact_370790((*n).kindU.S6.Sons->data[1]);
		{
			if (!!((a == NIM_NIL))) goto LA55;
			result = neg_369516(a);
		}
		LA55: ;
	}
	break;
	case ((NU16) 135):
	{
		tnode226816* a;
		tnode226816* LOC58;
		tnode226816* b;
		tnode226816* LOC59;
		LOC58 = 0;
		LOC58 = usefulfact_370790((*n).kindU.S6.Sons->data[1]);
		a = neg_369516(LOC58);
		LOC59 = 0;
		LOC59 = usefulfact_370790((*n).kindU.S6.Sons->data[2]);
		b = neg_369516(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_229007(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(opand_369418));
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), a);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), b);
			result = neg_369516(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_370790((*(*n).kindU.S4.Sym).Ast);
			}
			LA75: ;
		}
		goto LA67;
		LA71: ;
		{
			tnode226816* LOC80;
			if (!((*n).Kind == ((NU8) 126))) goto LA78;
			LOC80 = 0;
			LOC80 = lastson_227261(n);
			result = usefulfact_370790(LOC80);
		}
		goto LA67;
		LA78: ;
		LA67: ;
	}
	break;
	}
	return result;
}

N_NIMCALL(void, addfact_371349)(tnodeseq226810** m, tnode226816* n_371353) {
	tnode226816* n;
	n = usefulfact_370790(n_371353);
	{
		if (!!((n == NIM_NIL))) goto LA3;
		(*m) = (tnodeseq226810*) incrSeq(&((*m))->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), n);
	}
	LA3: ;
}

N_NIMCALL(void, addfactneg_371396)(tnodeseq226810** m, tnode226816* n_371400) {
	tnode226816* n;
	n = neg_369516(n_371400);
	{
		if (!!((n == NIM_NIL))) goto LA3;
		addfact_371349(m, n);
	}
	LA3: ;
}

N_NIMCALL(void, adddiscriminantfact_375518)(tnodeseq226810** m, tnode226816* n) {
	tnode226816* fact;
	fact = newnodei_229007(((NU8) 27), (*n).Info, 3);
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[0]), newsymnode_227132(opeq_369423));
	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) = (tnodeseq226810*) incrSeq(&((*m))->Sup, sizeof(tnode226816*));
	asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), fact);
}

N_NIMCALL(tnode226816*, buildcall_369979)(tsym226846* op, tnode226816* a, tnode226816* b) {
	tnode226816* result;
	result = 0;
	result = newnodei_229007(((NU8) 29), (*a).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(op));
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), a);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), b);
	return result;
}

static N_INLINE(tnode226816*, HEX5BHEX5D_227698)(tnode226816* n, NI i) {
	tnode226816* result;
	result = 0;
	result = (*n).kindU.S6.Sons->data[i];
	return result;
}

N_NIMCALL(tnode226816*, minusone_370439)(void) {
	tnode226816* result;
	result = 0;
	result = newintnode_227096(((NU8) 6), IL64(-1));
	return result;
}

N_NIMCALL(tnode226816*, negate_370251)(tnode226816* a, tnode226816* b_370254, tnode226816* res) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tnode226816* b;
		LOC3 = 0;
		LOC3 = ((*b_370254).Kind >= ((NU8) 5) && (*b_370254).Kind <= ((NU8) 15));
		if (!(LOC3)) goto LA4;
		LOC3 = !(((*b_370254).kindU.S1.Intval == (IL64(-9223372036854775807) - IL64(1))));
		LA4: ;
		if (!LOC3) goto LA5;
		b = copynode_227323(b_370254);
		(*b).kindU.S1.Intval = -((*b).kindU.S1.Intval);
		{
			if (!((*a).Kind >= ((NU8) 5) && (*a).Kind <= ((NU8) 15))) goto LA9;
			(*b).kindU.S1.Intval = HEX7CHEX2BHEX7C_304019((*b).kindU.S1.Intval, (*a).kindU.S1.Intval);
			result = b;
		}
		goto LA7;
		LA9: ;
		{
			result = buildcall_369979(opadd_369424, a, b);
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		tnode226816* b;
		if (!((*b_370254).Kind >= ((NU8) 16) && (*b_370254).Kind <= ((NU8) 18))) goto LA13;
		b = copynode_227323(b_370254);
		(*b).kindU.S2.Floatval = -((*b).kindU.S2.Floatval);
		result = buildcall_369979(opadd_369424, a, b);
	}
	goto LA1;
	LA13: ;
	{
		result = res;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, HEX7CHEX2BHEX7C_370033)(tnode226816* a, tnode226816* b) {
	tnode226816* result;
	result = 0;
	result = copynode_227323(a);
	{
		if (!((*a).Kind >= ((NU8) 5) && (*a).Kind <= ((NU8) 15))) goto LA3;
		(*result).kindU.S1.Intval = HEX7CHEX2BHEX7C_304019((*a).kindU.S1.Intval, (*b).kindU.S1.Intval);
	}
	goto LA1;
	LA3: ;
	{
		(*result).kindU.S2.Floatval = ((NF)((*a).kindU.S2.Floatval) + (NF)((*b).kindU.S2.Floatval));
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, HEX7CHEX2AHEX7C_370142)(tnode226816* a, tnode226816* b) {
	tnode226816* result;
	result = 0;
	result = copynode_227323(a);
	{
		if (!((*a).Kind >= ((NU8) 5) && (*a).Kind <= ((NU8) 15))) goto LA3;
		(*result).kindU.S1.Intval = HEX7CHEX2AHEX7C_304078((*a).kindU.S1.Intval, (*b).kindU.S1.Intval);
	}
	goto LA1;
	LA3: ;
	{
		(*result).kindU.S2.Floatval = ((NF)((*a).kindU.S2.Floatval) * (NF)((*b).kindU.S2.Floatval));
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, reassociation_370477)(tnode226816* n) {
	tnode226816* result;
	NU16 LOC1;
	result = 0;
	result = n;
	LOC1 = 0;
	LOC1 = getmagic_262845(result);
	switch (LOC1) {
	case ((NU16) 37):
	case ((NU16) 42):
	case ((NU16) 47):
	case ((NU16) 19):
	{
		{
			NIM_BOOL LOC5;
			NIM_BOOL LOC6;
			tnode226816* LOC7;
			tnode226816* LOC9;
			NU16 LOC10;
			tnode226816* LOC12;
			tnode226816* LOC13;
			tnode226816* LOC16;
			tnode226816* LOC17;
			tnode226816* LOC18;
			tnode226816* LOC19;
			tnode226816* LOC20;
			tnode226816* LOC21;
			LOC5 = 0;
			LOC6 = 0;
			LOC7 = 0;
			LOC7 = HEX5BHEX5D_227698(result, 2);
			LOC6 = isvalue_369046(LOC7);
			if (!(LOC6)) goto LA8;
			LOC9 = 0;
			LOC9 = HEX5BHEX5D_227698(result, 1);
			LOC10 = 0;
			LOC10 = getmagic_262845(LOC9);
			LOC6 = (LOC10 == ((NU16) 37) || LOC10 == ((NU16) 42) || LOC10 == ((NU16) 47) || LOC10 == ((NU16) 19));
			LA8: ;
			LOC5 = LOC6;
			if (!(LOC5)) goto LA11;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_227698(result, 1);
			LOC13 = 0;
			LOC13 = HEX5BHEX5D_227698(LOC12, 2);
			LOC5 = isvalue_369046(LOC13);
			LA11: ;
			if (!LOC5) goto LA14;
			LOC16 = 0;
			LOC16 = HEX5BHEX5D_227698(result, 1);
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_227698(LOC16, 1);
			LOC18 = 0;
			LOC18 = HEX5BHEX5D_227698(result, 1);
			LOC19 = 0;
			LOC19 = HEX5BHEX5D_227698(LOC18, 2);
			LOC20 = 0;
			LOC20 = HEX5BHEX5D_227698(result, 2);
			LOC21 = 0;
			LOC21 = HEX7CHEX2BHEX7C_370033(LOC19, LOC20);
			result = buildcall_369979(opadd_369424, LOC17, LOC21);
		}
		LA14: ;
	}
	break;
	case ((NU16) 39):
	case ((NU16) 44):
	case ((NU16) 49):
	{
		{
			NIM_BOOL LOC25;
			NIM_BOOL LOC26;
			tnode226816* LOC27;
			tnode226816* LOC29;
			NU16 LOC30;
			tnode226816* LOC32;
			tnode226816* LOC33;
			tnode226816* LOC36;
			tnode226816* LOC37;
			tnode226816* LOC38;
			tnode226816* LOC39;
			tnode226816* LOC40;
			tnode226816* LOC41;
			LOC25 = 0;
			LOC26 = 0;
			LOC27 = 0;
			LOC27 = HEX5BHEX5D_227698(result, 2);
			LOC26 = isvalue_369046(LOC27);
			if (!(LOC26)) goto LA28;
			LOC29 = 0;
			LOC29 = HEX5BHEX5D_227698(result, 1);
			LOC30 = 0;
			LOC30 = getmagic_262845(LOC29);
			LOC26 = (LOC30 == ((NU16) 39) || LOC30 == ((NU16) 44) || LOC30 == ((NU16) 49));
			LA28: ;
			LOC25 = LOC26;
			if (!(LOC25)) goto LA31;
			LOC32 = 0;
			LOC32 = HEX5BHEX5D_227698(result, 1);
			LOC33 = 0;
			LOC33 = HEX5BHEX5D_227698(LOC32, 2);
			LOC25 = isvalue_369046(LOC33);
			LA31: ;
			if (!LOC25) goto LA34;
			LOC36 = 0;
			LOC36 = HEX5BHEX5D_227698(result, 1);
			LOC37 = 0;
			LOC37 = HEX5BHEX5D_227698(LOC36, 1);
			LOC38 = 0;
			LOC38 = HEX5BHEX5D_227698(result, 1);
			LOC39 = 0;
			LOC39 = HEX5BHEX5D_227698(LOC38, 2);
			LOC40 = 0;
			LOC40 = HEX5BHEX5D_227698(result, 2);
			LOC41 = 0;
			LOC41 = HEX7CHEX2AHEX7C_370142(LOC39, LOC40);
			result = buildcall_369979(opadd_369424, LOC37, LOC41);
		}
		LA34: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode226816*, canon_370513)(tnode226816* n) {
	tnode226816* result;
	NU16 LOC11;
	NU16 LOC32;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = safelen_227424(n);
		if (!(1 <= LOC3)) goto LA4;
		result = shallowcopy_232347(n);
		{
			NI i_370539;
			NI HEX3Atmp_370759;
			NI LOC7;
			NI res_370762;
			i_370539 = 0;
			HEX3Atmp_370759 = 0;
			LOC7 = 0;
			LOC7 = len_227364(n);
			HEX3Atmp_370759 = (LOC7 - 1);
			res_370762 = 0;
			{
				while (1) {
					if (!(res_370762 <= HEX3Atmp_370759)) goto LA9;
					i_370539 = res_370762;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_370539]), canon_370513((*n).kindU.S6.Sons->data[i_370539]));
					res_370762 += 1;
				} LA9: ;
			}
		}
	}
	goto LA1;
	LA4: ;
	{
		result = n;
	}
	LA1: ;
	LOC11 = 0;
	LOC11 = getmagic_262845(result);
	switch (LOC11) {
	case ((NU16) 72):
	case ((NU16) 37):
	case ((NU16) 39):
	case ((NU16) 56):
	case ((NU16) 57):
	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):
	case ((NU16) 42):
	case ((NU16) 47):
	case ((NU16) 19):
	case ((NU16) 44):
	case ((NU16) 49):
	case ((NU16) 63):
	case ((NU16) 65):
	case ((NU16) 64):
	case ((NU16) 66):
	{
		{
			NIM_BOOL LOC15;
			NIM_BOOL LOC17;
			LOC15 = 0;
			LOC15 = isvalue_369046((*result).kindU.S6.Sons->data[1]);
			if (!(LOC15)) goto LA16;
			LOC17 = 0;
			LOC17 = isvalue_369046((*result).kindU.S6.Sons->data[2]);
			LOC15 = !(LOC17);
			LA16: ;
			if (!LOC15) goto LA18;
			result = swapargs_369435(result, (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym);
		}
		LA18: ;
	}
	break;
	case ((NU16) 5):
	{
		tnode226816* LOC21;
		tnode226816* LOC22;
		tnode226816* LOC23;
		LOC21 = 0;
		LOC21 = HEX5BHEX5D_227698(result, 1);
		LOC22 = 0;
		LOC22 = buildcall_369940(oplen_369428, LOC21);
		LOC23 = 0;
		LOC23 = minusone_370439();
		result = buildcall_369979(opadd_369424, LOC22, LOC23);
	}
	break;
	case ((NU16) 101):
	case ((NU16) 102):
	{
		tnode226816* LOC25;
		tnode226816* LOC26;
		LOC25 = 0;
		LOC25 = HEX5BHEX5D_227698(result, 1);
		LOC26 = 0;
		LOC26 = newintnode_227096(((NU8) 6), IL64(-1));
		result = buildcall_369979(opadd_369424, LOC25, LOC26);
	}
	break;
	case ((NU16) 38):
	case ((NU16) 43):
	case ((NU16) 48):
	case ((NU16) 20):
	{
		tnode226816* LOC28;
		tnode226816* LOC29;
		LOC28 = 0;
		LOC28 = HEX5BHEX5D_227698(result, 1);
		LOC29 = 0;
		LOC29 = HEX5BHEX5D_227698(result, 2);
		result = negate_370251(LOC28, LOC29, result);
	}
	break;
	case ((NU16) 27):
	case ((NU16) 28):
	case ((NU16) 29):
	case ((NU16) 30):
	{
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(oplen_369428));
	}
	break;
	default:
	{
	}
	break;
	}
	result = skipconv_274732(result);
	result = reassociation_370477(result);
	LOC32 = 0;
	LOC32 = getmagic_262845(result);
	switch (LOC32) {
	case ((NU16) 73):
	case ((NU16) 74):
	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):
	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):
	{
		tnode226816* x;
		tnode226816* y;
		x = HEX5BHEX5D_227698(result, 1);
		y = HEX5BHEX5D_227698(result, 2);
		{
			NIM_BOOL LOC36;
			NIM_BOOL LOC37;
			NIM_BOOL LOC38;
			NI LOC40;
			tnode226816* LOC42;
			tnode226816* LOC44;
			NU16 LOC47;
			LOC36 = 0;
			LOC37 = 0;
			LOC38 = 0;
			LOC38 = ((*x).Kind == ((NU8) 27) || (*x).Kind == ((NU8) 29) || (*x).Kind == ((NU8) 30) || (*x).Kind == ((NU8) 31) || (*x).Kind == ((NU8) 26) || (*x).Kind == ((NU8) 28) || (*x).Kind == ((NU8) 32));
			if (!(LOC38)) goto LA39;
			LOC40 = 0;
			LOC40 = len_227364(x);
			LOC38 = (LOC40 == 3);
			LA39: ;
			LOC37 = LOC38;
			if (!(LOC37)) goto LA41;
			LOC42 = 0;
			LOC42 = HEX5BHEX5D_227698(x, 2);
			LOC37 = isvalue_369046(LOC42);
			LA41: ;
			LOC36 = LOC37;
			if (!(LOC36)) goto LA43;
			LOC44 = 0;
			LOC44 = HEX5BHEX5D_227698(x, 1);
			LOC36 = isletlocation_369271(LOC44, NIM_TRUE);
			LA43: ;
			if (!LOC36) goto LA45;
			LOC47 = 0;
			LOC47 = getmagic_262845(x);
			switch (LOC47) {
			case ((NU16) 38):
			case ((NU16) 43):
			case ((NU16) 48):
			case ((NU16) 20):
			{
				tnode226816* LOC49;
				tnode226816* LOC50;
				tnode226816* LOC51;
				tnode226816* LOC52;
				tnode226816* LOC53;
				LOC49 = 0;
				LOC49 = HEX5BHEX5D_227698(result, 0);
				LOC50 = 0;
				LOC50 = HEX5BHEX5D_227698(x, 1);
				LOC51 = 0;
				LOC51 = HEX5BHEX5D_227698(x, 2);
				LOC52 = 0;
				LOC52 = buildcall_369979(opadd_369424, y, LOC51);
				LOC53 = 0;
				LOC53 = reassociation_370477(LOC52);
				result = buildcall_369979((*LOC49).kindU.S4.Sym, LOC50, LOC53);
			}
			break;
			case ((NU16) 37):
			case ((NU16) 42):
			case ((NU16) 47):
			case ((NU16) 19):
			{
				tnode226816* plus;
				tnode226816* LOC55;
				tnode226816* LOC56;
				LOC55 = 0;
				LOC55 = HEX5BHEX5D_227698(x, 2);
				LOC56 = 0;
				LOC56 = negate_370251(y, LOC55, NIM_NIL);
				plus = reassociation_370477(LOC56);
				{
					tnode226816* LOC61;
					tnode226816* LOC62;
					if (!!((plus == NIM_NIL))) goto LA59;
					LOC61 = 0;
					LOC61 = HEX5BHEX5D_227698(result, 0);
					LOC62 = 0;
					LOC62 = HEX5BHEX5D_227698(x, 1);
					result = buildcall_369979((*LOC61).kindU.S4.Sym, LOC62, plus);
				}
				LA59: ;
			}
			break;
			default:
			{
			}
			break;
			}
		}
		goto LA34;
		LA45: ;
		{
			NIM_BOOL LOC65;
			NIM_BOOL LOC66;
			NIM_BOOL LOC67;
			NI LOC69;
			tnode226816* LOC71;
			tnode226816* LOC73;
			NU16 LOC76;
			LOC65 = 0;
			LOC66 = 0;
			LOC67 = 0;
			LOC67 = ((*y).Kind == ((NU8) 27) || (*y).Kind == ((NU8) 29) || (*y).Kind == ((NU8) 30) || (*y).Kind == ((NU8) 31) || (*y).Kind == ((NU8) 26) || (*y).Kind == ((NU8) 28) || (*y).Kind == ((NU8) 32));
			if (!(LOC67)) goto LA68;
			LOC69 = 0;
			LOC69 = len_227364(y);
			LOC67 = (LOC69 == 3);
			LA68: ;
			LOC66 = LOC67;
			if (!(LOC66)) goto LA70;
			LOC71 = 0;
			LOC71 = HEX5BHEX5D_227698(y, 2);
			LOC66 = isvalue_369046(LOC71);
			LA70: ;
			LOC65 = LOC66;
			if (!(LOC65)) goto LA72;
			LOC73 = 0;
			LOC73 = HEX5BHEX5D_227698(y, 1);
			LOC65 = isletlocation_369271(LOC73, NIM_TRUE);
			LA72: ;
			if (!LOC65) goto LA74;
			LOC76 = 0;
			LOC76 = getmagic_262845(y);
			switch (LOC76) {
			case ((NU16) 38):
			case ((NU16) 43):
			case ((NU16) 48):
			case ((NU16) 20):
			{
				tnode226816* LOC78;
				tnode226816* LOC79;
				tnode226816* LOC80;
				tnode226816* LOC81;
				tnode226816* LOC82;
				LOC78 = 0;
				LOC78 = HEX5BHEX5D_227698(result, 0);
				LOC79 = 0;
				LOC79 = HEX5BHEX5D_227698(y, 1);
				LOC80 = 0;
				LOC80 = HEX5BHEX5D_227698(y, 2);
				LOC81 = 0;
				LOC81 = buildcall_369979(opadd_369424, x, LOC80);
				LOC82 = 0;
				LOC82 = reassociation_370477(LOC81);
				result = buildcall_369979((*LOC78).kindU.S4.Sym, LOC79, LOC82);
			}
			break;
			case ((NU16) 37):
			case ((NU16) 42):
			case ((NU16) 47):
			case ((NU16) 19):
			{
				tnode226816* plus;
				tnode226816* LOC84;
				tnode226816* LOC85;
				LOC84 = 0;
				LOC84 = HEX5BHEX5D_227698(y, 2);
				LOC85 = 0;
				LOC85 = negate_370251(x, LOC84, NIM_NIL);
				plus = reassociation_370477(LOC85);
				{
					NIM_BOOL LOC88;
					NIM_BOOL LOC90;
					tnode226816* LOC93;
					tnode226816* LOC94;
					LOC88 = 0;
					LOC88 = !((plus == NIM_NIL));
					if (!(LOC88)) goto LA89;
					LOC90 = 0;
					LOC90 = isletlocation_369271(x, NIM_TRUE);
					LOC88 = !(LOC90);
					LA89: ;
					if (!LOC88) goto LA91;
					LOC93 = 0;
					LOC93 = HEX5BHEX5D_227698(result, 0);
					LOC94 = 0;
					LOC94 = HEX5BHEX5D_227698(y, 1);
					result = buildcall_369979((*LOC93).kindU.S4.Sym, plus, LOC94);
				}
				LA91: ;
			}
			break;
			default:
			{
			}
			break;
			}
		}
		goto LA34;
		LA74: ;
		LA34: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(void, addfactle_375018)(tnodeseq226810** m, tnode226816* a, tnode226816* b) {
	tnode226816* LOC1;
	tnode226816* LOC2;
	LOC1 = 0;
	LOC1 = buildcall_369979(ople_369416, a, b);
	LOC2 = 0;
	LOC2 = canon_370513(LOC1);
	(*m) = (tnodeseq226810*) incrSeq(&((*m))->Sup, sizeof(tnode226816*));
	asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), LOC2);
}

N_NIMCALL(tnode226816*, zero_370421)(void) {
	tnode226816* result;
	result = 0;
	result = newintnode_227096(((NU8) 6), IL64(0));
	return result;
}

N_NIMCALL(tnode226816*, one_370430)(void) {
	tnode226816* result;
	result = 0;
	result = newintnode_227096(((NU8) 6), IL64(1));
	return result;
}
N_NIMCALL(void, TMP3873)(void* p, NI op) {
	treplacements374438* a;
	NI LOC1;
	a = (treplacements374438*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field0, op);
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

N_NIMCALL(tnode226816*, replacesubtree_374445)(tnode226816* n, tnode226816* x, tnode226816* by) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametree_371425(n, x);
		if (!LOC3) goto LA4;
		result = by;
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = hassubtree_371723(n, x);
		if (!LOC7) goto LA8;
		result = shallowcopy_232347(n);
		{
			NI i_374462;
			NI HEX3Atmp_374492;
			NI LOC11;
			NI res_374495;
			i_374462 = 0;
			HEX3Atmp_374492 = 0;
			LOC11 = 0;
			LOC11 = safelen_227424(n);
			HEX3Atmp_374492 = (NI32)(LOC11 - 1);
			res_374495 = 0;
			{
				while (1) {
					if (!(res_374495 <= HEX3Atmp_374492)) goto LA13;
					i_374462 = res_374495;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_374462]), replacesubtree_374445((*n).kindU.S6.Sons->data[i_374462], x, by));
					res_374495 += 1;
				} LA13: ;
			}
		}
	}
	goto LA1;
	LA8: ;
	{
		result = n;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, applyreplacements_374512)(tnode226816* n, treplacements374438* rep) {
	tnode226816* result;
	result = 0;
	result = n;
	{
		TY517908 x_374611;
		NI i_374615;
		NI l_374617;
		memset((void*)(&x_374611), 0, sizeof(x_374611));
		i_374615 = 0;
		l_374617 = rep->Sup.len;
		{
			while (1) {
				if (!(i_374615 < l_374617)) goto LA3;
				x_374611.Field0 = rep->data[i_374615].Field0;
				x_374611.Field1 = rep->data[i_374615].Field1;
				result = replacesubtree_374445(result, x_374611.Field0, x_374611.Field1);
				i_374615 += 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(NU8, pleviamodelrec_374633)(tnodeseq226810** m, tnode226816* a, tnode226816* b) {
	NU8 result;
	result = 0;
	{
		NI i_374650;
		NI HEX3Atmp_374721;
		NI res_374724;
		i_374650 = 0;
		HEX3Atmp_374721 = 0;
		HEX3Atmp_374721 = ((*m)->Sup.len-1);
		res_374724 = 0;
		{
			while (1) {
				tnode226816* fact;
				if (!(res_374724 <= HEX3Atmp_374721)) goto LA3;
				i_374650 = res_374724;
				fact = (*m)->data[i_374650];
				{
					NIM_BOOL LOC6;
					NU16 LOC8;
					tnode226816* x;
					tnode226816* y;
					LOC6 = 0;
					LOC6 = !((fact == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC8 = 0;
					LOC8 = getmagic_262845(fact);
					LOC6 = ((TMP3875[LOC8/8] &(1<<(LOC8%8)))!=0);
					LA7: ;
					if (!LOC6) goto LA9;
					x = HEX5BHEX5D_227698(fact, 1);
					y = HEX5BHEX5D_227698(fact, 2);
					asgnRefNoCycle((void**) (&(*m)->data[i_374650]), NIM_NIL);
					{
						NU8 LOC13;
						LOC13 = 0;
						LOC13 = ple_374126((*m), a, x);
						if (!(LOC13 == ((NU8) 2))) goto LA14;
						{
							NU8 LOC18;
							LOC18 = 0;
							LOC18 = ple_374126((*m), y, b);
							if (!(LOC18 == ((NU8) 2))) goto LA19;
							result = ((NU8) 2);
							goto BeforeRet;
						}
						LA19: ;
					}
					LA14: ;
					result = impliesle_373295(fact, a, b);
					{
						if (!!((result == ((NU8) 0)))) goto LA23;
						goto BeforeRet;
					}
					LA23: ;
					{
						NIM_BOOL LOC27;
						LOC27 = 0;
						LOC27 = sametree_371425(y, a);
						if (!LOC27) goto LA28;
						result = ple_374126((*m), b, x);
						{
							if (!!((result == ((NU8) 0)))) goto LA32;
							goto BeforeRet;
						}
						LA32: ;
					}
					LA28: ;
				}
				LA9: ;
				res_374724 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, pleviamodel_374118)(tnodeseq226810* model, tnode226816* aa, tnode226816* bb) {
	NU8 result;
	treplacements374438* replacements;
	tnodeseq226810* m;
	tnode226816* a;
	tnode226816* b;
	result = 0;
	replacements = (treplacements374438*) newSeq((&NTI374438), 0);
	{
		tnode226816* fact_374780;
		NI i_374961;
		NI l_374963;
		fact_374780 = 0;
		i_374961 = 0;
		l_374963 = model->Sup.len;
		{
			while (1) {
				if (!(i_374961 < l_374963)) goto LA3;
				fact_374780 = model->data[i_374961];
				{
					NIM_BOOL LOC6;
					NU16 LOC8;
					tnode226816* a;
					tnode226816* b;
					LOC6 = 0;
					LOC6 = !((fact_374780 == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC8 = 0;
					LOC8 = getmagic_262845(fact_374780);
					LOC6 = ((TMP3874[LOC8/8] &(1<<(LOC8%8)))!=0);
					LA7: ;
					if (!LOC6) goto LA9;
					a = HEX5BHEX5D_227698(fact_374780, 1);
					b = HEX5BHEX5D_227698(fact_374780, 2);
					{
						TY517908 LOC15;
						if (!((*a).Kind == ((NU8) 3))) goto LA13;
						memset((void*)(&LOC15), 0, sizeof(LOC15));
						LOC15.Field0 = a;
						LOC15.Field1 = b;
						replacements = (treplacements374438*) incrSeq(&(replacements)->Sup, sizeof(TY517908));
						asgnRefNoCycle((void**) (&replacements->data[replacements->Sup.len-1].Field0), LOC15.Field0);
						asgnRefNoCycle((void**) (&replacements->data[replacements->Sup.len-1].Field1), LOC15.Field1);
					}
					goto LA11;
					LA13: ;
					{
						TY517908 LOC17;
						memset((void*)(&LOC17), 0, sizeof(LOC17));
						LOC17.Field0 = b;
						LOC17.Field1 = a;
						replacements = (treplacements374438*) incrSeq(&(replacements)->Sup, sizeof(TY517908));
						asgnRefNoCycle((void**) (&replacements->data[replacements->Sup.len-1].Field0), LOC17.Field0);
						asgnRefNoCycle((void**) (&replacements->data[replacements->Sup.len-1].Field1), LOC17.Field1);
					}
					LA11: ;
				}
				LA9: ;
				i_374961 += 1;
			} LA3: ;
		}
	}
	m = 0;
	a = aa;
	b = bb;
	{
		if (!(0 < replacements->Sup.len)) goto LA20;
		m = (tnodeseq226810*) newSeq((&NTI226810), 0);
		{
			tnode226816* fact_374907;
			NI i_374968;
			NI l_374970;
			fact_374907 = 0;
			i_374968 = 0;
			l_374970 = model->Sup.len;
			{
				while (1) {
					if (!(i_374968 < l_374970)) goto LA24;
					fact_374907 = model->data[i_374968];
					{
						NIM_BOOL LOC27;
						NU16 LOC29;
						tnode226816* LOC32;
						tnode226816* LOC33;
						LOC27 = 0;
						LOC27 = !((fact_374907 == NIM_NIL));
						if (!(LOC27)) goto LA28;
						LOC29 = 0;
						LOC29 = getmagic_262845(fact_374907);
						LOC27 = !(((TMP3874[LOC29/8] &(1<<(LOC29%8)))!=0));
						LA28: ;
						if (!LOC27) goto LA30;
						LOC32 = 0;
						LOC32 = applyreplacements_374512(fact_374907, replacements);
						LOC33 = 0;
						LOC33 = canon_370513(LOC32);
						m = (tnodeseq226810*) incrSeq(&(m)->Sup, sizeof(tnode226816*));
						asgnRefNoCycle((void**) (&m->data[m->Sup.len-1]), LOC33);
					}
					LA30: ;
					i_374968 += 1;
				} LA24: ;
			}
		}
		a = applyreplacements_374512(aa, replacements);
		b = applyreplacements_374512(bb, replacements);
	}
	goto LA18;
	LA20: ;
	{
		genericSeqAssign((&m), model, (&NTI226810));
	}
	LA18: ;
	result = pleviamodelrec_374633((&m), a, b);
	return result;
}

N_NIMCALL(NU8, ple_374126)(tnodeseq226810* m, tnode226816* a, tnode226816* b) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isvalue_369046(a);
		if (!(LOC3)) goto LA4;
		LOC3 = isvalue_369046(b);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = levalue_236487(a, b);
			if (!LOC9) goto LA10;
			result = ((NU8) 2);
		}
		goto LA7;
		LA10: ;
		{
			result = ((NU8) 1);
		}
		LA7: ;
		goto BeforeRet;
	}
	LA5: ;
	{
		NIM_BOOL LOC15;
		NIM_BOOL LOC16;
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = isvalue_369046(b);
		if (!(LOC16)) goto LA17;
		LOC16 = !(((*a).Typ == NIM_NIL));
		LA17: ;
		LOC15 = LOC16;
		if (!(LOC15)) goto LA18;
		LOC15 = isordinaltype_264092((*a).Typ);
		LA18: ;
		if (!LOC15) goto LA19;
		{
			NI64 LOC23;
			LOC23 = 0;
			LOC23 = lastord_264010((*a).Typ);
			if (!(LOC23 <= (*b).kindU.S1.Intval)) goto LA24;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA24: ;
	}
	LA19: ;
	{
		NIM_BOOL LOC28;
		NIM_BOOL LOC29;
		LOC28 = 0;
		LOC29 = 0;
		LOC29 = isvalue_369046(a);
		if (!(LOC29)) goto LA30;
		LOC29 = !(((*b).Typ == NIM_NIL));
		LA30: ;
		LOC28 = LOC29;
		if (!(LOC28)) goto LA31;
		LOC28 = isordinaltype_264092((*b).Typ);
		LA31: ;
		if (!LOC28) goto LA32;
		{
			NI64 LOC36;
			LOC36 = 0;
			LOC36 = firstord_264004((*b).Typ);
			if (!(LOC36 <= (*a).kindU.S1.Intval)) goto LA37;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA37: ;
	}
	LA32: ;
	{
		NIM_BOOL LOC41;
		LOC41 = 0;
		LOC41 = sametree_371425(a, b);
		if (!LOC41) goto LA42;
		result = ((NU8) 2);
		goto BeforeRet;
	}
	LA42: ;
	{
		NIM_BOOL LOC46;
		NU16 LOC47;
		LOC46 = 0;
		LOC47 = 0;
		LOC47 = getmagic_262845(b);
		LOC46 = (LOC47 == ((NU16) 27) || LOC47 == ((NU16) 28) || LOC47 == ((NU16) 29) || LOC47 == ((NU16) 30));
		if (!(LOC46)) goto LA48;
		LOC46 = isvalue_369046(a);
		LA48: ;
		if (!LOC46) goto LA49;
		{
			if (!((*a).kindU.S1.Intval <= IL64(0))) goto LA53;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA53: ;
	}
	LA49: ;
	{
		NIM_BOOL LOC57;
		NIM_BOOL LOC58;
		NU16 LOC59;
		tnode226816* LOC61;
		tnode226816* LOC62;
		NU8 LOC63;
		tnode226816* LOC65;
		NU8 LOC66;
		LOC57 = 0;
		LOC58 = 0;
		LOC59 = 0;
		LOC59 = getmagic_262845(b);
		LOC58 = (LOC59 == ((NU16) 37) || LOC59 == ((NU16) 42) || LOC59 == ((NU16) 47) || LOC59 == ((NU16) 19));
		if (!(LOC58)) goto LA60;
		LOC61 = 0;
		LOC61 = zero_370421();
		LOC62 = 0;
		LOC62 = HEX5BHEX5D_227698(b, 2);
		LOC63 = 0;
		LOC63 = ple_374126(m, LOC61, LOC62);
		LOC58 = (LOC63 == ((NU8) 2));
		LA60: ;
		LOC57 = LOC58;
		if (!(LOC57)) goto LA64;
		LOC65 = 0;
		LOC65 = HEX5BHEX5D_227698(b, 1);
		LOC66 = 0;
		LOC66 = ple_374126(m, a, LOC65);
		LOC57 = (LOC66 == ((NU8) 2));
		LA64: ;
		if (!LOC57) goto LA67;
		result = ((NU8) 2);
		goto BeforeRet;
	}
	LA67: ;
	{
		NIM_BOOL LOC71;
		NIM_BOOL LOC72;
		NU16 LOC73;
		tnode226816* LOC75;
		tnode226816* LOC76;
		NU8 LOC77;
		tnode226816* LOC79;
		NU8 LOC80;
		LOC71 = 0;
		LOC72 = 0;
		LOC73 = 0;
		LOC73 = getmagic_262845(a);
		LOC72 = (LOC73 == ((NU16) 37) || LOC73 == ((NU16) 42) || LOC73 == ((NU16) 47) || LOC73 == ((NU16) 19));
		if (!(LOC72)) goto LA74;
		LOC75 = 0;
		LOC75 = HEX5BHEX5D_227698(a, 2);
		LOC76 = 0;
		LOC76 = zero_370421();
		LOC77 = 0;
		LOC77 = ple_374126(m, LOC75, LOC76);
		LOC72 = (LOC77 == ((NU8) 2));
		LA74: ;
		LOC71 = LOC72;
		if (!(LOC71)) goto LA78;
		LOC79 = 0;
		LOC79 = HEX5BHEX5D_227698(a, 1);
		LOC80 = 0;
		LOC80 = ple_374126(m, LOC79, b);
		LOC71 = (LOC80 == ((NU8) 2));
		LA78: ;
		if (!LOC71) goto LA81;
		result = ((NU8) 2);
		goto BeforeRet;
	}
	LA81: ;
	{
		NU16 LOC85;
		LOC85 = 0;
		LOC85 = getmagic_262845(b);
		if (!(LOC85 == ((NU16) 39) || LOC85 == ((NU16) 44) || LOC85 == ((NU16) 49))) goto LA86;
		{
			NIM_BOOL LOC90;
			NIM_BOOL LOC91;
			tnode226816* LOC92;
			NU8 LOC93;
			tnode226816* LOC95;
			tnode226816* LOC96;
			NU8 LOC97;
			tnode226816* LOC99;
			tnode226816* LOC100;
			NU8 LOC101;
			LOC90 = 0;
			LOC91 = 0;
			LOC92 = 0;
			LOC92 = HEX5BHEX5D_227698(b, 1);
			LOC93 = 0;
			LOC93 = ple_374126(m, a, LOC92);
			LOC91 = (LOC93 == ((NU8) 2));
			if (!(LOC91)) goto LA94;
			LOC95 = 0;
			LOC95 = one_370430();
			LOC96 = 0;
			LOC96 = HEX5BHEX5D_227698(b, 2);
			LOC97 = 0;
			LOC97 = ple_374126(m, LOC95, LOC96);
			LOC91 = (LOC97 == ((NU8) 2));
			LA94: ;
			LOC90 = LOC91;
			if (!(LOC90)) goto LA98;
			LOC99 = 0;
			LOC99 = zero_370421();
			LOC100 = 0;
			LOC100 = HEX5BHEX5D_227698(b, 1);
			LOC101 = 0;
			LOC101 = ple_374126(m, LOC99, LOC100);
			LOC90 = (LOC101 == ((NU8) 2));
			LA98: ;
			if (!LOC90) goto LA102;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA102: ;
	}
	LA86: ;
	{
		NU16 LOC106;
		LOC106 = 0;
		LOC106 = getmagic_262845(a);
		if (!(LOC106 == ((NU16) 40) || LOC106 == ((NU16) 45) || LOC106 == ((NU16) 50))) goto LA107;
		{
			NIM_BOOL LOC111;
			NIM_BOOL LOC112;
			tnode226816* LOC113;
			tnode226816* LOC114;
			NU8 LOC115;
			tnode226816* LOC117;
			NU8 LOC118;
			tnode226816* LOC120;
			NU8 LOC121;
			LOC111 = 0;
			LOC112 = 0;
			LOC113 = 0;
			LOC113 = one_370430();
			LOC114 = 0;
			LOC114 = HEX5BHEX5D_227698(a, 2);
			LOC115 = 0;
			LOC115 = ple_374126(m, LOC113, LOC114);
			LOC112 = (LOC115 == ((NU8) 2));
			if (!(LOC112)) goto LA116;
			LOC117 = 0;
			LOC117 = zero_370421();
			LOC118 = 0;
			LOC118 = ple_374126(m, LOC117, b);
			LOC112 = (LOC118 == ((NU8) 2));
			LA116: ;
			LOC111 = LOC112;
			if (!(LOC111)) goto LA119;
			LOC120 = 0;
			LOC120 = HEX5BHEX5D_227698(a, 1);
			LOC121 = 0;
			LOC121 = ple_374126(m, LOC120, b);
			LOC111 = (LOC121 == ((NU8) 2));
			LA119: ;
			if (!LOC111) goto LA122;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA122: ;
	}
	LA107: ;
	{
		NU16 LOC126;
		LOC126 = 0;
		LOC126 = getmagic_262845(b);
		if (!(LOC126 == ((NU16) 57) || LOC126 == ((NU16) 64) || LOC126 == ((NU16) 66))) goto LA127;
		{
			NIM_BOOL LOC131;
			tnode226816* LOC132;
			NU8 LOC133;
			tnode226816* LOC135;
			NU8 LOC136;
			LOC131 = 0;
			LOC132 = 0;
			LOC132 = HEX5BHEX5D_227698(b, 1);
			LOC133 = 0;
			LOC133 = ple_374126(m, a, LOC132);
			LOC131 = (LOC133 == ((NU8) 2));
			if (LOC131) goto LA134;
			LOC135 = 0;
			LOC135 = HEX5BHEX5D_227698(b, 2);
			LOC136 = 0;
			LOC136 = ple_374126(m, a, LOC135);
			LOC131 = (LOC136 == ((NU8) 2));
			LA134: ;
			if (!LOC131) goto LA137;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA137: ;
	}
	LA127: ;
	{
		NU16 LOC141;
		LOC141 = 0;
		LOC141 = getmagic_262845(a);
		if (!(LOC141 == ((NU16) 56) || LOC141 == ((NU16) 63) || LOC141 == ((NU16) 65))) goto LA142;
		{
			NIM_BOOL LOC146;
			tnode226816* LOC147;
			NU8 LOC148;
			tnode226816* LOC150;
			NU8 LOC151;
			LOC146 = 0;
			LOC147 = 0;
			LOC147 = HEX5BHEX5D_227698(a, 1);
			LOC148 = 0;
			LOC148 = ple_374126(m, LOC147, b);
			LOC146 = (LOC148 == ((NU8) 2));
			if (LOC146) goto LA149;
			LOC150 = 0;
			LOC150 = HEX5BHEX5D_227698(a, 2);
			LOC151 = 0;
			LOC151 = ple_374126(m, LOC150, b);
			LOC146 = (LOC151 == ((NU8) 2));
			LA149: ;
			if (!LOC146) goto LA152;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA152: ;
	}
	LA142: ;
	result = pleviamodel_374118(m, a, b);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, provele_374995)(tnodeseq226810* m, tnode226816* a, tnode226816* b) {
	NU8 result;
	tnode226816* x;
	tnode226816* LOC1;
	tnode226816* LOC2;
	tnode226816* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = buildcall_369979(ople_369416, a, b);
	x = canon_370513(LOC1);
	LOC2 = 0;
	LOC2 = HEX5BHEX5D_227698(x, 1);
	LOC3 = 0;
	LOC3 = HEX5BHEX5D_227698(x, 2);
	result = ple_374126(m, LOC2, LOC3);
	{
		tnode226816* y;
		tnode226816* LOC8;
		tnode226816* LOC9;
		tnode226816* LOC10;
		tnode226816* LOC11;
		tnode226816* LOC12;
		NU8 LOC13;
		if (!(result == ((NU8) 0))) goto LA6;
		LOC8 = 0;
		LOC8 = one_370430();
		LOC9 = 0;
		LOC9 = buildcall_369979(opadd_369424, b, LOC8);
		LOC10 = 0;
		LOC10 = buildcall_369979(ople_369416, LOC9, a);
		y = canon_370513(LOC10);
		LOC11 = 0;
		LOC11 = HEX5BHEX5D_227698(y, 1);
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_227698(y, 2);
		LOC13 = 0;
		LOC13 = ple_374126(m, LOC11, LOC12);
		result = HEX7E_373633(LOC13);
	}
	LA6: ;
	return result;
}

N_NIMCALL(tnode226816*, lowbound_370448)(tnode226816* x) {
	tnode226816* result;
	NI64 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = firstord_264004((*x).Typ);
	result = newintnode_227096(((NU8) 6), LOC1);
	(*result).Info = (*x).Info;
	return result;
}

N_NIMCALL(tnode226816*, highbound_370458)(tnode226816* x) {
	tnode226816* result;
	result = 0;
	{
		ttype226852* LOC3;
		NI64 LOC6;
		LOC3 = 0;
		LOC3 = skiptypes_231245((*x).Typ, IL64(211106232576256));
		if (!((*LOC3).Kind == ((NU8) 16))) goto LA4;
		LOC6 = 0;
		LOC6 = lastord_264010((*x).Typ);
		result = newintnode_227096(((NU8) 6), LOC6);
	}
	goto LA1;
	LA4: ;
	{
		tnode226816* LOC8;
		tnode226816* LOC9;
		LOC8 = 0;
		LOC8 = buildcall_369940(oplen_369428, x);
		LOC9 = 0;
		LOC9 = minusone_370439();
		result = buildcall_369979(opadd_369424, LOC8, LOC9);
	}
	LA1: ;
	(*result).Info = (*x).Info;
	return result;
}

N_NIMCALL(tnode226816*, HEX2BHEX40_370779)(tnode226816* a, NI64 b) {
	tnode226816* result;
	tnode226816* LOC1;
	result = 0;
	LOC1 = 0;
	{
		tnode226816* LOC6;
		if (!!((b == IL64(0)))) goto LA4;
		LOC6 = 0;
		LOC6 = newintnode_227096(((NU8) 6), b);
		LOC1 = buildcall_369979(opadd_369424, a, LOC6);
	}
	goto LA2;
	LA4: ;
	{
		LOC1 = a;
	}
	LA2: ;
	result = canon_370513(LOC1);
	return result;
}

N_NIMCALL(NI64, simpleslice_374066)(tnode226816* a, tnode226816* b) {
	NI64 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametree_371425(a, b);
		if (!LOC3) goto LA4;
		{
			NIM_BOOL LOC8;
			NU16 LOC9;
			tnode226816* LOC11;
			tnode226816* LOC14;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = getmagic_262845(a);
			LOC8 = (LOC9 == ((NU16) 37) || LOC9 == ((NU16) 42) || LOC9 == ((NU16) 47) || LOC9 == ((NU16) 19));
			if (!(LOC8)) goto LA10;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_227698(a, 2);
			LOC8 = ((*LOC11).Kind >= ((NU8) 5) && (*LOC11).Kind <= ((NU8) 15));
			LA10: ;
			if (!LOC8) goto LA12;
			LOC14 = 0;
			LOC14 = HEX5BHEX5D_227698(a, 2);
			result = (*LOC14).kindU.S1.Intval;
		}
		goto LA6;
		LA12: ;
		{
			result = IL64(0);
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		result = IL64(-1);
	}
	LA1: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_guardsInit)(void) {
	asgnRefNoCycle((void**) (&ople_369416), createmagic_369405(((NimStringDesc*) &TMP901), ((NU16) 73)));
	asgnRefNoCycle((void**) (&oplt_369417), createmagic_369405(((NimStringDesc*) &TMP902), ((NU16) 74)));
	asgnRefNoCycle((void**) (&opand_369418), createmagic_369405(((NimStringDesc*) &TMP903), ((NU16) 134)));
	asgnRefNoCycle((void**) (&opor_369419), createmagic_369405(((NimStringDesc*) &TMP904), ((NU16) 135)));
	asgnRefNoCycle((void**) (&opnot_369420), createmagic_369405(((NimStringDesc*) &TMP905), ((NU16) 105)));
	asgnRefNoCycle((void**) (&opisnil_369421), createmagic_369405(((NimStringDesc*) &TMP906), ((NU16) 168)));
	asgnRefNoCycle((void**) (&opcontains_369422), createmagic_369405(((NimStringDesc*) &TMP907), ((NU16) 159)));
	asgnRefNoCycle((void**) (&opeq_369423), createmagic_369405(((NimStringDesc*) &TMP908), ((NU16) 72)));
	asgnRefNoCycle((void**) (&opadd_369424), createmagic_369405(((NimStringDesc*) &TMP909), ((NU16) 37)));
	asgnRefNoCycle((void**) (&opsub_369425), createmagic_369405(((NimStringDesc*) &TMP910), ((NU16) 38)));
	asgnRefNoCycle((void**) (&opmul_369426), createmagic_369405(((NimStringDesc*) &TMP911), ((NU16) 39)));
	asgnRefNoCycle((void**) (&opdiv_369427), createmagic_369405(((NimStringDesc*) &TMP912), ((NU16) 40)));
	asgnRefNoCycle((void**) (&oplen_369428), createmagic_369405(((NimStringDesc*) &TMP913), ((NU16) 30)));
}

NIM_EXTERNC N_NOINLINE(void, HEX00_guardsDatInit)(void) {
NTI374438.size = sizeof(treplacements374438*);
NTI374438.kind = 24;
NTI374438.base = (&NTI517908);
NTI374438.flags = 2;
NTI374438.marker = TMP3873;
}

