/* 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/@pcompiler@snimlexbase.nim.c.o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@pcompiler@snimlexbase.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 tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA;
typedef struct tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
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 tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA {
	RootObj Sup;
	NI bufpos;
	NCSTRING buf;
	NimStringV2 bufStorage;
	NI bufLen;
	tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ* stream;
	NI lineNumber;
	NI sentinel;
	NI lineStart;
	NI offsetBase;
};
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u95)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2760)(NimStringV2* dest_p0, NimStringV2 src_p1);
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(NCSTRING, nimToCStringConv)(NimStringV2 s_p0);
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_NIMCALL(void, eqcopy___OOZOOZOOZcompilerZllstream_u114)(tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ** dest_p0, tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ* src_p1, NIM_BOOL cyclic_p2);
N_LIB_PRIVATE N_NIMCALL(void, fillBuffer__OOZOOZOOZcompilerZnimlexbase_u45)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0);
static N_INLINE(void, moveMem__system_u1759)(void* dest_p0, void* source_p1, NI size_p2);
static N_INLINE(NIM_BOOL, nimAddInt)(NI a_p0, NI b_p1, NI* res_p2);
N_LIB_PRIVATE N_NIMCALL(NI, llStreamRead__OOZOOZOOZcompilerZllstream_u436)(tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ* s_p0, void* buf_p1, NI bufLen_p2);
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(void, setLengthStrV2)(NimStringV2* s_p0, NI newLen_p1);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, skipUTF8BOM__OOZOOZOOZcompilerZnimlexbase_u126)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0);
N_LIB_PRIVATE N_NIMCALL(NI, fillBaseLexer__OOZOOZOOZcompilerZnimlexbase_u85)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0, NI pos_p1);
N_LIB_PRIVATE N_NIMCALL(void, llStreamClose__OOZOOZOOZcompilerZllstream_u181)(tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ* s_p0);
static const struct {
  NI cap; NIM_CHAR data[36+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_2 = { 36 | NIM_STRLIT_FLAG, "nimlexbase.nim(150, 9) `bufLen > 0` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_3 = {36, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_2};
static const struct {
  NI cap; NIM_CHAR data[46+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_5 = { 46 | NIM_STRLIT_FLAG, "nimlexbase.nim(84, 9) `L.sentinel < L.bufLen` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_6 = {46, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_5};
static const struct {
  NI cap; NIM_CHAR data[36+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_9 = { 36 | NIM_STRLIT_FLAG, "nimlexbase.nim(86, 9) `toCopy >= 0` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_10 = {36, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_9};
static const struct {
  NI cap; NIM_CHAR data[38+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_16 = { 38 | NIM_STRLIT_FLAG, "nimlexbase.nim(99, 13) `s < L.bufLen` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_17 = {38, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_16};
static const struct {
  NI cap; NIM_CHAR data[60+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_21 = { 60 | NIM_STRLIT_FLAG, "nimlexbase.nim(112, 15) `L.bufLen - oldBufLen == oldBufLen` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_22 = {60, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_21};
static const struct {
  NI cap; NIM_CHAR data[42+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_29 = { 42 | NIM_STRLIT_FLAG, "nimlexbase.nim(133, 9) `L.buf[pos] == CR` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_30 = {42, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_29};
static const struct {
  NI cap; NIM_CHAR data[43+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_32 = { 43 | NIM_STRLIT_FLAG, "nimlexbase.nim(122, 9) `pos <= L.sentinel` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_33 = {43, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_32};
static const struct {
  NI cap; NIM_CHAR data[42+1];
} TM__jNFaG9cOzyJSKBcIonhGRGw_37 = { 42 | NIM_STRLIT_FLAG, "nimlexbase.nim(140, 9) `L.buf[pos] == LF` " };
static const NimStringV2 TM__jNFaG9cOzyJSKBcIonhGRGw_38 = {42, (NimStrPayload*)&TM__jNFaG9cOzyJSKBcIonhGRGw_37};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4198;
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;
}
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, moveMem__system_u1759)(void* dest_p0, void* source_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memmove(dest_p0, source_p1, ((size_t) (size_p2)));
}
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(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;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4198);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, fillBuffer__OOZOOZOOZcompilerZnimlexbase_u45)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0) {
	NI charsRead_1;
	NI toCopy_1;
	NI s_1;
	NI oldBufLen_1;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_7;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_8;
	tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ* T14_;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_12;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_13;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	charsRead_1 = (NI)0;
	toCopy_1 = (NI)0;
	s_1 = (NI)0;
	oldBufLen_1 = (NI)0;
	{
		if (!!(((*L_p0).sentinel < (*L_p0).bufLen))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_6);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	if (nimSubInt((*L_p0).bufLen, (*L_p0).sentinel, &TM__jNFaG9cOzyJSKBcIonhGRGw_7)) { raiseOverflow(); goto BeforeRet_;
	};
	if (nimSubInt((NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_7), ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_8)) { raiseOverflow(); goto BeforeRet_;
	};
	toCopy_1 = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_8);
	{
		if (!!((((NI)0) <= toCopy_1))) goto LA7_;
		failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_10);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA7_: ;
	{
		void* T13_;
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_11;
		if (!(((NI)0) < toCopy_1)) goto LA11_;
		T13_ = (void*)0;
		T13_ = ((void*) ((&(*L_p0).buf[((NI)0)])));
		if (nimAddInt((*L_p0).sentinel, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_11)) { raiseOverflow(); goto BeforeRet_;
		};
		if ((toCopy_1) < ((NI)0) || (toCopy_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(toCopy_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
		}
		moveMem__system_u1759(T13_, ((void*) ((&(*L_p0).buf[(NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_11)]))), (toCopy_1));
	}
LA11_: ;
	T14_ = NIM_NIL;
	T14_ = (*L_p0).stream;
	if (nimAddInt((*L_p0).sentinel, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_12)) { raiseOverflow(); goto BeforeRet_;
	};
	charsRead_1 = llStreamRead__OOZOOZOOZcompilerZllstream_u436(T14_, ((void*) ((&(*L_p0).buf[toCopy_1]))), (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_12));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	if (nimAddInt(toCopy_1, charsRead_1, &TM__jNFaG9cOzyJSKBcIonhGRGw_13)) { raiseOverflow(); goto BeforeRet_;
	};
	s_1 = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_13);
	{
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_14;
		if (nimAddInt((*L_p0).sentinel, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_14)) { raiseOverflow(); goto BeforeRet_;
		};
		if (!(charsRead_1 < (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_14))) goto LA17_;
		(*L_p0).buf[s_1] = 0;
		(*L_p0).sentinel = s_1;
	}
	goto LA15_;
LA17_: ;
	{
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_15;
		if (nimSubInt(s_1, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_15)) { raiseOverflow(); goto BeforeRet_;
		};
		s_1 = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_15);
		{
			while (1) {
				{
					if (!!((s_1 < (*L_p0).bufLen))) goto LA24_;
					failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_17);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA24_: ;
				{
					while (1) {
						NIM_BOOL T28_;
						NI TM__jNFaG9cOzyJSKBcIonhGRGw_18;
						T28_ = (NIM_BOOL)0;
						T28_ = (((NI)0) <= s_1);
						if (!(T28_)) goto LA29_;
						T28_ = !((((NU8)((*L_p0).buf[s_1])) == ((NU8)(13)) || ((NU8)((*L_p0).buf[s_1])) == ((NU8)(10))));
LA29_: ;
						if (!T28_) goto LA27;
						if (nimSubInt(s_1, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_18)) { raiseOverflow(); goto BeforeRet_;
						};
						s_1 = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_18);
					} LA27: ;
				}
				{
					if (!(((NI)0) <= s_1)) goto LA32_;
					(*L_p0).sentinel = s_1;
					goto LA20;
				}
				goto LA30_;
LA32_: ;
				{
					NI TM__jNFaG9cOzyJSKBcIonhGRGw_19;
					tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ* T39_;
					NI TM__jNFaG9cOzyJSKBcIonhGRGw_25;
					oldBufLen_1 = (*L_p0).bufLen;
					if (nimMulInt((*L_p0).bufLen, ((NI)2), &TM__jNFaG9cOzyJSKBcIonhGRGw_19)) { raiseOverflow(); goto BeforeRet_;
					};
					(*L_p0).bufLen = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_19);
					if (((*L_p0).bufLen) < ((NI)0) || ((*L_p0).bufLen) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI((*L_p0).bufLen, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
					}
					setLengthStrV2((&(*L_p0).bufStorage), ((*L_p0).bufLen));
					(*L_p0).buf = nimToCStringConv((*L_p0).bufStorage);
					{
						NI TM__jNFaG9cOzyJSKBcIonhGRGw_20;
						if (nimSubInt((*L_p0).bufLen, oldBufLen_1, &TM__jNFaG9cOzyJSKBcIonhGRGw_20)) { raiseOverflow(); goto BeforeRet_;
						};
						if (!!(((NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_20) == oldBufLen_1))) goto LA37_;
						failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_22);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					}
LA37_: ;
					T39_ = NIM_NIL;
					T39_ = (*L_p0).stream;
					charsRead_1 = llStreamRead__OOZOOZOOZcompilerZllstream_u436(T39_, ((void*) ((&(*L_p0).buf[oldBufLen_1]))), oldBufLen_1);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					{
						NI TM__jNFaG9cOzyJSKBcIonhGRGw_23;
						NI TM__jNFaG9cOzyJSKBcIonhGRGw_24;
						if (!(charsRead_1 < oldBufLen_1)) goto LA42_;
						if (nimAddInt(oldBufLen_1, charsRead_1, &TM__jNFaG9cOzyJSKBcIonhGRGw_23)) { raiseOverflow(); goto BeforeRet_;
						};
						(*L_p0).buf[(NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_23)] = 0;
						if (nimAddInt(oldBufLen_1, charsRead_1, &TM__jNFaG9cOzyJSKBcIonhGRGw_24)) { raiseOverflow(); goto BeforeRet_;
						};
						(*L_p0).sentinel = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_24);
						goto LA20;
					}
LA42_: ;
					if (nimSubInt((*L_p0).bufLen, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_25)) { raiseOverflow(); goto BeforeRet_;
					};
					s_1 = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_25);
				}
LA30_: ;
			}
		} LA20: ;
	}
LA15_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, skipUTF8BOM__OOZOOZOOZcompilerZnimlexbase_u126)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0) {
{	{
		NIM_BOOL T3_;
		NIM_BOOL T4_;
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_26;
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_27;
		T3_ = (NIM_BOOL)0;
		T4_ = (NIM_BOOL)0;
		T4_ = ((NU8)((*L_p0).buf[((NI)0)]) == (NU8)(239));
		if (!(T4_)) goto LA5_;
		T4_ = ((NU8)((*L_p0).buf[((NI)1)]) == (NU8)(187));
LA5_: ;
		T3_ = T4_;
		if (!(T3_)) goto LA6_;
		T3_ = ((NU8)((*L_p0).buf[((NI)2)]) == (NU8)(191));
LA6_: ;
		if (!T3_) goto LA7_;
		if (nimAddInt((*L_p0).bufpos, ((NI)3), &TM__jNFaG9cOzyJSKBcIonhGRGw_26)) { raiseOverflow(); goto BeforeRet_;
		};
		(*L_p0).bufpos = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_26);
		if (nimAddInt((*L_p0).lineStart, ((NI)3), &TM__jNFaG9cOzyJSKBcIonhGRGw_27)) { raiseOverflow(); goto BeforeRet_;
		};
		(*L_p0).lineStart = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_27);
	}
LA7_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, openBaseLexer__OOZOOZOOZcompilerZnimlexbase_u25)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0, tyObject_TLLStream__SBuFBW9b2EpSkuka9b9cYZHgQ* inputstream_p1, NI bufLen_p2) {
	NimStringV2 T5_;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_4;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		if (!!((((NI)0) < bufLen_p2))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_3);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	(*L_p0).bufpos = ((NI)0);
	(*L_p0).offsetBase = ((NI)0);
	if ((bufLen_p2) < ((NI)0) || (bufLen_p2) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(bufLen_p2, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	T5_.len = 0; T5_.p = NIM_NIL;
	T5_ = mnewString((bufLen_p2));
	eqsink___system_u2760((&(*L_p0).bufStorage), T5_);
	(*L_p0).buf = nimToCStringConv((*L_p0).bufStorage);
	(*L_p0).bufLen = bufLen_p2;
	if (nimSubInt(bufLen_p2, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_4)) { raiseOverflow(); goto BeforeRet_;
	};
	(*L_p0).sentinel = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_4);
	(*L_p0).lineStart = ((NI)0);
	(*L_p0).lineNumber = ((NI)1);
	eqcopy___OOZOOZOOZcompilerZllstream_u114(&(*L_p0).stream, inputstream_p1, NIM_TRUE);
	fillBuffer__OOZOOZOOZcompilerZnimlexbase_u45(L_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	skipUTF8BOM__OOZOOZOOZcompilerZnimlexbase_u126(L_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NI, getColNumber__OOZOOZOOZcompilerZnimlexbase_u34)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0, NI pos_p1) {
	NI result;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_28;
{	result = (NI)0;
	if (nimSubInt(pos_p1, (*L_p0).lineStart, &TM__jNFaG9cOzyJSKBcIonhGRGw_28)) { raiseOverflow(); goto BeforeRet_;
	};
	if ((NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_28) == (IL64(-9223372036854775807) - IL64(1))){ raiseOverflow(); goto BeforeRet_;
	}
	result = ((NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_28) > 0? ((NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_28)) : -((NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_28)));
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, fillBaseLexer__OOZOOZOOZcompilerZnimlexbase_u85)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0, NI pos_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	{
		if (!!((pos_p1 <= (*L_p0).sentinel))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_33);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	{
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_34;
		if (!(pos_p1 < (*L_p0).sentinel)) goto LA7_;
		if (nimAddInt(pos_p1, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_34)) { raiseOverflow(); goto BeforeRet_;
		};
		result = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_34);
	}
	goto LA5_;
LA7_: ;
	{
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_35;
		NI TM__jNFaG9cOzyJSKBcIonhGRGw_36;
		fillBuffer__OOZOOZOOZcompilerZnimlexbase_u45(L_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (nimAddInt(pos_p1, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_35)) { raiseOverflow(); goto BeforeRet_;
		};
		if (nimAddInt((*L_p0).offsetBase, (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_35), &TM__jNFaG9cOzyJSKBcIonhGRGw_36)) { raiseOverflow(); goto BeforeRet_;
		};
		(*L_p0).offsetBase = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_36);
		(*L_p0).bufpos = ((NI)0);
		result = ((NI)0);
	}
LA5_: ;
	(*L_p0).lineStart = result;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, handleCR__OOZOOZOOZcompilerZnimlexbase_u37)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0, NI pos_p1) {
	NI result;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_31;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	{
		if (!!(((NU8)((*L_p0).buf[pos_p1]) == (NU8)(13)))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_30);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	if (nimAddInt((*L_p0).lineNumber, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_31)) { raiseOverflow(); goto BeforeRet_;
	};
	(*L_p0).lineNumber = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_31);
	result = fillBaseLexer__OOZOOZOOZcompilerZnimlexbase_u85(L_p0, pos_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		if (!((NU8)((*L_p0).buf[result]) == (NU8)(10))) goto LA7_;
		result = fillBaseLexer__OOZOOZOOZcompilerZnimlexbase_u85(L_p0, result);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA7_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, handleLF__OOZOOZOOZcompilerZnimlexbase_u40)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0, NI pos_p1) {
	NI result;
	NI TM__jNFaG9cOzyJSKBcIonhGRGw_39;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	{
		if (!!(((NU8)((*L_p0).buf[pos_p1]) == (NU8)(10)))) goto LA3_;
		failedAssertImpl__stdZassertions_u95(TM__jNFaG9cOzyJSKBcIonhGRGw_38);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	if (nimAddInt((*L_p0).lineNumber, ((NI)1), &TM__jNFaG9cOzyJSKBcIonhGRGw_39)) { raiseOverflow(); goto BeforeRet_;
	};
	(*L_p0).lineNumber = (NI)(TM__jNFaG9cOzyJSKBcIonhGRGw_39);
	result = fillBaseLexer__OOZOOZOOZcompilerZnimlexbase_u85(L_p0, pos_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, closeBaseLexer__OOZOOZOOZcompilerZnimlexbase_u29)(tyObject_TBaseLexer__uGVQu9a9b6vaC8dO9cPA8KdFA* L_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	llStreamClose__OOZOOZOOZcompilerZllstream_u181((*L_p0).stream);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
