/* Generated by Nim Compiler v2.2.10 */
#define NIM_INTBITS 64

#include "nimbase.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__S29bKZF4TUS33IR7ZXb7fFA tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA;
typedef struct tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ tySequence__S89cE01OvNjsN9c71FKsSrqQ;
typedef struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content;
typedef struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A;
typedef struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
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__S89cE01OvNjsN9c71FKsSrqQ {
  NI len; tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content* p;
};
struct Exception {
	RootObj Sup;
	Exception* parent;
	NCSTRING name;
	NimStringV2 message;
	tySequence__S89cE01OvNjsN9c71FKsSrqQ trace;
	Exception* up;
};
struct tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg {
	Exception Sup;
};
struct tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA {
	tyObject_CatchableError__TCF9b1Y9b2ct0xPZvZnaY7gg Sup;
};
struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A {
	NI rc;
	NI rootIdx;
};
struct tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA {
	NCSTRING procname;
	NI line;
	NCSTRING filename;
};
struct tySequence__S89cE01OvNjsN9c71FKsSrqQ_Content { NI cap; tyObject_StackTraceEntry__RcJz5RXFIYjIseutvVFICA data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(NI, parseHex__pureZstrutils_u997)(NIM_CHAR* s_p0, NI s_p0Len_0, NI* number_p1, NI maxLen_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseInt)(NIM_CHAR* s_p0, NI s_p0Len_0, NI* number_p1);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseBiggestInt)(NIM_CHAR* s_p0, NI s_p0Len_0, NI64* number_p1);
N_LIB_PRIVATE N_NIMCALL(NI, rawParseInt__pureZparseutils_u388)(NIM_CHAR* s_p0, NI s_p0Len_0, NI64* b_p1);
N_LIB_PRIVATE N_NOINLINE(void, integerOutOfRangeError__pureZparseutils_u325)(void);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
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, parseSaturatedNatural__pureZparseutils_u459)(NIM_CHAR* s_p0, NI s_p0Len_0, NI* b_p1);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseFloat)(NIM_CHAR* s_p0, NI s_p0Len_0, NF* number_p1);
N_NIMCALL(NI, nimParseBiggestFloat)(NIM_CHAR* s_p0, NI s_p0Len_0, NF* number_p1);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseBiggestUInt)(NIM_CHAR* s_p0, NI s_p0Len_0, NU64* number_p1);
N_LIB_PRIVATE N_NIMCALL(NI, rawParseUInt__pureZparseutils_u514)(NIM_CHAR* s_p0, NI s_p0Len_0, NU64* b_p1);
N_LIB_PRIVATE N_NIMCALL(void, setLengthStrV2)(NimStringV2* s_p0, NI newLen_p1);
static N_INLINE(void, nimPrepareStrMutationV2)(NimStringV2* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimPrepareStrMutationImpl__system_u2430)(NimStringV2* s_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3500)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* s_p1, TNimTypeV2* desc_p2);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(NI, parseIdent__pureZparseutils_u56)(NIM_CHAR* s_p0, NI s_p0Len_0, NimStringV2* ident_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2700)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u8626)(NIM_CHAR* a_p0, NI a_p0Len_0);
extern TNimTypeV2 NTIv2__S29bKZF4TUS33IR7ZXb7fFA_;
static const struct {
  NI cap; NIM_CHAR data[37+1];
} TM__vI9aZNKIcImom6dDyKXW1ZA_2 = { 37 | NIM_STRLIT_FLAG, "Parsed integer outside of valid range" };
static const NimStringV2 TM__vI9aZNKIcImom6dDyKXW1ZA_3 = {37, (NimStrPayload*)&TM__vI9aZNKIcImom6dDyKXW1ZA_2};
extern NIM_BOOL nimInErrorMode__system_u4146;
N_LIB_PRIVATE N_NIMCALL(NI, parseHex__pureZstrutils_u997)(NIM_CHAR* s_p0, NI s_p0Len_0, NI* number_p1, NI maxLen_p2) {
	NI result;
	NI colontmpD_;
	NI colontmpD__2;
	NI i_1;
	NI output_1;
	NIM_BOOL foundDigit_1;
	NI last_1;
	NI T1_;
	result = (NI)0;
	colontmpD_ = (NI)0;
	colontmpD__2 = (NI)0;
	i_1 = ((NI)0);
	output_1 = ((NI)0);
	foundDigit_1 = NIM_FALSE;
	T1_ = (NI)0;
	{
		if (!(maxLen_p2 == ((NI)0))) goto LA4_;
		colontmpD_ = s_p0Len_0;
		T1_ = colontmpD_;
	}
	goto LA2_;
LA4_: ;
	{
		colontmpD__2 = (NI)(i_1 + maxLen_p2);
		T1_ = colontmpD__2;
	}
LA2_: ;
	last_1 = ((s_p0Len_0 <= T1_) ? s_p0Len_0 : T1_);
	{
		NIM_BOOL T9_;
		NIM_BOOL T10_;
		T9_ = (NIM_BOOL)0;
		T10_ = (NIM_BOOL)0;
		T10_ = ((NI)(i_1 + ((NI)1)) < last_1);
		if (!(T10_)) goto LA11_;
		T10_ = ((NU8)(s_p0[i_1]) == (NU8)(48));
LA11_: ;
		T9_ = T10_;
		if (!(T9_)) goto LA12_;
		T9_ = (((NU8)(s_p0[(NI)(i_1 + ((NI)1))])) == ((NU8)(120)) || ((NU8)(s_p0[(NI)(i_1 + ((NI)1))])) == ((NU8)(88)));
LA12_: ;
		if (!T9_) goto LA13_;
		i_1 += ((NI)2);
	}
	goto LA7_;
LA13_: ;
	{
		NIM_BOOL T16_;
		T16_ = (NIM_BOOL)0;
		T16_ = (i_1 < last_1);
		if (!(T16_)) goto LA17_;
		T16_ = ((NU8)(s_p0[i_1]) == (NU8)(35));
LA17_: ;
		if (!T16_) goto LA18_;
		i_1 += ((NI)1);
	}
	goto LA7_;
LA18_: ;
LA7_: ;
	{
		while (1) {
			if (!(i_1 < last_1)) goto LA21;
			switch (((NU8)(s_p0[i_1]))) {
			case 95:
			{
			}
			break;
			case 48 ... 57:
			{
				output_1 = (NI)((NI)((NU64)(output_1) << (NU64)(((NI)4) & (64 - 1))) | (NI)(((NU8)(s_p0[i_1])) - ((NI)48)));
				foundDigit_1 = NIM_TRUE;
			}
			break;
			case 97 ... 102:
			{
				output_1 = (NI)((NI)((NU64)(output_1) << (NU64)(((NI)4) & (64 - 1))) | (NI)((NI)(((NU8)(s_p0[i_1])) - ((NI)97)) + ((NI)10)));
				foundDigit_1 = NIM_TRUE;
			}
			break;
			case 65 ... 70:
			{
				output_1 = (NI)((NI)((NU64)(output_1) << (NU64)(((NI)4) & (64 - 1))) | (NI)((NI)(((NU8)(s_p0[i_1])) - ((NI)65)) + ((NI)10)));
				foundDigit_1 = NIM_TRUE;
			}
			break;
			default:
			{
				goto LA20;
			}
			break;
			}
			i_1 += ((NI)1);
		} LA21: ;
	} LA20: ;
	{
		if (!foundDigit_1) goto LA29_;
		(*number_p1) = output_1;
		result = i_1;
	}
LA29_: ;
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4146);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseHex__pureZstrutils_u990)(NimStringV2 s_p0, NI* number_p1, NI start_p2, NI maxLen_p3) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = parseHex__pureZstrutils_u997((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, number_p1, maxLen_p3);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NOINLINE(void, integerOutOfRangeError__pureZparseutils_u325)(void) {
	tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA* T1_;
{	T1_ = NIM_NIL;
	T1_ = (tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA*) nimNewObj(sizeof(tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA), NIM_ALIGNOF(tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA));
	(*T1_).Sup.Sup.Sup.m_type = (&NTIv2__S29bKZF4TUS33IR7ZXb7fFA_);
	(*T1_).Sup.Sup.name = "ValueError";
	(*T1_).Sup.Sup.message = TM__vI9aZNKIcImom6dDyKXW1ZA_3;
	(*T1_).Sup.Sup.parent = ((Exception*) NIM_NIL);
	raiseExceptionEx((Exception*)T1_, "ValueError", "integerOutOfRangeError", "parseutils.nim", 429);
goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NI, rawParseInt__pureZparseutils_u388)(NIM_CHAR* s_p0, NI s_p0Len_0, NI64* b_p1) {
	NI result;
	NI64 sign_1;
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	sign_1 = IL64(-1);
	i_1 = ((NI)0);
	{
		if (!(i_1 < s_p0Len_0)) goto LA3_;
		{
			if (!((NU8)(s_p0[i_1]) == (NU8)(43))) goto LA7_;
			i_1 += ((NI)1);
		}
		goto LA5_;
LA7_: ;
		{
			if (!((NU8)(s_p0[i_1]) == (NU8)(45))) goto LA10_;
			i_1 += ((NI)1);
			sign_1 = IL64(1);
		}
		goto LA5_;
LA10_: ;
LA5_: ;
	}
LA3_: ;
	{
		NIM_BOOL T14_;
		T14_ = (NIM_BOOL)0;
		T14_ = (i_1 < s_p0Len_0);
		if (!(T14_)) goto LA15_;
		T14_ = (((NU8)(s_p0[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0[i_1])) <= ((NU8)(57)));
LA15_: ;
		if (!T14_) goto LA16_;
		(*b_p1) = IL64(0);
		{
			while (1) {
				NIM_BOOL T20_;
				NI c_1;
				T20_ = (NIM_BOOL)0;
				T20_ = (i_1 < s_p0Len_0);
				if (!(T20_)) goto LA21_;
				T20_ = (((NU8)(s_p0[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0[i_1])) <= ((NU8)(57)));
LA21_: ;
				if (!T20_) goto LA19;
				c_1 = (NI)(((NU8)(s_p0[i_1])) - ((NI)48));
				{
					if (!((NI64)((NI64)((IL64(-9223372036854775807) - IL64(1)) + ((NI64) (c_1))) / IL64(10)) <= (*b_p1))) goto LA24_;
					(*b_p1) = (NI64)((NI64)((*b_p1) * IL64(10)) - ((NI64) (c_1)));
				}
				goto LA22_;
LA24_: ;
				{
					integerOutOfRangeError__pureZparseutils_u325();
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA22_: ;
				i_1 += ((NI)1);
				{
					while (1) {
						NIM_BOOL T29_;
						T29_ = (NIM_BOOL)0;
						T29_ = (i_1 < s_p0Len_0);
						if (!(T29_)) goto LA30_;
						T29_ = ((NU8)(s_p0[i_1]) == (NU8)(95));
LA30_: ;
						if (!T29_) goto LA28;
						i_1 += ((NI)1);
					} LA28: ;
				}
			} LA19: ;
		}
		{
			NIM_BOOL T33_;
			T33_ = (NIM_BOOL)0;
			T33_ = (sign_1 == IL64(-1));
			if (!(T33_)) goto LA34_;
			T33_ = ((*b_p1) == (IL64(-9223372036854775807) - IL64(1)));
LA34_: ;
			if (!T33_) goto LA35_;
			integerOutOfRangeError__pureZparseutils_u325();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		goto LA31_;
LA35_: ;
		{
			(*b_p1) = (NI64)((*b_p1) * sign_1);
			result = i_1;
		}
LA31_: ;
	}
	goto LA12_;
LA16_: ;
	{
		result = ((NI)0);
	}
LA12_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, npuParseBiggestInt)(NIM_CHAR* s_p0, NI s_p0Len_0, NI64* number_p1) {
	NI result;
	NI64 res_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	res_1 = IL64(0);
	result = rawParseInt__pureZparseutils_u388(s_p0, s_p0Len_0, (&res_1));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		if (!!((result == ((NI)0)))) goto LA3_;
		(*number_p1) = res_1;
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, npuParseInt)(NIM_CHAR* s_p0, NI s_p0Len_0, NI* number_p1) {
	NI result;
	NI64 res_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	res_1 = IL64(0);
	result = npuParseBiggestInt(s_p0, s_p0Len_0, (&res_1));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		if (!!((result == ((NI)0)))) goto LA3_;
		(*number_p1) = ((NI) (res_1));
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseInt__pureZparseutils_u981)(NimStringV2 s_p0, NI* number_p1, NI start_p2) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = npuParseInt((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, number_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseSaturatedNatural__pureZparseutils_u459)(NIM_CHAR* s_p0, NI s_p0Len_0, NI* b_p1) {
	NI result;
	NI i_1;
	i_1 = ((NI)0);
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (i_1 < s_p0Len_0);
		if (!(T3_)) goto LA4_;
		T3_ = ((NU8)(s_p0[i_1]) == (NU8)(43));
LA4_: ;
		if (!T3_) goto LA5_;
		i_1 += ((NI)1);
	}
LA5_: ;
	{
		NIM_BOOL T9_;
		T9_ = (NIM_BOOL)0;
		T9_ = (i_1 < s_p0Len_0);
		if (!(T9_)) goto LA10_;
		T9_ = (((NU8)(s_p0[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0[i_1])) <= ((NU8)(57)));
LA10_: ;
		if (!T9_) goto LA11_;
		(*b_p1) = ((NI)0);
		{
			while (1) {
				NIM_BOOL T15_;
				NI c_1;
				T15_ = (NIM_BOOL)0;
				T15_ = (i_1 < s_p0Len_0);
				if (!(T15_)) goto LA16_;
				T15_ = (((NU8)(s_p0[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0[i_1])) <= ((NU8)(57)));
LA16_: ;
				if (!T15_) goto LA14;
				c_1 = (NI)(((NU8)(s_p0[i_1])) - ((NI)48));
				{
					if (!((*b_p1) <= (NI)((NI)(((NI)IL64(9223372036854775807)) - c_1) / ((NI)10)))) goto LA19_;
					(*b_p1) = (NI)((NI)((*b_p1) * ((NI)10)) + c_1);
				}
				goto LA17_;
LA19_: ;
				{
					(*b_p1) = ((NI)IL64(9223372036854775807));
				}
LA17_: ;
				i_1 += ((NI)1);
				{
					while (1) {
						NIM_BOOL T24_;
						T24_ = (NIM_BOOL)0;
						T24_ = (i_1 < s_p0Len_0);
						if (!(T24_)) goto LA25_;
						T24_ = ((NU8)(s_p0[i_1]) == (NU8)(95));
LA25_: ;
						if (!T24_) goto LA23;
						i_1 += ((NI)1);
					} LA23: ;
				}
			} LA14: ;
		}
		result = i_1;
	}
	goto LA7_;
LA11_: ;
	{
		result = ((NI)0);
	}
LA7_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseSaturatedNatural__pureZparseutils_u986)(NimStringV2 s_p0, NI* b_p1, NI start_p2) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = parseSaturatedNatural__pureZparseutils_u459((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, b_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, npuParseFloat)(NIM_CHAR* s_p0, NI s_p0Len_0, NF* number_p1) {
	NI result;
	NF bf_1;
	bf_1 = 0.0;
	result = nimParseBiggestFloat(s_p0, s_p0Len_0, (&bf_1));
	{
		if (!!((result == ((NI)0)))) goto LA3_;
		(*number_p1) = bf_1;
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseFloat__pureZparseutils_u1006)(NimStringV2 s_p0, NF* number_p1, NI start_p2) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = npuParseFloat((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, number_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, rawParseUInt__pureZparseutils_u514)(NIM_CHAR* s_p0, NI s_p0Len_0, NU64* b_p1) {
	NI result;
	NU64 res_1;
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	res_1 = 0ULL;
	i_1 = ((NI)0);
	{
		NIM_BOOL T3_;
		NIM_BOOL T4_;
		T3_ = (NIM_BOOL)0;
		T4_ = (NIM_BOOL)0;
		T4_ = (i_1 < (NI)(s_p0Len_0 - ((NI)1)));
		if (!(T4_)) goto LA5_;
		T4_ = ((NU8)(s_p0[i_1]) == (NU8)(45));
LA5_: ;
		T3_ = T4_;
		if (!(T3_)) goto LA6_;
		T3_ = (((NU8)(s_p0[(NI)(i_1 + ((NI)1))])) >= ((NU8)(48)) && ((NU8)(s_p0[(NI)(i_1 + ((NI)1))])) <= ((NU8)(57)));
LA6_: ;
		if (!T3_) goto LA7_;
		integerOutOfRangeError__pureZparseutils_u325();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA7_: ;
	{
		NIM_BOOL T11_;
		T11_ = (NIM_BOOL)0;
		T11_ = (i_1 < s_p0Len_0);
		if (!(T11_)) goto LA12_;
		T11_ = ((NU8)(s_p0[i_1]) == (NU8)(43));
LA12_: ;
		if (!T11_) goto LA13_;
		i_1 += ((NI)1);
	}
LA13_: ;
	{
		NIM_BOOL T17_;
		T17_ = (NIM_BOOL)0;
		T17_ = (i_1 < s_p0Len_0);
		if (!(T17_)) goto LA18_;
		T17_ = (((NU8)(s_p0[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0[i_1])) <= ((NU8)(57)));
LA18_: ;
		if (!T17_) goto LA19_;
		(*b_p1) = 0ULL;
		{
			while (1) {
				NIM_BOOL T23_;
				NU64 prev_1;
				T23_ = (NIM_BOOL)0;
				T23_ = (i_1 < s_p0Len_0);
				if (!(T23_)) goto LA24_;
				T23_ = (((NU8)(s_p0[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0[i_1])) <= ((NU8)(57)));
LA24_: ;
				if (!T23_) goto LA22;
				{
					if (!((NU64)(1844674407370955161ULL) < (NU64)(res_1))) goto LA27_;
					integerOutOfRangeError__pureZparseutils_u325();
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA27_: ;
				res_1 = (NU64)((NU64)(res_1) * (NU64)(10ULL));
				prev_1 = res_1;
				res_1 += ((NU64) ((NI)(((NU8)(s_p0[i_1])) - ((NI)48))));
				{
					if (!((NU64)(res_1) < (NU64)(prev_1))) goto LA31_;
					integerOutOfRangeError__pureZparseutils_u325();
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA31_: ;
				i_1 += ((NI)1);
				{
					while (1) {
						NIM_BOOL T35_;
						T35_ = (NIM_BOOL)0;
						T35_ = (i_1 < s_p0Len_0);
						if (!(T35_)) goto LA36_;
						T35_ = ((NU8)(s_p0[i_1]) == (NU8)(95));
LA36_: ;
						if (!T35_) goto LA34;
						i_1 += ((NI)1);
					} LA34: ;
				}
			} LA22: ;
		}
		(*b_p1) = res_1;
		result = i_1;
	}
	goto LA15_;
LA19_: ;
	{
		result = ((NI)0);
	}
LA15_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, npuParseBiggestUInt)(NIM_CHAR* s_p0, NI s_p0Len_0, NU64* number_p1) {
	NI result;
	NU64 res_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	res_1 = 0ULL;
	result = rawParseUInt__pureZparseutils_u514(s_p0, s_p0Len_0, (&res_1));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		if (!!((result == ((NI)0)))) goto LA3_;
		(*number_p1) = res_1;
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseBiggestUInt__pureZparseutils_u991)(NimStringV2 s_p0, NU64* number_p1, NI start_p2) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = npuParseBiggestUInt((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, number_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseBiggestInt__pureZparseutils_u976)(NimStringV2 s_p0, NI64* number_p1, NI start_p2) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = npuParseBiggestInt((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, number_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	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_u2430(s_p0);
	}
LA5_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, fastSubstr__pureZparseutils_u225)(NIM_CHAR* s_p0, NI s_p0Len_0, NimStringV2* token_p1, NI length_p2) {
	setLengthStrV2((&(*token_p1)), (length_p2));
	{
		NI i_1;
		NI i_2;
		i_1 = (NI)0;
		i_2 = ((NI)0);
		{
			while (1) {
				if (!(i_2 < length_p2)) goto LA3;
				i_1 = i_2;
				nimPrepareStrMutationV2((&(*token_p1)));
				(*token_p1).p->data[i_1] = s_p0[i_1];
				i_2 += ((NI)1);
			} LA3: ;
		}
	}
}
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
	NIM_BOOL result;
	result = NIM_FALSE;
	{
		tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* cell_1;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u805(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
		cell_1 = ((tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A*) (T5_));
		{
			if (!((NI)((*cell_1).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell_1).rc = minuspercent___system_u805((*cell_1).rc, ((NI)16));
		}
LA6_: ;
		rememberCycle__system_u3500(result, cell_1, (*((TNimTypeV2**) (p_p0))));
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZparseutils_u367)(tyObject_ValueError__S29bKZF4TUS33IR7ZXb7fFA* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose(dest_p0);
	}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseBiggestFloat__pureZparseutils_u1001)(NimStringV2 s_p0, NF* number_p1, NI start_p2) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = npuParseFloat((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, number_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseIdent__pureZparseutils_u56)(NIM_CHAR* s_p0, NI s_p0Len_0, NimStringV2* ident_p1) {
	NI result;
	NI i_1;
	i_1 = ((NI)0);
	{
		NIM_BOOL T3_;
		NimStringV2 T11_;
		T3_ = (NIM_BOOL)0;
		T3_ = (i_1 < s_p0Len_0);
		if (!(T3_)) goto LA4_;
		T3_ = (((NU8)(s_p0[i_1])) >= ((NU8)(97)) && ((NU8)(s_p0[i_1])) <= ((NU8)(122)) || ((NU8)(s_p0[i_1])) >= ((NU8)(65)) && ((NU8)(s_p0[i_1])) <= ((NU8)(90)) || ((NU8)(s_p0[i_1])) == ((NU8)(95)));
LA4_: ;
		if (!T3_) goto LA5_;
		i_1 += ((NI)1);
		{
			while (1) {
				NIM_BOOL T9_;
				T9_ = (NIM_BOOL)0;
				T9_ = (i_1 < s_p0Len_0);
				if (!(T9_)) goto LA10_;
				T9_ = (((NU8)(s_p0[i_1])) >= ((NU8)(97)) && ((NU8)(s_p0[i_1])) <= ((NU8)(122)) || ((NU8)(s_p0[i_1])) >= ((NU8)(65)) && ((NU8)(s_p0[i_1])) <= ((NU8)(90)) || ((NU8)(s_p0[i_1])) >= ((NU8)(48)) && ((NU8)(s_p0[i_1])) <= ((NU8)(57)) || ((NU8)(s_p0[i_1])) == ((NU8)(95)));
LA10_: ;
				if (!T9_) goto LA8;
				i_1 += ((NI)1);
			} LA8: ;
		}
		T11_.len = 0; T11_.p = NIM_NIL;
		T11_ = substr__system_u8626((NIM_CHAR*)(s_p0)+(((NI)0)), ((NI)(i_1 - ((NI)1)))-(((NI)0))+1);
		eqsink___system_u2700((&(*ident_p1)), T11_);
		result = i_1;
	}
	goto LA1_;
LA5_: ;
	{
		result = ((NI)0);
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, parseIdent__pureZparseutils_u903)(NimStringV2 s_p0, NimStringV2* ident_p1, NI start_p2) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = parseIdent__pureZparseutils_u56((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p2)) : NIM_NIL), ((s_p0.len-1))-(start_p2)+1, ident_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
