/* Generated by Nim Compiler v1.6.14 */
#define NIM_INTBITS 64

#include "nimbase.h"
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw;
typedef struct tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA;
typedef struct tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw;
typedef struct tyObject_TSym__3r34mwqcVmg5JFNmiaVncw tyObject_TSym__3r34mwqcVmg5JFNmiaVncw;
typedef struct tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg;
typedef struct tySequence__IeU9azYSNIK3V9b36Ir6NZcw tySequence__IeU9azYSNIK3V9b36Ir6NZcw;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tyObject_TIdObj__1qw9bcK4rZXhGbJEJhkKQFA tyObject_TIdObj__1qw9bcK4rZXhGbJEJhkKQFA;
typedef struct RootObj RootObj;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tyObject_ItemId__wg9aowaxscbUe2F0nV9btZLg tyObject_ItemId__wg9aowaxscbUe2F0nV9btZLg;
typedef struct tyObject_TLoc__CAJV4zTUpZwr0j6Wy8FiFw tyObject_TLoc__CAJV4zTUpZwr0j6Wy8FiFw;
typedef struct tyObject_RopeObj__vUl1aIPQxBiroOuyvqu9bZQ tyObject_RopeObj__vUl1aIPQxBiroOuyvqu9bZQ;
typedef struct tyObject_TLib__W49cDqPTe2Tvc1mw7CVZOFg tyObject_TLib__W49cDqPTe2Tvc1mw7CVZOFg;
typedef struct tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g;
typedef struct tyObject_CellSeq__nav876ELHgxScHhs30CKiA tyObject_CellSeq__nav876ELHgxScHhs30CKiA;
typedef struct tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ;
typedef struct tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ;
typedef struct tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ;
typedef struct tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw;
typedef struct tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA;
typedef struct tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA;
typedef struct tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A;
typedef struct tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg;
typedef struct tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw;
typedef struct tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw;
typedef struct tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA;
typedef struct tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg;
typedef struct tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA;
typedef struct tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw {
NU16 line;
NI16 col;
NI32 fileIndex;
};
typedef NU32 tySet_tyEnum_TNodeFlag__0RUKWdbLPY3l0smKVGDLMg;
typedef NU8 tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw;
struct tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw {
tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA* typ;
tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw info;
tySet_tyEnum_TNodeFlag__0RUKWdbLPY3l0smKVGDLMg flags;
tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw kind;
union{
struct {NI64 intVal;
} _kind_1;
struct {NF floatVal;
} _kind_2;
struct {NimStringDesc* strVal;
} _kind_3;
struct {tyObject_TSym__3r34mwqcVmg5JFNmiaVncw* sym;
} _kind_4;
struct {tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg* ident;
} _kind_5;
struct {tySequence__IeU9azYSNIK3V9b36Ir6NZcw* sons;
} _kind_6;
};
};
struct tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg {
NI id;
NimStringDesc* s;
tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg* next;
NI h;
};
typedef NU8 tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg;
typedef NU8 tyEnum_TNimKind__pspQAsqJLrw3jEKBD9bxmyQ;
typedef NU8 tySet_tyEnum_TNimTypeFlag__Yt5hq6z2IoHhKZrzIVrc1w;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
NI align;
tyEnum_TNimKind__pspQAsqJLrw3jEKBD9bxmyQ kind;
tySet_tyEnum_TNimTypeFlag__Yt5hq6z2IoHhKZrzIVrc1w flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct RootObj {
TNimType* m_type;
};
struct tyObject_ItemId__wg9aowaxscbUe2F0nV9btZLg {
NI32 module;
NI32 item;
};
struct tyObject_TIdObj__1qw9bcK4rZXhGbJEJhkKQFA {
  RootObj Sup;
tyObject_ItemId__wg9aowaxscbUe2F0nV9btZLg itemId;
};
typedef NU8 tyEnum_TSymKind__sjiB9b9aO1FRPetW6gPYZbfw;
typedef NU16 tyEnum_TMagic__3qAy6bDUDlF8Fc2RR6pF9ag;
typedef NU64 tySet_tyEnum_TSymFlag__9be9c6fEXk5NwyPvxxb6toPA;
typedef NU32 tySet_tyEnum_TOption__HPX9bEWraE8wyYLoP9bHbKYQ;
typedef NU8 tyEnum_TLocKind__pD6N6rEUmrrqJbKE02Sezw;
typedef NU8 tyEnum_TStorageLoc__JIS9cieRcL9cZccyO9bM9aBmFQ;
typedef NU16 tySet_tyEnum_TLocFlag__Ic4ywZl9cdJtKSUkG4WZfHw;
struct tyObject_TLoc__CAJV4zTUpZwr0j6Wy8FiFw {
tyEnum_TLocKind__pD6N6rEUmrrqJbKE02Sezw k;
tyEnum_TStorageLoc__JIS9cieRcL9cZccyO9bM9aBmFQ storage;
tySet_tyEnum_TLocFlag__Ic4ywZl9cdJtKSUkG4WZfHw flags;
tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* lode;
tyObject_RopeObj__vUl1aIPQxBiroOuyvqu9bZQ* r;
};
struct tyObject_TSym__3r34mwqcVmg5JFNmiaVncw {
  tyObject_TIdObj__1qw9bcK4rZXhGbJEJhkKQFA Sup;
tyEnum_TSymKind__sjiB9b9aO1FRPetW6gPYZbfw kind;
union{
struct {tyObject_TSym__3r34mwqcVmg5JFNmiaVncw* gcUnsafetyReason;
tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* transformedBody;
} _kind_1;
struct {tyObject_TSym__3r34mwqcVmg5JFNmiaVncw* guard;
NI bitsize;
NI alignment;
} _kind_2;
};
tyEnum_TMagic__3qAy6bDUDlF8Fc2RR6pF9ag magic;
tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA* typ;
tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg* name;
tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw info;
tyObject_TSym__3r34mwqcVmg5JFNmiaVncw* owner;
tySet_tyEnum_TSymFlag__9be9c6fEXk5NwyPvxxb6toPA flags;
tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* ast;
tySet_tyEnum_TOption__HPX9bEWraE8wyYLoP9bHbKYQ options;
NI position;
NI offset;
tyObject_TLoc__CAJV4zTUpZwr0j6Wy8FiFw loc;
tyObject_TLib__W49cDqPTe2Tvc1mw7CVZOFg* annex;
tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* constraint;
};
typedef NU8 tyEnum_TNimNodeKind__rrp49bl1h9aEkXfXp9bNg0yZw;
struct TNimNode {
tyEnum_TNimNodeKind__rrp49bl1h9aEkXfXp9bNg0yZw kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g {
NI refcount;
TNimType* typ;
};
struct tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ {
void* bottom;
};
struct tyObject_CellSeq__nav876ELHgxScHhs30CKiA {
NI len;
NI cap;
tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g** d;
};
typedef tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw* tyArray__1eFxjkcKGHnofywkmCV8oQ[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA* tyArray__KxTmKT9a3kTkdwYfqXhEYSw[32];
typedef tyArray__KxTmKT9a3kTkdwYfqXhEYSw tyArray__ATT5LBefmjy9bg8ApRmg3rw[24];
typedef tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg* tyArray__RxhBwkGQwTHLKhoK685Xfg[256];
struct tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A {
tyArray__RxhBwkGQwTHLKhoK685Xfg data;
};
typedef tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* tyArray__DrxDrI9bg9apB70ydOoNZrWw[2];
struct tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw {
tyArray__DrxDrI9bg9apB70ydOoNZrWw link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA {
tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA* Field0;
NI Field1;
};
typedef tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA tyArray__wsokuoa9bVBSU4gPLKbFaaw[30];
struct tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw {
NI len;
tyArray__wsokuoa9bVBSU4gPLKbFaaw chunks;
tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw* next;
};
struct tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ {
NI minLargeObj;
NI maxLargeObj;
tyArray__1eFxjkcKGHnofywkmCV8oQ freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__ATT5LBefmjy9bg8ApRmg3rw matrix;
tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A chunkStarts;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* root;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* deleted;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* last;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw bottomData;
tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw heapLinks;
};
struct tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA {
NI counter;
NI max;
tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ* head;
tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ** data;
};
struct tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ {
tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ stack;
NI cycleThreshold;
NI zctThreshold;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA zct;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA decStack;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA tempStack;
NI recGcLock;
tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ region;
tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg stat;
tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA marked;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA additionalRoots;
NI gcThreadId;
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct tySequence__IeU9azYSNIK3V9b36Ir6NZcw {
  TGenericSeq Sup;
  tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* data[SEQ_DECL_SIZE];
};
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, renderPlainSymbolName__typesrenderer_6)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n);
static N_INLINE(NI, len__ast_3155)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, renderDefinitionName__renderer_88)(tyObject_TSym__3r34mwqcVmg5JFNmiaVncw* s, NIM_BOOL noQuotes);
N_LIB_PRIVATE N_NIMCALL(void, renderParamTypes__typesrenderer_123)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ** found, tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, renderType__typesrenderer_15)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, typeToString__types_50)(tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA* typ, tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg prefer);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__system_1733)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
static N_INLINE(void, X5BX5Deq___system_7388)(NimStringDesc** s, NI i, NIM_CHAR x);
N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(void, decRef__system_5326)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
static N_INLINE(void, rtlAddZCT__system_5324)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5275)(tyObject_CellSeq__nav876ELHgxScHhs30CKiA* s, tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5281)(void* usr);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___renderer_2116)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a, NI aLen_0, NimStringDesc* sep);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_2, "var", 3);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_3, "ref.", 4);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_4, "ref", 3);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_5, "ptr.", 4);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_6, "ptr", 3);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_7, "proc(", 5);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_8, "proc", 4);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_9, "tuple[", 6);
STRING_LITERAL(TM__dsDVotbyEVuB5Q6kJIHAAQ_10, ", ", 2);
extern TNimType NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_;
extern tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ gch__system_5228;
static N_INLINE(NI, len__ast_3155)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n) {
	NI result;
	NI T1_;
	result = (NI)0;
	T1_ = ((*n)._kind_6.sons ? (*n)._kind_6.sons->Sup.len : 0);
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, renderPlainSymbolName__typesrenderer_6)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n) {
	NimStringDesc* result;
	result = NIM_NIL;
	switch ((*n).kind) {
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 31):
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 53):
	{
		NI T2_;
		T2_ = (NI)0;
		T2_ = len__ast_3155(n);
		result = renderPlainSymbolName__typesrenderer_6((*n)._kind_6.sons->data[(NI)(T2_ - ((NI) 1))]);
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 2):
	{
		result = copyString((*(*n)._kind_5.ident).s);
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 3):
	{
		result = renderDefinitionName__renderer_88((*n)._kind_4.sym, NIM_TRUE);
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 43):
	{
		result = renderPlainSymbolName__typesrenderer_6((*n)._kind_6.sons->data[((NI) 0)]);
	}
	break;
	default:
	{
		result = ((NimStringDesc*) NIM_NIL);
	}
	break;
	}
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest, source, ((size_t) (size)));
}
static N_INLINE(void, copyMem__system_1733)(void* dest, void* source, NI size) {
	nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	{
		if (!!((src == ((NimStringDesc*) NIM_NIL)))) goto LA3_;
		copyMem__system_1733(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
		(*dest).Sup.len += (*src).Sup.len;
	}
	LA3_: ;
}
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c) {
	(*dest).data[(*dest).Sup.len] = c;
	(*dest).data[(NI)((*dest).Sup.len + ((NI) 1))] = 0;
	(*dest).Sup.len += ((NI) 1);
}
static N_INLINE(void, X5BX5Deq___system_7388)(NimStringDesc** s, NI i, NIM_CHAR x) {
	(*s)->data[(NI)(((*s) ? (*s)->Sup.len : 0) - i)] = x;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, renderType__typesrenderer_15)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n) {
	NimStringDesc* result;
	result = NIM_NIL;
	switch ((*n).kind) {
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 2):
	{
		result = copyString((*(*n)._kind_5.ident).s);
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 3):
	{
		result = typeToString__types_50((*(*n)._kind_4.sym).typ, ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 0));
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 143):
	{
		{
			NI T6_;
			T6_ = (NI)0;
			T6_ = len__ast_3155(n);
			if (!(T6_ == ((NI) 1))) goto LA7_;
			result = renderType__typesrenderer_15((*n)._kind_6.sons->data[((NI) 0)]);
		}
		goto LA4_;
		LA7_: ;
		{
			result = copyString(((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_2));
		}
		LA4_: ;
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 141):
	{
		{
			NI T13_;
			NimStringDesc* T16_;
			NimStringDesc* T17_;
			T13_ = (NI)0;
			T13_ = len__ast_3155(n);
			if (!(T13_ == ((NI) 1))) goto LA14_;
			T16_ = NIM_NIL;
			T17_ = NIM_NIL;
			T17_ = renderType__typesrenderer_15((*n)._kind_6.sons->data[((NI) 0)]);
			T16_ = rawNewString((T17_ ? T17_->Sup.len : 0) + 4);
appendString(T16_, ((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_3));
appendString(T16_, T17_);
			result = T16_;
		}
		goto LA11_;
		LA14_: ;
		{
			result = copyString(((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_4));
		}
		LA11_: ;
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 142):
	{
		{
			NI T22_;
			NimStringDesc* T25_;
			NimStringDesc* T26_;
			T22_ = (NI)0;
			T22_ = len__ast_3155(n);
			if (!(T22_ == ((NI) 1))) goto LA23_;
			T25_ = NIM_NIL;
			T26_ = NIM_NIL;
			T26_ = renderType__typesrenderer_15((*n)._kind_6.sons->data[((NI) 0)]);
			T25_ = rawNewString((T26_ ? T26_->Sup.len : 0) + 4);
appendString(T25_, ((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_5));
appendString(T25_, T26_);
			result = T25_;
		}
		goto LA20_;
		LA23_: ;
		{
			result = copyString(((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_6));
		}
		LA20_: ;
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 147):
	{
		{
			NI T31_;
			tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* params;
			T31_ = (NI)0;
			T31_ = len__ast_3155(n);
			if (!(((NI) 1) < T31_)) goto LA32_;
			params = (*n)._kind_6.sons->data[((NI) 0)];
			result = copyString(((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_7));
			{
				NI i;
				NI colontmp_;
				NI i_2;
				i = (NI)0;
				colontmp_ = (NI)0;
				colontmp_ = len__ast_3155(params);
				i_2 = ((NI) 1);
				{
					while (1) {
						NimStringDesc* T37_;
						NimStringDesc* T38_;
						if (!(i_2 < colontmp_)) goto LA36;
						i = i_2;
						T37_ = NIM_NIL;
						T38_ = NIM_NIL;
						T38_ = renderType__typesrenderer_15((*params)._kind_6.sons->data[i]);
						T37_ = rawNewString((T38_ ? T38_->Sup.len : 0) + 1);
appendString(T37_, T38_);
appendChar(T37_, 44);
						result = resizeString(result, (T37_ ? T37_->Sup.len : 0) + 0);
appendString(result, T37_);
						i_2 += ((NI) 1);
					} LA36: ;
				}
			}
			X5BX5Deq___system_7388((&result), ((NI) 1), 41);
		}
		goto LA29_;
		LA32_: ;
		{
			result = copyString(((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_8));
		}
		LA29_: ;
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 35):
	{
		NI typePos;
		NI T41_;
		NimStringDesc* typeStr;
		T41_ = (NI)0;
		T41_ = len__ast_3155(n);
		typePos = (NI)(T41_ - ((NI) 2));
		typeStr = renderType__typesrenderer_15((*n)._kind_6.sons->data[typePos]);
		result = copyString(typeStr);
		{
			NI i_3;
			NI i_4;
			i_3 = (NI)0;
			i_4 = ((NI) 1);
			{
				while (1) {
					NimStringDesc* T45_;
					if (!(i_4 < typePos)) goto LA44;
					i_3 = i_4;
					T45_ = NIM_NIL;
					T45_ = rawNewString((typeStr ? typeStr->Sup.len : 0) + 1);
appendChar(T45_, 44);
appendString(T45_, typeStr);
					result = resizeString(result, (T45_ ? T45_->Sup.len : 0) + 0);
appendString(result, T45_);
					i_4 += ((NI) 1);
				} LA44: ;
			}
		}
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 134):
	{
		result = copyString(((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_9));
		{
			NI i_5;
			NI colontmp__2;
			NI i_6;
			i_5 = (NI)0;
			colontmp__2 = (NI)0;
			colontmp__2 = len__ast_3155(n);
			i_6 = ((NI) 0);
			{
				while (1) {
					NimStringDesc* T50_;
					NimStringDesc* T51_;
					if (!(i_6 < colontmp__2)) goto LA49;
					i_5 = i_6;
					T50_ = NIM_NIL;
					T51_ = NIM_NIL;
					T51_ = renderType__typesrenderer_15((*n)._kind_6.sons->data[i_5]);
					T50_ = rawNewString((T51_ ? T51_->Sup.len : 0) + 1);
appendString(T50_, T51_);
appendChar(T50_, 44);
					result = resizeString(result, (T50_ ? T50_->Sup.len : 0) + 0);
appendString(result, T50_);
					i_6 += ((NI) 1);
				} LA49: ;
			}
		}
		X5BX5Deq___system_7388((&result), ((NI) 1), 93);
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 42):
	{
		NimStringDesc* T53_;
		NimStringDesc* T54_;
		T53_ = NIM_NIL;
		T54_ = NIM_NIL;
		T54_ = renderType__typesrenderer_15((*n)._kind_6.sons->data[((NI) 0)]);
		T53_ = rawNewString((T54_ ? T54_->Sup.len : 0) + 1);
appendString(T53_, T54_);
appendChar(T53_, 91);
		result = T53_;
		{
			NI i_7;
			NI colontmp__3;
			NI i_8;
			i_7 = (NI)0;
			colontmp__3 = (NI)0;
			colontmp__3 = len__ast_3155(n);
			i_8 = ((NI) 1);
			{
				while (1) {
					NimStringDesc* T58_;
					NimStringDesc* T59_;
					if (!(i_8 < colontmp__3)) goto LA57;
					i_7 = i_8;
					T58_ = NIM_NIL;
					T59_ = NIM_NIL;
					T59_ = renderType__typesrenderer_15((*n)._kind_6.sons->data[i_7]);
					T58_ = rawNewString((T59_ ? T59_->Sup.len : 0) + 1);
appendString(T58_, T59_);
appendChar(T58_, 44);
					result = resizeString(result, (T58_ ? T58_->Sup.len : 0) + 0);
appendString(result, T58_);
					i_8 += ((NI) 1);
				} LA57: ;
			}
		}
		X5BX5Deq___system_7388((&result), ((NI) 1), 93);
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 26):
	{
		result = renderType__typesrenderer_15((*n)._kind_6.sons->data[((NI) 0)]);
		{
			NI i_9;
			NI colontmp__4;
			NI i_10;
			i_9 = (NI)0;
			colontmp__4 = (NI)0;
			colontmp__4 = len__ast_3155(n);
			i_10 = ((NI) 1);
			{
				while (1) {
					NimStringDesc* T68_;
					if (!(i_10 < colontmp__4)) goto LA63;
					i_9 = i_10;
					{
						if (!(((NI) 1) < i_9)) goto LA66_;
						result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM__dsDVotbyEVuB5Q6kJIHAAQ_10));
					}
					LA66_: ;
					T68_ = NIM_NIL;
					T68_ = renderType__typesrenderer_15((*n)._kind_6.sons->data[i_9]);
					result = resizeString(result, (T68_ ? T68_->Sup.len : 0) + 0);
appendString(result, T68_);
					i_10 += ((NI) 1);
				} LA63: ;
			}
		}
	}
	break;
	default:
	{
		result = ((NimStringDesc*) NIM_NIL);
	}
	break;
	}
	return result;
}
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
	return result;
}
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
	return result;
}
static N_INLINE(void, rtlAddZCT__system_5324)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	addZCT__system_5275((&gch__system_5228.zct), c);
}
static N_INLINE(void, decRef__system_5326)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	(*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
		if (!T3_) goto LA4_;
		rtlAddZCT__system_5324(c);
	}
	LA4_: ;
}
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5281)(void* usr) {
	tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* result;
	NI T1_;
	result = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
	T1_ = (NI)0;
	T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
	result = ((tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*) (T1_));
	return result;
}
static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T1_;
	T1_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
	T1_ = usrToCell__system_5281(p);
	decRef__system_5326(T1_);
}
N_LIB_PRIVATE N_NIMCALL(void, renderParamTypes__typesrenderer_123)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ** found, tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n) {
{	switch ((*n).kind) {
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 76):
	{
		{
			NI i;
			NI colontmp_;
			NI i_2;
			i = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = len__ast_3155(n);
			i_2 = ((NI) 1);
			{
				while (1) {
					if (!(i_2 < colontmp_)) goto LA4;
					i = i_2;
					renderParamTypes__typesrenderer_123(found, (*n)._kind_6.sons->data[i]);
					i_2 += ((NI) 1);
				} LA4: ;
			}
		}
	}
	break;
	case ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 35):
	{
		NI typePos;
		NI T6_;
		NimStringDesc* typeStr;
		T6_ = (NI)0;
		T6_ = len__ast_3155(n);
		typePos = (NI)(T6_ - ((NI) 2));
		typeStr = renderType__typesrenderer_15((*n)._kind_6.sons->data[typePos]);
		{
			NIM_BOOL T9_;
			tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA* typ;
			T9_ = (NIM_BOOL)0;
			T9_ = ((typeStr ? typeStr->Sup.len : 0) < ((NI) 1));
			if (!(T9_)) goto LA10_;
			T9_ = !(((*(*n)._kind_6.sons->data[(NI)(typePos + ((NI) 1))]).kind == ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 1)));
			LA10_: ;
			if (!T9_) goto LA11_;
			typ = (*(*n)._kind_6.sons->data[(NI)(typePos + ((NI) 1))]).typ;
			{
				if (!!((typ == 0))) goto LA15_;
				typeStr = typeToString__types_50(typ, ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 2));
			}
			LA15_: ;
			{
				if (!((typeStr ? typeStr->Sup.len : 0) < ((NI) 1))) goto LA19_;
				goto BeforeRet_;
			}
			LA19_: ;
		}
		LA11_: ;
		{
			NI i_3;
			NI i_4;
			i_3 = (NI)0;
			i_4 = ((NI) 0);
			{
				while (1) {
					NI T24_;
					NimStringDesc* T25_;
					if (!(i_4 < typePos)) goto LA23;
					i_3 = i_4;
					unsureAsgnRef((void**) (&(*found)), (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV3((TGenericSeq*)((*found)), (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_)));
					T24_ = (*found)->Sup.len++;
					T25_ = NIM_NIL;
					T25_ = (*found)->data[T24_]; (*found)->data[T24_] = copyStringRC1(typeStr);
					if (T25_) nimGCunrefNoCycle(T25_);
					i_4 += ((NI) 1);
				} LA23: ;
			}
		}
	}
	break;
	default:
	{
		NimStringDesc* T27_;
		NI T28_;
		NimStringDesc* T29_;
		T27_ = NIM_NIL;
		T27_ = dollar___renderer_2116(n);
		unsureAsgnRef((void**) (&(*found)), (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV3((TGenericSeq*)((*found)), (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_)));
		T28_ = (*found)->Sup.len++;
		T29_ = NIM_NIL;
		T29_ = (*found)->data[T28_]; (*found)->data[T28_] = copyStringRC1(T27_);
		if (T29_) nimGCunrefNoCycle(T29_);
	}
	break;
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, renderParamTypes__typesrenderer_167)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n, NimStringDesc* sep) {
	NimStringDesc* result;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* found;
	result = NIM_NIL;
	result = ((NimStringDesc*) NIM_NIL);
	found = NIM_NIL;
	renderParamTypes__typesrenderer_123((&found), n);
	{
		NI T3_;
		T3_ = (found ? found->Sup.len : 0);
		if (!(((NI) 0) < T3_)) goto LA4_;
		result = nsuJoinSep((found) ? (found->data) : NIM_NIL, (found ? found->Sup.len : 0), sep);
	}
	LA4_: ;
	return result;
}
