/* Generated by Nim Compiler v1.6.6 */
#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_(proc, file) \
      TFrame FR_; \
      FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);

  #  define nimfrs_(proc, file, slots, length) \
      struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
      FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);

  #  define nimln_(n, file) \
      FR_.line = n; FR_.filename = file;
  typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw;
typedef struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
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__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct RootObj {
TNimType* m_type;
};
struct Exception {
  RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
Exception* up;
};
struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
  Exception Sup;
};
struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw {
  tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA Sup;
};
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
NI refcount;
TNimType* typ;
};
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
};
typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
tyArray__0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
NI Field1;
};
typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
NI len;
tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
};
struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
NI minLargeObj;
NI maxLargeObj;
tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
};
struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
NI counter;
NI max;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
};
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
NI zctThreshold;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
NI gcThreadId;
};
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
NCSTRING procname;
NI line;
NCSTRING filename;
};
struct tySequence__uB9b75OUPRENsBAu4AnoePA {
  TGenericSeq Sup;
  tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(void, nsuAddf)(NimStringDesc** s, NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NOINLINE(void, invalidFormatString__pureZstrutils_2203)(void);
N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(void, decRef__system_5344)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2997)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
static N_INLINE(void, rtlAddZCT__system_5342)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5293)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5299)(void* usr);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef__system_5337)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__system_1727)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NI, findNormalized__pureZstrutils_2191)(NimStringDesc* x, NimStringDesc** inArray, NI inArrayLen_0);
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_CHAR, toLowerAscii__stdZprivateZstrimpl_1)(NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, substr__system_7790)(NimStringDesc* s, NI first, NI last);
extern TNimType NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_;
extern TNimType NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_;
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_5, "invalid format string", 21);
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5246;
static N_INLINE(void, nimFrame)(TFrame* s) {
	{
		if (!(framePtr__system_2564 == ((TFrame*) NIM_NIL))) goto LA3_;
		(*s).calldepth = ((NI16) 0);
	}
	goto LA1_;
	LA3_: ;
	{
		(*s).calldepth = (NI16)((*framePtr__system_2564).calldepth + ((NI16) 1));
	}
	LA1_: ;
	(*s).prev = framePtr__system_2564;
	framePtr__system_2564 = s;
	{
		if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
		callDepthLimitReached__system_2997();
	}
	LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
	framePtr__system_2564 = (*framePtr__system_2564).prev;
}
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
	NI result;
	nimfr_("-%", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
	result = (NI)0;
	nimln_(414, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
	nimln_(418, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
	result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
	popFrame();
	return result;
}
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
	NIM_BOOL result;
	nimfr_("<%", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
	result = (NIM_BOOL)0;
	nimln_(186, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
	nimln_(188, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
	result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
	popFrame();
	return result;
}
static N_INLINE(void, rtlAddZCT__system_5342)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
	nimfr_("rtlAddZCT", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	nimln_(243, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	addZCT__system_5293((&gch__system_5246.zct), c);
	popFrame();
}
static N_INLINE(void, decRef__system_5344)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
	nimfr_("decRef", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	nimln_(248, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	(*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
	nimln_(249, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
		if (!T3_) goto LA4_;
		nimln_(250, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
		rtlAddZCT__system_5342(c);
	}
	LA4_: ;
	popFrame();
}
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5299)(void* usr) {
	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
	NI T1_;
	nimfr_("usrToCell", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
	nimln_(177, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	T1_ = (NI)0;
	T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
	result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
	popFrame();
	return result;
}
static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_;
	nimfr_("nimGCunrefNoCycle", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	nimln_(276, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	T1_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
	T1_ = usrToCell__system_5299(p);
	decRef__system_5344(T1_);
	popFrame();
}
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
	NI result;
	nimfr_("+%", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
	result = (NI)0;
	nimln_(403, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
	nimln_(407, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
	result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
	popFrame();
	return result;
}
static N_INLINE(void, incRef__system_5337)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
	nimfr_("incRef", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	nimln_(231, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	(*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
	popFrame();
}
static N_INLINE(void, asgnRef)(void** dest, void* src) {
	nimfr_("asgnRef", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	nimln_(286, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	{
		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T5_ = usrToCell__system_5299(src);
		incRef__system_5337(T5_);
	}
	LA3_: ;
	nimln_(287, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	{
		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
		if (!!(((*dest) == NIM_NIL))) goto LA8_;
		T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T10_ = usrToCell__system_5299((*dest));
		decRef__system_5344(T10_);
	}
	LA8_: ;
	nimln_(288, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
	(*dest) = src;
	popFrame();
}
N_LIB_PRIVATE N_NOINLINE(void, invalidFormatString__pureZstrutils_2203)(void) {
	tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw* T1_;
	NimStringDesc* T2_;
	nimfr_("invalidFormatString", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	T1_ = NIM_NIL;
	T1_ = (tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw*) newObj((&NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_), sizeof(tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw));
	(*T1_).Sup.Sup.Sup.m_type = (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_);
	(*T1_).Sup.Sup.name = "ValueError";
	T2_ = NIM_NIL;
	T2_ = (*T1_).Sup.Sup.message; (*T1_).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_5));
	if (T2_) nimGCunrefNoCycle(T2_);
	asgnRef((void**) (&(*T1_).Sup.Sup.parent), ((Exception*) NIM_NIL));
	nimln_(2664, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	raiseExceptionEx((Exception*)T1_, "ValueError", "invalidFormatString", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim", 2664);
	popFrame();
}
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_1727)(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_1727(((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(NIM_CHAR, toLowerAscii__stdZprivateZstrimpl_1)(NIM_CHAR c) {
	NIM_CHAR result;
	nimfr_("toLowerAscii", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/std/private/strimpl.nim");
	result = (NIM_CHAR)0;
	nimln_(2, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/std/private/strimpl.nim");
	{
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_25;
		if (!(((NU8)(c)) >= ((NU8)(65)) && ((NU8)(c)) <= ((NU8)(90)))) goto LA3_;
		nimln_(3, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/std/private/strimpl.nim");
		if (nimAddInt(((NU8)(c)), ((NI) 32), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_25)) { raiseOverflow(); };
		if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_25)) < ((NI) 0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_25)) > ((NI) 255)){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_25), ((NI) 0), ((NI) 255)); }
		result = ((NIM_CHAR) (((NI) ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_25)))));
	}
	goto LA1_;
	LA3_: ;
	{
		nimln_(5, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/std/private/strimpl.nim");
		result = c;
	}
	LA1_: ;
	popFrame();
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b) {
	NI result;
	NI aLenX60gensym25_;
	NI bLenX60gensym25_;
	NI iX60gensym25_;
	NI jX60gensym25_;
	nimfr_("cmpIgnoreStyle", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
{	result = (NI)0;
	aLenX60gensym25_ = (a ? a->Sup.len : 0);
	bLenX60gensym25_ = (b ? b->Sup.len : 0);
	iX60gensym25_ = ((NI) 0);
	jX60gensym25_ = ((NI) 0);
	{
		while (1) {
			NIM_CHAR aaX60gensym25_;
			NIM_CHAR bbX60gensym25_;
			{
				while (1) {
					NIM_BOOL T5_;
					T5_ = (NIM_BOOL)0;
					T5_ = (iX60gensym25_ < aLenX60gensym25_);
					if (!(T5_)) goto LA6_;
					T5_ = ((NU8)(a->data[iX60gensym25_]) == (NU8)(95));
					LA6_: ;
					if (!T5_) goto LA4;
					iX60gensym25_ += ((NI) 1);
				} LA4: ;
			}
			{
				while (1) {
					NIM_BOOL T9_;
					T9_ = (NIM_BOOL)0;
					T9_ = (jX60gensym25_ < bLenX60gensym25_);
					if (!(T9_)) goto LA10_;
					T9_ = ((NU8)(b->data[jX60gensym25_]) == (NU8)(95));
					LA10_: ;
					if (!T9_) goto LA8;
					jX60gensym25_ += ((NI) 1);
				} LA8: ;
			}
			{
				if (!(iX60gensym25_ < aLenX60gensym25_)) goto LA13_;
				aaX60gensym25_ = toLowerAscii__stdZprivateZstrimpl_1(a->data[iX60gensym25_]);
			}
			goto LA11_;
			LA13_: ;
			{
				aaX60gensym25_ = 0;
			}
			LA11_: ;
			{
				if (!(jX60gensym25_ < bLenX60gensym25_)) goto LA18_;
				bbX60gensym25_ = toLowerAscii__stdZprivateZstrimpl_1(b->data[jX60gensym25_]);
			}
			goto LA16_;
			LA18_: ;
			{
				bbX60gensym25_ = 0;
			}
			LA16_: ;
			result = (NI)(((NU8)(aaX60gensym25_)) - ((NU8)(bbX60gensym25_)));
			{
				if (!!((result == ((NI) 0)))) goto LA23_;
				goto BeforeRet_;
			}
			LA23_: ;
			{
				if (!(aLenX60gensym25_ <= iX60gensym25_)) goto LA27_;
				{
					if (!(bLenX60gensym25_ <= jX60gensym25_)) goto LA31_;
					result = ((NI) 0);
					goto BeforeRet_;
				}
				LA31_: ;
				result = ((NI) -1);
				goto BeforeRet_;
			}
			goto LA25_;
			LA27_: ;
			{
				if (!(bLenX60gensym25_ <= jX60gensym25_)) goto LA34_;
				result = ((NI) 1);
				goto BeforeRet_;
			}
			goto LA25_;
			LA34_: ;
			LA25_: ;
			iX60gensym25_ += ((NI) 1);
			jX60gensym25_ += ((NI) 1);
		}
	}
	}BeforeRet_: ;
	popFrame();
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, findNormalized__pureZstrutils_2191)(NimStringDesc* x, NimStringDesc** inArray, NI inArrayLen_0) {
	NI result;
	NI i;
	nimfr_("findNormalized", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
{	result = (NI)0;
	nimln_(2656, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	i = ((NI) 0);
	{
		nimln_(2657, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
		while (1) {
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_26;
			if (!(i < (inArrayLen_0-1))) goto LA2;
			nimln_(2658, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
			{
				NI T5_;
				if (i < 0 || i >= inArrayLen_0){ raiseIndexError2(i,inArrayLen_0-1); }
				T5_ = (NI)0;
				T5_ = nsuCmpIgnoreStyle(x, inArray[i]);
				if (!(T5_ == ((NI) 0))) goto LA6_;
				result = i;
				goto BeforeRet_;
			}
			LA6_: ;
			nimln_(2659, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
			if (nimAddInt(i, ((NI) 2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_26)) { raiseOverflow(); };
			i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_26);
		} LA2: ;
	}
	nimln_(2661, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	result = ((NI) -1);
	goto BeforeRet_;
	}BeforeRet_: ;
	popFrame();
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuAddf)(NimStringDesc** s, NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0) {
	NI i;
	NI num;
	nimfr_("addf", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	nimln_(2670, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	i = ((NI) 0);
	nimln_(2671, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	num = ((NI) 0);
	{
		nimln_(2672, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
		while (1) {
			if (!(i < (formatstr ? formatstr->Sup.len : 0))) goto LA2;
			nimln_(2673, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
			{
				NIM_BOOL T5_;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_3;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_4;
				T5_ = (NIM_BOOL)0;
				if (i < 0 || i >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(i,(formatstr ? formatstr->Sup.len : 0)-1); }
				T5_ = ((NU8)(formatstr->data[i]) == (NU8)(36));
				if (!(T5_)) goto LA6_;
				if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_3)) { raiseOverflow(); };
				T5_ = ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_3) < (formatstr ? formatstr->Sup.len : 0));
				LA6_: ;
				if (!T5_) goto LA7_;
				nimln_(2674, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
				if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_4)) { raiseOverflow(); };
				if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_4) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_4) >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_4),(formatstr ? formatstr->Sup.len : 0)-1); }
				switch (((NU8)(formatstr->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_4)]))) {
				case 35:
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_6;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_7;
					nimln_(2676, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					{
						if (!((aLen_0-1) < num)) goto LA12_;
						invalidFormatString__pureZstrutils_2203();
					}
					LA12_: ;
					nimln_(2677, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (num < 0 || num >= aLen_0){ raiseIndexError2(num,aLen_0-1); }
					unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[num] ? a[num]->Sup.len : 0) + 0));
appendString((*s), a[num]);
					nimln_(2678, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(i, ((NI) 2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_6)) { raiseOverflow(); };
					i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_6);
					nimln_(2679, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(num, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_7)) { raiseOverflow(); };
					num = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_7);
				}
				break;
				case 36:
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_8;
					nimln_(2681, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					unsureAsgnRef((void**) (&(*s)), addChar((*s), 36));
					nimln_(2682, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(i, ((NI) 2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_8)) { raiseOverflow(); };
					i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_8);
				}
				break;
				case 49 ... 57:
				case 45:
				{
					NI j;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_9;
					NIM_BOOL negative;
					NI idx;
					nimln_(2684, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					j = ((NI) 0);
					nimln_(2685, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_9)) { raiseOverflow(); };
					i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_9);
					nimln_(2686, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (i < 0 || i >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(i,(formatstr ? formatstr->Sup.len : 0)-1); }
					negative = ((NU8)(formatstr->data[i]) == (NU8)(45));
					nimln_(2687, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_10;
						if (!negative) goto LA18_;
						if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_10)) { raiseOverflow(); };
						i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_10);
					}
					LA18_: ;
					{
						nimln_(2688, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						while (1) {
							NIM_BOOL T22_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_11;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_12;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_13;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_14;
							T22_ = (NIM_BOOL)0;
							T22_ = (i < (formatstr ? formatstr->Sup.len : 0));
							if (!(T22_)) goto LA23_;
							if (i < 0 || i >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(i,(formatstr ? formatstr->Sup.len : 0)-1); }
							T22_ = (((NU8)(formatstr->data[i])) >= ((NU8)(48)) && ((NU8)(formatstr->data[i])) <= ((NU8)(57)));
							LA23_: ;
							if (!T22_) goto LA21;
							nimln_(2689, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
							if (nimMulInt(j, ((NI) 10), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_11)) { raiseOverflow(); };
							if (i < 0 || i >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(i,(formatstr ? formatstr->Sup.len : 0)-1); }
							if (nimAddInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_11), ((NU8)(formatstr->data[i])), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_12)) { raiseOverflow(); };
							if (nimSubInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_12), ((NI) 48), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_13)) { raiseOverflow(); };
							j = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_13);
							nimln_(2690, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
							if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_14)) { raiseOverflow(); };
							i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_14);
						} LA21: ;
					}
					nimln_(2691, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_15;
						if (!!(negative)) goto LA26_;
						if (nimSubInt(j, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_15)) { raiseOverflow(); };
						idx = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_15);
					}
					goto LA24_;
					LA26_: ;
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_16;
						if (nimSubInt(aLen_0, j, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_16)) { raiseOverflow(); };
						idx = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_16);
					}
					LA24_: ;
					nimln_(2692, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					{
						NIM_BOOL T31_;
						T31_ = (NIM_BOOL)0;
						T31_ = (idx < ((NI) 0));
						if (T31_) goto LA32_;
						T31_ = ((aLen_0-1) < idx);
						LA32_: ;
						if (!T31_) goto LA33_;
						invalidFormatString__pureZstrutils_2203();
					}
					LA33_: ;
					nimln_(2693, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (idx < 0 || idx >= aLen_0){ raiseIndexError2(idx,aLen_0-1); }
					unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[idx] ? a[idx]->Sup.len : 0) + 0));
appendString((*s), a[idx]);
				}
				break;
				case 123:
				{
					NI j_2;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_17;
					NI k;
					NIM_BOOL negative_2;
					NI isNumber;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_30;
					nimln_(2695, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(i, ((NI) 2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_17)) { raiseOverflow(); };
					j_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_17);
					nimln_(2696, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					k = ((NI) 0);
					nimln_(2697, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (j_2 < 0 || j_2 >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(j_2,(formatstr ? formatstr->Sup.len : 0)-1); }
					negative_2 = ((NU8)(formatstr->data[j_2]) == (NU8)(45));
					nimln_(2698, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_18;
						if (!negative_2) goto LA38_;
						if (nimAddInt(j_2, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_18)) { raiseOverflow(); };
						j_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_18);
					}
					LA38_: ;
					nimln_(2699, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					isNumber = ((NI) 0);
					{
						nimln_(2700, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						while (1) {
							NIM_BOOL T42_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_22;
							T42_ = (NIM_BOOL)0;
							T42_ = (j_2 < (formatstr ? formatstr->Sup.len : 0));
							if (!(T42_)) goto LA43_;
							if (j_2 < 0 || j_2 >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(j_2,(formatstr ? formatstr->Sup.len : 0)-1); }
							T42_ = !((((NU8)(formatstr->data[j_2])) == ((NU8)(0)) || ((NU8)(formatstr->data[j_2])) == ((NU8)(125))));
							LA43_: ;
							if (!T42_) goto LA41;
							nimln_(2701, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
							{
								NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_19;
								NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_20;
								NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_21;
								if (j_2 < 0 || j_2 >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(j_2,(formatstr ? formatstr->Sup.len : 0)-1); }
								if (!(((NU8)(formatstr->data[j_2])) >= ((NU8)(48)) && ((NU8)(formatstr->data[j_2])) <= ((NU8)(57)))) goto LA46_;
								nimln_(2702, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
								if (nimMulInt(k, ((NI) 10), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_19)) { raiseOverflow(); };
								if (j_2 < 0 || j_2 >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(j_2,(formatstr ? formatstr->Sup.len : 0)-1); }
								if (nimAddInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_19), ((NU8)(formatstr->data[j_2])), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_20)) { raiseOverflow(); };
								if (nimSubInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_20), ((NI) 48), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_21)) { raiseOverflow(); };
								k = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_21);
								nimln_(2703, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
								{
									if (!(isNumber == ((NI) 0))) goto LA50_;
									isNumber = ((NI) 1);
								}
								LA50_: ;
							}
							goto LA44_;
							LA46_: ;
							{
								nimln_(2705, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
								isNumber = ((NI) -1);
							}
							LA44_: ;
							nimln_(2706, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
							if (nimAddInt(j_2, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_22)) { raiseOverflow(); };
							j_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_22);
						} LA41: ;
					}
					nimln_(2707, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					{
						NI idx_2;
						if (!(isNumber == ((NI) 1))) goto LA55_;
						nimln_(2708, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						{
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_23;
							if (!!(negative_2)) goto LA59_;
							if (nimSubInt(k, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_23)) { raiseOverflow(); };
							idx_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_23);
						}
						goto LA57_;
						LA59_: ;
						{
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_24;
							if (nimSubInt(aLen_0, k, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_24)) { raiseOverflow(); };
							idx_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_24);
						}
						LA57_: ;
						nimln_(2709, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						{
							NIM_BOOL T64_;
							T64_ = (NIM_BOOL)0;
							T64_ = (idx_2 < ((NI) 0));
							if (T64_) goto LA65_;
							T64_ = ((aLen_0-1) < idx_2);
							LA65_: ;
							if (!T64_) goto LA66_;
							invalidFormatString__pureZstrutils_2203();
						}
						LA66_: ;
						nimln_(2710, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						if (idx_2 < 0 || idx_2 >= aLen_0){ raiseIndexError2(idx_2,aLen_0-1); }
						unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[idx_2] ? a[idx_2]->Sup.len : 0) + 0));
appendString((*s), a[idx_2]);
					}
					goto LA53_;
					LA55_: ;
					{
						NI x;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_27;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_28;
						NimStringDesc* T69_;
						nimln_(2712, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						if (nimAddInt(i, ((NI) 2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_27)) { raiseOverflow(); };
						if (nimSubInt(j_2, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_28)) { raiseOverflow(); };
						T69_ = NIM_NIL;
						T69_ = substr__system_7790(formatstr, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_27), (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_28));
						x = findNormalized__pureZstrutils_2191(T69_, a, aLen_0);
						nimln_(2713, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						{
							NIM_BOOL T72_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_29;
							T72_ = (NIM_BOOL)0;
							T72_ = (((NI) 0) <= x);
							if (!(T72_)) goto LA73_;
							T72_ = (x < (aLen_0-1));
							LA73_: ;
							if (!T72_) goto LA74_;
							if (nimAddInt(x, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_29)) { raiseOverflow(); };
							if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29) >= aLen_0){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29),aLen_0-1); }
							unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29)] ? a[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29)]->Sup.len : 0) + 0));
appendString((*s), a[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29)]);
						}
						goto LA70_;
						LA74_: ;
						{
							nimln_(2714, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
							invalidFormatString__pureZstrutils_2203();
						}
						LA70_: ;
					}
					LA53_: ;
					nimln_(2715, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(j_2, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_30)) { raiseOverflow(); };
					i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_30);
				}
				break;
				case 97 ... 122:
				case 65 ... 90:
				case 128 ... 255:
				case 95:
				{
					NI j_3;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_31;
					NI x_2;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_33;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_34;
					NimStringDesc* T82_;
					nimln_(2717, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_31)) { raiseOverflow(); };
					j_3 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_31);
					{
						nimln_(2718, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						while (1) {
							NIM_BOOL T80_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_32;
							T80_ = (NIM_BOOL)0;
							T80_ = (j_3 < (formatstr ? formatstr->Sup.len : 0));
							if (!(T80_)) goto LA81_;
							if (j_3 < 0 || j_3 >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(j_3,(formatstr ? formatstr->Sup.len : 0)-1); }
							T80_ = (((NU8)(formatstr->data[j_3])) >= ((NU8)(97)) && ((NU8)(formatstr->data[j_3])) <= ((NU8)(122)) || ((NU8)(formatstr->data[j_3])) >= ((NU8)(65)) && ((NU8)(formatstr->data[j_3])) <= ((NU8)(90)) || ((NU8)(formatstr->data[j_3])) >= ((NU8)(48)) && ((NU8)(formatstr->data[j_3])) <= ((NU8)(57)) || ((NU8)(formatstr->data[j_3])) >= ((NU8)(128)) && ((NU8)(formatstr->data[j_3])) <= ((NU8)(255)) || ((NU8)(formatstr->data[j_3])) == ((NU8)(95)));
							LA81_: ;
							if (!T80_) goto LA79;
							if (nimAddInt(j_3, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_32)) { raiseOverflow(); };
							j_3 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_32);
						} LA79: ;
					}
					nimln_(2719, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_33)) { raiseOverflow(); };
					if (nimSubInt(j_3, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_34)) { raiseOverflow(); };
					T82_ = NIM_NIL;
					T82_ = substr__system_7790(formatstr, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_33), (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_34));
					x_2 = findNormalized__pureZstrutils_2191(T82_, a, aLen_0);
					nimln_(2720, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					{
						NIM_BOOL T85_;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_35;
						T85_ = (NIM_BOOL)0;
						T85_ = (((NI) 0) <= x_2);
						if (!(T85_)) goto LA86_;
						T85_ = (x_2 < (aLen_0-1));
						LA86_: ;
						if (!T85_) goto LA87_;
						if (nimAddInt(x_2, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_35)) { raiseOverflow(); };
						if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35) >= aLen_0){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35),aLen_0-1); }
						unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35)] ? a[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35)]->Sup.len : 0) + 0));
appendString((*s), a[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35)]);
					}
					goto LA83_;
					LA87_: ;
					{
						nimln_(2721, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
						invalidFormatString__pureZstrutils_2203();
					}
					LA83_: ;
					nimln_(2722, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					i = j_3;
				}
				break;
				default:
				{
					nimln_(2724, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
					invalidFormatString__pureZstrutils_2203();
				}
				break;
				}
			}
			goto LA3_;
			LA7_: ;
			{
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_36;
				nimln_(2726, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
				if (i < 0 || i >= (formatstr ? formatstr->Sup.len : 0)){ raiseIndexError2(i,(formatstr ? formatstr->Sup.len : 0)-1); }
				unsureAsgnRef((void**) (&(*s)), addChar((*s), formatstr->data[i]));
				nimln_(2727, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
				if (nimAddInt(i, ((NI) 1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_36)) { raiseOverflow(); };
				i = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_36);
			}
			LA3_: ;
		} LA2: ;
	}
	popFrame();
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0) {
	NimStringDesc* result;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_2;
	nimfr_("%", "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	result = NIM_NIL;
	nimln_(2774, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	if (nimAddInt((formatstr ? formatstr->Sup.len : 0), (NI)((NU64)(aLen_0) << (NU64)(((NI) 4))), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_2)) { raiseOverflow(); };
	if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_2)) < ((NI) 0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_2)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_2), ((NI) 0), ((NI) IL64(9223372036854775807))); }
	result = rawNewString(((NI) ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_2))));
	nimln_(2775, "/home/gm/.choosenim/toolchains/nim-1.6.6/lib/pure/strutils.nim");
	nsuAddf((&result), formatstr, a, aLen_0);
	popFrame();
	return result;
}
