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

#include <string.h>
typedef struct tsym225846 tsym225846;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tident200021 tident200021;
typedef struct tlineinfo195539 tlineinfo195539;
typedef struct tidobj200015 tidobj200015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq225848 ttypeseq225848;
typedef struct ttype225852 ttype225852;
typedef struct tscope225840 tscope225840;
typedef struct TY225947 TY225947;
typedef struct tinstantiation225836 tinstantiation225836;
typedef struct tstrtable225820 tstrtable225820;
typedef struct tsymseq225818 tsymseq225818;
typedef struct tnode225816 tnode225816;
typedef struct tloc225830 tloc225830;
typedef struct trope177009 trope177009;
typedef struct tlib225834 tlib225834;
typedef struct tcell44935 tcell44935;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
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 tnodeseq225810 tnodeseq225810;
typedef struct TY268081 TY268081;
typedef struct TY84745 TY84745;
typedef struct treplacements373438 treplacements373438;
typedef struct TY516908 TY516908;
typedef struct TY225936 TY225936;
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  tlineinfo195539  {
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  tidobj200015  {
  TNimObject Sup;
NI Id;
};
struct  tstrtable225820  {
NI Counter;
tsymseq225818* Data;
};
struct  tloc225830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype225852* T;
trope177009* R;
trope177009* Heaproot;
};
struct  tsym225846  {
  tidobj200015 Sup;
NU8 Kind;
union {
struct {ttypeseq225848* Typeinstcache;
tscope225840* Typscope;
} S1;
struct {TY225947* Procinstcache;
tscope225840* Scope;
} S2;
struct {TY225947* Usedgenerics;
tstrtable225820 Tab;
} S3;
struct {tsym225846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype225852* Typ;
tident200021* Name;
tlineinfo195539 Info;
tsym225846* Owner;
NU32 Flags;
tnode225816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc225830 Loc;
tlib225834* Annex;
tnode225816* Constraint;
};
struct  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** 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;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  tnode225816  {
ttype225852* Typ;
tlineinfo195539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym225846* Sym;
} S4;
struct {tident200021* Ident;
} S5;
struct {tnodeseq225810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  tident200021  {
  tidobj200015 Sup;
NimStringDesc* S;
tident200021* Next;
NI H;
};
struct TY268081 {
NI Field0;
NI Field1;
};
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
struct  ttype225852  {
  tidobj200015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq225848* Sons;
tnode225816* N;
tsym225846* Owner;
tsym225846* Sym;
tsym225846* Destructor;
tsym225846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc225830 Loc;
};
struct TY516908 {
tnode225816* Field0;
tnode225816* Field1;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef NU8 TY532622[33];
struct  tscope225840  {
NI Depthlevel;
tstrtable225820 Symbols;
tnodeseq225810* Usingsyms;
tscope225840* Parent;
};
struct  tinstantiation225836  {
tsym225846* Sym;
ttypeseq225848* Concretetypes;
TY225936* Usedby;
};
struct  trope177009  {
  TNimObject Sup;
trope177009* Left;
trope177009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  tlib225834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope177009* Name;
tnode225816* Path;
};
typedef NI TY26420[8];
struct  tpagedesc44943  {
tpagedesc44943* 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 ttypeseq225848 {
  TGenericSeq Sup;
  ttype225852* data[SEQ_DECL_SIZE];
};
struct TY225947 {
  TGenericSeq Sup;
  tinstantiation225836* data[SEQ_DECL_SIZE];
};
struct tsymseq225818 {
  TGenericSeq Sup;
  tsym225846* data[SEQ_DECL_SIZE];
};
struct tnodeseq225810 {
  TGenericSeq Sup;
  tnode225816* data[SEQ_DECL_SIZE];
};
struct treplacements373438 {
  TGenericSeq Sup;
  TY516908 data[SEQ_DECL_SIZE];
};
struct TY225936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(tsym225846*, createmagic_368405)(NimStringDesc* name, NU16 m);
N_NIMCALL(tsym225846*, newsym_226074)(NU8 symkind, tident200021* name, tsym225846* owner, tlineinfo195539 info);
N_NIMCALL(tident200021*, getident_200472)(NimStringDesc* identifier);
N_NIMCALL(tlineinfo195539, unknownlineinfo_196405)(void);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
N_NIMCALL(NU8, doesimply_372871)(tnodeseq225810* facts, tnode225816* prop);
N_NIMCALL(NU8, factimplies_372643)(tnode225816* fact, tnode225816* prop);
N_NIMCALL(NU16, getmagic_261845)(tnode225816* op);
N_NIMCALL(NU8, HEX7E_372633)(NU8 x);
N_NIMCALL(void, internalerror_197987)(tlineinfo195539 info, NimStringDesc* errmsg);
N_NIMCALL(NU8, impliesisnil_371845)(tnode225816* fact, tnode225816* eq);
N_NIMCALL(NIM_BOOL, sametree_370425)(tnode225816* a, tnode225816* b);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NI, sonslen_226249)(tnode225816* n);
N_NIMCALL(NU8, valueisnil_371812)(tnode225816* n);
N_NIMCALL(tnode225816*, skipconv_273732)(tnode225816* n);
N_NIMCALL(NU8, implieseq_370905)(tnode225816* fact, tnode225816* eq);
N_NIMCALL(NIM_BOOL, islocation_368070)(tnode225816* n);
N_NIMCALL(NIM_BOOL, isvalue_368046)(tnode225816* n);
N_NIMCALL(NIM_BOOL, valuesunequal_370828)(tnode225816* a, tnode225816* b);
N_NIMCALL(NIM_BOOL, samevalue_235350)(tnode225816* a, tnode225816* b);
N_NIMCALL(NIM_BOOL, inset_284019)(tnode225816* s, tnode225816* elem);
N_NIMCALL(NU8, impliesle_372295)(tnode225816* fact, tnode225816* x, tnode225816* c);
N_NIMCALL(NU8, impliesge_371996)(tnode225816* fact, tnode225816* x, tnode225816* c);
N_NIMCALL(void, internalerror_198006)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_198126)(TY84745 x_198130);
N_NIMCALL(NIM_BOOL, levalue_235487)(tnode225816* a, tnode225816* b);
N_NIMCALL(tnode225816*, pred_370839)(tnode225816* n);
N_NIMCALL(tnode225816*, copynode_226323)(tnode225816* src);
N_NIMCALL(NU8, implieslt_372587)(tnode225816* fact, tnode225816* x, tnode225816* c);
N_NIMCALL(NU8, impliesin_371520)(tnode225816* fact, tnode225816* loc, tnode225816* aset);
N_NIMCALL(NU8, comparesets_371509)(tnode225816* a, tnode225816* b);
N_NIMCALL(NIM_BOOL, equalsets_284082)(tnode225816* a, tnode225816* b);
static N_INLINE(NI, len_226364)(tnode225816* n);
N_NIMCALL(tnode225816*, intersectsets_284061)(tnode225816* a, tnode225816* b);
N_NIMCALL(NU8, leimpliesin_371200)(tnode225816* x, tnode225816* c, tnode225816* aset);
N_NIMCALL(tnode225816*, newintnode_226096)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, firstord_263004)(ttype225852* t);
N_NIMCALL(NU8, geimpliesin_371361)(tnode225816* x, tnode225816* c, tnode225816* aset);
N_NIMCALL(NI64, lastord_263010)(ttype225852* t);
N_NIMCALL(tnode225816*, neg_368516)(tnode225816* n);
N_NIMCALL(tnode225816*, swapargs_368435)(tnode225816* fact, tsym225846* newop);
N_NIMCALL(tnode225816*, newnodei_228007)(NU8 kind, tlineinfo195539 info, NI children);
N_NIMCALL(tnode225816*, newsymnode_226132)(tsym225846* sym);
N_NIMCALL(ttype225852*, skiptypes_230245)(ttype225852* t, NU64 kinds);
N_NIMCALL(tnode225816*, newnodeit_226145)(NU8 kind, tlineinfo195539 info, ttype225852* typ);
N_NIMCALL(void, add_226498)(tnode225816* father, tnode225816* son);
N_NIMCALL(NI64, lengthord_263016)(ttype225852* t);
N_NIMCALL(tnode225816*, complement_284966)(tnode225816* a);
N_NIMCALL(tnode225816*, buildcall_368940)(tsym225846* op, tnode225816* a);
N_NIMCALL(tnode225816*, buildproperfieldcheck_374841)(tnode225816* access, tnode225816* check);
N_NIMCALL(tnode225816*, copytree_226329)(tnode225816* src);
N_NIMCALL(void, message_197976)(tlineinfo195539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, rendertree_250058)(tnode225816* n, NU8 renderflags);
N_NIMCALL(NIM_BOOL, hassubtree_370723)(tnode225816* n, tnode225816* x);
static N_INLINE(NI, safelen_226424)(tnode225816* n);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NIM_BOOL, isletlocation_368271)(tnode225816* m, NIM_BOOL isapprox);
N_NIMCALL(NIM_BOOL, isconstexpr_261921)(tnode225816* n);
N_NIMCALL(NIM_BOOL, islet_368080)(tnode225816* n);
N_NIMCALL(NIM_BOOL, isvar_368173)(tnode225816* n);
N_NIMCALL(tnode225816*, buildof_374058)(tnode225816* it, tnode225816* loc);
N_NIMCALL(ttype225852*, settype_374048)(tnode225816* n);
N_NIMCALL(ttype225852*, newtype_226083)(NU8 kind, tsym225846* owner);
N_NIMCALL(void, addsonskipintlit_282574)(ttype225852* father, ttype225852* son);
N_NIMCALL(tnode225816*, buildelse_374166)(tnode225816* n);
N_NIMCALL(tnode225816*, usefulfact_369790)(tnode225816* n);
static N_INLINE(tnode225816*, lastson_226261)(tnode225816* n);
N_NIMCALL(void, addfact_370349)(tnodeseq225810** m, tnode225816* n_370353);
N_NIMCALL(tnode225816*, shallowcopy_231347)(tnode225816* src);
N_NIMCALL(tnode225816*, canon_369513)(tnode225816* n);
N_NIMCALL(tnode225816*, buildcall_368979)(tsym225846* op, tnode225816* a, tnode225816* b);
static N_INLINE(tnode225816*, HEX5BHEX5D_226698)(tnode225816* n, NI i);
N_NIMCALL(tnode225816*, minusone_369439)(void);
N_NIMCALL(tnode225816*, negate_369251)(tnode225816* a, tnode225816* b_369254, tnode225816* res);
N_NIMCALL(NI64, HEX7CHEX2BHEX7C_303019)(NI64 a, NI64 b);
N_NIMCALL(tnode225816*, reassociation_369477)(tnode225816* n);
N_NIMCALL(tnode225816*, HEX7CHEX2BHEX7C_369033)(tnode225816* a, tnode225816* b);
N_NIMCALL(tnode225816*, HEX7CHEX2AHEX7C_369142)(tnode225816* a, tnode225816* b);
N_NIMCALL(NI64, HEX7CHEX2AHEX7C_303078)(NI64 a, NI64 b);
N_NIMCALL(NU8, ple_373126)(tnodeseq225810* m, tnode225816* a, tnode225816* b);
N_NIMCALL(NIM_BOOL, isordinaltype_263092)(ttype225852* t);
N_NIMCALL(tnode225816*, zero_369421)(void);
N_NIMCALL(tnode225816*, one_369430)(void);
N_NIMCALL(NU8, pleviamodel_373118)(tnodeseq225810* model, tnode225816* aa, tnode225816* bb);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP3872)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(tnode225816*, applyreplacements_373512)(tnode225816* n, treplacements373438* rep);
N_NIMCALL(tnode225816*, replacesubtree_373445)(tnode225816* n, tnode225816* x, tnode225816* by);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_79604, TNimType* mt);
N_NIMCALL(NU8, pleviamodelrec_373633)(tnodeseq225810** m, tnode225816* a, tnode225816* b);
STRING_LITERAL(TMP899, "<=", 2);
STRING_LITERAL(TMP900, "<", 1);
STRING_LITERAL(TMP901, "and", 3);
STRING_LITERAL(TMP902, "or", 2);
STRING_LITERAL(TMP903, "not", 3);
STRING_LITERAL(TMP904, "isnil", 5);
STRING_LITERAL(TMP905, "contains", 8);
STRING_LITERAL(TMP906, "==", 2);
STRING_LITERAL(TMP907, "+", 1);
STRING_LITERAL(TMP908, "-", 1);
STRING_LITERAL(TMP909, "*", 1);
STRING_LITERAL(TMP910, "div", 3);
STRING_LITERAL(TMP911, "len", 3);
STRING_LITERAL(TMP3206, "invalid fact", 12);
STRING_LITERAL(TMP3207, "impliesIsNil", 12);
NIM_CONST TY268081 TMP3208 = {1,
2}
;
NIM_CONST TY268081 TMP3209 = {2,
1}
;
STRING_LITERAL(TMP3210, "impliesEq", 9);
STRING_LITERAL(TMP3212, "compiler/guards.nim", 19);
NIM_CONST TY84745 TMP3211 = {((NimStringDesc*) &TMP3212),
520}
;
STRING_LITERAL(TMP3213, "impliesGe", 9);
STRING_LITERAL(TMP3214, "impliesLe", 9);
STRING_LITERAL(TMP3215, "impliesIn", 9);
STRING_LITERAL(TMP3216, "invalid proposition", 19);
static NIM_CONST TY532622 TMP3873 = {
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 TY532622 TMP3874 = {
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}
;
tsym225846* ople_368416;
extern tgcheap47016 gch_47044;
tsym225846* oplt_368417;
tsym225846* opand_368418;
tsym225846* opor_368419;
tsym225846* opnot_368420;
tsym225846* opisnil_368421;
tsym225846* opcontains_368422;
tsym225846* opeq_368423;
tsym225846* opadd_368424;
tsym225846* opsub_368425;
tsym225846* opmul_368426;
tsym225846* opdiv_368427;
tsym225846* oplen_368428;
extern TNimType NTI516908; /* tuple[outer: PNode, inner: PNode] */
TNimType NTI373438; /* TReplacements */
extern TNimType NTI225810; /* TNodeSeq */

N_NIMCALL(tsym225846*, createmagic_368405)(NimStringDesc* name, NU16 m) {
	tsym225846* result;
	tident200021* LOC1;
	tlineinfo195539 LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_200472(name);
	LOC2 = unknownlineinfo_196405();
	result = newsym_226074(((NU8) 12), LOC1, NIM_NIL, LOC2);
	(*result).Magic = m;
	return result;
}

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

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

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

N_NIMCALL(NU8, HEX7E_372633)(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)), (NI64)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, sonslen_226249)(tnode225816* 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_370425)(tnode225816* a, tnode225816* 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_226249(a);
				LOC23 = 0;
				LOC23 = sonslen_226249(b);
				if (!(LOC22 == LOC23)) goto LA24;
				{
					NI i_370673;
					NI HEX3Atmp_370703;
					NI LOC27;
					NI res_370706;
					i_370673 = 0;
					HEX3Atmp_370703 = 0;
					LOC27 = 0;
					LOC27 = sonslen_226249(a);
					HEX3Atmp_370703 = (NI64)(LOC27 - 1);
					res_370706 = 0;
					{
						while (1) {
							if (!(res_370706 <= HEX3Atmp_370703)) goto LA29;
							i_370673 = res_370706;
							{
								NIM_BOOL LOC32;
								LOC32 = 0;
								LOC32 = sametree_370425((*a).kindU.S6.Sons->data[i_370673], (*b).kindU.S6.Sons->data[i_370673]);
								if (!!(LOC32)) goto LA33;
								goto BeforeRet;
							}
							LA33: ;
							res_370706 += 1;
						} LA29: ;
					}
				}
				result = NIM_TRUE;
			}
			LA24: ;
		}
		break;
		}
	}
	goto LA1;
	LA10: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, valueisnil_371812)(tnode225816* 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_371845)(tnode225816* fact, tnode225816* 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_370425((*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;
			tnode225816* LOC13;
			LOC10 = 0;
			LOC10 = sametree_370425((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[1]);
			if (!LOC10) goto LA11;
			LOC13 = 0;
			LOC13 = skipconv_273732((*fact).kindU.S6.Sons->data[2]);
			result = valueisnil_371812(LOC13);
		}
		goto LA8;
		LA11: ;
		{
			NIM_BOOL LOC15;
			tnode225816* LOC18;
			LOC15 = 0;
			LOC15 = sametree_370425((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[1]);
			if (!LOC15) goto LA16;
			LOC18 = 0;
			LOC18 = skipconv_273732((*fact).kindU.S6.Sons->data[1]);
			result = valueisnil_371812(LOC18);
		}
		goto LA8;
		LA16: ;
		LA8: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_197987((*eq).Info, ((NimStringDesc*) &TMP3207));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

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

N_NIMCALL(NIM_BOOL, islocation_368070)(tnode225816* n) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = isvalue_368046(n);
	result = !(LOC1);
	return result;
}

N_NIMCALL(NIM_BOOL, valuesunequal_370828)(tnode225816* a, tnode225816* b) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC7;
		LOC3 = 0;
		LOC3 = isvalue_368046(a);
		if (!(LOC3)) goto LA4;
		LOC3 = isvalue_368046(b);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = samevalue_235350(a, b);
		result = !(LOC7);
	}
	LA5: ;
	return result;
}

N_NIMCALL(NU8, implieseq_370905)(tnode225816* fact, tnode225816* eq) {
	NU8 result;
	TY268081 LOC1;
	NI loc;
	NI val;
	result = 0;
	{
		NIM_BOOL LOC4;
		LOC4 = 0;
		LOC4 = islocation_368070((*eq).kindU.S6.Sons->data[1]);
		if (!LOC4) goto LA5;
		LOC1 = TMP3208;
	}
	goto LA2;
	LA5: ;
	{
		LOC1 = TMP3209;
	}
	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_370425((*fact).kindU.S6.Sons->data[1], (*eq).kindU.S6.Sons->data[loc]);
			if (!LOC11) goto LA12;
			{
				NIM_BOOL LOC16;
				LOC16 = 0;
				LOC16 = sametree_370425((*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_370828((*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_370425((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[loc]);
			if (!LOC24) goto LA25;
			{
				NIM_BOOL LOC29;
				LOC29 = 0;
				LOC29 = sametree_370425((*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_370828((*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_370425((*fact).kindU.S6.Sons->data[2], (*eq).kindU.S6.Sons->data[loc]);
			if (!(LOC39)) goto LA40;
			LOC39 = isvalue_368046((*eq).kindU.S6.Sons->data[val]);
			LA40: ;
			if (!LOC39) goto LA41;
			{
				NIM_BOOL LOC45;
				LOC45 = 0;
				LOC45 = inset_284019((*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_197987((*eq).Info, ((NimStringDesc*) &TMP3210));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

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

N_NIMCALL(NU8, impliesge_371996)(tnode225816* fact, tnode225816* x, tnode225816* c) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = islocation_368070(x);
		if (!!(LOC3)) goto LA4;
		LOC6 = 0;
		LOC6 = HEX24_198126(TMP3211);
		internalerror_198006(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_370425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC10) goto LA11;
			{
				NIM_BOOL LOC15;
				LOC15 = 0;
				LOC15 = isvalue_368046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC15)) goto LA16;
				LOC15 = isvalue_368046(c);
				LA16: ;
				if (!LOC15) goto LA17;
				{
					NIM_BOOL LOC21;
					LOC21 = 0;
					LOC21 = levalue_235487(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_370425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC26) goto LA27;
			{
				NIM_BOOL LOC31;
				LOC31 = 0;
				LOC31 = isvalue_368046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC31)) goto LA32;
				LOC31 = isvalue_368046(c);
				LA32: ;
				if (!LOC31) goto LA33;
				{
					NIM_BOOL LOC37;
					LOC37 = 0;
					LOC37 = levalue_235487(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_370425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC44) goto LA45;
			{
				NIM_BOOL LOC49;
				LOC49 = 0;
				LOC49 = isvalue_368046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC49)) goto LA50;
				LOC49 = isvalue_368046(c);
				LA50: ;
				if (!LOC49) goto LA51;
				{
					NIM_BOOL LOC55;
					LOC55 = 0;
					LOC55 = levalue_235487((*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_370425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC59) goto LA60;
			{
				NIM_BOOL LOC64;
				LOC64 = 0;
				LOC64 = isvalue_368046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC64)) goto LA65;
				LOC64 = isvalue_368046(c);
				LA65: ;
				if (!LOC64) goto LA66;
				{
					tnode225816* LOC70;
					NIM_BOOL LOC71;
					LOC70 = 0;
					LOC70 = pred_370839(c);
					LOC71 = 0;
					LOC71 = levalue_235487(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_370425((*fact).kindU.S6.Sons->data[1], x);
			if (!LOC77) goto LA78;
			{
				NIM_BOOL LOC82;
				LOC82 = 0;
				LOC82 = isvalue_368046((*fact).kindU.S6.Sons->data[2]);
				if (!(LOC82)) goto LA83;
				LOC82 = isvalue_368046(c);
				LA83: ;
				if (!LOC82) goto LA84;
				{
					NIM_BOOL LOC88;
					LOC88 = 0;
					LOC88 = levalue_235487((*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_370425((*fact).kindU.S6.Sons->data[2], x);
			if (!LOC92) goto LA93;
			{
				NIM_BOOL LOC97;
				LOC97 = 0;
				LOC97 = isvalue_368046((*fact).kindU.S6.Sons->data[1]);
				if (!(LOC97)) goto LA98;
				LOC97 = isvalue_368046(c);
				LA98: ;
				if (!LOC97) goto LA99;
				{
					NIM_BOOL LOC103;
					LOC103 = 0;
					LOC103 = levalue_235487(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_197987((*x).Info, ((NimStringDesc*) &TMP3213));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

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

N_NIMCALL(NU8, implieslt_372587)(tnode225816* fact, tnode225816* x, tnode225816* c) {
	NU8 result;
	tnode225816* p;
	result = 0;
	p = pred_370839(c);
	{
		if (!!((p == c))) goto LA3;
		result = impliesle_372295(fact, x, p);
	}
	goto LA1;
	LA3: ;
	{
		tnode225816* q;
		q = pred_370839(x);
		{
			if (!!((q == x))) goto LA8;
			result = impliesle_372295(fact, q, c);
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, len_226364)(tnode225816* 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_371509)(tnode225816* a, tnode225816* b) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = equalsets_284082(a, b);
		if (!LOC3) goto LA4;
		result = ((NU8) 2);
	}
	goto LA1;
	LA4: ;
	{
		tnode225816* LOC7;
		NI LOC8;
		LOC7 = 0;
		LOC7 = intersectsets_284061(a, b);
		LOC8 = 0;
		LOC8 = len_226364(LOC7);
		if (!(LOC8 == 0)) goto LA9;
		result = ((NU8) 1);
	}
	goto LA1;
	LA9: ;
	LA1: ;
	return result;
}

N_NIMCALL(NU8, leimpliesin_371200)(tnode225816* x, tnode225816* c, tnode225816* aset) {
	NU8 result;
	result = 0;
	{
		tnode225816* value;
		NI64 LOC5;
		if (!((*c).Kind >= ((NU8) 5) && (*c).Kind <= ((NU8) 15))) goto LA3;
		LOC5 = 0;
		LOC5 = firstord_263004((*x).Typ);
		value = newintnode_226096((*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_284019(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_371361)(tnode225816* x, tnode225816* c, tnode225816* aset) {
	NU8 result;
	result = 0;
	{
		tnode225816* value;
		NI64 max;
		if (!((*c).Kind >= ((NU8) 5) && (*c).Kind <= ((NU8) 15))) goto LA3;
		value = newintnode_226096((*c).Kind, (*c).kindU.S1.Intval);
		max = lastord_263010((*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_284019(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_371520)(tnode225816* fact, tnode225816* loc, tnode225816* 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_370425((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC4) goto LA5;
			{
				NIM_BOOL LOC9;
				LOC9 = 0;
				LOC9 = inset_284019(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_370425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC14) goto LA15;
			{
				NIM_BOOL LOC19;
				LOC19 = 0;
				LOC19 = inset_284019(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_370425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC26) goto LA27;
			result = comparesets_371509((*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_370425((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC32) goto LA33;
			result = leimpliesin_371200((*fact).kindU.S6.Sons->data[1], (*fact).kindU.S6.Sons->data[2], aset);
		}
		goto LA30;
		LA33: ;
		{
			NIM_BOOL LOC36;
			LOC36 = 0;
			LOC36 = sametree_370425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC36) goto LA37;
			result = geimpliesin_371361((*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;
			tnode225816* LOC45;
			LOC42 = 0;
			LOC42 = sametree_370425((*fact).kindU.S6.Sons->data[1], loc);
			if (!LOC42) goto LA43;
			LOC45 = 0;
			LOC45 = pred_370839((*fact).kindU.S6.Sons->data[2]);
			result = leimpliesin_371200((*fact).kindU.S6.Sons->data[1], LOC45, aset);
		}
		goto LA40;
		LA43: ;
		{
			NIM_BOOL LOC47;
			tnode225816* LOC50;
			LOC47 = 0;
			LOC47 = sametree_370425((*fact).kindU.S6.Sons->data[2], loc);
			if (!LOC47) goto LA48;
			LOC50 = 0;
			LOC50 = pred_370839((*fact).kindU.S6.Sons->data[1]);
			result = geimpliesin_371361((*fact).kindU.S6.Sons->data[2], LOC50, aset);
		}
		goto LA40;
		LA48: ;
		LA40: ;
	}
	break;
	case ((NU16) 105):
	case ((NU16) 135):
	case ((NU16) 134):
	{
		internalerror_197987((*loc).Info, ((NimStringDesc*) &TMP3215));
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, factimplies_372643)(tnode225816* fact, tnode225816* prop) {
	NU8 result;
	NU16 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getmagic_261845(fact);
	switch (LOC1) {
	case ((NU16) 105):
	{
		tnode225816* arg;
		NU16 LOC3;
		arg = (*fact).kindU.S6.Sons->data[1];
		LOC3 = 0;
		LOC3 = getmagic_261845(arg);
		switch (LOC3) {
		case ((NU16) 168):
		case ((NU16) 94):
		{
			NU8 LOC5;
			LOC5 = 0;
			LOC5 = factimplies_372643(arg, prop);
			result = HEX7E_372633(LOC5);
			goto BeforeRet;
		}
		break;
		case ((NU16) 134):
		{
			NU8 a;
			NU8 b;
			a = factimplies_372643((*arg).kindU.S6.Sons->data[1], prop);
			b = factimplies_372643((*arg).kindU.S6.Sons->data[2], prop);
			{
				if (!(a == b)) goto LA9;
				result = HEX7E_372633(a);
				goto BeforeRet;
			}
			LA9: ;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		break;
		default:
		{
			internalerror_197987((*fact).Info, ((NimStringDesc*) &TMP3206));
		}
		break;
		}
	}
	break;
	case ((NU16) 134):
	{
		result = factimplies_372643((*fact).kindU.S6.Sons->data[1], prop);
		{
			if (!!((result == ((NU8) 0)))) goto LA15;
			goto BeforeRet;
		}
		LA15: ;
		result = factimplies_372643((*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_372643(fact, (*prop).kindU.S6.Sons->data[1]);
		result = HEX7E_372633(LOC19);
	}
	break;
	case ((NU16) 168):
	{
		result = impliesisnil_371845(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_370905(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_372295(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_372587(fact, (*prop).kindU.S6.Sons->data[1], (*prop).kindU.S6.Sons->data[2]);
	}
	break;
	case ((NU16) 159):
	{
		result = impliesin_371520(fact, (*prop).kindU.S6.Sons->data[2], (*prop).kindU.S6.Sons->data[1]);
	}
	break;
	default:
	{
		internalerror_197987((*prop).Info, ((NimStringDesc*) &TMP3216));
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, doesimply_372871)(tnodeseq225810* facts, tnode225816* prop) {
	NU8 result;
	result = 0;
	{
		tnode225816* f_373013;
		NI i_373037;
		NI l_373039;
		f_373013 = 0;
		i_373037 = 0;
		l_373039 = facts->Sup.len;
		{
			while (1) {
				if (!(i_373037 < l_373039)) goto LA3;
				f_373013 = facts->data[i_373037];
				{
					if (!!(f_373013 == 0)) goto LA6;
					result = factimplies_372643(f_373013, prop);
					{
						if (!!((result == ((NU8) 0)))) goto LA10;
						goto BeforeRet;
					}
					LA10: ;
				}
				LA6: ;
				i_373037 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, swapargs_368435)(tnode225816* fact, tsym225846* newop) {
	tnode225816* result;
	result = 0;
	result = newnodei_228007(((NU8) 27), (*fact).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(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(tnode225816*, neg_368516)(tnode225816* n) {
	tnode225816* result;
	NU16 LOC5;
	result = 0;
	{
		if (!(n == NIM_NIL)) goto LA3;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = getmagic_261845(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_368435(n, ople_368416);
	}
	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_368435(n, oplt_368417);
	}
	break;
	case ((NU16) 159):
	{
		ttype225852* t;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 39)))) goto LA12;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA12: ;
		t = skiptypes_230245((*(*n).kindU.S6.Sons->data[2]).Typ, IL64(211106232576256));
		result = newnodei_228007(((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]);
		{
			tnode225816* s;
			if (!((*t).Kind == ((NU8) 14))) goto LA16;
			s = newnodeit_226145(((NU8) 39), (*n).Info, (*(*n).kindU.S6.Sons->data[1]).Typ);
			{
				tnode225816* e_368669;
				tnode225816* HEX3Atmp_368913;
				e_368669 = 0;
				HEX3Atmp_368913 = 0;
				HEX3Atmp_368913 = (*t).N;
				{
					NI i_368917;
					NI HEX3Atmp_368919;
					NI LOC20;
					NI res_368921;
					i_368917 = 0;
					HEX3Atmp_368919 = 0;
					LOC20 = 0;
					LOC20 = len_226364(HEX3Atmp_368913);
					HEX3Atmp_368919 = (LOC20 - 1);
					res_368921 = 0;
					{
						while (1) {
							tnode225816* easnode;
							if (!(res_368921 <= HEX3Atmp_368919)) goto LA22;
							i_368917 = res_368921;
							e_368669 = (*HEX3Atmp_368913).kindU.S6.Sons->data[i_368917];
							easnode = newintnode_226096(((NU8) 6), ((NI64) ((*(*e_368669).kindU.S4.Sym).Position)));
							{
								NIM_BOOL LOC25;
								LOC25 = 0;
								LOC25 = inset_284019((*n).kindU.S6.Sons->data[1], easnode);
								if (!!(LOC25)) goto LA26;
								add_226498(s, easnode);
							}
							LA26: ;
							res_368921 += 1;
						} LA22: ;
					}
				}
			}
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), s);
		}
		goto LA14;
		LA16: ;
		{
			NI64 LOC29;
			LOC29 = 0;
			LOC29 = lengthord_263016(t);
			if (!(LOC29 < IL64(1000))) goto LA30;
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), complement_284966((*n).kindU.S6.Sons->data[1]));
		}
		goto LA14;
		LA30: ;
		{
			result = NIM_NIL;
		}
		LA14: ;
	}
	break;
	case ((NU16) 135):
	{
		tnode225816* a;
		tnode225816* b;
		a = neg_368516((*n).kindU.S6.Sons->data[1]);
		b = neg_368516((*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_228007(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(opand_368418));
			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_228007(((NU8) 27), (*n).Info, 2);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(opnot_368420));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), n);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, buildcall_368940)(tsym225846* op, tnode225816* a) {
	tnode225816* result;
	result = 0;
	result = newnodei_228007(((NU8) 27), (*a).Info, 2);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(op));
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), a);
	return result;
}

N_NIMCALL(NU8, impliesnotnil_373055)(tnodeseq225810* facts, tnode225816* arg) {
	NU8 result;
	tnode225816* LOC1;
	tnode225816* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = buildcall_368940(opisnil_368421, arg);
	LOC2 = 0;
	LOC2 = neg_368516(LOC1);
	result = doesimply_372871(facts, LOC2);
	return result;
}

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

N_NIMCALL(void, checkfieldaccess_375021)(tnodeseq225810* m, tnode225816* n) {
	{
		NI i_375035;
		NI HEX3Atmp_375089;
		NI LOC2;
		NI res_375092;
		i_375035 = 0;
		HEX3Atmp_375089 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_375089 = (NI64)(LOC2 - 1);
		res_375092 = 1;
		{
			while (1) {
				tnode225816* check;
				if (!(res_375092 <= HEX3Atmp_375089)) goto LA4;
				i_375035 = res_375092;
				check = buildproperfieldcheck_374841((*n).kindU.S6.Sons->data[0], (*n).kindU.S6.Sons->data[i_375035]);
				{
					NU8 LOC7;
					NimStringDesc* LOC10;
					LOC7 = 0;
					LOC7 = doesimply_372871(m, check);
					if (!!((LOC7 == ((NU8) 2)))) goto LA8;
					LOC10 = 0;
					LOC10 = rendertree_250058((*n).kindU.S6.Sons->data[0], 0);
					message_197976((*n).Info, ((NU16) 251), LOC10);
					goto LA1;
				}
				LA8: ;
				res_375092 += 1;
			} LA4: ;
		}
	} LA1: ;
}

static N_INLINE(NI, safelen_226424)(tnode225816* 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_370723)(tnode225816* n, tnode225816* x) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametree_370425(n, x);
		if (!LOC3) goto LA4;
		result = NIM_TRUE;
	}
	goto LA1;
	LA4: ;
	{
		{
			NI i_370738;
			NI HEX3Atmp_370754;
			NI LOC8;
			NI res_370757;
			i_370738 = 0;
			HEX3Atmp_370754 = 0;
			LOC8 = 0;
			LOC8 = safelen_226424(n);
			HEX3Atmp_370754 = (NI64)(LOC8 - 1);
			res_370757 = 0;
			{
				while (1) {
					if (!(res_370757 <= HEX3Atmp_370754)) goto LA10;
					i_370738 = res_370757;
					{
						NIM_BOOL LOC13;
						LOC13 = 0;
						LOC13 = hassubtree_370723((*n).kindU.S6.Sons->data[i_370738], x);
						if (!LOC13) goto LA14;
						result = NIM_TRUE;
						goto BeforeRet;
					}
					LA14: ;
					res_370757 += 1;
				} LA10: ;
			}
		}
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, invalidatefacts_370774)(tnodeseq225810** m, tnode225816* n) {
	{
		NI i_370789;
		NI HEX3Atmp_370808;
		NI res_370811;
		i_370789 = 0;
		HEX3Atmp_370808 = 0;
		HEX3Atmp_370808 = ((*m)->Sup.len-1);
		res_370811 = 0;
		{
			while (1) {
				if (!(res_370811 <= HEX3Atmp_370808)) goto LA3;
				i_370789 = res_370811;
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = !(((*m)->data[i_370789] == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC6 = hassubtree_370723((*m)->data[i_370789], n);
					LA7: ;
					if (!LOC6) goto LA8;
					asgnRefNoCycle((void**) (&(*m)->data[i_370789]), NIM_NIL);
				}
				LA8: ;
				res_370811 += 1;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, addasgnfact_374618)(tnodeseq225810** m, tnode225816* key, tnode225816* value) {
	tnode225816* fact;
	fact = newnodei_228007(((NU8) 27), (*key).Info, 3);
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[0]), newsymnode_226132(opeq_368423));
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[1]), key);
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[2]), value);
	(*m) = (tnodeseq225810*) incrSeq(&((*m))->Sup, sizeof(tnode225816*));
	asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), fact);
}

N_NIMCALL(NIM_BOOL, islet_368080)(tnode225816* 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;
			ttype225852* LOC12;
			LOC10 = 0;
			LOC10 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 3));
			if (!(LOC10)) goto LA11;
			LOC12 = 0;
			LOC12 = skiptypes_230245((*(*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_368173)(tnode225816* 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_368271)(tnode225816* m, NIM_BOOL isapprox) {
	NIM_BOOL result;
	tnode225816* 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_261921((*n).kindU.S6.Sons->data[1]);
					if (LOC8) goto LA9;
					LOC8 = islet_368080((*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_368080(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_368173(n);
	}
	LA21: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, interestingcaseexpr_368395)(tnode225816* m) {
	NIM_BOOL result;
	result = 0;
	result = isletlocation_368271(m, NIM_TRUE);
	return result;
}

N_NIMCALL(ttype225852*, settype_374048)(tnode225816* n) {
	ttype225852* result;
	result = 0;
	result = newtype_226083(((NU8) 19), (*(*n).Typ).Owner);
	addsonskipintlit_282574(result, (*n).Typ);
	return result;
}

N_NIMCALL(tnode225816*, buildof_374058)(tnode225816* it, tnode225816* loc) {
	tnode225816* result;
	tnode225816* s;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = len_226364(it);
	s = newnodei_228007(((NU8) 39), (*it).Info, (NI64)(LOC1 - 1));
	asgnRefNoCycle((void**) (&(*s).Typ), settype_374048(loc));
	{
		NI i_374074;
		NI HEX3Atmp_374146;
		NI LOC3;
		NI res_374149;
		i_374074 = 0;
		HEX3Atmp_374146 = 0;
		LOC3 = 0;
		LOC3 = len_226364(it);
		HEX3Atmp_374146 = (NI64)(LOC3 - 2);
		res_374149 = 0;
		{
			while (1) {
				if (!(res_374149 <= HEX3Atmp_374146)) goto LA5;
				i_374074 = res_374149;
				asgnRefNoCycle((void**) (&(*s).kindU.S6.Sons->data[i_374074]), (*it).kindU.S6.Sons->data[i_374074]);
				res_374149 += 1;
			} LA5: ;
		}
	}
	result = newnodei_228007(((NU8) 27), (*it).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(opcontains_368422));
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), s);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), loc);
	return result;
}

N_NIMCALL(tnode225816*, buildelse_374166)(tnode225816* n) {
	tnode225816* result;
	tnode225816* s;
	ttype225852* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = settype_374048((*n).kindU.S6.Sons->data[0]);
	s = newnodeit_226145(((NU8) 39), (*n).Info, LOC1);
	{
		NI i_374195;
		NI HEX3Atmp_374489;
		NI LOC3;
		NI res_374492;
		i_374195 = 0;
		HEX3Atmp_374489 = 0;
		LOC3 = 0;
		LOC3 = len_226364(n);
		HEX3Atmp_374489 = (NI64)(LOC3 - 2);
		res_374492 = 1;
		{
			while (1) {
				tnode225816* branch;
				if (!(res_374492 <= HEX3Atmp_374489)) goto LA5;
				i_374195 = res_374492;
				branch = (*n).kindU.S6.Sons->data[i_374195];
				{
					NI j_374411;
					NI HEX3Atmp_374484;
					NI LOC7;
					NI res_374487;
					j_374411 = 0;
					HEX3Atmp_374484 = 0;
					LOC7 = 0;
					LOC7 = len_226364(branch);
					HEX3Atmp_374484 = (NI64)(LOC7 - 2);
					res_374487 = 0;
					{
						while (1) {
							if (!(res_374487 <= HEX3Atmp_374484)) goto LA9;
							j_374411 = res_374487;
							add_226498(s, (*branch).kindU.S6.Sons->data[j_374411]);
							res_374487 += 1;
						} LA9: ;
					}
				}
				res_374492 += 1;
			} LA5: ;
		}
	}
	result = newnodei_228007(((NU8) 27), (*n).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(opcontains_368422));
	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_374755)(tnodeseq225810** m, tnode225816* n, NI i) {
	tnode225816* branch;
	branch = (*n).kindU.S6.Sons->data[i];
	{
		tnode225816* LOC5;
		if (!((*branch).Kind == ((NU8) 85))) goto LA3;
		LOC5 = 0;
		LOC5 = buildof_374058(branch, (*n).kindU.S6.Sons->data[0]);
		(*m) = (tnodeseq225810*) incrSeq(&((*m))->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), LOC5);
	}
	goto LA1;
	LA3: ;
	{
		tnode225816* LOC7;
		tnode225816* LOC8;
		LOC7 = 0;
		LOC7 = buildelse_374166(n);
		LOC8 = 0;
		LOC8 = neg_368516(LOC7);
		(*m) = (tnodeseq225810*) incrSeq(&((*m))->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), LOC8);
	}
	LA1: ;
}

static N_INLINE(tnode225816*, lastson_226261)(tnode225816* n) {
	tnode225816* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_226249(n);
	result = (*n).kindU.S6.Sons->data[(NI64)(LOC1 - 1)];
	return result;
}

N_NIMCALL(tnode225816*, usefulfact_369790)(tnode225816* n) {
	tnode225816* result;
	NU16 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getmagic_261845(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;
			tnode225816* LOC6;
			NIM_BOOL LOC8;
			LOC5 = 0;
			LOC6 = 0;
			LOC6 = skipconv_273732((*n).kindU.S6.Sons->data[2]);
			LOC5 = ((*LOC6).Kind == ((NU8) 23));
			if (!(LOC5)) goto LA7;
			LOC8 = 0;
			LOC8 = isletlocation_368271((*n).kindU.S6.Sons->data[1], NIM_FALSE);
			if (LOC8) goto LA9;
			LOC8 = isvar_368173((*n).kindU.S6.Sons->data[1]);
			LA9: ;
			LOC5 = LOC8;
			LA7: ;
			if (!LOC5) goto LA10;
			result = buildcall_368940(opisnil_368421, (*n).kindU.S6.Sons->data[1]);
		}
		goto LA3;
		LA10: ;
		{
			{
				NIM_BOOL LOC15;
				LOC15 = 0;
				LOC15 = isletlocation_368271((*n).kindU.S6.Sons->data[1], NIM_TRUE);
				if (LOC15) goto LA16;
				LOC15 = isletlocation_368271((*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_368271((*n).kindU.S6.Sons->data[1], NIM_TRUE);
			if (LOC22) goto LA23;
			LOC22 = isletlocation_368271((*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_368271((*n).kindU.S6.Sons->data[1], NIM_FALSE);
			if (LOC29) goto LA30;
			LOC29 = isvar_368173((*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_368271((*n).kindU.S6.Sons->data[1], NIM_TRUE);
			if (!LOC36) goto LA37;
			result = n;
		}
		LA37: ;
	}
	break;
	case ((NU16) 134):
	{
		tnode225816* a;
		tnode225816* b;
		a = usefulfact_369790((*n).kindU.S6.Sons->data[1]);
		b = usefulfact_369790((*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_228007(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(opand_368418));
			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):
	{
		tnode225816* a;
		a = usefulfact_369790((*n).kindU.S6.Sons->data[1]);
		{
			if (!!((a == NIM_NIL))) goto LA55;
			result = neg_368516(a);
		}
		LA55: ;
	}
	break;
	case ((NU16) 135):
	{
		tnode225816* a;
		tnode225816* LOC58;
		tnode225816* b;
		tnode225816* LOC59;
		LOC58 = 0;
		LOC58 = usefulfact_369790((*n).kindU.S6.Sons->data[1]);
		a = neg_368516(LOC58);
		LOC59 = 0;
		LOC59 = usefulfact_369790((*n).kindU.S6.Sons->data[2]);
		b = neg_368516(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_228007(((NU8) 27), (*n).Info, 3);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(opand_368418));
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), a);
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), b);
			result = neg_368516(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_369790((*(*n).kindU.S4.Sym).Ast);
			}
			LA75: ;
		}
		goto LA67;
		LA71: ;
		{
			tnode225816* LOC80;
			if (!((*n).Kind == ((NU8) 126))) goto LA78;
			LOC80 = 0;
			LOC80 = lastson_226261(n);
			result = usefulfact_369790(LOC80);
		}
		goto LA67;
		LA78: ;
		LA67: ;
	}
	break;
	}
	return result;
}

N_NIMCALL(void, addfact_370349)(tnodeseq225810** m, tnode225816* n_370353) {
	tnode225816* n;
	n = usefulfact_369790(n_370353);
	{
		if (!!((n == NIM_NIL))) goto LA3;
		(*m) = (tnodeseq225810*) incrSeq(&((*m))->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), n);
	}
	LA3: ;
}

N_NIMCALL(void, addfactneg_370396)(tnodeseq225810** m, tnode225816* n_370400) {
	tnode225816* n;
	n = neg_368516(n_370400);
	{
		if (!!((n == NIM_NIL))) goto LA3;
		addfact_370349(m, n);
	}
	LA3: ;
}

N_NIMCALL(void, adddiscriminantfact_374518)(tnodeseq225810** m, tnode225816* n) {
	tnode225816* fact;
	fact = newnodei_228007(((NU8) 27), (*n).Info, 3);
	asgnRefNoCycle((void**) (&(*fact).kindU.S6.Sons->data[0]), newsymnode_226132(opeq_368423));
	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) = (tnodeseq225810*) incrSeq(&((*m))->Sup, sizeof(tnode225816*));
	asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), fact);
}

N_NIMCALL(tnode225816*, buildcall_368979)(tsym225846* op, tnode225816* a, tnode225816* b) {
	tnode225816* result;
	result = 0;
	result = newnodei_228007(((NU8) 29), (*a).Info, 3);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(op));
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), a);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), b);
	return result;
}

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

N_NIMCALL(tnode225816*, minusone_369439)(void) {
	tnode225816* result;
	result = 0;
	result = newintnode_226096(((NU8) 6), IL64(-1));
	return result;
}

N_NIMCALL(tnode225816*, negate_369251)(tnode225816* a, tnode225816* b_369254, tnode225816* res) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tnode225816* b;
		LOC3 = 0;
		LOC3 = ((*b_369254).Kind >= ((NU8) 5) && (*b_369254).Kind <= ((NU8) 15));
		if (!(LOC3)) goto LA4;
		LOC3 = !(((*b_369254).kindU.S1.Intval == (IL64(-9223372036854775807) - IL64(1))));
		LA4: ;
		if (!LOC3) goto LA5;
		b = copynode_226323(b_369254);
		(*b).kindU.S1.Intval = -((*b).kindU.S1.Intval);
		{
			if (!((*a).Kind >= ((NU8) 5) && (*a).Kind <= ((NU8) 15))) goto LA9;
			(*b).kindU.S1.Intval = HEX7CHEX2BHEX7C_303019((*b).kindU.S1.Intval, (*a).kindU.S1.Intval);
			result = b;
		}
		goto LA7;
		LA9: ;
		{
			result = buildcall_368979(opadd_368424, a, b);
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		tnode225816* b;
		if (!((*b_369254).Kind >= ((NU8) 16) && (*b_369254).Kind <= ((NU8) 18))) goto LA13;
		b = copynode_226323(b_369254);
		(*b).kindU.S2.Floatval = -((*b).kindU.S2.Floatval);
		result = buildcall_368979(opadd_368424, a, b);
	}
	goto LA1;
	LA13: ;
	{
		result = res;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, HEX7CHEX2BHEX7C_369033)(tnode225816* a, tnode225816* b) {
	tnode225816* result;
	result = 0;
	result = copynode_226323(a);
	{
		if (!((*a).Kind >= ((NU8) 5) && (*a).Kind <= ((NU8) 15))) goto LA3;
		(*result).kindU.S1.Intval = HEX7CHEX2BHEX7C_303019((*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(tnode225816*, HEX7CHEX2AHEX7C_369142)(tnode225816* a, tnode225816* b) {
	tnode225816* result;
	result = 0;
	result = copynode_226323(a);
	{
		if (!((*a).Kind >= ((NU8) 5) && (*a).Kind <= ((NU8) 15))) goto LA3;
		(*result).kindU.S1.Intval = HEX7CHEX2AHEX7C_303078((*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(tnode225816*, reassociation_369477)(tnode225816* n) {
	tnode225816* result;
	NU16 LOC1;
	result = 0;
	result = n;
	LOC1 = 0;
	LOC1 = getmagic_261845(result);
	switch (LOC1) {
	case ((NU16) 37):
	case ((NU16) 42):
	case ((NU16) 47):
	case ((NU16) 19):
	{
		{
			NIM_BOOL LOC5;
			NIM_BOOL LOC6;
			tnode225816* LOC7;
			tnode225816* LOC9;
			NU16 LOC10;
			tnode225816* LOC12;
			tnode225816* LOC13;
			tnode225816* LOC16;
			tnode225816* LOC17;
			tnode225816* LOC18;
			tnode225816* LOC19;
			tnode225816* LOC20;
			tnode225816* LOC21;
			LOC5 = 0;
			LOC6 = 0;
			LOC7 = 0;
			LOC7 = HEX5BHEX5D_226698(result, 2);
			LOC6 = isvalue_368046(LOC7);
			if (!(LOC6)) goto LA8;
			LOC9 = 0;
			LOC9 = HEX5BHEX5D_226698(result, 1);
			LOC10 = 0;
			LOC10 = getmagic_261845(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_226698(result, 1);
			LOC13 = 0;
			LOC13 = HEX5BHEX5D_226698(LOC12, 2);
			LOC5 = isvalue_368046(LOC13);
			LA11: ;
			if (!LOC5) goto LA14;
			LOC16 = 0;
			LOC16 = HEX5BHEX5D_226698(result, 1);
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_226698(LOC16, 1);
			LOC18 = 0;
			LOC18 = HEX5BHEX5D_226698(result, 1);
			LOC19 = 0;
			LOC19 = HEX5BHEX5D_226698(LOC18, 2);
			LOC20 = 0;
			LOC20 = HEX5BHEX5D_226698(result, 2);
			LOC21 = 0;
			LOC21 = HEX7CHEX2BHEX7C_369033(LOC19, LOC20);
			result = buildcall_368979(opadd_368424, LOC17, LOC21);
		}
		LA14: ;
	}
	break;
	case ((NU16) 39):
	case ((NU16) 44):
	case ((NU16) 49):
	{
		{
			NIM_BOOL LOC25;
			NIM_BOOL LOC26;
			tnode225816* LOC27;
			tnode225816* LOC29;
			NU16 LOC30;
			tnode225816* LOC32;
			tnode225816* LOC33;
			tnode225816* LOC36;
			tnode225816* LOC37;
			tnode225816* LOC38;
			tnode225816* LOC39;
			tnode225816* LOC40;
			tnode225816* LOC41;
			LOC25 = 0;
			LOC26 = 0;
			LOC27 = 0;
			LOC27 = HEX5BHEX5D_226698(result, 2);
			LOC26 = isvalue_368046(LOC27);
			if (!(LOC26)) goto LA28;
			LOC29 = 0;
			LOC29 = HEX5BHEX5D_226698(result, 1);
			LOC30 = 0;
			LOC30 = getmagic_261845(LOC29);
			LOC26 = (LOC30 == ((NU16) 39) || LOC30 == ((NU16) 44) || LOC30 == ((NU16) 49));
			LA28: ;
			LOC25 = LOC26;
			if (!(LOC25)) goto LA31;
			LOC32 = 0;
			LOC32 = HEX5BHEX5D_226698(result, 1);
			LOC33 = 0;
			LOC33 = HEX5BHEX5D_226698(LOC32, 2);
			LOC25 = isvalue_368046(LOC33);
			LA31: ;
			if (!LOC25) goto LA34;
			LOC36 = 0;
			LOC36 = HEX5BHEX5D_226698(result, 1);
			LOC37 = 0;
			LOC37 = HEX5BHEX5D_226698(LOC36, 1);
			LOC38 = 0;
			LOC38 = HEX5BHEX5D_226698(result, 1);
			LOC39 = 0;
			LOC39 = HEX5BHEX5D_226698(LOC38, 2);
			LOC40 = 0;
			LOC40 = HEX5BHEX5D_226698(result, 2);
			LOC41 = 0;
			LOC41 = HEX7CHEX2AHEX7C_369142(LOC39, LOC40);
			result = buildcall_368979(opadd_368424, LOC37, LOC41);
		}
		LA34: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode225816*, canon_369513)(tnode225816* n) {
	tnode225816* result;
	NU16 LOC11;
	NU16 LOC32;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = safelen_226424(n);
		if (!(1 <= LOC3)) goto LA4;
		result = shallowcopy_231347(n);
		{
			NI i_369539;
			NI HEX3Atmp_369759;
			NI LOC7;
			NI res_369762;
			i_369539 = 0;
			HEX3Atmp_369759 = 0;
			LOC7 = 0;
			LOC7 = len_226364(n);
			HEX3Atmp_369759 = (LOC7 - 1);
			res_369762 = 0;
			{
				while (1) {
					if (!(res_369762 <= HEX3Atmp_369759)) goto LA9;
					i_369539 = res_369762;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_369539]), canon_369513((*n).kindU.S6.Sons->data[i_369539]));
					res_369762 += 1;
				} LA9: ;
			}
		}
	}
	goto LA1;
	LA4: ;
	{
		result = n;
	}
	LA1: ;
	LOC11 = 0;
	LOC11 = getmagic_261845(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_368046((*result).kindU.S6.Sons->data[1]);
			if (!(LOC15)) goto LA16;
			LOC17 = 0;
			LOC17 = isvalue_368046((*result).kindU.S6.Sons->data[2]);
			LOC15 = !(LOC17);
			LA16: ;
			if (!LOC15) goto LA18;
			result = swapargs_368435(result, (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym);
		}
		LA18: ;
	}
	break;
	case ((NU16) 5):
	{
		tnode225816* LOC21;
		tnode225816* LOC22;
		tnode225816* LOC23;
		LOC21 = 0;
		LOC21 = HEX5BHEX5D_226698(result, 1);
		LOC22 = 0;
		LOC22 = buildcall_368940(oplen_368428, LOC21);
		LOC23 = 0;
		LOC23 = minusone_369439();
		result = buildcall_368979(opadd_368424, LOC22, LOC23);
	}
	break;
	case ((NU16) 101):
	case ((NU16) 102):
	{
		tnode225816* LOC25;
		tnode225816* LOC26;
		LOC25 = 0;
		LOC25 = HEX5BHEX5D_226698(result, 1);
		LOC26 = 0;
		LOC26 = newintnode_226096(((NU8) 6), IL64(-1));
		result = buildcall_368979(opadd_368424, LOC25, LOC26);
	}
	break;
	case ((NU16) 38):
	case ((NU16) 43):
	case ((NU16) 48):
	case ((NU16) 20):
	{
		tnode225816* LOC28;
		tnode225816* LOC29;
		LOC28 = 0;
		LOC28 = HEX5BHEX5D_226698(result, 1);
		LOC29 = 0;
		LOC29 = HEX5BHEX5D_226698(result, 2);
		result = negate_369251(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_226132(oplen_368428));
	}
	break;
	default:
	{
	}
	break;
	}
	result = skipconv_273732(result);
	result = reassociation_369477(result);
	LOC32 = 0;
	LOC32 = getmagic_261845(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):
	{
		tnode225816* x;
		tnode225816* y;
		x = HEX5BHEX5D_226698(result, 1);
		y = HEX5BHEX5D_226698(result, 2);
		{
			NIM_BOOL LOC36;
			NIM_BOOL LOC37;
			NIM_BOOL LOC38;
			NI LOC40;
			tnode225816* LOC42;
			tnode225816* 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_226364(x);
			LOC38 = (LOC40 == 3);
			LA39: ;
			LOC37 = LOC38;
			if (!(LOC37)) goto LA41;
			LOC42 = 0;
			LOC42 = HEX5BHEX5D_226698(x, 2);
			LOC37 = isvalue_368046(LOC42);
			LA41: ;
			LOC36 = LOC37;
			if (!(LOC36)) goto LA43;
			LOC44 = 0;
			LOC44 = HEX5BHEX5D_226698(x, 1);
			LOC36 = isletlocation_368271(LOC44, NIM_TRUE);
			LA43: ;
			if (!LOC36) goto LA45;
			LOC47 = 0;
			LOC47 = getmagic_261845(x);
			switch (LOC47) {
			case ((NU16) 38):
			case ((NU16) 43):
			case ((NU16) 48):
			case ((NU16) 20):
			{
				tnode225816* LOC49;
				tnode225816* LOC50;
				tnode225816* LOC51;
				tnode225816* LOC52;
				tnode225816* LOC53;
				LOC49 = 0;
				LOC49 = HEX5BHEX5D_226698(result, 0);
				LOC50 = 0;
				LOC50 = HEX5BHEX5D_226698(x, 1);
				LOC51 = 0;
				LOC51 = HEX5BHEX5D_226698(x, 2);
				LOC52 = 0;
				LOC52 = buildcall_368979(opadd_368424, y, LOC51);
				LOC53 = 0;
				LOC53 = reassociation_369477(LOC52);
				result = buildcall_368979((*LOC49).kindU.S4.Sym, LOC50, LOC53);
			}
			break;
			case ((NU16) 37):
			case ((NU16) 42):
			case ((NU16) 47):
			case ((NU16) 19):
			{
				tnode225816* plus;
				tnode225816* LOC55;
				tnode225816* LOC56;
				LOC55 = 0;
				LOC55 = HEX5BHEX5D_226698(x, 2);
				LOC56 = 0;
				LOC56 = negate_369251(y, LOC55, NIM_NIL);
				plus = reassociation_369477(LOC56);
				{
					tnode225816* LOC61;
					tnode225816* LOC62;
					if (!!((plus == NIM_NIL))) goto LA59;
					LOC61 = 0;
					LOC61 = HEX5BHEX5D_226698(result, 0);
					LOC62 = 0;
					LOC62 = HEX5BHEX5D_226698(x, 1);
					result = buildcall_368979((*LOC61).kindU.S4.Sym, LOC62, plus);
				}
				LA59: ;
			}
			break;
			default:
			{
			}
			break;
			}
		}
		goto LA34;
		LA45: ;
		{
			NIM_BOOL LOC65;
			NIM_BOOL LOC66;
			NIM_BOOL LOC67;
			NI LOC69;
			tnode225816* LOC71;
			tnode225816* 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_226364(y);
			LOC67 = (LOC69 == 3);
			LA68: ;
			LOC66 = LOC67;
			if (!(LOC66)) goto LA70;
			LOC71 = 0;
			LOC71 = HEX5BHEX5D_226698(y, 2);
			LOC66 = isvalue_368046(LOC71);
			LA70: ;
			LOC65 = LOC66;
			if (!(LOC65)) goto LA72;
			LOC73 = 0;
			LOC73 = HEX5BHEX5D_226698(y, 1);
			LOC65 = isletlocation_368271(LOC73, NIM_TRUE);
			LA72: ;
			if (!LOC65) goto LA74;
			LOC76 = 0;
			LOC76 = getmagic_261845(y);
			switch (LOC76) {
			case ((NU16) 38):
			case ((NU16) 43):
			case ((NU16) 48):
			case ((NU16) 20):
			{
				tnode225816* LOC78;
				tnode225816* LOC79;
				tnode225816* LOC80;
				tnode225816* LOC81;
				tnode225816* LOC82;
				LOC78 = 0;
				LOC78 = HEX5BHEX5D_226698(result, 0);
				LOC79 = 0;
				LOC79 = HEX5BHEX5D_226698(y, 1);
				LOC80 = 0;
				LOC80 = HEX5BHEX5D_226698(y, 2);
				LOC81 = 0;
				LOC81 = buildcall_368979(opadd_368424, x, LOC80);
				LOC82 = 0;
				LOC82 = reassociation_369477(LOC81);
				result = buildcall_368979((*LOC78).kindU.S4.Sym, LOC79, LOC82);
			}
			break;
			case ((NU16) 37):
			case ((NU16) 42):
			case ((NU16) 47):
			case ((NU16) 19):
			{
				tnode225816* plus;
				tnode225816* LOC84;
				tnode225816* LOC85;
				LOC84 = 0;
				LOC84 = HEX5BHEX5D_226698(y, 2);
				LOC85 = 0;
				LOC85 = negate_369251(x, LOC84, NIM_NIL);
				plus = reassociation_369477(LOC85);
				{
					NIM_BOOL LOC88;
					NIM_BOOL LOC90;
					tnode225816* LOC93;
					tnode225816* LOC94;
					LOC88 = 0;
					LOC88 = !((plus == NIM_NIL));
					if (!(LOC88)) goto LA89;
					LOC90 = 0;
					LOC90 = isletlocation_368271(x, NIM_TRUE);
					LOC88 = !(LOC90);
					LA89: ;
					if (!LOC88) goto LA91;
					LOC93 = 0;
					LOC93 = HEX5BHEX5D_226698(result, 0);
					LOC94 = 0;
					LOC94 = HEX5BHEX5D_226698(y, 1);
					result = buildcall_368979((*LOC93).kindU.S4.Sym, plus, LOC94);
				}
				LA91: ;
			}
			break;
			default:
			{
			}
			break;
			}
		}
		goto LA34;
		LA74: ;
		LA34: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(void, addfactle_374018)(tnodeseq225810** m, tnode225816* a, tnode225816* b) {
	tnode225816* LOC1;
	tnode225816* LOC2;
	LOC1 = 0;
	LOC1 = buildcall_368979(ople_368416, a, b);
	LOC2 = 0;
	LOC2 = canon_369513(LOC1);
	(*m) = (tnodeseq225810*) incrSeq(&((*m))->Sup, sizeof(tnode225816*));
	asgnRefNoCycle((void**) (&(*m)->data[(*m)->Sup.len-1]), LOC2);
}

N_NIMCALL(tnode225816*, zero_369421)(void) {
	tnode225816* result;
	result = 0;
	result = newintnode_226096(((NU8) 6), IL64(0));
	return result;
}

N_NIMCALL(tnode225816*, one_369430)(void) {
	tnode225816* result;
	result = 0;
	result = newintnode_226096(((NU8) 6), IL64(1));
	return result;
}
N_NIMCALL(void, TMP3872)(void* p, NI op) {
	treplacements373438* a;
	NI LOC1;
	a = (treplacements373438*)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(tnode225816*, replacesubtree_373445)(tnode225816* n, tnode225816* x, tnode225816* by) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametree_370425(n, x);
		if (!LOC3) goto LA4;
		result = by;
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = hassubtree_370723(n, x);
		if (!LOC7) goto LA8;
		result = shallowcopy_231347(n);
		{
			NI i_373462;
			NI HEX3Atmp_373492;
			NI LOC11;
			NI res_373495;
			i_373462 = 0;
			HEX3Atmp_373492 = 0;
			LOC11 = 0;
			LOC11 = safelen_226424(n);
			HEX3Atmp_373492 = (NI64)(LOC11 - 1);
			res_373495 = 0;
			{
				while (1) {
					if (!(res_373495 <= HEX3Atmp_373492)) goto LA13;
					i_373462 = res_373495;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_373462]), replacesubtree_373445((*n).kindU.S6.Sons->data[i_373462], x, by));
					res_373495 += 1;
				} LA13: ;
			}
		}
	}
	goto LA1;
	LA8: ;
	{
		result = n;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, applyreplacements_373512)(tnode225816* n, treplacements373438* rep) {
	tnode225816* result;
	result = 0;
	result = n;
	{
		TY516908 x_373611;
		NI i_373615;
		NI l_373617;
		memset((void*)(&x_373611), 0, sizeof(x_373611));
		i_373615 = 0;
		l_373617 = rep->Sup.len;
		{
			while (1) {
				if (!(i_373615 < l_373617)) goto LA3;
				x_373611.Field0 = rep->data[i_373615].Field0;
				x_373611.Field1 = rep->data[i_373615].Field1;
				result = replacesubtree_373445(result, x_373611.Field0, x_373611.Field1);
				i_373615 += 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(NU8, pleviamodelrec_373633)(tnodeseq225810** m, tnode225816* a, tnode225816* b) {
	NU8 result;
	result = 0;
	{
		NI i_373650;
		NI HEX3Atmp_373721;
		NI res_373724;
		i_373650 = 0;
		HEX3Atmp_373721 = 0;
		HEX3Atmp_373721 = ((*m)->Sup.len-1);
		res_373724 = 0;
		{
			while (1) {
				tnode225816* fact;
				if (!(res_373724 <= HEX3Atmp_373721)) goto LA3;
				i_373650 = res_373724;
				fact = (*m)->data[i_373650];
				{
					NIM_BOOL LOC6;
					NU16 LOC8;
					tnode225816* x;
					tnode225816* y;
					LOC6 = 0;
					LOC6 = !((fact == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC8 = 0;
					LOC8 = getmagic_261845(fact);
					LOC6 = ((TMP3874[LOC8/8] &(1<<(LOC8%8)))!=0);
					LA7: ;
					if (!LOC6) goto LA9;
					x = HEX5BHEX5D_226698(fact, 1);
					y = HEX5BHEX5D_226698(fact, 2);
					asgnRefNoCycle((void**) (&(*m)->data[i_373650]), NIM_NIL);
					{
						NU8 LOC13;
						LOC13 = 0;
						LOC13 = ple_373126((*m), a, x);
						if (!(LOC13 == ((NU8) 2))) goto LA14;
						{
							NU8 LOC18;
							LOC18 = 0;
							LOC18 = ple_373126((*m), y, b);
							if (!(LOC18 == ((NU8) 2))) goto LA19;
							result = ((NU8) 2);
							goto BeforeRet;
						}
						LA19: ;
					}
					LA14: ;
					result = impliesle_372295(fact, a, b);
					{
						if (!!((result == ((NU8) 0)))) goto LA23;
						goto BeforeRet;
					}
					LA23: ;
					{
						NIM_BOOL LOC27;
						LOC27 = 0;
						LOC27 = sametree_370425(y, a);
						if (!LOC27) goto LA28;
						result = ple_373126((*m), b, x);
						{
							if (!!((result == ((NU8) 0)))) goto LA32;
							goto BeforeRet;
						}
						LA32: ;
					}
					LA28: ;
				}
				LA9: ;
				res_373724 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, pleviamodel_373118)(tnodeseq225810* model, tnode225816* aa, tnode225816* bb) {
	NU8 result;
	treplacements373438* replacements;
	tnodeseq225810* m;
	tnode225816* a;
	tnode225816* b;
	result = 0;
	replacements = (treplacements373438*) newSeq((&NTI373438), 0);
	{
		tnode225816* fact_373780;
		NI i_373961;
		NI l_373963;
		fact_373780 = 0;
		i_373961 = 0;
		l_373963 = model->Sup.len;
		{
			while (1) {
				if (!(i_373961 < l_373963)) goto LA3;
				fact_373780 = model->data[i_373961];
				{
					NIM_BOOL LOC6;
					NU16 LOC8;
					tnode225816* a;
					tnode225816* b;
					LOC6 = 0;
					LOC6 = !((fact_373780 == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC8 = 0;
					LOC8 = getmagic_261845(fact_373780);
					LOC6 = ((TMP3873[LOC8/8] &(1<<(LOC8%8)))!=0);
					LA7: ;
					if (!LOC6) goto LA9;
					a = HEX5BHEX5D_226698(fact_373780, 1);
					b = HEX5BHEX5D_226698(fact_373780, 2);
					{
						TY516908 LOC15;
						if (!((*a).Kind == ((NU8) 3))) goto LA13;
						memset((void*)(&LOC15), 0, sizeof(LOC15));
						LOC15.Field0 = a;
						LOC15.Field1 = b;
						replacements = (treplacements373438*) incrSeq(&(replacements)->Sup, sizeof(TY516908));
						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: ;
					{
						TY516908 LOC17;
						memset((void*)(&LOC17), 0, sizeof(LOC17));
						LOC17.Field0 = b;
						LOC17.Field1 = a;
						replacements = (treplacements373438*) incrSeq(&(replacements)->Sup, sizeof(TY516908));
						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_373961 += 1;
			} LA3: ;
		}
	}
	m = 0;
	a = aa;
	b = bb;
	{
		if (!(0 < replacements->Sup.len)) goto LA20;
		m = (tnodeseq225810*) newSeq((&NTI225810), 0);
		{
			tnode225816* fact_373907;
			NI i_373968;
			NI l_373970;
			fact_373907 = 0;
			i_373968 = 0;
			l_373970 = model->Sup.len;
			{
				while (1) {
					if (!(i_373968 < l_373970)) goto LA24;
					fact_373907 = model->data[i_373968];
					{
						NIM_BOOL LOC27;
						NU16 LOC29;
						tnode225816* LOC32;
						tnode225816* LOC33;
						LOC27 = 0;
						LOC27 = !((fact_373907 == NIM_NIL));
						if (!(LOC27)) goto LA28;
						LOC29 = 0;
						LOC29 = getmagic_261845(fact_373907);
						LOC27 = !(((TMP3873[LOC29/8] &(1<<(LOC29%8)))!=0));
						LA28: ;
						if (!LOC27) goto LA30;
						LOC32 = 0;
						LOC32 = applyreplacements_373512(fact_373907, replacements);
						LOC33 = 0;
						LOC33 = canon_369513(LOC32);
						m = (tnodeseq225810*) incrSeq(&(m)->Sup, sizeof(tnode225816*));
						asgnRefNoCycle((void**) (&m->data[m->Sup.len-1]), LOC33);
					}
					LA30: ;
					i_373968 += 1;
				} LA24: ;
			}
		}
		a = applyreplacements_373512(aa, replacements);
		b = applyreplacements_373512(bb, replacements);
	}
	goto LA18;
	LA20: ;
	{
		genericSeqAssign((&m), model, (&NTI225810));
	}
	LA18: ;
	result = pleviamodelrec_373633((&m), a, b);
	return result;
}

N_NIMCALL(NU8, ple_373126)(tnodeseq225810* m, tnode225816* a, tnode225816* b) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isvalue_368046(a);
		if (!(LOC3)) goto LA4;
		LOC3 = isvalue_368046(b);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = levalue_235487(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_368046(b);
		if (!(LOC16)) goto LA17;
		LOC16 = !(((*a).Typ == NIM_NIL));
		LA17: ;
		LOC15 = LOC16;
		if (!(LOC15)) goto LA18;
		LOC15 = isordinaltype_263092((*a).Typ);
		LA18: ;
		if (!LOC15) goto LA19;
		{
			NI64 LOC23;
			LOC23 = 0;
			LOC23 = lastord_263010((*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_368046(a);
		if (!(LOC29)) goto LA30;
		LOC29 = !(((*b).Typ == NIM_NIL));
		LA30: ;
		LOC28 = LOC29;
		if (!(LOC28)) goto LA31;
		LOC28 = isordinaltype_263092((*b).Typ);
		LA31: ;
		if (!LOC28) goto LA32;
		{
			NI64 LOC36;
			LOC36 = 0;
			LOC36 = firstord_263004((*b).Typ);
			if (!(LOC36 <= (*a).kindU.S1.Intval)) goto LA37;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA37: ;
	}
	LA32: ;
	{
		NIM_BOOL LOC41;
		LOC41 = 0;
		LOC41 = sametree_370425(a, b);
		if (!LOC41) goto LA42;
		result = ((NU8) 2);
		goto BeforeRet;
	}
	LA42: ;
	{
		NIM_BOOL LOC46;
		NU16 LOC47;
		LOC46 = 0;
		LOC47 = 0;
		LOC47 = getmagic_261845(b);
		LOC46 = (LOC47 == ((NU16) 27) || LOC47 == ((NU16) 28) || LOC47 == ((NU16) 29) || LOC47 == ((NU16) 30));
		if (!(LOC46)) goto LA48;
		LOC46 = isvalue_368046(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;
		tnode225816* LOC61;
		tnode225816* LOC62;
		NU8 LOC63;
		tnode225816* LOC65;
		NU8 LOC66;
		LOC57 = 0;
		LOC58 = 0;
		LOC59 = 0;
		LOC59 = getmagic_261845(b);
		LOC58 = (LOC59 == ((NU16) 37) || LOC59 == ((NU16) 42) || LOC59 == ((NU16) 47) || LOC59 == ((NU16) 19));
		if (!(LOC58)) goto LA60;
		LOC61 = 0;
		LOC61 = zero_369421();
		LOC62 = 0;
		LOC62 = HEX5BHEX5D_226698(b, 2);
		LOC63 = 0;
		LOC63 = ple_373126(m, LOC61, LOC62);
		LOC58 = (LOC63 == ((NU8) 2));
		LA60: ;
		LOC57 = LOC58;
		if (!(LOC57)) goto LA64;
		LOC65 = 0;
		LOC65 = HEX5BHEX5D_226698(b, 1);
		LOC66 = 0;
		LOC66 = ple_373126(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;
		tnode225816* LOC75;
		tnode225816* LOC76;
		NU8 LOC77;
		tnode225816* LOC79;
		NU8 LOC80;
		LOC71 = 0;
		LOC72 = 0;
		LOC73 = 0;
		LOC73 = getmagic_261845(a);
		LOC72 = (LOC73 == ((NU16) 37) || LOC73 == ((NU16) 42) || LOC73 == ((NU16) 47) || LOC73 == ((NU16) 19));
		if (!(LOC72)) goto LA74;
		LOC75 = 0;
		LOC75 = HEX5BHEX5D_226698(a, 2);
		LOC76 = 0;
		LOC76 = zero_369421();
		LOC77 = 0;
		LOC77 = ple_373126(m, LOC75, LOC76);
		LOC72 = (LOC77 == ((NU8) 2));
		LA74: ;
		LOC71 = LOC72;
		if (!(LOC71)) goto LA78;
		LOC79 = 0;
		LOC79 = HEX5BHEX5D_226698(a, 1);
		LOC80 = 0;
		LOC80 = ple_373126(m, LOC79, b);
		LOC71 = (LOC80 == ((NU8) 2));
		LA78: ;
		if (!LOC71) goto LA81;
		result = ((NU8) 2);
		goto BeforeRet;
	}
	LA81: ;
	{
		NU16 LOC85;
		LOC85 = 0;
		LOC85 = getmagic_261845(b);
		if (!(LOC85 == ((NU16) 39) || LOC85 == ((NU16) 44) || LOC85 == ((NU16) 49))) goto LA86;
		{
			NIM_BOOL LOC90;
			NIM_BOOL LOC91;
			tnode225816* LOC92;
			NU8 LOC93;
			tnode225816* LOC95;
			tnode225816* LOC96;
			NU8 LOC97;
			tnode225816* LOC99;
			tnode225816* LOC100;
			NU8 LOC101;
			LOC90 = 0;
			LOC91 = 0;
			LOC92 = 0;
			LOC92 = HEX5BHEX5D_226698(b, 1);
			LOC93 = 0;
			LOC93 = ple_373126(m, a, LOC92);
			LOC91 = (LOC93 == ((NU8) 2));
			if (!(LOC91)) goto LA94;
			LOC95 = 0;
			LOC95 = one_369430();
			LOC96 = 0;
			LOC96 = HEX5BHEX5D_226698(b, 2);
			LOC97 = 0;
			LOC97 = ple_373126(m, LOC95, LOC96);
			LOC91 = (LOC97 == ((NU8) 2));
			LA94: ;
			LOC90 = LOC91;
			if (!(LOC90)) goto LA98;
			LOC99 = 0;
			LOC99 = zero_369421();
			LOC100 = 0;
			LOC100 = HEX5BHEX5D_226698(b, 1);
			LOC101 = 0;
			LOC101 = ple_373126(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_261845(a);
		if (!(LOC106 == ((NU16) 40) || LOC106 == ((NU16) 45) || LOC106 == ((NU16) 50))) goto LA107;
		{
			NIM_BOOL LOC111;
			NIM_BOOL LOC112;
			tnode225816* LOC113;
			tnode225816* LOC114;
			NU8 LOC115;
			tnode225816* LOC117;
			NU8 LOC118;
			tnode225816* LOC120;
			NU8 LOC121;
			LOC111 = 0;
			LOC112 = 0;
			LOC113 = 0;
			LOC113 = one_369430();
			LOC114 = 0;
			LOC114 = HEX5BHEX5D_226698(a, 2);
			LOC115 = 0;
			LOC115 = ple_373126(m, LOC113, LOC114);
			LOC112 = (LOC115 == ((NU8) 2));
			if (!(LOC112)) goto LA116;
			LOC117 = 0;
			LOC117 = zero_369421();
			LOC118 = 0;
			LOC118 = ple_373126(m, LOC117, b);
			LOC112 = (LOC118 == ((NU8) 2));
			LA116: ;
			LOC111 = LOC112;
			if (!(LOC111)) goto LA119;
			LOC120 = 0;
			LOC120 = HEX5BHEX5D_226698(a, 1);
			LOC121 = 0;
			LOC121 = ple_373126(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_261845(b);
		if (!(LOC126 == ((NU16) 57) || LOC126 == ((NU16) 64) || LOC126 == ((NU16) 66))) goto LA127;
		{
			NIM_BOOL LOC131;
			tnode225816* LOC132;
			NU8 LOC133;
			tnode225816* LOC135;
			NU8 LOC136;
			LOC131 = 0;
			LOC132 = 0;
			LOC132 = HEX5BHEX5D_226698(b, 1);
			LOC133 = 0;
			LOC133 = ple_373126(m, a, LOC132);
			LOC131 = (LOC133 == ((NU8) 2));
			if (LOC131) goto LA134;
			LOC135 = 0;
			LOC135 = HEX5BHEX5D_226698(b, 2);
			LOC136 = 0;
			LOC136 = ple_373126(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_261845(a);
		if (!(LOC141 == ((NU16) 56) || LOC141 == ((NU16) 63) || LOC141 == ((NU16) 65))) goto LA142;
		{
			NIM_BOOL LOC146;
			tnode225816* LOC147;
			NU8 LOC148;
			tnode225816* LOC150;
			NU8 LOC151;
			LOC146 = 0;
			LOC147 = 0;
			LOC147 = HEX5BHEX5D_226698(a, 1);
			LOC148 = 0;
			LOC148 = ple_373126(m, LOC147, b);
			LOC146 = (LOC148 == ((NU8) 2));
			if (LOC146) goto LA149;
			LOC150 = 0;
			LOC150 = HEX5BHEX5D_226698(a, 2);
			LOC151 = 0;
			LOC151 = ple_373126(m, LOC150, b);
			LOC146 = (LOC151 == ((NU8) 2));
			LA149: ;
			if (!LOC146) goto LA152;
			result = ((NU8) 2);
			goto BeforeRet;
		}
		LA152: ;
	}
	LA142: ;
	result = pleviamodel_373118(m, a, b);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, provele_373995)(tnodeseq225810* m, tnode225816* a, tnode225816* b) {
	NU8 result;
	tnode225816* x;
	tnode225816* LOC1;
	tnode225816* LOC2;
	tnode225816* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = buildcall_368979(ople_368416, a, b);
	x = canon_369513(LOC1);
	LOC2 = 0;
	LOC2 = HEX5BHEX5D_226698(x, 1);
	LOC3 = 0;
	LOC3 = HEX5BHEX5D_226698(x, 2);
	result = ple_373126(m, LOC2, LOC3);
	{
		tnode225816* y;
		tnode225816* LOC8;
		tnode225816* LOC9;
		tnode225816* LOC10;
		tnode225816* LOC11;
		tnode225816* LOC12;
		NU8 LOC13;
		if (!(result == ((NU8) 0))) goto LA6;
		LOC8 = 0;
		LOC8 = one_369430();
		LOC9 = 0;
		LOC9 = buildcall_368979(opadd_368424, b, LOC8);
		LOC10 = 0;
		LOC10 = buildcall_368979(ople_368416, LOC9, a);
		y = canon_369513(LOC10);
		LOC11 = 0;
		LOC11 = HEX5BHEX5D_226698(y, 1);
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_226698(y, 2);
		LOC13 = 0;
		LOC13 = ple_373126(m, LOC11, LOC12);
		result = HEX7E_372633(LOC13);
	}
	LA6: ;
	return result;
}

N_NIMCALL(tnode225816*, lowbound_369448)(tnode225816* x) {
	tnode225816* result;
	NI64 LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = firstord_263004((*x).Typ);
	result = newintnode_226096(((NU8) 6), LOC1);
	(*result).Info = (*x).Info;
	return result;
}

N_NIMCALL(tnode225816*, highbound_369458)(tnode225816* x) {
	tnode225816* result;
	result = 0;
	{
		ttype225852* LOC3;
		NI64 LOC6;
		LOC3 = 0;
		LOC3 = skiptypes_230245((*x).Typ, IL64(211106232576256));
		if (!((*LOC3).Kind == ((NU8) 16))) goto LA4;
		LOC6 = 0;
		LOC6 = lastord_263010((*x).Typ);
		result = newintnode_226096(((NU8) 6), LOC6);
	}
	goto LA1;
	LA4: ;
	{
		tnode225816* LOC8;
		tnode225816* LOC9;
		LOC8 = 0;
		LOC8 = buildcall_368940(oplen_368428, x);
		LOC9 = 0;
		LOC9 = minusone_369439();
		result = buildcall_368979(opadd_368424, LOC8, LOC9);
	}
	LA1: ;
	(*result).Info = (*x).Info;
	return result;
}

N_NIMCALL(tnode225816*, HEX2BHEX40_369779)(tnode225816* a, NI64 b) {
	tnode225816* result;
	tnode225816* LOC1;
	result = 0;
	LOC1 = 0;
	{
		tnode225816* LOC6;
		if (!!((b == IL64(0)))) goto LA4;
		LOC6 = 0;
		LOC6 = newintnode_226096(((NU8) 6), b);
		LOC1 = buildcall_368979(opadd_368424, a, LOC6);
	}
	goto LA2;
	LA4: ;
	{
		LOC1 = a;
	}
	LA2: ;
	result = canon_369513(LOC1);
	return result;
}

N_NIMCALL(NI64, simpleslice_373066)(tnode225816* a, tnode225816* b) {
	NI64 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametree_370425(a, b);
		if (!LOC3) goto LA4;
		{
			NIM_BOOL LOC8;
			NU16 LOC9;
			tnode225816* LOC11;
			tnode225816* LOC14;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = getmagic_261845(a);
			LOC8 = (LOC9 == ((NU16) 37) || LOC9 == ((NU16) 42) || LOC9 == ((NU16) 47) || LOC9 == ((NU16) 19));
			if (!(LOC8)) goto LA10;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_226698(a, 2);
			LOC8 = ((*LOC11).Kind >= ((NU8) 5) && (*LOC11).Kind <= ((NU8) 15));
			LA10: ;
			if (!LOC8) goto LA12;
			LOC14 = 0;
			LOC14 = HEX5BHEX5D_226698(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_368416), createmagic_368405(((NimStringDesc*) &TMP899), ((NU16) 73)));
	asgnRefNoCycle((void**) (&oplt_368417), createmagic_368405(((NimStringDesc*) &TMP900), ((NU16) 74)));
	asgnRefNoCycle((void**) (&opand_368418), createmagic_368405(((NimStringDesc*) &TMP901), ((NU16) 134)));
	asgnRefNoCycle((void**) (&opor_368419), createmagic_368405(((NimStringDesc*) &TMP902), ((NU16) 135)));
	asgnRefNoCycle((void**) (&opnot_368420), createmagic_368405(((NimStringDesc*) &TMP903), ((NU16) 105)));
	asgnRefNoCycle((void**) (&opisnil_368421), createmagic_368405(((NimStringDesc*) &TMP904), ((NU16) 168)));
	asgnRefNoCycle((void**) (&opcontains_368422), createmagic_368405(((NimStringDesc*) &TMP905), ((NU16) 159)));
	asgnRefNoCycle((void**) (&opeq_368423), createmagic_368405(((NimStringDesc*) &TMP906), ((NU16) 72)));
	asgnRefNoCycle((void**) (&opadd_368424), createmagic_368405(((NimStringDesc*) &TMP907), ((NU16) 37)));
	asgnRefNoCycle((void**) (&opsub_368425), createmagic_368405(((NimStringDesc*) &TMP908), ((NU16) 38)));
	asgnRefNoCycle((void**) (&opmul_368426), createmagic_368405(((NimStringDesc*) &TMP909), ((NU16) 39)));
	asgnRefNoCycle((void**) (&opdiv_368427), createmagic_368405(((NimStringDesc*) &TMP910), ((NU16) 40)));
	asgnRefNoCycle((void**) (&oplen_368428), createmagic_368405(((NimStringDesc*) &TMP911), ((NU16) 30)));
}

NIM_EXTERNC N_NOINLINE(void, HEX00_guardsDatInit)(void) {
NTI373438.size = sizeof(treplacements373438*);
NTI373438.kind = 24;
NTI373438.base = (&NTI516908);
NTI373438.flags = 2;
NTI373438.marker = TMP3872;
}

