/* Generated by Nim Compiler v0.10.2 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64
#include "nimbase.h"

#include <string.h>

#include <stdio.h>
typedef struct tllstream210204 tllstream210204;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tnode224816 tnode224816;
typedef struct ttmplparser258020 ttmplparser258020;
typedef struct tlineinfo194539 tlineinfo194539;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttype224852 ttype224852;
typedef struct tsym224846 tsym224846;
typedef struct tident199021 tident199021;
typedef struct tnodeseq224810 tnodeseq224810;
typedef struct tidobj199015 tidobj199015;
typedef struct ttypeseq224848 ttypeseq224848;
typedef struct tloc224830 tloc224830;
typedef struct trope176009 trope176009;
typedef struct tscope224840 tscope224840;
typedef struct TY224947 TY224947;
typedef struct tinstantiation224836 tinstantiation224836;
typedef struct tstrtable224820 tstrtable224820;
typedef struct tsymseq224818 tsymseq224818;
typedef struct tlib224834 tlib224834;
typedef struct TY224936 TY224936;
typedef struct tlistentry126022 tlistentry126022;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlineinfo194539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  ttmplparser258020  {
tllstream210204* Inp;
NU8 State;
tlineinfo194539 Info;
NI Indent;
NI Emitpar;
NimStringDesc* X;
tllstream210204* Outp;
NIM_CHAR Subschar;
NIM_CHAR Nimdirective;
NimStringDesc* Emit;
NimStringDesc* Conc;
NimStringDesc* Tostr;
NI Curly;
NI Bracket;
NI Par;
NIM_BOOL Pendingexprline;
};
typedef NU8 TY210607[32];
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tllstream210204  {
  TNimObject Sup;
NU8 Kind;
FILE* F;
NimStringDesc* S;
NI Rd;
NI Wr;
NI Lineoffset;
};
struct  tnode224816  {
ttype224852* Typ;
tlineinfo194539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym224846* Sym;
} S4;
struct {tident199021* Ident;
} S5;
struct {tnodeseq224810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tidobj199015  {
  TNimObject Sup;
NI Id;
};
struct  tloc224830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype224852* T;
trope176009* R;
trope176009* Heaproot;
};
struct  ttype224852  {
  tidobj199015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq224848* Sons;
tnode224816* N;
tsym224846* Owner;
tsym224846* Sym;
tsym224846* Destructor;
tsym224846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc224830 Loc;
};
struct  tstrtable224820  {
NI Counter;
tsymseq224818* Data;
};
struct  tsym224846  {
  tidobj199015 Sup;
NU8 Kind;
union {
struct {ttypeseq224848* Typeinstcache;
tscope224840* Typscope;
} S1;
struct {TY224947* Procinstcache;
tscope224840* Scope;
} S2;
struct {TY224947* Usedgenerics;
tstrtable224820 Tab;
} S3;
struct {tsym224846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype224852* Typ;
tident199021* Name;
tlineinfo194539 Info;
tsym224846* Owner;
NU32 Flags;
tnode224816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc224830 Loc;
tlib224834* Annex;
tnode224816* Constraint;
};
struct  tident199021  {
  tidobj199015 Sup;
NimStringDesc* S;
tident199021* Next;
NI H;
};
struct  trope176009  {
  TNimObject Sup;
trope176009* Left;
trope176009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tscope224840  {
NI Depthlevel;
tstrtable224820 Symbols;
tnodeseq224810* Usingsyms;
tscope224840* Parent;
};
struct  tinstantiation224836  {
tsym224846* Sym;
ttypeseq224848* Concretetypes;
TY224936* Usedby;
};
struct  tlistentry126022  {
  TNimObject Sup;
tlistentry126022* Prev;
tlistentry126022* Next;
};
struct  tlib224834  {
  tlistentry126022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope176009* Name;
tnode224816* Path;
};
struct tnodeseq224810 {
  TGenericSeq Sup;
  tnode224816* data[SEQ_DECL_SIZE];
};
struct ttypeseq224848 {
  TGenericSeq Sup;
  ttype224852* data[SEQ_DECL_SIZE];
};
struct TY224947 {
  TGenericSeq Sup;
  tinstantiation224836* data[SEQ_DECL_SIZE];
};
struct tsymseq224818 {
  TGenericSeq Sup;
  tsym224846* data[SEQ_DECL_SIZE];
};
struct TY224936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
static N_INLINE(tlineinfo194539, newlineinfo_195140)(NimStringDesc* filename, NI line, NI col);
N_NIMCALL(tlineinfo194539, newlineinfo_195128)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI32, fileinfoidx_194747)(NimStringDesc* filename);
N_NIMCALL(tllstream210204*, llstreamopen_210220)(NimStringDesc* data);
N_NIMCALL(NIM_CHAR, chararg_257020)(tnode224816* n, NimStringDesc* name, NI pos, NIM_CHAR default_257025);
N_NIMCALL(NimStringDesc*, strarg_257029)(tnode224816* n, NimStringDesc* name, NI pos, NimStringDesc* default_257034);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, llstreamreadline_210264)(tllstream210204* s, NimStringDesc** line);
N_NIMCALL(void, parseline_258174)(ttmplparser258020* p);
N_NIMCALL(void, newline_258047)(ttmplparser258020* p);
N_NIMCALL(void, llstreamwrite_210278)(tllstream210204* s, NimStringDesc* data);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NI count, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, scanpar_258058)(ttmplparser258020* p, NI d);
static N_INLINE(NIM_BOOL, withinexpr_258161)(ttmplparser258020* p);
N_NIMCALL(NIM_BOOL, endswithopr_210656)(NimStringDesc* x);
N_NIMCALL(NU8, whichkeyword_203393)(NimStringDesc* id);
N_NIMCALL(void, localerror_196955)(tlineinfo194539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI start);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI first);
N_NIMCALL(NIM_BOOL, contains_97267)(NimStringDesc* s, TY210607 chars);
N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x, NI len);
N_NIMCALL(void, llstreamwrite_210285)(tllstream210204* s, NIM_CHAR data);
N_NIMCALL(void, llstreamclose_210250)(tllstream210204* s);
STRING_LITERAL(TMP1327, "", 0);
STRING_LITERAL(TMP1328, "subschar", 8);
STRING_LITERAL(TMP1329, "metachar", 8);
STRING_LITERAL(TMP1330, "emit", 4);
STRING_LITERAL(TMP1331, "result.add", 10);
STRING_LITERAL(TMP1332, "conc", 4);
STRING_LITERAL(TMP1333, " & ", 3);
STRING_LITERAL(TMP1334, "tostring", 8);
STRING_LITERAL(TMP1335, "$", 1);
STRING_LITERAL(TMP1336, "\012", 1);
STRING_LITERAL(TMP1338, "end", 3);
STRING_LITERAL(TMP1339, "#end", 4);
static NIM_CONST TY210607 TMP1340 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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}
;
STRING_LITERAL(TMP1341, "\"", 1);
STRING_LITERAL(TMP1342, "(\"", 2);
STRING_LITERAL(TMP1343, "\\x", 2);
STRING_LITERAL(TMP1344, "\\\\", 2);
STRING_LITERAL(TMP1345, "\\\'", 2);
STRING_LITERAL(TMP1346, "\\\"", 2);
STRING_LITERAL(TMP1347, "}", 1);
STRING_LITERAL(TMP1348, "\\n\"", 3);

static N_INLINE(tlineinfo194539, newlineinfo_195140)(NimStringDesc* filename, NI line, NI col) {
	tlineinfo194539 result;
	NI32 LOC1;
	memset((void*)(&result), 0, sizeof(result));
	LOC1 = 0;
	LOC1 = fileinfoidx_194747(filename);
	result = newlineinfo_195128(LOC1, line, col);
	return result;
}

N_NIMCALL(void, newline_258047)(ttmplparser258020* p) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = nsuRepeatChar((*p).Emitpar, 41);
	llstreamwrite_210278((*p).Outp, LOC1);
	(*p).Emitpar = 0;
	{
		if (!(((NI16) 1) < (*p).Info.Line)) goto LA4;
		llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1336));
	}
	LA4: ;
	{
		NimStringDesc* LOC10;
		if (!(*p).Pendingexprline) goto LA8;
		LOC10 = 0;
		LOC10 = nsuRepeatChar(2, 32);
		llstreamwrite_210278((*p).Outp, LOC10);
		(*p).Pendingexprline = NIM_FALSE;
	}
	LA8: ;
}

N_NIMCALL(void, scanpar_258058)(ttmplparser258020* p, NI d) {
	NI i;
	i = d;
	{
		while (1) {
			switch (((NU8)((*p).X->data[i]))) {
			case 0:
			{
				goto LA1;
			}
			break;
			case 40:
			{
				(*p).Par += 1;
			}
			break;
			case 41:
			{
				(*p).Par -= 1;
			}
			break;
			case 91:
			{
				(*p).Bracket += 1;
			}
			break;
			case 93:
			{
				(*p).Bracket -= 1;
			}
			break;
			case 123:
			{
				(*p).Curly += 1;
			}
			break;
			case 125:
			{
				(*p).Curly -= 1;
			}
			break;
			default:
			{
			}
			break;
			}
			i += 1;
		}
	} LA1: ;
}

static N_INLINE(NIM_BOOL, withinexpr_258161)(ttmplparser258020* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = (0 < (*p).Par);
	if (LOC2) goto LA3;
	LOC2 = (0 < (*p).Bracket);
	LA3: ;
	LOC1 = LOC2;
	if (LOC1) goto LA4;
	LOC1 = (0 < (*p).Curly);
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseline_258174)(ttmplparser258020* p) {
	NI d;
	NI j;
	NI curly;
	NimStringDesc* keyw;
	d = 0;
	j = 0;
	curly = 0;
	keyw = 0;
	j = 0;
	{
		while (1) {
			if (!((NU8)((*p).X->data[j]) == (NU8)(32))) goto LA2;
			j += 1;
		} LA2: ;
	}
	{
		NIM_BOOL LOC5;
		LOC5 = 0;
		LOC5 = ((NU8)((*p).X->data[0]) == (NU8)((*p).Nimdirective));
		if (!(LOC5)) goto LA6;
		LOC5 = ((NU8)((*p).X->data[1]) == (NU8)(33));
		LA6: ;
		if (!LOC5) goto LA7;
		newline_258047(p);
	}
	goto LA3;
	LA7: ;
	{
		NIM_BOOL LOC16;
		NU8 LOC18;
		if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Nimdirective))) goto LA10;
		newline_258047(p);
		j += 1;
		{
			while (1) {
				if (!((NU8)((*p).X->data[j]) == (NU8)(32))) goto LA13;
				j += 1;
			} LA13: ;
		}
		d = j;
		keyw = copyString(((NimStringDesc*) &TMP1327));
		{
			while (1) {
				if (!(((NU8)((*p).X->data[j])) >= ((NU8)(97)) && ((NU8)((*p).X->data[j])) <= ((NU8)(122)) || ((NU8)((*p).X->data[j])) >= ((NU8)(65)) && ((NU8)((*p).X->data[j])) <= ((NU8)(90)) || ((NU8)((*p).X->data[j])) >= ((NU8)(48)) && ((NU8)((*p).X->data[j])) <= ((NU8)(57)) || ((NU8)((*p).X->data[j])) >= ((NU8)(128)) && ((NU8)((*p).X->data[j])) <= ((NU8)(255)) || ((NU8)((*p).X->data[j])) == ((NU8)(46)) || ((NU8)((*p).X->data[j])) == ((NU8)(95)))) goto LA15;
				keyw = addChar(keyw, (*p).X->data[j]);
				j += 1;
			} LA15: ;
		}
		scanpar_258058(p, j);
		LOC16 = 0;
		LOC16 = withinexpr_258161((&(*p)));
		if (LOC16) goto LA17;
		LOC16 = endswithopr_210656((*p).X);
		LA17: ;
		(*p).Pendingexprline = LOC16;
		LOC18 = 0;
		LOC18 = whichkeyword_203393(keyw);
		switch (LOC18) {
		case ((NU8) 21):
		{
			NimStringDesc* LOC25;
			{
				if (!(2 <= (*p).Indent)) goto LA22;
				(*p).Indent -= 2;
			}
			goto LA20;
			LA22: ;
			{
				(*p).Info.Col = ((NI16) (j));
				localerror_196955((*p).Info, ((NU16) 163), ((NimStringDesc*) &TMP1338));
			}
			LA20: ;
			LOC25 = 0;
			LOC25 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_210278((*p).Outp, LOC25);
			llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1339));
		}
		break;
		case ((NU8) 30):
		case ((NU8) 64):
		case ((NU8) 59):
		case ((NU8) 65):
		case ((NU8) 26):
		case ((NU8) 7):
		case ((NU8) 9):
		case ((NU8) 50):
		case ((NU8) 37):
		case ((NU8) 13):
		case ((NU8) 39):
		case ((NU8) 58):
		case ((NU8) 40):
		{
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			LOC27 = 0;
			LOC27 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_210278((*p).Outp, LOC27);
			LOC28 = 0;
			LOC28 = copyStr((*p).X, d);
			llstreamwrite_210278((*p).Outp, LOC28);
			(*p).Indent += 2;
		}
		break;
		case ((NU8) 19):
		case ((NU8) 47):
		case ((NU8) 20):
		case ((NU8) 23):
		case ((NU8) 25):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			LOC30 = 0;
			LOC30 = nsuRepeatChar((NI64)((*p).Indent - 2), 32);
			llstreamwrite_210278((*p).Outp, LOC30);
			LOC31 = 0;
			LOC31 = copyStr((*p).X, d);
			llstreamwrite_210278((*p).Outp, LOC31);
		}
		break;
		case ((NU8) 38):
		case ((NU8) 63):
		case ((NU8) 11):
		case ((NU8) 61):
		{
			NimStringDesc* LOC33;
			NimStringDesc* LOC34;
			LOC33 = 0;
			LOC33 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_210278((*p).Outp, LOC33);
			LOC34 = 0;
			LOC34 = copyStr((*p).X, d);
			llstreamwrite_210278((*p).Outp, LOC34);
			{
				NIM_BOOL LOC37;
				LOC37 = 0;
				LOC37 = contains_97267((*p).X, TMP1340);
				if (!!(LOC37)) goto LA38;
				(*p).Indent += 2;
			}
			LA38: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC41;
			NimStringDesc* LOC42;
			LOC41 = 0;
			LOC41 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_210278((*p).Outp, LOC41);
			LOC42 = 0;
			LOC42 = copyStr((*p).X, d);
			llstreamwrite_210278((*p).Outp, LOC42);
		}
		break;
		}
		(*p).State = ((NU8) 0);
	}
	goto LA3;
	LA10: ;
	{
		(*p).Par = 0;
		(*p).Curly = 0;
		(*p).Bracket = 0;
		j = 0;
		switch ((*p).State) {
		case ((NU8) 1):
		{
			NimStringDesc* LOC45;
			llstreamwrite_210278((*p).Outp, (*p).Conc);
			llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1336));
			LOC45 = 0;
			LOC45 = nsuRepeatChar((NI64)((*p).Indent + 2), 32);
			llstreamwrite_210278((*p).Outp, LOC45);
			llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1341));
		}
		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC47;
			newline_258047(p);
			LOC47 = 0;
			LOC47 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_210278((*p).Outp, LOC47);
			llstreamwrite_210278((*p).Outp, (*p).Emit);
			llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1342));
			(*p).Emitpar += 1;
		}
		break;
		}
		(*p).State = ((NU8) 1);
		{
			while (1) {
				switch (((NU8)((*p).X->data[j]))) {
				case 0:
				{
					goto LA48;
				}
				break;
				case 1 ... 31:
				case 128 ... 255:
				{
					NimStringDesc* LOC52;
					llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1343));
					LOC52 = 0;
					LOC52 = nsuToHex(((NI64) (((NU8)((*p).X->data[j])))), 2);
					llstreamwrite_210278((*p).Outp, LOC52);
					j += 1;
				}
				break;
				case 92:
				{
					llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1344));
					j += 1;
				}
				break;
				case 39:
				{
					llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1345));
					j += 1;
				}
				break;
				case 34:
				{
					llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1346));
					j += 1;
				}
				break;
				default:
				{
					{
						if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA59;
						j += 1;
						switch (((NU8)((*p).X->data[j]))) {
						case 123:
						{
							(*p).Info.Col = ((NI16) (j));
							llstreamwrite_210285((*p).Outp, 34);
							llstreamwrite_210278((*p).Outp, (*p).Conc);
							llstreamwrite_210278((*p).Outp, (*p).Tostr);
							llstreamwrite_210285((*p).Outp, 40);
							j += 1;
							curly = 0;
							{
								while (1) {
									switch (((NU8)((*p).X->data[j]))) {
									case 0:
									{
										localerror_196955((*p).Info, ((NU16) 188), ((NimStringDesc*) &TMP1347));
										goto LA62;
									}
									break;
									case 123:
									{
										j += 1;
										curly += 1;
										llstreamwrite_210285((*p).Outp, 123);
									}
									break;
									case 125:
									{
										j += 1;
										{
											if (!(curly == 0)) goto LA69;
											goto LA62;
										}
										LA69: ;
										{
											if (!(0 < curly)) goto LA73;
											curly -= 1;
										}
										LA73: ;
										llstreamwrite_210285((*p).Outp, 125);
									}
									break;
									default:
									{
										llstreamwrite_210285((*p).Outp, (*p).X->data[j]);
										j += 1;
									}
									break;
									}
								}
							} LA62: ;
							llstreamwrite_210285((*p).Outp, 41);
							llstreamwrite_210278((*p).Outp, (*p).Conc);
							llstreamwrite_210285((*p).Outp, 34);
						}
						break;
						case 97 ... 122:
						case 65 ... 90:
						case 128 ... 255:
						{
							llstreamwrite_210285((*p).Outp, 34);
							llstreamwrite_210278((*p).Outp, (*p).Conc);
							llstreamwrite_210278((*p).Outp, (*p).Tostr);
							llstreamwrite_210285((*p).Outp, 40);
							{
								while (1) {
									if (!(((NU8)((*p).X->data[j])) >= ((NU8)(97)) && ((NU8)((*p).X->data[j])) <= ((NU8)(122)) || ((NU8)((*p).X->data[j])) >= ((NU8)(65)) && ((NU8)((*p).X->data[j])) <= ((NU8)(90)) || ((NU8)((*p).X->data[j])) >= ((NU8)(48)) && ((NU8)((*p).X->data[j])) <= ((NU8)(57)) || ((NU8)((*p).X->data[j])) >= ((NU8)(128)) && ((NU8)((*p).X->data[j])) <= ((NU8)(255)) || ((NU8)((*p).X->data[j])) == ((NU8)(46)) || ((NU8)((*p).X->data[j])) == ((NU8)(95)))) goto LA78;
									llstreamwrite_210285((*p).Outp, (*p).X->data[j]);
									j += 1;
								} LA78: ;
							}
							llstreamwrite_210285((*p).Outp, 41);
							llstreamwrite_210278((*p).Outp, (*p).Conc);
							llstreamwrite_210285((*p).Outp, 34);
						}
						break;
						default:
						{
							{
								if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA82;
								llstreamwrite_210285((*p).Outp, (*p).Subschar);
								j += 1;
							}
							goto LA80;
							LA82: ;
							{
								(*p).Info.Col = ((NI16) (j));
								localerror_196955((*p).Info, ((NU16) 167), ((NimStringDesc*) &TMP1335));
							}
							LA80: ;
						}
						break;
						}
					}
					goto LA57;
					LA59: ;
					{
						llstreamwrite_210285((*p).Outp, (*p).X->data[j]);
						j += 1;
					}
					LA57: ;
				}
				break;
				}
			}
		} LA48: ;
		llstreamwrite_210278((*p).Outp, ((NimStringDesc*) &TMP1348));
	}
	LA3: ;
}

N_NIMCALL(tllstream210204*, filtertmpl_258009)(tllstream210204* stdin_258011, NimStringDesc* filename, tnode224816* call) {
	tllstream210204* result;
	ttmplparser258020 p;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.Info = newlineinfo_195140(filename, 0, 0);
	p.Outp = llstreamopen_210220(((NimStringDesc*) &TMP1327));
	p.Inp = stdin_258011;
	p.Subschar = chararg_257020(call, ((NimStringDesc*) &TMP1328), 1, 36);
	p.Nimdirective = chararg_257020(call, ((NimStringDesc*) &TMP1329), 2, 35);
	p.Emit = strarg_257029(call, ((NimStringDesc*) &TMP1330), 3, ((NimStringDesc*) &TMP1331));
	p.Conc = strarg_257029(call, ((NimStringDesc*) &TMP1332), 4, ((NimStringDesc*) &TMP1333));
	p.Tostr = strarg_257029(call, ((NimStringDesc*) &TMP1334), 5, ((NimStringDesc*) &TMP1335));
	p.X = rawNewString(120);
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = llstreamreadline_210264(p.Inp, (&p.X));
			if (!LOC3) goto LA2;
			p.Info.Line = (NI16)(p.Info.Line + ((NI16) 1));
			parseline_258174((&p));
		} LA2: ;
	}
	newline_258047((&p));
	result = p.Outp;
	llstreamclose_210250(p.Inp);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_filter_tmplInit)(void) {
}

NIM_EXTERNC N_NOINLINE(void, HEX00_filter_tmplDatInit)(void) {
}

