/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/magicsys.o compiler/nimcache/magicsys.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>
typedef struct tsym188833 tsym188833;
typedef struct ttype188837 ttype188837;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct TGenericSeq TGenericSeq;
typedef struct NimStringDesc NimStringDesc;
typedef struct tident167019 tident167019;
typedef struct tidobj167013 tidobj167013;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct tnode188803 tnode188803;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tlib188821 tlib188821;
typedef struct tcell41090 tcell41090;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct tidentiter197106 tidentiter197106;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct TY188922 TY188922;
typedef struct tlistentry118017 tlistentry118017;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
typedef ttype188837* TY242045[62];
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
typedef ttype188837* TY242287[70];
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tidentiter197106  {
NI H;
tident167019* Name;
};
struct  tnode188803  {
ttype188837* Typ;
tlineinfo163527 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym188833* Sym;
} S4;
struct {tident167019* Ident;
} S5;
struct {tnodeseq188797* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, initstrtable_189110)(tstrtable188807* x);
N_NIMCALL(ttype188837*, systypefromname_242204)(NimStringDesc* name);
N_NIMCALL(tsym188833*, getsyssym_242040)(NimStringDesc* name);
N_NIMCALL(tsym188833*, strtableget_197084)(tstrtable188807 t, tident167019* name);
N_NIMCALL(tident167019*, getident_167456)(NimStringDesc* identifier);
N_NIMCALL(void, rawmessage_165386)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(tsym188833*, newsym_189053)(NU8 symkind, tident167019* name, tsym188833* owner, tlineinfo163527 info);
N_NIMCALL(ttype188837*, newtype_189060)(NU8 kind, tsym188833* owner);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
N_NIMCALL(void, loadstub_239239)(tsym188833* s);
N_NIMCALL(ttype188837*, newsystype_242075)(NU8 kind, NI size);
N_NIMCALL(void, internalerror_165606)(NimStringDesc* errmsg);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_75880, TNimType* typ);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
static N_INLINE(ttype188837*, skipintlit_242424)(ttype188837* t);
N_NIMCALL(ttype188837*, getsystype_242024)(NU8 kind);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, propagatetoowner_192852)(ttype188837* owner, ttype188837* elem);
N_NIMCALL(tsym188833*, initidentiter_197110)(tidentiter197106* ti, tstrtable188807 tab, tident167019* s);
N_NIMCALL(tsym188833*, nextidentiter_197117)(tidentiter197106* ti, tstrtable188807 tab);
N_NIMCALL(void, strtableadd_197078)(tstrtable188807* t, tsym188833* n);
N_NIMCALL(ttype188837*, copytype_189141)(ttype188837* t, tsym188833* owner, NIM_BOOL keepid);
N_NIMCALL(ttype188837*, getintlittype_242378)(tnode188803* literal);
N_NIMCALL(void, internalerror_165591)(tlineinfo163527 info, NimStringDesc* errmsg);
N_NIMCALL(tident167019*, getident_167462)(NimStringDesc* identifier, NI h);
N_NIMCALL(NI, hashignorestyle_119859)(NimStringDesc* x);
STRING_LITERAL(TMP2499, "int", 3);
STRING_LITERAL(TMP2500, "int8", 4);
STRING_LITERAL(TMP2501, "int16", 5);
STRING_LITERAL(TMP2502, "int32", 5);
STRING_LITERAL(TMP2503, "int64", 5);
STRING_LITERAL(TMP2504, "uint", 4);
STRING_LITERAL(TMP2505, "uint8", 5);
STRING_LITERAL(TMP2506, "uint16", 6);
STRING_LITERAL(TMP2507, "uint32", 6);
STRING_LITERAL(TMP2508, "uint64", 6);
STRING_LITERAL(TMP2509, "float", 5);
STRING_LITERAL(TMP2510, "float32", 7);
STRING_LITERAL(TMP2511, "float64", 7);
STRING_LITERAL(TMP2512, "float128", 8);
STRING_LITERAL(TMP2513, "bool", 4);
STRING_LITERAL(TMP2514, "char", 4);
STRING_LITERAL(TMP2515, "string", 6);
STRING_LITERAL(TMP2516, "cstring", 7);
STRING_LITERAL(TMP2517, "pointer", 7);
STRING_LITERAL(TMP2518, "request for typekind: ", 22);
STRING_LITERAL(TMP2519, "wanted: ", 8);
STRING_LITERAL(TMP2520, " got: ", 6);
STRING_LITERAL(TMP2521, "type not found: ", 16);
STRING_LITERAL(TMP3040, "invalid int size", 16);
tsym188833* systemmodule_242017;
TY242045 gsystypes_242048;
tstrtable188807 compilerprocs_242049;
TY242287 inttypecache_242289;
extern tgcheap43016 gch_43044;
extern NI ptrsize_142592;
extern TNimType NTI188240; /* TTypeKind */
extern TNimType NTI188835; /* TTypeSeq */
extern NI intsize_142590;
extern tstrtable188807 rodcompilerprocs_236058;

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

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

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

N_NIMCALL(tsym188833*, getsyssym_242040)(NimStringDesc* name) {
	tsym188833* result;
	tident167019* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_167456(name);
	result = strtableget_197084((*systemmodule_242017).kindU.S3.Tab, LOC1);
	{
		tident167019* LOC6;
		if (!(result == NIM_NIL)) goto LA4;
		rawmessage_165386(((NU16) 64), name);
		LOC6 = 0;
		LOC6 = getident_167456(name);
		result = newsym_189053(((NU8) 0), LOC6, systemmodule_242017, (*systemmodule_242017).Info);
		asgnRefNoCycle((void**) &(*result).Typ, newtype_189060(((NU8) 50), systemmodule_242017));
	}
	LA4: ;
	{
		if (!((*result).Kind == ((NU8) 23))) goto LA9;
		loadstub_239239(result);
	}
	LA9: ;
	return result;
}

N_NIMCALL(ttype188837*, systypefromname_242204)(NimStringDesc* name) {
	ttype188837* result;
	tsym188833* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getsyssym_242040(name);
	result = (*LOC1).Typ;
	return result;
}

N_NIMCALL(ttype188837*, newsystype_242075)(NU8 kind, NI size) {
	ttype188837* result;
	result = 0;
	result = newtype_189060(kind, systemmodule_242017);
	(*result).Size = ((NI64) (size));
	(*result).Align = size;
	return result;
}

static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	memcpy(((NCSTRING) (&(*dest).data[((*dest).Sup.len)- 0])), ((NCSTRING) ((*src).data)), (NI32)((*src).Sup.len + 1));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(ttype188837*, getsystype_242024)(NU8 kind) {
	ttype188837* result;
	result = 0;
	result = gsystypes_242048[(kind)- 0];
	{
		if (!(result == NIM_NIL)) goto LA3;
		switch (kind) {
		case ((NU8) 31):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2499));
		}
		break;
		case ((NU8) 32):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2500));
		}
		break;
		case ((NU8) 33):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2501));
		}
		break;
		case ((NU8) 34):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2502));
		}
		break;
		case ((NU8) 35):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2503));
		}
		break;
		case ((NU8) 40):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2504));
		}
		break;
		case ((NU8) 41):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2505));
		}
		break;
		case ((NU8) 42):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2506));
		}
		break;
		case ((NU8) 43):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2507));
		}
		break;
		case ((NU8) 44):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2508));
		}
		break;
		case ((NU8) 36):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2509));
		}
		break;
		case ((NU8) 37):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2510));
		}
		break;
		case ((NU8) 38):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2511));
			goto BeforeRet;
		}
		break;
		case ((NU8) 39):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2512));
		}
		break;
		case ((NU8) 1):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2513));
		}
		break;
		case ((NU8) 2):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2514));
		}
		break;
		case ((NU8) 28):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2515));
		}
		break;
		case ((NU8) 29):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2516));
		}
		break;
		case ((NU8) 26):
		{
			result = systypefromname_242204(((NimStringDesc*) &TMP2517));
		}
		break;
		case ((NU8) 5):
		{
			result = newsystype_242075(((NU8) 5), ptrsize_142592);
		}
		break;
		default:
		{
			NimStringDesc* LOC26;
			LOC26 = 0;
			LOC26 = rawNewString(reprEnum(kind, (&NTI188240))->Sup.len + 22);
appendString(LOC26, ((NimStringDesc*) &TMP2518));
appendString(LOC26, reprEnum(kind, (&NTI188240)));
			internalerror_165606(LOC26);
		}
		break;
		}
		asgnRefNoCycle((void**) &gsystypes_242048[(kind)- 0], result);
	}
	LA3: ;
	{
		NimStringDesc* LOC31;
		if (!!(((*result).Kind == kind))) goto LA29;
		LOC31 = 0;
		LOC31 = rawNewString(reprEnum(kind, (&NTI188240))->Sup.len + reprEnum((*result).Kind, (&NTI188240))->Sup.len + 14);
appendString(LOC31, ((NimStringDesc*) &TMP2519));
appendString(LOC31, reprEnum(kind, (&NTI188240)));
appendString(LOC31, ((NimStringDesc*) &TMP2520));
appendString(LOC31, reprEnum((*result).Kind, (&NTI188240)));
		internalerror_165606(LOC31);
	}
	LA29: ;
	{
		NimStringDesc* LOC36;
		if (!(result == NIM_NIL)) goto LA34;
		LOC36 = 0;
		LOC36 = rawNewString(reprEnum(kind, (&NTI188240))->Sup.len + 16);
appendString(LOC36, ((NimStringDesc*) &TMP2521));
appendString(LOC36, reprEnum(kind, (&NTI188240)));
		internalerror_165606(LOC36);
	}
	LA34: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41090* c;
	c = usrtocell_44443(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	LA3: ;
}

static N_INLINE(ttype188837*, skipintlit_242424)(ttype188837* t) {
	ttype188837* result;
	result = 0;
	{
		if (!!(((*t).N == NIM_NIL))) goto LA3;
		{
			if (!((*t).Kind == ((NU8) 31) || (*t).Kind == ((NU8) 36))) goto LA7;
			result = getsystype_242024((*t).Kind);
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	result = t;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, addsonskipintlit_242461)(ttype188837* father, ttype188837* son) {
	ttype188837* s;
	{
		if (!(*father).Sons == 0) goto LA3;
		if ((*father).Sons) nimGCunrefNoCycle((*father).Sons);
		(*father).Sons = (ttypeseq188835*) newSeqRC1((&NTI188835), 0);
	}
	LA3: ;
	s = skipintlit_242424(son);
	(*father).Sons = (ttypeseq188835*) incrSeq(&((*father).Sons)->Sup, sizeof(ttype188837*));
	asgnRefNoCycle((void**) &(*father).Sons->data[(*father).Sons->Sup.len-1], s);
	propagatetoowner_192852(father, s);
}

N_NIMCALL(tsym188833*, getsysmagic_242128)(NimStringDesc* name, NU16 m) {
	tsym188833* result;
	tidentiter197106 ti;
	tident167019* id;
	result = 0;
	memset((void*)&ti, 0, sizeof(ti));
	id = getident_167456(name);
	result = initidentiter_197110(&ti, (*systemmodule_242017).kindU.S3.Tab, id);
	while (1) {
		if (!!((result == NIM_NIL))) goto LA1;
		{
			if (!((*result).Kind == ((NU8) 23))) goto LA4;
			loadstub_239239(result);
		}
		LA4: ;
		{
			if (!((*result).Magic == m)) goto LA8;
			goto BeforeRet;
		}
		LA8: ;
		result = nextidentiter_197117(&ti, (*systemmodule_242017).kindU.S3.Tab);
	} LA1: ;
	rawmessage_165386(((NU16) 64), name);
	result = newsym_189053(((NU8) 0), id, systemmodule_242017, (*systemmodule_242017).Info);
	asgnRefNoCycle((void**) &(*result).Typ, newtype_189060(((NU8) 50), systemmodule_242017));
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, registercompilerproc_242032)(tsym188833* s) {
	strtableadd_197078(&compilerprocs_242049, s);
}

N_NIMCALL(ttype188837*, getintlittype_242378)(tnode188803* literal) {
	ttype188837* result;
	NI64 value;
	result = 0;
	value = (*literal).kindU.S1.Intval;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (-5 <= value);
		if (!(LOC3)) goto LA4;
		LOC3 = (value <= 64);
		LA4: ;
		if (!LOC3) goto LA5;
		result = inttypecache_242289[(((NI) (value)))- -5];
		{
			ttype188837* ti;
			if (!(result == NIM_NIL)) goto LA9;
			ti = getsystype_242024(((NU8) 31));
			result = copytype_189141(ti, (*ti).Owner, NIM_FALSE);
			asgnRefNoCycle((void**) &(*result).N, literal);
			asgnRefNoCycle((void**) &inttypecache_242289[(((NI) (value)))- -5], result);
		}
		LA9: ;
	}
	goto LA1;
	LA5: ;
	{
		ttype188837* ti;
		ti = getsystype_242024(((NU8) 31));
		result = copytype_189141(ti, (*ti).Owner, NIM_FALSE);
		asgnRefNoCycle((void**) &(*result).N, literal);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype188837*, getfloatlittype_242418)(tnode188803* literal) {
	ttype188837* result;
	result = 0;
	result = newsystype_242075(((NU8) 36), 8);
	asgnRefNoCycle((void**) &(*result).N, literal);
	return result;
}

N_NIMCALL(void, setintlittype_242517)(tnode188803* result) {
	NI64 i;
	i = (*result).kindU.S1.Intval;
	switch (intsize_142590) {
	case 8:
	{
		asgnRefNoCycle((void**) &(*result).Typ, getintlittype_242378(result));
	}
	break;
	case 4:
	{
		{
			NIM_BOOL LOC5;
			LOC5 = 0;
			LOC5 = ((-2147483647 -1) <= i);
			if (!(LOC5)) goto LA6;
			LOC5 = (i <= 2147483647);
			LA6: ;
			if (!LOC5) goto LA7;
			asgnRefNoCycle((void**) &(*result).Typ, getintlittype_242378(result));
		}
		goto LA3;
		LA7: ;
		{
			asgnRefNoCycle((void**) &(*result).Typ, getsystype_242024(((NU8) 35)));
		}
		LA3: ;
	}
	break;
	case 2:
	{
		{
			NIM_BOOL LOC13;
			LOC13 = 0;
			LOC13 = (-32768 <= i);
			if (!(LOC13)) goto LA14;
			LOC13 = (i <= 32767);
			LA14: ;
			if (!LOC13) goto LA15;
			asgnRefNoCycle((void**) &(*result).Typ, getintlittype_242378(result));
		}
		goto LA11;
		LA15: ;
		{
			NIM_BOOL LOC18;
			LOC18 = 0;
			LOC18 = ((-2147483647 -1) <= i);
			if (!(LOC18)) goto LA19;
			LOC18 = (i <= 2147483647);
			LA19: ;
			if (!LOC18) goto LA20;
			asgnRefNoCycle((void**) &(*result).Typ, getsystype_242024(((NU8) 34)));
		}
		goto LA11;
		LA20: ;
		{
			asgnRefNoCycle((void**) &(*result).Typ, getsystype_242024(((NU8) 35)));
		}
		LA11: ;
	}
	break;
	case 1:
	{
		{
			NIM_BOOL LOC26;
			LOC26 = 0;
			LOC26 = (-128 <= i);
			if (!(LOC26)) goto LA27;
			LOC26 = (i <= 127);
			LA27: ;
			if (!LOC26) goto LA28;
			asgnRefNoCycle((void**) &(*result).Typ, getintlittype_242378(result));
		}
		goto LA24;
		LA28: ;
		{
			NIM_BOOL LOC31;
			LOC31 = 0;
			LOC31 = (-32768 <= i);
			if (!(LOC31)) goto LA32;
			LOC31 = (i <= 32767);
			LA32: ;
			if (!LOC31) goto LA33;
			asgnRefNoCycle((void**) &(*result).Typ, getsystype_242024(((NU8) 33)));
		}
		goto LA24;
		LA33: ;
		{
			NIM_BOOL LOC36;
			LOC36 = 0;
			LOC36 = ((-2147483647 -1) <= i);
			if (!(LOC36)) goto LA37;
			LOC36 = (i <= 2147483647);
			LA37: ;
			if (!LOC36) goto LA38;
			asgnRefNoCycle((void**) &(*result).Typ, getsystype_242024(((NU8) 34)));
		}
		goto LA24;
		LA38: ;
		{
			asgnRefNoCycle((void**) &(*result).Typ, getsystype_242024(((NU8) 35)));
		}
		LA24: ;
	}
	break;
	default:
	{
		internalerror_165591((*result).Info, ((NimStringDesc*) &TMP3040));
	}
	break;
	}
}

N_NIMCALL(tsym188833*, getcompilerproc_242028)(NimStringDesc* name) {
	tsym188833* result;
	tident167019* ident;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = hashignorestyle_119859(name);
	ident = getident_167462(name, LOC1);
	result = strtableget_197084(compilerprocs_242049, ident);
	{
		if (!(result == NIM_NIL)) goto LA4;
		result = strtableget_197084(rodcompilerprocs_236058, ident);
		{
			if (!!((result == NIM_NIL))) goto LA8;
			strtableadd_197078(&compilerprocs_242049, result);
			{
				if (!((*result).Kind == ((NU8) 23))) goto LA12;
				loadstub_239239(result);
			}
			LA12: ;
		}
		LA8: ;
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, resetsystypes_242292)(void) {
	NU8 i_242335;
	NU8 res_242369;
	NI i_242367;
	NI res_242372;
	asgnRefNoCycle((void**) &systemmodule_242017, NIM_NIL);
	initstrtable_189110(&compilerprocs_242049);
	i_242335 = 0;
	res_242369 = ((NU8) 0);
	while (1) {
		if (!(res_242369 <= ((NU8) 61))) goto LA1;
		i_242335 = res_242369;
		asgnRefNoCycle((void**) &gsystypes_242048[(i_242335)- 0], NIM_NIL);
		res_242369 += 1;
	} LA1: ;
	i_242367 = 0;
	res_242372 = -5;
	while (1) {
		if (!(((NI) (res_242372)) <= 64)) goto LA2;
		i_242367 = res_242372;
		asgnRefNoCycle((void**) &inttypecache_242289[(i_242367)- -5], NIM_NIL);
		res_242372 += 1;
	} LA2: ;
}
N_NOINLINE(void, magicsysInit)(void) {
	initstrtable_189110(&compilerprocs_242049);
}

N_NOINLINE(void, magicsysDatInit)(void) {
}

