/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/filter_tmpl.o compiler/nimcache/filter_tmpl.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>

#include <stdio.h>
typedef struct tllstream176204 tllstream176204;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tnode188803 tnode188803;
typedef struct ttmplparser219017 ttmplparser219017;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttype188837 ttype188837;
typedef struct tsym188833 tsym188833;
typedef struct tident167019 tident167019;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct tidobj167013 tidobj167013;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tlib188821 tlib188821;
typedef struct TY188922 TY188922;
typedef struct tlistentry118017 tlistentry118017;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  ttmplparser219017  {
tllstream176204* Inp;
NU8 State;
tlineinfo163527 Info;
NI Indent;
NI Emitpar;
NimStringDesc* X;
tllstream176204* Outp;
NIM_CHAR Subschar;
NIM_CHAR Nimdirective;
NimStringDesc* Emit;
NimStringDesc* Conc;
NimStringDesc* Tostr;
NI Curly;
NI Bracket;
NI Par;
NIM_BOOL Pendingexprline;
};
typedef NU8 TY90161[32];
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tllstream176204  {
  TNimObject Sup;
NU8 Kind;
FILE* F;
NimStringDesc* S;
NI Rd;
NI Wr;
NI Lineoffset;
};
struct  tnode188803  {
ttype188837* Typ;
tlineinfo163527 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym188833* Sym;
} S4;
struct {tident167019* Ident;
} S5;
struct {tnodeseq188797* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
static N_INLINE(tlineinfo163527, newlineinfo_164077)(NimStringDesc* filename, NI line, NI col);
N_NIMCALL(tlineinfo163527, newlineinfo_164069)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI32, fileinfoidx_163721)(NimStringDesc* filename);
N_NIMCALL(tllstream176204*, llstreamopen_176218)(NimStringDesc* data);
N_NIMCALL(NIM_CHAR, chararg_218014)(tnode188803* n, NimStringDesc* name, NI pos, NIM_CHAR default_218019);
N_NIMCALL(NimStringDesc*, strarg_218021)(tnode188803* n, NimStringDesc* name, NI pos, NimStringDesc* default_218026);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, llstreamreadline_176248)(tllstream176204* s, NimStringDesc** line);
N_NIMCALL(void, parseline_219177)(ttmplparser219017* p);
N_NIMCALL(void, newline_219040)(ttmplparser219017* p);
N_NIMCALL(void, llstreamwrite_176258)(tllstream176204* 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_219047)(ttmplparser219017* p, NI d);
static N_INLINE(NIM_BOOL, withinexpr_219168)(ttmplparser219017* p);
N_NIMCALL(NIM_BOOL, endswithopr_176646)(NimStringDesc* x);
N_NIMCALL(NU8, whichkeyword_171367)(NimStringDesc* id);
N_NIMCALL(void, localerror_165571)(tlineinfo163527 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_90258)(NimStringDesc* s, TY90161 chars);
N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x, NI len);
N_NIMCALL(void, llstreamwrite_176263)(tllstream176204* s, NIM_CHAR data);
N_NIMCALL(void, llstreamclose_176238)(tllstream176204* s);
STRING_LITERAL(TMP1689, "", 0);
STRING_LITERAL(TMP1690, "subschar", 8);
STRING_LITERAL(TMP1691, "metachar", 8);
STRING_LITERAL(TMP1692, "emit", 4);
STRING_LITERAL(TMP1693, "result.add", 10);
STRING_LITERAL(TMP1694, "conc", 4);
STRING_LITERAL(TMP1695, " & ", 3);
STRING_LITERAL(TMP1696, "tostring", 8);
STRING_LITERAL(TMP1697, "$", 1);
STRING_LITERAL(TMP1698, "\012", 1);
STRING_LITERAL(TMP1700, "end", 3);
STRING_LITERAL(TMP1701, "#end", 4);
static NIM_CONST TY90161 TMP1702 = {
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(TMP1703, "\"", 1);
STRING_LITERAL(TMP1704, "(\"", 2);
STRING_LITERAL(TMP1705, "\\x", 2);
STRING_LITERAL(TMP1706, "\\\\", 2);
STRING_LITERAL(TMP1707, "\\\'", 2);
STRING_LITERAL(TMP1708, "\\\"", 2);
STRING_LITERAL(TMP1709, "}", 1);
STRING_LITERAL(TMP1710, "\\n\"", 3);

static N_INLINE(tlineinfo163527, newlineinfo_164077)(NimStringDesc* filename, NI line, NI col) {
	tlineinfo163527 result;
	NI32 LOC1;
	memset((void*)&result, 0, sizeof(result));
	LOC1 = 0;
	LOC1 = fileinfoidx_163721(filename);
	result = newlineinfo_164069(LOC1, line, col);
	return result;
}

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

N_NIMCALL(void, scanpar_219047)(ttmplparser219017* 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_219168)(ttmplparser219017* 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_219177)(ttmplparser219017* 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 LA1;
		j += 1;
	} LA1: ;
	{
		NIM_BOOL LOC4;
		LOC4 = 0;
		LOC4 = ((NU8)((*p).X->data[0]) == (NU8)((*p).Nimdirective));
		if (!(LOC4)) goto LA5;
		LOC4 = ((NU8)((*p).X->data[1]) == (NU8)(33));
		LA5: ;
		if (!LOC4) goto LA6;
		newline_219040(p);
	}
	goto LA2;
	LA6: ;
	{
		NIM_BOOL LOC13;
		NU8 LOC15;
		if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Nimdirective))) goto LA9;
		newline_219040(p);
		j += 1;
		while (1) {
			if (!((NU8)((*p).X->data[j]) == (NU8)(32))) goto LA11;
			j += 1;
		} LA11: ;
		d = j;
		keyw = copyString(((NimStringDesc*) &TMP1689));
		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 LA12;
			keyw = addChar(keyw, (*p).X->data[j]);
			j += 1;
		} LA12: ;
		scanpar_219047(p, j);
		LOC13 = 0;
		LOC13 = withinexpr_219168(&(*p));
		if (LOC13) goto LA14;
		LOC13 = endswithopr_176646((*p).X);
		LA14: ;
		(*p).Pendingexprline = LOC13;
		LOC15 = 0;
		LOC15 = whichkeyword_171367(keyw);
		switch (LOC15) {
		case ((NU8) 20):
		{
			NimStringDesc* LOC22;
			{
				if (!(2 <= (*p).Indent)) goto LA19;
				(*p).Indent -= 2;
			}
			goto LA17;
			LA19: ;
			{
				(*p).Info.Col = ((NI16) (j));
				localerror_165571((*p).Info, ((NU16) 163), ((NimStringDesc*) &TMP1700));
			}
			LA17: ;
			LOC22 = 0;
			LOC22 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_176258((*p).Outp, LOC22);
			llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1701));
		}
		break;
		case ((NU8) 28):
		case ((NU8) 63):
		case ((NU8) 58):
		case ((NU8) 64):
		case ((NU8) 25):
		case ((NU8) 7):
		case ((NU8) 9):
		case ((NU8) 49):
		case ((NU8) 35):
		case ((NU8) 13):
		case ((NU8) 38):
		case ((NU8) 57):
		case ((NU8) 39):
		{
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			LOC24 = 0;
			LOC24 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_176258((*p).Outp, LOC24);
			LOC25 = 0;
			LOC25 = copyStr((*p).X, d);
			llstreamwrite_176258((*p).Outp, LOC25);
			(*p).Indent += 2;
		}
		break;
		case ((NU8) 18):
		case ((NU8) 46):
		case ((NU8) 19):
		case ((NU8) 22):
		case ((NU8) 24):
		{
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			LOC27 = 0;
			LOC27 = nsuRepeatChar((NI32)((*p).Indent - 2), 32);
			llstreamwrite_176258((*p).Outp, LOC27);
			LOC28 = 0;
			LOC28 = copyStr((*p).X, d);
			llstreamwrite_176258((*p).Outp, LOC28);
		}
		break;
		case ((NU8) 37):
		case ((NU8) 62):
		case ((NU8) 11):
		case ((NU8) 60):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			LOC30 = 0;
			LOC30 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_176258((*p).Outp, LOC30);
			LOC31 = 0;
			LOC31 = copyStr((*p).X, d);
			llstreamwrite_176258((*p).Outp, LOC31);
			{
				NIM_BOOL LOC34;
				LOC34 = 0;
				LOC34 = contains_90258((*p).X, TMP1702);
				if (!!(LOC34)) goto LA35;
				(*p).Indent += 2;
			}
			LA35: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC38;
			NimStringDesc* LOC39;
			LOC38 = 0;
			LOC38 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_176258((*p).Outp, LOC38);
			LOC39 = 0;
			LOC39 = copyStr((*p).X, d);
			llstreamwrite_176258((*p).Outp, LOC39);
		}
		break;
		}
		(*p).State = ((NU8) 0);
	}
	goto LA2;
	LA9: ;
	{
		(*p).Par = 0;
		(*p).Curly = 0;
		(*p).Bracket = 0;
		j = 0;
		switch ((*p).State) {
		case ((NU8) 1):
		{
			NimStringDesc* LOC42;
			llstreamwrite_176258((*p).Outp, (*p).Conc);
			llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1698));
			LOC42 = 0;
			LOC42 = nsuRepeatChar((NI32)((*p).Indent + 2), 32);
			llstreamwrite_176258((*p).Outp, LOC42);
			llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1703));
		}
		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC44;
			newline_219040(p);
			LOC44 = 0;
			LOC44 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_176258((*p).Outp, LOC44);
			llstreamwrite_176258((*p).Outp, (*p).Emit);
			llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1704));
			(*p).Emitpar += 1;
		}
		break;
		}
		(*p).State = ((NU8) 1);
		while (1) {
			switch (((NU8)((*p).X->data[j]))) {
			case 0:
			{
				goto LA45;
			}
			break;
			case 1 ... 31:
			case 128 ... 255:
			{
				NimStringDesc* LOC48;
				llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1705));
				LOC48 = 0;
				LOC48 = nsuToHex(((NI64) (((NU8)((*p).X->data[j])))), 2);
				llstreamwrite_176258((*p).Outp, LOC48);
				j += 1;
			}
			break;
			case 92:
			{
				llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1706));
				j += 1;
			}
			break;
			case 39:
			{
				llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1707));
				j += 1;
			}
			break;
			case 34:
			{
				llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1708));
				j += 1;
			}
			break;
			default:
			{
				{
					if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA55;
					j += 1;
					switch (((NU8)((*p).X->data[j]))) {
					case 123:
					{
						(*p).Info.Col = ((NI16) (j));
						llstreamwrite_176263((*p).Outp, 34);
						llstreamwrite_176258((*p).Outp, (*p).Conc);
						llstreamwrite_176258((*p).Outp, (*p).Tostr);
						llstreamwrite_176263((*p).Outp, 40);
						j += 1;
						curly = 0;
						while (1) {
							switch (((NU8)((*p).X->data[j]))) {
							case 0:
							{
								localerror_165571((*p).Info, ((NU16) 188), ((NimStringDesc*) &TMP1709));
								goto LA58;
							}
							break;
							case 123:
							{
								j += 1;
								curly += 1;
								llstreamwrite_176263((*p).Outp, 123);
							}
							break;
							case 125:
							{
								j += 1;
								{
									if (!(curly == 0)) goto LA64;
									goto LA58;
								}
								LA64: ;
								{
									if (!(0 < curly)) goto LA68;
									curly -= 1;
								}
								LA68: ;
								llstreamwrite_176263((*p).Outp, 125);
							}
							break;
							default:
							{
								llstreamwrite_176263((*p).Outp, (*p).X->data[j]);
								j += 1;
							}
							break;
							}
						} LA58: ;
						llstreamwrite_176263((*p).Outp, 41);
						llstreamwrite_176258((*p).Outp, (*p).Conc);
						llstreamwrite_176263((*p).Outp, 34);
					}
					break;
					case 97 ... 122:
					case 65 ... 90:
					case 128 ... 255:
					{
						llstreamwrite_176263((*p).Outp, 34);
						llstreamwrite_176258((*p).Outp, (*p).Conc);
						llstreamwrite_176258((*p).Outp, (*p).Tostr);
						llstreamwrite_176263((*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 LA72;
							llstreamwrite_176263((*p).Outp, (*p).X->data[j]);
							j += 1;
						} LA72: ;
						llstreamwrite_176263((*p).Outp, 41);
						llstreamwrite_176258((*p).Outp, (*p).Conc);
						llstreamwrite_176263((*p).Outp, 34);
					}
					break;
					default:
					{
						{
							if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA76;
							llstreamwrite_176263((*p).Outp, (*p).Subschar);
							j += 1;
						}
						goto LA74;
						LA76: ;
						{
							(*p).Info.Col = ((NI16) (j));
							localerror_165571((*p).Info, ((NU16) 167), ((NimStringDesc*) &TMP1697));
						}
						LA74: ;
					}
					break;
					}
				}
				goto LA53;
				LA55: ;
				{
					llstreamwrite_176263((*p).Outp, (*p).X->data[j]);
					j += 1;
				}
				LA53: ;
			}
			break;
			}
		} LA45: ;
		llstreamwrite_176258((*p).Outp, ((NimStringDesc*) &TMP1710));
	}
	LA2: ;
}

N_NIMCALL(tllstream176204*, filtertmpl_219007)(tllstream176204* stdin_219009, NimStringDesc* filename, tnode188803* call) {
	tllstream176204* result;
	ttmplparser219017 p;
	result = 0;
	memset((void*)&p, 0, sizeof(p));
	p.Info = newlineinfo_164077(filename, 0, 0);
	p.Outp = llstreamopen_176218(((NimStringDesc*) &TMP1689));
	p.Inp = stdin_219009;
	p.Subschar = chararg_218014(call, ((NimStringDesc*) &TMP1690), 1, 36);
	p.Nimdirective = chararg_218014(call, ((NimStringDesc*) &TMP1691), 2, 35);
	p.Emit = strarg_218021(call, ((NimStringDesc*) &TMP1692), 3, ((NimStringDesc*) &TMP1693));
	p.Conc = strarg_218021(call, ((NimStringDesc*) &TMP1694), 4, ((NimStringDesc*) &TMP1695));
	p.Tostr = strarg_218021(call, ((NimStringDesc*) &TMP1696), 5, ((NimStringDesc*) &TMP1697));
	p.X = rawNewString(120);
	while (1) {
		NIM_BOOL LOC2;
		LOC2 = 0;
		LOC2 = llstreamreadline_176248(p.Inp, &p.X);
		if (!LOC2) goto LA1;
		p.Info.Line = (NI16)(p.Info.Line + ((NI16) 1));
		parseline_219177(&p);
	} LA1: ;
	newline_219040(&p);
	result = p.Outp;
	llstreamclose_176238(p.Inp);
	return result;
}
N_NOINLINE(void, filter_tmplInit)(void) {
}

N_NOINLINE(void, filter_tmplDatInit)(void) {
}

