/* Generated by Nim Compiler v2.2.4 */
#define NIM_INTBITS 32

#include "nimbase.h"
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ;
typedef struct tyObject_TContext__4jZ5gUwIaqnMfIYix46Hpw tyObject_TContext__4jZ5gUwIaqnMfIYix46Hpw;
typedef struct tyObject_IdentCachecolonObjectType___ieLwK4T49bbUIZTTVH9cycZA tyObject_IdentCachecolonObjectType___ieLwK4T49bbUIZTTVH9cycZA;
typedef struct tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg;
typedef struct tyTuple__j9a5nRScDLnKB8asy2NhbAQ tyTuple__j9a5nRScDLnKB8asy2NhbAQ;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef N_NIMCALL_PTR(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ*, tyProc__1nD4dBuhjTAOzMZJo9bmgog) (tyObject_TContext__4jZ5gUwIaqnMfIYix46Hpw* c_p0, tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p1);
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct tyTuple__j9a5nRScDLnKB8asy2NhbAQ {
	NimStringV2 Field0;
	NimStringV2 Field1;
	NimStringV2 Field2;
	tyProc__1nD4dBuhjTAOzMZJo9bmgog Field3;
};
typedef tyTuple__j9a5nRScDLnKB8asy2NhbAQ tyArray__2iRiyfbNXU2A0lFlQFYedQ[2];
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__systemZmemory_u7)(void* a_p0, int v_p1, NI size_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ*, iterToProcImpl__pluginsZitersgen_u7)(tyObject_TContext__4jZ5gUwIaqnMfIYix46Hpw* c_p0, tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ*, semLocals__pluginsZlocals_u7)(tyObject_TContext__4jZ5gUwIaqnMfIYix46Hpw* c_p0, tyObject_TNode__eTSqWXWVL7LuzmZf0c6unQ* n_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, pluginMatches__pluginsupport_u18)(tyObject_IdentCachecolonObjectType___ieLwK4T49bbUIZTTVH9cycZA* ic_p0, tyTuple__j9a5nRScDLnKB8asy2NhbAQ* p_p1, tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* s_p2);
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__UiphbyIkFgNr76Jpl4n42w_2 = { 6 | NIM_STRLIT_FLAG, "stdlib" };
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__UiphbyIkFgNr76Jpl4n42w_3 = { 6 | NIM_STRLIT_FLAG, "system" };
static const struct {
  NI cap; NIM_CHAR data[10+1];
} TM__UiphbyIkFgNr76Jpl4n42w_4 = { 10 | NIM_STRLIT_FLAG, "iterToProc" };
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__UiphbyIkFgNr76Jpl4n42w_5 = { 6 | NIM_STRLIT_FLAG, "locals" };
N_LIB_PRIVATE NIM_CONST tyArray__2iRiyfbNXU2A0lFlQFYedQ plugins__pluginsZactive_u6 = {{{6, (NimStrPayload*)&TM__UiphbyIkFgNr76Jpl4n42w_2},
{6, (NimStrPayload*)&TM__UiphbyIkFgNr76Jpl4n42w_3},
{10, (NimStrPayload*)&TM__UiphbyIkFgNr76Jpl4n42w_4},
iterToProcImpl__pluginsZitersgen_u7}
,
{{6, (NimStrPayload*)&TM__UiphbyIkFgNr76Jpl4n42w_2},
{6, (NimStrPayload*)&TM__UiphbyIkFgNr76Jpl4n42w_3},
{6, (NimStrPayload*)&TM__UiphbyIkFgNr76Jpl4n42w_5},
semLocals__pluginsZlocals_u7}
}
;
extern NIM_BOOL nimInErrorMode__system_u4304;
static N_INLINE(void, nimSetMem__systemZmemory_u7)(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(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4304);
	return result;
}
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimSetMem__systemZmemory_u7(p_p0, ((int)0), size_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyProc__1nD4dBuhjTAOzMZJo9bmgog, getPlugin__pluginsZactive_u7)(tyObject_IdentCachecolonObjectType___ieLwK4T49bbUIZTTVH9cycZA* ic_p0, tyObject_TSym__lYFc3T7YHHNBnaZR9at0NSg* fn_p1) {
	tyProc__1nD4dBuhjTAOzMZJo9bmgog result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		tyTuple__j9a5nRScDLnKB8asy2NhbAQ p_1;
		NI i_1;
		nimZeroMem((void*)(&p_1), sizeof(tyTuple__j9a5nRScDLnKB8asy2NhbAQ));
		i_1 = ((NI)0);
		{
			while (1) {
				p_1 = plugins__pluginsZactive_u6[(i_1)- 0];
				{
					NIM_BOOL T6_;
					T6_ = (NIM_BOOL)0;
					T6_ = pluginMatches__pluginsupport_u18(ic_p0, (&p_1), fn_p1);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					if (!T6_) goto LA7_;
					result = p_1.Field3;
					goto BeforeRet_;
				}
LA7_: ;
				{
					if (!(((NI)1) <= i_1)) goto LA11_;
					goto LA2;
				}
LA11_: ;
				i_1 += ((NI)1);
			}
		} LA2: ;
	}
	result = NIM_NIL;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
