/* 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 tnode224816 tnode224816;
typedef struct tsym224846 tsym224846;
typedef struct ttype224852 ttype224852;
typedef struct tlineinfo194539 tlineinfo194539;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tident199021 tident199021;
typedef struct tnodeseq224810 tnodeseq224810;
typedef struct tidobj199015 tidobj199015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq224848 ttypeseq224848;
typedef struct tscope224840 tscope224840;
typedef struct TY224947 TY224947;
typedef struct tinstantiation224836 tinstantiation224836;
typedef struct tstrtable224820 tstrtable224820;
typedef struct tsymseq224818 tsymseq224818;
typedef struct tloc224830 tloc224830;
typedef struct trope176009 trope176009;
typedef struct tlib224834 tlib224834;
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 TY84745 TY84745;
typedef struct TY224936 TY224936;
typedef struct tlistentry126022 tlistentry126022;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
struct  tlineinfo194539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tnode224816  {
ttype224852* Typ;
tlineinfo194539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym224846* Sym;
} S4;
struct {tident199021* Ident;
} S5;
struct {tnodeseq224810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
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  tidobj199015  {
  TNimObject Sup;
NI Id;
};
struct  tstrtable224820  {
NI Counter;
tsymseq224818* Data;
};
struct  tloc224830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype224852* T;
trope176009* R;
trope176009* Heaproot;
};
struct  tsym224846  {
  tidobj199015 Sup;
NU8 Kind;
union {
struct {ttypeseq224848* Typeinstcache;
tscope224840* Typscope;
} S1;
struct {TY224947* Procinstcache;
tscope224840* Scope;
} S2;
struct {TY224947* Usedgenerics;
tstrtable224820 Tab;
} S3;
struct {tsym224846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype224852* Typ;
tident199021* Name;
tlineinfo194539 Info;
tsym224846* Owner;
NU32 Flags;
tnode224816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc224830 Loc;
tlib224834* Annex;
tnode224816* 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  ttype224852  {
  tidobj199015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq224848* Sons;
tnode224816* N;
tsym224846* Owner;
tsym224846* Sym;
tsym224846* Destructor;
tsym224846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc224830 Loc;
};
struct  tident199021  {
  tidobj199015 Sup;
NimStringDesc* S;
tident199021* Next;
NI H;
};
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tscope224840  {
NI Depthlevel;
tstrtable224820 Symbols;
tnodeseq224810* Usingsyms;
tscope224840* Parent;
};
struct  tinstantiation224836  {
tsym224846* Sym;
ttypeseq224848* Concretetypes;
TY224936* Usedby;
};
struct  trope176009  {
  TNimObject Sup;
trope176009* Left;
trope176009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry126022  {
  TNimObject Sup;
tlistentry126022* Prev;
tlistentry126022* Next;
};
struct  tlib224834  {
  tlistentry126022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope176009* Name;
tnode224816* 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 tnodeseq224810 {
  TGenericSeq Sup;
  tnode224816* data[SEQ_DECL_SIZE];
};
struct ttypeseq224848 {
  TGenericSeq Sup;
  ttype224852* data[SEQ_DECL_SIZE];
};
struct TY224947 {
  TGenericSeq Sup;
  tinstantiation224836* data[SEQ_DECL_SIZE];
};
struct tsymseq224818 {
  TGenericSeq Sup;
  tsym224846* data[SEQ_DECL_SIZE];
};
struct TY224936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
static N_INLINE(tnode224816*, lastson_225261)(tnode224816* n);
static N_INLINE(NI, sonslen_225249)(tnode224816* n);
N_NIMCALL(tnode224816*, newnodei_225138)(NU8 kind, tlineinfo194539 info);
N_NIMCALL(tsym224846*, newsym_225074)(NU8 symkind, tident199021* name, tsym224846* owner, tlineinfo194539 info);
N_NIMCALL(tident199021*, getident_199472)(NimStringDesc* identifier);
N_NIMCALL(ttype224852*, skiptypes_229245)(ttype224852* t, NU64 kinds);
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(tnode224816*, newsymnode_225132)(tsym224846* sym);
N_NIMCALL(void, addvar_423053)(tnode224816* father, tnode224816* v);
N_NIMCALL(tnode224816*, newnodei_227007)(NU8 kind, tlineinfo194539 info, NI children);
N_NIMCALL(void, addson_225287)(tnode224816* father, tnode224816* son);
N_NIMCALL(void, add_225498)(tnode224816* father, tnode224816* son);
N_NIMCALL(tnode224816*, newasgnstmt_423106)(tnode224816* le, tnode224816* ri);
static N_INLINE(NI, len_225364)(tnode224816* n);
N_NIMCALL(tnode224816*, newtupleaccess_423027)(tnode224816* tup, NI i);
N_NIMCALL(tnode224816*, newnodeit_225145)(NU8 kind, tlineinfo194539 info, ttype224852* typ);
N_NIMCALL(tnode224816*, copytree_225329)(tnode224816* src);
N_NIMCALL(ttype224852*, getsystype_281030)(NU8 kind);
N_NIMCALL(ttype224852*, newtype_225083)(NU8 kind, tsym224846* owner);
N_NIMCALL(void, rawaddson_229562)(ttype224852* father, ttype224852* son);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
static N_INLINE(ttype224852*, skipintlit_281533)(ttype224852* t);
N_NIMCALL(tsym224846*, lookupinrecord_234236)(tnode224816* n, tident199021* field);
N_NIMCALL(tnode224816*, indirectaccess_424207)(tnode224816* a, NimStringDesc* b, tlineinfo194539 info);
N_NIMCALL(tsym224846*, getsymfromlist_234228)(tnode224816* list, tident199021* ident, NI start);
N_NIMCALL(void, internalerror_197006)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_197126)(TY84745 x_197130);
static N_INLINE(NIM_BOOL, isemptytype_231991)(ttype224852* t);
N_NIMCALL(NIM_BOOL, containsgarbagecollectedref_262163)(ttype224852* typ);
static N_INLINE(tnode224816*, HEX5BHEX5D_225698)(tnode224816* n, NI i);
N_NIMCALL(NU8, spawnresult_424994)(ttype224852* t, NIM_BOOL inparallel);
N_NIMCALL(void, localerror_196966)(tlineinfo194539 info, NimStringDesc* arg);
N_NIMCALL(ttype224852*, createobj_423304)(tsym224846* owner, tlineinfo194539 info);
N_NIMCALL(tnode224816*, createcastexpr_425438)(tsym224846* argsparam, ttype224852* objtype);
N_NIMCALL(void, addfield_423608)(ttype224852* obj, tsym224846* s);
N_NIMCALL(tnode224816*, newfastasgnstmt_423145)(tnode224816* le, tnode224816* ri);
N_NIMCALL(tnode224816*, newdotexpr_424007)(tsym224846* obj, tsym224846* b);
N_NIMCALL(tnode224816*, indirectaccess_424848)(tnode224816* a, tsym224846* b, tlineinfo194539 info);
N_NIMCALL(void, setupargsforconcurrency_425449)(tnode224816* n, ttype224852* objtype, tsym224846* scratchobj, tnode224816* castexpr, tnode224816* call, tnode224816* varsection, tnode224816* varinit, tnode224816* result);
N_NIMCALL(tsym224846*, addlocalvar_425029)(tnode224816* varsection, tnode224816* varinit, tsym224846* owner, ttype224852* typ, tnode224816* v, NIM_BOOL useshallowcopy);
N_NIMCALL(tsym224846*, createmagic_367405)(NimStringDesc* name, NU16 m);
N_NIMCALL(void, setupargsforparallelism_425698)(tnode224816* n_425700, ttype224852* objtype, tsym224846* scratchobj, tnode224816* castexpr, tnode224816* call, tnode224816* varsection, tnode224816* varinit, tnode224816* result);
N_NIMCALL(NU16, getmagic_260845)(tnode224816* op);
N_NIMCALL(tnode224816*, genaddrof_424872)(tnode224816* n);
N_NIMCALL(tnode224816*, genhigh_425646)(tnode224816* n);
N_NIMCALL(tnode224816*, newintlit_425636)(NI64 value);
N_NIMCALL(tnode224816*, newintnode_225096)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, lastord_262010)(ttype224852* t);
N_NIMCALL(tnode224816*, genderef_424896)(tnode224816* n);
N_NIMCALL(NI64, computesize_262193)(ttype224852* typ);
N_NIMCALL(tsym224846*, getroot_425533)(tnode224816* n);
N_NIMCALL(tsym224846*, getcompilerproc_281036)(NimStringDesc* name);
N_NIMCALL(tnode224816*, callproc_424971)(tnode224816* a);
N_NIMCALL(tnode224816*, callcodegenproc_424906)(NimStringDesc* name, tnode224816* arg1, tnode224816* arg2, tnode224816* arg3);
N_NIMCALL(void, localerror_196955)(tlineinfo194539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(tsym224846*, createwrapperproc_425177)(tnode224816* f, tsym224846* threadparam, tsym224846* argsparam, tnode224816* varsection, tnode224816* varinit, tnode224816* call, tnode224816* barrier, tnode224816* fv, NU8 spawnkind);
N_NIMCALL(NU8, flowvarkind_425005)(ttype224852* t);
N_NIMCALL(NimStringDesc*, typetostring_262031)(ttype224852* typ, NU8 prefer);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(tnode224816*, newprocnode_227432)(NU8 kind, tlineinfo194539 info, tnode224816* body, tnode224816* params, tnode224816* name, tnode224816* pattern, tnode224816* genericparams, tnode224816* pragmas, tnode224816* exceptions);
STRING_LITERAL(TMP2817, ":tmp", 4);
STRING_LITERAL(TMP3190, "compiler/lowerings.nim", 22);
NIM_CONST TY84745 TMP3189 = {((NimStringDesc*) &TMP3190),
129}
;
NIM_CONST TY84745 TMP3829 = {((NimStringDesc*) &TMP3190),
476}
;
NIM_CONST TY84745 TMP3830 = {((NimStringDesc*) &TMP3190),
479}
;
STRING_LITERAL(TMP3831, "\'spawn\' must not be discarded", 29);
STRING_LITERAL(TMP3832, "\'spawn\' takes a call expression", 31);
STRING_LITERAL(TMP3833, "\'spawn\' takes a GC safe call expression", 39);
STRING_LITERAL(TMP3834, "thread", 6);
STRING_LITERAL(TMP3835, "args", 4);
STRING_LITERAL(TMP3836, "scratch", 7);
STRING_LITERAL(TMP3837, "fn", 2);
STRING_LITERAL(TMP3838, "iterator in spawn environment is not allowed", 44);
STRING_LITERAL(TMP3839, "closure in spawn environment is not allowed", 43);
STRING_LITERAL(TMP3840, "\'spawn\'ed function cannot have a \'var\' parameter", 48);
STRING_LITERAL(TMP3841, "deepCopy", 8);
STRING_LITERAL(TMP3842, "slice", 5);
STRING_LITERAL(TMP3843, "high", 4);
STRING_LITERAL(TMP3844, "Barrier", 7);
STRING_LITERAL(TMP3845, "barrier", 7);
STRING_LITERAL(TMP3846, "fv", 2);
STRING_LITERAL(TMP3847, "nimFlowVarCreateSemaphore", 25);
STRING_LITERAL(TMP3848, "barrierEnter", 12);
NIM_CONST TY84745 TMP3849 = {((NimStringDesc*) &TMP3190),
273}
;
STRING_LITERAL(TMP3850, "owner", 5);
STRING_LITERAL(TMP3851, "nimArgsPassingDone", 18);
STRING_LITERAL(TMP3852, "cannot create a flowVar of type: ", 33);
STRING_LITERAL(TMP3853, "data", 4);
STRING_LITERAL(TMP3854, "blob", 4);
STRING_LITERAL(TMP3855, "GCref", 5);
STRING_LITERAL(TMP3856, "nimFlowVarSignal", 16);
STRING_LITERAL(TMP3857, "barrierLeave", 12);
STRING_LITERAL(TMP3858, "Wrapper", 7);
STRING_LITERAL(TMP3859, "nimSpawn", 8);
extern tgcheap47016 gch_47044;
extern tnode224816* emptynode_225738;
extern NU32 gglobaloptions_168118;

static N_INLINE(NI, sonslen_225249)(tnode224816* 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(tnode224816*, lastson_225261)(tnode224816* n) {
	tnode224816* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_225249(n);
	result = (*n).kindU.S6.Sons->data[(NI64)(LOC1 - 1)];
	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(void, addvar_423053)(tnode224816* father, tnode224816* v) {
	tnode224816* vpart;
	vpart = newnodei_227007(((NU8) 35), (*v).Info, 3);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[0]), v);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[1]), emptynode_225738);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[2]), emptynode_225738);
	addson_225287(father, vpart);
}

N_NIMCALL(tnode224816*, newasgnstmt_423106)(tnode224816* le, tnode224816* ri) {
	tnode224816* result;
	result = 0;
	result = newnodei_227007(((NU8) 73), (*le).Info, 2);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), le);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), ri);
	return result;
}

static N_INLINE(NI, len_225364)(tnode224816* 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(tnode224816*, newtupleaccess_423027)(tnode224816* tup, NI i) {
	tnode224816* result;
	ttype224852* LOC1;
	tnode224816* LOC2;
	tnode224816* lit;
	ttype224852* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_229245((*tup).Typ, IL64(211106232576256));
	result = newnodeit_225145(((NU8) 42), (*tup).Info, (*LOC1).Sons->data[i]);
	LOC2 = 0;
	LOC2 = copytree_225329(tup);
	addson_225287(result, LOC2);
	LOC3 = 0;
	LOC3 = getsystype_281030(((NU8) 31));
	lit = newnodeit_225145(((NU8) 6), (*tup).Info, LOC3);
	(*lit).kindU.S1.Intval = ((NI64) (i));
	addson_225287(result, lit);
	return result;
}

N_NIMCALL(tnode224816*, lowertupleunpacking_423184)(tnode224816* n, tsym224846* owner) {
	tnode224816* result;
	tnode224816* value;
	tsym224846* temp;
	tident199021* LOC1;
	tnode224816* v;
	tnode224816* tempasnode;
	tnode224816* LOC2;
	result = 0;
	value = lastson_225261(n);
	result = newnodei_225138(((NU8) 115), (*n).Info);
	LOC1 = 0;
	LOC1 = getident_199472(((NimStringDesc*) &TMP2817));
	temp = newsym_225074(((NU8) 5), LOC1, owner, (*value).Info);
	asgnRefNoCycle((void**) (&(*temp).Typ), skiptypes_229245((*value).Typ, IL64(211106232576256)));
	(*temp).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	v = newnodei_225138(((NU8) 99), (*value).Info);
	tempasnode = newsymnode_225132(temp);
	addvar_423053(v, tempasnode);
	add_225498(result, v);
	LOC2 = 0;
	LOC2 = newasgnstmt_423106(tempasnode, value);
	add_225498(result, LOC2);
	{
		NI i_423231;
		NI HEX3Atmp_423284;
		NI LOC4;
		NI res_423287;
		i_423231 = 0;
		HEX3Atmp_423284 = 0;
		LOC4 = 0;
		LOC4 = len_225364(n);
		HEX3Atmp_423284 = (NI64)(LOC4 - 3);
		res_423287 = 0;
		{
			while (1) {
				tnode224816* LOC11;
				tnode224816* LOC12;
				if (!(res_423287 <= HEX3Atmp_423284)) goto LA6;
				i_423231 = res_423287;
				{
					if (!((*(*n).kindU.S6.Sons->data[i_423231]).Kind == ((NU8) 3))) goto LA9;
					addvar_423053(v, (*n).kindU.S6.Sons->data[i_423231]);
				}
				LA9: ;
				LOC11 = 0;
				LOC11 = newtupleaccess_423027(tempasnode, i_423231);
				LOC12 = 0;
				LOC12 = newasgnstmt_423106((*n).kindU.S6.Sons->data[i_423231], LOC11);
				add_225498(result, LOC12);
				res_423287 += 1;
			} LA6: ;
		}
	}
	return result;
}

N_NIMCALL(ttype224852*, createobj_423304)(tsym224846* owner, tlineinfo194539 info) {
	ttype224852* result;
	result = 0;
	result = newtype_225083(((NU8) 17), owner);
	rawaddson_229562(result, NIM_NIL);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	asgnRefNoCycle((void**) (&(*result).N), newnodei_225138(((NU8) 137), info));
	return result;
}

N_NIMCALL(void, rawaddfield_423331)(ttype224852* obj, tsym224846* field) {
	tnode224816* LOC1;
	(*field).Position = sonslen_225249((*obj).N);
	LOC1 = 0;
	LOC1 = newsymnode_225132(field);
	addson_225287((*obj).N, LOC1);
}

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

static N_INLINE(ttype224852*, skipintlit_281533)(ttype224852* t) {
	ttype224852* result;
	result = 0;
	{
		if (!!(((*t).N == NIM_NIL))) goto LA3;
		{
			if (!((IL64(70866960384) &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0)) goto LA7;
			result = getsystype_281030((*t).Kind);
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	result = t;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, addfield_423608)(ttype224852* obj, tsym224846* s) {
	tsym224846* field;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	tident199021* LOC3;
	ttype224852* t;
	tnode224816* LOC4;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nimIntToStr((*s).Sup.Id);
	LOC1 = rawNewString((*(*s).Name).S->Sup.len + LOC2->Sup.len + 0);
appendString(LOC1, (*(*s).Name).S);
appendString(LOC1, LOC2);
	LOC3 = 0;
	LOC3 = getident_199472(LOC1);
	field = newsym_225074(((NU8) 19), LOC3, (*s).Owner, (*s).Info);
	t = skipintlit_281533((*s).Typ);
	asgnRefNoCycle((void**) (&(*field).Typ), t);
	(*field).Position = sonslen_225249((*obj).N);
	LOC4 = 0;
	LOC4 = newsymnode_225132(field);
	addson_225287((*obj).N, LOC4);
}

N_NIMCALL(void, adduniquefield_423807)(ttype224852* obj, tsym224846* s) {
	tident199021* fieldname;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nimIntToStr((*s).Sup.Id);
	LOC1 = rawNewString((*(*s).Name).S->Sup.len + LOC2->Sup.len + 0);
appendString(LOC1, (*(*s).Name).S);
appendString(LOC1, LOC2);
	fieldname = getident_199472(LOC1);
	{
		tsym224846* LOC5;
		tsym224846* field;
		ttype224852* t;
		tnode224816* LOC8;
		LOC5 = 0;
		LOC5 = lookupinrecord_234236((*obj).N, fieldname);
		if (!(LOC5 == NIM_NIL)) goto LA6;
		field = newsym_225074(((NU8) 19), fieldname, (*s).Owner, (*s).Info);
		t = skipintlit_281533((*s).Typ);
		asgnRefNoCycle((void**) (&(*field).Typ), t);
		(*field).Position = sonslen_225249((*obj).N);
		LOC8 = 0;
		LOC8 = newsymnode_225132(field);
		addson_225287((*obj).N, LOC8);
	}
	LA6: ;
}

N_NIMCALL(tnode224816*, indirectaccess_424207)(tnode224816* a, NimStringDesc* b, tlineinfo194539 info) {
	tnode224816* result;
	tnode224816* deref;
	ttype224852* LOC1;
	ttype224852* t;
	tsym224846* field;
	tnode224816* LOC18;
	result = 0;
	deref = newnodei_225138(((NU8) 65), info);
	LOC1 = 0;
	LOC1 = skiptypes_229245((*a).Typ, IL64(211106232576256));
	asgnRefNoCycle((void**) (&(*deref).Typ), (*LOC1).Sons->data[0]);
	t = skiptypes_229245((*deref).Typ, IL64(211106232576256));
	field = 0;
	{
		while (1) {
			tident199021* LOC4;
			LOC4 = 0;
			LOC4 = getident_199472(b);
			field = getsymfromlist_234228((*t).N, LOC4, 0);
			{
				if (!!((field == NIM_NIL))) goto LA7;
				goto LA2;
			}
			LA7: ;
			t = (*t).Sons->data[0];
			{
				if (!(t == NIM_NIL)) goto LA11;
				goto LA2;
			}
			LA11: ;
			t = skiptypes_229245(t, IL64(211106232576256));
		}
	} LA2: ;
	{
		NimStringDesc* LOC17;
		if (!!(!((field == NIM_NIL)))) goto LA15;
		LOC17 = 0;
		LOC17 = HEX24_197126(TMP3189);
		internalerror_197006(LOC17);
	}
	LA15: ;
	addson_225287(deref, a);
	result = newnodei_225138(((NU8) 45), info);
	addson_225287(result, deref);
	LOC18 = 0;
	LOC18 = newsymnode_225132(field);
	addson_225287(result, LOC18);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

N_NIMCALL(tnode224816*, indirectaccess_424848)(tnode224816* a, tsym224846* b, tlineinfo194539 info) {
	tnode224816* result;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nimIntToStr((*b).Sup.Id);
	LOC1 = rawNewString((*(*b).Name).S->Sup.len + LOC2->Sup.len + 0);
appendString(LOC1, (*(*b).Name).S);
appendString(LOC1, LOC2);
	result = indirectaccess_424207(a, LOC1, info);
	return result;
}

N_NIMCALL(tnode224816*, rawindirectaccess_423407)(tnode224816* a, tsym224846* field, tlineinfo194539 info) {
	tnode224816* result;
	tnode224816* deref;
	ttype224852* LOC1;
	tnode224816* LOC2;
	result = 0;
	deref = newnodei_225138(((NU8) 65), info);
	LOC1 = 0;
	LOC1 = skiptypes_229245((*a).Typ, IL64(211106232576256));
	asgnRefNoCycle((void**) (&(*deref).Typ), (*LOC1).Sons->data[0]);
	addson_225287(deref, a);
	result = newnodei_225138(((NU8) 45), info);
	addson_225287(result, deref);
	LOC2 = 0;
	LOC2 = newsymnode_225132(field);
	addson_225287(result, LOC2);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

static N_INLINE(NIM_BOOL, isemptytype_231991)(ttype224852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = (t == NIM_NIL);
	if (LOC1) goto LA2;
	LOC1 = ((136 &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, spawnresult_424994)(ttype224852* t, NIM_BOOL inparallel) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isemptytype_231991(t);
		if (!LOC3) goto LA4;
		result = ((NU8) 0);
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC7;
		NIM_BOOL LOC9;
		LOC7 = 0;
		LOC7 = inparallel;
		if (!(LOC7)) goto LA8;
		LOC9 = 0;
		LOC9 = containsgarbagecollectedref_262163(t);
		LOC7 = !(LOC9);
		LA8: ;
		if (!LOC7) goto LA10;
		result = ((NU8) 2);
	}
	goto LA1;
	LA10: ;
	{
		result = ((NU8) 1);
	}
	LA1: ;
	return result;
}

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

N_NIMCALL(tnode224816*, createcastexpr_425438)(tsym224846* argsparam, ttype224852* objtype) {
	tnode224816* result;
	tnode224816* LOC1;
	result = 0;
	result = newnodei_225138(((NU8) 61), (*argsparam).Info);
	add_225498(result, emptynode_225738);
	LOC1 = 0;
	LOC1 = newsymnode_225132(argsparam);
	add_225498(result, LOC1);
	asgnRefNoCycle((void**) (&(*result).Typ), newtype_225083(((NU8) 21), (*objtype).Owner));
	rawaddson_229562((*result).Typ, objtype);
	return result;
}

N_NIMCALL(tnode224816*, newfastasgnstmt_423145)(tnode224816* le, tnode224816* ri) {
	tnode224816* result;
	result = 0;
	result = newnodei_227007(((NU8) 74), (*le).Info, 2);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), le);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), ri);
	return result;
}

N_NIMCALL(tnode224816*, newdotexpr_424007)(tsym224846* obj, tsym224846* b) {
	tnode224816* result;
	tsym224846* field;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	tident199021* LOC3;
	tnode224816* LOC4;
	tnode224816* LOC5;
	result = 0;
	result = newnodei_225138(((NU8) 45), (*obj).Info);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nimIntToStr((*b).Sup.Id);
	LOC1 = rawNewString((*(*b).Name).S->Sup.len + LOC2->Sup.len + 0);
appendString(LOC1, (*(*b).Name).S);
appendString(LOC1, LOC2);
	LOC3 = 0;
	LOC3 = getident_199472(LOC1);
	field = getsymfromlist_234228((*(*obj).Typ).N, LOC3, 0);
	LOC4 = 0;
	LOC4 = newsymnode_225132(obj);
	addson_225287(result, LOC4);
	LOC5 = 0;
	LOC5 = newsymnode_225132(field);
	addson_225287(result, LOC5);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

N_NIMCALL(tsym224846*, addlocalvar_425029)(tnode224816* varsection, tnode224816* varinit, tsym224846* owner, ttype224852* typ, tnode224816* v, NIM_BOOL useshallowcopy) {
	tsym224846* result;
	tident199021* LOC1;
	tnode224816* vpart;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_199472(((NimStringDesc*) &TMP2817));
	result = newsym_225074(((NU8) 5), LOC1, owner, (*varsection).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), typ);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	vpart = newnodei_227007(((NU8) 35), (*varsection).Info, 3);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[0]), newsymnode_225132(result));
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[1]), emptynode_225738);
	{
		if (!varinit == 0) goto LA4;
		asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[2]), v);
	}
	goto LA2;
	LA4: ;
	{
		asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[2]), emptynode_225738);
	}
	LA2: ;
	add_225498(varsection, vpart);
	{
		if (!!((varinit == NIM_NIL))) goto LA9;
		{
			tnode224816* LOC15;
			tnode224816* LOC16;
			if (!useshallowcopy) goto LA13;
			LOC15 = 0;
			LOC15 = newsymnode_225132(result);
			LOC16 = 0;
			LOC16 = newfastasgnstmt_423145(LOC15, v);
			add_225498(varinit, LOC16);
		}
		goto LA11;
		LA13: ;
		{
			tnode224816* deepcopycall;
			tsym224846* LOC18;
			deepcopycall = newnodei_227007(((NU8) 27), (*varinit).Info, 3);
			LOC18 = 0;
			LOC18 = createmagic_367405(((NimStringDesc*) &TMP3841), ((NU16) 214));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[0]), newsymnode_225132(LOC18));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[1]), newsymnode_225132(result));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[2]), v);
			add_225498(varinit, deepcopycall);
		}
		LA11: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(void, setupargsforconcurrency_425449)(tnode224816* n, ttype224852* objtype, tsym224846* scratchobj, tnode224816* castexpr, tnode224816* call, tnode224816* varsection, tnode224816* varinit, tnode224816* result) {
	tnode224816* formals;
	tnode224816* LOC1;
	tident199021* tmpname;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_225698(n, 0);
	formals = (*(*LOC1).Typ).N;
	tmpname = getident_199472(((NimStringDesc*) &TMP2817));
	{
		NI i_425482;
		NI HEX3Atmp_425513;
		NI LOC3;
		NI res_425516;
		i_425482 = 0;
		HEX3Atmp_425513 = 0;
		LOC3 = 0;
		LOC3 = len_225364(n);
		HEX3Atmp_425513 = (LOC3 - 1);
		res_425516 = 1;
		{
			while (1) {
				ttype224852* argtype;
				tnode224816* LOC6;
				tident199021* fieldname;
				tsym224846* field;
				tnode224816* LOC23;
				tnode224816* LOC24;
				tnode224816* LOC25;
				tsym224846* temp;
				tnode224816* LOC26;
				tnode224816* LOC27;
				if (!(res_425516 <= HEX3Atmp_425513)) goto LA5;
				i_425482 = res_425516;
				LOC6 = 0;
				LOC6 = HEX5BHEX5D_225698(n, i_425482);
				argtype = skiptypes_229245((*LOC6).Typ, IL64(211106232576256));
				{
					NIM_BOOL LOC9;
					NI LOC10;
					tnode224816* LOC12;
					tnode224816* LOC15;
					LOC9 = 0;
					LOC10 = 0;
					LOC10 = len_225364(formals);
					LOC9 = (i_425482 < LOC10);
					if (!(LOC9)) goto LA11;
					LOC12 = 0;
					LOC12 = HEX5BHEX5D_225698(formals, i_425482);
					LOC9 = ((*(*LOC12).Typ).Kind == ((NU8) 23));
					LA11: ;
					if (!LOC9) goto LA13;
					LOC15 = 0;
					LOC15 = HEX5BHEX5D_225698(n, i_425482);
					localerror_196966((*LOC15).Info, ((NimStringDesc*) &TMP3840));
				}
				LA13: ;
				{
					NI LOC18;
					tnode224816* LOC21;
					LOC18 = 0;
					LOC18 = len_225364(formals);
					if (!(i_425482 < LOC18)) goto LA19;
					LOC21 = 0;
					LOC21 = HEX5BHEX5D_225698(formals, i_425482);
					fieldname = (*(*LOC21).kindU.S4.Sym).Name;
				}
				goto LA16;
				LA19: ;
				{
					fieldname = tmpname;
				}
				LA16: ;
				field = newsym_225074(((NU8) 19), fieldname, (*objtype).Owner, (*n).Info);
				asgnRefNoCycle((void**) (&(*field).Typ), argtype);
				addfield_423608(objtype, field);
				LOC23 = 0;
				LOC23 = newdotexpr_424007(scratchobj, field);
				LOC24 = 0;
				LOC24 = HEX5BHEX5D_225698(n, i_425482);
				LOC25 = 0;
				LOC25 = newfastasgnstmt_423145(LOC23, LOC24);
				add_225498(result, LOC25);
				LOC26 = 0;
				LOC26 = indirectaccess_424848(castexpr, field, (*n).Info);
				temp = addlocalvar_425029(varsection, varinit, (*objtype).Owner, argtype, LOC26, NIM_FALSE);
				LOC27 = 0;
				LOC27 = newsymnode_225132(temp);
				add_225498(call, LOC27);
				res_425516 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(tnode224816*, genaddrof_424872)(tnode224816* n) {
	tnode224816* result;
	result = 0;
	result = newnodei_227007(((NU8) 63), (*n).Info, 1);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), n);
	asgnRefNoCycle((void**) (&(*result).Typ), newtype_225083(((NU8) 21), (*(*n).Typ).Owner));
	rawaddson_229562((*result).Typ, (*n).Typ);
	return result;
}

N_NIMCALL(tnode224816*, newintlit_425636)(NI64 value) {
	tnode224816* result;
	result = 0;
	result = newintnode_225096(((NU8) 6), value);
	asgnRefNoCycle((void**) (&(*result).Typ), getsystype_281030(((NU8) 31)));
	return result;
}

N_NIMCALL(tnode224816*, genhigh_425646)(tnode224816* n) {
	tnode224816* result;
	result = 0;
	{
		ttype224852* LOC3;
		ttype224852* LOC6;
		NI64 LOC7;
		LOC3 = 0;
		LOC3 = skiptypes_229245((*n).Typ, IL64(211106240964864));
		if (!((65552 &(IL64(1)<<(((*LOC3).Kind)&IL64(63))))!=0)) goto LA4;
		LOC6 = 0;
		LOC6 = skiptypes_229245((*n).Typ, IL64(211106240964864));
		LOC7 = 0;
		LOC7 = lastord_262010(LOC6);
		result = newintlit_425636(LOC7);
	}
	goto LA1;
	LA4: ;
	{
		tsym224846* LOC9;
		result = newnodei_227007(((NU8) 27), (*n).Info, 2);
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_281030(((NU8) 31)));
		LOC9 = 0;
		LOC9 = createmagic_367405(((NimStringDesc*) &TMP3843), ((NU16) 5));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_225132(LOC9));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), n);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode224816*, genderef_424896)(tnode224816* n) {
	tnode224816* result;
	ttype224852* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_229245((*n).Typ, IL64(211106232576256));
	result = newnodeit_225145(((NU8) 65), (*n).Info, (*LOC1).Sons->data[0]);
	add_225498(result, n);
	return result;
}

N_NIMCALL(tsym224846*, getroot_425533)(tnode224816* n) {
	tsym224846* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 3):
	{
		{
			if (!((2100000 &(1<<(((*(*n).kindU.S4.Sym).Kind)&31)))!=0)) goto LA4;
			result = (*n).kindU.S4.Sym;
		}
		LA4: ;
	}
	break;
	case ((NU8) 45):
	case ((NU8) 42):
	case ((NU8) 65):
	case ((NU8) 47):
	case ((NU8) 67):
	case ((NU8) 66):
	case ((NU8) 46):
	{
		result = getroot_425533((*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 58):
	case ((NU8) 59):
	case ((NU8) 60):
	{
		result = getroot_425533((*n).kindU.S6.Sons->data[1]);
	}
	break;
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	case ((NU8) 32):
	{
		{
			NU16 LOC11;
			LOC11 = 0;
			LOC11 = getmagic_260845(n);
			if (!(LOC11 == ((NU16) 151))) goto LA12;
			result = getroot_425533((*n).kindU.S6.Sons->data[1]);
		}
		LA12: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(void, setupargsforparallelism_425698)(tnode224816* n_425700, ttype224852* objtype, tsym224846* scratchobj, tnode224816* castexpr, tnode224816* call, tnode224816* varsection, tnode224816* varinit, tnode224816* result) {
	tnode224816* formals;
	tnode224816* LOC1;
	tident199021* tmpname;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_225698(n_425700, 0);
	formals = (*(*LOC1).Typ).N;
	tmpname = getident_199472(((NimStringDesc*) &TMP2817));
	{
		NI i_425731;
		NI HEX3Atmp_425877;
		NI LOC3;
		NI res_425880;
		i_425731 = 0;
		HEX3Atmp_425877 = 0;
		LOC3 = 0;
		LOC3 = len_225364(n_425700);
		HEX3Atmp_425877 = (LOC3 - 1);
		res_425880 = 1;
		{
			while (1) {
				tnode224816* n;
				ttype224852* argtype;
				ttype224852* LOC6;
				tident199021* fieldname;
				tsym224846* field;
				if (!(res_425880 <= HEX3Atmp_425877)) goto LA5;
				i_425731 = res_425880;
				n = HEX5BHEX5D_225698(n_425700, i_425731);
				LOC6 = 0;
				{
					NI LOC9;
					tnode224816* LOC12;
					LOC9 = 0;
					LOC9 = len_225364(formals);
					if (!(i_425731 < LOC9)) goto LA10;
					LOC12 = 0;
					LOC12 = HEX5BHEX5D_225698(formals, i_425731);
					LOC6 = (*LOC12).Typ;
				}
				goto LA7;
				LA10: ;
				{
					LOC6 = (*n).Typ;
				}
				LA7: ;
				argtype = skiptypes_229245(LOC6, IL64(211106232576256));
				{
					NI LOC16;
					tnode224816* LOC19;
					LOC16 = 0;
					LOC16 = len_225364(formals);
					if (!(i_425731 < LOC16)) goto LA17;
					LOC19 = 0;
					LOC19 = HEX5BHEX5D_225698(formals, i_425731);
					fieldname = (*(*LOC19).kindU.S4.Sym).Name;
				}
				goto LA14;
				LA17: ;
				{
					fieldname = tmpname;
				}
				LA14: ;
				field = newsym_225074(((NU8) 19), fieldname, (*objtype).Owner, (*n).Info);
				{
					tnode224816* slice;
					tsym224846* LOC25;
					tsym224846* fieldb;
					tnode224816* LOC47;
					tsym224846* threadlocal_425837;
					tnode224816* LOC48;
					if (!((IL64(281475110928384) &(IL64(1)<<(((*argtype).Kind)&IL64(63))))!=0)) goto LA23;
					slice = newnodei_227007(((NU8) 27), (*n).Info, 4);
					asgnRefNoCycle((void**) (&(*slice).Typ), (*n).Typ);
					LOC25 = 0;
					LOC25 = createmagic_367405(((NimStringDesc*) &TMP3842), ((NU16) 151));
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[0]), newsymnode_225132(LOC25));
					fieldb = newsym_225074(((NU8) 19), tmpname, (*objtype).Owner, (*n).Info);
					asgnRefNoCycle((void**) (&(*fieldb).Typ), getsystype_281030(((NU8) 31)));
					addfield_423608(objtype, fieldb);
					{
						NU16 LOC28;
						tnode224816* a;
						tnode224816* LOC31;
						tnode224816* LOC32;
						tnode224816* LOC33;
						tsym224846* fielda;
						tnode224816* LOC34;
						tnode224816* LOC35;
						tnode224816* LOC36;
						tnode224816* LOC37;
						tnode224816* LOC38;
						tnode224816* LOC39;
						tsym224846* threadlocal_425793;
						tnode224816* LOC40;
						LOC28 = 0;
						LOC28 = getmagic_260845(n);
						if (!(LOC28 == ((NU16) 151))) goto LA29;
						LOC31 = 0;
						LOC31 = HEX5BHEX5D_225698(n, 1);
						a = genaddrof_424872(LOC31);
						asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
						addfield_423608(objtype, field);
						LOC32 = 0;
						LOC32 = newdotexpr_424007(scratchobj, field);
						LOC33 = 0;
						LOC33 = newfastasgnstmt_423145(LOC32, a);
						add_225498(result, LOC33);
						fielda = newsym_225074(((NU8) 19), tmpname, (*objtype).Owner, (*n).Info);
						asgnRefNoCycle((void**) (&(*fielda).Typ), getsystype_281030(((NU8) 31)));
						addfield_423608(objtype, fielda);
						LOC34 = 0;
						LOC34 = newdotexpr_424007(scratchobj, fielda);
						LOC35 = 0;
						LOC35 = HEX5BHEX5D_225698(n, 2);
						LOC36 = 0;
						LOC36 = newfastasgnstmt_423145(LOC34, LOC35);
						add_225498(result, LOC36);
						LOC37 = 0;
						LOC37 = newdotexpr_424007(scratchobj, fieldb);
						LOC38 = 0;
						LOC38 = HEX5BHEX5D_225698(n, 3);
						LOC39 = 0;
						LOC39 = newfastasgnstmt_423145(LOC37, LOC38);
						add_225498(result, LOC39);
						LOC40 = 0;
						LOC40 = indirectaccess_424848(castexpr, fielda, (*n).Info);
						threadlocal_425793 = addlocalvar_425029(varsection, NIM_NIL, (*objtype).Owner, (*fielda).Typ, LOC40, NIM_TRUE);
						asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[2]), newsymnode_225132(threadlocal_425793));
					}
					goto LA26;
					LA29: ;
					{
						tnode224816* a;
						tnode224816* LOC42;
						tnode224816* LOC43;
						tnode224816* LOC44;
						tnode224816* LOC45;
						tnode224816* LOC46;
						a = genaddrof_424872(n);
						asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
						addfield_423608(objtype, field);
						LOC42 = 0;
						LOC42 = newdotexpr_424007(scratchobj, field);
						LOC43 = 0;
						LOC43 = newfastasgnstmt_423145(LOC42, a);
						add_225498(result, LOC43);
						LOC44 = 0;
						LOC44 = newdotexpr_424007(scratchobj, fieldb);
						LOC45 = 0;
						LOC45 = genhigh_425646(n);
						LOC46 = 0;
						LOC46 = newfastasgnstmt_423145(LOC44, LOC45);
						add_225498(result, LOC46);
						asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[2]), newintlit_425636(IL64(0)));
					}
					LA26: ;
					LOC47 = 0;
					LOC47 = indirectaccess_424848(castexpr, field, (*n).Info);
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[1]), genderef_424896(LOC47));
					LOC48 = 0;
					LOC48 = indirectaccess_424848(castexpr, fieldb, (*n).Info);
					threadlocal_425837 = addlocalvar_425029(varsection, NIM_NIL, (*objtype).Owner, (*fieldb).Typ, LOC48, NIM_TRUE);
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[3]), newsymnode_225132(threadlocal_425837));
					add_225498(call, slice);
				}
				goto LA21;
				LA23: ;
				{
					NIM_BOOL LOC50;
					NI64 size;
					NIM_BOOL LOC51;
					tsym224846* LOC54;
					tnode224816* a;
					tnode224816* LOC57;
					tnode224816* LOC58;
					tsym224846* threadlocal_425874;
					tnode224816* LOC59;
					tnode224816* LOC60;
					tnode224816* LOC61;
					LOC50 = 0;
					size = computesize_262193(argtype);
					LOC51 = 0;
					LOC51 = (size < IL64(0));
					if (LOC51) goto LA52;
					LOC51 = (IL64(16) < size);
					LA52: ;
					LOC50 = LOC51;
					if (!(LOC50)) goto LA53;
					LOC54 = 0;
					LOC54 = getroot_425533(n);
					LOC50 = !((LOC54 == NIM_NIL));
					LA53: ;
					if (!LOC50) goto LA55;
					a = genaddrof_424872(n);
					asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
					addfield_423608(objtype, field);
					LOC57 = 0;
					LOC57 = newdotexpr_424007(scratchobj, field);
					LOC58 = 0;
					LOC58 = newfastasgnstmt_423145(LOC57, a);
					add_225498(result, LOC58);
					LOC59 = 0;
					LOC59 = indirectaccess_424848(castexpr, field, (*n).Info);
					threadlocal_425874 = addlocalvar_425029(varsection, NIM_NIL, (*objtype).Owner, (*field).Typ, LOC59, NIM_TRUE);
					LOC60 = 0;
					LOC60 = newsymnode_225132(threadlocal_425874);
					LOC61 = 0;
					LOC61 = genderef_424896(LOC60);
					add_225498(call, LOC61);
				}
				goto LA21;
				LA55: ;
				{
					tnode224816* LOC63;
					tnode224816* LOC64;
					tsym224846* threadlocal_425875;
					tnode224816* LOC65;
					tnode224816* LOC66;
					asgnRefNoCycle((void**) (&(*field).Typ), argtype);
					addfield_423608(objtype, field);
					LOC63 = 0;
					LOC63 = newdotexpr_424007(scratchobj, field);
					LOC64 = 0;
					LOC64 = newfastasgnstmt_423145(LOC63, n);
					add_225498(result, LOC64);
					LOC65 = 0;
					LOC65 = indirectaccess_424848(castexpr, field, (*n).Info);
					threadlocal_425875 = addlocalvar_425029(varsection, varinit, (*objtype).Owner, (*field).Typ, LOC65, NIM_TRUE);
					LOC66 = 0;
					LOC66 = newsymnode_225132(threadlocal_425875);
					add_225498(call, LOC66);
				}
				LA21: ;
				res_425880 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(tnode224816*, callproc_424971)(tnode224816* a) {
	tnode224816* result;
	result = 0;
	result = newnodei_225138(((NU8) 27), (*a).Info);
	add_225498(result, a);
	asgnRefNoCycle((void**) (&(*result).Typ), (*(*a).Typ).Sons->data[0]);
	return result;
}

N_NIMCALL(tnode224816*, callcodegenproc_424906)(NimStringDesc* name, tnode224816* arg1, tnode224816* arg2, tnode224816* arg3) {
	tnode224816* result;
	tsym224846* sym;
	result = 0;
	result = newnodei_225138(((NU8) 27), (*arg1).Info);
	sym = getcompilerproc_281036(name);
	{
		if (!(sym == NIM_NIL)) goto LA3;
		localerror_196955((*arg1).Info, ((NU16) 64), name);
	}
	goto LA1;
	LA3: ;
	{
		tnode224816* LOC6;
		LOC6 = 0;
		LOC6 = newsymnode_225132(sym);
		add_225498(result, LOC6);
		add_225498(result, arg1);
		{
			if (!!((arg2 == NIM_NIL))) goto LA9;
			add_225498(result, arg2);
		}
		LA9: ;
		{
			if (!!((arg3 == NIM_NIL))) goto LA13;
			add_225498(result, arg3);
		}
		LA13: ;
		asgnRefNoCycle((void**) (&(*result).Typ), (*(*sym).Typ).Sons->data[0]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, flowvarkind_425005)(ttype224852* t) {
	NU8 result;
	result = 0;
	{
		ttype224852* LOC3;
		LOC3 = 0;
		LOC3 = skiptypes_229245(t, IL64(211106232576256));
		if (!((289406976 &(IL64(1)<<(((*LOC3).Kind)&IL64(63))))!=0)) goto LA4;
		result = ((NU8) 1);
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = containsgarbagecollectedref_262163(t);
		if (!LOC7) goto LA8;
		result = ((NU8) 0);
	}
	goto LA1;
	LA8: ;
	{
		result = ((NU8) 2);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym224846*, createwrapperproc_425177)(tnode224816* f, tsym224846* threadparam, tsym224846* argsparam, tnode224816* varsection, tnode224816* varinit, tnode224816* call, tnode224816* barrier, tnode224816* fv, NU8 spawnkind) {
	tsym224846* result;
	tnode224816* body;
	tsym224846* threadlocalbarrier;
	tsym224846* threadlocalprom;
	tnode224816* LOC29;
	tnode224816* LOC30;
	tnode224816* params;
	tnode224816* LOC75;
	tnode224816* LOC76;
	ttype224852* t;
	tnode224816* LOC77;
	tnode224816* LOC78;
	tnode224816* LOC79;
	NimStringDesc* name;
	NimStringDesc* LOC80;
	NimStringDesc* LOC81;
	tident199021* LOC87;
	tnode224816* LOC88;
	result = 0;
	body = newnodei_225138(((NU8) 115), (*f).Info);
	threadlocalbarrier = 0;
	{
		tnode224816* varsection2;
		tnode224816* LOC5;
		tnode224816* LOC6;
		if (!!((barrier == NIM_NIL))) goto LA3;
		varsection2 = newnodei_225138(((NU8) 99), (*barrier).Info);
		threadlocalbarrier = addlocalvar_425029(varsection2, NIM_NIL, (*argsparam).Owner, (*barrier).Typ, barrier, NIM_FALSE);
		add_225498(body, varsection2);
		LOC5 = 0;
		LOC5 = newsymnode_225132(threadlocalbarrier);
		LOC6 = 0;
		LOC6 = callcodegenproc_424906(((NimStringDesc*) &TMP3848), LOC5, NIM_NIL, NIM_NIL);
		add_225498(body, LOC6);
	}
	LA3: ;
	threadlocalprom = 0;
	{
		if (!(spawnkind == ((NU8) 2))) goto LA9;
		threadlocalprom = addlocalvar_425029(varsection, NIM_NIL, (*argsparam).Owner, (*fv).Typ, fv, NIM_FALSE);
	}
	goto LA7;
	LA9: ;
	{
		if (!!((fv == NIM_NIL))) goto LA12;
		{
			NimStringDesc* LOC18;
			if (!!(((*(*fv).Typ).Kind == ((NU8) 11)))) goto LA16;
			LOC18 = 0;
			LOC18 = HEX24_197126(TMP3849);
			internalerror_197006(LOC18);
		}
		LA16: ;
		threadlocalprom = addlocalvar_425029(varsection, NIM_NIL, (*argsparam).Owner, (*fv).Typ, fv, NIM_FALSE);
	}
	goto LA7;
	LA12: ;
	LA7: ;
	add_225498(body, varsection);
	add_225498(body, varinit);
	{
		NIM_BOOL LOC21;
		tnode224816* LOC25;
		tnode224816* LOC26;
		tnode224816* LOC27;
		tnode224816* LOC28;
		LOC21 = 0;
		LOC21 = !((fv == NIM_NIL));
		if (!(LOC21)) goto LA22;
		LOC21 = !((spawnkind == ((NU8) 2)));
		LA22: ;
		if (!LOC21) goto LA23;
		LOC25 = 0;
		LOC25 = newsymnode_225132(threadlocalprom);
		LOC26 = 0;
		LOC26 = indirectaccess_424207(LOC25, ((NimStringDesc*) &TMP3850), (*fv).Info);
		LOC27 = 0;
		LOC27 = newsymnode_225132(threadparam);
		LOC28 = 0;
		LOC28 = newasgnstmt_423106(LOC26, LOC27);
		add_225498(body, LOC28);
	}
	LA23: ;
	LOC29 = 0;
	LOC29 = newsymnode_225132(threadparam);
	LOC30 = 0;
	LOC30 = callcodegenproc_424906(((NimStringDesc*) &TMP3851), LOC29, NIM_NIL, NIM_NIL);
	add_225498(body, LOC30);
	{
		tnode224816* LOC35;
		tnode224816* LOC36;
		tnode224816* LOC37;
		if (!(spawnkind == ((NU8) 2))) goto LA33;
		LOC35 = 0;
		LOC35 = newsymnode_225132(threadlocalprom);
		LOC36 = 0;
		LOC36 = genderef_424896(LOC35);
		LOC37 = 0;
		LOC37 = newasgnstmt_423106(LOC36, call);
		add_225498(body, LOC37);
	}
	goto LA31;
	LA33: ;
	{
		NU8 fk;
		tnode224816* LOC47;
		NimStringDesc* LOC48;
		tnode224816* LOC54;
		tnode224816* LOC55;
		if (!!((fv == NIM_NIL))) goto LA39;
		fk = flowvarkind_425005((*(*fv).Typ).Sons->data[1]);
		{
			NimStringDesc* LOC45;
			NimStringDesc* LOC46;
			if (!(fk == ((NU8) 0))) goto LA43;
			LOC45 = 0;
			LOC46 = 0;
			LOC46 = typetostring_262031((*(*fv).Typ).Sons->data[1], ((NU8) 0));
			LOC45 = rawNewString(LOC46->Sup.len + 33);
appendString(LOC45, ((NimStringDesc*) &TMP3852));
appendString(LOC45, LOC46);
			localerror_196966((*f).Info, LOC45);
		}
		LA43: ;
		LOC47 = 0;
		LOC47 = newsymnode_225132(threadlocalprom);
		LOC48 = 0;
		{
			if (!(fk == ((NU8) 1))) goto LA51;
			LOC48 = copyString(((NimStringDesc*) &TMP3853));
		}
		goto LA49;
		LA51: ;
		{
			LOC48 = copyString(((NimStringDesc*) &TMP3854));
		}
		LA49: ;
		LOC54 = 0;
		LOC54 = indirectaccess_424207(LOC47, LOC48, (*fv).Info);
		LOC55 = 0;
		LOC55 = newasgnstmt_423106(LOC54, call);
		add_225498(body, LOC55);
		{
			tnode224816* increfcall;
			tsym224846* LOC60;
			tnode224816* LOC61;
			if (!(fk == ((NU8) 1))) goto LA58;
			increfcall = newnodei_227007(((NU8) 27), (*fv).Info, 2);
			LOC60 = 0;
			LOC60 = createmagic_367405(((NimStringDesc*) &TMP3855), ((NU16) 35));
			asgnRefNoCycle((void**) (&(*increfcall).kindU.S6.Sons->data[0]), newsymnode_225132(LOC60));
			LOC61 = 0;
			LOC61 = newsymnode_225132(threadlocalprom);
			asgnRefNoCycle((void**) (&(*increfcall).kindU.S6.Sons->data[1]), indirectaccess_424207(LOC61, ((NimStringDesc*) &TMP3853), (*fv).Info));
			add_225498(body, increfcall);
		}
		LA58: ;
		{
			tnode224816* LOC66;
			tnode224816* LOC67;
			if (!(barrier == NIM_NIL)) goto LA64;
			LOC66 = 0;
			LOC66 = newsymnode_225132(threadlocalprom);
			LOC67 = 0;
			LOC67 = callcodegenproc_424906(((NimStringDesc*) &TMP3856), LOC66, NIM_NIL, NIM_NIL);
			add_225498(body, LOC67);
		}
		LA64: ;
	}
	goto LA31;
	LA39: ;
	{
		add_225498(body, call);
	}
	LA31: ;
	{
		tnode224816* LOC73;
		tnode224816* LOC74;
		if (!!((barrier == NIM_NIL))) goto LA71;
		LOC73 = 0;
		LOC73 = newsymnode_225132(threadlocalbarrier);
		LOC74 = 0;
		LOC74 = callcodegenproc_424906(((NimStringDesc*) &TMP3857), LOC73, NIM_NIL, NIM_NIL);
		add_225498(body, LOC74);
	}
	LA71: ;
	params = newnodei_225138(((NU8) 76), (*f).Info);
	add_225498(params, emptynode_225738);
	LOC75 = 0;
	LOC75 = newsymnode_225132(threadparam);
	add_225498(params, LOC75);
	LOC76 = 0;
	LOC76 = newsymnode_225132(argsparam);
	add_225498(params, LOC76);
	t = newtype_225083(((NU8) 25), (*threadparam).Owner);
	rawaddson_229562(t, NIM_NIL);
	rawaddson_229562(t, (*threadparam).Typ);
	rawaddson_229562(t, (*argsparam).Typ);
	asgnRefNoCycle((void**) (&(*t).N), newnodei_225138(((NU8) 76), (*f).Info));
	LOC77 = 0;
	LOC77 = newnodei_225138(((NU8) 151), (*f).Info);
	add_225498((*t).N, LOC77);
	LOC78 = 0;
	LOC78 = newsymnode_225132(threadparam);
	add_225498((*t).N, LOC78);
	LOC79 = 0;
	LOC79 = newsymnode_225132(argsparam);
	add_225498((*t).N, LOC79);
	LOC80 = 0;
	LOC81 = 0;
	{
		if (!((*f).Kind == ((NU8) 3))) goto LA84;
		LOC81 = copyString((*(*(*f).kindU.S4.Sym).Name).S);
	}
	goto LA82;
	LA84: ;
	{
		LOC81 = copyString(((NimStringDesc*) &TMP2817));
	}
	LA82: ;
	LOC80 = rawNewString(LOC81->Sup.len + 7);
appendString(LOC80, LOC81);
appendString(LOC80, ((NimStringDesc*) &TMP3858));
	name = LOC80;
	LOC87 = 0;
	LOC87 = getident_199472(name);
	result = newsym_225074(((NU8) 12), LOC87, (*argsparam).Owner, (*f).Info);
	LOC88 = 0;
	LOC88 = newsymnode_225132(result);
	asgnRefNoCycle((void**) (&(*result).Ast), newprocnode_227432(((NU8) 79), (*f).Info, body, params, LOC88, emptynode_225738, emptynode_225738, emptynode_225738, emptynode_225738));
	asgnRefNoCycle((void**) (&(*result).Typ), t);
	return result;
}

N_NIMCALL(tnode224816*, wrapprocforspawn_425897)(tsym224846* owner, tnode224816* spawnexpr, ttype224852* rettype, tnode224816* barrier, tnode224816* dest) {
	tnode224816* result;
	tnode224816* n;
	NU8 spawnkind;
	tsym224846* threadparam;
	tident199021* LOC31;
	tsym224846* argsparam;
	tident199021* LOC32;
	ttype224852* objtype;
	tnode224816* castexpr;
	tsym224846* scratchobj;
	tident199021* LOC34;
	tnode224816* call;
	tnode224816* fn;
	tnode224816* varsection;
	tnode224816* varinit;
	tnode224816* barrierasexpr;
	tnode224816* fvfield;
	tnode224816* fvasexpr;
	tsym224846* wrapper;
	tnode224816* LOC89;
	tnode224816* LOC90;
	tnode224816* LOC91;
	tnode224816* LOC92;
	result = 0;
	n = HEX5BHEX5D_225698(spawnexpr, 1);
	spawnkind = spawnresult_424994(rettype, !((barrier == NIM_NIL)));
	switch (spawnkind) {
	case ((NU8) 0):
	{
		{
			NimStringDesc* LOC6;
			if (!!((dest == NIM_NIL))) goto LA4;
			LOC6 = 0;
			LOC6 = HEX24_197126(TMP3829);
			internalerror_197006(LOC6);
		}
		LA4: ;
		result = newnodei_225138(((NU8) 115), (*n).Info);
	}
	break;
	case ((NU8) 1):
	{
		{
			NimStringDesc* LOC12;
			if (!!((dest == NIM_NIL))) goto LA10;
			LOC12 = 0;
			LOC12 = HEX24_197126(TMP3830);
			internalerror_197006(LOC12);
		}
		LA10: ;
		result = newnodeit_225145(((NU8) 126), (*n).Info, rettype);
	}
	break;
	case ((NU8) 2):
	{
		{
			if (!(dest == NIM_NIL)) goto LA16;
			localerror_196966((*n).Info, ((NimStringDesc*) &TMP3831));
		}
		LA16: ;
		result = newnodei_225138(((NU8) 115), (*n).Info);
	}
	break;
	}
	{
		if (!!(((*n).Kind == ((NU8) 27) || (*n).Kind == ((NU8) 29) || (*n).Kind == ((NU8) 30) || (*n).Kind == ((NU8) 31) || (*n).Kind == ((NU8) 26) || (*n).Kind == ((NU8) 28) || (*n).Kind == ((NU8) 32)))) goto LA20;
		localerror_196966((*n).Info, ((NimStringDesc*) &TMP3832));
		goto BeforeRet;
	}
	LA20: ;
	{
		if (!((gglobaloptions_168118 &(1<<((((NU8) 27))&31)))!=0)) goto LA24;
		{
			tnode224816* LOC28;
			LOC28 = 0;
			LOC28 = HEX5BHEX5D_225698(n, 0);
			if (!((130 & (*(*LOC28).Typ).Flags) == 0)) goto LA29;
			localerror_196966((*n).Info, ((NimStringDesc*) &TMP3833));
		}
		LA29: ;
	}
	LA24: ;
	LOC31 = 0;
	LOC31 = getident_199472(((NimStringDesc*) &TMP3834));
	threadparam = newsym_225074(((NU8) 3), LOC31, owner, (*n).Info);
	LOC32 = 0;
	LOC32 = getident_199472(((NimStringDesc*) &TMP3835));
	argsparam = newsym_225074(((NU8) 3), LOC32, owner, (*n).Info);
	{
		ttype224852* ptrtype;
		ptrtype = getsystype_281030(((NU8) 26));
		asgnRefNoCycle((void**) (&(*threadparam).Typ), ptrtype);
		asgnRefNoCycle((void**) (&(*argsparam).Typ), ptrtype);
		(*argsparam).Position = 1;
	}
	objtype = createobj_423304(owner, (*n).Info);
	(*objtype).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	castexpr = createcastexpr_425438(argsparam, objtype);
	LOC34 = 0;
	LOC34 = getident_199472(((NimStringDesc*) &TMP3836));
	scratchobj = newsym_225074(((NU8) 8), LOC34, owner, (*n).Info);
	{
		tnode224816* varsectionb;
		tnode224816* LOC36;
		asgnRefNoCycle((void**) (&(*scratchobj).Typ), objtype);
		(*scratchobj).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
		varsectionb = newnodei_225138(((NU8) 99), (*n).Info);
		LOC36 = 0;
		LOC36 = newsymnode_225132(scratchobj);
		addvar_423053(varsectionb, LOC36);
		add_225498(result, varsectionb);
	}
	call = newnodeit_225145(((NU8) 27), (*n).Info, (*n).Typ);
	fn = (*n).kindU.S6.Sons->data[0];
	{
		NIM_BOOL LOC39;
		ttype224852* argtype;
		tnode224816* LOC43;
		tsym224846* field;
		tident199021* LOC44;
		tnode224816* LOC45;
		tnode224816* LOC46;
		tnode224816* LOC47;
		LOC39 = 0;
		LOC39 = ((*fn).Kind == ((NU8) 3));
		if (!(LOC39)) goto LA40;
		LOC39 = ((471040 &(1<<(((*(*fn).kindU.S4.Sym).Kind)&31)))!=0);
		LA40: ;
		if (!!(LOC39)) goto LA41;
		LOC43 = 0;
		LOC43 = HEX5BHEX5D_225698(n, 0);
		argtype = skiptypes_229245((*LOC43).Typ, IL64(211106232576256));
		LOC44 = 0;
		LOC44 = getident_199472(((NimStringDesc*) &TMP3837));
		field = newsym_225074(((NU8) 19), LOC44, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), argtype);
		addfield_423608(objtype, field);
		LOC45 = 0;
		LOC45 = newdotexpr_424007(scratchobj, field);
		LOC46 = 0;
		LOC46 = HEX5BHEX5D_225698(n, 0);
		LOC47 = 0;
		LOC47 = newfastasgnstmt_423145(LOC45, LOC46);
		add_225498(result, LOC47);
		fn = indirectaccess_424848(castexpr, field, (*n).Info);
	}
	goto LA37;
	LA41: ;
	{
		NIM_BOOL LOC49;
		LOC49 = 0;
		LOC49 = ((*fn).Kind == ((NU8) 3));
		if (!(LOC49)) goto LA50;
		LOC49 = ((49152 &(1<<(((*(*fn).kindU.S4.Sym).Kind)&31)))!=0);
		LA50: ;
		if (!LOC49) goto LA51;
		localerror_196966((*n).Info, ((NimStringDesc*) &TMP3838));
	}
	goto LA37;
	LA51: ;
	{
		if (!((*(*fn).Typ).Callconv == ((NU8) 8))) goto LA54;
		localerror_196966((*n).Info, ((NimStringDesc*) &TMP3839));
	}
	goto LA37;
	LA54: ;
	LA37: ;
	add_225498(call, fn);
	varsection = newnodei_225138(((NU8) 99), (*n).Info);
	varinit = newnodei_225138(((NU8) 115), (*n).Info);
	{
		if (!barrier == 0) goto LA58;
		setupargsforconcurrency_425449(n, objtype, scratchobj, castexpr, call, varsection, varinit, result);
	}
	goto LA56;
	LA58: ;
	{
		setupargsforparallelism_425698(n, objtype, scratchobj, castexpr, call, varsection, varinit, result);
	}
	LA56: ;
	barrierasexpr = NIM_NIL;
	{
		ttype224852* typ;
		tsym224846* LOC65;
		tsym224846* field;
		tident199021* LOC66;
		tnode224816* LOC67;
		tnode224816* LOC68;
		if (!!((barrier == NIM_NIL))) goto LA63;
		typ = newtype_225083(((NU8) 21), owner);
		LOC65 = 0;
		LOC65 = getcompilerproc_281036(((NimStringDesc*) &TMP3844));
		rawaddson_229562(typ, (*LOC65).Typ);
		LOC66 = 0;
		LOC66 = getident_199472(((NimStringDesc*) &TMP3845));
		field = newsym_225074(((NU8) 19), LOC66, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), typ);
		addfield_423608(objtype, field);
		LOC67 = 0;
		LOC67 = newdotexpr_424007(scratchobj, field);
		LOC68 = 0;
		LOC68 = newfastasgnstmt_423145(LOC67, barrier);
		add_225498(result, LOC68);
		barrierasexpr = indirectaccess_424848(castexpr, field, (*n).Info);
	}
	LA63: ;
	fvfield = NIM_NIL;
	fvasexpr = NIM_NIL;
	{
		tsym224846* field;
		tident199021* LOC73;
		tnode224816* LOC74;
		tnode224816* LOC75;
		tnode224816* LOC76;
		if (!(spawnkind == ((NU8) 1))) goto LA71;
		LOC73 = 0;
		LOC73 = getident_199472(((NimStringDesc*) &TMP3846));
		field = newsym_225074(((NU8) 19), LOC73, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), rettype);
		addfield_423608(objtype, field);
		fvfield = newdotexpr_424007(scratchobj, field);
		fvasexpr = indirectaccess_424848(castexpr, field, (*n).Info);
		LOC74 = 0;
		LOC74 = HEX5BHEX5D_225698(spawnexpr, 2);
		LOC75 = 0;
		LOC75 = callproc_424971(LOC74);
		LOC76 = 0;
		LOC76 = newfastasgnstmt_423145(fvfield, LOC75);
		add_225498(result, LOC76);
		{
			tnode224816* LOC81;
			if (!(barrier == NIM_NIL)) goto LA79;
			LOC81 = 0;
			LOC81 = callcodegenproc_424906(((NimStringDesc*) &TMP3847), fvfield, NIM_NIL, NIM_NIL);
			add_225498(result, LOC81);
		}
		LA79: ;
	}
	goto LA69;
	LA71: ;
	{
		tsym224846* field;
		tident199021* LOC85;
		tnode224816* LOC86;
		tnode224816* LOC87;
		tnode224816* LOC88;
		if (!(spawnkind == ((NU8) 2))) goto LA83;
		LOC85 = 0;
		LOC85 = getident_199472(((NimStringDesc*) &TMP3846));
		field = newsym_225074(((NU8) 19), LOC85, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), newtype_225083(((NU8) 21), (*objtype).Owner));
		rawaddson_229562((*field).Typ, rettype);
		addfield_423608(objtype, field);
		fvasexpr = indirectaccess_424848(castexpr, field, (*n).Info);
		LOC86 = 0;
		LOC86 = newdotexpr_424007(scratchobj, field);
		LOC87 = 0;
		LOC87 = genaddrof_424872(dest);
		LOC88 = 0;
		LOC88 = newfastasgnstmt_423145(LOC86, LOC87);
		add_225498(result, LOC88);
	}
	goto LA69;
	LA83: ;
	LA69: ;
	wrapper = createwrapperproc_425177(fn, threadparam, argsparam, varsection, varinit, call, barrierasexpr, fvasexpr, spawnkind);
	LOC89 = 0;
	LOC89 = newsymnode_225132(wrapper);
	LOC90 = 0;
	LOC90 = newsymnode_225132(scratchobj);
	LOC91 = 0;
	LOC91 = genaddrof_424872(LOC90);
	LOC92 = 0;
	LOC92 = callcodegenproc_424906(((NimStringDesc*) &TMP3859), LOC89, LOC91, NIM_NIL);
	add_225498(result, LOC92);
	{
		if (!(spawnkind == ((NU8) 1))) goto LA95;
		add_225498(result, fvfield);
	}
	LA95: ;
	BeforeRet: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_loweringsInit)(void) {
}

NIM_EXTERNC N_NOINLINE(void, HEX00_loweringsDatInit)(void) {
}

