/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/typesrenderer.o compiler/nimcache/typesrenderer.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tnode188803 tnode188803;
typedef struct ttype188837 ttype188837;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct tsym188833 tsym188833;
typedef struct tident167019 tident167019;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct tidobj167013 tidobj167013;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TY110805 TY110805;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tlib188821 tlib188821;
typedef struct tcell41090 tcell41090;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct TY188922 TY188922;
typedef struct tlistentry118017 tlistentry118017;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tnode188803  {
ttype188837* Typ;
tlineinfo163527 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym188833* Sym;
} S4;
struct {tident167019* Ident;
} S5;
struct {tnodeseq188797* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct TY110805 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(NI, len_189264)(tnode188803* n);
N_NIMCALL(NimStringDesc*, renderplainsymbolname_338007)(tnode188803* n);
static N_INLINE(tnode188803*, HEX5BHEX5D_189694)(tnode188803* n, NI i);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, renderdefinitionname_211118)(tsym188833* s, NIM_BOOL noquotes);
N_NIMCALL(void, internalerror_165591)(tlineinfo163527 info, NimStringDesc* errmsg);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_75880, TNimType* typ);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, renderparamtypes_340423)(TY110805** found, tnode188803* n);
N_NIMCALL(NimStringDesc*, rendertype_338208)(tnode188803* n);
N_NIMCALL(NimStringDesc*, typetostring_223020)(ttype188837* 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(tcell41090*, usrtocell_44443)(void* usr);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a, NI aLen0, NimStringDesc* sep);
STRING_LITERAL(TMP4361, "", 0);
STRING_LITERAL(TMP4362, "*", 1);
STRING_LITERAL(TMP4363, "renderPlainSymbolName() with ", 29);
STRING_LITERAL(TMP4370, "ref.", 4);
STRING_LITERAL(TMP4371, "ptr.", 4);
STRING_LITERAL(TMP4372, "proc(", 5);
STRING_LITERAL(TMP4373, "tuple[", 6);
STRING_LITERAL(TMP4374, "renderParamTypes(found,n) with ", 31);
extern TNimType NTI188023; /* TNodeKind */
extern TNimType NTI110805; /* seq[string] */
extern tgcheap43016 gch_43044;

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

static N_INLINE(tnode188803*, HEX5BHEX5D_189694)(tnode188803* n, NI i) {
	tnode188803* 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)), (NI32)((*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)), (NI32)((*src).Sup.len + 1));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(NimStringDesc*, renderplainsymbolname_338007)(tnode188803* n) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP4361));
	switch ((*n).Kind) {
	case ((NU8) 31):
	{
		NI i_338032;
		NI HEX3Atmp_338201;
		NI LOC2;
		NI res_338203;
		i_338032 = 0;
		HEX3Atmp_338201 = 0;
		LOC2 = 0;
		LOC2 = len_189264(n);
		HEX3Atmp_338201 = LOC2 - 1;
		res_338203 = 0;
		while (1) {
			NI LOC4;
			tnode188803* LOC5;
			if (!(res_338203 <= HEX3Atmp_338201)) goto LA3;
			i_338032 = res_338203;
			LOC4 = 0;
			LOC4 = len_189264(n);
			LOC5 = 0;
			LOC5 = HEX5BHEX5D_189694(n, LOC4 - 1);
			result = renderplainsymbolname_338007(LOC5);
			{
				if (!(0 < result->Sup.len)) goto LA8;
				goto BeforeRet;
			}
			LA8: ;
			res_338203 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 2):
	{
		{
			if (!!(eqStrings((*(*n).kindU.S5.Ident).S, ((NimStringDesc*) &TMP4362)))) goto LA13;
			result = copyString((*(*n).kindU.S5.Ident).S);
		}
		LA13: ;
	}
	break;
	case ((NU8) 3):
	{
		result = renderdefinitionname_211118((*n).kindU.S4.Sym, NIM_TRUE);
	}
	break;
	case ((NU8) 43):
	{
		tnode188803* LOC17;
		LOC17 = 0;
		LOC17 = HEX5BHEX5D_189694(n, 0);
		result = renderplainsymbolname_338007(LOC17);
	}
	break;
	case ((NU8) 53):
	{
		NI LOC19;
		tnode188803* LOC20;
		LOC19 = 0;
		LOC19 = len_189264(n);
		LOC20 = 0;
		LOC20 = HEX5BHEX5D_189694(n, LOC19 - 1);
		result = renderplainsymbolname_338007(LOC20);
	}
	break;
	default:
	{
		NimStringDesc* LOC22;
		LOC22 = 0;
		LOC22 = rawNewString(reprEnum((*n).Kind, (&NTI188023))->Sup.len + 29);
appendString(LOC22, ((NimStringDesc*) &TMP4363));
appendString(LOC22, reprEnum((*n).Kind, (&NTI188023)));
		internalerror_165591((*n).Info, LOC22);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(NimStringDesc*, rendertype_338208)(tnode188803* n) {
	NimStringDesc* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		result = copyString((*(*n).kindU.S5.Ident).S);
	}
	break;
	case ((NU8) 3):
	{
		result = typetostring_223020((*(*n).kindU.S4.Sym).Typ, ((NU8) 0));
	}
	break;
	case ((NU8) 141):
	{
		tnode188803* LOC4;
		LOC4 = 0;
		LOC4 = HEX5BHEX5D_189694(n, 0);
		result = rendertype_338208(LOC4);
	}
	break;
	case ((NU8) 139):
	{
		NimStringDesc* LOC6;
		tnode188803* LOC7;
		NimStringDesc* LOC8;
		LOC6 = 0;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_189694(n, 0);
		LOC8 = 0;
		LOC8 = rendertype_338208(LOC7);
		LOC6 = rawNewString(LOC8->Sup.len + 4);
appendString(LOC6, ((NimStringDesc*) &TMP4370));
appendString(LOC6, LOC8);
		result = LOC6;
	}
	break;
	case ((NU8) 140):
	{
		NimStringDesc* LOC10;
		tnode188803* LOC11;
		NimStringDesc* LOC12;
		LOC10 = 0;
		LOC11 = 0;
		LOC11 = HEX5BHEX5D_189694(n, 0);
		LOC12 = 0;
		LOC12 = rendertype_338208(LOC11);
		LOC10 = rawNewString(LOC12->Sup.len + 4);
appendString(LOC10, ((NimStringDesc*) &TMP4371));
appendString(LOC10, LOC12);
		result = LOC10;
	}
	break;
	case ((NU8) 145):
	{
		tnode188803* params;
		NI i_339422;
		NI HEX3Atmp_340401;
		NI LOC14;
		NI res_340403;
		params = HEX5BHEX5D_189694(n, 0);
		result = copyString(((NimStringDesc*) &TMP4372));
		i_339422 = 0;
		HEX3Atmp_340401 = 0;
		LOC14 = 0;
		LOC14 = len_189264(params);
		HEX3Atmp_340401 = LOC14 - 1;
		res_340403 = 1;
		while (1) {
			NimStringDesc* LOC16;
			tnode188803* LOC17;
			NimStringDesc* LOC18;
			if (!(res_340403 <= HEX3Atmp_340401)) goto LA15;
			i_339422 = res_340403;
			LOC16 = 0;
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_189694(params, i_339422);
			LOC18 = 0;
			LOC18 = rendertype_338208(LOC17);
			LOC16 = rawNewString(LOC18->Sup.len + 1);
appendString(LOC16, LOC18);
appendChar(LOC16, 44);
			result = resizeString(result, LOC16->Sup.len + 0);
appendString(result, LOC16);
			res_340403 += 1;
		} LA15: ;
		result->data[result->Sup.len - 1] = 41;
	}
	break;
	case ((NU8) 35):
	{
		NI typepos;
		NI LOC20;
		NimStringDesc* typestr;
		tnode188803* LOC21;
		NI i_339624;
		NI HEX3Atmp_340405;
		NI res_340407;
		LOC20 = 0;
		LOC20 = len_189264(n);
		typepos = (NI32)(LOC20 - 2);
		LOC21 = 0;
		LOC21 = HEX5BHEX5D_189694(n, typepos);
		typestr = rendertype_338208(LOC21);
		result = copyString(typestr);
		i_339624 = 0;
		HEX3Atmp_340405 = 0;
		HEX3Atmp_340405 = typepos - 1;
		res_340407 = 1;
		while (1) {
			NimStringDesc* LOC23;
			if (!(res_340407 <= HEX3Atmp_340405)) goto LA22;
			i_339624 = res_340407;
			LOC23 = 0;
			LOC23 = rawNewString(typestr->Sup.len + 1);
appendChar(LOC23, 44);
appendString(LOC23, typestr);
			result = resizeString(result, LOC23->Sup.len + 0);
appendString(result, LOC23);
			res_340407 += 1;
		} LA22: ;
	}
	break;
	case ((NU8) 133):
	{
		NI i_340022;
		NI HEX3Atmp_340409;
		NI LOC25;
		NI res_340411;
		result = copyString(((NimStringDesc*) &TMP4373));
		i_340022 = 0;
		HEX3Atmp_340409 = 0;
		LOC25 = 0;
		LOC25 = len_189264(n);
		HEX3Atmp_340409 = LOC25 - 1;
		res_340411 = 0;
		while (1) {
			NimStringDesc* LOC27;
			tnode188803* LOC28;
			NimStringDesc* LOC29;
			if (!(res_340411 <= HEX3Atmp_340409)) goto LA26;
			i_340022 = res_340411;
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = HEX5BHEX5D_189694(n, i_340022);
			LOC29 = 0;
			LOC29 = rendertype_338208(LOC28);
			LOC27 = rawNewString(LOC29->Sup.len + 1);
appendString(LOC27, LOC29);
appendChar(LOC27, 44);
			result = resizeString(result, LOC27->Sup.len + 0);
appendString(result, LOC27);
			res_340411 += 1;
		} LA26: ;
		result->data[result->Sup.len - 1] = 93;
	}
	break;
	case ((NU8) 42):
	{
		NimStringDesc* LOC31;
		tnode188803* LOC32;
		NimStringDesc* LOC33;
		NI i_340222;
		NI HEX3Atmp_340413;
		NI LOC34;
		NI res_340415;
		LOC31 = 0;
		LOC32 = 0;
		LOC32 = HEX5BHEX5D_189694(n, 0);
		LOC33 = 0;
		LOC33 = rendertype_338208(LOC32);
		LOC31 = rawNewString(LOC33->Sup.len + 1);
appendString(LOC31, LOC33);
appendChar(LOC31, 91);
		result = LOC31;
		i_340222 = 0;
		HEX3Atmp_340413 = 0;
		LOC34 = 0;
		LOC34 = len_189264(n);
		HEX3Atmp_340413 = LOC34 - 1;
		res_340415 = 1;
		while (1) {
			NimStringDesc* LOC36;
			tnode188803* LOC37;
			NimStringDesc* LOC38;
			if (!(res_340415 <= HEX3Atmp_340413)) goto LA35;
			i_340222 = res_340415;
			LOC36 = 0;
			LOC37 = 0;
			LOC37 = HEX5BHEX5D_189694(n, i_340222);
			LOC38 = 0;
			LOC38 = rendertype_338208(LOC37);
			LOC36 = rawNewString(LOC38->Sup.len + 1);
appendString(LOC36, LOC38);
appendChar(LOC36, 44);
			result = resizeString(result, LOC36->Sup.len + 0);
appendString(result, LOC36);
			res_340415 += 1;
		} LA35: ;
		result->data[result->Sup.len - 1] = 93;
	}
	break;
	default:
	{
		result = copyString(((NimStringDesc*) &TMP4361));
	}
	break;
	}
	return result;
}

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

static N_INLINE(void, rtladdzct_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41090* c;
	c = usrtocell_44443(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	LA3: ;
}

N_NIMCALL(void, renderparamtypes_340423)(TY110805** found, tnode188803* n) {
	switch ((*n).Kind) {
	case ((NU8) 76):
	{
		NI i_340450;
		NI HEX3Atmp_340826;
		NI LOC2;
		NI res_340828;
		i_340450 = 0;
		HEX3Atmp_340826 = 0;
		LOC2 = 0;
		LOC2 = len_189264(n);
		HEX3Atmp_340826 = LOC2 - 1;
		res_340828 = 1;
		while (1) {
			tnode188803* LOC4;
			if (!(res_340828 <= HEX3Atmp_340826)) goto LA3;
			i_340450 = res_340828;
			LOC4 = 0;
			LOC4 = HEX5BHEX5D_189694(n, i_340450);
			renderparamtypes_340423(found, LOC4);
			res_340828 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 35):
	{
		NI typepos;
		NI LOC6;
		NimStringDesc* typestr;
		tnode188803* LOC7;
		NI i_340646;
		NI HEX3Atmp_340830;
		NI res_340832;
		LOC6 = 0;
		LOC6 = len_189264(n);
		typepos = (NI32)(LOC6 - 2);
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_189694(n, typepos);
		typestr = rendertype_338208(LOC7);
		{
			NIM_BOOL LOC10;
			tnode188803* LOC12;
			ttype188837* typ;
			tnode188803* LOC15;
			LOC10 = 0;
			LOC10 = (typestr->Sup.len < 1);
			if (!(LOC10)) goto LA11;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_189694(n, (NI32)(typepos + 1));
			LOC10 = !(((*LOC12).Kind == ((NU8) 1)));
			LA11: ;
			if (!LOC10) goto LA13;
			LOC15 = 0;
			LOC15 = HEX5BHEX5D_189694(n, (NI32)(typepos + 1));
			typ = (*LOC15).Typ;
			{
				if (!!(typ == 0)) goto LA18;
				typestr = typetostring_223020(typ, ((NU8) 2));
			}
			LA18: ;
			{
				if (!(typestr->Sup.len < 1)) goto LA22;
				goto BeforeRet;
			}
			LA22: ;
		}
		LA13: ;
		i_340646 = 0;
		HEX3Atmp_340830 = 0;
		HEX3Atmp_340830 = typepos - 1;
		res_340832 = 0;
		while (1) {
			NimStringDesc* LOC25;
			if (!(res_340832 <= HEX3Atmp_340830)) goto LA24;
			i_340646 = res_340832;
			(*found) = (TY110805*) incrSeq(&((*found))->Sup, sizeof(NimStringDesc*));
			LOC25 = 0;
			LOC25 = (*found)->data[(*found)->Sup.len-1]; (*found)->data[(*found)->Sup.len-1] = copyStringRC1(typestr);
			if (LOC25) nimGCunrefNoCycle(LOC25);
			res_340832 += 1;
		} LA24: ;
	}
	break;
	default:
	{
		NimStringDesc* LOC27;
		LOC27 = 0;
		LOC27 = rawNewString(reprEnum((*n).Kind, (&NTI188023))->Sup.len + 31);
appendString(LOC27, ((NimStringDesc*) &TMP4374));
appendString(LOC27, reprEnum((*n).Kind, (&NTI188023)));
		internalerror_165591((*n).Info, LOC27);
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(NimStringDesc*, renderparamtypes_340838)(tnode188803* n, NimStringDesc* sep) {
	NimStringDesc* result;
	TY110805* found;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP4361));
	found = (TY110805*) newSeq((&NTI110805), 0);
	renderparamtypes_340423(&found, n);
	{
		if (!(0 < found->Sup.len)) goto LA3;
		result = nsuJoinSep(found->data, found->Sup.len, sep);
	}
	LA3: ;
	return result;
}
N_NOINLINE(void, typesrendererInit)(void) {
}

N_NOINLINE(void, typesrendererDatInit)(void) {
}

