/* 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 NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tnode224816 tnode224816;
typedef struct ttype224852 ttype224852;
typedef struct tlineinfo194539 tlineinfo194539;
typedef struct tsym224846 tsym224846;
typedef struct tident199021 tident199021;
typedef struct tnodeseq224810 tnodeseq224810;
typedef struct tidobj199015 tidobj199015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TY118808 TY118808;
typedef struct ttypeseq224848 ttypeseq224848;
typedef struct tscope224840 tscope224840;
typedef struct TY224947 TY224947;
typedef struct tinstantiation224836 tinstantiation224836;
typedef struct tstrtable224820 tstrtable224820;
typedef struct tsymseq224818 tsymseq224818;
typedef struct tloc224830 tloc224830;
typedef struct trope176009 trope176009;
typedef struct tlib224834 tlib224834;
typedef struct tcell44935 tcell44935;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcstat47014 tgcstat47014;
typedef struct TY224936 TY224936;
typedef struct tlistentry126022 tlistentry126022;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlineinfo194539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tnode224816  {
ttype224852* Typ;
tlineinfo194539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym224846* Sym;
} S4;
struct {tident199021* Ident;
} S5;
struct {tnodeseq224810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tidobj199015  {
  TNimObject Sup;
NI Id;
};
struct  tident199021  {
  tidobj199015 Sup;
NimStringDesc* S;
tident199021* Next;
NI H;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tstrtable224820  {
NI Counter;
tsymseq224818* Data;
};
struct  tloc224830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype224852* T;
trope176009* R;
trope176009* Heaproot;
};
struct  tsym224846  {
  tidobj199015 Sup;
NU8 Kind;
union {
struct {ttypeseq224848* Typeinstcache;
tscope224840* Typscope;
} S1;
struct {TY224947* Procinstcache;
tscope224840* Scope;
} S2;
struct {TY224947* Usedgenerics;
tstrtable224820 Tab;
} S3;
struct {tsym224846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype224852* Typ;
tident199021* Name;
tlineinfo194539 Info;
tsym224846* Owner;
NU32 Flags;
tnode224816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc224830 Loc;
tlib224834* Annex;
tnode224816* Constraint;
};
struct  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  ttype224852  {
  tidobj199015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq224848* Sons;
tnode224816* N;
tsym224846* Owner;
tsym224846* Sym;
tsym224846* Destructor;
tsym224846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc224830 Loc;
};
struct  tscope224840  {
NI Depthlevel;
tstrtable224820 Symbols;
tnodeseq224810* Usingsyms;
tscope224840* Parent;
};
struct  tinstantiation224836  {
tsym224846* Sym;
ttypeseq224848* Concretetypes;
TY224936* Usedby;
};
struct  trope176009  {
  TNimObject Sup;
trope176009* Left;
trope176009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry126022  {
  TNimObject Sup;
tlistentry126022* Prev;
tlistentry126022* Next;
};
struct  tlib224834  {
  tlistentry126022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope176009* Name;
tnode224816* Path;
};
typedef NI TY26420[8];
struct  tpagedesc44943  {
tpagedesc44943* Next;
NI Key;
TY26420 Bits;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct tnodeseq224810 {
  TGenericSeq Sup;
  tnode224816* data[SEQ_DECL_SIZE];
};
struct TY118808 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct ttypeseq224848 {
  TGenericSeq Sup;
  ttype224852* data[SEQ_DECL_SIZE];
};
struct TY224947 {
  TGenericSeq Sup;
  tinstantiation224836* data[SEQ_DECL_SIZE];
};
struct tsymseq224818 {
  TGenericSeq Sup;
  tsym224846* data[SEQ_DECL_SIZE];
};
struct TY224936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(NI, len_225364)(tnode224816* n);
N_NIMCALL(NimStringDesc*, renderplainsymbolname_396013)(tnode224816* n);
static N_INLINE(tnode224816*, HEX5BHEX5D_225698)(tnode224816* n, NI i);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, renderdefinitionname_249134)(tsym224846* s, NIM_BOOL noquotes);
N_NIMCALL(void, internalerror_196987)(tlineinfo194539 info, NimStringDesc* errmsg);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_80907, TNimType* typ);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, renderparamtypes_398467)(TY118808** found, tnode224816* n);
N_NIMCALL(NimStringDesc*, rendertype_396222)(tnode224816* n);
N_NIMCALL(NimStringDesc*, typetostring_262031)(ttype224852* typ, NU8 prefer);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a, NI aLen0, NimStringDesc* sep);
STRING_LITERAL(TMP4662, "", 0);
STRING_LITERAL(TMP4663, "*", 1);
STRING_LITERAL(TMP4664, "renderPlainSymbolName() with ", 29);
STRING_LITERAL(TMP4671, "ref.", 4);
STRING_LITERAL(TMP4672, "ptr.", 4);
STRING_LITERAL(TMP4673, "proc(", 5);
STRING_LITERAL(TMP4674, "tuple[", 6);
STRING_LITERAL(TMP4675, "renderParamTypes(found,n) with ", 31);
extern TNimType NTI224029; /* TNodeKind */
extern TNimType NTI118808; /* seq[string] */
extern tgcheap47016 gch_47044;

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

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

static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NIM_BOOL LOC11;
	int LOC13;
	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == NIM_NIL);
		if (LOC7) goto LA8;
		LOC7 = (b == NIM_NIL);
		LA8: ;
		if (!LOC7) goto LA9;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA9: ;
	LOC11 = 0;
	LOC11 = ((*a).Sup.len == (*b).Sup.len);
	if (!(LOC11)) goto LA12;
	LOC13 = 0;
	LOC13 = memcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)), (NI64)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(NimStringDesc*, renderplainsymbolname_396013)(tnode224816* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP4662));
	switch ((*n).Kind) {
	case ((NU8) 31):
	{
		{
			NI i_396038;
			NI HEX3Atmp_396202;
			NI LOC3;
			NI res_396205;
			i_396038 = 0;
			HEX3Atmp_396202 = 0;
			LOC3 = 0;
			LOC3 = len_225364(n);
			HEX3Atmp_396202 = (LOC3 - 1);
			res_396205 = 0;
			{
				while (1) {
					NI LOC6;
					tnode224816* LOC7;
					if (!(res_396205 <= HEX3Atmp_396202)) goto LA5;
					i_396038 = res_396205;
					LOC6 = 0;
					LOC6 = len_225364(n);
					LOC7 = 0;
					LOC7 = HEX5BHEX5D_225698(n, (LOC6 - 1));
					result = renderplainsymbolname_396013(LOC7);
					{
						if (!(0 < result->Sup.len)) goto LA10;
						goto BeforeRet;
					}
					LA10: ;
					res_396205 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 2):
	{
		{
			if (!!(eqStrings((*(*n).kindU.S5.Ident).S, ((NimStringDesc*) &TMP4663)))) goto LA15;
			result = copyString((*(*n).kindU.S5.Ident).S);
		}
		LA15: ;
	}
	break;
	case ((NU8) 3):
	{
		result = renderdefinitionname_249134((*n).kindU.S4.Sym, NIM_TRUE);
	}
	break;
	case ((NU8) 43):
	{
		tnode224816* LOC19;
		LOC19 = 0;
		LOC19 = HEX5BHEX5D_225698(n, 0);
		result = renderplainsymbolname_396013(LOC19);
	}
	break;
	case ((NU8) 53):
	{
		NI LOC21;
		tnode224816* LOC22;
		LOC21 = 0;
		LOC21 = len_225364(n);
		LOC22 = 0;
		LOC22 = HEX5BHEX5D_225698(n, (LOC21 - 1));
		result = renderplainsymbolname_396013(LOC22);
	}
	break;
	default:
	{
		NimStringDesc* LOC24;
		LOC24 = 0;
		LOC24 = rawNewString(reprEnum((*n).Kind, (&NTI224029))->Sup.len + 29);
appendString(LOC24, ((NimStringDesc*) &TMP4664));
appendString(LOC24, reprEnum((*n).Kind, (&NTI224029)));
		internalerror_196987((*n).Info, LOC24);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c) {
	(*dest).data[((*dest).Sup.len)- 0] = c;
	(*dest).data[((NI64)((*dest).Sup.len + 1))- 0] = 0;
	(*dest).Sup.len += 1;
}

N_NIMCALL(NimStringDesc*, rendertype_396222)(tnode224816* n) {
	NimStringDesc* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		result = copyString((*(*n).kindU.S5.Ident).S);
	}
	break;
	case ((NU8) 3):
	{
		result = typetostring_262031((*(*n).kindU.S4.Sym).Typ, ((NU8) 0));
	}
	break;
	case ((NU8) 142):
	{
		tnode224816* LOC4;
		LOC4 = 0;
		LOC4 = HEX5BHEX5D_225698(n, 0);
		result = rendertype_396222(LOC4);
	}
	break;
	case ((NU8) 140):
	{
		NimStringDesc* LOC6;
		tnode224816* LOC7;
		NimStringDesc* LOC8;
		LOC6 = 0;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_225698(n, 0);
		LOC8 = 0;
		LOC8 = rendertype_396222(LOC7);
		LOC6 = rawNewString(LOC8->Sup.len + 4);
appendString(LOC6, ((NimStringDesc*) &TMP4671));
appendString(LOC6, LOC8);
		result = LOC6;
	}
	break;
	case ((NU8) 141):
	{
		NimStringDesc* LOC10;
		tnode224816* LOC11;
		NimStringDesc* LOC12;
		LOC10 = 0;
		LOC11 = 0;
		LOC11 = HEX5BHEX5D_225698(n, 0);
		LOC12 = 0;
		LOC12 = rendertype_396222(LOC11);
		LOC10 = rawNewString(LOC12->Sup.len + 4);
appendString(LOC10, ((NimStringDesc*) &TMP4672));
appendString(LOC10, LOC12);
		result = LOC10;
	}
	break;
	case ((NU8) 146):
	{
		tnode224816* params;
		params = HEX5BHEX5D_225698(n, 0);
		result = copyString(((NimStringDesc*) &TMP4673));
		{
			NI i_397422;
			NI HEX3Atmp_398402;
			NI LOC15;
			NI res_398405;
			i_397422 = 0;
			HEX3Atmp_398402 = 0;
			LOC15 = 0;
			LOC15 = len_225364(params);
			HEX3Atmp_398402 = (LOC15 - 1);
			res_398405 = 1;
			{
				while (1) {
					NimStringDesc* LOC18;
					tnode224816* LOC19;
					NimStringDesc* LOC20;
					if (!(res_398405 <= HEX3Atmp_398402)) goto LA17;
					i_397422 = res_398405;
					LOC18 = 0;
					LOC19 = 0;
					LOC19 = HEX5BHEX5D_225698(params, i_397422);
					LOC20 = 0;
					LOC20 = rendertype_396222(LOC19);
					LOC18 = rawNewString(LOC20->Sup.len + 1);
appendString(LOC18, LOC20);
appendChar(LOC18, 44);
					result = resizeString(result, LOC18->Sup.len + 0);
appendString(result, LOC18);
					res_398405 += 1;
				} LA17: ;
			}
		}
		result->data[(result->Sup.len - 1)] = 41;
	}
	break;
	case ((NU8) 35):
	{
		NI typepos;
		NI LOC22;
		NimStringDesc* typestr;
		tnode224816* LOC23;
		LOC22 = 0;
		LOC22 = len_225364(n);
		typepos = (NI64)(LOC22 - 2);
		LOC23 = 0;
		LOC23 = HEX5BHEX5D_225698(n, typepos);
		typestr = rendertype_396222(LOC23);
		result = copyString(typestr);
		{
			NI i_397624;
			NI HEX3Atmp_398408;
			NI res_398411;
			i_397624 = 0;
			HEX3Atmp_398408 = 0;
			HEX3Atmp_398408 = (typepos - 1);
			res_398411 = 1;
			{
				while (1) {
					NimStringDesc* LOC27;
					if (!(res_398411 <= HEX3Atmp_398408)) goto LA26;
					i_397624 = res_398411;
					LOC27 = 0;
					LOC27 = rawNewString(typestr->Sup.len + 1);
appendChar(LOC27, 44);
appendString(LOC27, typestr);
					result = resizeString(result, LOC27->Sup.len + 0);
appendString(result, LOC27);
					res_398411 += 1;
				} LA26: ;
			}
		}
	}
	break;
	case ((NU8) 134):
	{
		result = copyString(((NimStringDesc*) &TMP4674));
		{
			NI i_398022;
			NI HEX3Atmp_398414;
			NI LOC30;
			NI res_398417;
			i_398022 = 0;
			HEX3Atmp_398414 = 0;
			LOC30 = 0;
			LOC30 = len_225364(n);
			HEX3Atmp_398414 = (LOC30 - 1);
			res_398417 = 0;
			{
				while (1) {
					NimStringDesc* LOC33;
					tnode224816* LOC34;
					NimStringDesc* LOC35;
					if (!(res_398417 <= HEX3Atmp_398414)) goto LA32;
					i_398022 = res_398417;
					LOC33 = 0;
					LOC34 = 0;
					LOC34 = HEX5BHEX5D_225698(n, i_398022);
					LOC35 = 0;
					LOC35 = rendertype_396222(LOC34);
					LOC33 = rawNewString(LOC35->Sup.len + 1);
appendString(LOC33, LOC35);
appendChar(LOC33, 44);
					result = resizeString(result, LOC33->Sup.len + 0);
appendString(result, LOC33);
					res_398417 += 1;
				} LA32: ;
			}
		}
		result->data[(result->Sup.len - 1)] = 93;
	}
	break;
	case ((NU8) 42):
	{
		NimStringDesc* LOC37;
		tnode224816* LOC38;
		NimStringDesc* LOC39;
		LOC37 = 0;
		LOC38 = 0;
		LOC38 = HEX5BHEX5D_225698(n, 0);
		LOC39 = 0;
		LOC39 = rendertype_396222(LOC38);
		LOC37 = rawNewString(LOC39->Sup.len + 1);
appendString(LOC37, LOC39);
appendChar(LOC37, 91);
		result = LOC37;
		{
			NI i_398222;
			NI HEX3Atmp_398420;
			NI LOC41;
			NI res_398423;
			i_398222 = 0;
			HEX3Atmp_398420 = 0;
			LOC41 = 0;
			LOC41 = len_225364(n);
			HEX3Atmp_398420 = (LOC41 - 1);
			res_398423 = 1;
			{
				while (1) {
					NimStringDesc* LOC44;
					tnode224816* LOC45;
					NimStringDesc* LOC46;
					if (!(res_398423 <= HEX3Atmp_398420)) goto LA43;
					i_398222 = res_398423;
					LOC44 = 0;
					LOC45 = 0;
					LOC45 = HEX5BHEX5D_225698(n, i_398222);
					LOC46 = 0;
					LOC46 = rendertype_396222(LOC45);
					LOC44 = rawNewString(LOC46->Sup.len + 1);
appendString(LOC44, LOC46);
appendChar(LOC44, 44);
					result = resizeString(result, LOC44->Sup.len + 0);
appendString(result, LOC44);
					res_398423 += 1;
				} LA43: ;
			}
		}
		result->data[(result->Sup.len - 1)] = 93;
	}
	break;
	default:
	{
		result = copyString(((NimStringDesc*) &TMP4662));
	}
	break;
	}
	return result;
}

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

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

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell44935* c;
	c = usrtocell_48646(p);
	{
		(*c).Refcount -= 8;
		if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA3;
		rtladdzct_50204(c);
	}
	LA3: ;
}

N_NIMCALL(void, renderparamtypes_398467)(TY118808** found, tnode224816* n) {
	switch ((*n).Kind) {
	case ((NU8) 76):
	{
		{
			NI i_398494;
			NI HEX3Atmp_398827;
			NI LOC3;
			NI res_398830;
			i_398494 = 0;
			HEX3Atmp_398827 = 0;
			LOC3 = 0;
			LOC3 = len_225364(n);
			HEX3Atmp_398827 = (LOC3 - 1);
			res_398830 = 1;
			{
				while (1) {
					tnode224816* LOC6;
					if (!(res_398830 <= HEX3Atmp_398827)) goto LA5;
					i_398494 = res_398830;
					LOC6 = 0;
					LOC6 = HEX5BHEX5D_225698(n, i_398494);
					renderparamtypes_398467(found, LOC6);
					res_398830 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 35):
	{
		NI typepos;
		NI LOC8;
		NimStringDesc* typestr;
		tnode224816* LOC9;
		LOC8 = 0;
		LOC8 = len_225364(n);
		typepos = (NI64)(LOC8 - 2);
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_225698(n, typepos);
		typestr = rendertype_396222(LOC9);
		{
			NIM_BOOL LOC12;
			tnode224816* LOC14;
			ttype224852* typ;
			tnode224816* LOC17;
			LOC12 = 0;
			LOC12 = (typestr->Sup.len < 1);
			if (!(LOC12)) goto LA13;
			LOC14 = 0;
			LOC14 = HEX5BHEX5D_225698(n, (NI64)(typepos + 1));
			LOC12 = !(((*LOC14).Kind == ((NU8) 1)));
			LA13: ;
			if (!LOC12) goto LA15;
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_225698(n, (NI64)(typepos + 1));
			typ = (*LOC17).Typ;
			{
				if (!!(typ == 0)) goto LA20;
				typestr = typetostring_262031(typ, ((NU8) 2));
			}
			LA20: ;
			{
				if (!(typestr->Sup.len < 1)) goto LA24;
				goto BeforeRet;
			}
			LA24: ;
		}
		LA15: ;
		{
			NI i_398646;
			NI HEX3Atmp_398833;
			NI res_398836;
			i_398646 = 0;
			HEX3Atmp_398833 = 0;
			HEX3Atmp_398833 = (typepos - 1);
			res_398836 = 0;
			{
				while (1) {
					NimStringDesc* LOC29;
					if (!(res_398836 <= HEX3Atmp_398833)) goto LA28;
					i_398646 = res_398836;
					(*found) = (TY118808*) incrSeq(&((*found))->Sup, sizeof(NimStringDesc*));
					LOC29 = 0;
					LOC29 = (*found)->data[(*found)->Sup.len-1]; (*found)->data[(*found)->Sup.len-1] = copyStringRC1(typestr);
					if (LOC29) nimGCunrefNoCycle(LOC29);
					res_398836 += 1;
				} LA28: ;
			}
		}
	}
	break;
	default:
	{
		NimStringDesc* LOC31;
		LOC31 = 0;
		LOC31 = rawNewString(reprEnum((*n).Kind, (&NTI224029))->Sup.len + 31);
appendString(LOC31, ((NimStringDesc*) &TMP4675));
appendString(LOC31, reprEnum((*n).Kind, (&NTI224029)));
		internalerror_196987((*n).Info, LOC31);
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(NimStringDesc*, renderparamtypes_398862)(tnode224816* n, NimStringDesc* sep) {
	NimStringDesc* result;
	TY118808* found;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP4662));
	found = (TY118808*) newSeq((&NTI118808), 0);
	renderparamtypes_398467((&found), n);
	{
		if (!(0 < found->Sup.len)) goto LA3;
		result = nsuJoinSep(found->data, found->Sup.len, sep);
	}
	LA3: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_typesrendererInit)(void) {
}

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

