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

#include <string.h>
typedef struct tnode226816 tnode226816;
typedef struct tsym226846 tsym226846;
typedef struct ttype226852 ttype226852;
typedef struct tlineinfo196539 tlineinfo196539;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tident201021 tident201021;
typedef struct tnodeseq226810 tnodeseq226810;
typedef struct tidobj201015 tidobj201015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq226848 ttypeseq226848;
typedef struct tscope226840 tscope226840;
typedef struct TY226947 TY226947;
typedef struct tinstantiation226836 tinstantiation226836;
typedef struct tstrtable226820 tstrtable226820;
typedef struct tsymseq226818 tsymseq226818;
typedef struct tloc226830 tloc226830;
typedef struct trope178009 trope178009;
typedef struct tlib226834 tlib226834;
typedef struct tcell44933 tcell44933;
typedef struct tcellseq44949 tcellseq44949;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44945 tcellset44945;
typedef struct tpagedesc44941 tpagedesc44941;
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 TY226936 TY226936;
typedef struct tlistentry127022 tlistentry127022;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
struct  tlineinfo196539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tnode226816  {
ttype226852* Typ;
tlineinfo196539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym226846* Sym;
} S4;
struct {tident201021* Ident;
} S5;
struct {tnodeseq226810* 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  tidobj201015  {
  TNimObject Sup;
NI Id;
};
struct  tstrtable226820  {
NI Counter;
tsymseq226818* Data;
};
struct  tloc226830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype226852* T;
trope178009* R;
trope178009* Heaproot;
};
struct  tsym226846  {
  tidobj201015 Sup;
NU8 Kind;
union {
struct {ttypeseq226848* Typeinstcache;
tscope226840* Typscope;
} S1;
struct {TY226947* Procinstcache;
tscope226840* Scope;
} S2;
struct {TY226947* Usedgenerics;
tstrtable226820 Tab;
} S3;
struct {tsym226846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype226852* Typ;
tident201021* Name;
tlineinfo196539 Info;
tsym226846* Owner;
NU32 Flags;
tnode226816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc226830 Loc;
tlib226834* Annex;
tnode226816* Constraint;
};
struct  tcell44933  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44949  {
NI Len;
NI Cap;
tcell44933** D;
};
struct  tcellset44945  {
NI Counter;
NI Max;
tpagedesc44941* Head;
tpagedesc44941** 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;
tcellseq44949 Zct;
tcellseq44949 Decstack;
tcellset44945 Cycleroots;
tcellseq44949 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  ttype226852  {
  tidobj201015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq226848* Sons;
tnode226816* N;
tsym226846* Owner;
tsym226846* Sym;
tsym226846* Destructor;
tsym226846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc226830 Loc;
};
struct  tident201021  {
  tidobj201015 Sup;
NimStringDesc* S;
tident201021* Next;
NI H;
};
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tscope226840  {
NI Depthlevel;
tstrtable226820 Symbols;
tnodeseq226810* Usingsyms;
tscope226840* Parent;
};
struct  tinstantiation226836  {
tsym226846* Sym;
ttypeseq226848* Concretetypes;
TY226936* Usedby;
};
struct  trope178009  {
  TNimObject Sup;
trope178009* Left;
trope178009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  tlib226834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope178009* Name;
tnode226816* Path;
};
typedef NI TY26420[16];
struct  tpagedesc44941  {
tpagedesc44941* 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 tnodeseq226810 {
  TGenericSeq Sup;
  tnode226816* data[SEQ_DECL_SIZE];
};
struct ttypeseq226848 {
  TGenericSeq Sup;
  ttype226852* data[SEQ_DECL_SIZE];
};
struct TY226947 {
  TGenericSeq Sup;
  tinstantiation226836* data[SEQ_DECL_SIZE];
};
struct tsymseq226818 {
  TGenericSeq Sup;
  tsym226846* data[SEQ_DECL_SIZE];
};
struct TY226936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
static N_INLINE(tnode226816*, lastson_227261)(tnode226816* n);
static N_INLINE(NI, sonslen_227249)(tnode226816* n);
N_NIMCALL(tnode226816*, newnodei_227138)(NU8 kind, tlineinfo196539 info);
N_NIMCALL(tsym226846*, newsym_227074)(NU8 symkind, tident201021* name, tsym226846* owner, tlineinfo196539 info);
N_NIMCALL(tident201021*, getident_201472)(NimStringDesc* identifier);
N_NIMCALL(ttype226852*, skiptypes_231245)(ttype226852* t, NU64 kinds);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell44933*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44933* c);
N_NOINLINE(void, addzct_48617)(tcellseq44949* s, tcell44933* c);
N_NIMCALL(tnode226816*, newsymnode_227132)(tsym226846* sym);
N_NIMCALL(void, addvar_425053)(tnode226816* father, tnode226816* v);
N_NIMCALL(tnode226816*, newnodei_229007)(NU8 kind, tlineinfo196539 info, NI children);
N_NIMCALL(void, addson_227287)(tnode226816* father, tnode226816* son);
N_NIMCALL(void, add_227498)(tnode226816* father, tnode226816* son);
N_NIMCALL(tnode226816*, newasgnstmt_425106)(tnode226816* le, tnode226816* ri);
static N_INLINE(NI, len_227364)(tnode226816* n);
N_NIMCALL(tnode226816*, newtupleaccess_425027)(tnode226816* tup, NI i);
N_NIMCALL(tnode226816*, newnodeit_227145)(NU8 kind, tlineinfo196539 info, ttype226852* typ);
N_NIMCALL(tnode226816*, copytree_227329)(tnode226816* src);
N_NIMCALL(ttype226852*, getsystype_283030)(NU8 kind);
N_NIMCALL(ttype226852*, newtype_227083)(NU8 kind, tsym226846* owner);
N_NIMCALL(void, rawaddson_231562)(ttype226852* father, ttype226852* 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(ttype226852*, skipintlit_283531)(ttype226852* t);
N_NIMCALL(tsym226846*, lookupinrecord_236236)(tnode226816* n, tident201021* field);
N_NIMCALL(tnode226816*, indirectaccess_426207)(tnode226816* a, NimStringDesc* b, tlineinfo196539 info);
N_NIMCALL(tsym226846*, getsymfromlist_236228)(tnode226816* list, tident201021* ident, NI start);
N_NIMCALL(void, internalerror_199006)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_199126)(TY84745 x_199130);
static N_INLINE(NIM_BOOL, isemptytype_233990)(ttype226852* t);
N_NIMCALL(NIM_BOOL, containsgarbagecollectedref_264163)(ttype226852* typ);
static N_INLINE(tnode226816*, HEX5BHEX5D_227698)(tnode226816* n, NI i);
N_NIMCALL(NU8, spawnresult_426994)(ttype226852* t, NIM_BOOL inparallel);
N_NIMCALL(void, localerror_198966)(tlineinfo196539 info, NimStringDesc* arg);
N_NIMCALL(ttype226852*, createobj_425304)(tsym226846* owner, tlineinfo196539 info);
N_NIMCALL(tnode226816*, createcastexpr_427438)(tsym226846* argsparam, ttype226852* objtype);
N_NIMCALL(void, addfield_425608)(ttype226852* obj, tsym226846* s);
N_NIMCALL(tnode226816*, newfastasgnstmt_425145)(tnode226816* le, tnode226816* ri);
N_NIMCALL(tnode226816*, newdotexpr_426007)(tsym226846* obj, tsym226846* b);
N_NIMCALL(tnode226816*, indirectaccess_426848)(tnode226816* a, tsym226846* b, tlineinfo196539 info);
N_NIMCALL(void, setupargsforconcurrency_427449)(tnode226816* n, ttype226852* objtype, tsym226846* scratchobj, tnode226816* castexpr, tnode226816* call, tnode226816* varsection, tnode226816* varinit, tnode226816* result);
N_NIMCALL(tsym226846*, addlocalvar_427029)(tnode226816* varsection, tnode226816* varinit, tsym226846* owner, ttype226852* typ, tnode226816* v, NIM_BOOL useshallowcopy);
N_NIMCALL(tsym226846*, createmagic_369405)(NimStringDesc* name, NU16 m);
N_NIMCALL(void, setupargsforparallelism_427698)(tnode226816* n_427700, ttype226852* objtype, tsym226846* scratchobj, tnode226816* castexpr, tnode226816* call, tnode226816* varsection, tnode226816* varinit, tnode226816* result);
N_NIMCALL(NU16, getmagic_262845)(tnode226816* op);
N_NIMCALL(tnode226816*, genaddrof_426872)(tnode226816* n);
N_NIMCALL(tnode226816*, genhigh_427646)(tnode226816* n);
N_NIMCALL(tnode226816*, newintlit_427636)(NI64 value);
N_NIMCALL(tnode226816*, newintnode_227096)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, lastord_264010)(ttype226852* t);
N_NIMCALL(tnode226816*, genderef_426896)(tnode226816* n);
N_NIMCALL(NI64, computesize_264193)(ttype226852* typ);
N_NIMCALL(tsym226846*, getroot_427533)(tnode226816* n);
N_NIMCALL(tsym226846*, getcompilerproc_283036)(NimStringDesc* name);
N_NIMCALL(tnode226816*, callproc_426971)(tnode226816* a);
N_NIMCALL(tnode226816*, callcodegenproc_426906)(NimStringDesc* name, tnode226816* arg1, tnode226816* arg2, tnode226816* arg3);
N_NIMCALL(void, localerror_198955)(tlineinfo196539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(tsym226846*, createwrapperproc_427177)(tnode226816* f, tsym226846* threadparam, tsym226846* argsparam, tnode226816* varsection, tnode226816* varinit, tnode226816* call, tnode226816* barrier, tnode226816* fv, NU8 spawnkind);
N_NIMCALL(NU8, flowvarkind_427005)(ttype226852* t);
N_NIMCALL(NimStringDesc*, typetostring_264031)(ttype226852* typ, NU8 prefer);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(tnode226816*, newprocnode_229432)(NU8 kind, tlineinfo196539 info, tnode226816* body, tnode226816* params, tnode226816* name, tnode226816* pattern, tnode226816* genericparams, tnode226816* pragmas, tnode226816* exceptions);
STRING_LITERAL(TMP2819, ":tmp", 4);
STRING_LITERAL(TMP3192, "compiler/lowerings.nim", 22);
NIM_CONST TY84745 TMP3191 = {((NimStringDesc*) &TMP3192),
129}
;
NIM_CONST TY84745 TMP3831 = {((NimStringDesc*) &TMP3192),
476}
;
NIM_CONST TY84745 TMP3832 = {((NimStringDesc*) &TMP3192),
479}
;
STRING_LITERAL(TMP3833, "\'spawn\' must not be discarded", 29);
STRING_LITERAL(TMP3834, "\'spawn\' takes a call expression", 31);
STRING_LITERAL(TMP3835, "\'spawn\' takes a GC safe call expression", 39);
STRING_LITERAL(TMP3836, "thread", 6);
STRING_LITERAL(TMP3837, "args", 4);
STRING_LITERAL(TMP3838, "scratch", 7);
STRING_LITERAL(TMP3839, "fn", 2);
STRING_LITERAL(TMP3840, "iterator in spawn environment is not allowed", 44);
STRING_LITERAL(TMP3841, "closure in spawn environment is not allowed", 43);
STRING_LITERAL(TMP3842, "\'spawn\'ed function cannot have a \'var\' parameter", 48);
STRING_LITERAL(TMP3843, "deepCopy", 8);
STRING_LITERAL(TMP3844, "slice", 5);
STRING_LITERAL(TMP3845, "high", 4);
STRING_LITERAL(TMP3846, "Barrier", 7);
STRING_LITERAL(TMP3847, "barrier", 7);
STRING_LITERAL(TMP3848, "fv", 2);
STRING_LITERAL(TMP3849, "nimFlowVarCreateSemaphore", 25);
STRING_LITERAL(TMP3850, "barrierEnter", 12);
NIM_CONST TY84745 TMP3851 = {((NimStringDesc*) &TMP3192),
273}
;
STRING_LITERAL(TMP3852, "owner", 5);
STRING_LITERAL(TMP3853, "nimArgsPassingDone", 18);
STRING_LITERAL(TMP3854, "cannot create a flowVar of type: ", 33);
STRING_LITERAL(TMP3855, "data", 4);
STRING_LITERAL(TMP3856, "blob", 4);
STRING_LITERAL(TMP3857, "GCref", 5);
STRING_LITERAL(TMP3858, "nimFlowVarSignal", 16);
STRING_LITERAL(TMP3859, "barrierLeave", 12);
STRING_LITERAL(TMP3860, "Wrapper", 7);
STRING_LITERAL(TMP3861, "nimSpawn", 8);
extern tgcheap47016 gch_47044;
extern tnode226816* emptynode_227738;
extern NU32 gglobaloptions_170118;

static N_INLINE(NI, sonslen_227249)(tnode226816* 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(tnode226816*, lastson_227261)(tnode226816* n) {
	tnode226816* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_227249(n);
	result = (*n).kindU.S6.Sons->data[(NI32)(LOC1 - 1)];
	return result;
}

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

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

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

N_NIMCALL(void, addvar_425053)(tnode226816* father, tnode226816* v) {
	tnode226816* vpart;
	vpart = newnodei_229007(((NU8) 35), (*v).Info, 3);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[0]), v);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[1]), emptynode_227738);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[2]), emptynode_227738);
	addson_227287(father, vpart);
}

N_NIMCALL(tnode226816*, newasgnstmt_425106)(tnode226816* le, tnode226816* ri) {
	tnode226816* result;
	result = 0;
	result = newnodei_229007(((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_227364)(tnode226816* 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(tnode226816*, newtupleaccess_425027)(tnode226816* tup, NI i) {
	tnode226816* result;
	ttype226852* LOC1;
	tnode226816* LOC2;
	tnode226816* lit;
	ttype226852* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_231245((*tup).Typ, IL64(211106232576256));
	result = newnodeit_227145(((NU8) 42), (*tup).Info, (*LOC1).Sons->data[i]);
	LOC2 = 0;
	LOC2 = copytree_227329(tup);
	addson_227287(result, LOC2);
	LOC3 = 0;
	LOC3 = getsystype_283030(((NU8) 31));
	lit = newnodeit_227145(((NU8) 6), (*tup).Info, LOC3);
	(*lit).kindU.S1.Intval = ((NI64) (i));
	addson_227287(result, lit);
	return result;
}

N_NIMCALL(tnode226816*, lowertupleunpacking_425184)(tnode226816* n, tsym226846* owner) {
	tnode226816* result;
	tnode226816* value;
	tsym226846* temp;
	tident201021* LOC1;
	tnode226816* v;
	tnode226816* tempasnode;
	tnode226816* LOC2;
	result = 0;
	value = lastson_227261(n);
	result = newnodei_227138(((NU8) 115), (*n).Info);
	LOC1 = 0;
	LOC1 = getident_201472(((NimStringDesc*) &TMP2819));
	temp = newsym_227074(((NU8) 5), LOC1, owner, (*value).Info);
	asgnRefNoCycle((void**) (&(*temp).Typ), skiptypes_231245((*value).Typ, IL64(211106232576256)));
	(*temp).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	v = newnodei_227138(((NU8) 99), (*value).Info);
	tempasnode = newsymnode_227132(temp);
	addvar_425053(v, tempasnode);
	add_227498(result, v);
	LOC2 = 0;
	LOC2 = newasgnstmt_425106(tempasnode, value);
	add_227498(result, LOC2);
	{
		NI i_425231;
		NI HEX3Atmp_425284;
		NI LOC4;
		NI res_425287;
		i_425231 = 0;
		HEX3Atmp_425284 = 0;
		LOC4 = 0;
		LOC4 = len_227364(n);
		HEX3Atmp_425284 = (NI32)(LOC4 - 3);
		res_425287 = 0;
		{
			while (1) {
				tnode226816* LOC11;
				tnode226816* LOC12;
				if (!(res_425287 <= HEX3Atmp_425284)) goto LA6;
				i_425231 = res_425287;
				{
					if (!((*(*n).kindU.S6.Sons->data[i_425231]).Kind == ((NU8) 3))) goto LA9;
					addvar_425053(v, (*n).kindU.S6.Sons->data[i_425231]);
				}
				LA9: ;
				LOC11 = 0;
				LOC11 = newtupleaccess_425027(tempasnode, i_425231);
				LOC12 = 0;
				LOC12 = newasgnstmt_425106((*n).kindU.S6.Sons->data[i_425231], LOC11);
				add_227498(result, LOC12);
				res_425287 += 1;
			} LA6: ;
		}
	}
	return result;
}

N_NIMCALL(ttype226852*, createobj_425304)(tsym226846* owner, tlineinfo196539 info) {
	ttype226852* result;
	result = 0;
	result = newtype_227083(((NU8) 17), owner);
	rawaddson_231562(result, NIM_NIL);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	asgnRefNoCycle((void**) (&(*result).N), newnodei_227138(((NU8) 137), info));
	return result;
}

N_NIMCALL(void, rawaddfield_425331)(ttype226852* obj, tsym226846* field) {
	tnode226816* LOC1;
	(*field).Position = sonslen_227249((*obj).N);
	LOC1 = 0;
	LOC1 = newsymnode_227132(field);
	addson_227287((*obj).N, LOC1);
}

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

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

N_NIMCALL(void, addfield_425608)(ttype226852* obj, tsym226846* s) {
	tsym226846* field;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	tident201021* LOC3;
	ttype226852* t;
	tnode226816* 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_201472(LOC1);
	field = newsym_227074(((NU8) 19), LOC3, (*s).Owner, (*s).Info);
	t = skipintlit_283531((*s).Typ);
	asgnRefNoCycle((void**) (&(*field).Typ), t);
	(*field).Position = sonslen_227249((*obj).N);
	LOC4 = 0;
	LOC4 = newsymnode_227132(field);
	addson_227287((*obj).N, LOC4);
}

N_NIMCALL(void, adduniquefield_425807)(ttype226852* obj, tsym226846* s) {
	tident201021* 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_201472(LOC1);
	{
		tsym226846* LOC5;
		tsym226846* field;
		ttype226852* t;
		tnode226816* LOC8;
		LOC5 = 0;
		LOC5 = lookupinrecord_236236((*obj).N, fieldname);
		if (!(LOC5 == NIM_NIL)) goto LA6;
		field = newsym_227074(((NU8) 19), fieldname, (*s).Owner, (*s).Info);
		t = skipintlit_283531((*s).Typ);
		asgnRefNoCycle((void**) (&(*field).Typ), t);
		(*field).Position = sonslen_227249((*obj).N);
		LOC8 = 0;
		LOC8 = newsymnode_227132(field);
		addson_227287((*obj).N, LOC8);
	}
	LA6: ;
}

N_NIMCALL(tnode226816*, indirectaccess_426207)(tnode226816* a, NimStringDesc* b, tlineinfo196539 info) {
	tnode226816* result;
	tnode226816* deref;
	ttype226852* LOC1;
	ttype226852* t;
	tsym226846* field;
	tnode226816* LOC18;
	result = 0;
	deref = newnodei_227138(((NU8) 65), info);
	LOC1 = 0;
	LOC1 = skiptypes_231245((*a).Typ, IL64(211106232576256));
	asgnRefNoCycle((void**) (&(*deref).Typ), (*LOC1).Sons->data[0]);
	t = skiptypes_231245((*deref).Typ, IL64(211106232576256));
	field = 0;
	{
		while (1) {
			tident201021* LOC4;
			LOC4 = 0;
			LOC4 = getident_201472(b);
			field = getsymfromlist_236228((*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_231245(t, IL64(211106232576256));
		}
	} LA2: ;
	{
		NimStringDesc* LOC17;
		if (!!(!((field == NIM_NIL)))) goto LA15;
		LOC17 = 0;
		LOC17 = HEX24_199126(TMP3191);
		internalerror_199006(LOC17);
	}
	LA15: ;
	addson_227287(deref, a);
	result = newnodei_227138(((NU8) 45), info);
	addson_227287(result, deref);
	LOC18 = 0;
	LOC18 = newsymnode_227132(field);
	addson_227287(result, LOC18);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

N_NIMCALL(tnode226816*, indirectaccess_426848)(tnode226816* a, tsym226846* b, tlineinfo196539 info) {
	tnode226816* 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_426207(a, LOC1, info);
	return result;
}

N_NIMCALL(tnode226816*, rawindirectaccess_425407)(tnode226816* a, tsym226846* field, tlineinfo196539 info) {
	tnode226816* result;
	tnode226816* deref;
	ttype226852* LOC1;
	tnode226816* LOC2;
	result = 0;
	deref = newnodei_227138(((NU8) 65), info);
	LOC1 = 0;
	LOC1 = skiptypes_231245((*a).Typ, IL64(211106232576256));
	asgnRefNoCycle((void**) (&(*deref).Typ), (*LOC1).Sons->data[0]);
	addson_227287(deref, a);
	result = newnodei_227138(((NU8) 45), info);
	addson_227287(result, deref);
	LOC2 = 0;
	LOC2 = newsymnode_227132(field);
	addson_227287(result, LOC2);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

static N_INLINE(NIM_BOOL, isemptytype_233990)(ttype226852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = (t == NIM_NIL);
	if (LOC1) goto LA2;
	LOC1 = ((*t).Kind == ((NU8) 3) || (*t).Kind == ((NU8) 7));
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, spawnresult_426994)(ttype226852* t, NIM_BOOL inparallel) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isemptytype_233990(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_264163(t);
		LOC7 = !(LOC9);
		LA8: ;
		if (!LOC7) goto LA10;
		result = ((NU8) 2);
	}
	goto LA1;
	LA10: ;
	{
		result = ((NU8) 1);
	}
	LA1: ;
	return result;
}

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

N_NIMCALL(tnode226816*, createcastexpr_427438)(tsym226846* argsparam, ttype226852* objtype) {
	tnode226816* result;
	tnode226816* LOC1;
	result = 0;
	result = newnodei_227138(((NU8) 61), (*argsparam).Info);
	add_227498(result, emptynode_227738);
	LOC1 = 0;
	LOC1 = newsymnode_227132(argsparam);
	add_227498(result, LOC1);
	asgnRefNoCycle((void**) (&(*result).Typ), newtype_227083(((NU8) 21), (*objtype).Owner));
	rawaddson_231562((*result).Typ, objtype);
	return result;
}

N_NIMCALL(tnode226816*, newfastasgnstmt_425145)(tnode226816* le, tnode226816* ri) {
	tnode226816* result;
	result = 0;
	result = newnodei_229007(((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(tnode226816*, newdotexpr_426007)(tsym226846* obj, tsym226846* b) {
	tnode226816* result;
	tsym226846* field;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	tident201021* LOC3;
	tnode226816* LOC4;
	tnode226816* LOC5;
	result = 0;
	result = newnodei_227138(((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_201472(LOC1);
	field = getsymfromlist_236228((*(*obj).Typ).N, LOC3, 0);
	LOC4 = 0;
	LOC4 = newsymnode_227132(obj);
	addson_227287(result, LOC4);
	LOC5 = 0;
	LOC5 = newsymnode_227132(field);
	addson_227287(result, LOC5);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

N_NIMCALL(tsym226846*, addlocalvar_427029)(tnode226816* varsection, tnode226816* varinit, tsym226846* owner, ttype226852* typ, tnode226816* v, NIM_BOOL useshallowcopy) {
	tsym226846* result;
	tident201021* LOC1;
	tnode226816* vpart;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_201472(((NimStringDesc*) &TMP2819));
	result = newsym_227074(((NU8) 5), LOC1, owner, (*varsection).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), typ);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	vpart = newnodei_229007(((NU8) 35), (*varsection).Info, 3);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[0]), newsymnode_227132(result));
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[1]), emptynode_227738);
	{
		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_227738);
	}
	LA2: ;
	add_227498(varsection, vpart);
	{
		if (!!((varinit == NIM_NIL))) goto LA9;
		{
			tnode226816* LOC15;
			tnode226816* LOC16;
			if (!useshallowcopy) goto LA13;
			LOC15 = 0;
			LOC15 = newsymnode_227132(result);
			LOC16 = 0;
			LOC16 = newfastasgnstmt_425145(LOC15, v);
			add_227498(varinit, LOC16);
		}
		goto LA11;
		LA13: ;
		{
			tnode226816* deepcopycall;
			tsym226846* LOC18;
			deepcopycall = newnodei_229007(((NU8) 27), (*varinit).Info, 3);
			LOC18 = 0;
			LOC18 = createmagic_369405(((NimStringDesc*) &TMP3843), ((NU16) 214));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[0]), newsymnode_227132(LOC18));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[1]), newsymnode_227132(result));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[2]), v);
			add_227498(varinit, deepcopycall);
		}
		LA11: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(void, setupargsforconcurrency_427449)(tnode226816* n, ttype226852* objtype, tsym226846* scratchobj, tnode226816* castexpr, tnode226816* call, tnode226816* varsection, tnode226816* varinit, tnode226816* result) {
	tnode226816* formals;
	tnode226816* LOC1;
	tident201021* tmpname;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_227698(n, 0);
	formals = (*(*LOC1).Typ).N;
	tmpname = getident_201472(((NimStringDesc*) &TMP2819));
	{
		NI i_427482;
		NI HEX3Atmp_427513;
		NI LOC3;
		NI res_427516;
		i_427482 = 0;
		HEX3Atmp_427513 = 0;
		LOC3 = 0;
		LOC3 = len_227364(n);
		HEX3Atmp_427513 = (LOC3 - 1);
		res_427516 = 1;
		{
			while (1) {
				ttype226852* argtype;
				tnode226816* LOC6;
				tident201021* fieldname;
				tsym226846* field;
				tnode226816* LOC23;
				tnode226816* LOC24;
				tnode226816* LOC25;
				tsym226846* temp;
				tnode226816* LOC26;
				tnode226816* LOC27;
				if (!(res_427516 <= HEX3Atmp_427513)) goto LA5;
				i_427482 = res_427516;
				LOC6 = 0;
				LOC6 = HEX5BHEX5D_227698(n, i_427482);
				argtype = skiptypes_231245((*LOC6).Typ, IL64(211106232576256));
				{
					NIM_BOOL LOC9;
					NI LOC10;
					tnode226816* LOC12;
					tnode226816* LOC15;
					LOC9 = 0;
					LOC10 = 0;
					LOC10 = len_227364(formals);
					LOC9 = (i_427482 < LOC10);
					if (!(LOC9)) goto LA11;
					LOC12 = 0;
					LOC12 = HEX5BHEX5D_227698(formals, i_427482);
					LOC9 = ((*(*LOC12).Typ).Kind == ((NU8) 23));
					LA11: ;
					if (!LOC9) goto LA13;
					LOC15 = 0;
					LOC15 = HEX5BHEX5D_227698(n, i_427482);
					localerror_198966((*LOC15).Info, ((NimStringDesc*) &TMP3842));
				}
				LA13: ;
				{
					NI LOC18;
					tnode226816* LOC21;
					LOC18 = 0;
					LOC18 = len_227364(formals);
					if (!(i_427482 < LOC18)) goto LA19;
					LOC21 = 0;
					LOC21 = HEX5BHEX5D_227698(formals, i_427482);
					fieldname = (*(*LOC21).kindU.S4.Sym).Name;
				}
				goto LA16;
				LA19: ;
				{
					fieldname = tmpname;
				}
				LA16: ;
				field = newsym_227074(((NU8) 19), fieldname, (*objtype).Owner, (*n).Info);
				asgnRefNoCycle((void**) (&(*field).Typ), argtype);
				addfield_425608(objtype, field);
				LOC23 = 0;
				LOC23 = newdotexpr_426007(scratchobj, field);
				LOC24 = 0;
				LOC24 = HEX5BHEX5D_227698(n, i_427482);
				LOC25 = 0;
				LOC25 = newfastasgnstmt_425145(LOC23, LOC24);
				add_227498(result, LOC25);
				LOC26 = 0;
				LOC26 = indirectaccess_426848(castexpr, field, (*n).Info);
				temp = addlocalvar_427029(varsection, varinit, (*objtype).Owner, argtype, LOC26, NIM_FALSE);
				LOC27 = 0;
				LOC27 = newsymnode_227132(temp);
				add_227498(call, LOC27);
				res_427516 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(tnode226816*, genaddrof_426872)(tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = newnodei_229007(((NU8) 63), (*n).Info, 1);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), n);
	asgnRefNoCycle((void**) (&(*result).Typ), newtype_227083(((NU8) 21), (*(*n).Typ).Owner));
	rawaddson_231562((*result).Typ, (*n).Typ);
	return result;
}

N_NIMCALL(tnode226816*, newintlit_427636)(NI64 value) {
	tnode226816* result;
	result = 0;
	result = newintnode_227096(((NU8) 6), value);
	asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 31)));
	return result;
}

N_NIMCALL(tnode226816*, genhigh_427646)(tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		ttype226852* LOC3;
		ttype226852* LOC6;
		NI64 LOC7;
		LOC3 = 0;
		LOC3 = skiptypes_231245((*n).Typ, IL64(211106240964864));
		if (!((*LOC3).Kind == ((NU8) 4) || (*LOC3).Kind == ((NU8) 16))) goto LA4;
		LOC6 = 0;
		LOC6 = skiptypes_231245((*n).Typ, IL64(211106240964864));
		LOC7 = 0;
		LOC7 = lastord_264010(LOC6);
		result = newintlit_427636(LOC7);
	}
	goto LA1;
	LA4: ;
	{
		tsym226846* LOC9;
		result = newnodei_229007(((NU8) 27), (*n).Info, 2);
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 31)));
		LOC9 = 0;
		LOC9 = createmagic_369405(((NimStringDesc*) &TMP3845), ((NU16) 5));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227132(LOC9));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), n);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, genderef_426896)(tnode226816* n) {
	tnode226816* result;
	ttype226852* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_231245((*n).Typ, IL64(211106232576256));
	result = newnodeit_227145(((NU8) 65), (*n).Info, (*LOC1).Sons->data[0]);
	add_227498(result, n);
	return result;
}

N_NIMCALL(tsym226846*, getroot_427533)(tnode226816* n) {
	tsym226846* 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_427533((*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 58):
	case ((NU8) 59):
	case ((NU8) 60):
	{
		result = getroot_427533((*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_262845(n);
			if (!(LOC11 == ((NU16) 151))) goto LA12;
			result = getroot_427533((*n).kindU.S6.Sons->data[1]);
		}
		LA12: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(void, setupargsforparallelism_427698)(tnode226816* n_427700, ttype226852* objtype, tsym226846* scratchobj, tnode226816* castexpr, tnode226816* call, tnode226816* varsection, tnode226816* varinit, tnode226816* result) {
	tnode226816* formals;
	tnode226816* LOC1;
	tident201021* tmpname;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_227698(n_427700, 0);
	formals = (*(*LOC1).Typ).N;
	tmpname = getident_201472(((NimStringDesc*) &TMP2819));
	{
		NI i_427731;
		NI HEX3Atmp_427877;
		NI LOC3;
		NI res_427880;
		i_427731 = 0;
		HEX3Atmp_427877 = 0;
		LOC3 = 0;
		LOC3 = len_227364(n_427700);
		HEX3Atmp_427877 = (LOC3 - 1);
		res_427880 = 1;
		{
			while (1) {
				tnode226816* n;
				ttype226852* argtype;
				ttype226852* LOC6;
				tident201021* fieldname;
				tsym226846* field;
				if (!(res_427880 <= HEX3Atmp_427877)) goto LA5;
				i_427731 = res_427880;
				n = HEX5BHEX5D_227698(n_427700, i_427731);
				LOC6 = 0;
				{
					NI LOC9;
					tnode226816* LOC12;
					LOC9 = 0;
					LOC9 = len_227364(formals);
					if (!(i_427731 < LOC9)) goto LA10;
					LOC12 = 0;
					LOC12 = HEX5BHEX5D_227698(formals, i_427731);
					LOC6 = (*LOC12).Typ;
				}
				goto LA7;
				LA10: ;
				{
					LOC6 = (*n).Typ;
				}
				LA7: ;
				argtype = skiptypes_231245(LOC6, IL64(211106232576256));
				{
					NI LOC16;
					tnode226816* LOC19;
					LOC16 = 0;
					LOC16 = len_227364(formals);
					if (!(i_427731 < LOC16)) goto LA17;
					LOC19 = 0;
					LOC19 = HEX5BHEX5D_227698(formals, i_427731);
					fieldname = (*(*LOC19).kindU.S4.Sym).Name;
				}
				goto LA14;
				LA17: ;
				{
					fieldname = tmpname;
				}
				LA14: ;
				field = newsym_227074(((NU8) 19), fieldname, (*objtype).Owner, (*n).Info);
				{
					tnode226816* slice;
					tsym226846* LOC25;
					tsym226846* fieldb;
					tnode226816* LOC47;
					tsym226846* threadlocal_427837;
					tnode226816* LOC48;
					if (!((*argtype).Kind == ((NU8) 48) || (*argtype).Kind == ((NU8) 27))) goto LA23;
					slice = newnodei_229007(((NU8) 27), (*n).Info, 4);
					asgnRefNoCycle((void**) (&(*slice).Typ), (*n).Typ);
					LOC25 = 0;
					LOC25 = createmagic_369405(((NimStringDesc*) &TMP3844), ((NU16) 151));
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[0]), newsymnode_227132(LOC25));
					fieldb = newsym_227074(((NU8) 19), tmpname, (*objtype).Owner, (*n).Info);
					asgnRefNoCycle((void**) (&(*fieldb).Typ), getsystype_283030(((NU8) 31)));
					addfield_425608(objtype, fieldb);
					{
						NU16 LOC28;
						tnode226816* a;
						tnode226816* LOC31;
						tnode226816* LOC32;
						tnode226816* LOC33;
						tsym226846* fielda;
						tnode226816* LOC34;
						tnode226816* LOC35;
						tnode226816* LOC36;
						tnode226816* LOC37;
						tnode226816* LOC38;
						tnode226816* LOC39;
						tsym226846* threadlocal_427793;
						tnode226816* LOC40;
						LOC28 = 0;
						LOC28 = getmagic_262845(n);
						if (!(LOC28 == ((NU16) 151))) goto LA29;
						LOC31 = 0;
						LOC31 = HEX5BHEX5D_227698(n, 1);
						a = genaddrof_426872(LOC31);
						asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
						addfield_425608(objtype, field);
						LOC32 = 0;
						LOC32 = newdotexpr_426007(scratchobj, field);
						LOC33 = 0;
						LOC33 = newfastasgnstmt_425145(LOC32, a);
						add_227498(result, LOC33);
						fielda = newsym_227074(((NU8) 19), tmpname, (*objtype).Owner, (*n).Info);
						asgnRefNoCycle((void**) (&(*fielda).Typ), getsystype_283030(((NU8) 31)));
						addfield_425608(objtype, fielda);
						LOC34 = 0;
						LOC34 = newdotexpr_426007(scratchobj, fielda);
						LOC35 = 0;
						LOC35 = HEX5BHEX5D_227698(n, 2);
						LOC36 = 0;
						LOC36 = newfastasgnstmt_425145(LOC34, LOC35);
						add_227498(result, LOC36);
						LOC37 = 0;
						LOC37 = newdotexpr_426007(scratchobj, fieldb);
						LOC38 = 0;
						LOC38 = HEX5BHEX5D_227698(n, 3);
						LOC39 = 0;
						LOC39 = newfastasgnstmt_425145(LOC37, LOC38);
						add_227498(result, LOC39);
						LOC40 = 0;
						LOC40 = indirectaccess_426848(castexpr, fielda, (*n).Info);
						threadlocal_427793 = addlocalvar_427029(varsection, NIM_NIL, (*objtype).Owner, (*fielda).Typ, LOC40, NIM_TRUE);
						asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[2]), newsymnode_227132(threadlocal_427793));
					}
					goto LA26;
					LA29: ;
					{
						tnode226816* a;
						tnode226816* LOC42;
						tnode226816* LOC43;
						tnode226816* LOC44;
						tnode226816* LOC45;
						tnode226816* LOC46;
						a = genaddrof_426872(n);
						asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
						addfield_425608(objtype, field);
						LOC42 = 0;
						LOC42 = newdotexpr_426007(scratchobj, field);
						LOC43 = 0;
						LOC43 = newfastasgnstmt_425145(LOC42, a);
						add_227498(result, LOC43);
						LOC44 = 0;
						LOC44 = newdotexpr_426007(scratchobj, fieldb);
						LOC45 = 0;
						LOC45 = genhigh_427646(n);
						LOC46 = 0;
						LOC46 = newfastasgnstmt_425145(LOC44, LOC45);
						add_227498(result, LOC46);
						asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[2]), newintlit_427636(IL64(0)));
					}
					LA26: ;
					LOC47 = 0;
					LOC47 = indirectaccess_426848(castexpr, field, (*n).Info);
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[1]), genderef_426896(LOC47));
					LOC48 = 0;
					LOC48 = indirectaccess_426848(castexpr, fieldb, (*n).Info);
					threadlocal_427837 = addlocalvar_427029(varsection, NIM_NIL, (*objtype).Owner, (*fieldb).Typ, LOC48, NIM_TRUE);
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[3]), newsymnode_227132(threadlocal_427837));
					add_227498(call, slice);
				}
				goto LA21;
				LA23: ;
				{
					NIM_BOOL LOC50;
					NI64 size;
					NIM_BOOL LOC51;
					tsym226846* LOC54;
					tnode226816* a;
					tnode226816* LOC57;
					tnode226816* LOC58;
					tsym226846* threadlocal_427874;
					tnode226816* LOC59;
					tnode226816* LOC60;
					tnode226816* LOC61;
					LOC50 = 0;
					size = computesize_264193(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_427533(n);
					LOC50 = !((LOC54 == NIM_NIL));
					LA53: ;
					if (!LOC50) goto LA55;
					a = genaddrof_426872(n);
					asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
					addfield_425608(objtype, field);
					LOC57 = 0;
					LOC57 = newdotexpr_426007(scratchobj, field);
					LOC58 = 0;
					LOC58 = newfastasgnstmt_425145(LOC57, a);
					add_227498(result, LOC58);
					LOC59 = 0;
					LOC59 = indirectaccess_426848(castexpr, field, (*n).Info);
					threadlocal_427874 = addlocalvar_427029(varsection, NIM_NIL, (*objtype).Owner, (*field).Typ, LOC59, NIM_TRUE);
					LOC60 = 0;
					LOC60 = newsymnode_227132(threadlocal_427874);
					LOC61 = 0;
					LOC61 = genderef_426896(LOC60);
					add_227498(call, LOC61);
				}
				goto LA21;
				LA55: ;
				{
					tnode226816* LOC63;
					tnode226816* LOC64;
					tsym226846* threadlocal_427875;
					tnode226816* LOC65;
					tnode226816* LOC66;
					asgnRefNoCycle((void**) (&(*field).Typ), argtype);
					addfield_425608(objtype, field);
					LOC63 = 0;
					LOC63 = newdotexpr_426007(scratchobj, field);
					LOC64 = 0;
					LOC64 = newfastasgnstmt_425145(LOC63, n);
					add_227498(result, LOC64);
					LOC65 = 0;
					LOC65 = indirectaccess_426848(castexpr, field, (*n).Info);
					threadlocal_427875 = addlocalvar_427029(varsection, varinit, (*objtype).Owner, (*field).Typ, LOC65, NIM_TRUE);
					LOC66 = 0;
					LOC66 = newsymnode_227132(threadlocal_427875);
					add_227498(call, LOC66);
				}
				LA21: ;
				res_427880 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(tnode226816*, callproc_426971)(tnode226816* a) {
	tnode226816* result;
	result = 0;
	result = newnodei_227138(((NU8) 27), (*a).Info);
	add_227498(result, a);
	asgnRefNoCycle((void**) (&(*result).Typ), (*(*a).Typ).Sons->data[0]);
	return result;
}

N_NIMCALL(tnode226816*, callcodegenproc_426906)(NimStringDesc* name, tnode226816* arg1, tnode226816* arg2, tnode226816* arg3) {
	tnode226816* result;
	tsym226846* sym;
	result = 0;
	result = newnodei_227138(((NU8) 27), (*arg1).Info);
	sym = getcompilerproc_283036(name);
	{
		if (!(sym == NIM_NIL)) goto LA3;
		localerror_198955((*arg1).Info, ((NU16) 64), name);
	}
	goto LA1;
	LA3: ;
	{
		tnode226816* LOC6;
		LOC6 = 0;
		LOC6 = newsymnode_227132(sym);
		add_227498(result, LOC6);
		add_227498(result, arg1);
		{
			if (!!((arg2 == NIM_NIL))) goto LA9;
			add_227498(result, arg2);
		}
		LA9: ;
		{
			if (!!((arg3 == NIM_NIL))) goto LA13;
			add_227498(result, arg3);
		}
		LA13: ;
		asgnRefNoCycle((void**) (&(*result).Typ), (*(*sym).Typ).Sons->data[0]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, flowvarkind_427005)(ttype226852* t) {
	NU8 result;
	result = 0;
	{
		ttype226852* LOC3;
		LOC3 = 0;
		LOC3 = skiptypes_231245(t, IL64(211106232576256));
		if (!((*LOC3).Kind == ((NU8) 22) || (*LOC3).Kind == ((NU8) 28) || (*LOC3).Kind == ((NU8) 24))) goto LA4;
		result = ((NU8) 1);
	}
	goto LA1;
	LA4: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = containsgarbagecollectedref_264163(t);
		if (!LOC7) goto LA8;
		result = ((NU8) 0);
	}
	goto LA1;
	LA8: ;
	{
		result = ((NU8) 2);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym226846*, createwrapperproc_427177)(tnode226816* f, tsym226846* threadparam, tsym226846* argsparam, tnode226816* varsection, tnode226816* varinit, tnode226816* call, tnode226816* barrier, tnode226816* fv, NU8 spawnkind) {
	tsym226846* result;
	tnode226816* body;
	tsym226846* threadlocalbarrier;
	tsym226846* threadlocalprom;
	tnode226816* LOC29;
	tnode226816* LOC30;
	tnode226816* params;
	tnode226816* LOC75;
	tnode226816* LOC76;
	ttype226852* t;
	tnode226816* LOC77;
	tnode226816* LOC78;
	tnode226816* LOC79;
	NimStringDesc* name;
	NimStringDesc* LOC80;
	NimStringDesc* LOC81;
	tident201021* LOC87;
	tnode226816* LOC88;
	result = 0;
	body = newnodei_227138(((NU8) 115), (*f).Info);
	threadlocalbarrier = 0;
	{
		tnode226816* varsection2;
		tnode226816* LOC5;
		tnode226816* LOC6;
		if (!!((barrier == NIM_NIL))) goto LA3;
		varsection2 = newnodei_227138(((NU8) 99), (*barrier).Info);
		threadlocalbarrier = addlocalvar_427029(varsection2, NIM_NIL, (*argsparam).Owner, (*barrier).Typ, barrier, NIM_FALSE);
		add_227498(body, varsection2);
		LOC5 = 0;
		LOC5 = newsymnode_227132(threadlocalbarrier);
		LOC6 = 0;
		LOC6 = callcodegenproc_426906(((NimStringDesc*) &TMP3850), LOC5, NIM_NIL, NIM_NIL);
		add_227498(body, LOC6);
	}
	LA3: ;
	threadlocalprom = 0;
	{
		if (!(spawnkind == ((NU8) 2))) goto LA9;
		threadlocalprom = addlocalvar_427029(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_199126(TMP3851);
			internalerror_199006(LOC18);
		}
		LA16: ;
		threadlocalprom = addlocalvar_427029(varsection, NIM_NIL, (*argsparam).Owner, (*fv).Typ, fv, NIM_FALSE);
	}
	goto LA7;
	LA12: ;
	LA7: ;
	add_227498(body, varsection);
	add_227498(body, varinit);
	{
		NIM_BOOL LOC21;
		tnode226816* LOC25;
		tnode226816* LOC26;
		tnode226816* LOC27;
		tnode226816* LOC28;
		LOC21 = 0;
		LOC21 = !((fv == NIM_NIL));
		if (!(LOC21)) goto LA22;
		LOC21 = !((spawnkind == ((NU8) 2)));
		LA22: ;
		if (!LOC21) goto LA23;
		LOC25 = 0;
		LOC25 = newsymnode_227132(threadlocalprom);
		LOC26 = 0;
		LOC26 = indirectaccess_426207(LOC25, ((NimStringDesc*) &TMP3852), (*fv).Info);
		LOC27 = 0;
		LOC27 = newsymnode_227132(threadparam);
		LOC28 = 0;
		LOC28 = newasgnstmt_425106(LOC26, LOC27);
		add_227498(body, LOC28);
	}
	LA23: ;
	LOC29 = 0;
	LOC29 = newsymnode_227132(threadparam);
	LOC30 = 0;
	LOC30 = callcodegenproc_426906(((NimStringDesc*) &TMP3853), LOC29, NIM_NIL, NIM_NIL);
	add_227498(body, LOC30);
	{
		tnode226816* LOC35;
		tnode226816* LOC36;
		tnode226816* LOC37;
		if (!(spawnkind == ((NU8) 2))) goto LA33;
		LOC35 = 0;
		LOC35 = newsymnode_227132(threadlocalprom);
		LOC36 = 0;
		LOC36 = genderef_426896(LOC35);
		LOC37 = 0;
		LOC37 = newasgnstmt_425106(LOC36, call);
		add_227498(body, LOC37);
	}
	goto LA31;
	LA33: ;
	{
		NU8 fk;
		tnode226816* LOC47;
		NimStringDesc* LOC48;
		tnode226816* LOC54;
		tnode226816* LOC55;
		if (!!((fv == NIM_NIL))) goto LA39;
		fk = flowvarkind_427005((*(*fv).Typ).Sons->data[1]);
		{
			NimStringDesc* LOC45;
			NimStringDesc* LOC46;
			if (!(fk == ((NU8) 0))) goto LA43;
			LOC45 = 0;
			LOC46 = 0;
			LOC46 = typetostring_264031((*(*fv).Typ).Sons->data[1], ((NU8) 0));
			LOC45 = rawNewString(LOC46->Sup.len + 33);
appendString(LOC45, ((NimStringDesc*) &TMP3854));
appendString(LOC45, LOC46);
			localerror_198966((*f).Info, LOC45);
		}
		LA43: ;
		LOC47 = 0;
		LOC47 = newsymnode_227132(threadlocalprom);
		LOC48 = 0;
		{
			if (!(fk == ((NU8) 1))) goto LA51;
			LOC48 = copyString(((NimStringDesc*) &TMP3855));
		}
		goto LA49;
		LA51: ;
		{
			LOC48 = copyString(((NimStringDesc*) &TMP3856));
		}
		LA49: ;
		LOC54 = 0;
		LOC54 = indirectaccess_426207(LOC47, LOC48, (*fv).Info);
		LOC55 = 0;
		LOC55 = newasgnstmt_425106(LOC54, call);
		add_227498(body, LOC55);
		{
			tnode226816* increfcall;
			tsym226846* LOC60;
			tnode226816* LOC61;
			if (!(fk == ((NU8) 1))) goto LA58;
			increfcall = newnodei_229007(((NU8) 27), (*fv).Info, 2);
			LOC60 = 0;
			LOC60 = createmagic_369405(((NimStringDesc*) &TMP3857), ((NU16) 35));
			asgnRefNoCycle((void**) (&(*increfcall).kindU.S6.Sons->data[0]), newsymnode_227132(LOC60));
			LOC61 = 0;
			LOC61 = newsymnode_227132(threadlocalprom);
			asgnRefNoCycle((void**) (&(*increfcall).kindU.S6.Sons->data[1]), indirectaccess_426207(LOC61, ((NimStringDesc*) &TMP3855), (*fv).Info));
			add_227498(body, increfcall);
		}
		LA58: ;
		{
			tnode226816* LOC66;
			tnode226816* LOC67;
			if (!(barrier == NIM_NIL)) goto LA64;
			LOC66 = 0;
			LOC66 = newsymnode_227132(threadlocalprom);
			LOC67 = 0;
			LOC67 = callcodegenproc_426906(((NimStringDesc*) &TMP3858), LOC66, NIM_NIL, NIM_NIL);
			add_227498(body, LOC67);
		}
		LA64: ;
	}
	goto LA31;
	LA39: ;
	{
		add_227498(body, call);
	}
	LA31: ;
	{
		tnode226816* LOC73;
		tnode226816* LOC74;
		if (!!((barrier == NIM_NIL))) goto LA71;
		LOC73 = 0;
		LOC73 = newsymnode_227132(threadlocalbarrier);
		LOC74 = 0;
		LOC74 = callcodegenproc_426906(((NimStringDesc*) &TMP3859), LOC73, NIM_NIL, NIM_NIL);
		add_227498(body, LOC74);
	}
	LA71: ;
	params = newnodei_227138(((NU8) 76), (*f).Info);
	add_227498(params, emptynode_227738);
	LOC75 = 0;
	LOC75 = newsymnode_227132(threadparam);
	add_227498(params, LOC75);
	LOC76 = 0;
	LOC76 = newsymnode_227132(argsparam);
	add_227498(params, LOC76);
	t = newtype_227083(((NU8) 25), (*threadparam).Owner);
	rawaddson_231562(t, NIM_NIL);
	rawaddson_231562(t, (*threadparam).Typ);
	rawaddson_231562(t, (*argsparam).Typ);
	asgnRefNoCycle((void**) (&(*t).N), newnodei_227138(((NU8) 76), (*f).Info));
	LOC77 = 0;
	LOC77 = newnodei_227138(((NU8) 151), (*f).Info);
	add_227498((*t).N, LOC77);
	LOC78 = 0;
	LOC78 = newsymnode_227132(threadparam);
	add_227498((*t).N, LOC78);
	LOC79 = 0;
	LOC79 = newsymnode_227132(argsparam);
	add_227498((*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*) &TMP2819));
	}
	LA82: ;
	LOC80 = rawNewString(LOC81->Sup.len + 7);
appendString(LOC80, LOC81);
appendString(LOC80, ((NimStringDesc*) &TMP3860));
	name = LOC80;
	LOC87 = 0;
	LOC87 = getident_201472(name);
	result = newsym_227074(((NU8) 12), LOC87, (*argsparam).Owner, (*f).Info);
	LOC88 = 0;
	LOC88 = newsymnode_227132(result);
	asgnRefNoCycle((void**) (&(*result).Ast), newprocnode_229432(((NU8) 79), (*f).Info, body, params, LOC88, emptynode_227738, emptynode_227738, emptynode_227738, emptynode_227738));
	asgnRefNoCycle((void**) (&(*result).Typ), t);
	return result;
}

N_NIMCALL(tnode226816*, wrapprocforspawn_427897)(tsym226846* owner, tnode226816* spawnexpr, ttype226852* rettype, tnode226816* barrier, tnode226816* dest) {
	tnode226816* result;
	tnode226816* n;
	NU8 spawnkind;
	tsym226846* threadparam;
	tident201021* LOC31;
	tsym226846* argsparam;
	tident201021* LOC32;
	ttype226852* objtype;
	tnode226816* castexpr;
	tsym226846* scratchobj;
	tident201021* LOC34;
	tnode226816* call;
	tnode226816* fn;
	tnode226816* varsection;
	tnode226816* varinit;
	tnode226816* barrierasexpr;
	tnode226816* fvfield;
	tnode226816* fvasexpr;
	tsym226846* wrapper;
	tnode226816* LOC89;
	tnode226816* LOC90;
	tnode226816* LOC91;
	tnode226816* LOC92;
	result = 0;
	n = HEX5BHEX5D_227698(spawnexpr, 1);
	spawnkind = spawnresult_426994(rettype, !((barrier == NIM_NIL)));
	switch (spawnkind) {
	case ((NU8) 0):
	{
		{
			NimStringDesc* LOC6;
			if (!!((dest == NIM_NIL))) goto LA4;
			LOC6 = 0;
			LOC6 = HEX24_199126(TMP3831);
			internalerror_199006(LOC6);
		}
		LA4: ;
		result = newnodei_227138(((NU8) 115), (*n).Info);
	}
	break;
	case ((NU8) 1):
	{
		{
			NimStringDesc* LOC12;
			if (!!((dest == NIM_NIL))) goto LA10;
			LOC12 = 0;
			LOC12 = HEX24_199126(TMP3832);
			internalerror_199006(LOC12);
		}
		LA10: ;
		result = newnodeit_227145(((NU8) 126), (*n).Info, rettype);
	}
	break;
	case ((NU8) 2):
	{
		{
			if (!(dest == NIM_NIL)) goto LA16;
			localerror_198966((*n).Info, ((NimStringDesc*) &TMP3833));
		}
		LA16: ;
		result = newnodei_227138(((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_198966((*n).Info, ((NimStringDesc*) &TMP3834));
		goto BeforeRet;
	}
	LA20: ;
	{
		if (!((gglobaloptions_170118 &(1<<((((NU8) 27))&31)))!=0)) goto LA24;
		{
			tnode226816* LOC28;
			LOC28 = 0;
			LOC28 = HEX5BHEX5D_227698(n, 0);
			if (!((130 & (*(*LOC28).Typ).Flags) == 0)) goto LA29;
			localerror_198966((*n).Info, ((NimStringDesc*) &TMP3835));
		}
		LA29: ;
	}
	LA24: ;
	LOC31 = 0;
	LOC31 = getident_201472(((NimStringDesc*) &TMP3836));
	threadparam = newsym_227074(((NU8) 3), LOC31, owner, (*n).Info);
	LOC32 = 0;
	LOC32 = getident_201472(((NimStringDesc*) &TMP3837));
	argsparam = newsym_227074(((NU8) 3), LOC32, owner, (*n).Info);
	{
		ttype226852* ptrtype;
		ptrtype = getsystype_283030(((NU8) 26));
		asgnRefNoCycle((void**) (&(*threadparam).Typ), ptrtype);
		asgnRefNoCycle((void**) (&(*argsparam).Typ), ptrtype);
		(*argsparam).Position = 1;
	}
	objtype = createobj_425304(owner, (*n).Info);
	(*objtype).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	castexpr = createcastexpr_427438(argsparam, objtype);
	LOC34 = 0;
	LOC34 = getident_201472(((NimStringDesc*) &TMP3838));
	scratchobj = newsym_227074(((NU8) 8), LOC34, owner, (*n).Info);
	{
		tnode226816* varsectionb;
		tnode226816* LOC36;
		asgnRefNoCycle((void**) (&(*scratchobj).Typ), objtype);
		(*scratchobj).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
		varsectionb = newnodei_227138(((NU8) 99), (*n).Info);
		LOC36 = 0;
		LOC36 = newsymnode_227132(scratchobj);
		addvar_425053(varsectionb, LOC36);
		add_227498(result, varsectionb);
	}
	call = newnodeit_227145(((NU8) 27), (*n).Info, (*n).Typ);
	fn = (*n).kindU.S6.Sons->data[0];
	{
		NIM_BOOL LOC39;
		ttype226852* argtype;
		tnode226816* LOC43;
		tsym226846* field;
		tident201021* LOC44;
		tnode226816* LOC45;
		tnode226816* LOC46;
		tnode226816* 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_227698(n, 0);
		argtype = skiptypes_231245((*LOC43).Typ, IL64(211106232576256));
		LOC44 = 0;
		LOC44 = getident_201472(((NimStringDesc*) &TMP3839));
		field = newsym_227074(((NU8) 19), LOC44, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), argtype);
		addfield_425608(objtype, field);
		LOC45 = 0;
		LOC45 = newdotexpr_426007(scratchobj, field);
		LOC46 = 0;
		LOC46 = HEX5BHEX5D_227698(n, 0);
		LOC47 = 0;
		LOC47 = newfastasgnstmt_425145(LOC45, LOC46);
		add_227498(result, LOC47);
		fn = indirectaccess_426848(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_198966((*n).Info, ((NimStringDesc*) &TMP3840));
	}
	goto LA37;
	LA51: ;
	{
		if (!((*(*fn).Typ).Callconv == ((NU8) 8))) goto LA54;
		localerror_198966((*n).Info, ((NimStringDesc*) &TMP3841));
	}
	goto LA37;
	LA54: ;
	LA37: ;
	add_227498(call, fn);
	varsection = newnodei_227138(((NU8) 99), (*n).Info);
	varinit = newnodei_227138(((NU8) 115), (*n).Info);
	{
		if (!barrier == 0) goto LA58;
		setupargsforconcurrency_427449(n, objtype, scratchobj, castexpr, call, varsection, varinit, result);
	}
	goto LA56;
	LA58: ;
	{
		setupargsforparallelism_427698(n, objtype, scratchobj, castexpr, call, varsection, varinit, result);
	}
	LA56: ;
	barrierasexpr = NIM_NIL;
	{
		ttype226852* typ;
		tsym226846* LOC65;
		tsym226846* field;
		tident201021* LOC66;
		tnode226816* LOC67;
		tnode226816* LOC68;
		if (!!((barrier == NIM_NIL))) goto LA63;
		typ = newtype_227083(((NU8) 21), owner);
		LOC65 = 0;
		LOC65 = getcompilerproc_283036(((NimStringDesc*) &TMP3846));
		rawaddson_231562(typ, (*LOC65).Typ);
		LOC66 = 0;
		LOC66 = getident_201472(((NimStringDesc*) &TMP3847));
		field = newsym_227074(((NU8) 19), LOC66, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), typ);
		addfield_425608(objtype, field);
		LOC67 = 0;
		LOC67 = newdotexpr_426007(scratchobj, field);
		LOC68 = 0;
		LOC68 = newfastasgnstmt_425145(LOC67, barrier);
		add_227498(result, LOC68);
		barrierasexpr = indirectaccess_426848(castexpr, field, (*n).Info);
	}
	LA63: ;
	fvfield = NIM_NIL;
	fvasexpr = NIM_NIL;
	{
		tsym226846* field;
		tident201021* LOC73;
		tnode226816* LOC74;
		tnode226816* LOC75;
		tnode226816* LOC76;
		if (!(spawnkind == ((NU8) 1))) goto LA71;
		LOC73 = 0;
		LOC73 = getident_201472(((NimStringDesc*) &TMP3848));
		field = newsym_227074(((NU8) 19), LOC73, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), rettype);
		addfield_425608(objtype, field);
		fvfield = newdotexpr_426007(scratchobj, field);
		fvasexpr = indirectaccess_426848(castexpr, field, (*n).Info);
		LOC74 = 0;
		LOC74 = HEX5BHEX5D_227698(spawnexpr, 2);
		LOC75 = 0;
		LOC75 = callproc_426971(LOC74);
		LOC76 = 0;
		LOC76 = newfastasgnstmt_425145(fvfield, LOC75);
		add_227498(result, LOC76);
		{
			tnode226816* LOC81;
			if (!(barrier == NIM_NIL)) goto LA79;
			LOC81 = 0;
			LOC81 = callcodegenproc_426906(((NimStringDesc*) &TMP3849), fvfield, NIM_NIL, NIM_NIL);
			add_227498(result, LOC81);
		}
		LA79: ;
	}
	goto LA69;
	LA71: ;
	{
		tsym226846* field;
		tident201021* LOC85;
		tnode226816* LOC86;
		tnode226816* LOC87;
		tnode226816* LOC88;
		if (!(spawnkind == ((NU8) 2))) goto LA83;
		LOC85 = 0;
		LOC85 = getident_201472(((NimStringDesc*) &TMP3848));
		field = newsym_227074(((NU8) 19), LOC85, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), newtype_227083(((NU8) 21), (*objtype).Owner));
		rawaddson_231562((*field).Typ, rettype);
		addfield_425608(objtype, field);
		fvasexpr = indirectaccess_426848(castexpr, field, (*n).Info);
		LOC86 = 0;
		LOC86 = newdotexpr_426007(scratchobj, field);
		LOC87 = 0;
		LOC87 = genaddrof_426872(dest);
		LOC88 = 0;
		LOC88 = newfastasgnstmt_425145(LOC86, LOC87);
		add_227498(result, LOC88);
	}
	goto LA69;
	LA83: ;
	LA69: ;
	wrapper = createwrapperproc_427177(fn, threadparam, argsparam, varsection, varinit, call, barrierasexpr, fvasexpr, spawnkind);
	LOC89 = 0;
	LOC89 = newsymnode_227132(wrapper);
	LOC90 = 0;
	LOC90 = newsymnode_227132(scratchobj);
	LOC91 = 0;
	LOC91 = genaddrof_426872(LOC90);
	LOC92 = 0;
	LOC92 = callcodegenproc_426906(((NimStringDesc*) &TMP3861), LOC89, LOC91, NIM_NIL);
	add_227498(result, LOC92);
	{
		if (!(spawnkind == ((NU8) 1))) goto LA95;
		add_227498(result, fvfield);
	}
	LA95: ;
	BeforeRet: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_loweringsInit)(void) {
}

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

