/* Generated by Nim Compiler v2.2.10 */
/* Compiled for: MacOSX, arm64, clang */
/* Command for C compiler:
   clang -c  -w -ferror-limit=3 -fno-strict-aliasing -pthread -isysroot /Applications/Xcode_16.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -target arm64-apple-darwin24.2.0 -O3   -I/Users/runner/work/nightlies/nightlies/nim-2.2.10/lib -I/Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/src -o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@pstrutils.nim.c.o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@pstrutils.nim.c */
#define NIM_INTBITS 64
#define NIM_EmulateOverflowChecks

#include "nimbase.h"
#include <string.h>
#include <math.h>
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw;
typedef struct tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tySequence__3EvzHGO0xyXGnJBUggwfKQ tySequence__3EvzHGO0xyXGnJBUggwfKQ;
typedef struct tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content;
typedef struct tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ;
typedef struct tyObject_IndexDefect__Eq8hLo1nOVNgU1kcCW9bQTQ tyObject_IndexDefect__Eq8hLo1nOVNgU1kcCW9bQTQ;
typedef struct tyObject_Defect__OrUtYvY9ahZHkSCkuIUgLvA tyObject_Defect__OrUtYvY9ahZHkSCkuIUgLvA;
typedef struct tyTuple__f9bWfuutJFGmvzpplsPZ62w tyTuple__f9bWfuutJFGmvzpplsPZ62w;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content;
typedef struct tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
struct TNimTypeV2 {
	void* destructor;
	NI size;
	NI16 align;
	NI16 depth;
	NU32* display;
	void* traceImpl;
	void* typeInfoV1;
	NI flags;
	void* vTable[SEQ_DECL_SIZE];
};
struct RootObj {
	TNimTypeV2* m_type;
};
struct tySequence__3EvzHGO0xyXGnJBUggwfKQ {
  NI len; tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content* p;
};
struct Exception {
	RootObj Sup;
	Exception* parent;
	NCSTRING name;
	NimStringV2 message;
	tySequence__3EvzHGO0xyXGnJBUggwfKQ trace;
	Exception* up;
};
struct tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug {
	Exception Sup;
};
struct tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw {
	tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug Sup;
};
typedef NU8 tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw;
typedef NI tyArray__9cc9aPiDa8VaWjVcFLabEDZQ[256];
typedef NimStringV2 tyArray__YgExxhfgKcesA5EOUj1MOA[1];
struct tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ {
	NI a;
	NI b;
};
struct tyObject_Defect__OrUtYvY9ahZHkSCkuIUgLvA {
	Exception Sup;
};
struct tyObject_IndexDefect__Eq8hLo1nOVNgU1kcCW9bQTQ {
	tyObject_Defect__OrUtYvY9ahZHkSCkuIUgLvA Sup;
};
struct tyTuple__f9bWfuutJFGmvzpplsPZ62w {
	tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ Field0;
	NI Field1;
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  NI len; tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content* p;
};
typedef NU8 tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw;
typedef NU8 tyEnum_PackageState__INzfBajphYPGcwu72ccy8w;
typedef NU8 tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg;
typedef NU8 tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww;
struct tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw {
	NCSTRING procname;
	NI line;
	NCSTRING filename;
};
struct tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content { NI cap; tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw data[SEQ_DECL_SIZE]; };
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content { NI cap; NimStringV2 data[SEQ_DECL_SIZE]; };
N_NIMCALL(NimStringV2, mnewString)(NI len_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i_p0, NI64 a_p1, NI64 b_p2);
static N_INLINE(NIM_BOOL, nimSubInt)(NI a_p0, NI b_p1, NI* res_p2);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
static N_INLINE(void, nimPrepareStrMutationV2)(NimStringV2* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimPrepareStrMutationImpl__system_u2493)(NimStringV2* s_p0);
static N_INLINE(NIM_BOOL, nimAddInt)(NI a_p0, NI b_p1, NI* res_p2);
N_LIB_PRIVATE N_NIMCALL(void, setLengthStrV2)(NimStringV2* s_p0, NI newLen_p1);
static N_INLINE(NIM_CHAR, toLowerAscii__stdZprivateZstrimpl_u1)(NIM_CHAR c_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toHexImpl__pureZstrutils_u783)(NU64 x_p0, NI len_p1, NIM_BOOL handleNegative_p2);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorNoArgs)(void);
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, nsuToLowerAsciiChar)(NIM_CHAR c_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u9096)(NimStringV2 s_p0, NI first_p1, NI last_p2);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindCharSet)(NimStringV2 s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p1, NI start_p2, NI last_p3);
N_LIB_PRIVATE N_NIMCALL(NI, parseBiggestInt__pureZparseutils_u976)(NimStringV2 s_p0, NI64* number_p1, NI start_p2);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, copyMem__system_u1755)(void* dest_p0, void* source_p1, NI size_p2);
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, rawNewString)(NI space_p0);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e_p0, NCSTRING ename_p1, NCSTRING procname_p2, NCSTRING filename_p3, NI line_p4);
N_LIB_PRIVATE N_NIMCALL(NI, parseFloat__pureZparseutils_u1006)(NimStringV2 s_p0, NF* number_p1, NI start_p2);
N_NIMCALL(NimStringV2, rawNewString)(NI cap_p0);
N_LIB_PRIVATE N_NIMCALL(void, nsuAddf)(NimStringV2* s_p0, NimStringV2 formatstr_p1, NimStringV2* a_p2, NI a_p2Len_0);
N_LIB_PRIVATE N_NOINLINE(void, invalidFormatString__pureZstrutils_u2661)(NimStringV2 formatstr_p0);
N_LIB_PRIVATE N_NIMCALL(void, prepareAdd)(NimStringV2* s_p0, NI addLen_p1);
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1);
static N_INLINE(NIM_BOOL, nimMulInt)(NI a_p0, NI b_p1, NI* res_p2);
static N_INLINE(NF, toFloat__system_u1705)(NI i_p0);
static N_INLINE(NF, abs__system_u5188)(NF x_p0);
N_LIB_PRIVATE N_NIMCALL(NI, findNormalized__pureZstrutils_u2648)(NimStringV2 x_p0, NimStringV2* inArray_p1, NI inArray_p1Len_0);
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringV2 a_p0, NimStringV2 b_p1);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nimIdentNormalize__pureZstrutils_u123)(NimStringV2 s_p0);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1);
static N_INLINE(NIM_BOOL, equalMem__system_u1763)(void* a_p0, void* b_p1, NI size_p2);
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u95)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStr)(NimStringV2 s_p0, NimStringV2 sub_p1, NI start_p2, NI last_p3);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindChar)(NimStringV2 s_p0, NIM_CHAR sub_p1, NI start_p2, NI last_p3);
static N_INLINE(NI, minuspercent___system_u813)(NI x_p0, NI y_p1);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStrA)(tyArray__9cc9aPiDa8VaWjVcFLabEDZQ a_p0, NimStringV2 s_p1, NimStringV2 sub_p2, NI start_p3, NI last_p4);
N_LIB_PRIVATE N_NIMCALL(void, nsuInitNewSkipTable)(NimStringV2 sub_p0, tyArray__9cc9aPiDa8VaWjVcFLabEDZQ Result);
N_LIB_PRIVATE N_NIMCALL(void, nsuInitSkipTable)(NI* a_p0, NimStringV2 sub_p1);
N_LIB_PRIVATE N_NIMCALL(void, fill__pureZstrutils_u1634)(NI* a_p0, NI a_p0Len_0, NI value_p1);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__system_u2188)(void* a_p0, int v_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2754)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u9109)(NimStringV2 s_p0, NI first_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringV2 s_p0, NimStringV2 prefix_p1);
N_LIB_PRIVATE N_NIMCALL(void, delete__pureZstrutils_u1365)(NimStringV2* s_p0, tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ slice_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___pureZstrutils_u1371)(tyTuple__f9bWfuutJFGmvzpplsPZ62w x_p0);
static N_INLINE(tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ, dotdot___stdZstrbasics_u48)(NI a_p0, NI b_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringV2 s_p0, NimStringV2 suffix_p1);
N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, substrEq__pureZstrutils_u256)(NimStringV2 s_p0, NI pos_p1, NimStringV2 substr_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2760)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__stdZenumutils_u70)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* x_p0, NimStringV2 y_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u2751)(NimStringV2* dest_p0);
N_LIB_PRIVATE N_NIMCALL(NI, parseInt__pureZparseutils_u981)(NimStringV2 s_p0, NI* number_p1, NI start_p2);
N_LIB_PRIVATE N_NIMCALL(void, nsuRemovePrefixCharSet)(NimStringV2* s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___basicZversions_u52)(NimStringV2 v_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toHex__pureZstrutils_u2181)(NI x_p0, NI len_p1);
static const struct {
  NI cap; NIM_CHAR data[16+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_14 = { 16 | NIM_STRLIT_FLAG, "0123456789ABCDEF" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_15 = {16, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_14};
extern TNimTypeV2 NTIv2__YUzEEs8pGqG7cYmcRoc5rw_;
static const struct {
  NI cap; NIM_CHAR data[17+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_24 = { 17 | NIM_STRLIT_FLAG, "invalid integer: " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_25 = {17, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_24};
static const struct {
  NI cap; NIM_CHAR data[15+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_26 = { 15 | NIM_STRLIT_FLAG, "invalid float: " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_27 = {15, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_26};
static const struct {
  NI cap; NIM_CHAR data[23+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_31 = { 23 | NIM_STRLIT_FLAG, "invalid format string: " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_32 = {23, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_31};
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_68 = { 6 | NIM_STRLIT_FLAG, "Minver" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_69 = {6, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_68};
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_70 = { 6 | NIM_STRLIT_FLAG, "Semver" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_71 = {6, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_70};
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_72 = { 6 | NIM_STRLIT_FLAG, "Maxver" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_73 = {6, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_72};
static const struct {
  NI cap; NIM_CHAR data[20+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_74 = { 20 | NIM_STRLIT_FLAG, "Invalid enum value: " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_75 = {20, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_74};
static const struct {
  NI cap; NIM_CHAR data[36+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_84 = { 36 | NIM_STRLIT_FLAG, "strutils.nim(2148, 3) `sub.len > 0` " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_85 = {36, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_84};
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_104 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_105 = {0, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_104};
static const struct {
  NI cap; NIM_CHAR data[31+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_110 = { 31 | NIM_STRLIT_FLAG, "strutils.nim(946, 9) `len > 0` " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_111 = {31, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_110};
static const struct {
  NI cap; NIM_CHAR data[31+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_115 = { 31 | NIM_STRLIT_FLAG, "strutils.nim(970, 9) `len > 0` " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_116 = {31, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_115};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_120 = {0, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_104};
static const struct {
  NI cap; NIM_CHAR data[93+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_121 = { 93 | NIM_STRLIT_FLAG, "iterators.nim(272, 11) `len(a) == L` the length of the string changed while iterating over it" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_122 = {93, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_121};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_128 = {0, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_104};
extern TNimTypeV2 NTIv2__Eq8hLo1nOVNgU1kcCW9bQTQ_;
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_149 = {17, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_24};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_151 = {93, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_121};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_155 = {16, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_14};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_157 = {16, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_14};
static const struct {
  NI cap; NIM_CHAR data[93+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_158 = { 93 | NIM_STRLIT_FLAG, "iterators.nim(206, 11) `len(a) == L` the length of the string changed while iterating over it" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_159 = {93, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_158};
static const struct {
  NI cap; NIM_CHAR data[50+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_166 = { 50 | NIM_STRLIT_FLAG, "strutils.nim(406, 9) `not (\'\\x00\' in Whitespace)` " };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_167 = {50, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_166};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_175 = {0, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_104};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_177 = { 2 | NIM_STRLIT_FLAG, "\\x" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_178 = {2, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_177};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_179 = { 2 | NIM_STRLIT_FLAG, "\\\\" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_180 = {2, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_179};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_181 = { 2 | NIM_STRLIT_FLAG, "\\\'" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_182 = {2, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_181};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_183 = { 2 | NIM_STRLIT_FLAG, "\\\"" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_184 = {2, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_183};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_185 = {93, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_121};
static const struct {
  NI cap; NIM_CHAR data[11+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_186 = { 11 | NIM_STRLIT_FLAG, "Allreleases" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_187 = {11, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_186};
static const struct {
  NI cap; NIM_CHAR data[16+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_188 = { 16 | NIM_STRLIT_FLAG, "Explicitversions" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_189 = {16, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_188};
static const struct {
  NI cap; NIM_CHAR data[13+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_190 = { 13 | NIM_STRLIT_FLAG, "Currentcommit" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_191 = {13, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_190};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_192 = {20, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_74};
static const struct {
  NI cap; NIM_CHAR data[14+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_193 = { 14 | NIM_STRLIT_FLAG, "Notinitialized" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_194 = {14, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_193};
static const struct {
  NI cap; NIM_CHAR data[12+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_195 = { 12 | NIM_STRLIT_FLAG, "Lazydeferred" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_196 = {12, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_195};
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_197 = { 6 | NIM_STRLIT_FLAG, "Doload" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_198 = {6, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_197};
static const struct {
  NI cap; NIM_CHAR data[5+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_199 = { 5 | NIM_STRLIT_FLAG, "Found" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_200 = {5, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_199};
static const struct {
  NI cap; NIM_CHAR data[9+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_201 = { 9 | NIM_STRLIT_FLAG, "Processed" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_202 = {9, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_201};
static const struct {
  NI cap; NIM_CHAR data[5+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_203 = { 5 | NIM_STRLIT_FLAG, "Error" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_204 = {5, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_203};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_205 = {20, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_74};
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_206 = { 6 | NIM_STRLIT_FLAG, "Normal" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_207 = {6, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_206};
static const struct {
  NI cap; NIM_CHAR data[13+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_208 = { 13 | NIM_STRLIT_FLAG, "Hasbrokenrepo" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_209 = {13, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_208};
static const struct {
  NI cap; NIM_CHAR data[19+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_210 = { 19 | NIM_STRLIT_FLAG, "Hasbrokennimblefile" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_211 = {19, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_210};
static const struct {
  NI cap; NIM_CHAR data[16+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_212 = { 16 | NIM_STRLIT_FLAG, "Hasbrokenrelease" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_213 = {16, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_212};
static const struct {
  NI cap; NIM_CHAR data[20+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_214 = { 20 | NIM_STRLIT_FLAG, "Hasunknownnimblefile" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_215 = {20, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_214};
static const struct {
  NI cap; NIM_CHAR data[12+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_216 = { 12 | NIM_STRLIT_FLAG, "Hasbrokendep" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_217 = {12, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_216};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_218 = {20, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_74};
static const struct {
  NI cap; NIM_CHAR data[8+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_219 = { 8 | NIM_STRLIT_FLAG, "Fromnone" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_220 = {8, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_219};
static const struct {
  NI cap; NIM_CHAR data[8+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_221 = { 8 | NIM_STRLIT_FLAG, "Fromhead" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_222 = {8, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_221};
static const struct {
  NI cap; NIM_CHAR data[10+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_223 = { 10 | NIM_STRLIT_FLAG, "Fromgittag" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_224 = {10, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_223};
static const struct {
  NI cap; NIM_CHAR data[7+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_225 = { 7 | NIM_STRLIT_FLAG, "Fromdep" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_226 = {7, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_225};
static const struct {
  NI cap; NIM_CHAR data[14+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_227 = { 14 | NIM_STRLIT_FLAG, "Fromnimblefile" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_228 = {14, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_227};
static const struct {
  NI cap; NIM_CHAR data[12+1];
} TM__JGc9b9bh2D3nTdUR7TGyq8aA_229 = { 12 | NIM_STRLIT_FLAG, "Fromlockfile" };
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_230 = {12, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_229};
static const NimStringV2 TM__JGc9b9bh2D3nTdUR7TGyq8aA_231 = {20, (NimStrPayload*)&TM__JGc9b9bh2D3nTdUR7TGyq8aA_74};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4198;
static N_INLINE(NIM_BOOL, nimSubInt)(NI a_p0, NI b_p1, NI* res_p2) {
	NIM_BOOL result;
	NI r_1;
	result = (NIM_BOOL)0;
	r_1 = ((NI) ((NU)((NU64)(((NU) (a_p0))) - (NU64)(((NU) (b_p1))))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI)0) <= (NI)(r_1 ^ a_p0));
		if (T3_) goto LA4_;
		T3_ = (((NI)0) <= (NI)(r_1 ^ (NI)((NU64) ~(b_p1))));
LA4_: ;
		if (!T3_) goto LA5_;
		(*res_p2) = r_1;
	}
	goto LA1_;
LA5_: ;
	{
		result = NIM_TRUE;
	}
LA1_: ;
	return result;
}
static N_INLINE(void, nimPrepareStrMutationV2)(NimStringV2* s_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = !(((*s_p0).p == ((NimStrPayload*) NIM_NIL)));
		if (!(T3_)) goto LA4_;
		T3_ = ((NI)((*(*s_p0).p).cap & ((NI)IL64(4611686018427387904))) == ((NI)IL64(4611686018427387904)));
LA4_: ;
		if (!T3_) goto LA5_;
		nimPrepareStrMutationImpl__system_u2493(s_p0);
	}
LA5_: ;
}
static N_INLINE(NIM_BOOL, nimAddInt)(NI a_p0, NI b_p1, NI* res_p2) {
	NIM_BOOL result;
	NI r_1;
	result = (NIM_BOOL)0;
	r_1 = ((NI) ((NU)((NU64)(((NU) (a_p0))) + (NU64)(((NU) (b_p1))))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI)0) <= (NI)(r_1 ^ a_p0));
		if (T3_) goto LA4_;
		T3_ = (((NI)0) <= (NI)(r_1 ^ b_p1));
LA4_: ;
		if (!T3_) goto LA5_;
		(*res_p2) = r_1;
	}
	goto LA1_;
LA5_: ;
	{
		result = NIM_TRUE;
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuNormalize)(NimStringV2 s_p0) {
	NimStringV2 result;
	NI j_1;
{	result.len = 0; result.p = NIM_NIL;
	if ((s_p0.len) < ((NI)0) || (s_p0.len) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(s_p0.len, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString((s_p0.len));
	j_1 = ((NI)0);
	{
		NI i_1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_2;
		NI res_1;
		i_1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(s_p0.len, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_2)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_2);
		res_1 = ((NI)0);
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_6;
				if (!(res_1 <= colontmp_)) goto LA3;
				i_1 = ((NI) (res_1));
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_3;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_4;
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					if (!(((NU8)(s_p0.p->data[i_1])) >= ((NU8)(65)) && ((NU8)(s_p0.p->data[i_1])) <= ((NU8)(90)))) goto LA6_;
					if (j_1 < 0 || j_1 >= result.len){ raiseIndexError2(j_1,result.len-1); goto BeforeRet_;
					}
					nimPrepareStrMutationV2((&result));
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					if (nimAddInt(((NU8)(s_p0.p->data[i_1])), ((NI)32), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_3)) { raiseOverflow(); goto BeforeRet_;
					};
					if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_3)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_3)) > ((NI)255)){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_3), ((NI)0), ((NI)255)); goto BeforeRet_;
					}
					result.p->data[j_1] = ((NIM_CHAR) (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_3))));
					if (nimAddInt(j_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_4)) { raiseOverflow(); goto BeforeRet_;
					};
					j_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_4);
				}
				goto LA4_;
LA6_: ;
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_5;
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					if (!!(((NU8)(s_p0.p->data[i_1]) == (NU8)(95)))) goto LA9_;
					if (j_1 < 0 || j_1 >= result.len){ raiseIndexError2(j_1,result.len-1); goto BeforeRet_;
					}
					nimPrepareStrMutationV2((&result));
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					result.p->data[j_1] = s_p0.p->data[i_1];
					if (nimAddInt(j_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_5)) { raiseOverflow(); goto BeforeRet_;
					};
					j_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_5);
				}
				goto LA4_;
LA9_: ;
LA4_: ;
				if (nimAddInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_6)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_6);
			} LA3: ;
		}
	}
	{
		if (!!((j_1 == s_p0.len))) goto LA13_;
		if ((j_1) < ((NI)0) || (j_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(j_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
		}
		setLengthStrV2((&result), (j_1));
	}
LA13_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_CHAR, toLowerAscii__stdZprivateZstrimpl_u1)(NIM_CHAR c_p0) {
	NIM_CHAR result;
{	result = (NIM_CHAR)0;
	{
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_7;
		if (!(((NU8)(c_p0)) >= ((NU8)(65)) && ((NU8)(c_p0)) <= ((NU8)(90)))) goto LA3_;
		if (nimAddInt(((NU8)(c_p0)), ((NI)32), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_7)) { raiseOverflow(); goto BeforeRet_;
		};
		if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_7)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_7)) > ((NI)255)){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_7), ((NI)0), ((NI)255)); goto BeforeRet_;
		}
		result = ((NIM_CHAR) (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_7))));
	}
	goto LA1_;
LA3_: ;
	{
		result = c_p0;
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4198);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringV2 a_p0, NimStringV2 b_p1) {
	NI result;
	NI aLenX60gensym20__1;
	NI bLenX60gensym20__1;
	NI iX60gensym20__1;
	NI mX60gensym20__1;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_10;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	aLenX60gensym20__1 = a_p0.len;
	bLenX60gensym20__1 = b_p1.len;
	iX60gensym20__1 = ((NI)0);
	mX60gensym20__1 = ((aLenX60gensym20__1 <= bLenX60gensym20__1) ? aLenX60gensym20__1 : bLenX60gensym20__1);
	{
		while (1) {
			NIM_CHAR T3_;
			NIM_CHAR T4_;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_8;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_9;
			if (!(iX60gensym20__1 < mX60gensym20__1)) goto LA2;
			if (iX60gensym20__1 < 0 || iX60gensym20__1 >= a_p0.len){ raiseIndexError2(iX60gensym20__1,a_p0.len-1); goto BeforeRet_;
			}
			T3_ = (NIM_CHAR)0;
			T3_ = toLowerAscii__stdZprivateZstrimpl_u1(a_p0.p->data[iX60gensym20__1]);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (iX60gensym20__1 < 0 || iX60gensym20__1 >= b_p1.len){ raiseIndexError2(iX60gensym20__1,b_p1.len-1); goto BeforeRet_;
			}
			T4_ = (NIM_CHAR)0;
			T4_ = toLowerAscii__stdZprivateZstrimpl_u1(b_p1.p->data[iX60gensym20__1]);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (nimSubInt(((NU8)(T3_)), ((NU8)(T4_)), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_8)) { raiseOverflow(); goto BeforeRet_;
			};
			result = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_8);
			{
				if (!!((result == ((NI)0)))) goto LA7_;
				goto BeforeRet_;
			}
LA7_: ;
			if (nimAddInt(iX60gensym20__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_9)) { raiseOverflow(); goto BeforeRet_;
			};
			iX60gensym20__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_9);
		} LA2: ;
	}
	if (nimSubInt(aLenX60gensym20__1, bLenX60gensym20__1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_10)) { raiseOverflow(); goto BeforeRet_;
	};
	result = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_10);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuRepeatChar)(NIM_CHAR c_p0, NI count_p1) {
	NimStringV2 result;
{	result = mnewString(count_p1);
	{
		NI i_1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_11;
		NI res_1;
		i_1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(count_p1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_11)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_11);
		res_1 = ((NI)0);
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_12;
				if (!(res_1 <= colontmp_)) goto LA3;
				i_1 = ((NI) (res_1));
				if (i_1 < 0 || i_1 >= result.len){ raiseIndexError2(i_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				result.p->data[i_1] = c_p0;
				if (nimAddInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_12)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_12);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toHexImpl__pureZstrutils_u783)(NU64 x_p0, NI len_p1, NIM_BOOL handleNegative_p2) {
	NimStringV2 result;
	NU64 n_1;
{	n_1 = x_p0;
	result = mnewString(len_p1);
	{
		NI j_1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_13;
		NI res_1;
		j_1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(len_p1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_13)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_13);
		res_1 = colontmp_;
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_16;
				if (!(((NI)0) <= res_1)) goto LA3;
				j_1 = ((NI) (res_1));
				if (j_1 < 0 || j_1 >= result.len){ raiseIndexError2(j_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if ((NU64)(n_1 & 15ULL) > (NU64)(((NI)IL64(9223372036854775807)))){ raiseRangeErrorNoArgs(); goto BeforeRet_;
				}
				if (((NI) ((NU64)(n_1 & 15ULL))) < 0 || ((NI) ((NU64)(n_1 & 15ULL))) >= TM__JGc9b9bh2D3nTdUR7TGyq8aA_15.len){ raiseIndexError2(((NI) ((NU64)(n_1 & 15ULL))),TM__JGc9b9bh2D3nTdUR7TGyq8aA_15.len-1); goto BeforeRet_;
				}
				result.p->data[j_1] = TM__JGc9b9bh2D3nTdUR7TGyq8aA_15.p->data[((NI) ((NU64)(n_1 & 15ULL)))];
				n_1 = (NU64)((NU64)(n_1) >> (NU64)(((NI)4) & (64 - 1)));
				{
					NIM_BOOL T6_;
					T6_ = (NIM_BOOL)0;
					T6_ = (n_1 == 0ULL);
					if (!(T6_)) goto LA7_;
					T6_ = handleNegative_p2;
LA7_: ;
					if (!T6_) goto LA8_;
					n_1 = 18446744073709551615ULL;
				}
LA8_: ;
				if (nimSubInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_16)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_16);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toHex__pureZstrutils_u2181)(NI x_p0, NI len_p1) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	result = toHexImpl__pureZstrutils_u783(((NU64) (((NI64) (x_p0)))), len_p1, (x_p0 < ((NI)0)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, nsuToLowerAsciiChar)(NIM_CHAR c_p0) {
	NIM_CHAR result;
	{
		if (!(((NU8)(c_p0)) >= ((NU8)(65)) && ((NU8)(c_p0)) <= ((NU8)(90)))) goto LA3_;
		result = ((NIM_CHAR) ((NU8)(((NU8) (((NU8)(c_p0)))) ^ ((NU8)32))));
	}
	goto LA1_;
LA3_: ;
	{
		result = c_p0;
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuToLowerAsciiStr)(NimStringV2 s_p0) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	if ((s_p0.len) < ((NI)0) || (s_p0.len) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(s_p0.len, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString((s_p0.len));
	{
		NI iX60gensym7__1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_17;
		NI res_1;
		iX60gensym7__1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(s_p0.len, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_17)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_17);
		res_1 = ((NI)0);
		{
			while (1) {
				NIM_CHAR T4_;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_18;
				if (!(res_1 <= colontmp_)) goto LA3;
				iX60gensym7__1 = ((NI) (res_1));
				if (iX60gensym7__1 < 0 || iX60gensym7__1 >= result.len){ raiseIndexError2(iX60gensym7__1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if (iX60gensym7__1 < 0 || iX60gensym7__1 >= s_p0.len){ raiseIndexError2(iX60gensym7__1,s_p0.len-1); goto BeforeRet_;
				}
				T4_ = (NIM_CHAR)0;
				T4_ = nsuToLowerAsciiChar(s_p0.p->data[iX60gensym7__1]);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				result.p->data[iX60gensym7__1] = T4_;
				if (nimAddInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_18)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_18);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuStrip)(NimStringV2 s_p0, NIM_BOOL leading_p1, NIM_BOOL trailing_p2, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p3) {
	NimStringV2 result;
	NI first_1;
	NI last_1;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_19;
{	result.len = 0; result.p = NIM_NIL;
	first_1 = ((NI)0);
	if (nimSubInt(s_p0.len, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_19)) { raiseOverflow(); goto BeforeRet_;
	};
	last_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_19);
	{
		if (!leading_p1) goto LA3_;
		{
			while (1) {
				NIM_BOOL T7_;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_20;
				T7_ = (NIM_BOOL)0;
				T7_ = (first_1 <= last_1);
				if (!(T7_)) goto LA8_;
				if (first_1 < 0 || first_1 >= s_p0.len){ raiseIndexError2(first_1,s_p0.len-1); goto BeforeRet_;
				}
				T7_ = ((chars_p3[(NU)((((NU8)(s_p0.p->data[first_1]))))>>3] &(1U<<((NU)((((NU8)(s_p0.p->data[first_1]))))&7U)))!=0);
LA8_: ;
				if (!T7_) goto LA6;
				if (nimAddInt(first_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_20)) { raiseOverflow(); goto BeforeRet_;
				};
				first_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_20);
			} LA6: ;
		}
	}
LA3_: ;
	{
		if (!trailing_p2) goto LA11_;
		{
			while (1) {
				NIM_BOOL T15_;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_21;
				T15_ = (NIM_BOOL)0;
				T15_ = (first_1 <= last_1);
				if (!(T15_)) goto LA16_;
				if (last_1 < 0 || last_1 >= s_p0.len){ raiseIndexError2(last_1,s_p0.len-1); goto BeforeRet_;
				}
				T15_ = ((chars_p3[(NU)((((NU8)(s_p0.p->data[last_1]))))>>3] &(1U<<((NU)((((NU8)(s_p0.p->data[last_1]))))&7U)))!=0);
LA16_: ;
				if (!T15_) goto LA14;
				if (nimSubInt(last_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_21)) { raiseOverflow(); goto BeforeRet_;
				};
				last_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_21);
			} LA14: ;
		}
	}
LA11_: ;
	result = substr__system_u9096(s_p0, first_1, last_1);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringV2 s_p0, NimStringV2 prefix_p1) {
	NIM_BOOL result;
	NI prefixLenX60gensym144__1;
	NI sLenX60gensym144__1;
	NI iX60gensym144__1;
{	result = NIM_FALSE;
	prefixLenX60gensym144__1 = prefix_p1.len;
	sLenX60gensym144__1 = s_p0.len;
	iX60gensym144__1 = ((NI)0);
	{
		while (1) {
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_22;
			{
				if (!(prefixLenX60gensym144__1 <= iX60gensym144__1)) goto LA5_;
				result = NIM_TRUE;
				goto BeforeRet_;
			}
LA5_: ;
			{
				NIM_BOOL T9_;
				T9_ = (NIM_BOOL)0;
				T9_ = (sLenX60gensym144__1 <= iX60gensym144__1);
				if (T9_) goto LA10_;
				if (iX60gensym144__1 < 0 || iX60gensym144__1 >= s_p0.len){ raiseIndexError2(iX60gensym144__1,s_p0.len-1); goto BeforeRet_;
				}
				if (iX60gensym144__1 < 0 || iX60gensym144__1 >= prefix_p1.len){ raiseIndexError2(iX60gensym144__1,prefix_p1.len-1); goto BeforeRet_;
				}
				T9_ = !(((NU8)(s_p0.p->data[iX60gensym144__1]) == (NU8)(prefix_p1.p->data[iX60gensym144__1])));
LA10_: ;
				if (!T9_) goto LA11_;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
LA11_: ;
			if (nimAddInt(iX60gensym144__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_22)) { raiseOverflow(); goto BeforeRet_;
			};
			iX60gensym144__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_22);
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindCharSet)(NimStringV2 s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p1, NI start_p2, NI last_p3) {
	NI result;
	NI colontmpD_;
	NI colontmpD__2;
	NI last_2;
{	colontmpD_ = (NI)0;
	colontmpD__2 = (NI)0;
	result = ((NI)-1);
	{
		if (!(last_p3 < ((NI)0))) goto LA3_;
		colontmpD_ = (s_p0.len-1);
		last_2 = colontmpD_;
	}
	goto LA1_;
LA3_: ;
	{
		colontmpD__2 = last_p3;
		last_2 = colontmpD__2;
	}
LA1_: ;
	{
		NI i_1;
		NI res_1;
		i_1 = (NI)0;
		res_1 = start_p2;
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_23;
				if (!(res_1 <= last_2)) goto LA8;
				i_1 = ((NI) (res_1));
				{
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					if (!((chars_p1[(NU)((((NU8)(s_p0.p->data[i_1]))))>>3] &(1U<<((NU)((((NU8)(s_p0.p->data[i_1]))))&7U)))!=0)) goto LA11_;
					result = i_1;
					goto BeforeRet_;
				}
LA11_: ;
				if (nimAddInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_23)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_23);
			} LA8: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_u1904)(NimStringV2 s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p1) {
	NIM_BOOL result;
	NI T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = nsuFindCharSet(s_p0, chars_p1, ((NI)0), ((NI)-1));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	result = (((NI)0) <= T1_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest_p0, source_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, copyMem__system_u1755)(void* dest_p0, void* source_p1, NI size_p2) {
	nimCopyMem(dest_p0, source_p1, size_p2);
}
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1) {
	{
		if (!(((NI)0) < src_p1.len)) goto LA3_;
		copyMem__system_u1755(((void*) ((&(*(*dest_p0).p).data[(*dest_p0).len]))), ((void*) ((&(*src_p1.p).data[((NI)0)]))), (src_p1.len));
		(*dest_p0).len += src_p1.len;
		(*(*dest_p0).p).data[(*dest_p0).len] = 0;
	}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NI64, nsuParseBiggestInt)(NimStringV2 s_p0) {
	NI64 result;
	NI L_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = IL64(0);
	L_1 = parseBiggestInt__pureZparseutils_u976(s_p0, (&result), ((NI)0));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NIM_BOOL T3_;
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T7_;
		NimStringV2 T8_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L_1 == s_p0.len));
		if (T3_) goto LA4_;
		T3_ = (L_1 == ((NI)0));
LA4_: ;
		if (!T3_) goto LA5_;
		T7_ = NIM_NIL;
		T7_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T7_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T7_).Sup.Sup.name = "ValueError";
		T8_.len = 0; T8_.p = NIM_NIL;
		T8_ = rawNewString(s_p0.len + 17);
appendString((&T8_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_25);
appendString((&T8_), s_p0);
		(*T7_).Sup.Sup.message = T8_;
		(*T7_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T7_, "ValueError", "parseBiggestInt", "strutils.nim", 1170);
goto BeforeRet_;
	}
LA5_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NF, nsuParseFloat)(NimStringV2 s_p0) {
	NF result;
	NI L_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = 0.0;
	L_1 = parseFloat__pureZparseutils_u1006(s_p0, (&result), ((NI)0));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NIM_BOOL T3_;
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T7_;
		NimStringV2 T8_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L_1 == s_p0.len));
		if (T3_) goto LA4_;
		T3_ = (L_1 == ((NI)0));
LA4_: ;
		if (!T3_) goto LA5_;
		T7_ = NIM_NIL;
		T7_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T7_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T7_).Sup.Sup.name = "ValueError";
		T8_.len = 0; T8_.p = NIM_NIL;
		T8_ = rawNewString(s_p0.len + 15);
appendString((&T8_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_27);
appendString((&T8_), s_p0);
		(*T7_).Sup.Sup.message = T8_;
		(*T7_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T7_, "ValueError", "parseFloat", "strutils.nim", 1202);
goto BeforeRet_;
	}
LA5_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NOINLINE(void, invalidFormatString__pureZstrutils_u2661)(NimStringV2 formatstr_p0) {
	tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T1_;
	NimStringV2 T2_;
{	T1_ = NIM_NIL;
	T1_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
	(*T1_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
	(*T1_).Sup.Sup.name = "ValueError";
	T2_.len = 0; T2_.p = NIM_NIL;
	T2_ = rawNewString(formatstr_p0.len + 23);
appendString((&T2_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_32);
appendString((&T2_), formatstr_p0);
	(*T1_).Sup.Sup.message = T2_;
	(*T1_).Sup.Sup.parent = ((Exception*) NIM_NIL);
	raiseExceptionEx((Exception*)T1_, "ValueError", "invalidFormatString", "strutils.nim", 2831);
goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1) {
	prepareAdd(s_p0, ((NI)1));
	(*(*s_p0).p).data[(*s_p0).len] = c_p1;
	(*s_p0).len += ((NI)1);
	(*(*s_p0).p).data[(*s_p0).len] = 0;
}
static N_INLINE(NF, toFloat__system_u1705)(NI i_p0) {
	NF result;
	result = ((NF) (i_p0));
	return result;
}
static N_INLINE(NF, abs__system_u5188)(NF x_p0) {
	NF result;
	result = (NF)0;
	result = fabs(x_p0);
	return result;
}
static N_INLINE(NIM_BOOL, nimMulInt)(NI a_p0, NI b_p1, NI* res_p2) {
	NIM_BOOL result;
	NI r_1;
	NF floatProd_1;
	NF T1_;
	NF T2_;
	NF resAsFloat_1;
	result = (NIM_BOOL)0;
	r_1 = ((NI) ((NU)((NU64)(((NU) (a_p0))) * (NU64)(((NU) (b_p1))))));
	T1_ = (NF)0;
	T1_ = toFloat__system_u1705(a_p0);
	T2_ = (NF)0;
	T2_ = toFloat__system_u1705(b_p1);
	floatProd_1 = ((NF)(T1_) * (NF)(T2_));
	resAsFloat_1 = toFloat__system_u1705(r_1);
	{
		if (!(resAsFloat_1 == floatProd_1)) goto LA5_;
		(*res_p2) = r_1;
	}
	goto LA3_;
LA5_: ;
	{
		{
			NF T10_;
			NF T11_;
			T10_ = (NF)0;
			T10_ = abs__system_u5188(((NF)(resAsFloat_1) - (NF)(floatProd_1)));
			T11_ = (NF)0;
			T11_ = abs__system_u5188(floatProd_1);
			if (!(((NF)(32.0) * (NF)(T10_)) <= T11_)) goto LA12_;
			(*res_p2) = r_1;
		}
		goto LA8_;
LA12_: ;
		{
			result = NIM_TRUE;
		}
LA8_: ;
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringV2 a_p0, NimStringV2 b_p1) {
	NI result;
	NI aLenX60gensym24__1;
	NI bLenX60gensym24__1;
	NI iX60gensym24__1;
	NI jX60gensym24__1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	aLenX60gensym24__1 = a_p0.len;
	bLenX60gensym24__1 = b_p1.len;
	iX60gensym24__1 = ((NI)0);
	jX60gensym24__1 = ((NI)0);
	{
		while (1) {
			NIM_CHAR colontmpD_;
			NIM_CHAR colontmpD__2;
			NIM_CHAR colontmpD__3;
			NIM_CHAR colontmpD__4;
			NIM_CHAR aaX60gensym24__1;
			NIM_CHAR bbX60gensym24__1;
			colontmpD_ = (NIM_CHAR)0;
			colontmpD__2 = (NIM_CHAR)0;
			colontmpD__3 = (NIM_CHAR)0;
			colontmpD__4 = (NIM_CHAR)0;
			{
				while (1) {
					NIM_BOOL T5_;
					T5_ = (NIM_BOOL)0;
					T5_ = (iX60gensym24__1 < aLenX60gensym24__1);
					if (!(T5_)) goto LA6_;
					T5_ = ((NU8)(a_p0.p->data[iX60gensym24__1]) == (NU8)(95));
LA6_: ;
					if (!T5_) goto LA4;
					iX60gensym24__1 += ((NI)1);
				} LA4: ;
			}
			{
				while (1) {
					NIM_BOOL T9_;
					T9_ = (NIM_BOOL)0;
					T9_ = (jX60gensym24__1 < bLenX60gensym24__1);
					if (!(T9_)) goto LA10_;
					T9_ = ((NU8)(b_p1.p->data[jX60gensym24__1]) == (NU8)(95));
LA10_: ;
					if (!T9_) goto LA8;
					jX60gensym24__1 += ((NI)1);
				} LA8: ;
			}
			{
				if (!(iX60gensym24__1 < aLenX60gensym24__1)) goto LA13_;
				colontmpD_ = toLowerAscii__stdZprivateZstrimpl_u1(a_p0.p->data[iX60gensym24__1]);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				aaX60gensym24__1 = colontmpD_;
			}
			goto LA11_;
LA13_: ;
			{
				colontmpD__2 = 0;
				aaX60gensym24__1 = colontmpD__2;
			}
LA11_: ;
			{
				if (!(jX60gensym24__1 < bLenX60gensym24__1)) goto LA18_;
				colontmpD__3 = toLowerAscii__stdZprivateZstrimpl_u1(b_p1.p->data[jX60gensym24__1]);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				bbX60gensym24__1 = colontmpD__3;
			}
			goto LA16_;
LA18_: ;
			{
				colontmpD__4 = 0;
				bbX60gensym24__1 = colontmpD__4;
			}
LA16_: ;
			result = (NI)(((NU8)(aaX60gensym24__1)) - ((NU8)(bbX60gensym24__1)));
			{
				if (!!((result == ((NI)0)))) goto LA23_;
				goto BeforeRet_;
			}
LA23_: ;
			{
				if (!(aLenX60gensym24__1 <= iX60gensym24__1)) goto LA27_;
				{
					if (!(bLenX60gensym24__1 <= jX60gensym24__1)) goto LA31_;
					result = ((NI)0);
					goto BeforeRet_;
				}
LA31_: ;
				result = ((NI)-1);
				goto BeforeRet_;
			}
			goto LA25_;
LA27_: ;
			{
				if (!(bLenX60gensym24__1 <= jX60gensym24__1)) goto LA34_;
				result = ((NI)1);
				goto BeforeRet_;
			}
			goto LA25_;
LA34_: ;
LA25_: ;
			iX60gensym24__1 += ((NI)1);
			jX60gensym24__1 += ((NI)1);
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, findNormalized__pureZstrutils_u2648)(NimStringV2 x_p0, NimStringV2* inArray_p1, NI inArray_p1Len_0) {
	NI result;
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	i_1 = ((NI)0);
	{
		while (1) {
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_52;
			if (!(i_1 < (inArray_p1Len_0-1))) goto LA2;
			{
				NI T5_;
				if (i_1 < 0 || i_1 >= inArray_p1Len_0){ raiseIndexError2(i_1,inArray_p1Len_0-1); goto BeforeRet_;
				}
				T5_ = (NI)0;
				T5_ = nsuCmpIgnoreStyle(x_p0, inArray_p1[i_1]);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				if (!(T5_ == ((NI)0))) goto LA6_;
				result = i_1;
				goto BeforeRet_;
			}
LA6_: ;
			if (nimAddInt(i_1, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_52)) { raiseOverflow(); goto BeforeRet_;
			};
			i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_52);
		} LA2: ;
	}
	result = ((NI)-1);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuAddf)(NimStringV2* s_p0, NimStringV2 formatstr_p1, NimStringV2* a_p2, NI a_p2Len_0) {
	NI i_1;
	NI num_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	i_1 = ((NI)0);
	num_1 = ((NI)0);
	{
		while (1) {
			if (!(i_1 < formatstr_p1.len)) goto LA2;
			{
				NIM_BOOL T5_;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_29;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_30;
				T5_ = (NIM_BOOL)0;
				if (i_1 < 0 || i_1 >= formatstr_p1.len){ raiseIndexError2(i_1,formatstr_p1.len-1); goto BeforeRet_;
				}
				T5_ = ((NU8)(formatstr_p1.p->data[i_1]) == (NU8)(36));
				if (!(T5_)) goto LA6_;
				if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_29)) { raiseOverflow(); goto BeforeRet_;
				};
				T5_ = ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_29) < formatstr_p1.len);
LA6_: ;
				if (!T5_) goto LA7_;
				if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_30)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_30) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_30) >= formatstr_p1.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_30),formatstr_p1.len-1); goto BeforeRet_;
				}
				switch (((NU8)(formatstr_p1.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_30)]))) {
				case 35:
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_33;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_34;
					{
						if (!((a_p2Len_0-1) < num_1)) goto LA12_;
						invalidFormatString__pureZstrutils_u2661(formatstr_p1);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					}
LA12_: ;
					if (num_1 < 0 || num_1 >= a_p2Len_0){ raiseIndexError2(num_1,a_p2Len_0-1); goto BeforeRet_;
					}
					prepareAdd((&(*s_p0)), a_p2[num_1].len + 0);
appendString((&(*s_p0)), a_p2[num_1]);
					if (nimAddInt(i_1, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_33)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_33);
					if (nimAddInt(num_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_34)) { raiseOverflow(); goto BeforeRet_;
					};
					num_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_34);
				}
				break;
				case 36:
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_35;
					nimAddCharV1((&(*s_p0)), 36);
					if (nimAddInt(i_1, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_35)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_35);
				}
				break;
				case 49 ... 57:
				case 45:
				{
					NI colontmpD_;
					NI colontmpD__2;
					NI j_1;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_36;
					NIM_BOOL negative_1;
					NI idx_1;
					colontmpD_ = (NI)0;
					colontmpD__2 = (NI)0;
					j_1 = ((NI)0);
					if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_36)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_36);
					if (i_1 < 0 || i_1 >= formatstr_p1.len){ raiseIndexError2(i_1,formatstr_p1.len-1); goto BeforeRet_;
					}
					negative_1 = ((NU8)(formatstr_p1.p->data[i_1]) == (NU8)(45));
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_37;
						if (!negative_1) goto LA18_;
						if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_37)) { raiseOverflow(); goto BeforeRet_;
						};
						i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_37);
					}
LA18_: ;
					{
						while (1) {
							NIM_BOOL T22_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_38;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_39;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_40;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_41;
							T22_ = (NIM_BOOL)0;
							T22_ = (i_1 < formatstr_p1.len);
							if (!(T22_)) goto LA23_;
							if (i_1 < 0 || i_1 >= formatstr_p1.len){ raiseIndexError2(i_1,formatstr_p1.len-1); goto BeforeRet_;
							}
							T22_ = (((NU8)(formatstr_p1.p->data[i_1])) >= ((NU8)(48)) && ((NU8)(formatstr_p1.p->data[i_1])) <= ((NU8)(57)));
LA23_: ;
							if (!T22_) goto LA21;
							if (nimMulInt(j_1, ((NI)10), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_38)) { raiseOverflow(); goto BeforeRet_;
							};
							if (i_1 < 0 || i_1 >= formatstr_p1.len){ raiseIndexError2(i_1,formatstr_p1.len-1); goto BeforeRet_;
							}
							if (nimAddInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_38), ((NU8)(formatstr_p1.p->data[i_1])), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_39)) { raiseOverflow(); goto BeforeRet_;
							};
							if (nimSubInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_39), ((NI)48), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_40)) { raiseOverflow(); goto BeforeRet_;
							};
							j_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_40);
							if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_41)) { raiseOverflow(); goto BeforeRet_;
							};
							i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_41);
						} LA21: ;
					}
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_42;
						if (!!(negative_1)) goto LA26_;
						if (nimSubInt(j_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_42)) { raiseOverflow(); goto BeforeRet_;
						};
						colontmpD_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_42);
						idx_1 = colontmpD_;
					}
					goto LA24_;
LA26_: ;
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_43;
						if (nimSubInt(a_p2Len_0, j_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_43)) { raiseOverflow(); goto BeforeRet_;
						};
						colontmpD__2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_43);
						idx_1 = colontmpD__2;
					}
LA24_: ;
					{
						NIM_BOOL T31_;
						T31_ = (NIM_BOOL)0;
						T31_ = (idx_1 < ((NI)0));
						if (T31_) goto LA32_;
						T31_ = ((a_p2Len_0-1) < idx_1);
LA32_: ;
						if (!T31_) goto LA33_;
						invalidFormatString__pureZstrutils_u2661(formatstr_p1);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					}
LA33_: ;
					if (idx_1 < 0 || idx_1 >= a_p2Len_0){ raiseIndexError2(idx_1,a_p2Len_0-1); goto BeforeRet_;
					}
					prepareAdd((&(*s_p0)), a_p2[idx_1].len + 0);
appendString((&(*s_p0)), a_p2[idx_1]);
				}
				break;
				case 123:
				{
					NI j_2;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_44;
					NI k_1;
					NIM_BOOL negative_2;
					NI isNumber_1;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_56;
					if (nimAddInt(i_1, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_44)) { raiseOverflow(); goto BeforeRet_;
					};
					j_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_44);
					k_1 = ((NI)0);
					if (j_2 < 0 || j_2 >= formatstr_p1.len){ raiseIndexError2(j_2,formatstr_p1.len-1); goto BeforeRet_;
					}
					negative_2 = ((NU8)(formatstr_p1.p->data[j_2]) == (NU8)(45));
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_45;
						if (!negative_2) goto LA38_;
						if (nimAddInt(j_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_45)) { raiseOverflow(); goto BeforeRet_;
						};
						j_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_45);
					}
LA38_: ;
					isNumber_1 = ((NI)0);
					{
						while (1) {
							NIM_BOOL T42_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_49;
							T42_ = (NIM_BOOL)0;
							T42_ = (j_2 < formatstr_p1.len);
							if (!(T42_)) goto LA43_;
							if (j_2 < 0 || j_2 >= formatstr_p1.len){ raiseIndexError2(j_2,formatstr_p1.len-1); goto BeforeRet_;
							}
							T42_ = !((((NU8)(formatstr_p1.p->data[j_2])) == ((NU8)(0)) || ((NU8)(formatstr_p1.p->data[j_2])) == ((NU8)(125))));
LA43_: ;
							if (!T42_) goto LA41;
							{
								NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_46;
								NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_47;
								NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_48;
								if (j_2 < 0 || j_2 >= formatstr_p1.len){ raiseIndexError2(j_2,formatstr_p1.len-1); goto BeforeRet_;
								}
								if (!(((NU8)(formatstr_p1.p->data[j_2])) >= ((NU8)(48)) && ((NU8)(formatstr_p1.p->data[j_2])) <= ((NU8)(57)))) goto LA46_;
								if (nimMulInt(k_1, ((NI)10), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_46)) { raiseOverflow(); goto BeforeRet_;
								};
								if (j_2 < 0 || j_2 >= formatstr_p1.len){ raiseIndexError2(j_2,formatstr_p1.len-1); goto BeforeRet_;
								}
								if (nimAddInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_46), ((NU8)(formatstr_p1.p->data[j_2])), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_47)) { raiseOverflow(); goto BeforeRet_;
								};
								if (nimSubInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_47), ((NI)48), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_48)) { raiseOverflow(); goto BeforeRet_;
								};
								k_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_48);
								{
									if (!(isNumber_1 == ((NI)0))) goto LA50_;
									isNumber_1 = ((NI)1);
								}
LA50_: ;
							}
							goto LA44_;
LA46_: ;
							{
								isNumber_1 = ((NI)-1);
							}
LA44_: ;
							if (nimAddInt(j_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_49)) { raiseOverflow(); goto BeforeRet_;
							};
							j_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_49);
						} LA41: ;
					}
					{
						NI colontmpD__3;
						NI colontmpD__4;
						NI idx_2;
						if (!(isNumber_1 == ((NI)1))) goto LA55_;
						colontmpD__3 = (NI)0;
						colontmpD__4 = (NI)0;
						{
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_50;
							if (!!(negative_2)) goto LA59_;
							if (nimSubInt(k_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_50)) { raiseOverflow(); goto BeforeRet_;
							};
							colontmpD__3 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_50);
							idx_2 = colontmpD__3;
						}
						goto LA57_;
LA59_: ;
						{
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_51;
							if (nimSubInt(a_p2Len_0, k_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_51)) { raiseOverflow(); goto BeforeRet_;
							};
							colontmpD__4 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_51);
							idx_2 = colontmpD__4;
						}
LA57_: ;
						{
							NIM_BOOL T64_;
							T64_ = (NIM_BOOL)0;
							T64_ = (idx_2 < ((NI)0));
							if (T64_) goto LA65_;
							T64_ = ((a_p2Len_0-1) < idx_2);
LA65_: ;
							if (!T64_) goto LA66_;
							invalidFormatString__pureZstrutils_u2661(formatstr_p1);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						}
LA66_: ;
						if (idx_2 < 0 || idx_2 >= a_p2Len_0){ raiseIndexError2(idx_2,a_p2Len_0-1); goto BeforeRet_;
						}
						prepareAdd((&(*s_p0)), a_p2[idx_2].len + 0);
appendString((&(*s_p0)), a_p2[idx_2]);
					}
					goto LA53_;
LA55_: ;
					{
						NimStringV2 colontmpD__5;
						NI x_1;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_53;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_54;
						colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
						if (nimAddInt(i_1, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_53)) { raiseOverflow(); goto LA69_;
						};
						if (nimSubInt(j_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_54)) { raiseOverflow(); goto LA69_;
						};
						colontmpD__5 = substr__system_u9096(formatstr_p1, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_53), (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_54));
						x_1 = findNormalized__pureZstrutils_u2648(colontmpD__5, a_p2, a_p2Len_0);
						if (NIM_UNLIKELY(*nimErr_)) goto LA69_;
						{
							NIM_BOOL T72_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_55;
							T72_ = (NIM_BOOL)0;
							T72_ = (((NI)0) <= x_1);
							if (!(T72_)) goto LA73_;
							T72_ = (x_1 < (a_p2Len_0-1));
LA73_: ;
							if (!T72_) goto LA74_;
							if (nimAddInt(x_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_55)) { raiseOverflow(); goto LA69_;
							};
							if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_55) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_55) >= a_p2Len_0){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_55),a_p2Len_0-1); goto LA69_;
							}
							prepareAdd((&(*s_p0)), a_p2[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_55)].len + 0);
appendString((&(*s_p0)), a_p2[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_55)]);
						}
						goto LA70_;
LA74_: ;
						{
							invalidFormatString__pureZstrutils_u2661(formatstr_p1);
							if (NIM_UNLIKELY(*nimErr_)) goto LA69_;
						}
LA70_: ;
						{
							LA69_:;
						}
						{
							if (colontmpD__5.p && !(colontmpD__5.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__5.p);
}
						}
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					}
LA53_: ;
					if (nimAddInt(j_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_56)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_56);
				}
				break;
				case 97 ... 122:
				case 65 ... 90:
				case 128 ... 255:
				case 95:
				{
					NimStringV2 colontmpD__6;
					NI j_3;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_57;
					NI x_2;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_59;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_60;
					colontmpD__6.len = 0; colontmpD__6.p = NIM_NIL;
					if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_57)) { raiseOverflow(); goto LA80_;
					};
					j_3 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_57);
					{
						while (1) {
							NIM_BOOL T83_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_58;
							T83_ = (NIM_BOOL)0;
							T83_ = (j_3 < formatstr_p1.len);
							if (!(T83_)) goto LA84_;
							if (j_3 < 0 || j_3 >= formatstr_p1.len){ raiseIndexError2(j_3,formatstr_p1.len-1); goto LA80_;
							}
							T83_ = (((NU8)(formatstr_p1.p->data[j_3])) >= ((NU8)(97)) && ((NU8)(formatstr_p1.p->data[j_3])) <= ((NU8)(122)) || ((NU8)(formatstr_p1.p->data[j_3])) >= ((NU8)(65)) && ((NU8)(formatstr_p1.p->data[j_3])) <= ((NU8)(90)) || ((NU8)(formatstr_p1.p->data[j_3])) >= ((NU8)(48)) && ((NU8)(formatstr_p1.p->data[j_3])) <= ((NU8)(57)) || ((NU8)(formatstr_p1.p->data[j_3])) >= ((NU8)(128)) && ((NU8)(formatstr_p1.p->data[j_3])) <= ((NU8)(255)) || ((NU8)(formatstr_p1.p->data[j_3])) == ((NU8)(95)));
LA84_: ;
							if (!T83_) goto LA82;
							if (nimAddInt(j_3, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_58)) { raiseOverflow(); goto LA80_;
							};
							j_3 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_58);
						} LA82: ;
					}
					if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_59)) { raiseOverflow(); goto LA80_;
					};
					if (nimSubInt(j_3, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_60)) { raiseOverflow(); goto LA80_;
					};
					colontmpD__6 = substr__system_u9096(formatstr_p1, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_59), (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_60));
					x_2 = findNormalized__pureZstrutils_u2648(colontmpD__6, a_p2, a_p2Len_0);
					if (NIM_UNLIKELY(*nimErr_)) goto LA80_;
					{
						NIM_BOOL T87_;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_61;
						T87_ = (NIM_BOOL)0;
						T87_ = (((NI)0) <= x_2);
						if (!(T87_)) goto LA88_;
						T87_ = (x_2 < (a_p2Len_0-1));
LA88_: ;
						if (!T87_) goto LA89_;
						if (nimAddInt(x_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_61)) { raiseOverflow(); goto LA80_;
						};
						if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_61) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_61) >= a_p2Len_0){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_61),a_p2Len_0-1); goto LA80_;
						}
						prepareAdd((&(*s_p0)), a_p2[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_61)].len + 0);
appendString((&(*s_p0)), a_p2[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_61)]);
					}
					goto LA85_;
LA89_: ;
					{
						invalidFormatString__pureZstrutils_u2661(formatstr_p1);
						if (NIM_UNLIKELY(*nimErr_)) goto LA80_;
					}
LA85_: ;
					i_1 = j_3;
					{
						LA80_:;
					}
					{
						if (colontmpD__6.p && !(colontmpD__6.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__6.p);
}
					}
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
				break;
				default:
				{
					invalidFormatString__pureZstrutils_u2661(formatstr_p1);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
				break;
				}
			}
			goto LA3_;
LA7_: ;
			{
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_62;
				if (i_1 < 0 || i_1 >= formatstr_p1.len){ raiseIndexError2(i_1,formatstr_p1.len-1); goto BeforeRet_;
				}
				nimAddCharV1((&(*s_p0)), formatstr_p1.p->data[i_1]);
				if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_62)) { raiseOverflow(); goto BeforeRet_;
				};
				i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_62);
			}
LA3_: ;
		} LA2: ;
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuFormatOpenArray)(NimStringV2 formatstr_p0, NimStringV2* a_p1, NI a_p1Len_0) {
	NimStringV2 result;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_28;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	if (nimAddInt(formatstr_p0.len, (NI)((NU64)(a_p1Len_0) << (NU64)(((NI)4) & (64 - 1))), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_28)) { raiseOverflow(); goto BeforeRet_;
	};
	if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_28)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_28)) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_28), ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = rawNewString(((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_28)));
	nsuAddf((&result), formatstr_p0, a_p1, a_p1Len_0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nimIdentNormalize__pureZstrutils_u123)(NimStringV2 s_p0) {
	NimStringV2 result;
	NI j_1;
{	result.len = 0; result.p = NIM_NIL;
	if ((s_p0.len) < ((NI)0) || (s_p0.len) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(s_p0.len, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString((s_p0.len));
	{
		if (!(s_p0.len == ((NI)0))) goto LA3_;
		goto BeforeRet_;
	}
LA3_: ;
	if (((NI)0) < 0 || ((NI)0) >= result.len){ raiseIndexError2(((NI)0),result.len-1); goto BeforeRet_;
	}
	nimPrepareStrMutationV2((&result));
	if (((NI)0) < 0 || ((NI)0) >= s_p0.len){ raiseIndexError2(((NI)0),s_p0.len-1); goto BeforeRet_;
	}
	result.p->data[((NI)0)] = s_p0.p->data[((NI)0)];
	j_1 = ((NI)1);
	{
		NI i_1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_63;
		NI res_1;
		i_1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(s_p0.len, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_63)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_63);
		res_1 = ((NI)1);
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_67;
				if (!(res_1 <= colontmp_)) goto LA7;
				i_1 = ((NI) (res_1));
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_64;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_65;
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					if (!(((NU8)(s_p0.p->data[i_1])) >= ((NU8)(65)) && ((NU8)(s_p0.p->data[i_1])) <= ((NU8)(90)))) goto LA10_;
					if (j_1 < 0 || j_1 >= result.len){ raiseIndexError2(j_1,result.len-1); goto BeforeRet_;
					}
					nimPrepareStrMutationV2((&result));
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					if (nimAddInt(((NU8)(s_p0.p->data[i_1])), ((NI)32), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_64)) { raiseOverflow(); goto BeforeRet_;
					};
					if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_64)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_64)) > ((NI)255)){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_64), ((NI)0), ((NI)255)); goto BeforeRet_;
					}
					result.p->data[j_1] = ((NIM_CHAR) (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_64))));
					if (nimAddInt(j_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_65)) { raiseOverflow(); goto BeforeRet_;
					};
					j_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_65);
				}
				goto LA8_;
LA10_: ;
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_66;
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					if (!!(((NU8)(s_p0.p->data[i_1]) == (NU8)(95)))) goto LA13_;
					if (j_1 < 0 || j_1 >= result.len){ raiseIndexError2(j_1,result.len-1); goto BeforeRet_;
					}
					nimPrepareStrMutationV2((&result));
					if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
					}
					result.p->data[j_1] = s_p0.p->data[i_1];
					if (nimAddInt(j_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_66)) { raiseOverflow(); goto BeforeRet_;
					};
					j_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_66);
				}
				goto LA8_;
LA13_: ;
LA8_: ;
				if (nimAddInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_67)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_67);
			} LA7: ;
		}
	}
	{
		if (!!((j_1 == s_p0.len))) goto LA17_;
		if ((j_1) < ((NI)0) || (j_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(j_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
		}
		setLengthStrV2((&result), (j_1));
	}
LA17_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2) {
	int result;
	result = memcmp(a_p0, b_p1, ((size_t) (size_p2)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__system_u1763)(void* a_p0, void* b_p1, NI size_p2) {
	NIM_BOOL result;
	int T1_;
	T1_ = (int)0;
	T1_ = nimCmpMem(a_p0, b_p1, size_p2);
	result = (T1_ == ((NI32)0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1) {
	NIM_BOOL result;
	NI alen_1;
	NI blen_1;
{	result = NIM_FALSE;
	alen_1 = a_p0.len;
	blen_1 = b_p1.len;
	{
		if (!(alen_1 == blen_1)) goto LA3_;
		{
			if (!(alen_1 == ((NI)0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
LA7_: ;
		result = equalMem__system_u1763(((void*) ((&a_p0.p->data[((NI)0)]))), ((void*) ((&b_p1.p->data[((NI)0)]))), (alen_1));
		goto BeforeRet_;
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw, parseEnum__confighandler_u2287)(NimStringV2 s_p0) {
	tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw result;
	NimStringV2 colontmpD_;
	tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw colontmpD__2;
	tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw colontmpD__3;
	tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw colontmpD__4;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw)0;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2 = (tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw)0;
	colontmpD__3 = (tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw)0;
	colontmpD__4 = (tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw)0;
	colontmpD_ = nimIdentNormalize__pureZstrutils_u123(s_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_69)) goto LA2_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_71)) goto LA3_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_73)) goto LA4_;
	goto LA5_;
	LA2_: ;
	{
		colontmpD__2 = ((tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw)0);
		result = colontmpD__2;
	}
	goto LA6_;
	LA3_: ;
	{
		colontmpD__3 = ((tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw)1);
		result = colontmpD__3;
	}
	goto LA6_;
	LA4_: ;
	{
		colontmpD__4 = ((tyEnum_ResolutionAlgorithm__EDrRewmAkc38ngHuXBbDaw)2);
		result = colontmpD__4;
	}
	goto LA6_;
	LA5_: ;
	{
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T11_;
		NimStringV2 T12_;
		T11_ = NIM_NIL;
		T11_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T11_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T11_).Sup.Sup.name = "ValueError";
		T12_.len = 0; T12_.p = NIM_NIL;
		T12_ = rawNewString(s_p0.len + 20);
appendString((&T12_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_75);
appendString((&T12_), s_p0);
		(*T11_).Sup.Sup.message = T12_;
		(*T11_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T11_, "ValueError", "parseEnum", "enumutils.nim", 77);
goto LA1_;
	}
LA6_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringV2 s_p0, NimStringV2 suffix_p1) {
	NIM_BOOL result;
	NI suffixLenX60gensym151__1;
	NI sLenX60gensym151__1;
	NI iX60gensym151__1;
	NI jX60gensym151__1;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_76;
{	result = NIM_FALSE;
	suffixLenX60gensym151__1 = suffix_p1.len;
	sLenX60gensym151__1 = s_p0.len;
	iX60gensym151__1 = ((NI)0);
	if (nimSubInt(sLenX60gensym151__1, suffixLenX60gensym151__1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_76)) { raiseOverflow(); goto BeforeRet_;
	};
	jX60gensym151__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_76);
	{
		while (1) {
			NIM_BOOL T3_;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_77;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_78;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_80;
			T3_ = (NIM_BOOL)0;
			if (nimAddInt(iX60gensym151__1, jX60gensym151__1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_77)) { raiseOverflow(); goto BeforeRet_;
			};
			T3_ = (((NI)0) <= (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_77));
			if (!(T3_)) goto LA4_;
			if (nimAddInt(iX60gensym151__1, jX60gensym151__1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_78)) { raiseOverflow(); goto BeforeRet_;
			};
			T3_ = ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_78) < sLenX60gensym151__1);
LA4_: ;
			if (!T3_) goto LA2;
			{
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_79;
				if (nimAddInt(iX60gensym151__1, jX60gensym151__1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_79)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_79) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_79) >= s_p0.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_79),s_p0.len-1); goto BeforeRet_;
				}
				if (iX60gensym151__1 < 0 || iX60gensym151__1 >= suffix_p1.len){ raiseIndexError2(iX60gensym151__1,suffix_p1.len-1); goto BeforeRet_;
				}
				if (!!(((NU8)(s_p0.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_79)]) == (NU8)(suffix_p1.p->data[iX60gensym151__1])))) goto LA7_;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
LA7_: ;
			if (nimAddInt(iX60gensym151__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_80)) { raiseOverflow(); goto BeforeRet_;
			};
			iX60gensym151__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_80);
		} LA2: ;
	}
	{
		if (!(suffixLenX60gensym151__1 <= iX60gensym151__1)) goto LA11_;
		result = NIM_TRUE;
		goto BeforeRet_;
	}
LA11_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuIsUpperAsciiChar)(NIM_CHAR c_p0) {
	NIM_BOOL result;
{	result = (((NU8)(c_p0)) >= ((NU8)(65)) && ((NU8)(c_p0)) <= ((NU8)(90)));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuToOctal)(NIM_CHAR c_p0) {
	NimStringV2 result;
	NI val_1;
{	result = mnewString(((NI)3));
	val_1 = ((NU8)(c_p0));
	{
		NI i_1;
		NI res_1;
		i_1 = (NI)0;
		res_1 = ((NI)2);
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_81;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_82;
				if (!(((NI)0) <= res_1)) goto LA3;
				i_1 = ((NI) (res_1));
				if (i_1 < 0 || i_1 >= result.len){ raiseIndexError2(i_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if (nimAddInt((NI)((val_1) % (((NI)8))), ((NI)48), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_81)) { raiseOverflow(); goto BeforeRet_;
				};
				if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_81)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_81)) > ((NI)255)){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_81), ((NI)0), ((NI)255)); goto BeforeRet_;
				}
				result.p->data[i_1] = ((NIM_CHAR) (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_81))));
				val_1 = (NI)((val_1) / (((NI)8)));
				if (nimSubInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_82)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_82);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuFormatVarargs)(NimStringV2 formatstr_p0, NimStringV2* a_p1, NI a_p1Len_0) {
	NimStringV2 result;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_83;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	if (nimAddInt(formatstr_p0.len, a_p1Len_0, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_83)) { raiseOverflow(); goto BeforeRet_;
	};
	if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_83)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_83)) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_83), ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = rawNewString(((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_83)));
	nsuAddf((&result), formatstr_p0, a_p1, a_p1Len_0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, minuspercent___system_u813)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0) {
	NCSTRING result;
	{
		if (!(s_p0.len == ((NI)0))) goto LA3_;
		result = "";
	}
	goto LA1_;
LA3_: ;
	{
		result = ((NCSTRING) ((*s_p0.p).data));
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindChar)(NimStringV2 s_p0, NIM_CHAR sub_p1, NI start_p2, NI last_p3) {
	NI result;
	NI colontmpD_;
	NI colontmpD__2;
	NI last_2;
	NI length_1;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_87;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_88;
{	colontmpD_ = (NI)0;
	colontmpD__2 = (NI)0;
	result = ((NI)-1);
	{
		if (!(last_p3 < ((NI)0))) goto LA3_;
		colontmpD_ = (s_p0.len-1);
		last_2 = colontmpD_;
	}
	goto LA1_;
LA3_: ;
	{
		colontmpD__2 = last_p3;
		last_2 = colontmpD__2;
	}
LA1_: ;
	if (nimSubInt(last_2, start_p2, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_87)) { raiseOverflow(); goto BeforeRet_;
	};
	if (nimAddInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_87), ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_88)) { raiseOverflow(); goto BeforeRet_;
	};
	length_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_88);
	{
		void* found_1;
		if (!(((NI)0) < length_1)) goto LA8_;
		if (start_p2 < 0 || start_p2 >= s_p0.len){ raiseIndexError2(start_p2,s_p0.len-1); goto BeforeRet_;
		}
		found_1 = memchr(((void*) ((&s_p0.p->data[start_p2]))), ((int) (((NU8)(sub_p1)))), ((size_t) (length_1)));
		{
			if (!!((found_1 == 0))) goto LA12_;
			result = minuspercent___system_u813(((NI) (ptrdiff_t) (found_1)), ((NI) (nimToCStringConv(s_p0))));
			goto BeforeRet_;
		}
LA12_: ;
	}
LA8_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStrA)(tyArray__9cc9aPiDa8VaWjVcFLabEDZQ a_p0, NimStringV2 s_p1, NimStringV2 sub_p2, NI start_p3, NI last_p4) {
	NI result;
	NI colontmpD_;
	NI colontmpD__2;
	NI last_2;
	NI subLast_1;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_90;
	NI skip_1;
{	result = (NI)0;
	colontmpD_ = (NI)0;
	colontmpD__2 = (NI)0;
	{
		if (!(last_p4 < ((NI)0))) goto LA3_;
		colontmpD_ = (s_p1.len-1);
		last_2 = colontmpD_;
	}
	goto LA1_;
LA3_: ;
	{
		colontmpD__2 = last_p4;
		last_2 = colontmpD__2;
	}
LA1_: ;
	if (nimSubInt(sub_p2.len, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_90)) { raiseOverflow(); goto BeforeRet_;
	};
	subLast_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_90);
	{
		if (!(subLast_1 == ((NI)-1))) goto LA8_;
		result = start_p3;
		goto BeforeRet_;
	}
LA8_: ;
	result = ((NI)-1);
	skip_1 = start_p3;
	{
		while (1) {
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_91;
			NI i_1;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_94;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_95;
			if (nimSubInt(last_2, skip_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_91)) { raiseOverflow(); goto BeforeRet_;
			};
			if (!(subLast_1 <= (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_91))) goto LA11;
			i_1 = subLast_1;
			{
				while (1) {
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_92;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_93;
					if (nimAddInt(skip_1, i_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_92)) { raiseOverflow(); goto BeforeRet_;
					};
					if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_92) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_92) >= s_p1.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_92),s_p1.len-1); goto BeforeRet_;
					}
					if (i_1 < 0 || i_1 >= sub_p2.len){ raiseIndexError2(i_1,sub_p2.len-1); goto BeforeRet_;
					}
					if (!((NU8)(s_p1.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_92)]) == (NU8)(sub_p2.p->data[i_1]))) goto LA13;
					{
						if (!(i_1 == ((NI)0))) goto LA16_;
						result = skip_1;
						goto BeforeRet_;
					}
LA16_: ;
					if (nimSubInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_93)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_93);
				} LA13: ;
			}
			if (nimAddInt(skip_1, subLast_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_94)) { raiseOverflow(); goto BeforeRet_;
			};
			if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_94) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_94) >= s_p1.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_94),s_p1.len-1); goto BeforeRet_;
			}
			if (nimAddInt(skip_1, a_p0[(((NU8)(s_p1.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_94)])))- 0], &TM__JGc9b9bh2D3nTdUR7TGyq8aA_95)) { raiseOverflow(); goto BeforeRet_;
			};
			if (TM__JGc9b9bh2D3nTdUR7TGyq8aA_95 < 0 || TM__JGc9b9bh2D3nTdUR7TGyq8aA_95 > IL64(9223372036854775807)){ raiseOverflow(); goto BeforeRet_;
			}
			skip_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_95);
		} LA11: ;
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuInitSkipTable)(NI* a_p0, NimStringV2 sub_p1) {
	NI m_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	m_1 = sub_p1.len;
	fill__pureZstrutils_u1634(a_p0, 256, m_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NI i_1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_96;
		NI i_2;
		i_1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(m_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_96)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_96);
		i_2 = ((NI)0);
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_97;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_98;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_99;
				if (!(i_2 < colontmp_)) goto LA3;
				i_1 = i_2;
				if (i_1 < 0 || i_1 >= sub_p1.len){ raiseIndexError2(i_1,sub_p1.len-1); goto BeforeRet_;
				}
				if (nimSubInt(m_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_97)) { raiseOverflow(); goto BeforeRet_;
				};
				if (nimSubInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_97), i_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_98)) { raiseOverflow(); goto BeforeRet_;
				};
				a_p0[(((NU8)(sub_p1.p->data[i_1])))- 0] = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_98);
				if (nimAddInt(i_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_99)) { raiseOverflow(); goto BeforeRet_;
				};
				i_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_99);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuInitNewSkipTable)(NimStringV2 sub_p0, tyArray__9cc9aPiDa8VaWjVcFLabEDZQ Result) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nsuInitSkipTable(Result, sub_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(void, nimSetMem__system_u2188)(void* a_p0, int v_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a_p0, v_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) {
	nimSetMem__system_u2188(p_p0, ((int)0), size_p1);
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStr)(NimStringV2 s_p0, NimStringV2 sub_p1, NI start_p2, NI last_p3) {
	NI result;
	NI subLen_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	{
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_86;
		if (nimSubInt(s_p0.len, start_p2, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_86)) { raiseOverflow(); goto BeforeRet_;
		};
		if (!((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_86) < sub_p1.len)) goto LA3_;
		result = ((NI)-1);
		goto BeforeRet_;
	}
LA3_: ;
	{
		if (!(sub_p1.len == ((NI)1))) goto LA7_;
		if (((NI)0) < 0 || ((NI)0) >= sub_p1.len){ raiseIndexError2(((NI)0),sub_p1.len-1); goto BeforeRet_;
		}
		result = nsuFindChar(s_p0, sub_p1.p->data[((NI)0)], start_p2, last_p3);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		goto BeforeRet_;
	}
LA7_: ;
	subLen_1 = sub_p1.len;
	{
		NIM_BOOL T11_;
		NIM_BOOL T12_;
		void* found_1;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_89;
		NI T17_;
		T11_ = (NIM_BOOL)0;
		T12_ = (NIM_BOOL)0;
		T12_ = (last_p3 < ((NI)0));
		if (!(T12_)) goto LA13_;
		T12_ = (start_p2 < s_p0.len);
LA13_: ;
		T11_ = T12_;
		if (!(T11_)) goto LA14_;
		T11_ = !((subLen_1 == ((NI)0)));
LA14_: ;
		if (!T11_) goto LA15_;
		if (start_p2 < 0 || start_p2 >= s_p0.len){ raiseIndexError2(start_p2,s_p0.len-1); goto BeforeRet_;
		}
		if (nimSubInt(s_p0.len, start_p2, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_89)) { raiseOverflow(); goto BeforeRet_;
		};
		found_1 = memmem(((void*) ((&s_p0.p->data[start_p2]))), ((size_t) ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_89))), ((void*) (nimToCStringConv(sub_p1))), ((size_t) (subLen_1)));
		T17_ = (NI)0;
		{
			if (!!((found_1 == 0))) goto LA20_;
			result = minuspercent___system_u813(((NI) (ptrdiff_t) (found_1)), ((NI) (nimToCStringConv(s_p0))));
		}
		goto LA18_;
LA20_: ;
		{
			result = ((NI)-1);
		}
LA18_: ;
	}
	goto LA9_;
LA15_: ;
	{
		tyArray__9cc9aPiDa8VaWjVcFLabEDZQ T24_;
		nimZeroMem((void*)T24_, sizeof(tyArray__9cc9aPiDa8VaWjVcFLabEDZQ));
		nsuInitNewSkipTable(sub_p1, T24_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = nsuFindStrA(T24_, s_p0, sub_p1, start_p2, last_p3);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA9_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCountString)(NimStringV2 s_p0, NimStringV2 sub_p1, NIM_BOOL overlapping_p2) {
	NI result;
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	{
		if (!!((((NI)0) < sub_p1.len))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_85);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	result = ((NI)0);
	i_1 = ((NI)0);
	{
		while (1) {
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_102;
			if ((i_1) < ((NI)0) || (i_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(i_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
			}
			i_1 = nsuFindStr(s_p0, sub_p1, (i_1), ((NI)-1));
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			{
				if (!(i_1 < ((NI)0))) goto LA9_;
				goto LA5;
			}
LA9_: ;
			{
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_100;
				if (!overlapping_p2) goto LA13_;
				if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_100)) { raiseOverflow(); goto BeforeRet_;
				};
				i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_100);
			}
			goto LA11_;
LA13_: ;
			{
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_101;
				if (nimAddInt(i_1, sub_p1.len, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_101)) { raiseOverflow(); goto BeforeRet_;
				};
				i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_101);
			}
LA11_: ;
			if (nimAddInt(result, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_102)) { raiseOverflow(); goto BeforeRet_;
			};
			result = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_102);
		}
	} LA5: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuFormatSingleElem)(NimStringV2 formatstr_p0, NimStringV2 a_p1) {
	NimStringV2 result;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_103;
	tyArray__YgExxhfgKcesA5EOUj1MOA T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	if (nimAddInt(formatstr_p0.len, a_p1.len, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_103)) { raiseOverflow(); goto BeforeRet_;
	};
	if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_103)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_103)) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_103), ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = rawNewString(((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_103)));
	T1_[0] = a_p1;
	nsuAddf((&result), formatstr_p0, T1_, 1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuReplaceStr)(NimStringV2 s_p0, NimStringV2 sub_p1, NimStringV2 by_p2) {
	NimStringV2 result;
	NI subLen_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = TM__JGc9b9bh2D3nTdUR7TGyq8aA_105;
	subLen_1 = sub_p1.len;
	{
		if (!(subLen_1 == ((NI)0))) goto LA3_;
		eqcopy___system_u2754((&result), s_p0);
	}
	goto LA1_;
LA3_: ;
	{
		NimStringV2 colontmpD_;
		NIM_CHAR c_1;
		NI last_1;
		NI i_1;
		if (!(subLen_1 == ((NI)1))) goto LA6_;
		colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
		if (((NI)0) < 0 || ((NI)0) >= sub_p1.len){ raiseIndexError2(((NI)0),sub_p1.len-1); goto LA8_;
		}
		c_1 = sub_p1.p->data[((NI)0)];
		last_1 = (s_p0.len-1);
		i_1 = ((NI)0);
		{
			while (1) {
				NimStringV2 colontmpD__2;
				NI j_1;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_106;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_107;
				colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
				if ((i_1) < ((NI)0) || (i_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(i_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto LA11_;
				}
				j_1 = nsuFindChar(s_p0, c_1, (i_1), last_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
				{
					if (!(j_1 < ((NI)0))) goto LA14_;
					if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
					goto LA9;
				}
LA14_: ;
				if (nimSubInt(j_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_106)) { raiseOverflow(); goto LA11_;
				};
				colontmpD__2 = substr__system_u9096(s_p0, i_1, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_106));
				prepareAdd((&result), colontmpD__2.len + 0);
appendString((&result), colontmpD__2);
				prepareAdd((&result), by_p2.len + 0);
appendString((&result), by_p2);
				if (nimAddInt(j_1, subLen_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_107)) { raiseOverflow(); goto LA11_;
				};
				i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_107);
				{
					LA11_:;
				}
				{
					if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
				}
				if (NIM_UNLIKELY(*nimErr_)) goto LA8_;
			}
		} LA9: ;
		colontmpD_ = substr__system_u9109(s_p0, i_1);
		prepareAdd((&result), colontmpD_.len + 0);
appendString((&result), colontmpD_);
		{
			LA8_:;
		}
		{
			if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	goto LA1_;
LA6_: ;
	{
		NimStringV2 colontmpD__3;
		tyArray__9cc9aPiDa8VaWjVcFLabEDZQ a_1;
		NI last_2;
		NI i_2;
		colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
		nimZeroMem((void*)a_1, sizeof(tyArray__9cc9aPiDa8VaWjVcFLabEDZQ));
		nsuInitNewSkipTable(sub_p1, a_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
		last_2 = (s_p0.len-1);
		i_2 = ((NI)0);
		{
			while (1) {
				NimStringV2 colontmpD__4;
				NI j_2;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_108;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_109;
				colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
				if ((i_2) < ((NI)0) || (i_2) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(i_2, ((NI)0), ((NI)IL64(9223372036854775807))); goto LA24_;
				}
				j_2 = nsuFindStrA(a_1, s_p0, sub_p1, (i_2), last_2);
				if (NIM_UNLIKELY(*nimErr_)) goto LA24_;
				{
					if (!(j_2 < ((NI)0))) goto LA27_;
					if (colontmpD__4.p && !(colontmpD__4.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__4.p);
}
					goto LA22;
				}
LA27_: ;
				if (nimSubInt(j_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_108)) { raiseOverflow(); goto LA24_;
				};
				colontmpD__4 = substr__system_u9096(s_p0, i_2, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_108));
				prepareAdd((&result), colontmpD__4.len + 0);
appendString((&result), colontmpD__4);
				prepareAdd((&result), by_p2.len + 0);
appendString((&result), by_p2);
				if (nimAddInt(j_2, subLen_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_109)) { raiseOverflow(); goto LA24_;
				};
				i_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_109);
				{
					LA24_:;
				}
				{
					if (colontmpD__4.p && !(colontmpD__4.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__4.p);
}
				}
				if (NIM_UNLIKELY(*nimErr_)) goto LA21_;
			}
		} LA22: ;
		colontmpD__3 = substr__system_u9109(s_p0, i_2);
		prepareAdd((&result), colontmpD__3.len + 0);
appendString((&result), colontmpD__3);
		{
			LA21_:;
		}
		{
			if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuToBin)(NI64 x_p0, NI len_p1) {
	NimStringV2 result;
	NU64 mask_1;
	NU64 shift_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	mask_1 = 1ULL;
	shift_1 = 0ULL;
	{
		if (!!((((NI)0) < len_p1))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_111);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	result = mnewString(len_p1);
	{
		NI j_1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_112;
		NI res_1;
		j_1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(len_p1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_112)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_112);
		res_1 = colontmp_;
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_113;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_114;
				if (!(((NI)0) <= res_1)) goto LA7;
				j_1 = ((NI) (res_1));
				if (j_1 < 0 || j_1 >= result.len){ raiseIndexError2(j_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if ((NU64)((NU64)((NU64)(((NU64) (x_p0)) & mask_1)) >> (NU64)(shift_1 & (64 - 1))) > (NU64)(((NI)IL64(9223372036854775807)))){ raiseRangeErrorNoArgs(); goto BeforeRet_;
				}
				if (nimAddInt(((NI) ((NU64)((NU64)((NU64)(((NU64) (x_p0)) & mask_1)) >> (NU64)(shift_1 & (64 - 1))))), ((NI)48), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_113)) { raiseOverflow(); goto BeforeRet_;
				};
				if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_113)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_113)) > ((NI)255)){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_113), ((NI)0), ((NI)255)); goto BeforeRet_;
				}
				result.p->data[j_1] = ((NIM_CHAR) (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_113))));
				shift_1 += ((NI)1);
				mask_1 = (NU64)((NU64)(mask_1) << (NU64)(1ULL & (64 - 1)));
				if (nimSubInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_114)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_114);
			} LA7: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuToOct)(NI64 x_p0, NI len_p1) {
	NimStringV2 result;
	NU64 mask_1;
	NU64 shift_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	mask_1 = 7ULL;
	shift_1 = 0ULL;
	{
		if (!!((((NI)0) < len_p1))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_116);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	result = mnewString(len_p1);
	{
		NI j_1;
		NI colontmp_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_117;
		NI res_1;
		j_1 = (NI)0;
		colontmp_ = (NI)0;
		if (nimSubInt(len_p1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_117)) { raiseOverflow(); goto BeforeRet_;
		};
		colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_117);
		res_1 = colontmp_;
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_118;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_119;
				if (!(((NI)0) <= res_1)) goto LA7;
				j_1 = ((NI) (res_1));
				if (j_1 < 0 || j_1 >= result.len){ raiseIndexError2(j_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if ((NU64)((NU64)((NU64)(((NU64) (x_p0)) & mask_1)) >> (NU64)(shift_1 & (64 - 1))) > (NU64)(((NI)IL64(9223372036854775807)))){ raiseRangeErrorNoArgs(); goto BeforeRet_;
				}
				if (nimAddInt(((NI) ((NU64)((NU64)((NU64)(((NU64) (x_p0)) & mask_1)) >> (NU64)(shift_1 & (64 - 1))))), ((NI)48), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_118)) { raiseOverflow(); goto BeforeRet_;
				};
				if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_118)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_118)) > ((NI)255)){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_118), ((NI)0), ((NI)255)); goto BeforeRet_;
				}
				result.p->data[j_1] = ((NIM_CHAR) (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_118))));
				shift_1 += ((NI)3);
				mask_1 = (NU64)((NU64)(mask_1) << (NU64)(3ULL & (64 - 1)));
				if (nimSubInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_119)) { raiseOverflow(); goto BeforeRet_;
				};
				res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_119);
			} LA7: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toHex__OOZOOZOOZcompilerZrenderer_u832)(NI64 x_p0, NI len_p1) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	result = toHexImpl__pureZstrutils_u783(((NU64) (x_p0)), len_p1, (x_p0 < IL64(0)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, join__basicZnimblecontext_u96)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 sep_p1) {
	NimStringV2 result;
{	result = TM__JGc9b9bh2D3nTdUR7TGyq8aA_120;
	{
		NimStringV2 x_1;
		NI i_1;
		NI i_2;
		x_1.len = 0; x_1.p = NIM_NIL;
		i_1 = (NI)0;
		i_2 = ((NI)0);
		{
			while (1) {
				if (!(i_2 < a_p0Len_0)) goto LA3;
				i_1 = i_2;
				if (i_2 < 0 || i_2 >= a_p0Len_0){ raiseIndexError2(i_2,a_p0Len_0-1); goto BeforeRet_;
				}
				x_1 = a_p0[i_2];
				{
					if (!(((NI)0) < i_1)) goto LA6_;
					prepareAdd((&result), sep_p1.len + 0);
appendString((&result), sep_p1);
				}
LA6_: ;
				prepareAdd((&result), x_1.len + 0);
appendString((&result), x_1);
				i_2 += ((NI)1);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, allCharsInSet__pureZstrutils_u1569)(NimStringV2 s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw theSet_p1) {
	NIM_BOOL result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	{
		NIM_CHAR c_1;
		NI i_1;
		NI L_1;
		c_1 = (NIM_CHAR)0;
		i_1 = ((NI)0);
		L_1 = s_p0.len;
		{
			while (1) {
				if (!(i_1 < L_1)) goto LA3;
				if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
				}
				c_1 = s_p0.p->data[i_1];
				{
					if (!!(((theSet_p1[(NU)((((NU8)(c_1))))>>3] &(1U<<((NU)((((NU8)(c_1))))&7U)))!=0))) goto LA6_;
					result = NIM_FALSE;
					goto BeforeRet_;
				}
LA6_: ;
				i_1 += ((NI)1);
				{
					if (!!((s_p0.len == L_1))) goto LA10_;
					failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_122);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA10_: ;
			} LA3: ;
		}
	}
	result = NIM_TRUE;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuJoinSep)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 sep_p1) {
	NimStringV2 result;
{	result.len = 0; result.p = NIM_NIL;
	{
		NI L_1;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_123;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_124;
		if (!(((NI)0) < a_p0Len_0)) goto LA3_;
		if (nimSubInt(a_p0Len_0, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_123)) { raiseOverflow(); goto BeforeRet_;
		};
		if (nimMulInt(sep_p1.len, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_123), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_124)) { raiseOverflow(); goto BeforeRet_;
		};
		L_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_124);
		{
			NI i_1;
			NI colontmp_;
			NI res_1;
			i_1 = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = (a_p0Len_0-1);
			res_1 = ((NI)0);
			{
				while (1) {
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_125;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_126;
					if (!(res_1 <= colontmp_)) goto LA7;
					i_1 = ((NI) (res_1));
					if (i_1 < 0 || i_1 >= a_p0Len_0){ raiseIndexError2(i_1,a_p0Len_0-1); goto BeforeRet_;
					}
					if (nimAddInt(L_1, a_p0[i_1].len, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_125)) { raiseOverflow(); goto BeforeRet_;
					};
					L_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_125);
					if (nimAddInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_126)) { raiseOverflow(); goto BeforeRet_;
					};
					res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_126);
				} LA7: ;
			}
		}
		if ((L_1) < ((NI)0) || (L_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(L_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
		}
		result = rawNewString((L_1));
		if (((NI)0) < 0 || ((NI)0) >= a_p0Len_0){ raiseIndexError2(((NI)0),a_p0Len_0-1); goto BeforeRet_;
		}
		prepareAdd((&result), a_p0[((NI)0)].len + 0);
appendString((&result), a_p0[((NI)0)]);
		{
			NI i_2;
			NI colontmp__2;
			NI res_2;
			i_2 = (NI)0;
			colontmp__2 = (NI)0;
			colontmp__2 = (a_p0Len_0-1);
			res_2 = ((NI)1);
			{
				while (1) {
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_127;
					if (!(res_2 <= colontmp__2)) goto LA10;
					i_2 = ((NI) (res_2));
					prepareAdd((&result), sep_p1.len + 0);
appendString((&result), sep_p1);
					if (i_2 < 0 || i_2 >= a_p0Len_0){ raiseIndexError2(i_2,a_p0Len_0-1); goto BeforeRet_;
					}
					prepareAdd((&result), a_p0[i_2].len + 0);
appendString((&result), a_p0[i_2]);
					if (nimAddInt(res_2, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_127)) { raiseOverflow(); goto BeforeRet_;
					};
					res_2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_127);
				} LA10: ;
			}
		}
	}
	goto LA1_;
LA3_: ;
	{
		result = TM__JGc9b9bh2D3nTdUR7TGyq8aA_128;
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, delete__pureZstrutils_u1365)(NimStringV2* s_p0, tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ slice_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		NIM_BOOL T3_;
		NIM_BOOL T4_;
		tyObject_IndexDefect__Eq8hLo1nOVNgU1kcCW9bQTQ* T9_;
		tyTuple__f9bWfuutJFGmvzpplsPZ62w T10_;
		T3_ = (NIM_BOOL)0;
		T4_ = (NIM_BOOL)0;
		T4_ = (slice_p1.a < (*s_p0).len);
		if (!(T4_)) goto LA5_;
		T4_ = (((NI)0) <= slice_p1.a);
LA5_: ;
		T3_ = T4_;
		if (!(T3_)) goto LA6_;
		T3_ = (slice_p1.b < (*s_p0).len);
LA6_: ;
		if (!!(T3_)) goto LA7_;
		T9_ = NIM_NIL;
		T9_ = (tyObject_IndexDefect__Eq8hLo1nOVNgU1kcCW9bQTQ*) nimNewObj(sizeof(tyObject_IndexDefect__Eq8hLo1nOVNgU1kcCW9bQTQ), NIM_ALIGNOF(tyObject_IndexDefect__Eq8hLo1nOVNgU1kcCW9bQTQ));
		(*T9_).Sup.Sup.Sup.m_type = (&NTIv2__Eq8hLo1nOVNgU1kcCW9bQTQ_);
		(*T9_).Sup.Sup.name = "IndexDefect";
		T10_.Field0 = slice_p1;
		T10_.Field1 = (*s_p0).len;
		(*T9_).Sup.Sup.message = dollar___pureZstrutils_u1371(T10_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(*T9_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T9_, "IndexDefect", "delete", "strutils.nim", 1585);
goto BeforeRet_;
	}
LA7_: ;
	{
		NI i_1;
		NI j_1;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_129;
		NI newLen_1;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_130;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_131;
		if (!(slice_p1.a <= slice_p1.b)) goto LA13_;
		i_1 = slice_p1.a;
		if (nimAddInt(slice_p1.b, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_129)) { raiseOverflow(); goto BeforeRet_;
		};
		j_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_129);
		if (nimSubInt((*s_p0).len, j_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_130)) { raiseOverflow(); goto BeforeRet_;
		};
		if (nimAddInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_130), i_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_131)) { raiseOverflow(); goto BeforeRet_;
		};
		newLen_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_131);
		{
			while (1) {
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_132;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_133;
				if (!(i_1 < newLen_1)) goto LA16;
				if (i_1 < 0 || i_1 >= (*s_p0).len){ raiseIndexError2(i_1,(*s_p0).len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&(*s_p0)));
				if (j_1 < 0 || j_1 >= (*s_p0).len){ raiseIndexError2(j_1,(*s_p0).len-1); goto BeforeRet_;
				}
				(*s_p0).p->data[i_1] = (*s_p0).p->data[j_1];
				if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_132)) { raiseOverflow(); goto BeforeRet_;
				};
				i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_132);
				if (nimAddInt(j_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_133)) { raiseOverflow(); goto BeforeRet_;
				};
				j_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_133);
			} LA16: ;
		}
		if ((newLen_1) < ((NI)0) || (newLen_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(newLen_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
		}
		setLengthStrV2((&(*s_p0)), (newLen_1));
	}
LA13_: ;
	}BeforeRet_: ;
}
static N_INLINE(tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ, dotdot___stdZstrbasics_u48)(NI a_p0, NI b_p1) {
	tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ result;
	result.a = a_p0;
	result.b = b_p1;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuRemovePrefixString)(NimStringV2* s_p0, NimStringV2 prefix_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		NIM_BOOL T3_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_134;
		tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ T7_;
		T3_ = (NIM_BOOL)0;
		T3_ = nsuStartsWith((*s_p0), prefix_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!(T3_)) goto LA4_;
		T3_ = (((NI)0) < prefix_p1.len);
LA4_: ;
		if (!T3_) goto LA5_;
		if (nimSubInt(prefix_p1.len, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_134)) { raiseOverflow(); goto BeforeRet_;
		};
		T7_ = dotdot___stdZstrbasics_u48(((NI)0), (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_134));
		delete__pureZstrutils_u1365(s_p0, T7_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA5_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuRemoveSuffixString)(NimStringV2* s_p0, NimStringV2 suffix_p1) {
	NI newLen_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	newLen_1 = (*s_p0).len;
	{
		NIM_BOOL T3_;
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_135;
		T3_ = (NIM_BOOL)0;
		T3_ = nsuEndsWith((*s_p0), suffix_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!T3_) goto LA4_;
		if (nimSubInt(newLen_1, suffix_p1.len, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_135)) { raiseOverflow(); goto BeforeRet_;
		};
		newLen_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_135);
		if ((newLen_1) < ((NI)0) || (newLen_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(newLen_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
		}
		setLengthStrV2((&(*s_p0)), (newLen_1));
	}
LA4_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, substrEq__pureZstrutils_u256)(NimStringV2 s_p0, NI pos_p1, NimStringV2 substr_p2) {
	NIM_BOOL result;
	NIM_BOOL colontmpD_;
	NIM_BOOL colontmpD__2;
	NI length_1;
{	result = (NIM_BOOL)0;
	colontmpD_ = (NIM_BOOL)0;
	colontmpD__2 = (NIM_BOOL)0;
	length_1 = substr_p2.len;
	{
		NI i_1;
		if (!(((NI)0) < length_1)) goto LA3_;
		i_1 = ((NI)0);
		{
			while (1) {
				NIM_BOOL T7_;
				NIM_BOOL T8_;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_136;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_137;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_138;
				T7_ = (NIM_BOOL)0;
				T8_ = (NIM_BOOL)0;
				T8_ = (i_1 < length_1);
				if (!(T8_)) goto LA9_;
				if (nimAddInt(pos_p1, i_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_136)) { raiseOverflow(); goto BeforeRet_;
				};
				T8_ = ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_136) < s_p0.len);
LA9_: ;
				T7_ = T8_;
				if (!(T7_)) goto LA10_;
				if (nimAddInt(pos_p1, i_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_137)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_137) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_137) >= s_p0.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_137),s_p0.len-1); goto BeforeRet_;
				}
				if (i_1 < 0 || i_1 >= substr_p2.len){ raiseIndexError2(i_1,substr_p2.len-1); goto BeforeRet_;
				}
				T7_ = ((NU8)(s_p0.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_137)]) == (NU8)(substr_p2.p->data[i_1]));
LA10_: ;
				if (!T7_) goto LA6;
				if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_138)) { raiseOverflow(); goto BeforeRet_;
				};
				i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_138);
			} LA6: ;
		}
		colontmpD_ = (i_1 == length_1);
		result = colontmpD_;
	}
	goto LA1_;
LA3_: ;
	{
		colontmpD__2 = NIM_FALSE;
		result = colontmpD__2;
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, nsuSplitString)(NimStringV2 s_p0, NimStringV2 sep_p1, NI maxsplit_p2) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(0, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
	{
		NimStringV2 xX60gensym69__1;
		NI colontmpD_;
		NI colontmpD__2;
		NI sepLen_1;
		NI lastX60gensym41__1;
		NI splitsX60gensym41__1;
		xX60gensym69__1.len = 0; xX60gensym69__1.p = NIM_NIL;
		colontmpD_ = (NI)0;
		colontmpD__2 = (NI)0;
		{
			if (!(sep_p1.len == ((NI)0))) goto LA5_;
			colontmpD_ = ((NI)1);
			sepLen_1 = colontmpD_;
		}
		goto LA3_;
LA5_: ;
		{
			colontmpD__2 = sep_p1.len;
			sepLen_1 = colontmpD__2;
		}
LA3_: ;
		lastX60gensym41__1 = ((NI)0);
		splitsX60gensym41__1 = maxsplit_p2;
		{
			while (1) {
				NI firstX60gensym41__1;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_140;
				NimStringV2 T19_;
				NimStringV2 blitTmp_1;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_141;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_142;
				if (!(lastX60gensym41__1 <= s_p0.len)) goto LA9;
				firstX60gensym41__1 = lastX60gensym41__1;
				{
					while (1) {
						NIM_BOOL T12_;
						NIM_BOOL T14_;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_139;
						T12_ = (NIM_BOOL)0;
						T12_ = (lastX60gensym41__1 < s_p0.len);
						if (!(T12_)) goto LA13_;
						T14_ = (NIM_BOOL)0;
						T14_ = substrEq__pureZstrutils_u256(s_p0, lastX60gensym41__1, sep_p1);
						if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
						T12_ = !(T14_);
LA13_: ;
						if (!T12_) goto LA11;
						if (nimAddInt(lastX60gensym41__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_139)) { raiseOverflow(); goto LA2_;
						};
						lastX60gensym41__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_139);
					} LA11: ;
				}
				{
					if (!(splitsX60gensym41__1 == ((NI)0))) goto LA17_;
					lastX60gensym41__1 = s_p0.len;
				}
LA17_: ;
				if (nimSubInt(lastX60gensym41__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_140)) { raiseOverflow(); goto LA2_;
				};
				T19_.len = 0; T19_.p = NIM_NIL;
				T19_ = substr__system_u9096(s_p0, firstX60gensym41__1, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_140));
				eqsink___system_u2760((&xX60gensym69__1), T19_);
				blitTmp_1 = xX60gensym69__1;
				eqwasMoved___system_u2751((&xX60gensym69__1));
				add__stdZenumutils_u70((&result), blitTmp_1);
				{
					if (!(splitsX60gensym41__1 == ((NI)0))) goto LA22_;
					goto LA8;
				}
LA22_: ;
				if (nimSubInt(splitsX60gensym41__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_141)) { raiseOverflow(); goto LA2_;
				};
				splitsX60gensym41__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_141);
				if (nimAddInt(lastX60gensym41__1, sepLen_1, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_142)) { raiseOverflow(); goto LA2_;
				};
				lastX60gensym41__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_142);
			} LA9: ;
		} LA8: ;
		{
			LA2_:;
		}
		{
			if (xX60gensym69__1.p && !(xX60gensym69__1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(xX60gensym69__1.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, nsuSplitLines)(NimStringV2 s_p0, NIM_BOOL keepEol_p1) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(0, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
	{
		NimStringV2 xX60gensym73__1;
		NI first_1;
		NI last_1;
		NI eolpos_1;
		xX60gensym73__1.len = 0; xX60gensym73__1.p = NIM_NIL;
		first_1 = ((NI)0);
		last_1 = ((NI)0);
		eolpos_1 = ((NI)0);
		{
			while (1) {
				NI colontmpD_;
				NI colontmpD__2;
				NI T26_;
				NimStringV2 T32_;
				NimStringV2 blitTmp_1;
				colontmpD_ = (NI)0;
				colontmpD__2 = (NI)0;
				{
					while (1) {
						NIM_BOOL T7_;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_143;
						T7_ = (NIM_BOOL)0;
						T7_ = (last_1 < s_p0.len);
						if (!(T7_)) goto LA8_;
						if (last_1 < 0 || last_1 >= s_p0.len){ raiseIndexError2(last_1,s_p0.len-1); goto LA2_;
						}
						T7_ = !((((NU8)(s_p0.p->data[last_1])) == ((NU8)(13)) || ((NU8)(s_p0.p->data[last_1])) == ((NU8)(10))));
LA8_: ;
						if (!T7_) goto LA6;
						if (nimAddInt(last_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_143)) { raiseOverflow(); goto LA2_;
						};
						last_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_143);
					} LA6: ;
				}
				eolpos_1 = last_1;
				{
					if (!(last_1 < s_p0.len)) goto LA11_;
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_144;
						if (last_1 < 0 || last_1 >= s_p0.len){ raiseIndexError2(last_1,s_p0.len-1); goto LA2_;
						}
						if (!((NU8)(s_p0.p->data[last_1]) == (NU8)(10))) goto LA15_;
						if (nimAddInt(last_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_144)) { raiseOverflow(); goto LA2_;
						};
						last_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_144);
					}
					goto LA13_;
LA15_: ;
					{
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_145;
						if (last_1 < 0 || last_1 >= s_p0.len){ raiseIndexError2(last_1,s_p0.len-1); goto LA2_;
						}
						if (!((NU8)(s_p0.p->data[last_1]) == (NU8)(13))) goto LA18_;
						if (nimAddInt(last_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_145)) { raiseOverflow(); goto LA2_;
						};
						last_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_145);
						{
							NIM_BOOL T22_;
							NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_146;
							T22_ = (NIM_BOOL)0;
							T22_ = (last_1 < s_p0.len);
							if (!(T22_)) goto LA23_;
							if (last_1 < 0 || last_1 >= s_p0.len){ raiseIndexError2(last_1,s_p0.len-1); goto LA2_;
							}
							T22_ = ((NU8)(s_p0.p->data[last_1]) == (NU8)(10));
LA23_: ;
							if (!T22_) goto LA24_;
							if (nimAddInt(last_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_146)) { raiseOverflow(); goto LA2_;
							};
							last_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_146);
						}
LA24_: ;
					}
					goto LA13_;
LA18_: ;
LA13_: ;
				}
LA11_: ;
				T26_ = (NI)0;
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_147;
					if (!keepEol_p1) goto LA29_;
					if (nimSubInt(last_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_147)) { raiseOverflow(); goto LA2_;
					};
					colontmpD_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_147);
					T26_ = colontmpD_;
				}
				goto LA27_;
LA29_: ;
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_148;
					if (nimSubInt(eolpos_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_148)) { raiseOverflow(); goto LA2_;
					};
					colontmpD__2 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_148);
					T26_ = colontmpD__2;
				}
LA27_: ;
				T32_.len = 0; T32_.p = NIM_NIL;
				T32_ = substr__system_u9096(s_p0, first_1, T26_);
				eqsink___system_u2760((&xX60gensym73__1), T32_);
				blitTmp_1 = xX60gensym73__1;
				eqwasMoved___system_u2751((&xX60gensym73__1));
				add__stdZenumutils_u70((&result), blitTmp_1);
				{
					if (!(eolpos_1 == last_1)) goto LA35_;
					goto LA3;
				}
LA35_: ;
				first_1 = last_1;
			}
		} LA3: ;
		{
			LA2_:;
		}
		{
			if (xX60gensym73__1.p && !(xX60gensym73__1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(xX60gensym73__1.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuParseInt)(NimStringV2 s_p0) {
	NI result;
	NI L_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((NI)0);
	L_1 = parseInt__pureZparseutils_u981(s_p0, (&result), ((NI)0));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NIM_BOOL T3_;
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T7_;
		NimStringV2 T8_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L_1 == s_p0.len));
		if (T3_) goto LA4_;
		T3_ = (L_1 == ((NI)0));
LA4_: ;
		if (!T3_) goto LA5_;
		T7_ = NIM_NIL;
		T7_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T7_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T7_).Sup.Sup.name = "ValueError";
		T8_.len = 0; T8_.p = NIM_NIL;
		T8_ = rawNewString(s_p0.len + 17);
appendString((&T8_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_149);
appendString((&T8_), s_p0);
		(*T7_).Sup.Sup.message = T8_;
		(*T7_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T7_, "ValueError", "parseInt", "strutils.nim", 1160);
goto BeforeRet_;
	}
LA5_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nsuCountChar)(NimStringV2 s_p0, NIM_CHAR sub_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((NI)0);
	{
		NIM_CHAR c_1;
		NI i_1;
		NI L_1;
		c_1 = (NIM_CHAR)0;
		i_1 = ((NI)0);
		L_1 = s_p0.len;
		{
			while (1) {
				if (!(i_1 < L_1)) goto LA3;
				if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
				}
				c_1 = s_p0.p->data[i_1];
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_150;
					if (!((NU8)(c_1) == (NU8)(sub_p1))) goto LA6_;
					if (nimAddInt(result, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_150)) { raiseOverflow(); goto BeforeRet_;
					};
					result = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_150);
				}
LA6_: ;
				i_1 += ((NI)1);
				{
					if (!!((s_p0.len == L_1))) goto LA10_;
					failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_151);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA10_: ;
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_u1900)(NimStringV2 s_p0, NimStringV2 sub_p1) {
	NIM_BOOL result;
	NI T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = nsuFindStr(s_p0, sub_p1, ((NI)0), ((NI)-1));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	result = (((NI)0) <= T1_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toHex__pureZstrutils_u809)(NimStringV2 s_p0) {
	NimStringV2 result;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_152;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	if (nimMulInt(s_p0.len, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_152)) { raiseOverflow(); goto BeforeRet_;
	};
	if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_152)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_152)) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_152), ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString(((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_152)));
	{
		NI pos_1;
		NIM_CHAR c_1;
		NI i_1;
		NI L_1;
		pos_1 = (NI)0;
		c_1 = (NIM_CHAR)0;
		i_1 = ((NI)0);
		L_1 = s_p0.len;
		{
			while (1) {
				NI n_1;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_153;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_154;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_156;
				if (!(i_1 < L_1)) goto LA3;
				pos_1 = i_1;
				if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
				}
				c_1 = s_p0.p->data[i_1];
				n_1 = ((NU8)(c_1));
				if (nimMulInt(pos_1, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_153)) { raiseOverflow(); goto BeforeRet_;
				};
				if (nimAddInt((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_153), ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_154)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_154) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_154) >= result.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_154),result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if ((NI)(n_1 & ((NI)15)) < 0 || (NI)(n_1 & ((NI)15)) >= TM__JGc9b9bh2D3nTdUR7TGyq8aA_155.len){ raiseIndexError2((NI)(n_1 & ((NI)15)),TM__JGc9b9bh2D3nTdUR7TGyq8aA_155.len-1); goto BeforeRet_;
				}
				result.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_154)] = TM__JGc9b9bh2D3nTdUR7TGyq8aA_155.p->data[(NI)(n_1 & ((NI)15))];
				n_1 = (NI)((NI64)(n_1) >> (NU64)(((NI)4) & (64 - 1)));
				if (nimMulInt(pos_1, ((NI)2), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_156)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_156) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_156) >= result.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_156),result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if (n_1 < 0 || n_1 >= TM__JGc9b9bh2D3nTdUR7TGyq8aA_157.len){ raiseIndexError2(n_1,TM__JGc9b9bh2D3nTdUR7TGyq8aA_157.len-1); goto BeforeRet_;
				}
				result.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_156)] = TM__JGc9b9bh2D3nTdUR7TGyq8aA_157.p->data[n_1];
				i_1 += ((NI)1);
				{
					if (!!((s_p0.len == L_1))) goto LA6_;
					failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_159);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA6_: ;
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, nsuToUpperAsciiChar)(NIM_CHAR c_p0) {
	NIM_CHAR result;
	{
		if (!(((NU8)(c_p0)) >= ((NU8)(97)) && ((NU8)(c_p0)) <= ((NU8)(122)))) goto LA3_;
		result = ((NIM_CHAR) ((NU8)(((NU8) (((NU8)(c_p0)))) ^ ((NU8)32))));
	}
	goto LA1_;
LA3_: ;
	{
		result = c_p0;
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuReplaceChar)(NimStringV2 s_p0, NIM_CHAR sub_p1, NIM_CHAR by_p2) {
	NimStringV2 result;
	NI i_1;
{	result.len = 0; result.p = NIM_NIL;
	if ((s_p0.len) < ((NI)0) || (s_p0.len) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(s_p0.len, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString((s_p0.len));
	i_1 = ((NI)0);
	{
		while (1) {
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_160;
			if (!(i_1 < s_p0.len)) goto LA2;
			{
				if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
				}
				if (!((NU8)(s_p0.p->data[i_1]) == (NU8)(sub_p1))) goto LA5_;
				if (i_1 < 0 || i_1 >= result.len){ raiseIndexError2(i_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				result.p->data[i_1] = by_p2;
			}
			goto LA3_;
LA5_: ;
			{
				if (i_1 < 0 || i_1 >= result.len){ raiseIndexError2(i_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
				}
				result.p->data[i_1] = s_p0.p->data[i_1];
			}
LA3_: ;
			if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_160)) { raiseOverflow(); goto BeforeRet_;
			};
			i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_160);
		} LA2: ;
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZstrutils_u2000)(NU8* dest_p0) {
}
N_LIB_PRIVATE N_NIMCALL(void, nsuRemovePrefixCharSet)(NimStringV2* s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p1) {
	NI start_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	start_1 = ((NI)0);
	{
		while (1) {
			NIM_BOOL T3_;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_161;
			T3_ = (NIM_BOOL)0;
			T3_ = (start_1 < (*s_p0).len);
			if (!(T3_)) goto LA4_;
			if (start_1 < 0 || start_1 >= (*s_p0).len){ raiseIndexError2(start_1,(*s_p0).len-1); goto BeforeRet_;
			}
			T3_ = ((chars_p1[(NU)((((NU8)((*s_p0).p->data[start_1]))))>>3] &(1U<<((NU)((((NU8)((*s_p0).p->data[start_1]))))&7U)))!=0);
LA4_: ;
			if (!T3_) goto LA2;
			if (nimAddInt(start_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_161)) { raiseOverflow(); goto BeforeRet_;
			};
			start_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_161);
		} LA2: ;
	}
	{
		NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_162;
		tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ T9_;
		if (!(((NI)0) < start_1)) goto LA7_;
		if (nimSubInt(start_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_162)) { raiseOverflow(); goto BeforeRet_;
		};
		T9_ = dotdot___stdZstrbasics_u48(((NI)0), (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_162));
		delete__pureZstrutils_u1365(s_p0, T9_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA7_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, nsuRemovePrefixChar)(NimStringV2* s_p0, NIM_CHAR c_p1) {
	tySet_tyChar__nmiMWKVIe46vacnhAFrQvw T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem(T1_, sizeof(tySet_tyChar__nmiMWKVIe46vacnhAFrQvw));
	T1_[(NU)((((NU8)(c_p1))))>>3] |=(1U<<((NU)((((NU8)(c_p1))))&7U));
	nsuRemovePrefixCharSet(s_p0, T1_);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuIsDigitChar)(NIM_CHAR c_p0) {
	NIM_BOOL result;
{	result = (((NU8)(c_p0)) >= ((NU8)(48)) && ((NU8)(c_p0)) <= ((NU8)(57)));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringV2 s_p0, NimStringV2 substr_p1, NI start_p2) {
	NIM_BOOL result;
	NI i_1;
{	result = NIM_FALSE;
	i_1 = ((NI)0);
	{
		while (1) {
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_165;
			{
				if (!(substr_p1.len <= i_1)) goto LA5_;
				result = NIM_TRUE;
				goto BeforeRet_;
			}
LA5_: ;
			{
				NIM_BOOL T9_;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_163;
				NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_164;
				T9_ = (NIM_BOOL)0;
				if (nimAddInt(i_1, start_p2, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_163)) { raiseOverflow(); goto BeforeRet_;
				};
				T9_ = (s_p0.len <= (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_163));
				if (T9_) goto LA10_;
				if (nimAddInt(i_1, start_p2, &TM__JGc9b9bh2D3nTdUR7TGyq8aA_164)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_164) < 0 || (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_164) >= s_p0.len){ raiseIndexError2((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_164),s_p0.len-1); goto BeforeRet_;
				}
				if (i_1 < 0 || i_1 >= substr_p1.len){ raiseIndexError2(i_1,substr_p1.len-1); goto BeforeRet_;
				}
				T9_ = !(((NU8)(s_p0.p->data[(NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_164)]) == (NU8)(substr_p1.p->data[i_1])));
LA10_: ;
				if (!T9_) goto LA11_;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
LA11_: ;
			if (nimAddInt(i_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_165)) { raiseOverflow(); goto BeforeRet_;
			};
			i_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_165);
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, nsuSplitWhitespace)(NimStringV2 s_p0, NI maxsplit_p1) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(0, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
	{
		NimStringV2 xX60gensym74__1;
		NI lastX60gensym59__1;
		NI splitsX60gensym59__1;
		xX60gensym74__1.len = 0; xX60gensym74__1.p = NIM_NIL;
		lastX60gensym59__1 = ((NI)0);
		splitsX60gensym59__1 = maxsplit_p1;
		{
			if (!NIM_FALSE) goto LA5_;
			failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_167);
			if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
		}
LA5_: ;
		{
			while (1) {
				NI firstX60gensym59__1;
				if (!(lastX60gensym59__1 < s_p0.len)) goto LA8;
				{
					while (1) {
						NIM_BOOL T11_;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_168;
						T11_ = (NIM_BOOL)0;
						T11_ = (lastX60gensym59__1 < s_p0.len);
						if (!(T11_)) goto LA12_;
						if (lastX60gensym59__1 < 0 || lastX60gensym59__1 >= s_p0.len){ raiseIndexError2(lastX60gensym59__1,s_p0.len-1); goto LA2_;
						}
						T11_ = (((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(32)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(9)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(11)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(13)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(10)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(12)));
LA12_: ;
						if (!T11_) goto LA10;
						if (nimAddInt(lastX60gensym59__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_168)) { raiseOverflow(); goto LA2_;
						};
						lastX60gensym59__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_168);
					} LA10: ;
				}
				firstX60gensym59__1 = lastX60gensym59__1;
				{
					while (1) {
						NIM_BOOL T15_;
						NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_169;
						T15_ = (NIM_BOOL)0;
						T15_ = (lastX60gensym59__1 < s_p0.len);
						if (!(T15_)) goto LA16_;
						if (lastX60gensym59__1 < 0 || lastX60gensym59__1 >= s_p0.len){ raiseIndexError2(lastX60gensym59__1,s_p0.len-1); goto LA2_;
						}
						T15_ = !((((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(32)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(9)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(11)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(13)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(10)) || ((NU8)(s_p0.p->data[lastX60gensym59__1])) == ((NU8)(12))));
LA16_: ;
						if (!T15_) goto LA14;
						if (nimAddInt(lastX60gensym59__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_169)) { raiseOverflow(); goto LA2_;
						};
						lastX60gensym59__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_169);
					} LA14: ;
				}
				{
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_170;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_171;
					NimStringV2 T25_;
					NimStringV2 blitTmp_1;
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_172;
					if (nimSubInt(lastX60gensym59__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_170)) { raiseOverflow(); goto LA2_;
					};
					if (!(firstX60gensym59__1 <= (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_170))) goto LA19_;
					{
						if (!(splitsX60gensym59__1 == ((NI)0))) goto LA23_;
						lastX60gensym59__1 = s_p0.len;
					}
LA23_: ;
					if (nimSubInt(lastX60gensym59__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_171)) { raiseOverflow(); goto LA2_;
					};
					T25_.len = 0; T25_.p = NIM_NIL;
					T25_ = substr__system_u9096(s_p0, firstX60gensym59__1, (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_171));
					eqsink___system_u2760((&xX60gensym74__1), T25_);
					blitTmp_1 = xX60gensym74__1;
					eqwasMoved___system_u2751((&xX60gensym74__1));
					add__stdZenumutils_u70((&result), blitTmp_1);
					{
						if (!(splitsX60gensym59__1 == ((NI)0))) goto LA28_;
						goto LA7;
					}
LA28_: ;
					if (nimSubInt(splitsX60gensym59__1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_172)) { raiseOverflow(); goto LA2_;
					};
					splitsX60gensym59__1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_172);
				}
LA19_: ;
			} LA8: ;
		} LA7: ;
		{
			LA2_:;
		}
		{
			if (xX60gensym74__1.p && !(xX60gensym74__1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(xX60gensym74__1.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuValidIdentifier)(NimStringV2 s_p0) {
	NIM_BOOL result;
{	result = NIM_FALSE;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI)0) < s_p0.len);
		if (!(T3_)) goto LA4_;
		if (((NI)0) < 0 || ((NI)0) >= s_p0.len){ raiseIndexError2(((NI)0),s_p0.len-1); goto BeforeRet_;
		}
		T3_ = (((NU8)(s_p0.p->data[((NI)0)])) >= ((NU8)(97)) && ((NU8)(s_p0.p->data[((NI)0)])) <= ((NU8)(122)) || ((NU8)(s_p0.p->data[((NI)0)])) >= ((NU8)(65)) && ((NU8)(s_p0.p->data[((NI)0)])) <= ((NU8)(90)) || ((NU8)(s_p0.p->data[((NI)0)])) == ((NU8)(95)));
LA4_: ;
		if (!T3_) goto LA5_;
		{
			NI i_1;
			NI colontmp_;
			NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_173;
			NI res_1;
			i_1 = (NI)0;
			colontmp_ = (NI)0;
			if (nimSubInt(s_p0.len, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_173)) { raiseOverflow(); goto BeforeRet_;
			};
			colontmp_ = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_173);
			res_1 = ((NI)1);
			{
				while (1) {
					NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_174;
					if (!(res_1 <= colontmp_)) goto LA9;
					i_1 = ((NI) (res_1));
					{
						if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
						}
						if (!!((((NU8)(s_p0.p->data[i_1])) >= ((NU8)(97)) && ((NU8)(s_p0.p->data[i_1])) <= ((NU8)(122)) || ((NU8)(s_p0.p->data[i_1])) >= ((NU8)(65)) && ((NU8)(s_p0.p->data[i_1])) <= ((NU8)(90)) || ((NU8)(s_p0.p->data[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0.p->data[i_1])) <= ((NU8)(57)) || ((NU8)(s_p0.p->data[i_1])) == ((NU8)(95))))) goto LA12_;
						result = NIM_FALSE;
						goto BeforeRet_;
					}
LA12_: ;
					if (nimAddInt(res_1, ((NI)1), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_174)) { raiseOverflow(); goto BeforeRet_;
					};
					res_1 = (NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_174);
				} LA9: ;
			}
		}
		result = NIM_TRUE;
		goto BeforeRet_;
	}
LA5_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, join__depgraphs_u6084)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 sep_p1) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = TM__JGc9b9bh2D3nTdUR7TGyq8aA_175;
	{
		NimStringV2 x_1;
		NI i_1;
		NI i_2;
		x_1.len = 0; x_1.p = NIM_NIL;
		i_1 = (NI)0;
		i_2 = ((NI)0);
		{
			while (1) {
				NimStringV2 colontmpD_;
				if (!(i_2 < a_p0Len_0)) goto LA3;
				colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
				i_1 = i_2;
				if (i_2 < 0 || i_2 >= a_p0Len_0){ raiseIndexError2(i_2,a_p0Len_0-1); goto BeforeRet_;
				}
				x_1 = a_p0[i_2];
				{
					if (!(((NI)0) < i_1)) goto LA6_;
					prepareAdd((&result), sep_p1.len + 0);
appendString((&result), sep_p1);
				}
LA6_: ;
				colontmpD_ = dollar___basicZversions_u52(x_1);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				prepareAdd((&result), colontmpD_.len + 0);
appendString((&result), colontmpD_);
				i_2 += ((NI)1);
				if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuEscape)(NimStringV2 s_p0, NimStringV2 prefix_p1, NimStringV2 suffix_p2) {
	NimStringV2 result;
	NI TM__JGc9b9bh2D3nTdUR7TGyq8aA_176;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	if (nimAddInt(s_p0.len, (NI)((NI64)(s_p0.len) >> (NU64)(((NI)2) & (64 - 1))), &TM__JGc9b9bh2D3nTdUR7TGyq8aA_176)) { raiseOverflow(); goto BeforeRet_;
	};
	if (((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_176)) < ((NI)0) || ((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_176)) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_176), ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = rawNewString(((NI)(TM__JGc9b9bh2D3nTdUR7TGyq8aA_176)));
	prepareAdd((&result), prefix_p1.len + 0);
appendString((&result), prefix_p1);
	{
		NIM_CHAR c_1;
		NI i_1;
		NI L_1;
		c_1 = (NIM_CHAR)0;
		i_1 = ((NI)0);
		L_1 = s_p0.len;
		{
			while (1) {
				if (!(i_1 < L_1)) goto LA3;
				if (i_1 < 0 || i_1 >= s_p0.len){ raiseIndexError2(i_1,s_p0.len-1); goto BeforeRet_;
				}
				c_1 = s_p0.p->data[i_1];
				switch (((NU8)(c_1))) {
				case 0 ... 31:
				case 127 ... 255:
				{
					NimStringV2 colontmpD_;
					colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
					prepareAdd((&result), 2);
appendString((&result), TM__JGc9b9bh2D3nTdUR7TGyq8aA_178);
					colontmpD_ = toHex__pureZstrutils_u2181(((NU8)(c_1)), ((NI)2));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					prepareAdd((&result), colontmpD_.len + 0);
appendString((&result), colontmpD_);
					if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
				}
				break;
				case 92:
				{
					prepareAdd((&result), 2);
appendString((&result), TM__JGc9b9bh2D3nTdUR7TGyq8aA_180);
				}
				break;
				case 39:
				{
					prepareAdd((&result), 2);
appendString((&result), TM__JGc9b9bh2D3nTdUR7TGyq8aA_182);
				}
				break;
				case 34:
				{
					prepareAdd((&result), 2);
appendString((&result), TM__JGc9b9bh2D3nTdUR7TGyq8aA_184);
				}
				break;
				default:
				{
					nimAddCharV1((&result), c_1);
				}
				break;
				}
				i_1 += ((NI)1);
				{
					if (!!((s_p0.len == L_1))) goto LA11_;
					failedAssertImpl__stdZassertions_u95(TM__JGc9b9bh2D3nTdUR7TGyq8aA_185);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA11_: ;
			} LA3: ;
		}
	}
	prepareAdd((&result), suffix_p2.len + 0);
appendString((&result), suffix_p2);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw, parseEnum__basicZdeptypesjson_u13859)(NimStringV2 s_p0) {
	tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw result;
	NimStringV2 colontmpD_;
	tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw colontmpD__2;
	tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw colontmpD__3;
	tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw colontmpD__4;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw)0;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2 = (tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw)0;
	colontmpD__3 = (tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw)0;
	colontmpD__4 = (tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw)0;
	colontmpD_ = nimIdentNormalize__pureZstrutils_u123(s_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_187)) goto LA2_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_189)) goto LA3_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_191)) goto LA4_;
	goto LA5_;
	LA2_: ;
	{
		colontmpD__2 = ((tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw)0);
		result = colontmpD__2;
	}
	goto LA6_;
	LA3_: ;
	{
		colontmpD__3 = ((tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw)1);
		result = colontmpD__3;
	}
	goto LA6_;
	LA4_: ;
	{
		colontmpD__4 = ((tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw)2);
		result = colontmpD__4;
	}
	goto LA6_;
	LA5_: ;
	{
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T11_;
		NimStringV2 T12_;
		T11_ = NIM_NIL;
		T11_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T11_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T11_).Sup.Sup.name = "ValueError";
		T12_.len = 0; T12_.p = NIM_NIL;
		T12_ = rawNewString(s_p0.len + 20);
appendString((&T12_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_192);
appendString((&T12_), s_p0);
		(*T11_).Sup.Sup.message = T12_;
		(*T11_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T11_, "ValueError", "parseEnum", "enumutils.nim", 77);
goto LA1_;
	}
LA6_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_PackageState__INzfBajphYPGcwu72ccy8w, parseEnum__basicZdeptypesjson_u11555)(NimStringV2 s_p0) {
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w result;
	NimStringV2 colontmpD_;
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w colontmpD__2;
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w colontmpD__3;
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w colontmpD__4;
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w colontmpD__5;
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w colontmpD__6;
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w colontmpD__7;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2 = (tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0;
	colontmpD__3 = (tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0;
	colontmpD__4 = (tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0;
	colontmpD__5 = (tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0;
	colontmpD__6 = (tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0;
	colontmpD__7 = (tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0;
	colontmpD_ = nimIdentNormalize__pureZstrutils_u123(s_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_194)) goto LA2_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_196)) goto LA3_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_198)) goto LA4_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_200)) goto LA5_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_202)) goto LA6_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_204)) goto LA7_;
	goto LA8_;
	LA2_: ;
	{
		colontmpD__2 = ((tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)0);
		result = colontmpD__2;
	}
	goto LA9_;
	LA3_: ;
	{
		colontmpD__3 = ((tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)1);
		result = colontmpD__3;
	}
	goto LA9_;
	LA4_: ;
	{
		colontmpD__4 = ((tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)2);
		result = colontmpD__4;
	}
	goto LA9_;
	LA5_: ;
	{
		colontmpD__5 = ((tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)3);
		result = colontmpD__5;
	}
	goto LA9_;
	LA6_: ;
	{
		colontmpD__6 = ((tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)4);
		result = colontmpD__6;
	}
	goto LA9_;
	LA7_: ;
	{
		colontmpD__7 = ((tyEnum_PackageState__INzfBajphYPGcwu72ccy8w)5);
		result = colontmpD__7;
	}
	goto LA9_;
	LA8_: ;
	{
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T17_;
		NimStringV2 T18_;
		T17_ = NIM_NIL;
		T17_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T17_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T17_).Sup.Sup.name = "ValueError";
		T18_.len = 0; T18_.p = NIM_NIL;
		T18_ = rawNewString(s_p0.len + 20);
appendString((&T18_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_205);
appendString((&T18_), s_p0);
		(*T17_).Sup.Sup.message = T18_;
		(*T17_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T17_, "ValueError", "parseEnum", "enumutils.nim", 77);
goto LA1_;
	}
LA9_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg, parseEnum__basicZdeptypesjson_u4204)(NimStringV2 s_p0) {
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg result;
	NimStringV2 colontmpD_;
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg colontmpD__2;
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg colontmpD__3;
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg colontmpD__4;
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg colontmpD__5;
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg colontmpD__6;
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg colontmpD__7;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2 = (tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0;
	colontmpD__3 = (tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0;
	colontmpD__4 = (tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0;
	colontmpD__5 = (tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0;
	colontmpD__6 = (tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0;
	colontmpD__7 = (tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0;
	colontmpD_ = nimIdentNormalize__pureZstrutils_u123(s_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_207)) goto LA2_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_209)) goto LA3_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_211)) goto LA4_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_213)) goto LA5_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_215)) goto LA6_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_217)) goto LA7_;
	goto LA8_;
	LA2_: ;
	{
		colontmpD__2 = ((tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)0);
		result = colontmpD__2;
	}
	goto LA9_;
	LA3_: ;
	{
		colontmpD__3 = ((tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)1);
		result = colontmpD__3;
	}
	goto LA9_;
	LA4_: ;
	{
		colontmpD__4 = ((tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)2);
		result = colontmpD__4;
	}
	goto LA9_;
	LA5_: ;
	{
		colontmpD__5 = ((tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)3);
		result = colontmpD__5;
	}
	goto LA9_;
	LA6_: ;
	{
		colontmpD__6 = ((tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)4);
		result = colontmpD__6;
	}
	goto LA9_;
	LA7_: ;
	{
		colontmpD__7 = ((tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg)5);
		result = colontmpD__7;
	}
	goto LA9_;
	LA8_: ;
	{
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T17_;
		NimStringV2 T18_;
		T17_ = NIM_NIL;
		T17_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T17_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T17_).Sup.Sup.name = "ValueError";
		T18_.len = 0; T18_.p = NIM_NIL;
		T18_ = rawNewString(s_p0.len + 20);
appendString((&T18_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_218);
appendString((&T18_), s_p0);
		(*T17_).Sup.Sup.message = T18_;
		(*T17_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T17_, "ValueError", "parseEnum", "enumutils.nim", 77);
goto LA1_;
	}
LA9_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww, parseEnum__basicZdeptypesjson_u12091)(NimStringV2 s_p0) {
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww result;
	NimStringV2 colontmpD_;
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww colontmpD__2;
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww colontmpD__3;
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww colontmpD__4;
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww colontmpD__5;
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww colontmpD__6;
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww colontmpD__7;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2 = (tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0;
	colontmpD__3 = (tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0;
	colontmpD__4 = (tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0;
	colontmpD__5 = (tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0;
	colontmpD__6 = (tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0;
	colontmpD__7 = (tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0;
	colontmpD_ = nimIdentNormalize__pureZstrutils_u123(s_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_220)) goto LA2_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_222)) goto LA3_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_224)) goto LA4_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_226)) goto LA5_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_228)) goto LA6_;
	if (eqStrings(colontmpD_, TM__JGc9b9bh2D3nTdUR7TGyq8aA_230)) goto LA7_;
	goto LA8_;
	LA2_: ;
	{
		colontmpD__2 = ((tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)0);
		result = colontmpD__2;
	}
	goto LA9_;
	LA3_: ;
	{
		colontmpD__3 = ((tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)1);
		result = colontmpD__3;
	}
	goto LA9_;
	LA4_: ;
	{
		colontmpD__4 = ((tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)2);
		result = colontmpD__4;
	}
	goto LA9_;
	LA5_: ;
	{
		colontmpD__5 = ((tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)3);
		result = colontmpD__5;
	}
	goto LA9_;
	LA6_: ;
	{
		colontmpD__6 = ((tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)4);
		result = colontmpD__6;
	}
	goto LA9_;
	LA7_: ;
	{
		colontmpD__7 = ((tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww)5);
		result = colontmpD__7;
	}
	goto LA9_;
	LA8_: ;
	{
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T17_;
		NimStringV2 T18_;
		T17_ = NIM_NIL;
		T17_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T17_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T17_).Sup.Sup.name = "ValueError";
		T18_.len = 0; T18_.p = NIM_NIL;
		T18_ = rawNewString(s_p0.len + 20);
appendString((&T18_), TM__JGc9b9bh2D3nTdUR7TGyq8aA_231);
appendString((&T18_), s_p0);
		(*T17_).Sup.Sup.message = T18_;
		(*T17_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T17_, "ValueError", "parseEnum", "enumutils.nim", 77);
goto LA1_;
	}
LA9_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
