/* Generated by Nim Compiler v1.6.14 */
#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__uh9cWvEa5Ty85PXOtuP5emw tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw;
typedef struct tyTuple__QB4wB1IRKr0TTP39ahEzqYw tyTuple__QB4wB1IRKr0TTP39ahEzqYw;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA;
typedef struct tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw;
typedef struct tyObject_TSym__3r34mwqcVmg5JFNmiaVncw tyObject_TSym__3r34mwqcVmg5JFNmiaVncw;
typedef struct tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg;
typedef struct tySequence__IeU9azYSNIK3V9b36Ir6NZcw tySequence__IeU9azYSNIK3V9b36Ir6NZcw;
typedef struct tyTuple__XOVT24GHXwqiEj5GCsEGCA tyTuple__XOVT24GHXwqiEj5GCsEGCA;
typedef struct tyObject_Time__4nyPibhNA9bJ9a0FBX1dYOaA tyObject_Time__4nyPibhNA9bJ9a0FBX1dYOaA;
typedef struct tySequence__4eQHGndY6XBYpFOH09apV8Q tySequence__4eQHGndY6XBYpFOH09apV8Q;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef NU8 tyEnum_PathComponent__Rn0bieszZmgAu0Fd4CF7Yw;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tyTuple__QB4wB1IRKr0TTP39ahEzqYw {
tyEnum_PathComponent__Rn0bieszZmgAu0Fd4CF7Yw Field0;
NimStringDesc* Field1;
};
struct tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw {
NU16 line;
NI16 col;
NI32 fileIndex;
};
typedef NU32 tySet_tyEnum_TNodeFlag__0RUKWdbLPY3l0smKVGDLMg;
typedef NU8 tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw;
struct tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw {
tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA* typ;
tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw info;
tySet_tyEnum_TNodeFlag__0RUKWdbLPY3l0smKVGDLMg flags;
tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw kind;
union{
struct {NI64 intVal;
} _kind_1;
struct {NF floatVal;
} _kind_2;
struct {NimStringDesc* strVal;
} _kind_3;
struct {tyObject_TSym__3r34mwqcVmg5JFNmiaVncw* sym;
} _kind_4;
struct {tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg* ident;
} _kind_5;
struct {tySequence__IeU9azYSNIK3V9b36Ir6NZcw* sons;
} _kind_6;
};
};
typedef tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* tyArray__DkuVegaMCU6g1mpIOSQPIw[1];
struct tyTuple__XOVT24GHXwqiEj5GCsEGCA {
NimStringDesc* Field0;
NI Field1;
};
typedef NU8 tySet_tyEnum_ProcessOption__79cHN5ErNkq9cfbLi9bttt3Xw;
typedef NU8 tyEnum_ProcessOption__79cHN5ErNkq9cfbLi9bttt3Xw;
struct tyObject_Time__4nyPibhNA9bJ9a0FBX1dYOaA {
NI64 seconds;
NI nanosecond;
};
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct tySequence__4eQHGndY6XBYpFOH09apV8Q {
  TGenericSeq Sup;
  tyTuple__UV3llMMYFckfui8YMBuUZA data[SEQ_DECL_SIZE];
};
struct tySequence__IeU9azYSNIK3V9b36Ir6NZcw {
  TGenericSeq Sup;
  tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* data[SEQ_DECL_SIZE];
};
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, newTree__ast_3356)(tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw kind, tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw** 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_4798)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* father, tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* son);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13210)(tyEnum_PathComponent__Rn0bieszZmgAu0Fd4CF7Yw a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, newIntNode__ast_3711)(tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw kind, NI64 intVal);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13222)(NimStringDesc* a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, newStrNode__ast_3801)(tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw kind, NimStringDesc* strVal);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13345)(NI a);
static N_INLINE(NI, safeLen__ast_3148)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n);
static N_INLINE(NI, len__ast_3155)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, newNode__ast_3289)(tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw kind);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13826)(NI64 a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13849)(NI a);
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13987)(tyTuple__UV3llMMYFckfui8YMBuUZA a);
STRING_LITERAL(TM__UzBNg46CnNFODB6BJYbNuA_2, "seconds", 7);
STRING_LITERAL(TM__UzBNg46CnNFODB6BJYbNuA_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__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13210)(tyEnum_PathComponent__Rn0bieszZmgAu0Fd4CF7Yw a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3711(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13222)(NimStringDesc* a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	result = NIM_NIL;
	result = newStrNode__ast_3801(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 20), a);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13200)(tyTuple__QB4wB1IRKr0TTP39ahEzqYw a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	tyArray__DkuVegaMCU6g1mpIOSQPIw T1_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T2_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__DkuVegaMCU6g1mpIOSQPIw));
	result = newTree__ast_3356(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13210(a.Field0);
	add__ast_4798(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13222(a.Field1);
	add__ast_4798(result, T3_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13345)(NI a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3711(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13328)(tyTuple__XOVT24GHXwqiEj5GCsEGCA a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	tyArray__DkuVegaMCU6g1mpIOSQPIw T1_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T2_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__DkuVegaMCU6g1mpIOSQPIw));
	result = newTree__ast_3356(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13222(a.Field0);
	add__ast_4798(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13345(a.Field1);
	add__ast_4798(result, T3_);
	return result;
}
static N_INLINE(NI, len__ast_3155)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* 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_3148)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* n) {
	NI result;
	result = (NI)0;
	{
		if (!((*n).kind >= ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 0) && (*n).kind <= ((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 23))) goto LA3_;
		result = ((NI) 0);
	}
	goto LA1_;
	LA3_: ;
	{
		result = len__ast_3155(n);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySet_tyEnum_ProcessOption__79cHN5ErNkq9cfbLi9bttt3Xw, fromLit__vm_13724)(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* a) {
	tySet_tyEnum_ProcessOption__79cHN5ErNkq9cfbLi9bttt3Xw result;
	nimZeroMem((void*)(&result), sizeof(tySet_tyEnum_ProcessOption__79cHN5ErNkq9cfbLi9bttt3Xw));
	nimZeroMem((void*)(&result), sizeof(tySet_tyEnum_ProcessOption__79cHN5ErNkq9cfbLi9bttt3Xw));
	{
		tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* ai;
		ai = NIM_NIL;
		{
			NI i;
			NI colontmp_;
			NI i_2;
			i = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = safeLen__ast_3148(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__79cHN5ErNkq9cfbLi9bttt3Xw) ((*ai)._kind_1.intVal))) & 7);
					i_2 += ((NI) 1);
				} LA4: ;
			}
		}
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13776)(tyTuple__XOVT24GHXwqiEj5GCsEGCA a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	tyArray__DkuVegaMCU6g1mpIOSQPIw T1_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T2_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__DkuVegaMCU6g1mpIOSQPIw));
	result = newTree__ast_3356(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13222(a.Field0);
	add__ast_4798(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13345(a.Field1);
	add__ast_4798(result, T3_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13826)(NI64 a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3711(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13849)(NI a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	result = NIM_NIL;
	result = newIntNode__ast_3711(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 6), ((NI64) (a)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13802)(tyObject_Time__4nyPibhNA9bJ9a0FBX1dYOaA a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	tyArray__DkuVegaMCU6g1mpIOSQPIw T1_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T2_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* reti;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T3_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T4_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* reti_2;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T5_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T6_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__DkuVegaMCU6g1mpIOSQPIw));
	result = newTree__ast_3356(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 38), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = newNode__ast_3289(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 1));
	add__ast_4798(result, T2_);
	reti = newNode__ast_3289(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 34));
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13222(((NimStringDesc*) &TM__UzBNg46CnNFODB6BJYbNuA_2));
	add__ast_4798(reti, T3_);
	T4_ = NIM_NIL;
	T4_ = toLit__vm_13826(a.seconds);
	add__ast_4798(reti, T4_);
	add__ast_4798(result, reti);
	reti_2 = newNode__ast_3289(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 34));
	T5_ = NIM_NIL;
	T5_ = toLit__vm_13222(((NimStringDesc*) &TM__UzBNg46CnNFODB6BJYbNuA_3));
	add__ast_4798(reti_2, T5_);
	T6_ = NIM_NIL;
	T6_ = toLit__vm_13849(a.nanosecond);
	add__ast_4798(reti_2, T6_);
	add__ast_4798(result, reti_2);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13987)(tyTuple__UV3llMMYFckfui8YMBuUZA a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	tyArray__DkuVegaMCU6g1mpIOSQPIw T1_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T2_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* T3_;
	result = NIM_NIL;
	nimZeroMem((void*)T1_, sizeof(tyArray__DkuVegaMCU6g1mpIOSQPIw));
	result = newTree__ast_3356(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 160), T1_, 0);
	T2_ = NIM_NIL;
	T2_ = toLit__vm_13222(a.Field0);
	add__ast_4798(result, T2_);
	T3_ = NIM_NIL;
	T3_ = toLit__vm_13222(a.Field1);
	add__ast_4798(result, T3_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, toLit__vm_13975)(tySequence__4eQHGndY6XBYpFOH09apV8Q* a) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	result = NIM_NIL;
	result = newNode__ast_3289(((tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw) 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__uh9cWvEa5Ty85PXOtuP5emw* T5_;
				if (!(i < L)) goto LA4;
				ai = (&a->data[i]);
				T5_ = NIM_NIL;
				T5_ = toLit__vm_13987((*ai));
				add__ast_4798(result, T5_);
				i += ((NI) 1);
			} LA4: ;
		}
	}
	return result;
}
