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

#include <string.h>

#include <stdio.h>
typedef struct tsym188833 tsym188833;
typedef struct tnode188803 tnode188803;
typedef struct tpass246015 tpass246015;
typedef struct tpasscontext246003 tpasscontext246003;
typedef struct trodreader236024 trodreader236024;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TNimObject TNimObject;
typedef struct tllstream176204 tllstream176204;
typedef struct tparsers220029 tparsers220029;
typedef struct tparser205203 tparser205203;
typedef struct tlexer180176 tlexer180176;
typedef struct tbaselexer178018 tbaselexer178018;
typedef struct ttoken180174 ttoken180174;
typedef struct tident167019 tident167019;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tidobj167013 tidobj167013;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct ttype188837 ttype188837;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tlib188821 tlib188821;
typedef struct TY110805 TY110805;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct TY439278 TY439278;
typedef struct TY188922 TY188922;
typedef struct tindex236022 tindex236022;
typedef struct tiitable197207 tiitable197207;
typedef struct tiipairseq197205 tiipairseq197205;
typedef struct tiipair197203 tiipair197203;
typedef struct tidtable188849 tidtable188849;
typedef struct tidpairseq188847 tidpairseq188847;
typedef struct tidpair188845 tidpair188845;
typedef struct tmemfile234204 tmemfile234204;
typedef struct tlistentry118017 tlistentry118017;
typedef N_NIMCALL_PTR(tsym188833*, TY246056) (tsym188833* m, NI32 fileidx);
typedef N_NIMCALL_PTR(tnode188803*, TY246061) (tsym188833* m, NI32 fileidx);
typedef N_NIMCALL_PTR(tpasscontext246003*, tpassopen246007) (tsym188833* module);
typedef N_NIMCALL_PTR(tpasscontext246003*, tpassopencached246009) (tsym188833* module, trodreader236024* rd);
typedef N_NIMCALL_PTR(tnode188803*, tpassprocess246013) (tpasscontext246003* p, tnode188803* toplevelstmt);
typedef N_NIMCALL_PTR(tnode188803*, tpassclose246011) (tpasscontext246003* p, tnode188803* n);
struct tpass246015 {
tpassopen246007 Field0;
tpassopencached246009 Field1;
tpassprocess246013 Field2;
tpassclose246011 Field3;
};
typedef tpass246015 TY246176[10];
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  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tpasscontext246003  {
  TNimObject Sup;
NIM_BOOL Fromcache;
};
struct  tbaselexer178018  {
  TNimObject Sup;
NI Bufpos;
NCSTRING Buf;
NI Buflen;
tllstream176204* Stream;
NI Linenumber;
NI Sentinel;
NI Linestart;
};
struct  tlexer180176  {
  tbaselexer178018 Sup;
NI32 Fileidx;
NI Indentahead;
NI Currlineindent;
NIM_BOOL Strongspaces;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  ttoken180174  {
NU8 Toktype;
NI Indent;
tident167019* Ident;
NI64 Inumber;
NF Fnumber;
NU8 Base;
NI8 Strongspacea;
NI8 Strongspaceb;
NimStringDesc* Literal;
NI Line;
NI Col;
};
struct  tparser205203  {
NI Currind;
NIM_BOOL Firsttok;
NIM_BOOL Strongspaces;
tlexer180176 Lex;
ttoken180174 Tok;
NI Inpragma;
NI Insemistmtlist;
};
struct  tparsers220029  {
NU8 Skin;
tparser205203 Parser;
};
typedef tpasscontext246003* tpasscontextarray246173[10];
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
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  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  tllstream176204  {
  TNimObject Sup;
NU8 Kind;
FILE* F;
NimStringDesc* S;
NI Rd;
NI Wr;
NI Lineoffset;
};
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 TY439278 {
tnode188803* Field0;
tnode188803* Field1;
};
struct  tiipair197203  {
NI Key;
NI Val;
};
struct  tiitable197207  {
NI Counter;
tiipairseq197205* Data;
};
struct  tindex236022  {
NI Lastidxkey;
NI Lastidxval;
tiitable197207 Tab;
NimStringDesc* R;
NI Offset;
};
struct  tidpair188845  {
tidobj167013* Key;
TNimObject* Val;
};
struct  tidtable188849  {
NI Counter;
tidpairseq188847* Data;
};
struct  tmemfile234204  {
void* Mem;
NI Size;
int Handle;
};
struct  trodreader236024  {
  TNimObject Sup;
NI Pos;
NCSTRING S;
NU32 Options;
NU8 Reason;
TY188922* Moddeps;
TY188922* Files;
NI Dataidx;
NI Convertersidx;
NI Initidx;
NI Interfidx;
NI Compilerprocsidx;
NI Methodsidx;
NimStringDesc* Filename;
tindex236022 Index;
tindex236022 Imports;
NI Readerindex;
NI Line;
NI Moduleid;
tidtable188849 Syms;
tmemfile234204 Memfile;
tsymseq188805* Methods;
NimStringDesc* Origfile;
NIM_BOOL Inviewmode;
};
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;
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct TY110805 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct tiipairseq197205 {
  TGenericSeq Sup;
  tiipair197203 data[SEQ_DECL_SIZE];
};
struct tidpairseq188847 {
  TGenericSeq Sup;
  tidpair188845 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, objectInit)(void* dest, TNimType* typ);
N_NIMCALL(void, openpasses_246277)(tpasscontext246003** a, tsym188833* module);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(NimStringDesc*, tofullpath_164788)(NI32 fileidx);
N_NIMCALL(tllstream176204*, llstreamopen_176227)(NimStringDesc* filename, NU8 mode);
N_NIMCALL(void, rawmessage_165386)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(void, openparsers_220037)(tparsers220029* p, NI32 fileidx, tllstream176204* inputstream);
N_NIMCALL(void, processimplicits_246510)(TY110805* implicits, NU8 nodekind, tpasscontext246003** a);
N_NIMCALL(tnode188803*, newnodei_189099)(NU8 kind, tlineinfo163527 info);
N_NIMCALL(tnode188803*, newstrnode_189085)(NU8 kind, NimStringDesc* strval);
N_NIMCALL(void, addson_189207)(tnode188803* father, tnode188803* son);
N_NIMCALL(NIM_BOOL, processtoplevelstmt_246392)(tnode188803* n, tpasscontext246003** a);
N_NIMCALL(tnode188803*, parsetoplevelstmt_220054)(tparsers220029* p);
N_NIMCALL(void, closeparsers_220044)(tparsers220029* p);
N_NIMCALL(void, closepasses_246359)(tpasscontext246003** a);
N_NIMCALL(void, idsynchronizationpoint_187452)(NI idrange);
N_NIMCALL(void, openpassescached_246309)(tpasscontext246003** a, tsym188833* module, trodreader236024* rd);
N_NIMCALL(tnode188803*, loadinitsection_236066)(trodreader236024* r);
static N_INLINE(NI, sonslen_189181)(tnode188803* n);
N_NIMCALL(void, processtoplevelstmtcached_246437)(tnode188803* n, tpasscontext246003** a);
N_NIMCALL(void, closepassescached_246470)(tpasscontext246003** a);
N_NIMCALL(void, carrypass_246208)(tpass246015 p, tsym188833* module, TY439278 m, TY439278* Result);
TY246056 gimportmodule_246060;
TY246061 gincludefile_246065;
TY246176 gpasses_246178;
NI gpasseslen_246179;
extern TNimType NTI2409; /* TObject */
TNimType NTI246003; /* TPassContext */
extern TNimType NTI134; /* bool */
extern TNimType NTI220029; /* TParsers */
extern tlineinfo163527 gcmdlineinfo_164104;
extern TY110805* implicitimports_137257;
extern TY110805* implicitincludes_137279;

N_NIMCALL(void, clearpasses_246183)(void) {
	gpasseslen_246179 = 0;
}

N_NIMCALL(void, openpasses_246277)(tpasscontext246003** a, tsym188833* module) {
	NI i_246294;
	NI HEX3Atmp_246302;
	NI res_246304;
	i_246294 = 0;
	HEX3Atmp_246302 = 0;
	HEX3Atmp_246302 = (NI32)(gpasseslen_246179 - 1);
	res_246304 = 0;
	while (1) {
		if (!(res_246304 <= HEX3Atmp_246302)) goto LA1;
		i_246294 = res_246304;
		{
			if (!!(gpasses_246178[(i_246294)- 0].Field0 == 0)) goto LA4;
			unsureAsgnRef((void**) &a[(i_246294)- 0], gpasses_246178[(i_246294)- 0].Field0(module));
		}
		goto LA2;
		LA4: ;
		{
			unsureAsgnRef((void**) &a[(i_246294)- 0], NIM_NIL);
		}
		LA2: ;
		res_246304 += 1;
	} LA1: ;
}

N_NIMCALL(NIM_BOOL, processtoplevelstmt_246392)(tnode188803* n, tpasscontext246003** a) {
	NIM_BOOL result;
	tnode188803* m;
	NI i_246411;
	NI HEX3Atmp_246430;
	NI res_246432;
	result = 0;
	m = n;
	i_246411 = 0;
	HEX3Atmp_246430 = 0;
	HEX3Atmp_246430 = (NI32)(gpasseslen_246179 - 1);
	res_246432 = 0;
	while (1) {
		if (!(res_246432 <= HEX3Atmp_246430)) goto LA1;
		i_246411 = res_246432;
		{
			if (!!(gpasses_246178[(i_246411)- 0].Field2 == 0)) goto LA4;
			m = gpasses_246178[(i_246411)- 0].Field2(a[(i_246411)- 0], m);
			{
				if (!m == 0) goto LA8;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA8: ;
		}
		LA4: ;
		res_246432 += 1;
	} LA1: ;
	result = NIM_TRUE;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, processimplicits_246510)(TY110805* implicits, NU8 nodekind, tpasscontext246003** a) {
	NimStringDesc* module_246529;
	NI i_246533;
	NI l_246535;
	module_246529 = 0;
	i_246533 = 0;
	l_246535 = implicits->Sup.len;
	while (1) {
		tnode188803* importstmt;
		tnode188803* str;
		if (!(i_246533 < l_246535)) goto LA1;
		module_246529 = implicits->data[i_246533];
		importstmt = newnodei_189099(nodekind, gcmdlineinfo_164104);
		str = newstrnode_189085(((NU8) 20), module_246529);
		(*str).Info = gcmdlineinfo_164104;
		addson_189207(importstmt, str);
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = processtoplevelstmt_246392(importstmt, a);
			if (!!(LOC4)) goto LA5;
			goto LA1;
		}
		LA5: ;
		i_246533 += 1;
	} LA1: ;
}

N_NIMCALL(void, closepasses_246359)(tpasscontext246003** a) {
	tnode188803* m;
	NI i_246376;
	NI HEX3Atmp_246385;
	NI res_246387;
	m = NIM_NIL;
	i_246376 = 0;
	HEX3Atmp_246385 = 0;
	HEX3Atmp_246385 = (NI32)(gpasseslen_246179 - 1);
	res_246387 = 0;
	while (1) {
		if (!(res_246387 <= HEX3Atmp_246385)) goto LA1;
		i_246376 = res_246387;
		{
			if (!!(gpasses_246178[(i_246376)- 0].Field3 == 0)) goto LA4;
			m = gpasses_246178[(i_246376)- 0].Field3(a[(i_246376)- 0], m);
		}
		LA4: ;
		unsureAsgnRef((void**) &a[(i_246376)- 0], NIM_NIL);
		res_246387 += 1;
	} LA1: ;
}

N_NIMCALL(void, openpassescached_246309)(tpasscontext246003** a, tsym188833* module, trodreader236024* rd) {
	NI i_246327;
	NI HEX3Atmp_246352;
	NI res_246354;
	i_246327 = 0;
	HEX3Atmp_246352 = 0;
	HEX3Atmp_246352 = (NI32)(gpasseslen_246179 - 1);
	res_246354 = 0;
	while (1) {
		if (!(res_246354 <= HEX3Atmp_246352)) goto LA1;
		i_246327 = res_246354;
		{
			if (!!(gpasses_246178[(i_246327)- 0].Field1 == 0)) goto LA4;
			unsureAsgnRef((void**) &a[(i_246327)- 0], gpasses_246178[(i_246327)- 0].Field1(module, rd));
			{
				if (!!((a[(i_246327)- 0] == NIM_NIL))) goto LA8;
				(*a[(i_246327)- 0]).Fromcache = NIM_TRUE;
			}
			LA8: ;
		}
		goto LA2;
		LA4: ;
		{
			unsureAsgnRef((void**) &a[(i_246327)- 0], NIM_NIL);
		}
		LA2: ;
		res_246354 += 1;
	} LA1: ;
}

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

N_NIMCALL(void, processtoplevelstmtcached_246437)(tnode188803* n, tpasscontext246003** a) {
	tnode188803* m;
	NI i_246455;
	NI HEX3Atmp_246463;
	NI res_246465;
	m = n;
	i_246455 = 0;
	HEX3Atmp_246463 = 0;
	HEX3Atmp_246463 = (NI32)(gpasseslen_246179 - 1);
	res_246465 = 0;
	while (1) {
		if (!(res_246465 <= HEX3Atmp_246463)) goto LA1;
		i_246455 = res_246465;
		{
			if (!!(gpasses_246178[(i_246455)- 0].Field1 == 0)) goto LA4;
			m = gpasses_246178[(i_246455)- 0].Field2(a[(i_246455)- 0], m);
		}
		LA4: ;
		res_246465 += 1;
	} LA1: ;
}

N_NIMCALL(void, closepassescached_246470)(tpasscontext246003** a) {
	tnode188803* m;
	NI i_246487;
	NI HEX3Atmp_246503;
	NI res_246505;
	m = NIM_NIL;
	i_246487 = 0;
	HEX3Atmp_246503 = 0;
	HEX3Atmp_246503 = (NI32)(gpasseslen_246179 - 1);
	res_246505 = 0;
	while (1) {
		if (!(res_246505 <= HEX3Atmp_246503)) goto LA1;
		i_246487 = res_246505;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = !(gpasses_246178[(i_246487)- 0].Field1 == 0);
			if (!(LOC4)) goto LA5;
			LOC4 = !(gpasses_246178[(i_246487)- 0].Field3 == 0);
			LA5: ;
			if (!LOC4) goto LA6;
			m = gpasses_246178[(i_246487)- 0].Field3(a[(i_246487)- 0], m);
		}
		LA6: ;
		unsureAsgnRef((void**) &a[(i_246487)- 0], NIM_NIL);
		res_246505 += 1;
	} LA1: ;
}

N_NIMCALL(void, processmodule_246049)(tsym188833* module, tllstream176204* stream, trodreader236024* rd) {
	tparsers220029 p;
	tpasscontextarray246173 a;
	tllstream176204* s;
	NI32 fileidx;
	memset((void*)&p, 0, sizeof(p));
	objectInit(&p, (&NTI220029));
	memset((void*)a, 0, sizeof(a));
	s = 0;
	fileidx = ((NI32) ((*module).Position));
	{
		if (!(rd == NIM_NIL)) goto LA3;
		openpasses_246277(a, module);
		{
			NimStringDesc* filename;
			if (!(stream == NIM_NIL)) goto LA7;
			filename = tofullpath_164788(fileidx);
			s = llstreamopen_176227(filename, ((NU8) 0));
			{
				if (!(s == NIM_NIL)) goto LA11;
				rawmessage_165386(((NU16) 3), filename);
				goto BeforeRet;
			}
			LA11: ;
		}
		goto LA5;
		LA7: ;
		{
			s = stream;
		}
		LA5: ;
		while (1) {
			openparsers_220037(&p, fileidx, s);
			{
				if (!!((((*module).Flags &(1<<((((NU8) 13))&31)))!=0))) goto LA17;
				processimplicits_246510(implicitimports_137257, ((NU8) 115), a);
				processimplicits_246510(implicitincludes_137279, ((NU8) 120), a);
			}
			LA17: ;
			while (1) {
				tnode188803* n;
				n = parsetoplevelstmt_220054(&p);
				{
					if (!((*n).Kind == ((NU8) 1))) goto LA22;
					goto LA19;
				}
				LA22: ;
				{
					NIM_BOOL LOC26;
					LOC26 = 0;
					LOC26 = processtoplevelstmt_246392(n, a);
					if (!!(LOC26)) goto LA27;
					goto LA19;
				}
				LA27: ;
			} LA19: ;
			closeparsers_220044(&p);
			{
				if (!!(((*s).Kind == ((NU8) 3)))) goto LA31;
				goto LA14;
			}
			LA31: ;
		} LA14: ;
		closepasses_246359(a);
		idsynchronizationpoint_187452(1000);
	}
	goto LA1;
	LA3: ;
	{
		tnode188803* n;
		NI i_246655;
		NI HEX3Atmp_246676;
		NI LOC34;
		NI res_246678;
		openpassescached_246309(a, module, rd);
		n = loadinitsection_236066(rd);
		i_246655 = 0;
		HEX3Atmp_246676 = 0;
		LOC34 = 0;
		LOC34 = sonslen_189181(n);
		HEX3Atmp_246676 = (NI32)(LOC34 - 1);
		res_246678 = 0;
		while (1) {
			if (!(res_246678 <= HEX3Atmp_246676)) goto LA35;
			i_246655 = res_246678;
			processtoplevelstmtcached_246437((*n).kindU.S6.Sons->data[i_246655], a);
			res_246678 += 1;
		} LA35: ;
		closepassescached_246470(a);
	}
	LA1: ;
	BeforeRet: ;
}

N_NIMCALL(void, registerpass_246187)(tpass246015 p) {
	gpasses_246178[(gpasseslen_246179)- 0] = p;
	gpasseslen_246179 += 1;
}

N_NIMCALL(NIM_BOOL, astneeded_246081)(tsym188833* s) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		LOC3 = 0;
		LOC4 = 0;
		LOC5 = 0;
		LOC5 = ((12288 &(1<<(((*s).Kind)&31)))!=0);
		if (!(LOC5)) goto LA6;
		LOC5 = ((8454144 & (*s).Flags) == 0);
		LA6: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA7;
		LOC4 = !(((*(*s).Typ).Callconv == ((NU8) 5)));
		LA7: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA8;
		LOC3 = ((*(*(*s).Ast).kindU.S6.Sons->data[2]).Kind == ((NU8) 1));
		LA8: ;
		if (!LOC3) goto LA9;
		result = NIM_FALSE;
	}
	goto LA1;
	LA9: ;
	{
		result = NIM_TRUE;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, carrypass_246208)(tpass246015 p, tsym188833* module, TY439278 m, TY439278* Result) {
	tpasscontext246003* c;
	c = p.Field0(module);
	unsureAsgnRef((void**) &(*Result).Field0, p.Field2(c, m.Field0));
	{
		if (!!((p.Field3 == NIM_NIL))) goto LA3;
		unsureAsgnRef((void**) &(*Result).Field1, p.Field3(c, m.Field1));
	}
	goto LA1;
	LA3: ;
	{
		unsureAsgnRef((void**) &(*Result).Field1, m.Field1);
	}
	LA1: ;
}

N_NIMCALL(void, carrypasses_246226)(tnode188803* nodes, tsym188833* module, tpass246015* passes, NI passesLen0) {
	TY439278 passdata;
	tpass246015 pass_246270;
	NI i_246273;
	memset((void*)&passdata, 0, sizeof(passdata));
	passdata.Field0 = nodes;
	memset((void*)&pass_246270, 0, sizeof(pass_246270));
	i_246273 = 0;
	while (1) {
		TY439278 LOC2;
		if (!(i_246273 < passesLen0)) goto LA1;
		pass_246270 = passes[i_246273];
		memset((void*)&LOC2, 0, sizeof(LOC2));
		carrypass_246208(pass_246270, module, passdata, &LOC2);
		passdata.Field0 = LOC2.Field0;
		passdata.Field1 = LOC2.Field1;
		i_246273 += 1;
	} LA1: ;
}
N_NOINLINE(void, passesInit)(void) {
}

N_NOINLINE(void, passesDatInit)(void) {
static TNimNode TMP826[1];
NTI246003.size = sizeof(tpasscontext246003);
NTI246003.kind = 17;
NTI246003.base = (&NTI2409);
NTI246003.flags = 1;
TMP826[0].kind = 1;
TMP826[0].offset = offsetof(tpasscontext246003, Fromcache);
TMP826[0].typ = (&NTI134);
TMP826[0].name = "fromCache";
NTI246003.node = &TMP826[0];
}

