/* 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 tnode225816 tnode225816;
typedef struct tsym225846 tsym225846;
typedef struct ttype225852 ttype225852;
typedef struct tlineinfo195539 tlineinfo195539;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tident200021 tident200021;
typedef struct tnodeseq225810 tnodeseq225810;
typedef struct tidobj200015 tidobj200015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq225848 ttypeseq225848;
typedef struct tscope225840 tscope225840;
typedef struct TY225947 TY225947;
typedef struct tinstantiation225836 tinstantiation225836;
typedef struct tstrtable225820 tstrtable225820;
typedef struct tsymseq225818 tsymseq225818;
typedef struct tloc225830 tloc225830;
typedef struct trope177009 trope177009;
typedef struct tlib225834 tlib225834;
typedef struct tcell45133 tcell45133;
typedef struct tcellseq45149 tcellseq45149;
typedef struct tgcheap47216 tgcheap47216;
typedef struct tcellset45145 tcellset45145;
typedef struct tpagedesc45141 tpagedesc45141;
typedef struct tmemregion27410 tmemregion27410;
typedef struct tsmallchunk26640 tsmallchunk26640;
typedef struct tllchunk27404 tllchunk27404;
typedef struct tbigchunk26642 tbigchunk26642;
typedef struct tintset26617 tintset26617;
typedef struct ttrunk26613 ttrunk26613;
typedef struct tavlnode27408 tavlnode27408;
typedef struct tgcstat47214 tgcstat47214;
typedef struct TY84945 TY84945;
typedef struct TY225936 TY225936;
typedef struct tlistentry127022 tlistentry127022;
typedef struct tbasechunk26638 tbasechunk26638;
typedef struct tfreecell26630 tfreecell26630;
struct  tlineinfo195539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tnode225816  {
ttype225852* Typ;
tlineinfo195539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym225846* Sym;
} S4;
struct {tident200021* Ident;
} S5;
struct {tnodeseq225810* 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  tidobj200015  {
  TNimObject Sup;
NI Id;
};
struct  tstrtable225820  {
NI Counter;
tsymseq225818* Data;
};
struct  tloc225830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype225852* T;
trope177009* R;
trope177009* Heaproot;
};
struct  tsym225846  {
  tidobj200015 Sup;
NU8 Kind;
union {
struct {ttypeseq225848* Typeinstcache;
tscope225840* Typscope;
} S1;
struct {TY225947* Procinstcache;
tscope225840* Scope;
} S2;
struct {TY225947* Usedgenerics;
tstrtable225820 Tab;
} S3;
struct {tsym225846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype225852* Typ;
tident200021* Name;
tlineinfo195539 Info;
tsym225846* Owner;
NU32 Flags;
tnode225816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc225830 Loc;
tlib225834* Annex;
tnode225816* Constraint;
};
struct  tcell45133  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq45149  {
NI Len;
NI Cap;
tcell45133** D;
};
struct  tcellset45145  {
NI Counter;
NI Max;
tpagedesc45141* Head;
tpagedesc45141** Data;
};
typedef tsmallchunk26640* TY27422[512];
typedef ttrunk26613* ttrunkbuckets26615[256];
struct  tintset26617  {
ttrunkbuckets26615 Data;
};
struct  tmemregion27410  {
NI Minlargeobj;
NI Maxlargeobj;
TY27422 Freesmallchunks;
tllchunk27404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26642* Freechunkslist;
tintset26617 Chunkstarts;
tavlnode27408* Root;
tavlnode27408* Deleted;
tavlnode27408* Last;
tavlnode27408* Freeavlnodes;
};
struct  tgcstat47214  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47216  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq45149 Zct;
tcellseq45149 Decstack;
tcellset45145 Cycleroots;
tcellseq45149 Tempstack;
NI Recgclock;
tmemregion27410 Region;
tgcstat47214 Stat;
};
struct  ttype225852  {
  tidobj200015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq225848* Sons;
tnode225816* N;
tsym225846* Owner;
tsym225846* Sym;
tsym225846* Destructor;
tsym225846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc225830 Loc;
};
struct  tident200021  {
  tidobj200015 Sup;
NimStringDesc* S;
tident200021* Next;
NI H;
};
struct TY84945 {
NimStringDesc* Field0;
NI Field1;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tscope225840  {
NI Depthlevel;
tstrtable225820 Symbols;
tnodeseq225810* Usingsyms;
tscope225840* Parent;
};
struct  tinstantiation225836  {
tsym225846* Sym;
ttypeseq225848* Concretetypes;
TY225936* Usedby;
};
struct  trope177009  {
  TNimObject Sup;
trope177009* Left;
trope177009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  tlib225834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope177009* Name;
tnode225816* Path;
};
typedef NI TY26620[8];
struct  tpagedesc45141  {
tpagedesc45141* Next;
NI Key;
TY26620 Bits;
};
struct  tbasechunk26638  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26640  {
  tbasechunk26638 Sup;
tsmallchunk26640* Next;
tsmallchunk26640* Prev;
tfreecell26630* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27404  {
NI Size;
NI Acc;
tllchunk27404* Next;
};
struct  tbigchunk26642  {
  tbasechunk26638 Sup;
tbigchunk26642* Next;
tbigchunk26642* Prev;
NI Align;
NF Data;
};
struct  ttrunk26613  {
ttrunk26613* Next;
NI Key;
TY26620 Bits;
};
typedef tavlnode27408* TY27414[2];
struct  tavlnode27408  {
TY27414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell26630  {
tfreecell26630* Next;
NI Zerofield;
};
struct tnodeseq225810 {
  TGenericSeq Sup;
  tnode225816* data[SEQ_DECL_SIZE];
};
struct ttypeseq225848 {
  TGenericSeq Sup;
  ttype225852* data[SEQ_DECL_SIZE];
};
struct TY225947 {
  TGenericSeq Sup;
  tinstantiation225836* data[SEQ_DECL_SIZE];
};
struct tsymseq225818 {
  TGenericSeq Sup;
  tsym225846* data[SEQ_DECL_SIZE];
};
struct TY225936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
static N_INLINE(tnode225816*, lastson_226261)(tnode225816* n);
static N_INLINE(NI, sonslen_226249)(tnode225816* n);
N_NIMCALL(tnode225816*, newnodei_226138)(NU8 kind, tlineinfo195539 info);
N_NIMCALL(tsym225846*, newsym_226074)(NU8 symkind, tident200021* name, tsym225846* owner, tlineinfo195539 info);
N_NIMCALL(tident200021*, getident_200472)(NimStringDesc* identifier);
N_NIMCALL(ttype225852*, skiptypes_230245)(ttype225852* t, NU64 kinds);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell45133*, usrtocell_48846)(void* usr);
static N_INLINE(void, rtladdzct_50404)(tcell45133* c);
N_NOINLINE(void, addzct_48817)(tcellseq45149* s, tcell45133* c);
N_NIMCALL(tnode225816*, newsymnode_226132)(tsym225846* sym);
N_NIMCALL(void, addvar_424053)(tnode225816* father, tnode225816* v);
N_NIMCALL(tnode225816*, newnodei_228007)(NU8 kind, tlineinfo195539 info, NI children);
N_NIMCALL(void, addson_226287)(tnode225816* father, tnode225816* son);
N_NIMCALL(void, add_226498)(tnode225816* father, tnode225816* son);
N_NIMCALL(tnode225816*, newasgnstmt_424106)(tnode225816* le, tnode225816* ri);
static N_INLINE(NI, len_226364)(tnode225816* n);
N_NIMCALL(tnode225816*, newtupleaccess_424027)(tnode225816* tup, NI i);
N_NIMCALL(tnode225816*, newnodeit_226145)(NU8 kind, tlineinfo195539 info, ttype225852* typ);
N_NIMCALL(tnode225816*, copytree_226329)(tnode225816* src);
N_NIMCALL(ttype225852*, getsystype_282030)(NU8 kind);
N_NIMCALL(ttype225852*, newtype_226083)(NU8 kind, tsym225846* owner);
N_NIMCALL(void, rawaddson_230562)(ttype225852* father, ttype225852* 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(ttype225852*, skipintlit_282533)(ttype225852* t);
N_NIMCALL(tsym225846*, lookupinrecord_235236)(tnode225816* n, tident200021* field);
N_NIMCALL(tnode225816*, indirectaccess_425207)(tnode225816* a, NimStringDesc* b, tlineinfo195539 info);
N_NIMCALL(tsym225846*, getsymfromlist_235228)(tnode225816* list, tident200021* ident, NI start);
N_NIMCALL(void, internalerror_198006)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_198126)(TY84945 x_198130);
static N_INLINE(NIM_BOOL, isemptytype_232991)(ttype225852* t);
N_NIMCALL(NIM_BOOL, containsgarbagecollectedref_263163)(ttype225852* typ);
static N_INLINE(tnode225816*, HEX5BHEX5D_226698)(tnode225816* n, NI i);
N_NIMCALL(NU8, spawnresult_425994)(ttype225852* t, NIM_BOOL inparallel);
N_NIMCALL(void, localerror_197966)(tlineinfo195539 info, NimStringDesc* arg);
N_NIMCALL(ttype225852*, createobj_424304)(tsym225846* owner, tlineinfo195539 info);
N_NIMCALL(tnode225816*, createcastexpr_426438)(tsym225846* argsparam, ttype225852* objtype);
N_NIMCALL(void, addfield_424608)(ttype225852* obj, tsym225846* s);
N_NIMCALL(tnode225816*, newfastasgnstmt_424145)(tnode225816* le, tnode225816* ri);
N_NIMCALL(tnode225816*, newdotexpr_425007)(tsym225846* obj, tsym225846* b);
N_NIMCALL(tnode225816*, indirectaccess_425848)(tnode225816* a, tsym225846* b, tlineinfo195539 info);
N_NIMCALL(void, setupargsforconcurrency_426449)(tnode225816* n, ttype225852* objtype, tsym225846* scratchobj, tnode225816* castexpr, tnode225816* call, tnode225816* varsection, tnode225816* varinit, tnode225816* result);
N_NIMCALL(tsym225846*, addlocalvar_426029)(tnode225816* varsection, tnode225816* varinit, tsym225846* owner, ttype225852* typ, tnode225816* v, NIM_BOOL useshallowcopy);
N_NIMCALL(tsym225846*, createmagic_368405)(NimStringDesc* name, NU16 m);
N_NIMCALL(void, setupargsforparallelism_426698)(tnode225816* n_426700, ttype225852* objtype, tsym225846* scratchobj, tnode225816* castexpr, tnode225816* call, tnode225816* varsection, tnode225816* varinit, tnode225816* result);
N_NIMCALL(NU16, getmagic_261845)(tnode225816* op);
N_NIMCALL(tnode225816*, genaddrof_425872)(tnode225816* n);
N_NIMCALL(tnode225816*, genhigh_426646)(tnode225816* n);
N_NIMCALL(tnode225816*, newintlit_426636)(NI64 value);
N_NIMCALL(tnode225816*, newintnode_226096)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, lastord_263010)(ttype225852* t);
N_NIMCALL(tnode225816*, genderef_425896)(tnode225816* n);
N_NIMCALL(NI64, computesize_263193)(ttype225852* typ);
N_NIMCALL(tsym225846*, getroot_426533)(tnode225816* n);
N_NIMCALL(tsym225846*, getcompilerproc_282036)(NimStringDesc* name);
N_NIMCALL(tnode225816*, callproc_425971)(tnode225816* a);
N_NIMCALL(tnode225816*, callcodegenproc_425906)(NimStringDesc* name, tnode225816* arg1, tnode225816* arg2, tnode225816* arg3);
N_NIMCALL(void, localerror_197955)(tlineinfo195539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(tsym225846*, createwrapperproc_426177)(tnode225816* f, tsym225846* threadparam, tsym225846* argsparam, tnode225816* varsection, tnode225816* varinit, tnode225816* call, tnode225816* barrier, tnode225816* fv, NU8 spawnkind);
N_NIMCALL(NU8, flowvarkind_426005)(ttype225852* t);
N_NIMCALL(NimStringDesc*, typetostring_263031)(ttype225852* typ, NU8 prefer);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(tnode225816*, newprocnode_228432)(NU8 kind, tlineinfo195539 info, tnode225816* body, tnode225816* params, tnode225816* name, tnode225816* pattern, tnode225816* genericparams, tnode225816* pragmas, tnode225816* exceptions);
STRING_LITERAL(TMP2815, ":tmp", 4);
STRING_LITERAL(TMP3187, "compiler/lowerings.nim", 22);
NIM_CONST TY84945 TMP3186 = {((NimStringDesc*) &TMP3187),
129}
;
NIM_CONST TY84945 TMP3826 = {((NimStringDesc*) &TMP3187),
476}
;
NIM_CONST TY84945 TMP3827 = {((NimStringDesc*) &TMP3187),
479}
;
STRING_LITERAL(TMP3828, "\'spawn\' must not be discarded", 29);
STRING_LITERAL(TMP3829, "\'spawn\' takes a call expression", 31);
STRING_LITERAL(TMP3830, "\'spawn\' takes a GC safe call expression", 39);
STRING_LITERAL(TMP3831, "thread", 6);
STRING_LITERAL(TMP3832, "args", 4);
STRING_LITERAL(TMP3833, "scratch", 7);
STRING_LITERAL(TMP3834, "fn", 2);
STRING_LITERAL(TMP3835, "iterator in spawn environment is not allowed", 44);
STRING_LITERAL(TMP3836, "closure in spawn environment is not allowed", 43);
STRING_LITERAL(TMP3837, "\'spawn\'ed function cannot have a \'var\' parameter", 48);
STRING_LITERAL(TMP3838, "deepCopy", 8);
STRING_LITERAL(TMP3839, "slice", 5);
STRING_LITERAL(TMP3840, "high", 4);
STRING_LITERAL(TMP3841, "Barrier", 7);
STRING_LITERAL(TMP3842, "barrier", 7);
STRING_LITERAL(TMP3843, "fv", 2);
STRING_LITERAL(TMP3844, "nimFlowVarCreateSemaphore", 25);
STRING_LITERAL(TMP3845, "barrierEnter", 12);
NIM_CONST TY84945 TMP3846 = {((NimStringDesc*) &TMP3187),
273}
;
STRING_LITERAL(TMP3847, "owner", 5);
STRING_LITERAL(TMP3848, "nimArgsPassingDone", 18);
STRING_LITERAL(TMP3849, "cannot create a flowVar of type: ", 33);
STRING_LITERAL(TMP3850, "data", 4);
STRING_LITERAL(TMP3851, "blob", 4);
STRING_LITERAL(TMP3852, "GCref", 5);
STRING_LITERAL(TMP3853, "nimFlowVarSignal", 16);
STRING_LITERAL(TMP3854, "barrierLeave", 12);
STRING_LITERAL(TMP3855, "Wrapper", 7);
STRING_LITERAL(TMP3856, "nimSpawn", 8);
extern tgcheap47216 gch_47244;
extern tnode225816* emptynode_226738;
extern NU32 gglobaloptions_169118;

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

static N_INLINE(tcell45133*, usrtocell_48846)(void* usr) {
	tcell45133* result;
	result = 0;
	result = ((tcell45133*) ((NI)((NU64)(((NI) (usr))) - (NU64)(((NI)sizeof(tcell45133))))));
	return result;
}

static N_INLINE(void, rtladdzct_50404)(tcell45133* c) {
	addzct_48817((&gch_47244.Zct), c);
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell45133* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_48846(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell45133* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_48846((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA11;
			rtladdzct_50404(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, addvar_424053)(tnode225816* father, tnode225816* v) {
	tnode225816* vpart;
	vpart = newnodei_228007(((NU8) 35), (*v).Info, 3);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[0]), v);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[1]), emptynode_226738);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[2]), emptynode_226738);
	addson_226287(father, vpart);
}

N_NIMCALL(tnode225816*, newasgnstmt_424106)(tnode225816* le, tnode225816* ri) {
	tnode225816* result;
	result = 0;
	result = newnodei_228007(((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_226364)(tnode225816* 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(tnode225816*, newtupleaccess_424027)(tnode225816* tup, NI i) {
	tnode225816* result;
	ttype225852* LOC1;
	tnode225816* LOC2;
	tnode225816* lit;
	ttype225852* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_230245((*tup).Typ, IL64(211106232576256));
	result = newnodeit_226145(((NU8) 42), (*tup).Info, (*LOC1).Sons->data[i]);
	LOC2 = 0;
	LOC2 = copytree_226329(tup);
	addson_226287(result, LOC2);
	LOC3 = 0;
	LOC3 = getsystype_282030(((NU8) 31));
	lit = newnodeit_226145(((NU8) 6), (*tup).Info, LOC3);
	(*lit).kindU.S1.Intval = ((NI64) (i));
	addson_226287(result, lit);
	return result;
}

N_NIMCALL(tnode225816*, lowertupleunpacking_424184)(tnode225816* n, tsym225846* owner) {
	tnode225816* result;
	tnode225816* value;
	tsym225846* temp;
	tident200021* LOC1;
	tnode225816* v;
	tnode225816* tempasnode;
	tnode225816* LOC2;
	result = 0;
	value = lastson_226261(n);
	result = newnodei_226138(((NU8) 115), (*n).Info);
	LOC1 = 0;
	LOC1 = getident_200472(((NimStringDesc*) &TMP2815));
	temp = newsym_226074(((NU8) 5), LOC1, owner, (*value).Info);
	asgnRefNoCycle((void**) (&(*temp).Typ), skiptypes_230245((*value).Typ, IL64(211106232576256)));
	(*temp).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	v = newnodei_226138(((NU8) 99), (*value).Info);
	tempasnode = newsymnode_226132(temp);
	addvar_424053(v, tempasnode);
	add_226498(result, v);
	LOC2 = 0;
	LOC2 = newasgnstmt_424106(tempasnode, value);
	add_226498(result, LOC2);
	{
		NI i_424231;
		NI HEX3Atmp_424284;
		NI LOC4;
		NI res_424287;
		i_424231 = 0;
		HEX3Atmp_424284 = 0;
		LOC4 = 0;
		LOC4 = len_226364(n);
		HEX3Atmp_424284 = (NI64)(LOC4 - 3);
		res_424287 = 0;
		{
			while (1) {
				tnode225816* LOC11;
				tnode225816* LOC12;
				if (!(res_424287 <= HEX3Atmp_424284)) goto LA6;
				i_424231 = res_424287;
				{
					if (!((*(*n).kindU.S6.Sons->data[i_424231]).Kind == ((NU8) 3))) goto LA9;
					addvar_424053(v, (*n).kindU.S6.Sons->data[i_424231]);
				}
				LA9: ;
				LOC11 = 0;
				LOC11 = newtupleaccess_424027(tempasnode, i_424231);
				LOC12 = 0;
				LOC12 = newasgnstmt_424106((*n).kindU.S6.Sons->data[i_424231], LOC11);
				add_226498(result, LOC12);
				res_424287 += 1;
			} LA6: ;
		}
	}
	return result;
}

N_NIMCALL(ttype225852*, createobj_424304)(tsym225846* owner, tlineinfo195539 info) {
	ttype225852* result;
	result = 0;
	result = newtype_226083(((NU8) 17), owner);
	rawaddson_230562(result, NIM_NIL);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	asgnRefNoCycle((void**) (&(*result).N), newnodei_226138(((NU8) 137), info));
	return result;
}

N_NIMCALL(void, rawaddfield_424331)(ttype225852* obj, tsym225846* field) {
	tnode225816* LOC1;
	(*field).Position = sonslen_226249((*obj).N);
	LOC1 = 0;
	LOC1 = newsymnode_226132(field);
	addson_226287((*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(ttype225852*, skipintlit_282533)(ttype225852* t) {
	ttype225852* result;
	result = 0;
	{
		if (!!(((*t).N == NIM_NIL))) goto LA3;
		{
			if (!((IL64(70866960384) &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0)) goto LA7;
			result = getsystype_282030((*t).Kind);
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	result = t;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, addfield_424608)(ttype225852* obj, tsym225846* s) {
	tsym225846* field;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	tident200021* LOC3;
	ttype225852* t;
	tnode225816* 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_200472(LOC1);
	field = newsym_226074(((NU8) 19), LOC3, (*s).Owner, (*s).Info);
	t = skipintlit_282533((*s).Typ);
	asgnRefNoCycle((void**) (&(*field).Typ), t);
	(*field).Position = sonslen_226249((*obj).N);
	LOC4 = 0;
	LOC4 = newsymnode_226132(field);
	addson_226287((*obj).N, LOC4);
}

N_NIMCALL(void, adduniquefield_424807)(ttype225852* obj, tsym225846* s) {
	tident200021* 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_200472(LOC1);
	{
		tsym225846* LOC5;
		tsym225846* field;
		ttype225852* t;
		tnode225816* LOC8;
		LOC5 = 0;
		LOC5 = lookupinrecord_235236((*obj).N, fieldname);
		if (!(LOC5 == NIM_NIL)) goto LA6;
		field = newsym_226074(((NU8) 19), fieldname, (*s).Owner, (*s).Info);
		t = skipintlit_282533((*s).Typ);
		asgnRefNoCycle((void**) (&(*field).Typ), t);
		(*field).Position = sonslen_226249((*obj).N);
		LOC8 = 0;
		LOC8 = newsymnode_226132(field);
		addson_226287((*obj).N, LOC8);
	}
	LA6: ;
}

N_NIMCALL(tnode225816*, indirectaccess_425207)(tnode225816* a, NimStringDesc* b, tlineinfo195539 info) {
	tnode225816* result;
	tnode225816* deref;
	ttype225852* LOC1;
	ttype225852* t;
	tsym225846* field;
	tnode225816* LOC18;
	result = 0;
	deref = newnodei_226138(((NU8) 65), info);
	LOC1 = 0;
	LOC1 = skiptypes_230245((*a).Typ, IL64(211106232576256));
	asgnRefNoCycle((void**) (&(*deref).Typ), (*LOC1).Sons->data[0]);
	t = skiptypes_230245((*deref).Typ, IL64(211106232576256));
	field = 0;
	{
		while (1) {
			tident200021* LOC4;
			LOC4 = 0;
			LOC4 = getident_200472(b);
			field = getsymfromlist_235228((*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_230245(t, IL64(211106232576256));
		}
	} LA2: ;
	{
		NimStringDesc* LOC17;
		if (!!(!((field == NIM_NIL)))) goto LA15;
		LOC17 = 0;
		LOC17 = HEX24_198126(TMP3186);
		internalerror_198006(LOC17);
	}
	LA15: ;
	addson_226287(deref, a);
	result = newnodei_226138(((NU8) 45), info);
	addson_226287(result, deref);
	LOC18 = 0;
	LOC18 = newsymnode_226132(field);
	addson_226287(result, LOC18);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

N_NIMCALL(tnode225816*, indirectaccess_425848)(tnode225816* a, tsym225846* b, tlineinfo195539 info) {
	tnode225816* 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_425207(a, LOC1, info);
	return result;
}

N_NIMCALL(tnode225816*, rawindirectaccess_424407)(tnode225816* a, tsym225846* field, tlineinfo195539 info) {
	tnode225816* result;
	tnode225816* deref;
	ttype225852* LOC1;
	tnode225816* LOC2;
	result = 0;
	deref = newnodei_226138(((NU8) 65), info);
	LOC1 = 0;
	LOC1 = skiptypes_230245((*a).Typ, IL64(211106232576256));
	asgnRefNoCycle((void**) (&(*deref).Typ), (*LOC1).Sons->data[0]);
	addson_226287(deref, a);
	result = newnodei_226138(((NU8) 45), info);
	addson_226287(result, deref);
	LOC2 = 0;
	LOC2 = newsymnode_226132(field);
	addson_226287(result, LOC2);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

static N_INLINE(NIM_BOOL, isemptytype_232991)(ttype225852* 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_425994)(ttype225852* t, NIM_BOOL inparallel) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isemptytype_232991(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_263163(t);
		LOC7 = !(LOC9);
		LA8: ;
		if (!LOC7) goto LA10;
		result = ((NU8) 2);
	}
	goto LA1;
	LA10: ;
	{
		result = ((NU8) 1);
	}
	LA1: ;
	return result;
}

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

N_NIMCALL(tnode225816*, createcastexpr_426438)(tsym225846* argsparam, ttype225852* objtype) {
	tnode225816* result;
	tnode225816* LOC1;
	result = 0;
	result = newnodei_226138(((NU8) 61), (*argsparam).Info);
	add_226498(result, emptynode_226738);
	LOC1 = 0;
	LOC1 = newsymnode_226132(argsparam);
	add_226498(result, LOC1);
	asgnRefNoCycle((void**) (&(*result).Typ), newtype_226083(((NU8) 21), (*objtype).Owner));
	rawaddson_230562((*result).Typ, objtype);
	return result;
}

N_NIMCALL(tnode225816*, newfastasgnstmt_424145)(tnode225816* le, tnode225816* ri) {
	tnode225816* result;
	result = 0;
	result = newnodei_228007(((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(tnode225816*, newdotexpr_425007)(tsym225846* obj, tsym225846* b) {
	tnode225816* result;
	tsym225846* field;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	tident200021* LOC3;
	tnode225816* LOC4;
	tnode225816* LOC5;
	result = 0;
	result = newnodei_226138(((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_200472(LOC1);
	field = getsymfromlist_235228((*(*obj).Typ).N, LOC3, 0);
	LOC4 = 0;
	LOC4 = newsymnode_226132(obj);
	addson_226287(result, LOC4);
	LOC5 = 0;
	LOC5 = newsymnode_226132(field);
	addson_226287(result, LOC5);
	asgnRefNoCycle((void**) (&(*result).Typ), (*field).Typ);
	return result;
}

N_NIMCALL(tsym225846*, addlocalvar_426029)(tnode225816* varsection, tnode225816* varinit, tsym225846* owner, ttype225852* typ, tnode225816* v, NIM_BOOL useshallowcopy) {
	tsym225846* result;
	tident200021* LOC1;
	tnode225816* vpart;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_200472(((NimStringDesc*) &TMP2815));
	result = newsym_226074(((NU8) 5), LOC1, owner, (*varsection).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), typ);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	vpart = newnodei_228007(((NU8) 35), (*varsection).Info, 3);
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[0]), newsymnode_226132(result));
	asgnRefNoCycle((void**) (&(*vpart).kindU.S6.Sons->data[1]), emptynode_226738);
	{
		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_226738);
	}
	LA2: ;
	add_226498(varsection, vpart);
	{
		if (!!((varinit == NIM_NIL))) goto LA9;
		{
			tnode225816* LOC15;
			tnode225816* LOC16;
			if (!useshallowcopy) goto LA13;
			LOC15 = 0;
			LOC15 = newsymnode_226132(result);
			LOC16 = 0;
			LOC16 = newfastasgnstmt_424145(LOC15, v);
			add_226498(varinit, LOC16);
		}
		goto LA11;
		LA13: ;
		{
			tnode225816* deepcopycall;
			tsym225846* LOC18;
			deepcopycall = newnodei_228007(((NU8) 27), (*varinit).Info, 3);
			LOC18 = 0;
			LOC18 = createmagic_368405(((NimStringDesc*) &TMP3838), ((NU16) 214));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[0]), newsymnode_226132(LOC18));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[1]), newsymnode_226132(result));
			asgnRefNoCycle((void**) (&(*deepcopycall).kindU.S6.Sons->data[2]), v);
			add_226498(varinit, deepcopycall);
		}
		LA11: ;
	}
	LA9: ;
	return result;
}

N_NIMCALL(void, setupargsforconcurrency_426449)(tnode225816* n, ttype225852* objtype, tsym225846* scratchobj, tnode225816* castexpr, tnode225816* call, tnode225816* varsection, tnode225816* varinit, tnode225816* result) {
	tnode225816* formals;
	tnode225816* LOC1;
	tident200021* tmpname;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_226698(n, 0);
	formals = (*(*LOC1).Typ).N;
	tmpname = getident_200472(((NimStringDesc*) &TMP2815));
	{
		NI i_426482;
		NI HEX3Atmp_426513;
		NI LOC3;
		NI res_426516;
		i_426482 = 0;
		HEX3Atmp_426513 = 0;
		LOC3 = 0;
		LOC3 = len_226364(n);
		HEX3Atmp_426513 = (LOC3 - 1);
		res_426516 = 1;
		{
			while (1) {
				ttype225852* argtype;
				tnode225816* LOC6;
				tident200021* fieldname;
				tsym225846* field;
				tnode225816* LOC23;
				tnode225816* LOC24;
				tnode225816* LOC25;
				tsym225846* temp;
				tnode225816* LOC26;
				tnode225816* LOC27;
				if (!(res_426516 <= HEX3Atmp_426513)) goto LA5;
				i_426482 = res_426516;
				LOC6 = 0;
				LOC6 = HEX5BHEX5D_226698(n, i_426482);
				argtype = skiptypes_230245((*LOC6).Typ, IL64(211106232576256));
				{
					NIM_BOOL LOC9;
					NI LOC10;
					tnode225816* LOC12;
					tnode225816* LOC15;
					LOC9 = 0;
					LOC10 = 0;
					LOC10 = len_226364(formals);
					LOC9 = (i_426482 < LOC10);
					if (!(LOC9)) goto LA11;
					LOC12 = 0;
					LOC12 = HEX5BHEX5D_226698(formals, i_426482);
					LOC9 = ((*(*LOC12).Typ).Kind == ((NU8) 23));
					LA11: ;
					if (!LOC9) goto LA13;
					LOC15 = 0;
					LOC15 = HEX5BHEX5D_226698(n, i_426482);
					localerror_197966((*LOC15).Info, ((NimStringDesc*) &TMP3837));
				}
				LA13: ;
				{
					NI LOC18;
					tnode225816* LOC21;
					LOC18 = 0;
					LOC18 = len_226364(formals);
					if (!(i_426482 < LOC18)) goto LA19;
					LOC21 = 0;
					LOC21 = HEX5BHEX5D_226698(formals, i_426482);
					fieldname = (*(*LOC21).kindU.S4.Sym).Name;
				}
				goto LA16;
				LA19: ;
				{
					fieldname = tmpname;
				}
				LA16: ;
				field = newsym_226074(((NU8) 19), fieldname, (*objtype).Owner, (*n).Info);
				asgnRefNoCycle((void**) (&(*field).Typ), argtype);
				addfield_424608(objtype, field);
				LOC23 = 0;
				LOC23 = newdotexpr_425007(scratchobj, field);
				LOC24 = 0;
				LOC24 = HEX5BHEX5D_226698(n, i_426482);
				LOC25 = 0;
				LOC25 = newfastasgnstmt_424145(LOC23, LOC24);
				add_226498(result, LOC25);
				LOC26 = 0;
				LOC26 = indirectaccess_425848(castexpr, field, (*n).Info);
				temp = addlocalvar_426029(varsection, varinit, (*objtype).Owner, argtype, LOC26, NIM_FALSE);
				LOC27 = 0;
				LOC27 = newsymnode_226132(temp);
				add_226498(call, LOC27);
				res_426516 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(tnode225816*, genaddrof_425872)(tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = newnodei_228007(((NU8) 63), (*n).Info, 1);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), n);
	asgnRefNoCycle((void**) (&(*result).Typ), newtype_226083(((NU8) 21), (*(*n).Typ).Owner));
	rawaddson_230562((*result).Typ, (*n).Typ);
	return result;
}

N_NIMCALL(tnode225816*, newintlit_426636)(NI64 value) {
	tnode225816* result;
	result = 0;
	result = newintnode_226096(((NU8) 6), value);
	asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 31)));
	return result;
}

N_NIMCALL(tnode225816*, genhigh_426646)(tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		ttype225852* LOC3;
		ttype225852* LOC6;
		NI64 LOC7;
		LOC3 = 0;
		LOC3 = skiptypes_230245((*n).Typ, IL64(211106240964864));
		if (!((65552 &(IL64(1)<<(((*LOC3).Kind)&IL64(63))))!=0)) goto LA4;
		LOC6 = 0;
		LOC6 = skiptypes_230245((*n).Typ, IL64(211106240964864));
		LOC7 = 0;
		LOC7 = lastord_263010(LOC6);
		result = newintlit_426636(LOC7);
	}
	goto LA1;
	LA4: ;
	{
		tsym225846* LOC9;
		result = newnodei_228007(((NU8) 27), (*n).Info, 2);
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 31)));
		LOC9 = 0;
		LOC9 = createmagic_368405(((NimStringDesc*) &TMP3840), ((NU16) 5));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_226132(LOC9));
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), n);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, genderef_425896)(tnode225816* n) {
	tnode225816* result;
	ttype225852* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_230245((*n).Typ, IL64(211106232576256));
	result = newnodeit_226145(((NU8) 65), (*n).Info, (*LOC1).Sons->data[0]);
	add_226498(result, n);
	return result;
}

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

N_NIMCALL(void, setupargsforparallelism_426698)(tnode225816* n_426700, ttype225852* objtype, tsym225846* scratchobj, tnode225816* castexpr, tnode225816* call, tnode225816* varsection, tnode225816* varinit, tnode225816* result) {
	tnode225816* formals;
	tnode225816* LOC1;
	tident200021* tmpname;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_226698(n_426700, 0);
	formals = (*(*LOC1).Typ).N;
	tmpname = getident_200472(((NimStringDesc*) &TMP2815));
	{
		NI i_426731;
		NI HEX3Atmp_426877;
		NI LOC3;
		NI res_426880;
		i_426731 = 0;
		HEX3Atmp_426877 = 0;
		LOC3 = 0;
		LOC3 = len_226364(n_426700);
		HEX3Atmp_426877 = (LOC3 - 1);
		res_426880 = 1;
		{
			while (1) {
				tnode225816* n;
				ttype225852* argtype;
				ttype225852* LOC6;
				tident200021* fieldname;
				tsym225846* field;
				if (!(res_426880 <= HEX3Atmp_426877)) goto LA5;
				i_426731 = res_426880;
				n = HEX5BHEX5D_226698(n_426700, i_426731);
				LOC6 = 0;
				{
					NI LOC9;
					tnode225816* LOC12;
					LOC9 = 0;
					LOC9 = len_226364(formals);
					if (!(i_426731 < LOC9)) goto LA10;
					LOC12 = 0;
					LOC12 = HEX5BHEX5D_226698(formals, i_426731);
					LOC6 = (*LOC12).Typ;
				}
				goto LA7;
				LA10: ;
				{
					LOC6 = (*n).Typ;
				}
				LA7: ;
				argtype = skiptypes_230245(LOC6, IL64(211106232576256));
				{
					NI LOC16;
					tnode225816* LOC19;
					LOC16 = 0;
					LOC16 = len_226364(formals);
					if (!(i_426731 < LOC16)) goto LA17;
					LOC19 = 0;
					LOC19 = HEX5BHEX5D_226698(formals, i_426731);
					fieldname = (*(*LOC19).kindU.S4.Sym).Name;
				}
				goto LA14;
				LA17: ;
				{
					fieldname = tmpname;
				}
				LA14: ;
				field = newsym_226074(((NU8) 19), fieldname, (*objtype).Owner, (*n).Info);
				{
					tnode225816* slice;
					tsym225846* LOC25;
					tsym225846* fieldb;
					tnode225816* LOC47;
					tsym225846* threadlocal_426837;
					tnode225816* LOC48;
					if (!((IL64(281475110928384) &(IL64(1)<<(((*argtype).Kind)&IL64(63))))!=0)) goto LA23;
					slice = newnodei_228007(((NU8) 27), (*n).Info, 4);
					asgnRefNoCycle((void**) (&(*slice).Typ), (*n).Typ);
					LOC25 = 0;
					LOC25 = createmagic_368405(((NimStringDesc*) &TMP3839), ((NU16) 151));
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[0]), newsymnode_226132(LOC25));
					fieldb = newsym_226074(((NU8) 19), tmpname, (*objtype).Owner, (*n).Info);
					asgnRefNoCycle((void**) (&(*fieldb).Typ), getsystype_282030(((NU8) 31)));
					addfield_424608(objtype, fieldb);
					{
						NU16 LOC28;
						tnode225816* a;
						tnode225816* LOC31;
						tnode225816* LOC32;
						tnode225816* LOC33;
						tsym225846* fielda;
						tnode225816* LOC34;
						tnode225816* LOC35;
						tnode225816* LOC36;
						tnode225816* LOC37;
						tnode225816* LOC38;
						tnode225816* LOC39;
						tsym225846* threadlocal_426793;
						tnode225816* LOC40;
						LOC28 = 0;
						LOC28 = getmagic_261845(n);
						if (!(LOC28 == ((NU16) 151))) goto LA29;
						LOC31 = 0;
						LOC31 = HEX5BHEX5D_226698(n, 1);
						a = genaddrof_425872(LOC31);
						asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
						addfield_424608(objtype, field);
						LOC32 = 0;
						LOC32 = newdotexpr_425007(scratchobj, field);
						LOC33 = 0;
						LOC33 = newfastasgnstmt_424145(LOC32, a);
						add_226498(result, LOC33);
						fielda = newsym_226074(((NU8) 19), tmpname, (*objtype).Owner, (*n).Info);
						asgnRefNoCycle((void**) (&(*fielda).Typ), getsystype_282030(((NU8) 31)));
						addfield_424608(objtype, fielda);
						LOC34 = 0;
						LOC34 = newdotexpr_425007(scratchobj, fielda);
						LOC35 = 0;
						LOC35 = HEX5BHEX5D_226698(n, 2);
						LOC36 = 0;
						LOC36 = newfastasgnstmt_424145(LOC34, LOC35);
						add_226498(result, LOC36);
						LOC37 = 0;
						LOC37 = newdotexpr_425007(scratchobj, fieldb);
						LOC38 = 0;
						LOC38 = HEX5BHEX5D_226698(n, 3);
						LOC39 = 0;
						LOC39 = newfastasgnstmt_424145(LOC37, LOC38);
						add_226498(result, LOC39);
						LOC40 = 0;
						LOC40 = indirectaccess_425848(castexpr, fielda, (*n).Info);
						threadlocal_426793 = addlocalvar_426029(varsection, NIM_NIL, (*objtype).Owner, (*fielda).Typ, LOC40, NIM_TRUE);
						asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[2]), newsymnode_226132(threadlocal_426793));
					}
					goto LA26;
					LA29: ;
					{
						tnode225816* a;
						tnode225816* LOC42;
						tnode225816* LOC43;
						tnode225816* LOC44;
						tnode225816* LOC45;
						tnode225816* LOC46;
						a = genaddrof_425872(n);
						asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
						addfield_424608(objtype, field);
						LOC42 = 0;
						LOC42 = newdotexpr_425007(scratchobj, field);
						LOC43 = 0;
						LOC43 = newfastasgnstmt_424145(LOC42, a);
						add_226498(result, LOC43);
						LOC44 = 0;
						LOC44 = newdotexpr_425007(scratchobj, fieldb);
						LOC45 = 0;
						LOC45 = genhigh_426646(n);
						LOC46 = 0;
						LOC46 = newfastasgnstmt_424145(LOC44, LOC45);
						add_226498(result, LOC46);
						asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[2]), newintlit_426636(IL64(0)));
					}
					LA26: ;
					LOC47 = 0;
					LOC47 = indirectaccess_425848(castexpr, field, (*n).Info);
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[1]), genderef_425896(LOC47));
					LOC48 = 0;
					LOC48 = indirectaccess_425848(castexpr, fieldb, (*n).Info);
					threadlocal_426837 = addlocalvar_426029(varsection, NIM_NIL, (*objtype).Owner, (*fieldb).Typ, LOC48, NIM_TRUE);
					asgnRefNoCycle((void**) (&(*slice).kindU.S6.Sons->data[3]), newsymnode_226132(threadlocal_426837));
					add_226498(call, slice);
				}
				goto LA21;
				LA23: ;
				{
					NIM_BOOL LOC50;
					NI64 size;
					NIM_BOOL LOC51;
					tsym225846* LOC54;
					tnode225816* a;
					tnode225816* LOC57;
					tnode225816* LOC58;
					tsym225846* threadlocal_426874;
					tnode225816* LOC59;
					tnode225816* LOC60;
					tnode225816* LOC61;
					LOC50 = 0;
					size = computesize_263193(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_426533(n);
					LOC50 = !((LOC54 == NIM_NIL));
					LA53: ;
					if (!LOC50) goto LA55;
					a = genaddrof_425872(n);
					asgnRefNoCycle((void**) (&(*field).Typ), (*a).Typ);
					addfield_424608(objtype, field);
					LOC57 = 0;
					LOC57 = newdotexpr_425007(scratchobj, field);
					LOC58 = 0;
					LOC58 = newfastasgnstmt_424145(LOC57, a);
					add_226498(result, LOC58);
					LOC59 = 0;
					LOC59 = indirectaccess_425848(castexpr, field, (*n).Info);
					threadlocal_426874 = addlocalvar_426029(varsection, NIM_NIL, (*objtype).Owner, (*field).Typ, LOC59, NIM_TRUE);
					LOC60 = 0;
					LOC60 = newsymnode_226132(threadlocal_426874);
					LOC61 = 0;
					LOC61 = genderef_425896(LOC60);
					add_226498(call, LOC61);
				}
				goto LA21;
				LA55: ;
				{
					tnode225816* LOC63;
					tnode225816* LOC64;
					tsym225846* threadlocal_426875;
					tnode225816* LOC65;
					tnode225816* LOC66;
					asgnRefNoCycle((void**) (&(*field).Typ), argtype);
					addfield_424608(objtype, field);
					LOC63 = 0;
					LOC63 = newdotexpr_425007(scratchobj, field);
					LOC64 = 0;
					LOC64 = newfastasgnstmt_424145(LOC63, n);
					add_226498(result, LOC64);
					LOC65 = 0;
					LOC65 = indirectaccess_425848(castexpr, field, (*n).Info);
					threadlocal_426875 = addlocalvar_426029(varsection, varinit, (*objtype).Owner, (*field).Typ, LOC65, NIM_TRUE);
					LOC66 = 0;
					LOC66 = newsymnode_226132(threadlocal_426875);
					add_226498(call, LOC66);
				}
				LA21: ;
				res_426880 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(tnode225816*, callproc_425971)(tnode225816* a) {
	tnode225816* result;
	result = 0;
	result = newnodei_226138(((NU8) 27), (*a).Info);
	add_226498(result, a);
	asgnRefNoCycle((void**) (&(*result).Typ), (*(*a).Typ).Sons->data[0]);
	return result;
}

N_NIMCALL(tnode225816*, callcodegenproc_425906)(NimStringDesc* name, tnode225816* arg1, tnode225816* arg2, tnode225816* arg3) {
	tnode225816* result;
	tsym225846* sym;
	result = 0;
	result = newnodei_226138(((NU8) 27), (*arg1).Info);
	sym = getcompilerproc_282036(name);
	{
		if (!(sym == NIM_NIL)) goto LA3;
		localerror_197955((*arg1).Info, ((NU16) 64), name);
	}
	goto LA1;
	LA3: ;
	{
		tnode225816* LOC6;
		LOC6 = 0;
		LOC6 = newsymnode_226132(sym);
		add_226498(result, LOC6);
		add_226498(result, arg1);
		{
			if (!!((arg2 == NIM_NIL))) goto LA9;
			add_226498(result, arg2);
		}
		LA9: ;
		{
			if (!!((arg3 == NIM_NIL))) goto LA13;
			add_226498(result, arg3);
		}
		LA13: ;
		asgnRefNoCycle((void**) (&(*result).Typ), (*(*sym).Typ).Sons->data[0]);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, flowvarkind_426005)(ttype225852* t) {
	NU8 result;
	result = 0;
	{
		ttype225852* LOC3;
		LOC3 = 0;
		LOC3 = skiptypes_230245(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_263163(t);
		if (!LOC7) goto LA8;
		result = ((NU8) 0);
	}
	goto LA1;
	LA8: ;
	{
		result = ((NU8) 2);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym225846*, createwrapperproc_426177)(tnode225816* f, tsym225846* threadparam, tsym225846* argsparam, tnode225816* varsection, tnode225816* varinit, tnode225816* call, tnode225816* barrier, tnode225816* fv, NU8 spawnkind) {
	tsym225846* result;
	tnode225816* body;
	tsym225846* threadlocalbarrier;
	tsym225846* threadlocalprom;
	tnode225816* LOC29;
	tnode225816* LOC30;
	tnode225816* params;
	tnode225816* LOC75;
	tnode225816* LOC76;
	ttype225852* t;
	tnode225816* LOC77;
	tnode225816* LOC78;
	tnode225816* LOC79;
	NimStringDesc* name;
	NimStringDesc* LOC80;
	NimStringDesc* LOC81;
	tident200021* LOC87;
	tnode225816* LOC88;
	result = 0;
	body = newnodei_226138(((NU8) 115), (*f).Info);
	threadlocalbarrier = 0;
	{
		tnode225816* varsection2;
		tnode225816* LOC5;
		tnode225816* LOC6;
		if (!!((barrier == NIM_NIL))) goto LA3;
		varsection2 = newnodei_226138(((NU8) 99), (*barrier).Info);
		threadlocalbarrier = addlocalvar_426029(varsection2, NIM_NIL, (*argsparam).Owner, (*barrier).Typ, barrier, NIM_FALSE);
		add_226498(body, varsection2);
		LOC5 = 0;
		LOC5 = newsymnode_226132(threadlocalbarrier);
		LOC6 = 0;
		LOC6 = callcodegenproc_425906(((NimStringDesc*) &TMP3845), LOC5, NIM_NIL, NIM_NIL);
		add_226498(body, LOC6);
	}
	LA3: ;
	threadlocalprom = 0;
	{
		if (!(spawnkind == ((NU8) 2))) goto LA9;
		threadlocalprom = addlocalvar_426029(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_198126(TMP3846);
			internalerror_198006(LOC18);
		}
		LA16: ;
		threadlocalprom = addlocalvar_426029(varsection, NIM_NIL, (*argsparam).Owner, (*fv).Typ, fv, NIM_FALSE);
	}
	goto LA7;
	LA12: ;
	LA7: ;
	add_226498(body, varsection);
	add_226498(body, varinit);
	{
		NIM_BOOL LOC21;
		tnode225816* LOC25;
		tnode225816* LOC26;
		tnode225816* LOC27;
		tnode225816* LOC28;
		LOC21 = 0;
		LOC21 = !((fv == NIM_NIL));
		if (!(LOC21)) goto LA22;
		LOC21 = !((spawnkind == ((NU8) 2)));
		LA22: ;
		if (!LOC21) goto LA23;
		LOC25 = 0;
		LOC25 = newsymnode_226132(threadlocalprom);
		LOC26 = 0;
		LOC26 = indirectaccess_425207(LOC25, ((NimStringDesc*) &TMP3847), (*fv).Info);
		LOC27 = 0;
		LOC27 = newsymnode_226132(threadparam);
		LOC28 = 0;
		LOC28 = newasgnstmt_424106(LOC26, LOC27);
		add_226498(body, LOC28);
	}
	LA23: ;
	LOC29 = 0;
	LOC29 = newsymnode_226132(threadparam);
	LOC30 = 0;
	LOC30 = callcodegenproc_425906(((NimStringDesc*) &TMP3848), LOC29, NIM_NIL, NIM_NIL);
	add_226498(body, LOC30);
	{
		tnode225816* LOC35;
		tnode225816* LOC36;
		tnode225816* LOC37;
		if (!(spawnkind == ((NU8) 2))) goto LA33;
		LOC35 = 0;
		LOC35 = newsymnode_226132(threadlocalprom);
		LOC36 = 0;
		LOC36 = genderef_425896(LOC35);
		LOC37 = 0;
		LOC37 = newasgnstmt_424106(LOC36, call);
		add_226498(body, LOC37);
	}
	goto LA31;
	LA33: ;
	{
		NU8 fk;
		tnode225816* LOC47;
		NimStringDesc* LOC48;
		tnode225816* LOC54;
		tnode225816* LOC55;
		if (!!((fv == NIM_NIL))) goto LA39;
		fk = flowvarkind_426005((*(*fv).Typ).Sons->data[1]);
		{
			NimStringDesc* LOC45;
			NimStringDesc* LOC46;
			if (!(fk == ((NU8) 0))) goto LA43;
			LOC45 = 0;
			LOC46 = 0;
			LOC46 = typetostring_263031((*(*fv).Typ).Sons->data[1], ((NU8) 0));
			LOC45 = rawNewString(LOC46->Sup.len + 33);
appendString(LOC45, ((NimStringDesc*) &TMP3849));
appendString(LOC45, LOC46);
			localerror_197966((*f).Info, LOC45);
		}
		LA43: ;
		LOC47 = 0;
		LOC47 = newsymnode_226132(threadlocalprom);
		LOC48 = 0;
		{
			if (!(fk == ((NU8) 1))) goto LA51;
			LOC48 = copyString(((NimStringDesc*) &TMP3850));
		}
		goto LA49;
		LA51: ;
		{
			LOC48 = copyString(((NimStringDesc*) &TMP3851));
		}
		LA49: ;
		LOC54 = 0;
		LOC54 = indirectaccess_425207(LOC47, LOC48, (*fv).Info);
		LOC55 = 0;
		LOC55 = newasgnstmt_424106(LOC54, call);
		add_226498(body, LOC55);
		{
			tnode225816* increfcall;
			tsym225846* LOC60;
			tnode225816* LOC61;
			if (!(fk == ((NU8) 1))) goto LA58;
			increfcall = newnodei_228007(((NU8) 27), (*fv).Info, 2);
			LOC60 = 0;
			LOC60 = createmagic_368405(((NimStringDesc*) &TMP3852), ((NU16) 35));
			asgnRefNoCycle((void**) (&(*increfcall).kindU.S6.Sons->data[0]), newsymnode_226132(LOC60));
			LOC61 = 0;
			LOC61 = newsymnode_226132(threadlocalprom);
			asgnRefNoCycle((void**) (&(*increfcall).kindU.S6.Sons->data[1]), indirectaccess_425207(LOC61, ((NimStringDesc*) &TMP3850), (*fv).Info));
			add_226498(body, increfcall);
		}
		LA58: ;
		{
			tnode225816* LOC66;
			tnode225816* LOC67;
			if (!(barrier == NIM_NIL)) goto LA64;
			LOC66 = 0;
			LOC66 = newsymnode_226132(threadlocalprom);
			LOC67 = 0;
			LOC67 = callcodegenproc_425906(((NimStringDesc*) &TMP3853), LOC66, NIM_NIL, NIM_NIL);
			add_226498(body, LOC67);
		}
		LA64: ;
	}
	goto LA31;
	LA39: ;
	{
		add_226498(body, call);
	}
	LA31: ;
	{
		tnode225816* LOC73;
		tnode225816* LOC74;
		if (!!((barrier == NIM_NIL))) goto LA71;
		LOC73 = 0;
		LOC73 = newsymnode_226132(threadlocalbarrier);
		LOC74 = 0;
		LOC74 = callcodegenproc_425906(((NimStringDesc*) &TMP3854), LOC73, NIM_NIL, NIM_NIL);
		add_226498(body, LOC74);
	}
	LA71: ;
	params = newnodei_226138(((NU8) 76), (*f).Info);
	add_226498(params, emptynode_226738);
	LOC75 = 0;
	LOC75 = newsymnode_226132(threadparam);
	add_226498(params, LOC75);
	LOC76 = 0;
	LOC76 = newsymnode_226132(argsparam);
	add_226498(params, LOC76);
	t = newtype_226083(((NU8) 25), (*threadparam).Owner);
	rawaddson_230562(t, NIM_NIL);
	rawaddson_230562(t, (*threadparam).Typ);
	rawaddson_230562(t, (*argsparam).Typ);
	asgnRefNoCycle((void**) (&(*t).N), newnodei_226138(((NU8) 76), (*f).Info));
	LOC77 = 0;
	LOC77 = newnodei_226138(((NU8) 151), (*f).Info);
	add_226498((*t).N, LOC77);
	LOC78 = 0;
	LOC78 = newsymnode_226132(threadparam);
	add_226498((*t).N, LOC78);
	LOC79 = 0;
	LOC79 = newsymnode_226132(argsparam);
	add_226498((*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*) &TMP2815));
	}
	LA82: ;
	LOC80 = rawNewString(LOC81->Sup.len + 7);
appendString(LOC80, LOC81);
appendString(LOC80, ((NimStringDesc*) &TMP3855));
	name = LOC80;
	LOC87 = 0;
	LOC87 = getident_200472(name);
	result = newsym_226074(((NU8) 12), LOC87, (*argsparam).Owner, (*f).Info);
	LOC88 = 0;
	LOC88 = newsymnode_226132(result);
	asgnRefNoCycle((void**) (&(*result).Ast), newprocnode_228432(((NU8) 79), (*f).Info, body, params, LOC88, emptynode_226738, emptynode_226738, emptynode_226738, emptynode_226738));
	asgnRefNoCycle((void**) (&(*result).Typ), t);
	return result;
}

N_NIMCALL(tnode225816*, wrapprocforspawn_426897)(tsym225846* owner, tnode225816* spawnexpr, ttype225852* rettype, tnode225816* barrier, tnode225816* dest) {
	tnode225816* result;
	tnode225816* n;
	NU8 spawnkind;
	tsym225846* threadparam;
	tident200021* LOC31;
	tsym225846* argsparam;
	tident200021* LOC32;
	ttype225852* objtype;
	tnode225816* castexpr;
	tsym225846* scratchobj;
	tident200021* LOC34;
	tnode225816* call;
	tnode225816* fn;
	tnode225816* varsection;
	tnode225816* varinit;
	tnode225816* barrierasexpr;
	tnode225816* fvfield;
	tnode225816* fvasexpr;
	tsym225846* wrapper;
	tnode225816* LOC89;
	tnode225816* LOC90;
	tnode225816* LOC91;
	tnode225816* LOC92;
	result = 0;
	n = HEX5BHEX5D_226698(spawnexpr, 1);
	spawnkind = spawnresult_425994(rettype, !((barrier == NIM_NIL)));
	switch (spawnkind) {
	case ((NU8) 0):
	{
		{
			NimStringDesc* LOC6;
			if (!!((dest == NIM_NIL))) goto LA4;
			LOC6 = 0;
			LOC6 = HEX24_198126(TMP3826);
			internalerror_198006(LOC6);
		}
		LA4: ;
		result = newnodei_226138(((NU8) 115), (*n).Info);
	}
	break;
	case ((NU8) 1):
	{
		{
			NimStringDesc* LOC12;
			if (!!((dest == NIM_NIL))) goto LA10;
			LOC12 = 0;
			LOC12 = HEX24_198126(TMP3827);
			internalerror_198006(LOC12);
		}
		LA10: ;
		result = newnodeit_226145(((NU8) 126), (*n).Info, rettype);
	}
	break;
	case ((NU8) 2):
	{
		{
			if (!(dest == NIM_NIL)) goto LA16;
			localerror_197966((*n).Info, ((NimStringDesc*) &TMP3828));
		}
		LA16: ;
		result = newnodei_226138(((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_197966((*n).Info, ((NimStringDesc*) &TMP3829));
		goto BeforeRet;
	}
	LA20: ;
	{
		if (!((gglobaloptions_169118 &(1<<((((NU8) 27))&31)))!=0)) goto LA24;
		{
			tnode225816* LOC28;
			LOC28 = 0;
			LOC28 = HEX5BHEX5D_226698(n, 0);
			if (!((130 & (*(*LOC28).Typ).Flags) == 0)) goto LA29;
			localerror_197966((*n).Info, ((NimStringDesc*) &TMP3830));
		}
		LA29: ;
	}
	LA24: ;
	LOC31 = 0;
	LOC31 = getident_200472(((NimStringDesc*) &TMP3831));
	threadparam = newsym_226074(((NU8) 3), LOC31, owner, (*n).Info);
	LOC32 = 0;
	LOC32 = getident_200472(((NimStringDesc*) &TMP3832));
	argsparam = newsym_226074(((NU8) 3), LOC32, owner, (*n).Info);
	{
		ttype225852* ptrtype;
		ptrtype = getsystype_282030(((NU8) 26));
		asgnRefNoCycle((void**) (&(*threadparam).Typ), ptrtype);
		asgnRefNoCycle((void**) (&(*argsparam).Typ), ptrtype);
		(*argsparam).Position = 1;
	}
	objtype = createobj_424304(owner, (*n).Info);
	(*objtype).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	castexpr = createcastexpr_426438(argsparam, objtype);
	LOC34 = 0;
	LOC34 = getident_200472(((NimStringDesc*) &TMP3833));
	scratchobj = newsym_226074(((NU8) 8), LOC34, owner, (*n).Info);
	{
		tnode225816* varsectionb;
		tnode225816* LOC36;
		asgnRefNoCycle((void**) (&(*scratchobj).Typ), objtype);
		(*scratchobj).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
		varsectionb = newnodei_226138(((NU8) 99), (*n).Info);
		LOC36 = 0;
		LOC36 = newsymnode_226132(scratchobj);
		addvar_424053(varsectionb, LOC36);
		add_226498(result, varsectionb);
	}
	call = newnodeit_226145(((NU8) 27), (*n).Info, (*n).Typ);
	fn = (*n).kindU.S6.Sons->data[0];
	{
		NIM_BOOL LOC39;
		ttype225852* argtype;
		tnode225816* LOC43;
		tsym225846* field;
		tident200021* LOC44;
		tnode225816* LOC45;
		tnode225816* LOC46;
		tnode225816* 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_226698(n, 0);
		argtype = skiptypes_230245((*LOC43).Typ, IL64(211106232576256));
		LOC44 = 0;
		LOC44 = getident_200472(((NimStringDesc*) &TMP3834));
		field = newsym_226074(((NU8) 19), LOC44, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), argtype);
		addfield_424608(objtype, field);
		LOC45 = 0;
		LOC45 = newdotexpr_425007(scratchobj, field);
		LOC46 = 0;
		LOC46 = HEX5BHEX5D_226698(n, 0);
		LOC47 = 0;
		LOC47 = newfastasgnstmt_424145(LOC45, LOC46);
		add_226498(result, LOC47);
		fn = indirectaccess_425848(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_197966((*n).Info, ((NimStringDesc*) &TMP3835));
	}
	goto LA37;
	LA51: ;
	{
		if (!((*(*fn).Typ).Callconv == ((NU8) 8))) goto LA54;
		localerror_197966((*n).Info, ((NimStringDesc*) &TMP3836));
	}
	goto LA37;
	LA54: ;
	LA37: ;
	add_226498(call, fn);
	varsection = newnodei_226138(((NU8) 99), (*n).Info);
	varinit = newnodei_226138(((NU8) 115), (*n).Info);
	{
		if (!barrier == 0) goto LA58;
		setupargsforconcurrency_426449(n, objtype, scratchobj, castexpr, call, varsection, varinit, result);
	}
	goto LA56;
	LA58: ;
	{
		setupargsforparallelism_426698(n, objtype, scratchobj, castexpr, call, varsection, varinit, result);
	}
	LA56: ;
	barrierasexpr = NIM_NIL;
	{
		ttype225852* typ;
		tsym225846* LOC65;
		tsym225846* field;
		tident200021* LOC66;
		tnode225816* LOC67;
		tnode225816* LOC68;
		if (!!((barrier == NIM_NIL))) goto LA63;
		typ = newtype_226083(((NU8) 21), owner);
		LOC65 = 0;
		LOC65 = getcompilerproc_282036(((NimStringDesc*) &TMP3841));
		rawaddson_230562(typ, (*LOC65).Typ);
		LOC66 = 0;
		LOC66 = getident_200472(((NimStringDesc*) &TMP3842));
		field = newsym_226074(((NU8) 19), LOC66, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), typ);
		addfield_424608(objtype, field);
		LOC67 = 0;
		LOC67 = newdotexpr_425007(scratchobj, field);
		LOC68 = 0;
		LOC68 = newfastasgnstmt_424145(LOC67, barrier);
		add_226498(result, LOC68);
		barrierasexpr = indirectaccess_425848(castexpr, field, (*n).Info);
	}
	LA63: ;
	fvfield = NIM_NIL;
	fvasexpr = NIM_NIL;
	{
		tsym225846* field;
		tident200021* LOC73;
		tnode225816* LOC74;
		tnode225816* LOC75;
		tnode225816* LOC76;
		if (!(spawnkind == ((NU8) 1))) goto LA71;
		LOC73 = 0;
		LOC73 = getident_200472(((NimStringDesc*) &TMP3843));
		field = newsym_226074(((NU8) 19), LOC73, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), rettype);
		addfield_424608(objtype, field);
		fvfield = newdotexpr_425007(scratchobj, field);
		fvasexpr = indirectaccess_425848(castexpr, field, (*n).Info);
		LOC74 = 0;
		LOC74 = HEX5BHEX5D_226698(spawnexpr, 2);
		LOC75 = 0;
		LOC75 = callproc_425971(LOC74);
		LOC76 = 0;
		LOC76 = newfastasgnstmt_424145(fvfield, LOC75);
		add_226498(result, LOC76);
		{
			tnode225816* LOC81;
			if (!(barrier == NIM_NIL)) goto LA79;
			LOC81 = 0;
			LOC81 = callcodegenproc_425906(((NimStringDesc*) &TMP3844), fvfield, NIM_NIL, NIM_NIL);
			add_226498(result, LOC81);
		}
		LA79: ;
	}
	goto LA69;
	LA71: ;
	{
		tsym225846* field;
		tident200021* LOC85;
		tnode225816* LOC86;
		tnode225816* LOC87;
		tnode225816* LOC88;
		if (!(spawnkind == ((NU8) 2))) goto LA83;
		LOC85 = 0;
		LOC85 = getident_200472(((NimStringDesc*) &TMP3843));
		field = newsym_226074(((NU8) 19), LOC85, owner, (*n).Info);
		asgnRefNoCycle((void**) (&(*field).Typ), newtype_226083(((NU8) 21), (*objtype).Owner));
		rawaddson_230562((*field).Typ, rettype);
		addfield_424608(objtype, field);
		fvasexpr = indirectaccess_425848(castexpr, field, (*n).Info);
		LOC86 = 0;
		LOC86 = newdotexpr_425007(scratchobj, field);
		LOC87 = 0;
		LOC87 = genaddrof_425872(dest);
		LOC88 = 0;
		LOC88 = newfastasgnstmt_424145(LOC86, LOC87);
		add_226498(result, LOC88);
	}
	goto LA69;
	LA83: ;
	LA69: ;
	wrapper = createwrapperproc_426177(fn, threadparam, argsparam, varsection, varinit, call, barrierasexpr, fvasexpr, spawnkind);
	LOC89 = 0;
	LOC89 = newsymnode_226132(wrapper);
	LOC90 = 0;
	LOC90 = newsymnode_226132(scratchobj);
	LOC91 = 0;
	LOC91 = genaddrof_425872(LOC90);
	LOC92 = 0;
	LOC92 = callcodegenproc_425906(((NimStringDesc*) &TMP3856), LOC89, LOC91, NIM_NIL);
	add_226498(result, LOC92);
	{
		if (!(spawnkind == ((NU8) 1))) goto LA95;
		add_226498(result, fvfield);
	}
	LA95: ;
	BeforeRet: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_loweringsInit)(void) {
}

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

