/* 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/@mbasic@scompiledpatterns.nim.c.o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@mbasic@scompiledpatterns.nim.c */
#define NIM_INTBITS 64
#define NIM_EmulateOverflowChecks

#include "nimbase.h"
#include <string.h>
#include <math.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 tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ;
typedef struct tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA;
typedef struct tySequence__xjLg9a72SfsVVFciefDuvtw tySequence__xjLg9a72SfsVVFciefDuvtw;
typedef struct tySequence__xjLg9a72SfsVVFciefDuvtw_Content tySequence__xjLg9a72SfsVVFciefDuvtw_Content;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg;
typedef struct tyObject_Table__ao79cQacnAZc5Mu0cN3jybg tyObject_Table__ao79cQacnAZc5Mu0cN3jybg;
typedef struct tySequence__j9bhAvfiD9alXYEwmFnFGFNA tySequence__j9bhAvfiD9alXYEwmFnFGFNA;
typedef struct tySequence__j9bhAvfiD9alXYEwmFnFGFNA_Content tySequence__j9bhAvfiD9alXYEwmFnFGFNA_Content;
typedef struct tySequence__SFipDZIkFtPcrLs0AGBBjQ tySequence__SFipDZIkFtPcrLs0AGBBjQ;
typedef struct tySequence__SFipDZIkFtPcrLs0AGBBjQ_Content tySequence__SFipDZIkFtPcrLs0AGBBjQ_Content;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content;
typedef struct tySequence__4eQHGndY6XBYpFOH09apV8Q tySequence__4eQHGndY6XBYpFOH09apV8Q;
typedef struct tySequence__4eQHGndY6XBYpFOH09apV8Q_Content tySequence__4eQHGndY6XBYpFOH09apV8Q_Content;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef struct tyObject_Instr__dVxI1dKsh9ajF145UocfxWg tyObject_Instr__dVxI1dKsh9ajF145UocfxWg;
typedef struct tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A;
typedef struct tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ;
typedef struct tyTuple__8ZxhPt1NwfElsJs8zUSV9bg tyTuple__8ZxhPt1NwfElsJs8zUSV9bg;
struct tySequence__xjLg9a72SfsVVFciefDuvtw {
  NI len; tySequence__xjLg9a72SfsVVFciefDuvtw_Content* p;
};
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA {
	tySequence__xjLg9a72SfsVVFciefDuvtw code;
	NI usedMatches;
	NimStringV2 error;
};
struct tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ {
	tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA Field0;
	NimStringV2 Field1;
};
struct tySequence__j9bhAvfiD9alXYEwmFnFGFNA {
  NI len; tySequence__j9bhAvfiD9alXYEwmFnFGFNA_Content* p;
};
struct tySequence__SFipDZIkFtPcrLs0AGBBjQ {
  NI len; tySequence__SFipDZIkFtPcrLs0AGBBjQ_Content* p;
};
struct tyObject_Table__ao79cQacnAZc5Mu0cN3jybg {
	tySequence__SFipDZIkFtPcrLs0AGBBjQ data;
	NI counter;
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  NI len; tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content* p;
};
struct tySequence__4eQHGndY6XBYpFOH09apV8Q {
  NI len; tySequence__4eQHGndY6XBYpFOH09apV8Q_Content* p;
};
struct tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg {
	tySequence__j9bhAvfiD9alXYEwmFnFGFNA s;
	tyObject_Table__ao79cQacnAZc5Mu0cN3jybg t;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ strings;
	tySequence__4eQHGndY6XBYpFOH09apV8Q patterns;
};
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
	NimStringV2 Field0;
	NimStringV2 Field1;
};
typedef NU8 tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA;
struct tyObject_Instr__dVxI1dKsh9ajF145UocfxWg {
	tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA opc;
	NU8 arg1;
	NU16 arg2;
};
struct tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ {
	NI Field0;
	NI Field1;
};
typedef tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ tyArray__siTzbNDADoaMjd7OhFEhhw[20];
struct tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A {
	NI m;
	tyArray__siTzbNDADoaMjd7OhFEhhw a;
};
struct tySequence__xjLg9a72SfsVVFciefDuvtw_Content { NI cap; tyObject_Instr__dVxI1dKsh9ajF145UocfxWg data[SEQ_DECL_SIZE]; };
struct tySequence__j9bhAvfiD9alXYEwmFnFGFNA_Content { NI cap; tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ data[SEQ_DECL_SIZE]; };
struct tyTuple__8ZxhPt1NwfElsJs8zUSV9bg {
	NI Field0;
	NimStringV2 Field1;
	NimStringV2 Field2;
};
struct tySequence__SFipDZIkFtPcrLs0AGBBjQ_Content { NI cap; tyTuple__8ZxhPt1NwfElsJs8zUSV9bg data[SEQ_DECL_SIZE]; };
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content { NI cap; NimStringV2 data[SEQ_DECL_SIZE]; };
struct tySequence__4eQHGndY6XBYpFOH09apV8Q_Content { NI cap; tyTuple__UV3llMMYFckfui8YMBuUZA data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZcompiledpatterns_u210)(tySequence__xjLg9a72SfsVVFciefDuvtw dest_p0);
static N_INLINE(NIM_BOOL, contains__stdZprivateZospaths2_u380)(NIM_CHAR* a_p0, NI a_p0Len_0, NIM_CHAR item_p1);
static N_INLINE(NI, find__stdZprivateZospaths2_u385)(NIM_CHAR* a_p0, NI a_p0Len_0, NIM_CHAR item_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
static N_INLINE(NIM_BOOL, nimAddInt)(NI a_p0, NI b_p1, NI* res_p2);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___basicZcompiledpatterns_u1236)(tyObject_Table__ao79cQacnAZc5Mu0cN3jybg* t_p0, NimStringV2 key_p1, NimStringV2 val_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, eqdup___system_u2757)(NimStringV2 src_p0);
N_LIB_PRIVATE N_NIMCALL(void, add__basicZparse95requires_u3513)(tySequence__4eQHGndY6XBYpFOH09apV8Q* x_p0, tyTuple__UV3llMMYFckfui8YMBuUZA* y_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, compile__basicZcompiledpatterns_u21)(NimStringV2 pattern_p0, tySequence__sM4lkSb7zS6F7OVMvW9cffQ* strings_p1, tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* Result);
N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2);
static N_INLINE(tyObject_Instr__dVxI1dKsh9ajF145UocfxWg*, X5BX5D___basicZcompiledpatterns_u43)(tyObject_Instr__dVxI1dKsh9ajF145UocfxWg* s_p0, NI s_p0Len_0, NI i_p1);
static N_INLINE(NIM_BOOL, nimSubInt)(NI a_p0, NI b_p1, NI* res_p2);
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);
static N_INLINE(NI, find__basicZcompiledpatterns_u81)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ a_p0, NimStringV2 item_p1);
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);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
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(void, add__basicZcompiledpatterns_u121)(tySequence__xjLg9a72SfsVVFciefDuvtw* x_p0, tyObject_Instr__dVxI1dKsh9ajF145UocfxWg y_p1);
N_LIB_PRIVATE N_NIMCALL(NI, parseSuffix__basicZcompiledpatterns_u25)(NimStringV2 s_p0, NI start_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u9096)(NimStringV2 s_p0, NI first_p1, NI last_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2760)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, appendChar)(NimStringV2* dest_p0, NIM_CHAR c_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__basicZcompiledpatterns_u2430)(tySequence__j9bhAvfiD9alXYEwmFnFGFNA* x_p0, tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ* y_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___basicZcompiledpatterns_u323)(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZcompiledpatterns_u326)(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___basicZcompiledpatterns_u933)(tySequence__j9bhAvfiD9alXYEwmFnFGFNA* dest_p0, tySequence__j9bhAvfiD9alXYEwmFnFGFNA src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___basicZcompiledpatterns_u882)(tySequence__SFipDZIkFtPcrLs0AGBBjQ* dest_p0, tySequence__SFipDZIkFtPcrLs0AGBBjQ src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u5585)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* dest_p0, tySequence__sM4lkSb7zS6F7OVMvW9cffQ src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___stdZenvvars_u106)(tySequence__4eQHGndY6XBYpFOH09apV8Q* dest_p0, tySequence__4eQHGndY6XBYpFOH09apV8Q src_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__basicZcompiledpatterns_u2497)(tyObject_Table__ao79cQacnAZc5Mu0cN3jybg t_p0, NimStringV2 key_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2754)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2*, X5BX5D___basicZcompiledpatterns_u2580)(tyObject_Table__ao79cQacnAZc5Mu0cN3jybg* t_p0, NimStringV2 key_p1);
N_LIB_PRIVATE N_NIMCALL(void, matches__basicZcompiledpatterns_u407)(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* s_p0, tySequence__sM4lkSb7zS6F7OVMvW9cffQ strings_p1, NimStringV2 input_p2, tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A* Result);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringV2 s_p0, NimStringV2 substr_p1, NI start_p2);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i_p0, NI64 a_p1, NI64 b_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, translate__basicZcompiledpatterns_u500)(tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A* m_p0, NimStringV2 outputPattern_p1, NimStringV2 input_p2);
N_NIMCALL(NimStringV2, rawNewString)(NI cap_p0);
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1);
N_LIB_PRIVATE N_NIMCALL(void, prepareAdd)(NimStringV2* s_p0, NI addLen_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(tyObject_Table__ao79cQacnAZc5Mu0cN3jybg, initTable__basicZcompiledpatterns_u722)(NI initialSize_p0);
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__fwwYmEhvplCaMmcZyA3JaA_3 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_4 = {0, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_3};
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_5 = {0, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_3};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__fwwYmEhvplCaMmcZyA3JaA_9 = { 1 | NIM_STRLIT_FLAG, "$" };
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_10 = {1, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_9};
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__fwwYmEhvplCaMmcZyA3JaA_12 = { 90 | NIM_STRLIT_FLAG, "iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_13 = {90, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_12};
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_14 = {1, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_9};
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_15 = {1, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_9};
static const struct {
  NI cap; NIM_CHAR data[17+1];
} TM__fwwYmEhvplCaMmcZyA3JaA_24 = { 17 | NIM_STRLIT_FLAG, "unknown syntax \'$" };
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_25 = {17, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_24};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__fwwYmEhvplCaMmcZyA3JaA_27 = { 1 | NIM_STRLIT_FLAG, "\'" };
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_28 = {1, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_27};
static const struct {
  NI cap; NIM_CHAR data[13+1];
} TM__fwwYmEhvplCaMmcZyA3JaA_29 = { 13 | NIM_STRLIT_FLAG, "unescaped \'$\'" };
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_30 = {13, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_29};
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_32 = {0, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_3};
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_41 = {90, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_12};
static const NimStringV2 TM__fwwYmEhvplCaMmcZyA3JaA_61 = {90, (NimStrPayload*)&TM__fwwYmEhvplCaMmcZyA3JaA_12};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4198;
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZcompiledpatterns_u996)(tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ* dest_p0) {
	if ((*dest_p0).Field0.error.p && !((*dest_p0).Field0.error.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).Field0.error.p);
}
	eqdestroy___basicZcompiledpatterns_u210((*dest_p0).Field0.code);
	if ((*dest_p0).Field1.p && !((*dest_p0).Field1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).Field1.p);
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___basicZcompiledpatterns_u993)(tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ* dest_p0) {
	(*dest_p0).Field0.code.len = 0; (*dest_p0).Field0.code.p = NIM_NIL;
	(*dest_p0).Field0.usedMatches = 0;
	(*dest_p0).Field0.error.len = 0; (*dest_p0).Field0.error.p = NIM_NIL;
	(*dest_p0).Field1.len = 0; (*dest_p0).Field1.p = NIM_NIL;
}
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;
}
static N_INLINE(NI, find__stdZprivateZospaths2_u385)(NIM_CHAR* a_p0, NI a_p0Len_0, NIM_CHAR item_p1) {
	NI result;
{	result = ((NI)0);
	{
		NIM_CHAR i_1;
		NI i_2;
		i_1 = (NIM_CHAR)0;
		i_2 = ((NI)0);
		{
			while (1) {
				NI TM__fwwYmEhvplCaMmcZyA3JaA_2;
				if (!(i_2 < a_p0Len_0)) goto LA3;
				if (i_2 < 0 || i_2 >= a_p0Len_0){ raiseIndexError2(i_2,a_p0Len_0-1); goto BeforeRet_;
				}
				i_1 = a_p0[i_2];
				{
					if (!((NU8)(i_1) == (NU8)(item_p1))) goto LA6_;
					goto BeforeRet_;
				}
LA6_: ;
				if (nimAddInt(result, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_2)) { raiseOverflow(); goto BeforeRet_;
				};
				result = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_2);
				i_2 += ((NI)1);
			} LA3: ;
		}
	}
	result = ((NI)-1);
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, contains__stdZprivateZospaths2_u380)(NIM_CHAR* a_p0, NI a_p0Len_0, NIM_CHAR item_p1) {
	NIM_BOOL result;
	NI T1_;
{	T1_ = (NI)0;
	T1_ = find__stdZprivateZospaths2_u385(a_p0, a_p0Len_0, item_p1);
	result = (((NI)0) <= T1_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
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);
}
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(tyObject_Instr__dVxI1dKsh9ajF145UocfxWg*, X5BX5D___basicZcompiledpatterns_u43)(tyObject_Instr__dVxI1dKsh9ajF145UocfxWg* s_p0, NI s_p0Len_0, NI i_p1) {
	tyObject_Instr__dVxI1dKsh9ajF145UocfxWg* result;
	NI TM__fwwYmEhvplCaMmcZyA3JaA_8;
{	result = (tyObject_Instr__dVxI1dKsh9ajF145UocfxWg*)0;
	if (nimSubInt(s_p0Len_0, i_p1, &TM__fwwYmEhvplCaMmcZyA3JaA_8)) { raiseOverflow(); goto BeforeRet_;
	};
	if ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_8) < 0 || (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_8) >= s_p0Len_0){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_8),s_p0Len_0-1); goto BeforeRet_;
	}
	result = (&s_p0[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_8)]);
	}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_: ;
}
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;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4198);
	return result;
}
static N_INLINE(NI, find__basicZcompiledpatterns_u81)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ a_p0, NimStringV2 item_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((NI)0);
	{
		NimStringV2* i_1;
		NI i_2;
		NI L_1;
		NI T2_;
		i_1 = (NimStringV2*)0;
		i_2 = ((NI)0);
		T2_ = a_p0.len;
		L_1 = T2_;
		{
			while (1) {
				NI TM__fwwYmEhvplCaMmcZyA3JaA_11;
				if (!(i_2 < L_1)) goto LA4;
				if (i_2 < 0 || i_2 >= a_p0.len){ raiseIndexError2(i_2,a_p0.len-1); goto BeforeRet_;
				}
				i_1 = (&a_p0.p->data[i_2]);
				{
					if (!eqStrings((*i_1), item_p1)) goto LA7_;
					goto BeforeRet_;
				}
LA7_: ;
				if (nimAddInt(result, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_11)) { raiseOverflow(); goto BeforeRet_;
				};
				result = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_11);
				i_2 += ((NI)1);
				{
					NI T11_;
					T11_ = a_p0.len;
					if (!!((T11_ == L_1))) goto LA12_;
					failedAssertImpl__stdZassertions_u95(TM__fwwYmEhvplCaMmcZyA3JaA_13);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA12_: ;
			} LA4: ;
		}
	}
	result = ((NI)-1);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseSuffix__basicZcompiledpatterns_u25)(NimStringV2 s_p0, NI start_p1) {
	NI result;
{	result = start_p1;
	{
		while (1) {
			NIM_BOOL T3_;
			NI TM__fwwYmEhvplCaMmcZyA3JaA_18;
			T3_ = (NIM_BOOL)0;
			T3_ = (result < s_p0.len);
			if (!(T3_)) goto LA4_;
			if (result < 0 || result >= s_p0.len){ raiseIndexError2(result,s_p0.len-1); goto BeforeRet_;
			}
			T3_ = !(((NU8)(s_p0.p->data[result]) == (NU8)(36)));
LA4_: ;
			if (!T3_) goto LA2;
			if (nimAddInt(result, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_18)) { raiseOverflow(); goto BeforeRet_;
			};
			result = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_18);
		} LA2: ;
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, appendChar)(NimStringV2* dest_p0, NIM_CHAR c_p1) {
	(*(*dest_p0).p).data[(*dest_p0).len] = c_p1;
	(*dest_p0).len += ((NI)1);
	(*(*dest_p0).p).data[(*dest_p0).len] = 0;
}
N_LIB_PRIVATE N_NIMCALL(void, compile__basicZcompiledpatterns_u21)(NimStringV2 pattern_p0, tySequence__sM4lkSb7zS6F7OVMvW9cffQ* strings_p1, tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* Result) {
	NI p_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	(*Result).code.len = 0; (*Result).code.p = (tySequence__xjLg9a72SfsVVFciefDuvtw_Content*) newSeqPayload(0, sizeof(tyObject_Instr__dVxI1dKsh9ajF145UocfxWg), NIM_ALIGNOF(tyObject_Instr__dVxI1dKsh9ajF145UocfxWg));
	(*Result).usedMatches = ((NI)0);
	(*Result).error = TM__fwwYmEhvplCaMmcZyA3JaA_5;
	p_1 = ((NI)0);
	{
		while (1) {
			if (!(p_1 < pattern_p0.len)) goto LA2;
			{
				NIM_BOOL T5_;
				NI TM__fwwYmEhvplCaMmcZyA3JaA_6;
				NI TM__fwwYmEhvplCaMmcZyA3JaA_7;
				T5_ = (NIM_BOOL)0;
				if (p_1 < 0 || p_1 >= pattern_p0.len){ raiseIndexError2(p_1,pattern_p0.len-1); goto BeforeRet_;
				}
				T5_ = ((NU8)(pattern_p0.p->data[p_1]) == (NU8)(36));
				if (!(T5_)) goto LA6_;
				if (nimAddInt(p_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_6)) { raiseOverflow(); goto BeforeRet_;
				};
				T5_ = ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_6) < pattern_p0.len);
LA6_: ;
				if (!T5_) goto LA7_;
				if (nimAddInt(p_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_7)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_7) < 0 || (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_7) >= pattern_p0.len){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_7),pattern_p0.len-1); goto BeforeRet_;
				}
				switch (((NU8)(pattern_p0.p->data[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_7)]))) {
				case 36:
				{
					NI TM__fwwYmEhvplCaMmcZyA3JaA_16;
					{
						NIM_BOOL T12_;
						NI T13_;
						tyObject_Instr__dVxI1dKsh9ajF145UocfxWg* T15_;
						NimStringV2 key_1;
						NimStringV2 T18_;
						tyObject_Instr__dVxI1dKsh9ajF145UocfxWg* T19_;
						NI idx_1;
						tyObject_Instr__dVxI1dKsh9ajF145UocfxWg* T25_;
						T12_ = (NIM_BOOL)0;
						T13_ = (*Result).code.len;
						T12_ = (((NI)0) < T13_);
						if (!(T12_)) goto LA14_;
						T15_ = (tyObject_Instr__dVxI1dKsh9ajF145UocfxWg*)0;
						T15_ = X5BX5D___basicZcompiledpatterns_u43((((*Result).code).p) ? ((*Result).code.p->data) : NIM_NIL, (*Result).code.len, ((NI)1));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						T12_ = ((*T15_).opc == ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0) || (*T15_).opc == ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)1) || (*T15_).opc == ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)2) || (*T15_).opc == ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)3) || (*T15_).opc == ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)4));
LA14_: ;
						if (!T12_) goto LA16_;
						key_1.len = 0; key_1.p = NIM_NIL;
						T18_.len = 0; T18_.p = NIM_NIL;
						T19_ = (tyObject_Instr__dVxI1dKsh9ajF145UocfxWg*)0;
						T19_ = X5BX5D___basicZcompiledpatterns_u43((((*Result).code).p) ? ((*Result).code.p->data) : NIM_NIL, (*Result).code.len, ((NI)1));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						if ((*T19_).arg2 < 0 || (*T19_).arg2 >= (*strings_p1).len){ raiseIndexError2((*T19_).arg2,(*strings_p1).len-1); goto BeforeRet_;
						}
						T18_ = rawNewString((*strings_p1).p->data[(*T19_).arg2].len + 1);
appendString((&T18_), (*strings_p1).p->data[(*T19_).arg2]);
appendString((&T18_), TM__fwwYmEhvplCaMmcZyA3JaA_10);
						key_1 = T18_;
						idx_1 = find__basicZcompiledpatterns_u81((*strings_p1), key_1);
						{
							NI T24_;
							NimStringV2 blitTmp_1;
							if (!(idx_1 < ((NI)0))) goto LA22_;
							T24_ = (*strings_p1).len;
							idx_1 = T24_;
							blitTmp_1 = key_1;
							eqwasMoved___system_u2751((&key_1));
							add__stdZenumutils_u70((&(*strings_p1)), blitTmp_1);
						}
LA22_: ;
						T25_ = (tyObject_Instr__dVxI1dKsh9ajF145UocfxWg*)0;
						T25_ = X5BX5D___basicZcompiledpatterns_u43((((*Result).code).p) ? ((*Result).code.p->data) : NIM_NIL, (*Result).code.len, ((NI)1));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						(*T25_).arg2 = ((NU16) (idx_1));
						if (key_1.p && !(key_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(key_1.p);
}
					}
					goto LA10_;
LA16_: ;
					{
						NI idx_2;
						tyObject_Instr__dVxI1dKsh9ajF145UocfxWg T32_;
						idx_2 = find__basicZcompiledpatterns_u81((*strings_p1), TM__fwwYmEhvplCaMmcZyA3JaA_14);
						{
							NI T31_;
							if (!(idx_2 < ((NI)0))) goto LA29_;
							T31_ = (*strings_p1).len;
							idx_2 = T31_;
							add__stdZenumutils_u70((&(*strings_p1)), TM__fwwYmEhvplCaMmcZyA3JaA_15);
						}
LA29_: ;
						T32_.opc = ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0);
						T32_.arg1 = ((NU8)0);
						T32_.arg2 = ((NU16) (idx_2));
						add__basicZcompiledpatterns_u121((&(*Result).code), T32_);
					}
LA10_: ;
					if (nimAddInt(p_1, ((NI)2), &TM__fwwYmEhvplCaMmcZyA3JaA_16)) { raiseOverflow(); goto BeforeRet_;
					};
					p_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_16);
				}
				break;
				case 43:
				case 42:
				{
					NimStringV2 suffix_1;
					NIM_BOOL isPlus_1;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_17;
					NI pEnd_1;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_19;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_20;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_21;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_22;
					suffix_1.len = 0; suffix_1.p = NIM_NIL;
					if (nimAddInt(p_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_17)) { raiseOverflow(); goto BeforeRet_;
					};
					if ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_17) < 0 || (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_17) >= pattern_p0.len){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_17),pattern_p0.len-1); goto BeforeRet_;
					}
					isPlus_1 = ((NU8)(pattern_p0.p->data[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_17)]) == (NU8)(43));
					if (nimAddInt(p_1, ((NI)2), &TM__fwwYmEhvplCaMmcZyA3JaA_19)) { raiseOverflow(); goto BeforeRet_;
					};
					pEnd_1 = parseSuffix__basicZcompiledpatterns_u25(pattern_p0, (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_19));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					if (nimAddInt(p_1, ((NI)2), &TM__fwwYmEhvplCaMmcZyA3JaA_20)) { raiseOverflow(); goto BeforeRet_;
					};
					if (nimSubInt(pEnd_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_21)) { raiseOverflow(); goto BeforeRet_;
					};
					suffix_1 = substr__system_u9096(pattern_p0, (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_20), (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_21));
					p_1 = pEnd_1;
					{
						tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA colontmpD_;
						tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA colontmpD__2;
						tyObject_Instr__dVxI1dKsh9ajF145UocfxWg T38_;
						if (!(suffix_1.len == ((NI)0))) goto LA36_;
						colontmpD_ = (tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0;
						colontmpD__2 = (tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0;
						{
							if (!isPlus_1) goto LA41_;
							colontmpD_ = ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)4);
							T38_.opc = colontmpD_;
						}
						goto LA39_;
LA41_: ;
						{
							colontmpD__2 = ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)3);
							T38_.opc = colontmpD__2;
						}
LA39_: ;
						T38_.arg1 = ((NU8) ((*Result).usedMatches));
						T38_.arg2 = ((NU16)0);
						add__basicZcompiledpatterns_u121((&(*Result).code), T38_);
					}
					goto LA34_;
LA36_: ;
					{
						tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA colontmpD__3;
						tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA colontmpD__4;
						NI idx_3;
						tyObject_Instr__dVxI1dKsh9ajF145UocfxWg T50_;
						colontmpD__3 = (tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0;
						colontmpD__4 = (tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0;
						idx_3 = find__basicZcompiledpatterns_u81((*strings_p1), suffix_1);
						{
							NI T49_;
							NimStringV2 blitTmp_2;
							if (!(idx_3 < ((NI)0))) goto LA47_;
							T49_ = (*strings_p1).len;
							idx_3 = T49_;
							blitTmp_2 = suffix_1;
							eqwasMoved___system_u2751((&suffix_1));
							add__stdZenumutils_u70((&(*strings_p1)), blitTmp_2);
						}
LA47_: ;
						{
							if (!isPlus_1) goto LA53_;
							colontmpD__3 = ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)2);
							T50_.opc = colontmpD__3;
						}
						goto LA51_;
LA53_: ;
						{
							colontmpD__4 = ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)1);
							T50_.opc = colontmpD__4;
						}
LA51_: ;
						T50_.arg1 = ((NU8) ((*Result).usedMatches));
						T50_.arg2 = ((NU16) (idx_3));
						add__basicZcompiledpatterns_u121((&(*Result).code), T50_);
					}
LA34_: ;
					if (nimAddInt((*Result).usedMatches, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_22)) { raiseOverflow(); goto BeforeRet_;
					};
					(*Result).usedMatches = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_22);
					if (suffix_1.p && !(suffix_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(suffix_1.p);
}
				}
				break;
				case 115:
				{
					tyObject_Instr__dVxI1dKsh9ajF145UocfxWg T57_;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_23;
					nimZeroMem((void*)(&T57_), sizeof(tyObject_Instr__dVxI1dKsh9ajF145UocfxWg));
					T57_.opc = ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)5);
					add__basicZcompiledpatterns_u121((&(*Result).code), T57_);
					if (nimAddInt(p_1, ((NI)2), &TM__fwwYmEhvplCaMmcZyA3JaA_23)) { raiseOverflow(); goto BeforeRet_;
					};
					p_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_23);
				}
				break;
				default:
				{
					NimStringV2 T59_;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_26;
					T59_.len = 0; T59_.p = NIM_NIL;
					if (nimAddInt(p_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_26)) { raiseOverflow(); goto BeforeRet_;
					};
					if ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_26) < 0 || (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_26) >= pattern_p0.len){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_26),pattern_p0.len-1); goto BeforeRet_;
					}
					T59_ = rawNewString(19);
appendString((&T59_), TM__fwwYmEhvplCaMmcZyA3JaA_25);
appendChar((&T59_), pattern_p0.p->data[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_26)]);
appendString((&T59_), TM__fwwYmEhvplCaMmcZyA3JaA_28);
					eqsink___system_u2760((&(*Result).error), T59_);
					goto LA1;
				}
				break;
				}
			}
			goto LA3_;
LA7_: ;
			{
				if (p_1 < 0 || p_1 >= pattern_p0.len){ raiseIndexError2(p_1,pattern_p0.len-1); goto BeforeRet_;
				}
				if (!((NU8)(pattern_p0.p->data[p_1]) == (NU8)(36))) goto LA61_;
				eqsink___system_u2760((&(*Result).error), TM__fwwYmEhvplCaMmcZyA3JaA_30);
				goto LA1;
			}
			goto LA3_;
LA61_: ;
			{
				NimStringV2 suffix_2;
				NI pEnd_2;
				NI TM__fwwYmEhvplCaMmcZyA3JaA_31;
				NI idx_4;
				tyObject_Instr__dVxI1dKsh9ajF145UocfxWg T69_;
				suffix_2.len = 0; suffix_2.p = NIM_NIL;
				pEnd_2 = parseSuffix__basicZcompiledpatterns_u25(pattern_p0, p_1);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				if (nimSubInt(pEnd_2, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_31)) { raiseOverflow(); goto BeforeRet_;
				};
				suffix_2 = substr__system_u9096(pattern_p0, p_1, (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_31));
				idx_4 = find__basicZcompiledpatterns_u81((*strings_p1), suffix_2);
				{
					NI T68_;
					NimStringV2 blitTmp_3;
					if (!(idx_4 < ((NI)0))) goto LA66_;
					T68_ = (*strings_p1).len;
					idx_4 = T68_;
					blitTmp_3 = suffix_2;
					eqwasMoved___system_u2751((&suffix_2));
					add__stdZenumutils_u70((&(*strings_p1)), blitTmp_3);
				}
LA66_: ;
				T69_.opc = ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0);
				T69_.arg1 = ((NU8)0);
				T69_.arg2 = ((NU16) (idx_4));
				add__basicZcompiledpatterns_u121((&(*Result).code), T69_);
				p_1 = pEnd_2;
				if (suffix_2.p && !(suffix_2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(suffix_2.p);
}
			}
LA3_: ;
		} LA2: ;
	} LA1: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___basicZcompiledpatterns_u323)(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* dest_p0) {
	(*dest_p0).code.len = 0; (*dest_p0).code.p = NIM_NIL;
	(*dest_p0).usedMatches = 0;
	(*dest_p0).error.len = 0; (*dest_p0).error.p = NIM_NIL;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZcompiledpatterns_u326)(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* dest_p0) {
	if ((*dest_p0).error.p && !((*dest_p0).error.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).error.p);
}
	eqdestroy___basicZcompiledpatterns_u210((*dest_p0).code);
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, addPattern__basicZcompiledpatterns_u1187)(tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg* p_p0, NimStringV2 inputPattern_p1, NimStringV2 outputPattern_p2) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	{
		NIM_BOOL T3_;
		NIM_BOOL T4_;
		NIM_BOOL T6_;
		NimStringV2 colontmpD_;
		NimStringV2 colontmpD__2;
		NimStringV2 colontmpD__3;
		tyTuple__UV3llMMYFckfui8YMBuUZA T9_;
		T3_ = (NIM_BOOL)0;
		T4_ = (NIM_BOOL)0;
		T4_ = contains__stdZprivateZospaths2_u380(((inputPattern_p1).p) ? (inputPattern_p1.p->data) : NIM_NIL, inputPattern_p1.len, 36);
		T3_ = !(T4_);
		if (!(T3_)) goto LA5_;
		T6_ = (NIM_BOOL)0;
		T6_ = contains__stdZprivateZospaths2_u380(((outputPattern_p2).p) ? (outputPattern_p2.p->data) : NIM_NIL, outputPattern_p2.len, 36);
		T3_ = !(T6_);
LA5_: ;
		if (!T3_) goto LA7_;
		colontmpD_ = eqdup___system_u2757(outputPattern_p2);
		X5BX5Deq___basicZcompiledpatterns_u1236((&(*p_p0).t), inputPattern_p1, colontmpD_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		colontmpD__2 = eqdup___system_u2757(inputPattern_p1);
		T9_.Field0 = colontmpD__2;
		colontmpD__3 = eqdup___system_u2757(outputPattern_p2);
		T9_.Field1 = colontmpD__3;
		add__basicZparse95requires_u3513((&(*p_p0).patterns), (&T9_));
		result = TM__fwwYmEhvplCaMmcZyA3JaA_4;
	}
	goto LA1_;
LA7_: ;
	{
		tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA code_1;
		nimZeroMem((void*)(&code_1), sizeof(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA));
		compile__basicZcompiledpatterns_u21(inputPattern_p1, (&(*p_p0).strings), (&code_1));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		{
			if (!(((NI)0) < code_1.error.len)) goto LA13_;
			result = code_1.error;
			eqwasMoved___system_u2751((&code_1.error));
		}
		goto LA11_;
LA13_: ;
		{
			NimStringV2 colontmpD__4;
			NimStringV2 colontmpD__5;
			NimStringV2 colontmpD__6;
			tyTuple__ZwcqNhWtDfKDJjVz9bcvE9cQ T16_;
			tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA blitTmp_1;
			tyTuple__UV3llMMYFckfui8YMBuUZA T17_;
			nimZeroMem((void*)(&blitTmp_1), sizeof(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA));
			blitTmp_1 = code_1;
			eqwasMoved___basicZcompiledpatterns_u323((&code_1));
			T16_.Field0 = blitTmp_1;
			colontmpD__4 = eqdup___system_u2757(outputPattern_p2);
			T16_.Field1 = colontmpD__4;
			add__basicZcompiledpatterns_u2430((&(*p_p0).s), (&T16_));
			colontmpD__5 = eqdup___system_u2757(inputPattern_p1);
			T17_.Field0 = colontmpD__5;
			colontmpD__6 = eqdup___system_u2757(outputPattern_p2);
			T17_.Field1 = colontmpD__6;
			add__basicZparse95requires_u3513((&(*p_p0).patterns), (&T17_));
			result = TM__fwwYmEhvplCaMmcZyA3JaA_32;
		}
LA11_: ;
		eqdestroy___basicZcompiledpatterns_u326((&code_1));
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___basicZcompiledpatterns_u1166)(tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg* dest_p0, tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg* src_p1) {
	eqcopy___basicZcompiledpatterns_u933((&(*dest_p0).s), (*src_p1).s);
	eqcopy___basicZcompiledpatterns_u882((&(*dest_p0).t.data), (*src_p1).t.data);
	(*dest_p0).t.counter = (*src_p1).t.counter;
	eqcopy___system_u5585((&(*dest_p0).strings), (*src_p1).strings);
	eqcopy___stdZenvvars_u106((&(*dest_p0).patterns), (*src_p1).patterns);
}
N_LIB_PRIVATE N_NIMCALL(void, matches__basicZcompiledpatterns_u407)(tyObject_Pattern__K9baAv1Y6R5n9b0ZUxBeh6vA* s_p0, tySequence__sM4lkSb7zS6F7OVMvW9cffQ strings_p1, NimStringV2 input_p2, tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A* Result) {
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)Result, sizeof(tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A));
	i_1 = ((NI)0);
	{
		tyObject_Instr__dVxI1dKsh9ajF145UocfxWg* instr_1;
		NI i_2;
		NI L_1;
		NI T2_;
		instr_1 = (tyObject_Instr__dVxI1dKsh9ajF145UocfxWg*)0;
		i_2 = ((NI)0);
		T2_ = (*s_p0).code.len;
		L_1 = T2_;
		{
			while (1) {
				if (!(i_2 < L_1)) goto LA4;
				if (i_2 < 0 || i_2 >= (*s_p0).code.len){ raiseIndexError2(i_2,(*s_p0).code.len-1); goto BeforeRet_;
				}
				instr_1 = (&(*s_p0).code.p->data[i_2]);
				switch ((*instr_1).opc) {
				case ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)0):
				{
					{
						NIM_BOOL T8_;
						NI TM__fwwYmEhvplCaMmcZyA3JaA_33;
						if ((*instr_1).arg2 < 0 || (*instr_1).arg2 >= strings_p1.len){ raiseIndexError2((*instr_1).arg2,strings_p1.len-1); goto BeforeRet_;
						}
						if ((i_1) < ((NI)0) || (i_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(i_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
						}
						T8_ = (NIM_BOOL)0;
						T8_ = nsuContinuesWith(input_p2, strings_p1.p->data[(*instr_1).arg2], (i_1));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						if (!T8_) goto LA9_;
						if ((*instr_1).arg2 < 0 || (*instr_1).arg2 >= strings_p1.len){ raiseIndexError2((*instr_1).arg2,strings_p1.len-1); goto BeforeRet_;
						}
						if (nimAddInt(i_1, strings_p1.p->data[(*instr_1).arg2].len, &TM__fwwYmEhvplCaMmcZyA3JaA_33)) { raiseOverflow(); goto BeforeRet_;
						};
						i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_33);
					}
					goto LA6_;
LA9_: ;
					{
						(*Result).m = ((NI)-1);
						goto BeforeRet_;
					}
LA6_: ;
				}
				break;
				case ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)1):
				case ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)2):
				{
					{
						NI start_1;
						start_1 = i_1;
						{
							while (1) {
								NI TM__fwwYmEhvplCaMmcZyA3JaA_37;
								if (!(i_1 < input_p2.len)) goto LA15;
								{
									NIM_BOOL T18_;
									NI colontmp_;
									NI colontmp__2;
									NI TM__fwwYmEhvplCaMmcZyA3JaA_34;
									NI TM__fwwYmEhvplCaMmcZyA3JaA_35;
									NI TM__fwwYmEhvplCaMmcZyA3JaA_36;
									if ((*instr_1).arg2 < 0 || (*instr_1).arg2 >= strings_p1.len){ raiseIndexError2((*instr_1).arg2,strings_p1.len-1); goto BeforeRet_;
									}
									if ((i_1) < ((NI)0) || (i_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(i_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
									}
									T18_ = (NIM_BOOL)0;
									T18_ = nsuContinuesWith(input_p2, strings_p1.p->data[(*instr_1).arg2], (i_1));
									if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
									if (!T18_) goto LA19_;
									{
										NIM_BOOL T23_;
										T23_ = (NIM_BOOL)0;
										T23_ = ((*instr_1).opc == ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)2));
										if (!(T23_)) goto LA24_;
										T23_ = (i_1 == start_1);
LA24_: ;
										if (!T23_) goto LA25_;
										(*Result).m = ((NI)-1);
										goto BeforeRet_;
									}
LA25_: ;
									colontmp_ = start_1;
									if (nimSubInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_34)) { raiseOverflow(); goto BeforeRet_;
									};
									colontmp__2 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_34);
									if ((NU)((*Result).m) > (NU)(19)){ raiseIndexError2((*Result).m, 19); goto BeforeRet_;
									}
									(*Result).a[((*Result).m)- 0].Field0 = colontmp_;
									(*Result).a[((*Result).m)- 0].Field1 = colontmp__2;
									if (nimAddInt((*Result).m, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_35)) { raiseOverflow(); goto BeforeRet_;
									};
									(*Result).m = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_35);
									if ((*instr_1).arg2 < 0 || (*instr_1).arg2 >= strings_p1.len){ raiseIndexError2((*instr_1).arg2,strings_p1.len-1); goto BeforeRet_;
									}
									if (nimAddInt(i_1, strings_p1.p->data[(*instr_1).arg2].len, &TM__fwwYmEhvplCaMmcZyA3JaA_36)) { raiseOverflow(); goto BeforeRet_;
									};
									i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_36);
									goto LA13;
								}
LA19_: ;
								if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_37)) { raiseOverflow(); goto BeforeRet_;
								};
								i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_37);
							} LA15: ;
						}
						(*Result).m = ((NI)-1);
						goto BeforeRet_;
					} LA13: ;
				}
				break;
				case ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)3):
				case ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)4):
				{
					NI colontmp__3;
					NI colontmp__4;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_38;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_39;
					{
						NIM_BOOL T30_;
						T30_ = (NIM_BOOL)0;
						T30_ = ((*instr_1).opc == ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)4));
						if (!(T30_)) goto LA31_;
						T30_ = (input_p2.len <= i_1);
LA31_: ;
						if (!T30_) goto LA32_;
						(*Result).m = ((NI)-1);
						goto BeforeRet_;
					}
LA32_: ;
					colontmp__3 = i_1;
					if (nimSubInt(input_p2.len, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_38)) { raiseOverflow(); goto BeforeRet_;
					};
					colontmp__4 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_38);
					if ((NU)((*Result).m) > (NU)(19)){ raiseIndexError2((*Result).m, 19); goto BeforeRet_;
					}
					(*Result).a[((*Result).m)- 0].Field0 = colontmp__3;
					(*Result).a[((*Result).m)- 0].Field1 = colontmp__4;
					if (nimAddInt((*Result).m, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_39)) { raiseOverflow(); goto BeforeRet_;
					};
					(*Result).m = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_39);
					i_1 = input_p2.len;
				}
				break;
				case ((tyEnum_Opcode__6ExfopoXudbZxEsLnN9aAhA)5):
				{
					{
						while (1) {
							NIM_BOOL T37_;
							NI TM__fwwYmEhvplCaMmcZyA3JaA_40;
							T37_ = (NIM_BOOL)0;
							T37_ = (i_1 < input_p2.len);
							if (!(T37_)) goto LA38_;
							if (i_1 < 0 || i_1 >= input_p2.len){ raiseIndexError2(i_1,input_p2.len-1); goto BeforeRet_;
							}
							T37_ = (((NU8)(input_p2.p->data[i_1])) == ((NU8)(32)) || ((NU8)(input_p2.p->data[i_1])) == ((NU8)(9)) || ((NU8)(input_p2.p->data[i_1])) == ((NU8)(11)) || ((NU8)(input_p2.p->data[i_1])) == ((NU8)(13)) || ((NU8)(input_p2.p->data[i_1])) == ((NU8)(10)) || ((NU8)(input_p2.p->data[i_1])) == ((NU8)(12)));
LA38_: ;
							if (!T37_) goto LA36;
							if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_40)) { raiseOverflow(); goto BeforeRet_;
							};
							i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_40);
						} LA36: ;
					}
				}
				break;
				default: __builtin_unreachable();
				}
				i_2 += ((NI)1);
				{
					NI T41_;
					T41_ = (*s_p0).code.len;
					if (!!((T41_ == L_1))) goto LA42_;
					failedAssertImpl__stdZassertions_u95(TM__fwwYmEhvplCaMmcZyA3JaA_41);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA42_: ;
			} LA4: ;
		}
	}
	{
		if (!(i_1 < input_p2.len)) goto LA46_;
		(*Result).m = ((NI)-1);
		goto BeforeRet_;
	}
LA46_: ;
	}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(NimStringV2, translate__basicZcompiledpatterns_u500)(tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A* m_p0, NimStringV2 outputPattern_p1, NimStringV2 input_p2) {
	NimStringV2 result;
	NI i_1;
	NI patternCount_1;
{	result.len = 0; result.p = NIM_NIL;
	if ((outputPattern_p1.len) < ((NI)0) || (outputPattern_p1.len) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(outputPattern_p1.len, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = rawNewString((outputPattern_p1.len));
	i_1 = ((NI)0);
	patternCount_1 = ((NI)0);
	{
		while (1) {
			if (!(i_1 < outputPattern_p1.len)) goto LA2;
			{
				NIM_BOOL T5_;
				NI TM__fwwYmEhvplCaMmcZyA3JaA_42;
				T5_ = (NIM_BOOL)0;
				if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_42)) { raiseOverflow(); goto BeforeRet_;
				};
				T5_ = ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_42) < outputPattern_p1.len);
				if (!(T5_)) goto LA6_;
				if (i_1 < 0 || i_1 >= outputPattern_p1.len){ raiseIndexError2(i_1,outputPattern_p1.len-1); goto BeforeRet_;
				}
				T5_ = ((NU8)(outputPattern_p1.p->data[i_1]) == (NU8)(36));
LA6_: ;
				if (!T5_) goto LA7_;
				{
					NI TM__fwwYmEhvplCaMmcZyA3JaA_43;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_44;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_46;
					if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_43)) { raiseOverflow(); goto BeforeRet_;
					};
					if ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_43) < 0 || (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_43) >= outputPattern_p1.len){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_43),outputPattern_p1.len-1); goto BeforeRet_;
					}
					if (!((NU8)(outputPattern_p1.p->data[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_43)]) == (NU8)(35))) goto LA11_;
					if (nimAddInt(i_1, ((NI)2), &TM__fwwYmEhvplCaMmcZyA3JaA_44)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_44);
					{
						tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ tmpTuple_1;
						NI a_1;
						NI b_1;
						if (!(patternCount_1 < ((NI)20))) goto LA15_;
						if ((NU)(patternCount_1) > (NU)(19)){ raiseIndexError2(patternCount_1, 19); goto BeforeRet_;
						}
						tmpTuple_1 = (*m_p0).a[(patternCount_1)- 0];
						a_1 = tmpTuple_1.Field0;
						b_1 = tmpTuple_1.Field1;
						{
							NI j_1;
							NI res_1;
							j_1 = (NI)0;
							res_1 = a_1;
							{
								while (1) {
									NI TM__fwwYmEhvplCaMmcZyA3JaA_45;
									if (!(res_1 <= b_1)) goto LA19;
									j_1 = ((NI) (res_1));
									if (j_1 < 0 || j_1 >= input_p2.len){ raiseIndexError2(j_1,input_p2.len-1); goto BeforeRet_;
									}
									nimAddCharV1((&result), input_p2.p->data[j_1]);
									if (nimAddInt(res_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_45)) { raiseOverflow(); goto BeforeRet_;
									};
									res_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_45);
								} LA19: ;
							}
						}
					}
LA15_: ;
					if (nimAddInt(patternCount_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_46)) { raiseOverflow(); goto BeforeRet_;
					};
					patternCount_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_46);
				}
				goto LA9_;
LA11_: ;
				{
					NI TM__fwwYmEhvplCaMmcZyA3JaA_47;
					NI n_1;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_48;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_49;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_50;
					if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_47)) { raiseOverflow(); goto BeforeRet_;
					};
					if ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_47) < 0 || (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_47) >= outputPattern_p1.len){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_47),outputPattern_p1.len-1); goto BeforeRet_;
					}
					if (!(((NU8)(outputPattern_p1.p->data[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_47)])) >= ((NU8)(49)) && ((NU8)(outputPattern_p1.p->data[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_47)])) <= ((NU8)(57)))) goto LA21_;
					if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_48)) { raiseOverflow(); goto BeforeRet_;
					};
					if ((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_48) < 0 || (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_48) >= outputPattern_p1.len){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_48),outputPattern_p1.len-1); goto BeforeRet_;
					}
					if (nimSubInt(((NU8)(outputPattern_p1.p->data[(NI)(TM__fwwYmEhvplCaMmcZyA3JaA_48)])), ((NI)48), &TM__fwwYmEhvplCaMmcZyA3JaA_49)) { raiseOverflow(); goto BeforeRet_;
					};
					n_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_49);
					if (nimAddInt(i_1, ((NI)2), &TM__fwwYmEhvplCaMmcZyA3JaA_50)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_50);
					{
						while (1) {
							NIM_BOOL T25_;
							NI TM__fwwYmEhvplCaMmcZyA3JaA_51;
							NI TM__fwwYmEhvplCaMmcZyA3JaA_52;
							NI TM__fwwYmEhvplCaMmcZyA3JaA_53;
							NI TM__fwwYmEhvplCaMmcZyA3JaA_54;
							T25_ = (NIM_BOOL)0;
							T25_ = (i_1 < outputPattern_p1.len);
							if (!(T25_)) goto LA26_;
							if (i_1 < 0 || i_1 >= outputPattern_p1.len){ raiseIndexError2(i_1,outputPattern_p1.len-1); goto BeforeRet_;
							}
							T25_ = (((NU8)(outputPattern_p1.p->data[i_1])) >= ((NU8)(48)) && ((NU8)(outputPattern_p1.p->data[i_1])) <= ((NU8)(57)));
LA26_: ;
							if (!T25_) goto LA24;
							if (nimMulInt(n_1, ((NI)10), &TM__fwwYmEhvplCaMmcZyA3JaA_51)) { raiseOverflow(); goto BeforeRet_;
							};
							if (i_1 < 0 || i_1 >= outputPattern_p1.len){ raiseIndexError2(i_1,outputPattern_p1.len-1); goto BeforeRet_;
							}
							if (nimSubInt(((NU8)(outputPattern_p1.p->data[i_1])), ((NI)48), &TM__fwwYmEhvplCaMmcZyA3JaA_52)) { raiseOverflow(); goto BeforeRet_;
							};
							if (nimAddInt((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_51), (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_52), &TM__fwwYmEhvplCaMmcZyA3JaA_53)) { raiseOverflow(); goto BeforeRet_;
							};
							n_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_53);
							if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_54)) { raiseOverflow(); goto BeforeRet_;
							};
							i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_54);
						} LA24: ;
					}
					patternCount_1 = n_1;
					{
						NI TM__fwwYmEhvplCaMmcZyA3JaA_55;
						tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ tmpTuple_2;
						NI TM__fwwYmEhvplCaMmcZyA3JaA_56;
						NI a_2;
						NI b_2;
						if (nimSubInt(n_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_55)) { raiseOverflow(); goto BeforeRet_;
						};
						if (!((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_55) < ((NI)20))) goto LA29_;
						if (nimSubInt(n_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_56)) { raiseOverflow(); goto BeforeRet_;
						};
						if ((NU)((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_56)) > (NU)(19)){ raiseIndexError2((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_56), 19); goto BeforeRet_;
						}
						tmpTuple_2 = (*m_p0).a[((NI)(TM__fwwYmEhvplCaMmcZyA3JaA_56))- 0];
						a_2 = tmpTuple_2.Field0;
						b_2 = tmpTuple_2.Field1;
						{
							NI j_2;
							NI res_2;
							j_2 = (NI)0;
							res_2 = a_2;
							{
								while (1) {
									NI TM__fwwYmEhvplCaMmcZyA3JaA_57;
									if (!(res_2 <= b_2)) goto LA33;
									j_2 = ((NI) (res_2));
									if (j_2 < 0 || j_2 >= input_p2.len){ raiseIndexError2(j_2,input_p2.len-1); goto BeforeRet_;
									}
									nimAddCharV1((&result), input_p2.p->data[j_2]);
									if (nimAddInt(res_2, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_57)) { raiseOverflow(); goto BeforeRet_;
									};
									res_2 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_57);
								} LA33: ;
							}
						}
					}
LA29_: ;
				}
				goto LA9_;
LA21_: ;
				{
					NI TM__fwwYmEhvplCaMmcZyA3JaA_58;
					if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_58)) { raiseOverflow(); goto BeforeRet_;
					};
					i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_58);
				}
LA9_: ;
			}
			goto LA3_;
LA7_: ;
			{
				NI TM__fwwYmEhvplCaMmcZyA3JaA_59;
				if (i_1 < 0 || i_1 >= outputPattern_p1.len){ raiseIndexError2(i_1,outputPattern_p1.len-1); goto BeforeRet_;
				}
				nimAddCharV1((&result), outputPattern_p1.p->data[i_1]);
				if (nimAddInt(i_1, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_59)) { raiseOverflow(); goto BeforeRet_;
				};
				i_1 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_59);
			}
LA3_: ;
		} LA2: ;
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substitute__basicZcompiledpatterns_u2454)(tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg* p_p0, NimStringV2 input_p1, NIM_BOOL* didReplace_p2) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	{
		NIM_BOOL T3_;
		NimStringV2* T6_;
		T3_ = (NIM_BOOL)0;
		T3_ = contains__basicZcompiledpatterns_u2497((*p_p0).t, input_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!T3_) goto LA4_;
		(*didReplace_p2) = NIM_TRUE;
		T6_ = (NimStringV2*)0;
		T6_ = X5BX5D___basicZcompiledpatterns_u2580((&(*p_p0).t), input_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		eqcopy___system_u2754((&result), (*T6_));
	}
LA4_: ;
	{
		if (!(result.len == ((NI)0))) goto LA9_;
		{
			NI i_1;
			NI colontmp_;
			NI T12_;
			NI i_2;
			i_1 = (NI)0;
			colontmp_ = (NI)0;
			T12_ = (*p_p0).s.len;
			colontmp_ = T12_;
			i_2 = ((NI)0);
			{
				while (1) {
					tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A m_1;
					NI TM__fwwYmEhvplCaMmcZyA3JaA_60;
					if (!(i_2 < colontmp_)) goto LA14;
					i_1 = i_2;
					nimZeroMem((void*)(&m_1), sizeof(tyObject_MatchObj__arz28266LRq5Nv9cCiCKV7A));
					if (i_1 < 0 || i_1 >= (*p_p0).s.len){ raiseIndexError2(i_1,(*p_p0).s.len-1); goto BeforeRet_;
					}
					matches__basicZcompiledpatterns_u407((&(*p_p0).s.p->data[i_1].Field0), (*p_p0).strings, input_p1, (&m_1));
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					{
						if (!(((NI)0) <= m_1.m)) goto LA17_;
						(*didReplace_p2) = NIM_TRUE;
						if (i_1 < 0 || i_1 >= (*p_p0).s.len){ raiseIndexError2(i_1,(*p_p0).s.len-1); goto BeforeRet_;
						}
						result = translate__basicZcompiledpatterns_u500((&m_1), (*p_p0).s.p->data[i_1].Field1, input_p1);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						goto BeforeRet_;
					}
LA17_: ;
					if (nimAddInt(i_2, ((NI)1), &TM__fwwYmEhvplCaMmcZyA3JaA_60)) { raiseOverflow(); goto BeforeRet_;
					};
					i_2 = (NI)(TM__fwwYmEhvplCaMmcZyA3JaA_60);
				} LA14: ;
			}
		}
		eqcopy___system_u2754((&result), input_p1);
		goto BeforeRet_;
	}
LA9_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Table__ao79cQacnAZc5Mu0cN3jybg, toTable__basicZcompiledpatterns_u2671)(tyObject_Patterns__FXqyqR49aNa9c2SMD9akprhSg* p_p0) {
	tyObject_Table__ao79cQacnAZc5Mu0cN3jybg result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)(&result), sizeof(tyObject_Table__ao79cQacnAZc5Mu0cN3jybg));
	result = initTable__basicZcompiledpatterns_u722(((NI)32));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NimStringV2* input_1;
		NimStringV2* output_1;
		NI i_1;
		NI L_1;
		NI T2_;
		input_1 = (NimStringV2*)0;
		output_1 = (NimStringV2*)0;
		i_1 = ((NI)0);
		T2_ = (*p_p0).patterns.len;
		L_1 = T2_;
		{
			while (1) {
				NimStringV2 colontmpD_;
				if (!(i_1 < L_1)) goto LA4;
				if (i_1 < 0 || i_1 >= (*p_p0).patterns.len){ raiseIndexError2(i_1,(*p_p0).patterns.len-1); goto BeforeRet_;
				}
				input_1 = (&(*p_p0).patterns.p->data[i_1].Field0);
				if (i_1 < 0 || i_1 >= (*p_p0).patterns.len){ raiseIndexError2(i_1,(*p_p0).patterns.len-1); goto BeforeRet_;
				}
				output_1 = (&(*p_p0).patterns.p->data[i_1].Field1);
				colontmpD_ = eqdup___system_u2757((*output_1));
				X5BX5Deq___basicZcompiledpatterns_u1236((&result), (*input_1), colontmpD_);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				i_1 += ((NI)1);
				{
					NI T7_;
					T7_ = (*p_p0).patterns.len;
					if (!!((T7_ == L_1))) goto LA8_;
					failedAssertImpl__stdZassertions_u95(TM__fwwYmEhvplCaMmcZyA3JaA_61);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA8_: ;
			} LA4: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
