/* Generated by Nim Compiler v0.16.0 */
/*   (c) 2017 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, arm, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing -fPIC  -I/build/nim/src/Nim-0.16.0/lib -o lib/nimcache/stdlib_parsecfg.o lib/nimcache/stdlib_parsecfg.c */
#define NIM_INTBITS 32

#include "nimbase.h"
#include <string.h>
#undef linux
typedef struct Cfgparser_w8XFEe9aT1CBajTOt4fsMRA Cfgparser_w8XFEe9aT1CBajTOt4fsMRA;
typedef struct Streamobj_RShkcoDOPnoCVhtpN1hDPQ Streamobj_RShkcoDOPnoCVhtpN1hDPQ;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Baselexer_B6cGbTPhMsqMovc9cOcIHRw Baselexer_B6cGbTPhMsqMovc9cOcIHRw;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Token_yWkcM1ijvGYnxTAxtl3FPw Token_yWkcM1ijvGYnxTAxtl3FPw;
typedef struct Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 TY_nmiMWKVIe46vacnhAFrQvw_Set[32];
typedef NU8 Tnimkind_jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 Tnimtypeflag_v8QUszD1sWlSIWZz7mC4bQ_Set;
typedef N_NIMCALL_PTR(void, TY_ojoeKfW4VYIm36I9cpDTQIg) (void* p0, NI op0);
typedef N_NIMCALL_PTR(void*, TY_WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p0);
struct  TNimType  {
NI size;
Tnimkind_jIBKr1ejBgsfM33Kxw4j7A kind;
Tnimtypeflag_v8QUszD1sWlSIWZz7mC4bQ_Set flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY_ojoeKfW4VYIm36I9cpDTQIg marker;
TY_WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Baselexer_B6cGbTPhMsqMovc9cOcIHRw  {
  TNimObject Sup;
NI bufpos;
NCSTRING buf;
NI buflen;
Streamobj_RShkcoDOPnoCVhtpN1hDPQ* input;
NI linenumber;
NI sentinel;
NI linestart;
TY_nmiMWKVIe46vacnhAFrQvw_Set refillchars;
};
typedef NU8 Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg;
struct  Token_yWkcM1ijvGYnxTAxtl3FPw  {
Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg kind;
NimStringDesc* literal;
};
struct  Cfgparser_w8XFEe9aT1CBajTOt4fsMRA  {
  Baselexer_B6cGbTPhMsqMovc9cOcIHRw Sup;
Token_yWkcM1ijvGYnxTAxtl3FPw tok;
NimStringDesc* filename;
};
typedef NimStringDesc* TY_sMpvt1sOxOJ3LFGulnbeMQ[4];
typedef NU8 Cfgeventkind_f0xwqI11H3rviaTXvjDJug;
struct  Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q  {
  TNimObject Sup;
Cfgeventkind_f0xwqI11H3rviaTXvjDJug kind;
union{
struct {NimStringDesc* section;
} S2;
struct {NimStringDesc* key;
NimStringDesc* value;
} S3;
struct {NimStringDesc* msg;
} S4;
} kindU;
};
typedef NU8 Tnimnodekind_unfNsxrcATrufDZmpBq4HQ;
struct  TNimNode  {
Tnimnodekind_unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef N_NIMCALL_PTR(void, TY_cnkJEp9bna8U6yi9aVW9cAJ0Q) (Streamobj_RShkcoDOPnoCVhtpN1hDPQ* s0);
typedef N_NIMCALL_PTR(NIM_BOOL, TY_KjFcmLOhf4VQvVcyLJWXZw) (Streamobj_RShkcoDOPnoCVhtpN1hDPQ* s0);
typedef N_NIMCALL_PTR(void, TY_jlOYFw9cHausuCbPoWx2iiA) (Streamobj_RShkcoDOPnoCVhtpN1hDPQ* s0, NI pos0);
typedef N_NIMCALL_PTR(NI, TY_Xzm85qBLb9cf9cu8VOfAr8PQ) (Streamobj_RShkcoDOPnoCVhtpN1hDPQ* s0);
typedef N_NIMCALL_PTR(NI, TY_tjaJtoUzLe1BMUbItlcGhQ) (Streamobj_RShkcoDOPnoCVhtpN1hDPQ* s0, void* buffer0, NI buflen0);
typedef N_NIMCALL_PTR(void, TY_b9bsIuILxTLVZHPvJBW187A) (Streamobj_RShkcoDOPnoCVhtpN1hDPQ* s0, void* buffer0, NI buflen0);
struct  Streamobj_RShkcoDOPnoCVhtpN1hDPQ  {
  TNimObject Sup;
TY_cnkJEp9bna8U6yi9aVW9cAJ0Q closeimpl;
TY_KjFcmLOhf4VQvVcyLJWXZw atendimpl;
TY_jlOYFw9cHausuCbPoWx2iiA setpositionimpl;
TY_Xzm85qBLb9cf9cu8VOfAr8PQ getpositionimpl;
TY_tjaJtoUzLe1BMUbItlcGhQ readdataimpl;
TY_tjaJtoUzLe1BMUbItlcGhQ peekdataimpl;
TY_b9bsIuILxTLVZHPvJBW187A writedataimpl;
TY_cnkJEp9bna8U6yi9aVW9cAJ0Q flushimpl;
};
N_LIB_EXPORT N_CDECL(void, npcopen)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Streamobj_RShkcoDOPnoCVhtpN1hDPQ* input0, NimStringDesc* filename0, NI lineoffset0);
N_NIMCALL(void, open_xmgaYJZNnO6QcDtac9bs3Vg)(Baselexer_B6cGbTPhMsqMovc9cOcIHRw* L0, Streamobj_RShkcoDOPnoCVhtpN1hDPQ* input0, NI buflen0, TY_nmiMWKVIe46vacnhAFrQvw_Set refillchars0);
N_NIMCALL(void, unsureAsgnRef)(void** dest0, void* src0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, nimrtl_copyString)(NimStringDesc* src0);
N_LIB_EXPORT N_CDECL(void, npcclose)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0);
N_NIMCALL(void, close_QbedUCk2XwI9c7bbRzXBY0g_2)(Baselexer_B6cGbTPhMsqMovc9cOcIHRw* L0);
N_LIB_EXPORT N_CDECL(NI, npcgetColumn)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0);
N_NIMCALL(NI, getcolnumber_9cj186ckGjLqyndkoW7bBdg)(Baselexer_B6cGbTPhMsqMovc9cOcIHRw* L0, NI pos0);
N_LIB_EXPORT N_CDECL(NI, npcgetLine)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, npcgetFilename)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, npcerrorStr)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NimStringDesc* msg0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr0, NimStringDesc** a0, NI a0Len0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, nimrtl_nimIntToStr)(NI x0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, npcwarningStr)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NimStringDesc* msg0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, npcignoreMsg)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q* e0);
static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0);
static N_INLINE(void, copymem_fPlwH3r9agN9aEHB6yCPMh0wsystem)(void* dest0, void* source0, NI size0);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space0);
N_LIB_EXPORT N_CDECL(void, npcnext)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q* Result);
N_NIMCALL(void, rawgettok_O0TCNNdqmVst7YIKcVHcOQ)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, nimrtl_setLengthStr)(NimStringDesc* s0, NI newlen0);
N_NIMCALL(void, skip_AhN1A1FuhHZh69aN9cg2Os9cA)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0);
N_NIMCALL(NI, handlecrlf_aTSjoKixs63H4oDAFX9bRHQ)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NI pos0);
N_NIMCALL(NI, handlecr_IwUEvMBOLRY9cqyar6XKEaw)(Baselexer_B6cGbTPhMsqMovc9cOcIHRw* L0, NI pos0);
N_NIMCALL(NI, handlelf_IwUEvMBOLRY9cqyar6XKEaw_3)(Baselexer_B6cGbTPhMsqMovc9cOcIHRw* L0, NI pos0);
N_NIMCALL(void, getstring_kPdxas01T9chtV9cOXL7akew)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0, NIM_BOOL rawmode0);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s0, NIM_CHAR c0);
N_LIB_EXPORT N_CDECL(NimStringDesc*, nimrtl_resizeString)(NimStringDesc* dest0, NI addlen0);
N_NIMCALL(void, getescapedchar_oP5V5zBaqBvjlLHmM9aR5HQ)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0);
N_NIMCALL(void, handlehexchar_3y12hqri4JTyxotOKMYUTw)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NI* xi0);
N_NIMCALL(void, handledecchars_3y12hqri4JTyxotOKMYUTw_2)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NI* xi0);
N_NIMCALL(void, getsymbol_oP5V5zBaqBvjlLHmM9aR5HQ_2)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0);
N_NIMCALL(void, getkeyvalpair_wU9bLoPwmfHqL352Lwkk0kA)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Cfgeventkind_f0xwqI11H3rviaTXvjDJug kind0, Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q* Result);
N_NIMCALL(void, genericReset)(void* dest0, TNimType* mt0);
N_NOINLINE(void, chckNil)(void* p0);
extern TNimType NTI_13RNkKqUOX1TtorOUlKtqA;
TNimType NTI_IQQt9ctNcwhKRKuCzK6Mm3Q;
TNimType NTI_f0xwqI11H3rviaTXvjDJug;
extern TNimType NTI_77mFvmsOLKik79ci2hXkHEg;
static NIM_CONST TY_nmiMWKVIe46vacnhAFrQvw_Set T_M7YvT9b1Jc1B2TU2FUEf9cHQ_2 = {
0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_3, "", 0);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_4, "$1($2, $3) Error: $4", 20);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_5, "$1($2, $3) Warning: $4", 22);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_6, "section ignored: ", 17);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_7, "key ignored: ", 13);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_8, "command ignored: ", 17);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_9, ": ", 2);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_10, "=", 1);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_11, "--", 2);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_12, ":", 1);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_13, "\012", 1);
static NIM_CONST TY_nmiMWKVIe46vacnhAFrQvw_Set T_M7YvT9b1Jc1B2TU2FUEf9cHQ_14 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03,
0xFE, 0xFF, 0xFF, 0x97, 0xFE, 0xFF, 0xFF, 0x07,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
;
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_15, "]", 1);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_16, "[EOF]", 5);
TNimNode* NimDT__IQQt9ctNcwhKRKuCzK6Mm3Q_kind[6];
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_21, "symbol expected, but found: ", 28);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_22, "\']\' expected, but found: ", 25);
STRING_LITERAL(T_M7YvT9b1Jc1B2TU2FUEf9cHQ_23, "invalid token: ", 15);

N_LIB_EXPORT N_CDECL(void, npcopen)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Streamobj_RShkcoDOPnoCVhtpN1hDPQ* input0, NimStringDesc* filename0, NI lineoffset0) {
	Baselexer_B6cGbTPhMsqMovc9cOcIHRw* LOC1;
	LOC1 = (Baselexer_B6cGbTPhMsqMovc9cOcIHRw*)0;
	LOC1 = &c0->Sup;
	open_xmgaYJZNnO6QcDtac9bs3Vg(LOC1, input0, ((NI) 8192), T_M7YvT9b1Jc1B2TU2FUEf9cHQ_2);
	unsureAsgnRef((void**) (&(*c0).filename), nimrtl_copyString(filename0));
	(*c0).tok.kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 0);
	unsureAsgnRef((void**) (&(*c0).tok.literal), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_3)));
	(*c0).Sup.linenumber += lineoffset0;
	rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
}

N_LIB_EXPORT N_CDECL(void, npcclose)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0) {
	Baselexer_B6cGbTPhMsqMovc9cOcIHRw* LOC1;
	LOC1 = (Baselexer_B6cGbTPhMsqMovc9cOcIHRw*)0;
	LOC1 = &c0->Sup;
	close_QbedUCk2XwI9c7bbRzXBY0g_2(LOC1);
}

N_LIB_EXPORT N_CDECL(NI, npcgetColumn)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0) {
	NI result0;
	result0 = (NI)0;
	result0 = getcolnumber_9cj186ckGjLqyndkoW7bBdg((&(*c0).Sup), (*c0).Sup.bufpos);
	return result0;
}

N_LIB_EXPORT N_CDECL(NI, npcgetLine)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0) {
	NI result0;
	result0 = (NI)0;
	result0 = (*c0).Sup.linenumber;
	return result0;
}

N_LIB_EXPORT N_CDECL(NimStringDesc*, npcgetFilename)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = nimrtl_copyString((*c0).filename);
	return result0;
}

N_LIB_EXPORT N_CDECL(NimStringDesc*, npcerrorStr)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NimStringDesc* msg0) {
	NimStringDesc* result0;
	TY_sMpvt1sOxOJ3LFGulnbeMQ LOC1;
	NI LOC2;
	NI LOC3;
	result0 = (NimStringDesc*)0;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = nimrtl_copyString((*c0).filename);
	LOC2 = (NI)0;
	LOC2 = npcgetLine(c0);
	LOC1[1] = nimrtl_nimIntToStr(LOC2);
	LOC3 = (NI)0;
	LOC3 = npcgetColumn(c0);
	LOC1[2] = nimrtl_nimIntToStr(LOC3);
	LOC1[3] = nimrtl_copyString(msg0);
	result0 = nsuFormatOpenArray(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_4), LOC1, 4);
	return result0;
}

N_LIB_EXPORT N_CDECL(NimStringDesc*, npcwarningStr)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NimStringDesc* msg0) {
	NimStringDesc* result0;
	TY_sMpvt1sOxOJ3LFGulnbeMQ LOC1;
	NI LOC2;
	NI LOC3;
	result0 = (NimStringDesc*)0;
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = nimrtl_copyString((*c0).filename);
	LOC2 = (NI)0;
	LOC2 = npcgetLine(c0);
	LOC1[1] = nimrtl_nimIntToStr(LOC2);
	LOC3 = (NI)0;
	LOC3 = npcgetColumn(c0);
	LOC1[2] = nimrtl_nimIntToStr(LOC3);
	LOC1[3] = nimrtl_copyString(msg0);
	result0 = nsuFormatOpenArray(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_5), LOC1, 4);
	return result0;
}

static N_INLINE(void, copymem_fPlwH3r9agN9aEHB6yCPMh0wsystem)(void* dest0, void* source0, NI size0) {
	void* LOC1;
	LOC1 = (void*)0;
	LOC1 = memcpy(dest0, source0, ((size_t) (size0)));
}

static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0) {
	copymem_fPlwH3r9agN9aEHB6yCPMh0wsystem(((void*) ((&(*dest0).data[((*dest0).Sup.len)- 0]))), ((void*) ((*src0).data)), ((NI) ((NI)((*src0).Sup.len + ((NI) 1)))));
	(*dest0).Sup.len += (*src0).Sup.len;
}

N_LIB_EXPORT N_CDECL(NimStringDesc*, npcignoreMsg)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q* e0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	switch ((*e0).kind) {
	case ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 1):
	{
		NimStringDesc* LOC2;
		LOC2 = (NimStringDesc*)0;
		LOC2 = rawNewString((*e0).kindU.S2.section->Sup.len + 17);
appendString(LOC2, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_6));
appendString(LOC2, (*e0).kindU.S2.section);
		result0 = npcwarningStr(c0, LOC2);
	}
	break;
	case ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 2):
	{
		NimStringDesc* LOC4;
		LOC4 = (NimStringDesc*)0;
		LOC4 = rawNewString((*e0).kindU.S3.key->Sup.len + 13);
appendString(LOC4, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_7));
appendString(LOC4, (*e0).kindU.S3.key);
		result0 = npcwarningStr(c0, LOC4);
	}
	break;
	case ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 3):
	{
		NimStringDesc* LOC6;
		LOC6 = (NimStringDesc*)0;
		LOC6 = rawNewString((*e0).kindU.S3.key->Sup.len + (*e0).kindU.S3.value->Sup.len + 19);
appendString(LOC6, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_8));
appendString(LOC6, (*e0).kindU.S3.key);
appendString(LOC6, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_9));
appendString(LOC6, (*e0).kindU.S3.value);
		result0 = npcwarningStr(c0, LOC6);
	}
	break;
	case ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 4):
	{
		result0 = nimrtl_copyString((*e0).kindU.S4.msg);
	}
	break;
	case ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 0):
	{
		result0 = nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_3));
	}
	break;
	}
	return result0;
}

N_NIMCALL(NI, handlecrlf_aTSjoKixs63H4oDAFX9bRHQ)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NI pos0) {
	NI result0;
	result0 = (NI)0;
	switch (((NU8)((*c0).Sup.buf[pos0]))) {
	case 13:
	{
		Baselexer_B6cGbTPhMsqMovc9cOcIHRw* LOC2;
		LOC2 = (Baselexer_B6cGbTPhMsqMovc9cOcIHRw*)0;
		LOC2 = &c0->Sup;
		result0 = handlecr_IwUEvMBOLRY9cqyar6XKEaw(LOC2, pos0);
	}
	break;
	case 10:
	{
		Baselexer_B6cGbTPhMsqMovc9cOcIHRw* LOC4;
		LOC4 = (Baselexer_B6cGbTPhMsqMovc9cOcIHRw*)0;
		LOC4 = &c0->Sup;
		result0 = handlelf_IwUEvMBOLRY9cqyar6XKEaw_3(LOC4, pos0);
	}
	break;
	default:
	{
		result0 = pos0;
	}
	break;
	}
	return result0;
}

N_NIMCALL(void, skip_AhN1A1FuhHZh69aN9cg2Os9cA)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0) {
	NI pos0;
	NCSTRING buf0;
	pos0 = (*c0).Sup.bufpos;
	buf0 = (*c0).Sup.buf;
	{
		while (1) {
			switch (((NU8)(buf0[pos0]))) {
			case 32:
			case 9:
			{
				pos0 += ((NI) 1);
			}
			break;
			case 35:
			case 59:
			{
				{
					while (1) {
						if (!!((((NU8)(buf0[pos0])) == ((NU8)(13)) || ((NU8)(buf0[pos0])) == ((NU8)(10)) || ((NU8)(buf0[pos0])) == ((NU8)(0))))) goto LA6;
						pos0 += ((NI) 1);
					} LA6: ;
				}
			}
			break;
			case 13:
			case 10:
			{
				pos0 = handlecrlf_aTSjoKixs63H4oDAFX9bRHQ(c0, pos0);
				buf0 = (*c0).Sup.buf;
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
	(*c0).Sup.bufpos = pos0;
}

N_NIMCALL(void, handlehexchar_3y12hqri4JTyxotOKMYUTw)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NI* xi0) {
	switch (((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos]))) {
	case 48 ... 57:
	{
		(*xi0) = (NI)((NI)((NU32)((*xi0)) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) (((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos])))) - ((NI) 48)))));
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 97 ... 102:
	{
		(*xi0) = (NI)((NI)((NU32)((*xi0)) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos])))) - ((NI) 97)))) + ((NI) 10)))));
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 65 ... 70:
	{
		(*xi0) = (NI)((NI)((NU32)((*xi0)) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos])))) - ((NI) 65)))) + ((NI) 10)))));
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(void, handledecchars_3y12hqri4JTyxotOKMYUTw_2)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, NI* xi0) {
	{
		while (1) {
			if (!(((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos])) >= ((NU8)(48)) && ((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos])) <= ((NU8)(57)))) goto LA2;
			(*xi0) = (NI)((NI)((*xi0) * ((NI) 10)) + ((NI) ((NI)(((NI) (((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos])))) - ((NI) 48)))));
			(*c0).Sup.bufpos += ((NI) 1);
		} LA2: ;
	}
}

N_NIMCALL(void, getescapedchar_oP5V5zBaqBvjlLHmM9aR5HQ)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0) {
	(*c0).Sup.bufpos += ((NI) 1);
	switch (((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos]))) {
	case 110:
	case 78:
	{
		(*tok0).literal = nimrtl_resizeString((*tok0).literal, 1);
appendString((*tok0).literal, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_13));
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 114:
	case 82:
	case 99:
	case 67:
	{
		(*tok0).literal = addChar((*tok0).literal, 13);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 108:
	case 76:
	{
		(*tok0).literal = addChar((*tok0).literal, 10);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 102:
	case 70:
	{
		(*tok0).literal = addChar((*tok0).literal, 12);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 101:
	case 69:
	{
		(*tok0).literal = addChar((*tok0).literal, 27);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 97:
	case 65:
	{
		(*tok0).literal = addChar((*tok0).literal, 7);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 98:
	case 66:
	{
		(*tok0).literal = addChar((*tok0).literal, 8);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 118:
	case 86:
	{
		(*tok0).literal = addChar((*tok0).literal, 11);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 116:
	case 84:
	{
		(*tok0).literal = addChar((*tok0).literal, 9);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 39:
	case 34:
	{
		(*tok0).literal = addChar((*tok0).literal, (*c0).Sup.buf[(*c0).Sup.bufpos]);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 92:
	{
		(*tok0).literal = addChar((*tok0).literal, 92);
		(*c0).Sup.bufpos += ((NI) 1);
	}
	break;
	case 120:
	case 88:
	{
		NI xi0;
		(*c0).Sup.bufpos += ((NI) 1);
		xi0 = ((NI) 0);
		handlehexchar_3y12hqri4JTyxotOKMYUTw(c0, (&xi0));
		handlehexchar_3y12hqri4JTyxotOKMYUTw(c0, (&xi0));
		(*tok0).literal = addChar((*tok0).literal, ((NIM_CHAR) (((NI) (xi0)))));
	}
	break;
	case 48 ... 57:
	{
		NI xi0;
		xi0 = ((NI) 0);
		handledecchars_3y12hqri4JTyxotOKMYUTw_2(c0, (&xi0));
		{
			if (!(xi0 <= ((NI) 255))) goto LA16;
			(*tok0).literal = addChar((*tok0).literal, ((NIM_CHAR) (((NI) (xi0)))));
		}
		goto LA14;
		LA16: ;
		{
			(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 0);
		}
		LA14: ;
	}
	break;
	default:
	{
		(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 0);
	}
	break;
	}
}

N_NIMCALL(void, getstring_kPdxas01T9chtV9cOXL7akew)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0, NIM_BOOL rawmode0) {
	NI pos0;
	NCSTRING buf0;
	pos0 = (NI)((*c0).Sup.bufpos + ((NI) 1));
	buf0 = (*c0).Sup.buf;
	(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 2);
	{
		NIM_BOOL LOC3;
		LOC3 = (NIM_BOOL)0;
		LOC3 = ((NU8)(buf0[pos0]) == (NU8)(34));
		if (!(LOC3)) goto LA4;
		LOC3 = ((NU8)(buf0[(NI)(pos0 + ((NI) 1))]) == (NU8)(34));
		LA4: ;
		if (!LOC3) goto LA5;
		pos0 += ((NI) 2);
		pos0 = handlecrlf_aTSjoKixs63H4oDAFX9bRHQ(c0, pos0);
		buf0 = (*c0).Sup.buf;
		{
			while (1) {
				switch (((NU8)(buf0[pos0]))) {
				case 34:
				{
					{
						NIM_BOOL LOC12;
						LOC12 = (NIM_BOOL)0;
						LOC12 = ((NU8)(buf0[(NI)(pos0 + ((NI) 1))]) == (NU8)(34));
						if (!(LOC12)) goto LA13;
						LOC12 = ((NU8)(buf0[(NI)(pos0 + ((NI) 2))]) == (NU8)(34));
						LA13: ;
						if (!LOC12) goto LA14;
						goto LA7;
					}
					LA14: ;
					(*tok0).literal = addChar((*tok0).literal, 34);
					pos0 += ((NI) 1);
				}
				break;
				case 13:
				case 10:
				{
					pos0 = handlecrlf_aTSjoKixs63H4oDAFX9bRHQ(c0, pos0);
					buf0 = (*c0).Sup.buf;
					(*tok0).literal = nimrtl_resizeString((*tok0).literal, 1);
appendString((*tok0).literal, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_13));
				}
				break;
				case 0:
				{
					(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 0);
					goto LA7;
				}
				break;
				default:
				{
					(*tok0).literal = addChar((*tok0).literal, buf0[pos0]);
					pos0 += ((NI) 1);
				}
				break;
				}
			}
		} LA7: ;
		(*c0).Sup.bufpos = (NI)(pos0 + ((NI) 3));
	}
	goto LA1;
	LA5: ;
	{
		{
			while (1) {
				NIM_CHAR ch0;
				ch0 = buf0[pos0];
				{
					if (!((NU8)(ch0) == (NU8)(34))) goto LA24;
					pos0 += ((NI) 1);
					goto LA20;
				}
				LA24: ;
				{
					if (!(((NU8)(ch0)) == ((NU8)(13)) || ((NU8)(ch0)) == ((NU8)(10)) || ((NU8)(ch0)) == ((NU8)(0)))) goto LA28;
					(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 0);
					goto LA20;
				}
				LA28: ;
				{
					NIM_BOOL LOC32;
					LOC32 = (NIM_BOOL)0;
					LOC32 = ((NU8)(ch0) == (NU8)(92));
					if (!(LOC32)) goto LA33;
					LOC32 = !(rawmode0);
					LA33: ;
					if (!LOC32) goto LA34;
					(*c0).Sup.bufpos = pos0;
					getescapedchar_oP5V5zBaqBvjlLHmM9aR5HQ(c0, tok0);
					pos0 = (*c0).Sup.bufpos;
				}
				goto LA30;
				LA34: ;
				{
					(*tok0).literal = addChar((*tok0).literal, ch0);
					pos0 += ((NI) 1);
				}
				LA30: ;
			}
		} LA20: ;
		(*c0).Sup.bufpos = pos0;
	}
	LA1: ;
}

N_NIMCALL(void, getsymbol_oP5V5zBaqBvjlLHmM9aR5HQ_2)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0) {
	NI pos0;
	NCSTRING buf0;
	pos0 = (*c0).Sup.bufpos;
	buf0 = (*c0).Sup.buf;
	{
		while (1) {
			(*tok0).literal = addChar((*tok0).literal, buf0[pos0]);
			pos0 += ((NI) 1);
			{
				if (!!(((T_M7YvT9b1Jc1B2TU2FUEf9cHQ_14[(NU)(((NU8)(buf0[pos0])))>>3] &(1U<<((NU)(((NU8)(buf0[pos0])))&7U)))!=0))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	(*c0).Sup.bufpos = pos0;
	(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 2);
}

N_NIMCALL(void, rawgettok_O0TCNNdqmVst7YIKcVHcOQ)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Token_yWkcM1ijvGYnxTAxtl3FPw* tok0) {
	(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 0);
	(*tok0).literal = nimrtl_setLengthStr((*tok0).literal, ((NI) 0));
	skip_AhN1A1FuhHZh69aN9cg2Os9cA(c0);
	switch (((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos]))) {
	case 61:
	{
		(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 3);
		(*c0).Sup.bufpos += ((NI) 1);
		unsureAsgnRef((void**) (&(*tok0).literal), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_10)));
	}
	break;
	case 45:
	{
		(*c0).Sup.bufpos += ((NI) 1);
		{
			if (!((NU8)((*c0).Sup.buf[(*c0).Sup.bufpos]) == (NU8)(45))) goto LA5;
			(*c0).Sup.bufpos += ((NI) 1);
		}
		LA5: ;
		(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 7);
		unsureAsgnRef((void**) (&(*tok0).literal), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_11)));
	}
	break;
	case 58:
	{
		(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 4);
		(*c0).Sup.bufpos += ((NI) 1);
		unsureAsgnRef((void**) (&(*tok0).literal), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_12)));
	}
	break;
	case 114:
	case 82:
	{
		{
			if (!((NU8)((*c0).Sup.buf[(NI)((*c0).Sup.bufpos + ((NI) 1))]) == (NU8)(34))) goto LA11;
			(*c0).Sup.bufpos += ((NI) 1);
			getstring_kPdxas01T9chtV9cOXL7akew(c0, tok0, NIM_TRUE);
		}
		goto LA9;
		LA11: ;
		{
			getsymbol_oP5V5zBaqBvjlLHmM9aR5HQ_2(c0, tok0);
		}
		LA9: ;
	}
	break;
	case 91:
	{
		(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 5);
		(*c0).Sup.bufpos += ((NI) 1);
		unsureAsgnRef((void**) (&(*tok0).literal), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_15)));
	}
	break;
	case 93:
	{
		(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 6);
		(*c0).Sup.bufpos += ((NI) 1);
		unsureAsgnRef((void**) (&(*tok0).literal), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_15)));
	}
	break;
	case 34:
	{
		getstring_kPdxas01T9chtV9cOXL7akew(c0, tok0, NIM_FALSE);
	}
	break;
	case 0:
	{
		(*tok0).kind = ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 1);
		unsureAsgnRef((void**) (&(*tok0).literal), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_16)));
	}
	break;
	default:
	{
		getsymbol_oP5V5zBaqBvjlLHmM9aR5HQ_2(c0, tok0);
	}
	break;
	}
}

N_NIMCALL(void, getkeyvalpair_wU9bLoPwmfHqL352Lwkk0kA)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Cfgeventkind_f0xwqI11H3rviaTXvjDJug kind0, Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q* Result) {
	{
		if (!((*c0).tok.kind == ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 2))) goto LA3;
		(*Result).kind = kind0;
		unsureAsgnRef((void**) (&(*Result).kindU.S3.key), nimrtl_copyString((*c0).tok.literal));
		unsureAsgnRef((void**) (&(*Result).kindU.S3.value), nimrtl_copyString(((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_3)));
		rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
		{
			if (!((24 &(1U<<((NU)((*c0).tok.kind)&7U)))!=0)) goto LA7;
			rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
			{
				if (!((*c0).tok.kind == ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 2))) goto LA11;
				unsureAsgnRef((void**) (&(*Result).kindU.S3.value), nimrtl_copyString((*c0).tok.literal));
			}
			goto LA9;
			LA11: ;
			{
				NimStringDesc* LOC14;
				genericReset((void*)Result, (&NTI_IQQt9ctNcwhKRKuCzK6Mm3Q));
				(*Result).kind = ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 4);
				LOC14 = (NimStringDesc*)0;
				LOC14 = rawNewString((*c0).tok.literal->Sup.len + 28);
appendString(LOC14, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_21));
appendString(LOC14, (*c0).tok.literal);
				unsureAsgnRef((void**) (&(*Result).kindU.S4.msg), npcerrorStr((&(*c0)), LOC14));
			}
			LA9: ;
			rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC16;
		(*Result).kind = ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 4);
		LOC16 = (NimStringDesc*)0;
		LOC16 = rawNewString((*c0).tok.literal->Sup.len + 28);
appendString(LOC16, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_21));
appendString(LOC16, (*c0).tok.literal);
		unsureAsgnRef((void**) (&(*Result).kindU.S4.msg), npcerrorStr((&(*c0)), LOC16));
		rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
	}
	LA1: ;
}

N_LIB_EXPORT N_CDECL(void, npcnext)(Cfgparser_w8XFEe9aT1CBajTOt4fsMRA* c0, Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q* Result) {
	switch ((*c0).tok.kind) {
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 1):
	{
		(*Result).kind = ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 0);
	}
	break;
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 7):
	{
		rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
		chckNil((void*)Result);
		genericReset((void*)Result, (&NTI_IQQt9ctNcwhKRKuCzK6Mm3Q));
		(*Result).Sup.m_type = (&NTI_IQQt9ctNcwhKRKuCzK6Mm3Q);
		getkeyvalpair_wU9bLoPwmfHqL352Lwkk0kA(c0, ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 3), Result);
	}
	break;
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 2):
	{
		chckNil((void*)Result);
		genericReset((void*)Result, (&NTI_IQQt9ctNcwhKRKuCzK6Mm3Q));
		(*Result).Sup.m_type = (&NTI_IQQt9ctNcwhKRKuCzK6Mm3Q);
		getkeyvalpair_wU9bLoPwmfHqL352Lwkk0kA(c0, ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 2), Result);
	}
	break;
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 5):
	{
		rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
		{
			if (!((*c0).tok.kind == ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 2))) goto LA7;
			(*Result).kind = ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 1);
			unsureAsgnRef((void**) (&(*Result).kindU.S2.section), nimrtl_copyString((*c0).tok.literal));
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* LOC10;
			(*Result).kind = ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 4);
			LOC10 = (NimStringDesc*)0;
			LOC10 = rawNewString((*c0).tok.literal->Sup.len + 28);
appendString(LOC10, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_21));
appendString(LOC10, (*c0).tok.literal);
			unsureAsgnRef((void**) (&(*Result).kindU.S4.msg), npcerrorStr((&(*c0)), LOC10));
		}
		LA5: ;
		rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
		{
			if (!((*c0).tok.kind == ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 6))) goto LA13;
			rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
		}
		goto LA11;
		LA13: ;
		{
			NimStringDesc* LOC16;
			genericReset((void*)Result, (&NTI_IQQt9ctNcwhKRKuCzK6Mm3Q));
			(*Result).kind = ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 4);
			LOC16 = (NimStringDesc*)0;
			LOC16 = rawNewString((*c0).tok.literal->Sup.len + 25);
appendString(LOC16, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_22));
appendString(LOC16, (*c0).tok.literal);
			unsureAsgnRef((void**) (&(*Result).kindU.S4.msg), npcerrorStr((&(*c0)), LOC16));
		}
		LA11: ;
	}
	break;
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 0):
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 3):
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 4):
	case ((Tokkind_PvpTf9b5cBhdKx1DK5Ed3dg) 6):
	{
		NimStringDesc* LOC18;
		(*Result).kind = ((Cfgeventkind_f0xwqI11H3rviaTXvjDJug) 4);
		LOC18 = (NimStringDesc*)0;
		LOC18 = rawNewString((*c0).tok.literal->Sup.len + 15);
appendString(LOC18, ((NimStringDesc*) &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_23));
appendString(LOC18, (*c0).tok.literal);
		unsureAsgnRef((void**) (&(*Result).kindU.S4.msg), npcerrorStr((&(*c0)), LOC18));
		rawgettok_O0TCNNdqmVst7YIKcVHcOQ(c0, (&(*c0).tok));
	}
	break;
	}
}
NIM_EXTERNC N_NOINLINE(void, stdlib_parsecfgInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_parsecfgDatInit000)(void) {
static TNimNode* T_M7YvT9b1Jc1B2TU2FUEf9cHQ_17[5];
NI T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19;
static char* NIM_CONST T_M7YvT9b1Jc1B2TU2FUEf9cHQ_18[5] = {
"cfgEof", 
"cfgSectionStart", 
"cfgKeyValuePair", 
"cfgOption", 
"cfgError"};
static TNimNode* T_M7YvT9b1Jc1B2TU2FUEf9cHQ_20[2];
static TNimNode T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[13];
NTI_IQQt9ctNcwhKRKuCzK6Mm3Q.size = sizeof(Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q);
NTI_IQQt9ctNcwhKRKuCzK6Mm3Q.kind = 17;
NTI_IQQt9ctNcwhKRKuCzK6Mm3Q.base = (&NTI_13RNkKqUOX1TtorOUlKtqA);
NTI_f0xwqI11H3rviaTXvjDJug.size = sizeof(Cfgeventkind_f0xwqI11H3rviaTXvjDJug);
NTI_f0xwqI11H3rviaTXvjDJug.kind = 14;
NTI_f0xwqI11H3rviaTXvjDJug.base = 0;
NTI_f0xwqI11H3rviaTXvjDJug.flags = 3;
for (T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19 = 0; T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19 < 5; T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19++) {
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19+1].kind = 1;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19+1].offset = T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19+1].name = T_M7YvT9b1Jc1B2TU2FUEf9cHQ_18[T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_17[T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[T_M7YvT9b1Jc1B2TU2FUEf9cHQ_19+1];
}
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[6].len = 5; T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[6].kind = 2; T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[6].sons = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_17[0];
NTI_f0xwqI11H3rviaTXvjDJug.node = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[6];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[0].kind = 3;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[0].offset = offsetof(Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q, kind);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[0].typ = (&NTI_f0xwqI11H3rviaTXvjDJug);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[0].name = "kind";
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[0].sons = &NimDT__IQQt9ctNcwhKRKuCzK6Mm3Q_kind[0];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[0].len = 5;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[7].len = 0; T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[7].kind = 2;
NimDT__IQQt9ctNcwhKRKuCzK6Mm3Q_kind[0] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[7];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[8].kind = 1;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[8].offset = offsetof(Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q, kindU.S2.section);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[8].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[8].name = "section";
NimDT__IQQt9ctNcwhKRKuCzK6Mm3Q_kind[1] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[8];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_20[0] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[10];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[10].kind = 1;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[10].offset = offsetof(Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q, kindU.S3.key);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[10].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[10].name = "key";
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_20[1] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[11];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[11].kind = 1;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[11].offset = offsetof(Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q, kindU.S3.value);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[11].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[11].name = "value";
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[9].len = 2; T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[9].kind = 2; T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[9].sons = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_20[0];
NimDT__IQQt9ctNcwhKRKuCzK6Mm3Q_kind[2] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[9];
NimDT__IQQt9ctNcwhKRKuCzK6Mm3Q_kind[3] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[9];
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[12].kind = 1;
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[12].offset = offsetof(Cfgevent_IQQt9ctNcwhKRKuCzK6Mm3Q, kindU.S4.msg);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[12].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg);
T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[12].name = "msg";
NimDT__IQQt9ctNcwhKRKuCzK6Mm3Q_kind[4] = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[12];
NTI_IQQt9ctNcwhKRKuCzK6Mm3Q.node = &T_M7YvT9b1Jc1B2TU2FUEf9cHQ_0[0];
}

