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

#include <string.h>
typedef struct tidtable188849 tidtable188849;
typedef struct tidpairseq188847 tidpairseq188847;
typedef struct tidpair188845 tidpair188845;
typedef struct tidobj167013 tidobj167013;
typedef struct TNimObject TNimObject;
typedef struct TGenericSeq TGenericSeq;
typedef struct ttype188837 ttype188837;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct tnode188803 tnode188803;
typedef struct tsym188833 tsym188833;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tcell41090 tcell41090;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct NimStringDesc NimStringDesc;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct tident167019 tident167019;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct tinfocpu142453 tinfocpu142453;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tlib188821 tlib188821;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
typedef struct TY188922 TY188922;
typedef struct tlistentry118017 tlistentry118017;
struct  tidpair188845  {
tidobj167013* Key;
TNimObject* Val;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tidtable188849  {
NI Counter;
tidpairseq188847* Data;
};
typedef tidtable188849 TY464221[62];
typedef ttype188837* TY242045[62];
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
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 tinfocpu142453 {
NimStringDesc* Field0;
NI Field1;
NU8 Field2;
NI Field3;
NI Field4;
};
typedef tinfocpu142453 TY142469[14];
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  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  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct tidpairseq188847 {
  TGenericSeq Sup;
  tidpair188845 data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, inittypetables_464232)(void);
N_NIMCALL(void, initidtable_189120)(tidtable188849* x);
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, internalerror_165606)(NimStringDesc* errmsg);
N_NIMCALL(ttype188837*, getuniquetype_464401)(ttype188837* key);
static N_INLINE(ttype188837*, lastson_189193)(ttype188837* n);
static N_INLINE(NI, sonslen_189185)(ttype188837* n);
N_NIMCALL(NIM_BOOL, idtablehasobjectaskey_197154)(tidtable188849 t, tidobj167013* key);
N_NIMCALL(NIM_BOOL, samebackendtype_230522)(ttype188837* x, ttype188837* y);
N_NIMCALL(void, idtableput_197147)(tidtable188849* t, tidobj167013* key, TNimObject* val);
N_NIMCALL(TNimObject*, idtableget_197137)(tidtable188849 t, tidobj167013* key);
N_NIMCALL(NIM_BOOL, sametype_228116)(ttype188837* a, ttype188837* b, NU8 flags);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, tocchar_163645)(NIM_CHAR c);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(tnode188803*, getpragmastmt_464012)(tnode188803* n, NU8 w);
static N_INLINE(NI, len_189264)(tnode188803* n);
static N_INLINE(tnode188803*, HEX5BHEX5D_189694)(tnode188803* n, NI i);
N_NIMCALL(NU8, whichpragma_222161)(tnode188803* n);
N_NIMCALL(void, app_145040)(trope145007** a, trope145007* b);
N_NIMCALL(trope145007*, torope_145058)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x, NI len);
STRING_LITERAL(TMP3129, "GetUniqueType", 13);
STRING_LITERAL(TMP3230, "\"", 1);
STRING_LITERAL(TMP3679, "c\"", 2);
STRING_LITERAL(TMP3680, "\\00\"", 4);
extern NIM_CONST TY142469 cpu_142468;
TY464221 gtypetable_464224;
TY242045 gcanonicaltypes_464228;
extern tgcheap43016 gch_43044;
extern NU8 targetcpu_142573;

N_NIMCALL(void, inittypetables_464232)(void) {
	NU8 i_464278;
	NU8 res_464283;
	i_464278 = 0;
	res_464283 = ((NU8) 0);
	while (1) {
		if (!(res_464283 <= ((NU8) 61))) goto LA1;
		i_464278 = res_464283;
		initidtable_189120(&gtypetable_464224[(i_464278)- 0]);
		res_464283 += 1;
	} LA1: ;
}

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;
}

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

static N_INLINE(ttype188837*, lastson_189193)(ttype188837* n) {
	ttype188837* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_189185(n);
	result = (*n).Sons->data[(NI32)(LOC1 - 1)];
	return result;
}

N_NIMCALL(ttype188837*, getuniquetype_464401)(ttype188837* key) {
	ttype188837* result;
	NU8 k;
	result = 0;
	{
		if (!(key == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	k = (*key).Kind;
	switch (k) {
	case ((NU8) 1):
	case ((NU8) 2):
	case ((NU8) 31) ... ((NU8) 44):
	{
		result = key;
	}
	break;
	case ((NU8) 3):
	case ((NU8) 5):
	case ((NU8) 6):
	case ((NU8) 7):
	case ((NU8) 26):
	case ((NU8) 28):
	case ((NU8) 29):
	case ((NU8) 0):
	case ((NU8) 45):
	{
		result = gcanonicaltypes_464228[(k)- 0];
		{
			if (!(result == NIM_NIL)) goto LA9;
			asgnRefNoCycle((void**) &gcanonicaltypes_464228[(k)- 0], key);
			result = key;
		}
		LA9: ;
	}
	break;
	case ((NU8) 8):
	case ((NU8) 51):
	case ((NU8) 12):
	case ((NU8) 60):
	case ((NU8) 61):
	case ((NU8) 54):
	case ((NU8) 52):
	case ((NU8) 53):
	case ((NU8) 55):
	case ((NU8) 56):
	case ((NU8) 57):
	case ((NU8) 58):
	{
		internalerror_165606(((NimStringDesc*) &TMP3129));
	}
	break;
	case ((NU8) 11):
	case ((NU8) 13):
	case ((NU8) 15):
	case ((NU8) 47):
	case ((NU8) 46):
	case ((NU8) 49):
	case ((NU8) 59):
	{
		ttype188837* LOC13;
		LOC13 = 0;
		LOC13 = lastson_189193(key);
		result = getuniquetype_464401(LOC13);
	}
	break;
	case ((NU8) 4):
	case ((NU8) 9):
	case ((NU8) 10):
	case ((NU8) 27):
	case ((NU8) 16):
	case ((NU8) 19):
	case ((NU8) 20):
	case ((NU8) 18):
	case ((NU8) 21):
	case ((NU8) 22):
	case ((NU8) 24):
	case ((NU8) 30):
	case ((NU8) 48):
	case ((NU8) 50):
	case ((NU8) 23):
	{
		NI h_464452;
		NI HEX3Atmp_464594;
		NI res_464596;
		{
			NIM_BOOL LOC17;
			LOC17 = 0;
			LOC17 = idtablehasobjectaskey_197154(gtypetable_464224[(k)- 0], &key->Sup);
			if (!LOC17) goto LA18;
			result = key;
			goto BeforeRet;
		}
		LA18: ;
		h_464452 = 0;
		HEX3Atmp_464594 = 0;
		HEX3Atmp_464594 = (gtypetable_464224[(k)- 0].Data->Sup.len-1);
		res_464596 = 0;
		while (1) {
			ttype188837* t;
			if (!(res_464596 <= HEX3Atmp_464594)) goto LA20;
			h_464452 = res_464596;
			t = ((ttype188837*) (gtypetable_464224[(k)- 0].Data->data[h_464452].Key));
			{
				NIM_BOOL LOC23;
				LOC23 = 0;
				LOC23 = !((t == NIM_NIL));
				if (!(LOC23)) goto LA24;
				LOC23 = samebackendtype_230522(t, key);
				LA24: ;
				if (!LOC23) goto LA25;
				result = t;
				goto BeforeRet;
			}
			LA25: ;
			res_464596 += 1;
		} LA20: ;
		idtableput_197147(&gtypetable_464224[(k)- 0], &key->Sup, &key->Sup.Sup);
		result = key;
	}
	break;
	case ((NU8) 17):
	{
		{
			TNimObject* LOC32;
			if (!!((((*key).Flags &(1<<((((NU8) 8))&31)))!=0))) goto LA30;
			LOC32 = 0;
			LOC32 = idtableget_197137(gtypetable_464224[(k)- 0], &key->Sup);
			result = ((ttype188837*) (LOC32));
			{
				if (!(result == NIM_NIL)) goto LA35;
				idtableput_197147(&gtypetable_464224[(k)- 0], &key->Sup, &key->Sup.Sup);
				result = key;
			}
			LA35: ;
		}
		goto LA28;
		LA30: ;
		{
			NI h_464515;
			NI HEX3Atmp_464598;
			NI res_464600;
			{
				NIM_BOOL LOC40;
				LOC40 = 0;
				LOC40 = idtablehasobjectaskey_197154(gtypetable_464224[(k)- 0], &key->Sup);
				if (!LOC40) goto LA41;
				result = key;
				goto BeforeRet;
			}
			LA41: ;
			h_464515 = 0;
			HEX3Atmp_464598 = 0;
			HEX3Atmp_464598 = (gtypetable_464224[(k)- 0].Data->Sup.len-1);
			res_464600 = 0;
			while (1) {
				ttype188837* t;
				if (!(res_464600 <= HEX3Atmp_464598)) goto LA43;
				h_464515 = res_464600;
				t = ((ttype188837*) (gtypetable_464224[(k)- 0].Data->data[h_464515].Key));
				{
					NIM_BOOL LOC46;
					LOC46 = 0;
					LOC46 = !((t == NIM_NIL));
					if (!(LOC46)) goto LA47;
					LOC46 = sametype_228116(t, key, 0);
					LA47: ;
					if (!LOC46) goto LA48;
					result = t;
					goto BeforeRet;
				}
				LA48: ;
				res_464600 += 1;
			} LA43: ;
			idtableput_197147(&gtypetable_464224[(k)- 0], &key->Sup, &key->Sup.Sup);
			result = key;
		}
		LA28: ;
	}
	break;
	case ((NU8) 14):
	{
		TNimObject* LOC51;
		LOC51 = 0;
		LOC51 = idtableget_197137(gtypetable_464224[(k)- 0], &key->Sup);
		result = ((ttype188837*) (LOC51));
		{
			if (!(result == NIM_NIL)) goto LA54;
			idtableput_197147(&gtypetable_464224[(k)- 0], &key->Sup, &key->Sup.Sup);
			result = key;
		}
		LA54: ;
	}
	break;
	case ((NU8) 25):
	{
		{
			if (!!(((*key).Callconv == ((NU8) 8)))) goto LA59;
			result = key;
		}
		goto LA57;
		LA59: ;
		{
			NI h_464574;
			NI HEX3Atmp_464602;
			NI res_464604;
			{
				NIM_BOOL LOC64;
				LOC64 = 0;
				LOC64 = idtablehasobjectaskey_197154(gtypetable_464224[(k)- 0], &key->Sup);
				if (!LOC64) goto LA65;
				result = key;
				goto BeforeRet;
			}
			LA65: ;
			h_464574 = 0;
			HEX3Atmp_464602 = 0;
			HEX3Atmp_464602 = (gtypetable_464224[(k)- 0].Data->Sup.len-1);
			res_464604 = 0;
			while (1) {
				ttype188837* t;
				if (!(res_464604 <= HEX3Atmp_464602)) goto LA67;
				h_464574 = res_464604;
				t = ((ttype188837*) (gtypetable_464224[(k)- 0].Data->data[h_464574].Key));
				{
					NIM_BOOL LOC70;
					LOC70 = 0;
					LOC70 = !((t == NIM_NIL));
					if (!(LOC70)) goto LA71;
					LOC70 = samebackendtype_230522(t, key);
					LA71: ;
					if (!LOC70) goto LA72;
					result = t;
					goto BeforeRet;
				}
				LA72: ;
				res_464604 += 1;
			} LA67: ;
			idtableput_197147(&gtypetable_464224[(k)- 0], &key->Sup, &key->Sup.Sup);
			result = key;
		}
		LA57: ;
	}
	break;
	}
	BeforeRet: ;
	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(NimStringDesc*, makesinglelinecstring_464672)(NimStringDesc* s) {
	NimStringDesc* result;
	NIM_CHAR c_464676;
	NI i_464678;
	NI l_464680;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP3230));
	c_464676 = 0;
	i_464678 = 0;
	l_464680 = s->Sup.len;
	while (1) {
		NimStringDesc* LOC2;
		if (!(i_464678 < l_464680)) goto LA1;
		c_464676 = s->data[i_464678];
		LOC2 = 0;
		LOC2 = tocchar_163645(c_464676);
		result = resizeString(result, LOC2->Sup.len + 0);
appendString(result, LOC2);
		i_464678 += 1;
	} LA1: ;
	result = addChar(result, 34);
	return result;
}

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

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

N_NIMCALL(tnode188803*, getpragmastmt_464012)(tnode188803* n, NU8 w) {
	tnode188803* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 114):
	{
		NI i_464038;
		NI HEX3Atmp_464087;
		NI LOC2;
		NI res_464089;
		i_464038 = 0;
		HEX3Atmp_464087 = 0;
		LOC2 = 0;
		LOC2 = len_189264(n);
		HEX3Atmp_464087 = LOC2 - 1;
		res_464089 = 0;
		while (1) {
			tnode188803* LOC4;
			if (!(res_464089 <= HEX3Atmp_464087)) goto LA3;
			i_464038 = res_464089;
			LOC4 = 0;
			LOC4 = HEX5BHEX5D_189694(n, i_464038);
			result = getpragmastmt_464012(LOC4, w);
			{
				if (!!((result == NIM_NIL))) goto LA7;
				goto LA3;
			}
			LA7: ;
			res_464089 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 90):
	{
		NI i_464077;
		NI HEX3Atmp_464091;
		NI LOC10;
		NI res_464093;
		i_464077 = 0;
		HEX3Atmp_464091 = 0;
		LOC10 = 0;
		LOC10 = len_189264(n);
		HEX3Atmp_464091 = LOC10 - 1;
		res_464093 = 0;
		while (1) {
			if (!(res_464093 <= HEX3Atmp_464091)) goto LA11;
			i_464077 = res_464093;
			{
				tnode188803* LOC14;
				NU8 LOC15;
				LOC14 = 0;
				LOC14 = HEX5BHEX5D_189694(n, i_464077);
				LOC15 = 0;
				LOC15 = whichpragma_222161(LOC14);
				if (!(LOC15 == w)) goto LA16;
				result = HEX5BHEX5D_189694(n, i_464077);
				goto BeforeRet;
			}
			LA16: ;
			res_464093 += 1;
		} LA11: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, stmtscontainpragma_464099)(tnode188803* n, NU8 w) {
	NIM_BOOL result;
	tnode188803* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getpragmastmt_464012(n, w);
	result = !((LOC1 == NIM_NIL));
	return result;
}

N_NIMCALL(trope145007*, makellvmstring_464684)(NimStringDesc* s) {
	trope145007* result;
	NimStringDesc* res;
	NI i_464702;
	NI HEX3Atmp_464714;
	NI res_464716;
	trope145007* LOC10;
	result = 0;
	result = NIM_NIL;
	res = copyString(((NimStringDesc*) &TMP3679));
	i_464702 = 0;
	HEX3Atmp_464714 = 0;
	HEX3Atmp_464714 = (NI32)(s->Sup.len - 1);
	res_464716 = 0;
	while (1) {
		if (!(res_464716 <= HEX3Atmp_464714)) goto LA1;
		i_464702 = res_464716;
		{
			trope145007* LOC6;
			if (!(((NI) ((NI32)((NI32)(i_464702 + 1) % 64))) == 0)) goto LA4;
			LOC6 = 0;
			LOC6 = torope_145058(res);
			app_145040(&result, LOC6);
			res = setLengthStr(res, 0);
		}
		LA4: ;
		switch (((NU8)(s->data[i_464702]))) {
		case 0 ... 31:
		case 128 ... 255:
		case 34:
		case 92:
		{
			NimStringDesc* LOC8;
			res = addChar(res, 92);
			LOC8 = 0;
			LOC8 = nsuToHex(((NI64) (((NU8)(s->data[i_464702])))), 2);
			res = resizeString(res, LOC8->Sup.len + 0);
appendString(res, LOC8);
		}
		break;
		default:
		{
			res = addChar(res, s->data[i_464702]);
		}
		break;
		}
		res_464716 += 1;
	} LA1: ;
	res = resizeString(res, 4);
appendString(res, ((NimStringDesc*) &TMP3680));
	LOC10 = 0;
	LOC10 = torope_145058(res);
	app_145040(&result, LOC10);
	return result;
}

N_NIMCALL(NI64, hashstring_464123)(NimStringDesc* s) {
	NI64 result;
	result = 0;
	{
		NI64 b;
		NI i_464140;
		NI HEX3Atmp_464208;
		NI res_464210;
		if (!(cpu_142468[(targetcpu_142573)- 1].Field4 == 64)) goto LA3;
		b = 0;
		i_464140 = 0;
		HEX3Atmp_464208 = 0;
		HEX3Atmp_464208 = (NI32)(s->Sup.len - 1);
		res_464210 = 0;
		while (1) {
			if (!(res_464210 <= HEX3Atmp_464208)) goto LA5;
			i_464140 = res_464210;
			b = (NI64)((NU64)(b) + (NU64)(((NI64) (((NU8)(s->data[i_464140]))))));
			b = (NI64)((NU64)(b) + (NU64)((NI64)((NU64)(b) << (NU64)(10))));
			b = (NI64)(b ^ (NI64)((NU64)(b) >> (NU64)(6)));
			res_464210 += 1;
		} LA5: ;
		b = (NI64)((NU64)(b) + (NU64)((NI64)((NU64)(b) << (NU64)(3))));
		b = (NI64)(b ^ (NI64)((NU64)(b) >> (NU64)(11)));
		b = (NI64)((NU64)(b) + (NU64)((NI64)((NU64)(b) << (NU64)(15))));
		result = b;
	}
	goto LA1;
	LA3: ;
	{
		NI32 a;
		NI i_464162;
		NI HEX3Atmp_464213;
		NI res_464215;
		a = ((NI32) 0);
		i_464162 = 0;
		HEX3Atmp_464213 = 0;
		HEX3Atmp_464213 = (NI32)(s->Sup.len - 1);
		res_464215 = 0;
		while (1) {
			if (!(res_464215 <= HEX3Atmp_464213)) goto LA7;
			i_464162 = res_464215;
			a = (NI32)((NU32)(a) + (NU32)(((NI32) (((NU8)(s->data[i_464162]))))));
			a = (NI32)((NU32)(a) + (NU32)((NI32)((NU32)(a) << (NU32)(((NI32) 10)))));
			a = (NI32)(a ^ (NI32)((NU32)(a) >> (NU32)(((NI32) 6))));
			res_464215 += 1;
		} LA7: ;
		a = (NI32)((NU32)(a) + (NU32)((NI32)((NU32)(a) << (NU32)(((NI32) 3)))));
		a = (NI32)(a ^ (NI32)((NU32)(a) >> (NU32)(((NI32) 11))));
		a = (NI32)((NU32)(a) + (NU32)((NI32)((NU32)(a) << (NU32)(((NI32) 15)))));
		result = ((NI64) (a));
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, resetcaches_464288)(void) {
	NU8 i_464300;
	NU8 res_464302;
	inittypetables_464232();
	i_464300 = 0;
	res_464302 = ((NU8) 0);
	while (1) {
		if (!(res_464302 <= ((NU8) 61))) goto LA1;
		i_464300 = res_464302;
		asgnRefNoCycle((void**) &gcanonicaltypes_464228[(i_464300)- 0], NIM_NIL);
		res_464302 += 1;
	} LA1: ;
}
N_NOINLINE(void, ccgutilsInit)(void) {
	inittypetables_464232();
}

N_NOINLINE(void, ccgutilsDatInit)(void) {
}

