/* Generated by Nim Compiler v1.6.10 */
#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
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw;
typedef struct tyTuple__LCURwohbLBusrL8hdCnvng tyTuple__LCURwohbLBusrL8hdCnvng;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_TType__facALICuu8zUj0hjvbTLFg tyObject_TType__facALICuu8zUj0hjvbTLFg;
typedef struct tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q;
typedef struct tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ;
typedef struct tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA;
typedef struct tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ;
typedef struct tyTuple__XOVT24GHXwqiEj5GCsEGCA tyTuple__XOVT24GHXwqiEj5GCsEGCA;
typedef struct tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q;
typedef struct tySequence__4eQHGndY6XBYpFOH09apV8Q tySequence__4eQHGndY6XBYpFOH09apV8Q;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef NU8 tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tyTuple__LCURwohbLBusrL8hdCnvng {
tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg Field0;
NimStringDesc* Field1;
};
struct tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q {
NU16 line;
NI16 col;
NI32 fileIndex;
};
typedef NU32 tySet_tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg;
typedef NU8 tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw;
struct tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw {
tyObject_TType__facALICuu8zUj0hjvbTLFg* typ;
tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info;
tySet_tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg flags;
tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind;
union{
struct {NI64 intVal;
} _kind_1;
struct {NF floatVal;
} _kind_2;
struct {NimStringDesc* strVal;
} _kind_3;
struct {tyObject_TSym__nnJKJFyjDGi5mnv8jwfTGQ* sym;
} _kind_4;
struct {tyObject_TIdent__1LTsGP7bSxg45u9aHcxh6OA* ident;
} _kind_5;
struct {tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* sons;
} _kind_6;
};
};
typedef tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* tyArray__cypz0nHJsd9cnKgpO7fP5hQ[1];
struct tyTuple__XOVT24GHXwqiEj5GCsEGCA {
NimStringDesc* Field0;
NI Field1;
};
typedef NU8 tySet_tyEnum_ProcessOption__bnU6W8LhTMnT4JaSWtGlSA;
typedef NU8 tyEnum_ProcessOption__bnU6W8LhTMnT4JaSWtGlSA;
struct tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q {
NI64 seconds;
NI nanosecond;
};
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct tySequence__4eQHGndY6XBYpFOH09apV8Q {
  TGenericSeq Sup;
  tyTuple__UV3llMMYFckfui8YMBuUZA data[SEQ_DECL_SIZE];
};
struct tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ {
  TGenericSeq Sup;
  tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* data[SEQ_DECL_SIZE];
};
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, newTree__ast_3352)(tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw** children, NI childrenLen_0);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(void, add__ast_4772)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* father, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* son);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13171)(tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, newIntNode__ast_3698)(tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind, NI64 intVal);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13183)(NimStringDesc* a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, newStrNode__ast_3788)(tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind, NimStringDesc* strVal);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13306)(NI a);
static N_INLINE(NI, safeLen__ast_3144)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
static N_INLINE(NI, len__ast_3151)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, newNode__ast_3285)(tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13787)(NI64 a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13810)(NI a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13952)(tyTuple__UV3llMMYFckfui8YMBuUZA a);
STRING_LITERAL(TM__Cx3HKQVn9adIHIP3IGqzKvw_2, "seconds", 7);
STRING_LITERAL(TM__Cx3HKQVn9adIHIP3IGqzKvw_3, "nanosecond", 10);
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
	nimSetMem__systemZmemory_7(p, ((int) 0), size);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13171)(tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3698(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13183)(NimStringDesc* a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	result = NIM_NIL;
	result = newStrNode__ast_3788(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 20), a);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13161)(tyTuple__LCURwohbLBusrL8hdCnvng a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	tyArray__cypz0nHJsd9cnKgpO7fP5hQ T1_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T2_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__cypz0nHJsd9cnKgpO7fP5hQ));
	result = newTree__ast_3352(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13171(a.Field0);
	add__ast_4772(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13183(a.Field1);
	add__ast_4772(result, T3_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13306)(NI a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3698(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13289)(tyTuple__XOVT24GHXwqiEj5GCsEGCA a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	tyArray__cypz0nHJsd9cnKgpO7fP5hQ T1_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T2_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__cypz0nHJsd9cnKgpO7fP5hQ));
	result = newTree__ast_3352(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13183(a.Field0);
	add__ast_4772(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13306(a.Field1);
	add__ast_4772(result, T3_);
	return result;
}
static N_INLINE(NI, len__ast_3151)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
	NI result;
	NI T1_;
	result = (NI)0;
	T1_ = ((*n)._kind_6.sons ? (*n)._kind_6.sons->Sup.len : 0);
	result = T1_;
	return result;
}
static N_INLINE(NI, safeLen__ast_3144)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
	NI result;
	result = (NI)0;
	{
		if (!((*n).kind >= ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 0) && (*n).kind <= ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 23))) goto LA3_;
		result = ((NI) 0);
	}
	goto LA1_;
	LA3_: ;
	{
		result = len__ast_3151(n);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySet_tyEnum_ProcessOption__bnU6W8LhTMnT4JaSWtGlSA, fromLit__vm_13685)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* a) {
	tySet_tyEnum_ProcessOption__bnU6W8LhTMnT4JaSWtGlSA result;
	nimZeroMem((void*)(&result), sizeof(tySet_tyEnum_ProcessOption__bnU6W8LhTMnT4JaSWtGlSA));
	nimZeroMem((void*)(&result), sizeof(tySet_tyEnum_ProcessOption__bnU6W8LhTMnT4JaSWtGlSA));
	{
		tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* ai;
		ai = NIM_NIL;
		{
			NI i;
			NI colontmp_;
			NI i_2;
			i = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = safeLen__ast_3144(a);
			i_2 = ((NI) 0);
			{
				while (1) {
					if (!(i_2 < colontmp_)) goto LA4;
					i = i_2;
					ai = (*a)._kind_6.sons->data[i];
					result |= ((NU8)1)<<((((tyEnum_ProcessOption__bnU6W8LhTMnT4JaSWtGlSA) ((*ai)._kind_1.intVal))) & 7);
					i_2 += ((NI) 1);
				} LA4: ;
			}
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13737)(tyTuple__XOVT24GHXwqiEj5GCsEGCA a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	tyArray__cypz0nHJsd9cnKgpO7fP5hQ T1_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T2_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__cypz0nHJsd9cnKgpO7fP5hQ));
	result = newTree__ast_3352(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13183(a.Field0);
	add__ast_4772(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13306(a.Field1);
	add__ast_4772(result, T3_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13787)(NI64 a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3698(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13810)(NI a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3698(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13763)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	tyArray__cypz0nHJsd9cnKgpO7fP5hQ T1_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T2_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* reti;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T3_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T4_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* reti_2;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T5_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T6_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__cypz0nHJsd9cnKgpO7fP5hQ));
	result = newTree__ast_3352(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 38), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = newNode__ast_3285(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 1));
	add__ast_4772(result, T2_);
	reti = newNode__ast_3285(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 34));
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13183(((NimStringDesc*) &TM__Cx3HKQVn9adIHIP3IGqzKvw_2));
	add__ast_4772(reti, T3_);
	T4_ = NIM_NIL;
	T4_ = toLit__vm_13787(a.seconds);
	add__ast_4772(reti, T4_);
	add__ast_4772(result, reti);
	reti_2 = newNode__ast_3285(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 34));
	T5_ = NIM_NIL;
	T5_ = toLit__vm_13183(((NimStringDesc*) &TM__Cx3HKQVn9adIHIP3IGqzKvw_3));
	add__ast_4772(reti_2, T5_);
	T6_ = NIM_NIL;
	T6_ = toLit__vm_13810(a.nanosecond);
	add__ast_4772(reti_2, T6_);
	add__ast_4772(result, reti_2);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13952)(tyTuple__UV3llMMYFckfui8YMBuUZA a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	tyArray__cypz0nHJsd9cnKgpO7fP5hQ T1_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T2_;
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__cypz0nHJsd9cnKgpO7fP5hQ));
	result = newTree__ast_3352(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13183(a.Field0);
	add__ast_4772(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13183(a.Field1);
	add__ast_4772(result, T3_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw*, toLit__vm_13940)(tySequence__4eQHGndY6XBYpFOH09apV8Q* a) {
	tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* result;
	result = NIM_NIL;
	result = newNode__ast_3285(((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 41));
	{
		tyTuple__UV3llMMYFckfui8YMBuUZA* ai;
		NI i;
		NI L;
		NI T2_;
		ai = (tyTuple__UV3llMMYFckfui8YMBuUZA*)0;
		i = ((NI) 0);
		T2_ = (a ? a->Sup.len : 0);
		L = T2_;
		{
			while (1) {
				tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* T5_;
				if (!(i < L)) goto LA4;
				ai = (&a->data[i]);
				T5_ = NIM_NIL;
				T5_ = toLit__vm_13952((*ai));
				add__ast_4772(result, T5_);
				i += ((NI) 1);
			} LA4: ;
		}
	}
	return result;
}
