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

#include "nimbase.h"
#include <string.h>
#include <stdio.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_ValueError__5lcTdgqMq62cNGRwBb0thA tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA;
typedef struct tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tySequence__QbmGqFaLnb1IWWToREeaIA tySequence__QbmGqFaLnb1IWWToREeaIA;
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;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef struct tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw;
typedef struct tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
typedef NI tyArray__9cc9aPiDa8VaWjVcFLabEDZQ[256];
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 Exception {
  RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__QbmGqFaLnb1IWWToREeaIA* trace;
Exception* up;
};
struct tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ {
  Exception Sup;
};
struct tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA {
  tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ Sup;
};
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;
};
typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
typedef NU8 tyEnum_TBackend__zoooocqvga73vZuhGAAy6A;
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef NU8 tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw;
typedef NU8 tyEnum_LegacyFeature__YfzcW9bRC8xGYaRkFXliJ2g;
typedef NU8 tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg;
struct tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw {
NI a;
NI b;
};
typedef NU8 tyEnum_BinaryPrefixMode__9aq8p9cHh4TxM4kldzuu2GZA;
typedef NimStringDesc* tyArray__17w6ns39bmjfAZ429aQpCFUA[9];
typedef NU8 tyEnum_FloatFormatMode__alaW5GAGZvqS9bWFnNLXFuA;
typedef NIM_CHAR tyArray__9bPFPkkEEeeNM9bKgiV8Q49cg[6];
typedef NIM_CHAR tyArray__Kn8ZOVsorvcNLB4isUeMzQ[2501];
typedef NIM_CHAR tyArray__GeULcdNVeV0Fpy6dlDzG5Q[3];
struct tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA {
NCSTRING procname;
NI line;
NCSTRING filename;
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct tySequence__QbmGqFaLnb1IWWToREeaIA {
  TGenericSeq Sup;
  tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA data[SEQ_DECL_SIZE];
};
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toHexImpl__pureZstrutils_711)(NU64 x, NI len, NIM_BOOL handleNegative);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
static N_INLINE(NIM_CHAR, toLowerAscii__stdZprivateZstrimpl_1)(NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s, NIM_CHAR sub, NI start, NI last);
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, substr__system_7724)(NimStringDesc* s, NI first, NI last);
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*, resizeString)(NimStringDesc* dest, NI addlen);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, substr__system_7736)(NimStringDesc* s, NI first);
N_LIB_PRIVATE N_NIMCALL(void, nsuInitSkipTable)(NI* a, NimStringDesc* sub);
N_LIB_PRIVATE N_NIMCALL(void, fill__pureZstrutils_1405)(NI* a, NI aLen_0, NI value);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStrA)(tyArray__9cc9aPiDa8VaWjVcFLabEDZQ a, NimStringDesc* s, NimStringDesc* sub, NI start, NI last);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newLen);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_LIB_PRIVATE N_NIMCALL(void, nsuAddf)(NimStringDesc** s, NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0);
N_LIB_PRIVATE N_NOINLINE(void, invalidFormatString__pureZstrutils_2120)(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_5309)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
static N_INLINE(void, rtlAddZCT__system_5307)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5258)(tyObject_CellSeq__nav876ELHgxScHhs30CKiA* s, tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5264)(void* usr);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef__system_5302)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* 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);
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_2108)(NimStringDesc* x, NimStringDesc** inArray, NI inArrayLen_0);
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__systemZassertions_56)(NimStringDesc* msg);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start, NI last);
N_LIB_PRIVATE N_NIMCALL(void, nsuInitNewSkipTable)(NimStringDesc* sub, tyArray__9cc9aPiDa8VaWjVcFLabEDZQ Result);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, nsuToLowerAsciiChar)(NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringDesc* s, NimStringDesc* prefix);
N_LIB_PRIVATE N_NIMCALL(NI, parseHex__pureZstrutils_895)(NimStringDesc* s, NI* number, NI start, NI maxLen);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s, NimStringDesc* suffix);
N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nimIdentNormalize__pureZstrutils_105)(NimStringDesc* s);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, equalMem__system_1741)(void* a, void* b, NI size);
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindCharSet)(NimStringDesc* s, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars, NI start, NI last);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start);
N_LIB_PRIVATE N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseFloat)(NimStringDesc* s, NF* number, NI start);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___systemZdollars_3)(NI x);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuNormalize)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseBiggestInt)(NimStringDesc* s, NI64* number, NI start);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, substrEq__pureZstrutils_229)(NimStringDesc* s, NI pos, NimStringDesc* substr);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toHex__pureZstrutils_1788)(NI x, NI len);
static N_INLINE(NimStringDesc*, X5BX5D___pureZunicode_865)(NimStringDesc* s, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw x);
static N_INLINE(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw, dotdot___pureZunicode_840)(NI a, NI b);
static N_INLINE(NimStringDesc*, X5BX5D___pureZunicode_3215)(NimStringDesc* s, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw x);
static N_INLINE(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw, dotdot___stdZenumutils_90)(NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuUnindent)(NimStringDesc* s, NI count, NimStringDesc* padding);
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, nsuToUpperAsciiChar)(NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuformatFloat)(NF f, tyEnum_FloatFormatMode__alaW5GAGZvqS9bWFnNLXFuA format, NI precision, NIM_CHAR decimalSep);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuformatBiggestFloat)(NF f, tyEnum_FloatFormatMode__alaW5GAGZvqS9bWFnNLXFuA format, NI precision, NIM_CHAR decimalSep);
N_LIB_PRIVATE N_NIMCALL(void, trimZeros__pureZstrutils_1947)(NimStringDesc** x, NIM_CHAR decimalSep);
N_LIB_PRIVATE N_NIMCALL(void, nsuDelete)(NimStringDesc** s, NI first, NI last);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_2, "0123456789ABCDEF", 16);
extern TNimType NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_;
extern TNimType NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_;
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_3, "invalid format string", 21);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_4, "strutils.nim(2014, 12) `sub.len > 0` ", 37);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_5, "String does not start with: ", 28);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_6, "\\", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_7, "String does not end in: ", 24);
extern TNimType NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_;
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_8, "c", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_9, "cpp", 3);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_10, "js", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_11, "objc", 4);
static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__JGc9b9bh2D3nTdUR7TGyq8aA_12 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_13, "invalid hex integer: ", 21);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_14, "invalid integer: ", 17);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_15, "implicitderef", 13);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_16, "dotoperators", 12);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_17, "calloperator", 12);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_18, "parallel", 8);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_19, "destructor", 10);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_20, "notnil", 6);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_21, "dynamicbindsym", 14);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_22, "forloopmacros", 13);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_23, "casestmtmacros", 14);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_24, "codereordering", 14);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_25, "compiletimeffi", 14);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_26, "vmopsdanger", 11);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_27, "strictfuncs", 11);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_28, "views", 5);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29, "strictnotnil", 12);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_30, "overloadableenums", 17);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_31, "stricteffects", 13);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_32, "unicodeoperators", 16);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_33, "flexibleoptionalparams", 22);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_34, "Invalid enum value: ", 20);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35, "allowsemcheckedastmodification", 30);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_36, "checkunsignedconversions", 24);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_37, "invalid float: ", 15);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_38, "y", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_39, "yes", 3);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_40, "true", 4);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_41, "1", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_42, "on", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_43, "n", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_44, "no", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_45, "false", 5);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_46, "0", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_47, "off", 3);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_48, "cannot interpret as a bool: ", 28);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_49, "prefername", 10);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_50, "preferdesc", 10);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_51, "preferexported", 14);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_52, "prefermoduleinfo", 16);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_53, "prefergenericarg", 16);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_54, "prefertypename", 14);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_55, "preferresolved", 14);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_56, "prefermixed", 11);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_57, "strutils.nim(740, 11) `sep.len > 0` ", 36);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_58, "\\x", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_59, "\\\\", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_60, "\\\'", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_61, "\\\"", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_62, "\012", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_63, " ", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_64, "k", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_65, "M", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_66, "G", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_67, "T", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_68, "P", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_69, "E", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_70, "Z", 1);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_71, "Y", 1);
N_LIB_PRIVATE NIM_CONST tyArray__17w6ns39bmjfAZ429aQpCFUA collPrefixes__pureZstrutils_1974 = {((NimStringDesc*) NIM_NIL),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_64),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_65),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_66),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_67),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_68),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_69),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_70),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_71)}
;
extern TNimType NTIstring__77mFvmsOLKik79ci2hXkHEg_;
N_LIB_PRIVATE TNimType NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_;
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_72, "Ki", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_73, "Mi", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_74, "Gi", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_75, "Ti", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_76, "Pi", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_77, "Ei", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_78, "Zi", 2);
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_79, "Yi", 2);
N_LIB_PRIVATE NIM_CONST tyArray__17w6ns39bmjfAZ429aQpCFUA iecPrefixes__pureZstrutils_1973 = {((NimStringDesc*) NIM_NIL),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_72),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_73),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_74),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_75),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_76),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_77),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_78),
((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_79)}
;
N_LIB_PRIVATE NIM_CONST tyArray__GeULcdNVeV0Fpy6dlDzG5Q floatFormatToChar__pureZstrutils_1860 = {103,
102,
101}
;
STRING_LITERAL(TM__JGc9b9bh2D3nTdUR7TGyq8aA_80, "B", 1);
extern tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ gch__system_5211;
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toHexImpl__pureZstrutils_711)(NU64 x, NI len, NIM_BOOL handleNegative) {
	NimStringDesc* result;
	NU64 n;
	result = NIM_NIL;
	n = x;
	result = mnewString(((NI) (len)));
	{
		NI j;
		NI colontmp_;
		NI res;
		j = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)(((NI) (len)) - ((NI) 1));
		res = colontmp_;
		{
			while (1) {
				if (!(((NI) 0) <= res)) goto LA3;
				j = res;
				result->data[j] = ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_2)->data[(NU64)(n & 15ULL)];
				n = (NU64)((NU64)(n) >> (NU64)(((NI) 4)));
				{
					NIM_BOOL T6_;
					T6_ = (NIM_BOOL)0;
					T6_ = (n == 0ULL);
					if (!(T6_)) goto LA7_;
					T6_ = handleNegative;
					LA7_: ;
					if (!T6_) goto LA8_;
					n = 18446744073709551615ULL;
				}
				LA8_: ;
				res -= ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toHex__pureZstrutils_1788)(NI x, NI len) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = toHexImpl__pureZstrutils_711(((NU64) (x)), len, (x < ((NI) 0)));
	return result;
}
static N_INLINE(NIM_CHAR, toLowerAscii__stdZprivateZstrimpl_1)(NIM_CHAR c) {
	NIM_CHAR result;
	result = (NIM_CHAR)0;
	{
		if (!(((NU8)(c)) >= ((NU8)(65)) && ((NU8)(c)) <= ((NU8)(90)))) goto LA3_;
		result = ((NIM_CHAR) (((NI) ((NI)(((NU8)(c)) + ((NI) 32))))));
	}
	goto LA1_;
	LA3_: ;
	{
		result = c;
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b) {
	NI result;
	NI aLenX60gensym24_;
	NI bLenX60gensym24_;
	NI iX60gensym24_;
	NI jX60gensym24_;
{	result = (NI)0;
	aLenX60gensym24_ = (a ? a->Sup.len : 0);
	bLenX60gensym24_ = (b ? b->Sup.len : 0);
	iX60gensym24_ = ((NI) 0);
	jX60gensym24_ = ((NI) 0);
	{
		while (1) {
			NIM_CHAR aaX60gensym24_;
			NIM_CHAR bbX60gensym24_;
			{
				while (1) {
					NIM_BOOL T5_;
					T5_ = (NIM_BOOL)0;
					T5_ = (iX60gensym24_ < aLenX60gensym24_);
					if (!(T5_)) goto LA6_;
					T5_ = ((NU8)(a->data[iX60gensym24_]) == (NU8)(95));
					LA6_: ;
					if (!T5_) goto LA4;
					iX60gensym24_ += ((NI) 1);
				} LA4: ;
			}
			{
				while (1) {
					NIM_BOOL T9_;
					T9_ = (NIM_BOOL)0;
					T9_ = (jX60gensym24_ < bLenX60gensym24_);
					if (!(T9_)) goto LA10_;
					T9_ = ((NU8)(b->data[jX60gensym24_]) == (NU8)(95));
					LA10_: ;
					if (!T9_) goto LA8;
					jX60gensym24_ += ((NI) 1);
				} LA8: ;
			}
			{
				if (!(iX60gensym24_ < aLenX60gensym24_)) goto LA13_;
				aaX60gensym24_ = toLowerAscii__stdZprivateZstrimpl_1(a->data[iX60gensym24_]);
			}
			goto LA11_;
			LA13_: ;
			{
				aaX60gensym24_ = 0;
			}
			LA11_: ;
			{
				if (!(jX60gensym24_ < bLenX60gensym24_)) goto LA18_;
				bbX60gensym24_ = toLowerAscii__stdZprivateZstrimpl_1(b->data[jX60gensym24_]);
			}
			goto LA16_;
			LA18_: ;
			{
				bbX60gensym24_ = 0;
			}
			LA16_: ;
			result = (NI)(((NU8)(aaX60gensym24_)) - ((NU8)(bbX60gensym24_)));
			{
				if (!!((result == ((NI) 0)))) goto LA23_;
				goto BeforeRet_;
			}
			LA23_: ;
			{
				if (!(aLenX60gensym24_ <= iX60gensym24_)) goto LA27_;
				{
					if (!(bLenX60gensym24_ <= jX60gensym24_)) goto LA31_;
					result = ((NI) 0);
					goto BeforeRet_;
				}
				LA31_: ;
				result = ((NI) -1);
				goto BeforeRet_;
			}
			goto LA25_;
			LA27_: ;
			{
				if (!(bLenX60gensym24_ <= jX60gensym24_)) goto LA34_;
				result = ((NI) 1);
				goto BeforeRet_;
			}
			goto LA25_;
			LA34_: ;
			LA25_: ;
			iX60gensym24_ += ((NI) 1);
			jX60gensym24_ += ((NI) 1);
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, allCharsInSet__pureZstrutils_1341)(NimStringDesc* s, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw theSet) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	{
		NIM_CHAR c;
		NI i;
		NI L;
		c = (NIM_CHAR)0;
		i = ((NI) 0);
		L = (s ? s->Sup.len : 0);
		{
			while (1) {
				if (!(i < L)) goto LA3;
				c = s->data[i];
				{
					if (!!(((theSet[(NU)(((NU8)(c)))>>3] &(1U<<((NU)(((NU8)(c)))&7U)))!=0))) goto LA6_;
					result = NIM_FALSE;
					goto BeforeRet_;
				}
				LA6_: ;
				i += ((NI) 1);
			} LA3: ;
		}
	}
	result = NIM_TRUE;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU32)(((NU) (x))) - (NU32)(((NU) (y))))));
	return result;
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s) {
	NCSTRING result;
	result = (NCSTRING)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (s == ((NimStringDesc*) NIM_NIL));
		if (T3_) goto LA4_;
		T3_ = ((*s).Sup.len == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		result = "";
	}
	goto LA1_;
	LA5_: ;
	{
		result = ((NCSTRING) ((*s).data));
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s, NIM_CHAR sub, NI start, NI last) {
	NI result;
	NI last_2;
	NI L;
{	result = (NI)0;
	{
		if (!(last == ((NI) 0))) goto LA3_;
		last_2 = ((s ? s->Sup.len : 0)-1);
	}
	goto LA1_;
	LA3_: ;
	{
		last_2 = last;
	}
	LA1_: ;
	L = (NI)((NI)(last_2 - ((NI) (start))) + ((NI) 1));
	{
		void* found;
		if (!(((NI) 0) < L)) goto LA8_;
		found = memchr(((void*) ((&s->data[start]))), sub, ((size_t) (L)));
		{
			if (!!((found == 0))) goto LA12_;
			result = minuspercent___system_716(((NI) (ptrdiff_t) (found)), ((NI) (nimToCStringConv(s))));
			goto BeforeRet_;
		}
		LA12_: ;
	}
	LA8_: ;
	result = ((NI) -1);
	goto BeforeRet_;
	}BeforeRet_: ;
	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_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuInitSkipTable)(NI* a, NimStringDesc* sub) {
	NI m;
	m = (sub ? sub->Sup.len : 0);
	fill__pureZstrutils_1405(a, 256, m);
	{
		NI i;
		NI colontmp_;
		NI i_2;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)(m - ((NI) 1));
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < colontmp_)) goto LA3;
				i = i_2;
				a[(((NU8)(sub->data[i])))- 0] = (NI)((NI)(m - ((NI) 1)) - i);
				i_2 += ((NI) 1);
			} LA3: ;
		}
	}
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStrA)(tyArray__9cc9aPiDa8VaWjVcFLabEDZQ a, NimStringDesc* s, NimStringDesc* sub, NI start, NI last) {
	NI result;
	NI last_2;
	NI subLast;
	NI skip;
{	result = (NI)0;
	{
		if (!(last == ((NI) 0))) goto LA3_;
		last_2 = ((s ? s->Sup.len : 0)-1);
	}
	goto LA1_;
	LA3_: ;
	{
		last_2 = last;
	}
	LA1_: ;
	subLast = (NI)((sub ? sub->Sup.len : 0) - ((NI) 1));
	{
		if (!(subLast == ((NI) -1))) goto LA8_;
		result = ((NI) (start));
		goto BeforeRet_;
	}
	LA8_: ;
	skip = start;
	{
		while (1) {
			NI i;
			if (!(subLast <= (NI)(last_2 - ((NI) (skip))))) goto LA11;
			i = subLast;
			{
				while (1) {
					if (!((NU8)(s->data[(NI)(((NI) (skip)) + i)]) == (NU8)(sub->data[i]))) goto LA13;
					{
						if (!(i == ((NI) 0))) goto LA16_;
						result = ((NI) (skip));
						goto BeforeRet_;
					}
					LA16_: ;
					i -= ((NI) 1);
				} LA13: ;
			}
			skip += a[(((NU8)(s->data[(NI)(((NI) (skip)) + subLast)])))- 0];
		} LA11: ;
	}
	result = ((NI) -1);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s, NimStringDesc* sub, NimStringDesc* by) {
	NimStringDesc* result;
	NI subLen;
	result = NIM_NIL;
	result = ((NimStringDesc*) NIM_NIL);
	subLen = (sub ? sub->Sup.len : 0);
	{
		if (!(subLen == ((NI) 0))) goto LA3_;
		result = copyString(s);
	}
	goto LA1_;
	LA3_: ;
	{
		NIM_CHAR c;
		NI last;
		NI i;
		NimStringDesc* T15_;
		if (!(subLen == ((NI) 1))) goto LA6_;
		c = sub->data[((NI) 0)];
		last = ((s ? s->Sup.len : 0)-1);
		i = ((NI) 0);
		{
			while (1) {
				NI j;
				NimStringDesc* T14_;
				j = nsuFindChar(s, c, ((NI) (i)), last);
				{
					if (!(j < ((NI) 0))) goto LA12_;
					goto LA8;
				}
				LA12_: ;
				T14_ = NIM_NIL;
				T14_ = substr__system_7724(s, i, (NI)(j - ((NI) 1)));
				result = resizeString(result, (T14_ ? T14_->Sup.len : 0) + 0);
appendString(result, T14_);
				result = resizeString(result, (by ? by->Sup.len : 0) + 0);
appendString(result, by);
				i = (NI)(j + subLen);
			}
		} LA8: ;
		T15_ = NIM_NIL;
		T15_ = substr__system_7736(s, i);
		result = resizeString(result, (T15_ ? T15_->Sup.len : 0) + 0);
appendString(result, T15_);
	}
	goto LA1_;
	LA6_: ;
	{
		tyArray__9cc9aPiDa8VaWjVcFLabEDZQ a;
		NI last_2;
		NI i_2;
		NimStringDesc* T24_;
		nsuInitSkipTable(a, sub);
		last_2 = ((s ? s->Sup.len : 0)-1);
		i_2 = ((NI) 0);
		{
			while (1) {
				NI j_2;
				NimStringDesc* T23_;
				j_2 = nsuFindStrA(a, s, sub, ((NI) (i_2)), last_2);
				{
					if (!(j_2 < ((NI) 0))) goto LA21_;
					goto LA17;
				}
				LA21_: ;
				T23_ = NIM_NIL;
				T23_ = substr__system_7724(s, i_2, (NI)(j_2 - ((NI) 1)));
				result = resizeString(result, (T23_ ? T23_->Sup.len : 0) + 0);
appendString(result, T23_);
				result = resizeString(result, (by ? by->Sup.len : 0) + 0);
appendString(result, by);
				i_2 = (NI)(j_2 + subLen);
			}
		} LA17: ;
		T24_ = NIM_NIL;
		T24_ = substr__system_7736(s, i_2);
		result = resizeString(result, (T24_ ? T24_->Sup.len : 0) + 0);
appendString(result, T24_);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s, NimStringDesc* suffix) {
	NIM_BOOL result;
	NI suffixLenX60gensym145_;
	NI sLenX60gensym145_;
	NI iX60gensym145_;
	NI jX60gensym145_;
{	result = (NIM_BOOL)0;
	suffixLenX60gensym145_ = (suffix ? suffix->Sup.len : 0);
	sLenX60gensym145_ = (s ? s->Sup.len : 0);
	iX60gensym145_ = ((NI) 0);
	jX60gensym145_ = (NI)(sLenX60gensym145_ - suffixLenX60gensym145_);
	{
		while (1) {
			NIM_BOOL T3_;
			T3_ = (NIM_BOOL)0;
			T3_ = (((NI) 0) <= (NI)(iX60gensym145_ + jX60gensym145_));
			if (!(T3_)) goto LA4_;
			T3_ = ((NI)(iX60gensym145_ + jX60gensym145_) < sLenX60gensym145_);
			LA4_: ;
			if (!T3_) goto LA2;
			{
				if (!!(((NU8)(s->data[(NI)(iX60gensym145_ + jX60gensym145_)]) == (NU8)(suffix->data[iX60gensym145_])))) goto LA7_;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
			LA7_: ;
			iX60gensym145_ += ((NI) 1);
		} LA2: ;
	}
	{
		if (!(suffixLenX60gensym145_ <= iX60gensym145_)) goto LA11_;
		result = NIM_TRUE;
		goto BeforeRet_;
	}
	LA11_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuNormalize)(NimStringDesc* s) {
	NimStringDesc* result;
	NI j;
	result = NIM_NIL;
	result = mnewString(((NI) ((s ? s->Sup.len : 0))));
	j = ((NI) 0);
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)((s ? s->Sup.len : 0) - ((NI) 1));
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				{
					if (!(((NU8)(s->data[i])) >= ((NU8)(65)) && ((NU8)(s->data[i])) <= ((NU8)(90)))) goto LA6_;
					result->data[j] = ((NIM_CHAR) (((NI) ((NI)(((NU8)(s->data[i])) + ((NI) 32))))));
					j += ((NI) 1);
				}
				goto LA4_;
				LA6_: ;
				{
					if (!!(((NU8)(s->data[i]) == (NU8)(95)))) goto LA9_;
					result->data[j] = s->data[i];
					j += ((NI) 1);
				}
				goto LA4_;
				LA9_: ;
				LA4_: ;
				res += ((NI) 1);
			} LA3: ;
		}
	}
	{
		if (!!((j == (s ? s->Sup.len : 0)))) goto LA13_;
		result = setLengthStr(result, ((NI) (j)));
	}
	LA13_: ;
	return result;
}
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = ((NU32)(((NU) (x))) < (NU32)(((NU) (y))));
	return result;
}
static N_INLINE(void, rtlAddZCT__system_5307)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	addZCT__system_5258((&gch__system_5211.zct), c);
}
static N_INLINE(void, decRef__system_5309)(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_5307(c);
	}
	LA4_: ;
}
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5264)(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) 8));
	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_5264(p);
	decRef__system_5309(T1_);
}
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU32)(((NU) (x))) + (NU32)(((NU) (y))))));
	return result;
}
static N_INLINE(void, incRef__system_5302)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	(*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
}
static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T5_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
		T5_ = usrToCell__system_5264(src);
		incRef__system_5302(T5_);
	}
	LA3_: ;
	{
		tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T10_;
		if (!!(((*dest) == NIM_NIL))) goto LA8_;
		T10_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
		T10_ = usrToCell__system_5264((*dest));
		decRef__system_5309(T10_);
	}
	LA8_: ;
	(*dest) = src;
}
N_LIB_PRIVATE N_NOINLINE(void, invalidFormatString__pureZstrutils_2120)(void) {
	tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T1_;
	NimStringDesc* T2_;
	T1_ = NIM_NIL;
	T1_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
	(*T1_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
	(*T1_).Sup.Sup.name = "ValueError";
	T2_ = NIM_NIL;
	T2_ = (*T1_).Sup.Sup.message; (*T1_).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_3));
	if (T2_) nimGCunrefNoCycle(T2_);
	asgnRef((void**) (&(*T1_).Sup.Sup.parent), ((Exception*) NIM_NIL));
	raiseExceptionEx((Exception*)T1_, "ValueError", "invalidFormatString", "strutils.nim", 2650);
}
N_LIB_PRIVATE N_NIMCALL(NI, findNormalized__pureZstrutils_2108)(NimStringDesc* x, NimStringDesc** inArray, NI inArrayLen_0) {
	NI result;
	NI i;
{	result = (NI)0;
	i = ((NI) 0);
	{
		while (1) {
			if (!(i < (inArrayLen_0-1))) goto LA2;
			{
				NI T5_;
				T5_ = (NI)0;
				T5_ = nsuCmpIgnoreStyle(x, inArray[i]);
				if (!(T5_ == ((NI) 0))) goto LA6_;
				result = i;
				goto BeforeRet_;
			}
			LA6_: ;
			i += ((NI) 2);
		} LA2: ;
	}
	result = ((NI) -1);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuAddf)(NimStringDesc** s, NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0) {
	NI i;
	NI num;
	i = ((NI) 0);
	num = ((NI) 0);
	{
		while (1) {
			if (!(i < (formatstr ? formatstr->Sup.len : 0))) goto LA2;
			{
				NIM_BOOL T5_;
				T5_ = (NIM_BOOL)0;
				T5_ = ((NU8)(formatstr->data[i]) == (NU8)(36));
				if (!(T5_)) goto LA6_;
				T5_ = ((NI)(i + ((NI) 1)) < (formatstr ? formatstr->Sup.len : 0));
				LA6_: ;
				if (!T5_) goto LA7_;
				switch (((NU8)(formatstr->data[(NI)(i + ((NI) 1))]))) {
				case 35:
				{
					{
						if (!((aLen_0-1) < num)) goto LA12_;
						invalidFormatString__pureZstrutils_2120();
					}
					LA12_: ;
					unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[num] ? a[num]->Sup.len : 0) + 0));
appendString((*s), a[num]);
					i += ((NI) 2);
					num += ((NI) 1);
				}
				break;
				case 36:
				{
					unsureAsgnRef((void**) (&(*s)), addChar((*s), 36));
					i += ((NI) 2);
				}
				break;
				case 49 ... 57:
				case 45:
				{
					NI j;
					NIM_BOOL negative;
					NI idx;
					j = ((NI) 0);
					i += ((NI) 1);
					negative = ((NU8)(formatstr->data[i]) == (NU8)(45));
					{
						if (!negative) goto LA18_;
						i += ((NI) 1);
					}
					LA18_: ;
					{
						while (1) {
							NIM_BOOL T22_;
							T22_ = (NIM_BOOL)0;
							T22_ = (i < (formatstr ? formatstr->Sup.len : 0));
							if (!(T22_)) goto LA23_;
							T22_ = (((NU8)(formatstr->data[i])) >= ((NU8)(48)) && ((NU8)(formatstr->data[i])) <= ((NU8)(57)));
							LA23_: ;
							if (!T22_) goto LA21;
							j = (NI)((NI)((NI)(j * ((NI) 10)) + ((NU8)(formatstr->data[i]))) - ((NI) 48));
							i += ((NI) 1);
						} LA21: ;
					}
					{
						if (!!(negative)) goto LA26_;
						idx = (NI)(j - ((NI) 1));
					}
					goto LA24_;
					LA26_: ;
					{
						idx = (NI)(aLen_0 - j);
					}
					LA24_: ;
					{
						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_2120();
					}
					LA33_: ;
					unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[idx] ? a[idx]->Sup.len : 0) + 0));
appendString((*s), a[idx]);
				}
				break;
				case 123:
				{
					NI j_2;
					NI k;
					NIM_BOOL negative_2;
					NI isNumber;
					j_2 = (NI)(i + ((NI) 2));
					k = ((NI) 0);
					negative_2 = ((NU8)(formatstr->data[j_2]) == (NU8)(45));
					{
						if (!negative_2) goto LA38_;
						j_2 += ((NI) 1);
					}
					LA38_: ;
					isNumber = ((NI) 0);
					{
						while (1) {
							NIM_BOOL T42_;
							T42_ = (NIM_BOOL)0;
							T42_ = (j_2 < (formatstr ? formatstr->Sup.len : 0));
							if (!(T42_)) goto LA43_;
							T42_ = !((((NU8)(formatstr->data[j_2])) == ((NU8)(0)) || ((NU8)(formatstr->data[j_2])) == ((NU8)(125))));
							LA43_: ;
							if (!T42_) goto LA41;
							{
								if (!(((NU8)(formatstr->data[j_2])) >= ((NU8)(48)) && ((NU8)(formatstr->data[j_2])) <= ((NU8)(57)))) goto LA46_;
								k = (NI)((NI)((NI)(k * ((NI) 10)) + ((NU8)(formatstr->data[j_2]))) - ((NI) 48));
								{
									if (!(isNumber == ((NI) 0))) goto LA50_;
									isNumber = ((NI) 1);
								}
								LA50_: ;
							}
							goto LA44_;
							LA46_: ;
							{
								isNumber = ((NI) -1);
							}
							LA44_: ;
							j_2 += ((NI) 1);
						} LA41: ;
					}
					{
						NI idx_2;
						if (!(isNumber == ((NI) 1))) goto LA55_;
						{
							if (!!(negative_2)) goto LA59_;
							idx_2 = (NI)(k - ((NI) 1));
						}
						goto LA57_;
						LA59_: ;
						{
							idx_2 = (NI)(aLen_0 - k);
						}
						LA57_: ;
						{
							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_2120();
						}
						LA66_: ;
						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;
						NimStringDesc* T69_;
						T69_ = NIM_NIL;
						T69_ = substr__system_7724(formatstr, (NI)(i + ((NI) 2)), (NI)(j_2 - ((NI) 1)));
						x = findNormalized__pureZstrutils_2108(T69_, a, aLen_0);
						{
							NIM_BOOL T72_;
							T72_ = (NIM_BOOL)0;
							T72_ = (((NI) 0) <= x);
							if (!(T72_)) goto LA73_;
							T72_ = (x < (aLen_0-1));
							LA73_: ;
							if (!T72_) goto LA74_;
							unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[(NI)(x + ((NI) 1))] ? a[(NI)(x + ((NI) 1))]->Sup.len : 0) + 0));
appendString((*s), a[(NI)(x + ((NI) 1))]);
						}
						goto LA70_;
						LA74_: ;
						{
							invalidFormatString__pureZstrutils_2120();
						}
						LA70_: ;
					}
					LA53_: ;
					i = (NI)(j_2 + ((NI) 1));
				}
				break;
				case 97 ... 122:
				case 65 ... 90:
				case 128 ... 255:
				case 95:
				{
					NI j_3;
					NI x_2;
					NimStringDesc* T82_;
					j_3 = (NI)(i + ((NI) 1));
					{
						while (1) {
							NIM_BOOL T80_;
							T80_ = (NIM_BOOL)0;
							T80_ = (j_3 < (formatstr ? formatstr->Sup.len : 0));
							if (!(T80_)) goto LA81_;
							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;
							j_3 += ((NI) 1);
						} LA79: ;
					}
					T82_ = NIM_NIL;
					T82_ = substr__system_7724(formatstr, (NI)(i + ((NI) 1)), (NI)(j_3 - ((NI) 1)));
					x_2 = findNormalized__pureZstrutils_2108(T82_, a, aLen_0);
					{
						NIM_BOOL T85_;
						T85_ = (NIM_BOOL)0;
						T85_ = (((NI) 0) <= x_2);
						if (!(T85_)) goto LA86_;
						T85_ = (x_2 < (aLen_0-1));
						LA86_: ;
						if (!T85_) goto LA87_;
						unsureAsgnRef((void**) (&(*s)), resizeString((*s), (a[(NI)(x_2 + ((NI) 1))] ? a[(NI)(x_2 + ((NI) 1))]->Sup.len : 0) + 0));
appendString((*s), a[(NI)(x_2 + ((NI) 1))]);
					}
					goto LA83_;
					LA87_: ;
					{
						invalidFormatString__pureZstrutils_2120();
					}
					LA83_: ;
					i = j_3;
				}
				break;
				default:
				{
					invalidFormatString__pureZstrutils_2120();
				}
				break;
				}
			}
			goto LA3_;
			LA7_: ;
			{
				unsureAsgnRef((void**) (&(*s)), addChar((*s), formatstr->data[i]));
				i += ((NI) 1);
			}
			LA3_: ;
		} LA2: ;
	}
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatVarargs)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = rawNewString(((NI) ((NI)((formatstr ? formatstr->Sup.len : 0) + aLen_0))));
	nsuAddf((&result), formatstr, a, aLen_0);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b) {
	NI result;
	NI aLenX60gensym20_;
	NI bLenX60gensym20_;
	NI iX60gensym20_;
	NI mX60gensym20_;
{	result = (NI)0;
	aLenX60gensym20_ = (a ? a->Sup.len : 0);
	bLenX60gensym20_ = (b ? b->Sup.len : 0);
	iX60gensym20_ = ((NI) 0);
	mX60gensym20_ = ((aLenX60gensym20_ <= bLenX60gensym20_) ? aLenX60gensym20_ : bLenX60gensym20_);
	{
		while (1) {
			NIM_CHAR T3_;
			NIM_CHAR T4_;
			if (!(iX60gensym20_ < mX60gensym20_)) goto LA2;
			T3_ = (NIM_CHAR)0;
			T3_ = toLowerAscii__stdZprivateZstrimpl_1(a->data[iX60gensym20_]);
			T4_ = (NIM_CHAR)0;
			T4_ = toLowerAscii__stdZprivateZstrimpl_1(b->data[iX60gensym20_]);
			result = (NI)(((NU8)(T3_)) - ((NU8)(T4_)));
			{
				if (!!((result == ((NI) 0)))) goto LA7_;
				goto BeforeRet_;
			}
			LA7_: ;
			iX60gensym20_ += ((NI) 1);
		} LA2: ;
	}
	result = (NI)(aLenX60gensym20_ - bLenX60gensym20_);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringDesc* s, NimStringDesc* prefix) {
	NIM_BOOL result;
	NI prefixLenX60gensym138_;
	NI sLenX60gensym138_;
	NI iX60gensym138_;
{	result = (NIM_BOOL)0;
	prefixLenX60gensym138_ = (prefix ? prefix->Sup.len : 0);
	sLenX60gensym138_ = (s ? s->Sup.len : 0);
	iX60gensym138_ = ((NI) 0);
	{
		while (1) {
			{
				if (!(prefixLenX60gensym138_ <= iX60gensym138_)) goto LA5_;
				result = NIM_TRUE;
				goto BeforeRet_;
			}
			LA5_: ;
			{
				NIM_BOOL T9_;
				T9_ = (NIM_BOOL)0;
				T9_ = (sLenX60gensym138_ <= iX60gensym138_);
				if (T9_) goto LA10_;
				T9_ = !(((NU8)(s->data[iX60gensym138_]) == (NU8)(prefix->data[iX60gensym138_])));
				LA10_: ;
				if (!T9_) goto LA11_;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
			LA11_: ;
			iX60gensym138_ += ((NI) 1);
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuInitNewSkipTable)(NimStringDesc* sub, tyArray__9cc9aPiDa8VaWjVcFLabEDZQ Result) {
	nsuInitSkipTable(Result, sub);
}
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
	nimSetMem__systemZmemory_7(p, ((int) 0), size);
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start, NI last) {
	NI result;
	tyArray__9cc9aPiDa8VaWjVcFLabEDZQ T9_;
{	result = (NI)0;
	{
		if (!((NI)((s ? s->Sup.len : 0) - ((NI) (start))) < (sub ? sub->Sup.len : 0))) goto LA3_;
		result = ((NI) -1);
		goto BeforeRet_;
	}
	LA3_: ;
	{
		if (!((sub ? sub->Sup.len : 0) == ((NI) 1))) goto LA7_;
		result = nsuFindChar(s, sub->data[((NI) 0)], start, last);
		goto BeforeRet_;
	}
	LA7_: ;
	nimZeroMem((void*)T9_, sizeof(tyArray__9cc9aPiDa8VaWjVcFLabEDZQ));
	nsuInitNewSkipTable(sub, T9_);
	result = nsuFindStrA(T9_, s, sub, start, last);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCountString)(NimStringDesc* s, NimStringDesc* sub, NIM_BOOL overlapping) {
	NI result;
	NI i;
	result = (NI)0;
	{
		if (!!((((NI) 0) < (sub ? sub->Sup.len : 0)))) goto LA3_;
		failedAssertImpl__systemZassertions_56(((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_4));
	}
	LA3_: ;
	result = ((NI) 0);
	i = ((NI) 0);
	{
		while (1) {
			i = nsuFindStr(s, sub, ((NI) (i)), ((NI) 0));
			{
				if (!(i < ((NI) 0))) goto LA9_;
				goto LA5;
			}
			LA9_: ;
			{
				if (!overlapping) goto LA13_;
				i += ((NI) 1);
			}
			goto LA11_;
			LA13_: ;
			{
				i += (sub ? sub->Sup.len : 0);
			}
			LA11_: ;
			result += ((NI) 1);
		}
	} LA5: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = mnewString(count);
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)(((NI) (count)) - ((NI) 1));
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				result->data[i] = c;
				res += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = rawNewString(((NI) ((NI)((formatstr ? formatstr->Sup.len : 0) + (NI)((NU32)(aLen_0) << (NU32)(((NI) 4)))))));
	nsuAddf((&result), formatstr, a, aLen_0);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a) {
	NimStringDesc* result;
	tyArray__nHXaesL0DJZHyVS07ARPRA T1_;
	result = NIM_NIL;
	result = rawNewString(((NI) ((NI)((formatstr ? formatstr->Sup.len : 0) + (a ? a->Sup.len : 0)))));
	nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
	T1_[0] = copyString(a);
	nsuAddf((&result), formatstr, T1_, 1);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, nsuToLowerAsciiChar)(NIM_CHAR c) {
	NIM_CHAR result;
	result = (NIM_CHAR)0;
	{
		if (!(((NU8)(c)) >= ((NU8)(65)) && ((NU8)(c)) <= ((NU8)(90)))) goto LA3_;
		result = ((NIM_CHAR) ((NU8)(((NU8) (((NU8)(c)))) ^ ((NU8) 32))));
	}
	goto LA1_;
	LA3_: ;
	{
		result = c;
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuToLowerAsciiStr)(NimStringDesc* s) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = mnewString(((NI) ((s ? s->Sup.len : 0))));
	{
		NI iX60gensym7_;
		NI colontmp_;
		NI res;
		iX60gensym7_ = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)((s ? s->Sup.len : 0) - ((NI) 1));
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA3;
				iX60gensym7_ = res;
				result->data[iX60gensym7_] = nsuToLowerAsciiChar(s->data[iX60gensym7_]);
				res += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_1627)(NimStringDesc* s, NimStringDesc* sub) {
	NIM_BOOL result;
	NI T1_;
{	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = nsuFindStr(s, sub, ((NI) 0), ((NI) 0));
	result = (((NI) 0) <= T1_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
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);
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuUnescape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix) {
	NimStringDesc* result;
	NI i;
	result = NIM_NIL;
	result = rawNewString(((NI) ((s ? s->Sup.len : 0))));
	i = (prefix ? prefix->Sup.len : 0);
	{
		NIM_BOOL T3_;
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T6_;
		NimStringDesc* T7_;
		T3_ = (NIM_BOOL)0;
		T3_ = nsuStartsWith(s, prefix);
		if (!!(T3_)) goto LA4_;
		T6_ = NIM_NIL;
		T6_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T6_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T6_).Sup.Sup.name = "ValueError";
		T7_ = NIM_NIL;
		T7_ = rawNewString((prefix ? prefix->Sup.len : 0) + 28);
appendString(T7_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_5));
appendString(T7_, prefix);
		asgnRef((void**) (&(*T6_).Sup.Sup.message), T7_);
		asgnRef((void**) (&(*T6_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T6_, "ValueError", "unescape", "strutils.nim", 2270);
	}
	LA4_: ;
	{
		while (1) {
			{
				if (!((NI)((s ? s->Sup.len : 0) - (suffix ? suffix->Sup.len : 0)) <= i)) goto LA12_;
				goto LA8;
			}
			LA12_: ;
			{
				if (!((NU8)(s->data[i]) == (NU8)(92))) goto LA16_;
				{
					if (!((s ? s->Sup.len : 0) <= (NI)(i + ((NI) 1)))) goto LA20_;
					result = addChar(result, 92);
					goto LA8;
				}
				LA20_: ;
				switch (((NU8)(s->data[(NI)(i + ((NI) 1))]))) {
				case 120:
				{
					NI c;
					NI T23_;
					i += ((NI) 2);
					c = ((NI) 0);
					T23_ = (NI)0;
					T23_ = parseHex__pureZstrutils_895(s, (&c), i, ((NI) 2));
					i += T23_;
					result = addChar(result, ((NIM_CHAR) (((NI) (c)))));
					i -= ((NI) 2);
				}
				break;
				case 92:
				{
					result = addChar(result, 92);
				}
				break;
				case 39:
				{
					result = addChar(result, 39);
				}
				break;
				case 34:
				{
					result = addChar(result, 34);
				}
				break;
				default:
				{
					NimStringDesc* T28_;
					T28_ = NIM_NIL;
					T28_ = rawNewString(2);
appendString(T28_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_6));
appendChar(T28_, s->data[(NI)(i + ((NI) 1))]);
					result = resizeString(result, (T28_ ? T28_->Sup.len : 0) + 0);
appendString(result, T28_);
				}
				break;
				}
				i += ((NI) 2);
			}
			goto LA14_;
			LA16_: ;
			{
				result = addChar(result, s->data[i]);
				i += ((NI) 1);
			}
			LA14_: ;
		}
	} LA8: ;
	{
		NIM_BOOL T32_;
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T35_;
		NimStringDesc* T36_;
		T32_ = (NIM_BOOL)0;
		T32_ = nsuEndsWith(s, suffix);
		if (!!(T32_)) goto LA33_;
		T35_ = NIM_NIL;
		T35_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T35_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T35_).Sup.Sup.name = "ValueError";
		T36_ = NIM_NIL;
		T36_ = rawNewString((suffix ? suffix->Sup.len : 0) + 24);
appendString(T36_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_7));
appendString(T36_, suffix);
		asgnRef((void**) (&(*T35_).Sup.Sup.message), T36_);
		asgnRef((void**) (&(*T35_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T35_, "ValueError", "unescape", "strutils.nim", 2298);
	}
	LA33_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuRFindChar)(NimStringDesc* s, NIM_CHAR sub, NI start, NI last) {
	NI result;
	NI last_2;
{	result = (NI)0;
	{
		if (!(last == ((NI) -1))) goto LA3_;
		last_2 = ((s ? s->Sup.len : 0)-1);
	}
	goto LA1_;
	LA3_: ;
	{
		last_2 = last;
	}
	LA1_: ;
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = ((NI) (start));
		res = last_2;
		{
			while (1) {
				if (!(colontmp_ <= res)) goto LA8;
				i = res;
				{
					if (!((NU8)(sub) == (NU8)(s->data[i]))) goto LA11_;
					result = i;
					goto BeforeRet_;
				}
				LA11_: ;
				res -= ((NI) 1);
			} LA8: ;
		}
	}
	result = ((NI) -1);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuRFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start, NI last) {
	NI result;
	NI last_2;
{	result = (NI)0;
	{
		if (!((sub ? sub->Sup.len : 0) == ((NI) 0))) goto LA3_;
		result = ((NI) -1);
		goto BeforeRet_;
	}
	LA3_: ;
	{
		if (!((NI)((s ? s->Sup.len : 0) - ((NI) (start))) < (sub ? sub->Sup.len : 0))) goto LA7_;
		result = ((NI) -1);
		goto BeforeRet_;
	}
	LA7_: ;
	{
		if (!(last == ((NI) -1))) goto LA11_;
		last_2 = ((s ? s->Sup.len : 0)-1);
	}
	goto LA9_;
	LA11_: ;
	{
		last_2 = last;
	}
	LA9_: ;
	result = ((NI) 0);
	{
		NI i;
		NI colontmp_;
		NI colontmp__2;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp__2 = (NI)0;
		colontmp_ = (NI)((NI)(last_2 - (sub ? sub->Sup.len : 0)) + ((NI) 1));
		colontmp__2 = ((NI) (start));
		res = colontmp_;
		{
			while (1) {
				if (!(colontmp__2 <= res)) goto LA16;
				i = res;
				{
					NI j;
					NI colontmp__3;
					NI res_2;
					j = (NI)0;
					colontmp__3 = (NI)0;
					colontmp__3 = (NI)((sub ? sub->Sup.len : 0) - ((NI) 1));
					res_2 = ((NI) 0);
					{
						while (1) {
							if (!(res_2 <= colontmp__3)) goto LA19;
							j = res_2;
							result = i;
							{
								if (!!(((NU8)(sub->data[j]) == (NU8)(s->data[(NI)(i + j)])))) goto LA22_;
								result = ((NI) -1);
								goto LA17;
							}
							LA22_: ;
							res_2 += ((NI) 1);
						} LA19: ;
					}
				} LA17: ;
				{
					if (!!((result == ((NI) -1)))) goto LA26_;
					goto BeforeRet_;
				}
				LA26_: ;
				res -= ((NI) 1);
			} LA16: ;
		}
	}
	result = ((NI) -1);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitChar)(NimStringDesc* s, NIM_CHAR sep, NI maxsplit) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* result;
	result = NIM_NIL;
	result = NIM_NIL;
	{
		NimStringDesc* xX60gensym66_;
		NI lastX60gensym33_;
		NI splitsX60gensym33_;
		xX60gensym66_ = NIM_NIL;
		lastX60gensym33_ = ((NI) 0);
		splitsX60gensym33_ = maxsplit;
		{
			while (1) {
				NI firstX60gensym33_;
				NI T12_;
				NimStringDesc* T13_;
				if (!(lastX60gensym33_ <= (s ? s->Sup.len : 0))) goto LA3;
				firstX60gensym33_ = lastX60gensym33_;
				{
					while (1) {
						NIM_BOOL T6_;
						T6_ = (NIM_BOOL)0;
						T6_ = (lastX60gensym33_ < (s ? s->Sup.len : 0));
						if (!(T6_)) goto LA7_;
						T6_ = !(((NU8)(s->data[lastX60gensym33_]) == (NU8)(sep)));
						LA7_: ;
						if (!T6_) goto LA5;
						lastX60gensym33_ += ((NI) 1);
					} LA5: ;
				}
				{
					if (!(splitsX60gensym33_ == ((NI) 0))) goto LA10_;
					lastX60gensym33_ = (s ? s->Sup.len : 0);
				}
				LA10_: ;
				xX60gensym66_ = substr__system_7724(s, firstX60gensym33_, (NI)(lastX60gensym33_ - ((NI) 1)));
				result = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV3((TGenericSeq*)(result), (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_));
				T12_ = result->Sup.len++;
				T13_ = NIM_NIL;
				T13_ = result->data[T12_]; result->data[T12_] = copyStringRC1(xX60gensym66_);
				if (T13_) nimGCunrefNoCycle(T13_);
				{
					if (!(splitsX60gensym33_ == ((NI) 0))) goto LA16_;
					goto LA2;
				}
				LA16_: ;
				splitsX60gensym33_ -= ((NI) 1);
				lastX60gensym33_ += ((NI) 1);
			} LA3: ;
		} LA2: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitLines)(NimStringDesc* s, NIM_BOOL keepEol) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* result;
	result = NIM_NIL;
	result = NIM_NIL;
	{
		NimStringDesc* xX60gensym75_;
		NI first;
		NI last;
		NI eolpos;
		xX60gensym75_ = NIM_NIL;
		first = ((NI) 0);
		last = ((NI) 0);
		eolpos = ((NI) 0);
		{
			while (1) {
				NI T25_;
				NI T31_;
				NimStringDesc* T32_;
				{
					while (1) {
						NIM_BOOL T6_;
						T6_ = (NIM_BOOL)0;
						T6_ = (last < (s ? s->Sup.len : 0));
						if (!(T6_)) goto LA7_;
						T6_ = !((((NU8)(s->data[last])) == ((NU8)(13)) || ((NU8)(s->data[last])) == ((NU8)(10))));
						LA7_: ;
						if (!T6_) goto LA5;
						last += ((NI) 1);
					} LA5: ;
				}
				eolpos = last;
				{
					if (!(last < (s ? s->Sup.len : 0))) goto LA10_;
					{
						if (!((NU8)(s->data[last]) == (NU8)(10))) goto LA14_;
						last += ((NI) 1);
					}
					goto LA12_;
					LA14_: ;
					{
						if (!((NU8)(s->data[last]) == (NU8)(13))) goto LA17_;
						last += ((NI) 1);
						{
							NIM_BOOL T21_;
							T21_ = (NIM_BOOL)0;
							T21_ = (last < (s ? s->Sup.len : 0));
							if (!(T21_)) goto LA22_;
							T21_ = ((NU8)(s->data[last]) == (NU8)(10));
							LA22_: ;
							if (!T21_) goto LA23_;
							last += ((NI) 1);
						}
						LA23_: ;
					}
					goto LA12_;
					LA17_: ;
					LA12_: ;
				}
				LA10_: ;
				T25_ = (NI)0;
				{
					if (!keepEol) goto LA28_;
					T25_ = (NI)(last - ((NI) 1));
				}
				goto LA26_;
				LA28_: ;
				{
					T25_ = (NI)(eolpos - ((NI) 1));
				}
				LA26_: ;
				xX60gensym75_ = substr__system_7724(s, first, T25_);
				result = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV3((TGenericSeq*)(result), (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_));
				T31_ = result->Sup.len++;
				T32_ = NIM_NIL;
				T32_ = result->data[T31_]; result->data[T31_] = copyStringRC1(xX60gensym75_);
				if (T32_) nimGCunrefNoCycle(T32_);
				{
					if (!(eolpos == last)) goto LA35_;
					goto LA2;
				}
				LA35_: ;
				first = last;
			}
		} LA2: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuReplaceChar)(NimStringDesc* s, NIM_CHAR sub, NIM_CHAR by) {
	NimStringDesc* result;
	NI i;
	result = NIM_NIL;
	result = mnewString(((NI) ((s ? s->Sup.len : 0))));
	i = ((NI) 0);
	{
		while (1) {
			if (!(i < (s ? s->Sup.len : 0))) goto LA2;
			{
				if (!((NU8)(s->data[i]) == (NU8)(sub))) goto LA5_;
				result->data[i] = by;
			}
			goto LA3_;
			LA5_: ;
			{
				result->data[i] = s->data[i];
			}
			LA3_: ;
			i += ((NI) 1);
		} LA2: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nimIdentNormalize__pureZstrutils_105)(NimStringDesc* s) {
	NimStringDesc* result;
	NI j;
{	result = NIM_NIL;
	result = mnewString(((NI) ((s ? s->Sup.len : 0))));
	{
		if (!((s ? s->Sup.len : 0) == ((NI) 0))) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	result->data[((NI) 0)] = s->data[((NI) 0)];
	j = ((NI) 1);
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)((s ? s->Sup.len : 0) - ((NI) 1));
		res = ((NI) 1);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA7;
				i = res;
				{
					if (!(((NU8)(s->data[i])) >= ((NU8)(65)) && ((NU8)(s->data[i])) <= ((NU8)(90)))) goto LA10_;
					result->data[j] = ((NIM_CHAR) (((NI) ((NI)(((NU8)(s->data[i])) + ((NI) 32))))));
					j += ((NI) 1);
				}
				goto LA8_;
				LA10_: ;
				{
					if (!!(((NU8)(s->data[i]) == (NU8)(95)))) goto LA13_;
					result->data[j] = s->data[i];
					j += ((NI) 1);
				}
				goto LA8_;
				LA13_: ;
				LA8_: ;
				res += ((NI) 1);
			} LA7: ;
		}
	}
	{
		if (!!((j == (s ? s->Sup.len : 0)))) goto LA17_;
		result = setLengthStr(result, ((NI) (j)));
	}
	LA17_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
	int result;
	result = (int)0;
	result = memcmp(a, b, ((size_t) (size)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__system_1741)(void* a, void* b, NI size) {
	NIM_BOOL result;
	int T1_;
	result = (NIM_BOOL)0;
	T1_ = (int)0;
	T1_ = nimCmpMem(a, b, size);
	result = (T1_ == ((NI32) 0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NI alen;
	NI blen;
{	result = (NIM_BOOL)0;
	alen = (a ? a->Sup.len : 0);
	blen = (b ? b->Sup.len : 0);
	{
		if (!(alen == blen)) goto LA3_;
		{
			if (!(alen == ((NI) 0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
		LA7_: ;
		result = equalMem__system_1741(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
		goto BeforeRet_;
	}
	LA3_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_TBackend__zoooocqvga73vZuhGAAy6A, parseEnum__commands_976)(NimStringDesc* s, tyEnum_TBackend__zoooocqvga73vZuhGAAy6A default_0) {
	tyEnum_TBackend__zoooocqvga73vZuhGAAy6A result;
	NimStringDesc* T1_;
	result = (tyEnum_TBackend__zoooocqvga73vZuhGAAy6A)0;
	T1_ = NIM_NIL;
	T1_ = nimIdentNormalize__pureZstrutils_105(s);
	if (eqStrings(T1_, ((NimStringDesc*) NIM_NIL))) goto LA2_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_8))) goto LA3_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_9))) goto LA4_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_10))) goto LA5_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_11))) goto LA6_;
	goto LA7_;
	LA2_: ;
	{
		result = ((tyEnum_TBackend__zoooocqvga73vZuhGAAy6A) 0);
	}
	goto LA8_;
	LA3_: ;
	{
		result = ((tyEnum_TBackend__zoooocqvga73vZuhGAAy6A) 1);
	}
	goto LA8_;
	LA4_: ;
	{
		result = ((tyEnum_TBackend__zoooocqvga73vZuhGAAy6A) 2);
	}
	goto LA8_;
	LA5_: ;
	{
		result = ((tyEnum_TBackend__zoooocqvga73vZuhGAAy6A) 3);
	}
	goto LA8_;
	LA6_: ;
	{
		result = ((tyEnum_TBackend__zoooocqvga73vZuhGAAy6A) 4);
	}
	goto LA8_;
	LA7_: ;
	{
		result = default_0;
	}
	LA8_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindCharSet)(NimStringDesc* s, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars, NI start, NI last) {
	NI result;
	NI last_2;
{	result = (NI)0;
	{
		if (!(last == ((NI) 0))) goto LA3_;
		last_2 = ((s ? s->Sup.len : 0)-1);
	}
	goto LA1_;
	LA3_: ;
	{
		last_2 = last;
	}
	LA1_: ;
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = ((NI) (start));
		res = colontmp_;
		{
			while (1) {
				if (!(res <= last_2)) goto LA8;
				i = res;
				{
					if (!((chars[(NU)(((NU8)(s->data[i])))>>3] &(1U<<((NU)(((NU8)(s->data[i])))&7U)))!=0)) goto LA11_;
					result = i;
					goto BeforeRet_;
				}
				LA11_: ;
				res += ((NI) 1);
			} LA8: ;
		}
	}
	result = ((NI) -1);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_1631)(NimStringDesc* s, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars) {
	NIM_BOOL result;
	NI T1_;
{	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = nsuFindCharSet(s, chars, ((NI) 0), ((NI) 0));
	result = (((NI) 0) <= T1_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s, NimStringDesc* substr, NI start) {
	NIM_BOOL result;
	NI i;
{	result = (NIM_BOOL)0;
	i = ((NI) 0);
	{
		while (1) {
			{
				if (!((substr ? substr->Sup.len : 0) <= i)) goto LA5_;
				result = NIM_TRUE;
				goto BeforeRet_;
			}
			LA5_: ;
			{
				NIM_BOOL T9_;
				T9_ = (NIM_BOOL)0;
				T9_ = ((s ? s->Sup.len : 0) <= (NI)(i + ((NI) (start))));
				if (T9_) goto LA10_;
				T9_ = !(((NU8)(s->data[(NI)(i + ((NI) (start)))]) == (NU8)(substr->data[i])));
				LA10_: ;
				if (!T9_) goto LA11_;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
			LA11_: ;
			i += ((NI) 1);
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, multiReplace__pureZstrutils_1678)(NimStringDesc* s, tyTuple__UV3llMMYFckfui8YMBuUZA* replacements, NI replacementsLen_0) {
	NimStringDesc* result;
	NI i;
	tySet_tyChar__nmiMWKVIe46vacnhAFrQvw fastChk;
	result = NIM_NIL;
	result = rawNewString(((NI) ((s ? s->Sup.len : 0))));
	i = ((NI) 0);
	nimZeroMem((void*)fastChk, sizeof(tySet_tyChar__nmiMWKVIe46vacnhAFrQvw));
	nimCopyMem((void*)fastChk, (NIM_CONST void*)TM__JGc9b9bh2D3nTdUR7TGyq8aA_12, 32);
	{
		NimStringDesc** sub;
		NimStringDesc** by;
		NI i_2;
		sub = (NimStringDesc**)0;
		by = (NimStringDesc**)0;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < replacementsLen_0)) goto LA3;
				sub = (&replacements[i_2].Field0);
				by = (&replacements[i_2].Field1);
				{
					if (!(((NI) 0) < ((*sub) ? (*sub)->Sup.len : 0))) goto LA6_;
					fastChk[(NU)(((NU8)((*sub)->data[((NI) 0)])))>>3] |=(1U<<(((NU8)((*sub)->data[((NI) 0)]))&7U));
				}
				LA6_: ;
				i_2 += ((NI) 1);
			} LA3: ;
		}
	}
	{
		while (1) {
			if (!(i < (s ? s->Sup.len : 0))) goto LA9;
			{
				{
					if (!((fastChk[(NU)(((NU8)(s->data[i])))>>3] &(1U<<((NU)(((NU8)(s->data[i])))&7U)))!=0)) goto LA13_;
					{
						NimStringDesc** sub_2;
						NimStringDesc** by_2;
						NI i_3;
						sub_2 = (NimStringDesc**)0;
						by_2 = (NimStringDesc**)0;
						i_3 = ((NI) 0);
						{
							while (1) {
								if (!(i_3 < replacementsLen_0)) goto LA17;
								sub_2 = (&replacements[i_3].Field0);
								by_2 = (&replacements[i_3].Field1);
								{
									NIM_BOOL T20_;
									T20_ = (NIM_BOOL)0;
									T20_ = (((NI) 0) < ((*sub_2) ? (*sub_2)->Sup.len : 0));
									if (!(T20_)) goto LA21_;
									T20_ = nsuContinuesWith(s, (*sub_2), ((NI) (i)));
									LA21_: ;
									if (!T20_) goto LA22_;
									result = resizeString(result, ((*by_2) ? (*by_2)->Sup.len : 0) + 0);
appendString(result, (*by_2));
									i += ((*sub_2) ? (*sub_2)->Sup.len : 0);
									goto LA10;
								}
								LA22_: ;
								i_3 += ((NI) 1);
							} LA17: ;
						}
					}
				}
				LA13_: ;
				result = addChar(result, s->data[i]);
				i += ((NI) 1);
			} LA10: ;
		} LA9: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a, NI aLen_0, NimStringDesc* sep) {
	NimStringDesc* result;
	result = NIM_NIL;
	{
		NI L;
		if (!(((NI) 0) < aLen_0)) goto LA3_;
		L = (NI)((sep ? sep->Sup.len : 0) * (NI)(aLen_0 - ((NI) 1)));
		{
			NI i;
			NI colontmp_;
			NI res;
			i = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = (aLen_0-1);
			res = ((NI) 0);
			{
				while (1) {
					if (!(res <= colontmp_)) goto LA7;
					i = res;
					L += (a[i] ? a[i]->Sup.len : 0);
					res += ((NI) 1);
				} LA7: ;
			}
		}
		result = rawNewString(((NI) (L)));
		result = resizeString(result, (a[((NI) 0)] ? a[((NI) 0)]->Sup.len : 0) + 0);
appendString(result, a[((NI) 0)]);
		{
			NI i_2;
			NI colontmp__2;
			NI res_2;
			i_2 = (NI)0;
			colontmp__2 = (NI)0;
			colontmp__2 = (aLen_0-1);
			res_2 = ((NI) 1);
			{
				while (1) {
					if (!(res_2 <= colontmp__2)) goto LA10;
					i_2 = res_2;
					result = resizeString(result, (sep ? sep->Sup.len : 0) + 0);
appendString(result, sep);
					result = resizeString(result, (a[i_2] ? a[i_2]->Sup.len : 0) + 0);
appendString(result, a[i_2]);
					res_2 += ((NI) 1);
				} LA10: ;
			}
		}
	}
	goto LA1_;
	LA3_: ;
	{
		result = ((NimStringDesc*) NIM_NIL);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuParseHexInt)(NimStringDesc* s) {
	NI result;
	NI L;
	result = (NI)0;
	result = ((NI) 0);
	L = parseHex__pureZstrutils_895(s, (&result), ((NI) 0), ((NI) 0));
	{
		NIM_BOOL T3_;
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T7_;
		NimStringDesc* T8_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L == (s ? s->Sup.len : 0)));
		if (T3_) goto LA4_;
		T3_ = (L == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		T7_ = NIM_NIL;
		T7_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T7_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T7_).Sup.Sup.name = "ValueError";
		T8_ = NIM_NIL;
		T8_ = rawNewString((s ? s->Sup.len : 0) + 21);
appendString(T8_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_13));
appendString(T8_, s);
		asgnRef((void**) (&(*T7_).Sup.Sup.message), T8_);
		asgnRef((void**) (&(*T7_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T7_, "ValueError", "parseHexInt", "strutils.nim", 1155);
	}
	LA5_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s) {
	NI result;
	NI L;
	result = (NI)0;
	result = ((NI) 0);
	L = npuParseInt(s, (&result), ((NI) 0));
	{
		NIM_BOOL T3_;
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T7_;
		NimStringDesc* T8_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L == (s ? s->Sup.len : 0)));
		if (T3_) goto LA4_;
		T3_ = (L == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		T7_ = NIM_NIL;
		T7_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T7_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T7_).Sup.Sup.name = "ValueError";
		T8_ = NIM_NIL;
		T8_ = rawNewString((s ? s->Sup.len : 0) + 17);
appendString(T8_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_14));
appendString(T8_, s);
		asgnRef((void**) (&(*T7_).Sup.Sup.message), T8_);
		asgnRef((void**) (&(*T7_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T7_, "ValueError", "parseInt", "strutils.nim", 1073);
	}
	LA5_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuToOctal)(NIM_CHAR c) {
	NimStringDesc* result;
	NI val;
	result = NIM_NIL;
	result = mnewString(((NI) 3));
	val = ((NU8)(c));
	{
		NI i;
		NI res;
		i = (NI)0;
		res = ((NI) 2);
		{
			while (1) {
				if (!(((NI) 0) <= res)) goto LA3;
				i = res;
				result->data[i] = ((NIM_CHAR) (((NI) ((NI)((NI)(val % ((NI) 8)) + ((NI) 48))))));
				val = (NI)(val / ((NI) 8));
				res -= ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw, parseEnum__commands_1298)(NimStringDesc* s) {
	tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw result;
	NimStringDesc* T1_;
	result = (tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw)0;
	T1_ = NIM_NIL;
	T1_ = nimIdentNormalize__pureZstrutils_105(s);
	switch (hashString(T1_) & 31) {
	case 3: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_18))) goto LA5_;
break;
	case 4: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_21))) goto LA8_;
break;
	case 5: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_29))) goto LA16_;
break;
	case 6: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_16))) goto LA3_;
break;
	case 9: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_28))) goto LA15_;
break;
	case 11: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_32))) goto LA19_;
break;
	case 12: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_33))) goto LA20_;
break;
	case 15: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_19))) goto LA6_;
break;
	case 16: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_24))) goto LA11_;
break;
	case 17: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_25))) goto LA12_;
break;
	case 19: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_23))) goto LA10_;
break;
	case 20: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_26))) goto LA13_;
break;
	case 22: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_15))) goto LA2_;
break;
	case 23: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_27))) goto LA14_;
break;
	case 24: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_17))) goto LA4_;
break;
	case 25: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_22))) goto LA9_;
break;
	case 28: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_20))) goto LA7_;
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_30))) goto LA17_;
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_31))) goto LA18_;
break;
	}
	goto LA21_;
	LA2_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 0);
	}
	goto LA22_;
	LA3_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 1);
	}
	goto LA22_;
	LA4_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 2);
	}
	goto LA22_;
	LA5_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 3);
	}
	goto LA22_;
	LA6_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 4);
	}
	goto LA22_;
	LA7_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 5);
	}
	goto LA22_;
	LA8_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 6);
	}
	goto LA22_;
	LA9_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 7);
	}
	goto LA22_;
	LA10_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 8);
	}
	goto LA22_;
	LA11_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 9);
	}
	goto LA22_;
	LA12_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 10);
	}
	goto LA22_;
	LA13_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 11);
	}
	goto LA22_;
	LA14_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 12);
	}
	goto LA22_;
	LA15_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 13);
	}
	goto LA22_;
	LA16_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 14);
	}
	goto LA22_;
	LA17_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 15);
	}
	goto LA22_;
	LA18_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 16);
	}
	goto LA22_;
	LA19_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 17);
	}
	goto LA22_;
	LA20_: ;
	{
		result = ((tyEnum_Feature__T2jOg7rgtA4lKTKRASHfHw) 18);
	}
	goto LA22_;
	LA21_: ;
	{
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T43_;
		NimStringDesc* T44_;
		T43_ = NIM_NIL;
		T43_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T43_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T43_).Sup.Sup.name = "ValueError";
		T44_ = NIM_NIL;
		T44_ = rawNewString((s ? s->Sup.len : 0) + 20);
appendString(T44_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_34));
appendString(T44_, s);
		asgnRef((void**) (&(*T43_).Sup.Sup.message), T44_);
		asgnRef((void**) (&(*T43_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T43_, "ValueError", "parseEnum", "enumutils.nim", 67);
	}
	LA22_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_LegacyFeature__YfzcW9bRC8xGYaRkFXliJ2g, parseEnum__commands_1351)(NimStringDesc* s) {
	tyEnum_LegacyFeature__YfzcW9bRC8xGYaRkFXliJ2g result;
	NimStringDesc* T1_;
	result = (tyEnum_LegacyFeature__YfzcW9bRC8xGYaRkFXliJ2g)0;
	T1_ = NIM_NIL;
	T1_ = nimIdentNormalize__pureZstrutils_105(s);
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_35))) goto LA2_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_36))) goto LA3_;
	goto LA4_;
	LA2_: ;
	{
		result = ((tyEnum_LegacyFeature__YfzcW9bRC8xGYaRkFXliJ2g) 0);
	}
	goto LA5_;
	LA3_: ;
	{
		result = ((tyEnum_LegacyFeature__YfzcW9bRC8xGYaRkFXliJ2g) 1);
	}
	goto LA5_;
	LA4_: ;
	{
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T9_;
		NimStringDesc* T10_;
		T9_ = NIM_NIL;
		T9_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T9_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T9_).Sup.Sup.name = "ValueError";
		T10_ = NIM_NIL;
		T10_ = rawNewString((s ? s->Sup.len : 0) + 20);
appendString(T10_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_34));
appendString(T10_, s);
		asgnRef((void**) (&(*T9_).Sup.Sup.message), T10_);
		asgnRef((void**) (&(*T9_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T9_, "ValueError", "parseEnum", "enumutils.nim", 67);
	}
	LA5_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NF, nsuParseFloat)(NimStringDesc* s) {
	NF result;
	NI L;
	result = (NF)0;
	result = 0.0;
	L = npuParseFloat(s, (&result), ((NI) 0));
	{
		NIM_BOOL T3_;
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T7_;
		NimStringDesc* T8_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L == (s ? s->Sup.len : 0)));
		if (T3_) goto LA4_;
		T3_ = (L == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		T7_ = NIM_NIL;
		T7_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T7_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T7_).Sup.Sup.name = "ValueError";
		T8_ = NIM_NIL;
		T8_ = rawNewString((s ? s->Sup.len : 0) + 15);
appendString(T8_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_37));
appendString(T8_, s);
		asgnRef((void**) (&(*T7_).Sup.Sup.message), T8_);
		asgnRef((void**) (&(*T7_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T7_, "ValueError", "parseFloat", "strutils.nim", 1115);
	}
	LA5_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuToBin)(NI64 x, NI len) {
	NimStringDesc* result;
	NU64 mask;
	NU64 shift;
	result = NIM_NIL;
	mask = 1ULL;
	shift = 0ULL;
	result = mnewString(((NI) (len)));
	{
		NI j;
		NI colontmp_;
		NI res;
		j = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)(((NI) (len)) - ((NI) 1));
		res = colontmp_;
		{
			while (1) {
				if (!(((NI) 0) <= res)) goto LA3;
				j = res;
				result->data[j] = ((NIM_CHAR) (((NI) ((NI)(((NI) ((NU64)((NU64)((NU64)(((NU64) (x)) & mask)) >> (NU64)(shift)))) + ((NI) 48))))));
				shift += ((NI) 1);
				mask = (NU64)((NU64)(mask) << (NU64)(1ULL));
				res -= ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuToOct)(NI64 x, NI len) {
	NimStringDesc* result;
	NU64 mask;
	NU64 shift;
	result = NIM_NIL;
	mask = 7ULL;
	shift = 0ULL;
	result = mnewString(((NI) (len)));
	{
		NI j;
		NI colontmp_;
		NI res;
		j = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)(((NI) (len)) - ((NI) 1));
		res = colontmp_;
		{
			while (1) {
				if (!(((NI) 0) <= res)) goto LA3;
				j = res;
				result->data[j] = ((NIM_CHAR) (((NI) ((NI)(((NI) ((NU64)((NU64)((NU64)(((NU64) (x)) & mask)) >> (NU64)(shift)))) + ((NI) 48))))));
				shift += ((NI) 3);
				mask = (NU64)((NU64)(mask) << (NU64)(3ULL));
				res -= ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toHex__renderer_477)(NI64 x, NI len) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = toHexImpl__pureZstrutils_711(((NU64) (x)), len, (x < IL64(0)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars) {
	NimStringDesc* result;
	NI first;
	NI last;
	result = NIM_NIL;
	first = ((NI) 0);
	last = (NI)((s ? s->Sup.len : 0) - ((NI) 1));
	{
		if (!leading) goto LA3_;
		{
			while (1) {
				NIM_BOOL T7_;
				T7_ = (NIM_BOOL)0;
				T7_ = (first <= last);
				if (!(T7_)) goto LA8_;
				T7_ = ((chars[(NU)(((NU8)(s->data[first])))>>3] &(1U<<((NU)(((NU8)(s->data[first])))&7U)))!=0);
				LA8_: ;
				if (!T7_) goto LA6;
				first += ((NI) 1);
			} LA6: ;
		}
	}
	LA3_: ;
	{
		if (!trailing) goto LA11_;
		{
			while (1) {
				NIM_BOOL T15_;
				T15_ = (NIM_BOOL)0;
				T15_ = (first <= last);
				if (!(T15_)) goto LA16_;
				T15_ = ((chars[(NU)(((NU8)(s->data[last])))>>3] &(1U<<((NU)(((NU8)(s->data[last])))&7U)))!=0);
				LA16_: ;
				if (!T15_) goto LA14;
				last -= ((NI) 1);
			} LA14: ;
		}
	}
	LA11_: ;
	result = substr__system_7724(s, first, last);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuRepeatStr)(NimStringDesc* s, NI n) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = rawNewString(((NI) ((NI)(((NI) (n)) * (s ? s->Sup.len : 0)))));
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = ((NI) (n));
		res = ((NI) 1);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				result = resizeString(result, (s ? s->Sup.len : 0) + 0);
appendString(result, s);
				res += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuIntToStr)(NI x, NI minchars) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = dollar___systemZdollars_3((x > 0? (x) : -(x)));
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)(((NI) (minchars)) - (result ? result->Sup.len : 0));
		res = ((NI) 1);
		{
			while (1) {
				NimStringDesc* T4_;
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				T4_ = NIM_NIL;
				T4_ = rawNewString((result ? result->Sup.len : 0) + 1);
appendChar(T4_, 48);
appendString(T4_, result);
				result = T4_;
				res += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NimStringDesc* T9_;
		if (!(x < ((NI) 0))) goto LA7_;
		T9_ = NIM_NIL;
		T9_ = rawNewString((result ? result->Sup.len : 0) + 1);
appendChar(T9_, 45);
appendString(T9_, result);
		result = T9_;
	}
	LA7_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, parseBool__pureZstrutils_998)(NimStringDesc* s) {
	NIM_BOOL result;
	NimStringDesc* T1_;
	result = (NIM_BOOL)0;
	T1_ = NIM_NIL;
	T1_ = nsuNormalize(s);
	switch (hashString(T1_) & 15) {
	case 0: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_39))) goto LA2_;
break;
	case 1: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_43))) goto LA3_;
break;
	case 2: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_45))) goto LA3_;
break;
	case 5: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_40))) goto LA2_;
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_44))) goto LA3_;
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_47))) goto LA3_;
break;
	case 8: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_38))) goto LA2_;
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_42))) goto LA2_;
break;
	case 9: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_41))) goto LA2_;
break;
	case 11: 
if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_46))) goto LA3_;
break;
	}
	goto LA4_;
	LA2_: ;
	{
		result = NIM_TRUE;
	}
	goto LA5_;
	LA3_: ;
	{
		result = NIM_FALSE;
	}
	goto LA5_;
	LA4_: ;
	{
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T9_;
		NimStringDesc* T10_;
		T9_ = NIM_NIL;
		T9_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T9_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T9_).Sup.Sup.name = "ValueError";
		T10_ = NIM_NIL;
		T10_ = rawNewString((s ? s->Sup.len : 0) + 28);
appendString(T10_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_48));
appendString(T10_, s);
		asgnRef((void**) (&(*T9_).Sup.Sup.message), T10_);
		asgnRef((void**) (&(*T9_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T9_, "ValueError", "parseBool", "strutils.nim", 1217);
	}
	LA5_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI64, nsuParseBiggestInt)(NimStringDesc* s) {
	NI64 result;
	NI L;
	result = (NI64)0;
	result = IL64(0);
	L = npuParseBiggestInt(s, (&result), ((NI) 0));
	{
		NIM_BOOL T3_;
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T7_;
		NimStringDesc* T8_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L == (s ? s->Sup.len : 0)));
		if (T3_) goto LA4_;
		T3_ = (L == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		T7_ = NIM_NIL;
		T7_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T7_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T7_).Sup.Sup.name = "ValueError";
		T8_ = NIM_NIL;
		T8_ = rawNewString((s ? s->Sup.len : 0) + 17);
appendString(T8_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_14));
appendString(T8_, s);
		asgnRef((void**) (&(*T7_).Sup.Sup.message), T8_);
		asgnRef((void**) (&(*T7_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T7_, "ValueError", "parseBiggestInt", "strutils.nim", 1083);
	}
	LA5_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, nsuToUpperAsciiChar)(NIM_CHAR c) {
	NIM_CHAR result;
	result = (NIM_CHAR)0;
	{
		if (!(((NU8)(c)) >= ((NU8)(97)) && ((NU8)(c)) <= ((NU8)(122)))) goto LA3_;
		result = ((NIM_CHAR) ((NU8)(((NU8) (((NU8)(c)))) ^ ((NU8) 32))));
	}
	goto LA1_;
	LA3_: ;
	{
		result = c;
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg, parseEnum__sem_16666)(NimStringDesc* s) {
	tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg result;
	NimStringDesc* T1_;
	result = (tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg)0;
	T1_ = NIM_NIL;
	T1_ = nimIdentNormalize__pureZstrutils_105(s);
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_49))) goto LA2_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_50))) goto LA3_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_51))) goto LA4_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_52))) goto LA5_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_53))) goto LA6_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_54))) goto LA7_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_55))) goto LA8_;
	if (eqStrings(T1_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_56))) goto LA9_;
	goto LA10_;
	LA2_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 0);
	}
	goto LA11_;
	LA3_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 1);
	}
	goto LA11_;
	LA4_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 2);
	}
	goto LA11_;
	LA5_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 3);
	}
	goto LA11_;
	LA6_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 4);
	}
	goto LA11_;
	LA7_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 5);
	}
	goto LA11_;
	LA8_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 6);
	}
	goto LA11_;
	LA9_: ;
	{
		result = ((tyEnum_TPreferedDesc__lx9aDnWjKktcSUo0yfjOvMg) 7);
	}
	goto LA11_;
	LA10_: ;
	{
		tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA* T21_;
		NimStringDesc* T22_;
		T21_ = NIM_NIL;
		T21_ = (tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA*) newObj((&NTIrefvalueerror__MdotPfdEWddcwl4HcVVgeQ_), sizeof(tyObject_ValueError__5lcTdgqMq62cNGRwBb0thA));
		(*T21_).Sup.Sup.Sup.m_type = (&NTIvalueerror__5lcTdgqMq62cNGRwBb0thA_);
		(*T21_).Sup.Sup.name = "ValueError";
		T22_ = NIM_NIL;
		T22_ = rawNewString((s ? s->Sup.len : 0) + 20);
appendString(T22_, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_34));
appendString(T22_, s);
		asgnRef((void**) (&(*T21_).Sup.Sup.message), T22_);
		asgnRef((void**) (&(*T21_).Sup.Sup.parent), ((Exception*) NIM_NIL));
		raiseExceptionEx((Exception*)T21_, "ValueError", "parseEnum", "enumutils.nim", 67);
	}
	LA11_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, substrEq__pureZstrutils_229)(NimStringDesc* s, NI pos, NimStringDesc* substr) {
	NIM_BOOL result;
	NI i;
	NI length;
{	result = (NIM_BOOL)0;
	i = ((NI) 0);
	length = (substr ? substr->Sup.len : 0);
	{
		while (1) {
			NIM_BOOL T3_;
			NIM_BOOL T4_;
			T3_ = (NIM_BOOL)0;
			T4_ = (NIM_BOOL)0;
			T4_ = (i < length);
			if (!(T4_)) goto LA5_;
			T4_ = ((NI)(pos + i) < (s ? s->Sup.len : 0));
			LA5_: ;
			T3_ = T4_;
			if (!(T3_)) goto LA6_;
			T3_ = ((NU8)(s->data[(NI)(pos + i)]) == (NU8)(substr->data[i]));
			LA6_: ;
			if (!T3_) goto LA2;
			i += ((NI) 1);
		} LA2: ;
	}
	result = (i == length);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitString)(NimStringDesc* s, NimStringDesc* sep, NI maxsplit) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* result;
	result = NIM_NIL;
	{
		if (!!((((NI) 0) < (sep ? sep->Sup.len : 0)))) goto LA3_;
		failedAssertImpl__systemZassertions_56(((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_57));
	}
	LA3_: ;
	result = NIM_NIL;
	{
		NimStringDesc* xX60gensym71_;
		NI lastX60gensym40_;
		NI splitsX60gensym40_;
		xX60gensym71_ = NIM_NIL;
		lastX60gensym40_ = ((NI) 0);
		splitsX60gensym40_ = maxsplit;
		{
			while (1) {
				NI firstX60gensym40_;
				NI T17_;
				NimStringDesc* T18_;
				if (!(lastX60gensym40_ <= (s ? s->Sup.len : 0))) goto LA7;
				firstX60gensym40_ = lastX60gensym40_;
				{
					while (1) {
						NIM_BOOL T10_;
						NIM_BOOL T12_;
						T10_ = (NIM_BOOL)0;
						T10_ = (lastX60gensym40_ < (s ? s->Sup.len : 0));
						if (!(T10_)) goto LA11_;
						T12_ = (NIM_BOOL)0;
						T12_ = substrEq__pureZstrutils_229(s, lastX60gensym40_, sep);
						T10_ = !(T12_);
						LA11_: ;
						if (!T10_) goto LA9;
						lastX60gensym40_ += ((NI) 1);
					} LA9: ;
				}
				{
					if (!(splitsX60gensym40_ == ((NI) 0))) goto LA15_;
					lastX60gensym40_ = (s ? s->Sup.len : 0);
				}
				LA15_: ;
				xX60gensym71_ = substr__system_7724(s, firstX60gensym40_, (NI)(lastX60gensym40_ - ((NI) 1)));
				result = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV3((TGenericSeq*)(result), (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_));
				T17_ = result->Sup.len++;
				T18_ = NIM_NIL;
				T18_ = result->data[T17_]; result->data[T17_] = copyStringRC1(xX60gensym71_);
				if (T18_) nimGCunrefNoCycle(T18_);
				{
					if (!(splitsX60gensym40_ == ((NI) 0))) goto LA21_;
					goto LA6;
				}
				LA21_: ;
				splitsX60gensym40_ -= ((NI) 1);
				lastX60gensym40_ += (sep ? sep->Sup.len : 0);
			} LA7: ;
		} LA6: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = rawNewString(((NI) ((NI)((s ? s->Sup.len : 0) + (NI)((NI32)((s ? s->Sup.len : 0)) >> (NU32)(((NI) 2)))))));
	result = resizeString(result, (prefix ? prefix->Sup.len : 0) + 0);
appendString(result, prefix);
	{
		NIM_CHAR c;
		NI i;
		NI L;
		c = (NIM_CHAR)0;
		i = ((NI) 0);
		L = (s ? s->Sup.len : 0);
		{
			while (1) {
				if (!(i < L)) goto LA3;
				c = s->data[i];
				switch (((NU8)(c))) {
				case 0 ... 31:
				case 127 ... 255:
				{
					NimStringDesc* T5_;
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_58));
					T5_ = NIM_NIL;
					T5_ = toHex__pureZstrutils_1788(((NU8)(c)), ((NI) 2));
					result = resizeString(result, (T5_ ? T5_->Sup.len : 0) + 0);
appendString(result, T5_);
				}
				break;
				case 92:
				{
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_59));
				}
				break;
				case 39:
				{
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_60));
				}
				break;
				case 34:
				{
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_61));
				}
				break;
				default:
				{
					result = addChar(result, c);
				}
				break;
				}
				i += ((NI) 1);
			} LA3: ;
		}
	}
	result = resizeString(result, (suffix ? suffix->Sup.len : 0) + 0);
appendString(result, suffix);
	return result;
}
static N_INLINE(NimStringDesc*, X5BX5D___pureZunicode_865)(NimStringDesc* s, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw x) {
	NimStringDesc* result;
	NI a;
	NI L;
	result = NIM_NIL;
	a = x.a;
	L = (NI)((NI)(x.b - a) + ((NI) 1));
	result = mnewString(((NI) (L)));
	{
		NI i;
		NI i_2;
		i = (NI)0;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < L)) goto LA3;
				i = i_2;
				result->data[i] = s->data[(NI)(i + a)];
				i_2 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
static N_INLINE(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw, dotdot___pureZunicode_840)(NI a, NI b) {
	tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw result;
	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw));
	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw));
	result.a = a;
	result.b = b;
	return result;
}
static N_INLINE(NimStringDesc*, X5BX5D___pureZunicode_3215)(NimStringDesc* s, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw x) {
	NimStringDesc* result;
	NI a;
	NI L;
	result = NIM_NIL;
	a = x.a;
	L = (NI)((NI)((NI)((s ? s->Sup.len : 0) - x.b) - a) + ((NI) 1));
	result = mnewString(((NI) (L)));
	{
		NI i;
		NI i_2;
		i = (NI)0;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < L)) goto LA3;
				i = i_2;
				result->data[i] = s->data[(NI)(i + a)];
				i_2 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
static N_INLINE(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw, dotdot___stdZenumutils_90)(NI a, NI b) {
	tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw result;
	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw));
	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw));
	result.a = a;
	result.b = b;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuUnindent)(NimStringDesc* s, NI count, NimStringDesc* padding) {
	NimStringDesc* result;
	NI i;
	result = NIM_NIL;
	result = ((NimStringDesc*) NIM_NIL);
	i = ((NI) 0);
	{
		NimStringDesc* line;
		NI first;
		NI last;
		NI eolpos;
		line = NIM_NIL;
		first = ((NI) 0);
		last = ((NI) 0);
		eolpos = ((NI) 0);
		{
			while (1) {
				NI T25_;
				NI indentCount;
				tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw T46_;
				NimStringDesc* T47_;
				{
					while (1) {
						NIM_BOOL T6_;
						T6_ = (NIM_BOOL)0;
						T6_ = (last < (s ? s->Sup.len : 0));
						if (!(T6_)) goto LA7_;
						T6_ = !((((NU8)(s->data[last])) == ((NU8)(13)) || ((NU8)(s->data[last])) == ((NU8)(10))));
						LA7_: ;
						if (!T6_) goto LA5;
						last += ((NI) 1);
					} LA5: ;
				}
				eolpos = last;
				{
					if (!(last < (s ? s->Sup.len : 0))) goto LA10_;
					{
						if (!((NU8)(s->data[last]) == (NU8)(10))) goto LA14_;
						last += ((NI) 1);
					}
					goto LA12_;
					LA14_: ;
					{
						if (!((NU8)(s->data[last]) == (NU8)(13))) goto LA17_;
						last += ((NI) 1);
						{
							NIM_BOOL T21_;
							T21_ = (NIM_BOOL)0;
							T21_ = (last < (s ? s->Sup.len : 0));
							if (!(T21_)) goto LA22_;
							T21_ = ((NU8)(s->data[last]) == (NU8)(10));
							LA22_: ;
							if (!T21_) goto LA23_;
							last += ((NI) 1);
						}
						LA23_: ;
					}
					goto LA12_;
					LA17_: ;
					LA12_: ;
				}
				LA10_: ;
				T25_ = (NI)0;
				{
					if (!NIM_FALSE) goto LA28_;
					T25_ = (NI)(last - ((NI) 1));
				}
				goto LA26_;
				LA28_: ;
				{
					T25_ = (NI)(eolpos - ((NI) 1));
				}
				LA26_: ;
				line = substr__system_7724(s, first, T25_);
				{
					if (!!((i == ((NI) 0)))) goto LA33_;
					result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_62));
				}
				LA33_: ;
				indentCount = ((NI) 0);
				{
					NI j;
					NI colontmp_;
					NI i_2;
					j = (NI)0;
					colontmp_ = (NI)0;
					colontmp_ = ((NI) (count));
					i_2 = ((NI) 0);
					{
						while (1) {
							if (!(i_2 < colontmp_)) goto LA37;
							j = i_2;
							indentCount += ((NI) 1);
							{
								NIM_BOOL T40_;
								tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw T42_;
								NimStringDesc* T43_;
								T40_ = (NIM_BOOL)0;
								T40_ = ((line ? line->Sup.len : 0) <= (NI)((NI)(j + (padding ? padding->Sup.len : 0)) - ((NI) 1)));
								if (T40_) goto LA41_;
								T42_ = dotdot___pureZunicode_840(j, (NI)((NI)(j + (padding ? padding->Sup.len : 0)) - ((NI) 1)));
								T43_ = NIM_NIL;
								T43_ = X5BX5D___pureZunicode_865(line, T42_);
								T40_ = !(eqStrings(T43_, padding));
								LA41_: ;
								if (!T40_) goto LA44_;
								indentCount = j;
								goto LA35;
							}
							LA44_: ;
							i_2 += ((NI) 1);
						} LA37: ;
					}
				} LA35: ;
				T46_ = dotdot___stdZenumutils_90((NI)(indentCount * (padding ? padding->Sup.len : 0)), ((NI) 1));
				T47_ = NIM_NIL;
				T47_ = X5BX5D___pureZunicode_3215(line, T46_);
				result = resizeString(result, (T47_ ? T47_->Sup.len : 0) + 0);
appendString(result, T47_);
				i += ((NI) 1);
				{
					if (!(eolpos == last)) goto LA50_;
					goto LA2;
				}
				LA50_: ;
				first = last;
			}
		} LA2: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuIsAlphaAsciiChar)(NIM_CHAR c) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	result = (((NU8)(c)) >= ((NU8)(65)) && ((NU8)(c)) <= ((NU8)(90)) || ((NU8)(c)) >= ((NU8)(97)) && ((NU8)(c)) <= ((NU8)(122)));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuIsAlphaNumericChar)(NIM_CHAR c) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	result = (((NU8)(c)) >= ((NU8)(48)) && ((NU8)(c)) <= ((NU8)(57)) || ((NU8)(c)) >= ((NU8)(65)) && ((NU8)(c)) <= ((NU8)(90)) || ((NU8)(c)) >= ((NU8)(97)) && ((NU8)(c)) <= ((NU8)(122)));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuDedent)(NimStringDesc* s, NI count) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = nsuUnindent(s, count, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_63));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, indentation__pureZstrutils_1194)(NimStringDesc* s) {
	NI result;
	result = (NI)0;
	result = ((NI) 2147483647);
	{
		NimStringDesc* line;
		NI first;
		NI last;
		NI eolpos;
		line = NIM_NIL;
		first = ((NI) 0);
		last = ((NI) 0);
		eolpos = ((NI) 0);
		{
			while (1) {
				NI T25_;
				{
					while (1) {
						NIM_BOOL T6_;
						T6_ = (NIM_BOOL)0;
						T6_ = (last < (s ? s->Sup.len : 0));
						if (!(T6_)) goto LA7_;
						T6_ = !((((NU8)(s->data[last])) == ((NU8)(13)) || ((NU8)(s->data[last])) == ((NU8)(10))));
						LA7_: ;
						if (!T6_) goto LA5;
						last += ((NI) 1);
					} LA5: ;
				}
				eolpos = last;
				{
					if (!(last < (s ? s->Sup.len : 0))) goto LA10_;
					{
						if (!((NU8)(s->data[last]) == (NU8)(10))) goto LA14_;
						last += ((NI) 1);
					}
					goto LA12_;
					LA14_: ;
					{
						if (!((NU8)(s->data[last]) == (NU8)(13))) goto LA17_;
						last += ((NI) 1);
						{
							NIM_BOOL T21_;
							T21_ = (NIM_BOOL)0;
							T21_ = (last < (s ? s->Sup.len : 0));
							if (!(T21_)) goto LA22_;
							T21_ = ((NU8)(s->data[last]) == (NU8)(10));
							LA22_: ;
							if (!T21_) goto LA23_;
							last += ((NI) 1);
						}
						LA23_: ;
					}
					goto LA12_;
					LA17_: ;
					LA12_: ;
				}
				LA10_: ;
				T25_ = (NI)0;
				{
					if (!NIM_FALSE) goto LA28_;
					T25_ = (NI)(last - ((NI) 1));
				}
				goto LA26_;
				LA28_: ;
				{
					T25_ = (NI)(eolpos - ((NI) 1));
				}
				LA26_: ;
				line = substr__system_7724(s, first, T25_);
				{
					NI i;
					NIM_CHAR c;
					NI i_2;
					NI L;
					i = (NI)0;
					c = (NIM_CHAR)0;
					i_2 = ((NI) 0);
					L = (line ? line->Sup.len : 0);
					{
						while (1) {
							if (!(i_2 < L)) goto LA33;
							i = i_2;
							c = line->data[i_2];
							{
								if (!(((NI) (result)) <= i)) goto LA36_;
								goto LA31;
							}
							goto LA34_;
							LA36_: ;
							{
								if (!!(((NU8)(c) == (NU8)(32)))) goto LA39_;
								result = ((NI) (i));
								goto LA31;
							}
							goto LA34_;
							LA39_: ;
							LA34_: ;
							i_2 += ((NI) 1);
						} LA33: ;
					}
				} LA31: ;
				{
					if (!(eolpos == last)) goto LA43_;
					goto LA2;
				}
				LA43_: ;
				first = last;
			}
		} LA2: ;
	}
	{
		if (!(((NI) (result)) == ((NI) 2147483647))) goto LA47_;
		result = ((NI) 0);
	}
	LA47_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuIsDigitChar)(NIM_CHAR c) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	result = (((NU8)(c)) >= ((NU8)(48)) && ((NU8)(c)) <= ((NU8)(57)));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuDelete)(NimStringDesc** s, NI first, NI last) {
	NI i;
	NI j;
	NI newLen;
	i = first;
	j = ((((*s) ? (*s)->Sup.len : 0) <= (NI)(last + ((NI) 1))) ? ((*s) ? (*s)->Sup.len : 0) : (NI)(last + ((NI) 1)));
	newLen = (NI)((NI)(((*s) ? (*s)->Sup.len : 0) - j) + i);
	{
		while (1) {
			if (!(i < newLen)) goto LA2;
			(*s)->data[i] = (*s)->data[j];
			i += ((NI) 1);
			j += ((NI) 1);
		} LA2: ;
	}
	unsureAsgnRef((void**) (&(*s)), setLengthStr((*s), ((NI) (newLen))));
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuIsUpperAsciiChar)(NIM_CHAR c) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	result = (((NU8)(c)) >= ((NU8)(65)) && ((NU8)(c)) <= ((NU8)(90)));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuCapitalizeAscii)(NimStringDesc* s) {
	NimStringDesc* result;
	result = NIM_NIL;
	{
		if (!((s ? s->Sup.len : 0) == ((NI) 0))) goto LA3_;
		result = ((NimStringDesc*) NIM_NIL);
	}
	goto LA1_;
	LA3_: ;
	{
		NimStringDesc* T6_;
		NIM_CHAR T7_;
		NimStringDesc* T8_;
		T6_ = NIM_NIL;
		T7_ = (NIM_CHAR)0;
		T7_ = nsuToUpperAsciiChar(s->data[((NI) 0)]);
		T8_ = NIM_NIL;
		T8_ = substr__system_7736(s, ((NI) 1));
		T6_ = rawNewString((T8_ ? T8_->Sup.len : 0) + 1);
appendChar(T6_, T7_);
appendString(T6_, T8_);
		result = T6_;
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCountLines)(NimStringDesc* s) {
	NI result;
	NI i;
	result = (NI)0;
	result = ((NI) 1);
	i = ((NI) 0);
	{
		while (1) {
			if (!(i < (s ? s->Sup.len : 0))) goto LA2;
			switch (((NU8)(s->data[i]))) {
			case 13:
			{
				{
					NIM_BOOL T6_;
					T6_ = (NIM_BOOL)0;
					T6_ = ((NI)(i + ((NI) 1)) < (s ? s->Sup.len : 0));
					if (!(T6_)) goto LA7_;
					T6_ = ((NU8)(s->data[(NI)(i + ((NI) 1))]) == (NU8)(10));
					LA7_: ;
					if (!T6_) goto LA8_;
					i += ((NI) 1);
				}
				LA8_: ;
				result += ((NI) 1);
			}
			break;
			case 10:
			{
				result += ((NI) 1);
			}
			break;
			default:
			{
			}
			break;
			}
			i += ((NI) 1);
		} LA2: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuAlignString)(NimStringDesc* s, NI count, NIM_CHAR padding) {
	NimStringDesc* result;
	result = NIM_NIL;
	{
		NI spaces;
		if (!((s ? s->Sup.len : 0) < ((NI) (count)))) goto LA3_;
		result = mnewString(count);
		spaces = (NI)(((NI) (count)) - (s ? s->Sup.len : 0));
		{
			NI i;
			NI colontmp_;
			NI res;
			i = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = (NI)(spaces - ((NI) 1));
			res = ((NI) 0);
			{
				while (1) {
					if (!(res <= colontmp_)) goto LA7;
					i = res;
					result->data[i] = padding;
					res += ((NI) 1);
				} LA7: ;
			}
		}
		{
			NI i_2;
			NI colontmp__2;
			NI res_2;
			i_2 = (NI)0;
			colontmp__2 = (NI)0;
			colontmp__2 = (NI)(((NI) (count)) - ((NI) 1));
			res_2 = spaces;
			{
				while (1) {
					if (!(res_2 <= colontmp__2)) goto LA10;
					i_2 = res_2;
					result->data[i_2] = s->data[(NI)(i_2 - spaces)];
					res_2 += ((NI) 1);
				} LA10: ;
			}
		}
	}
	goto LA1_;
	LA3_: ;
	{
		result = copyString(s);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuformatBiggestFloat)(NF f, tyEnum_FloatFormatMode__alaW5GAGZvqS9bWFnNLXFuA format, NI precision, NIM_CHAR decimalSep) {
	NimStringDesc* result;
	tyArray__9bPFPkkEEeeNM9bKgiV8Q49cg frmtstr;
	tyArray__Kn8ZOVsorvcNLB4isUeMzQ buf;
	int L;
	result = NIM_NIL;
	L = (int)0;
	frmtstr[(((NI) 0))- 0] = 37;
	{
		if (!(((NI) 0) <= ((NI) (precision)))) goto LA3_;
		frmtstr[(((NI) 1))- 0] = 35;
		frmtstr[(((NI) 2))- 0] = 46;
		frmtstr[(((NI) 3))- 0] = 42;
		frmtstr[(((NI) 4))- 0] = floatFormatToChar__pureZstrutils_1860[(format)- 0];
		frmtstr[(((NI) 5))- 0] = 0;
		L = sprintf(((NCSTRING) (buf)), ((NCSTRING) (frmtstr)), precision, f);
	}
	goto LA1_;
	LA3_: ;
	{
		frmtstr[(((NI) 1))- 0] = floatFormatToChar__pureZstrutils_1860[(format)- 0];
		frmtstr[(((NI) 2))- 0] = 0;
		L = sprintf(((NCSTRING) (buf)), ((NCSTRING) (frmtstr)), f);
	}
	LA1_: ;
	result = mnewString(((NI) (L)));
	{
		NI32 i;
		NI32 res;
		i = (NI32)0;
		res = ((NI32) 0);
		{
			while (1) {
				if (!(res < L)) goto LA8;
				i = res;
				{
					if (!(((NU8)(buf[(i)- 0])) == ((NU8)(46)) || ((NU8)(buf[(i)- 0])) == ((NU8)(44)))) goto LA11_;
					result->data[i] = decimalSep;
				}
				goto LA9_;
				LA11_: ;
				{
					result->data[i] = buf[(i)- 0];
				}
				LA9_: ;
				res += ((NI) 1);
			} LA8: ;
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuformatFloat)(NF f, tyEnum_FloatFormatMode__alaW5GAGZvqS9bWFnNLXFuA format, NI precision, NIM_CHAR decimalSep) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = nsuformatBiggestFloat(f, format, precision, decimalSep);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, trimZeros__pureZstrutils_1947)(NimStringDesc** x, NIM_CHAR decimalSep) {
	NI sPos;
	sPos = nsuFindChar((*x), decimalSep, ((NI) 0), ((NI) 0));
	{
		NI last;
		NI pos;
		if (!(((NI) 0) <= sPos)) goto LA3_;
		last = nsuFindChar((*x), 101, ((NI) (sPos)), ((NI) 0));
		{
			if (!(((NI) 0) <= last)) goto LA7_;
			last = (NI)(last - ((NI) 1));
		}
		goto LA5_;
		LA7_: ;
		{
			last = (((*x) ? (*x)->Sup.len : 0)-1);
		}
		LA5_: ;
		pos = last;
		{
			while (1) {
				NIM_BOOL T12_;
				T12_ = (NIM_BOOL)0;
				T12_ = (((NI) 0) <= pos);
				if (!(T12_)) goto LA13_;
				T12_ = ((NU8)((*x)->data[pos]) == (NU8)(48));
				LA13_: ;
				if (!T12_) goto LA11;
				pos -= ((NI) 1);
			} LA11: ;
		}
		{
			if (!(sPos < pos)) goto LA16_;
			pos += ((NI) 1);
		}
		LA16_: ;
		nsuDelete(x, pos, last);
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, formatSize__pureZstrutils_1967)(NI64 bytes, NIM_CHAR decimalSep, tyEnum_BinaryPrefixMode__9aq8p9cHh4TxM4kldzuu2GZA prefix, NIM_BOOL includeSpace) {
	NimStringDesc* result;
	NI64 xb;
	NF fbytes;
	NI64 lastXb;
	NI matchedIndex;
	tyArray__17w6ns39bmjfAZ429aQpCFUA prefixes;
	result = NIM_NIL;
	xb = bytes;
	fbytes = (NF)0;
	lastXb = bytes;
	matchedIndex = ((NI) 0);
	nimZeroMem((void*)prefixes, sizeof(tyArray__17w6ns39bmjfAZ429aQpCFUA));
	{
		if (!(prefix == ((tyEnum_BinaryPrefixMode__9aq8p9cHh4TxM4kldzuu2GZA) 1))) goto LA3_;
		genericAssign((void*)prefixes, (void*)collPrefixes__pureZstrutils_1974, (&NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_));
	}
	goto LA1_;
	LA3_: ;
	{
		genericAssign((void*)prefixes, (void*)iecPrefixes__pureZstrutils_1973, (&NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_));
	}
	LA1_: ;
	{
		NI index;
		NI i;
		index = (NI)0;
		i = ((NI) 1);
		{
			while (1) {
				if (!(i < ((NI) 9))) goto LA8;
				index = i;
				lastXb = xb;
				xb = (NI64)(bytes / (NI64)((NU64)(IL64(1)) << (NU64)((NI)(index * ((NI) 10)))));
				matchedIndex = index;
				{
					if (!(xb == IL64(0))) goto LA11_;
					xb = lastXb;
					matchedIndex = (NI)(index - ((NI) 1));
					goto LA6;
				}
				LA11_: ;
				i += ((NI) 1);
			} LA8: ;
		}
	} LA6: ;
	fbytes = ((NF)(((NF) (bytes))) / (NF)(((NF) ((NI64)((NU64)(IL64(1)) << (NU64)((NI)(matchedIndex * ((NI) 10))))))));
	result = nsuformatFloat(fbytes, ((tyEnum_FloatFormatMode__alaW5GAGZvqS9bWFnNLXFuA) 1), ((NI) 3), decimalSep);
	trimZeros__pureZstrutils_1947((&result), decimalSep);
	{
		if (!includeSpace) goto LA15_;
		result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_63));
	}
	LA15_: ;
	result = resizeString(result, (prefixes[(matchedIndex)- 0] ? prefixes[(matchedIndex)- 0]->Sup.len : 0) + 0);
appendString(result, prefixes[(matchedIndex)- 0]);
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TM__JGc9b9bh2D3nTdUR7TGyq8aA_80));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatslibatspureatsstrutilsdotnim_DatInit000)(void) {
NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_.size = sizeof(tyArray__17w6ns39bmjfAZ429aQpCFUA);
NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_.align = NIM_ALIGNOF(tyArray__17w6ns39bmjfAZ429aQpCFUA);
NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_.kind = 16;
NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_.base = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
NTIarrayL48OO56_stringT__17w6ns39bmjfAZ429aQpCFUA_.flags = 2;
}

