/* Generated by Nim Compiler v0.13.0 */
/*   (c) 2015 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 Tllstream203204 Tllstream203204;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tnode215790 Tnode215790;
typedef struct Ttmplparser238011 Ttmplparser238011;
typedef struct Tlineinfo183337 Tlineinfo183337;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Ttype215828 Ttype215828;
typedef struct Tsym215822 Tsym215822;
typedef struct Tident190012 Tident190012;
typedef struct Tnodeseq215784 Tnodeseq215784;
typedef struct Tidobj190006 Tidobj190006;
typedef struct Ttypeseq215824 Ttypeseq215824;
typedef struct Tloc215804 Tloc215804;
typedef struct Ropeobj170006 Ropeobj170006;
typedef struct Tscope215816 Tscope215816;
typedef struct TY215925 TY215925;
typedef struct Tstrtable215794 Tstrtable215794;
typedef struct Tsymseq215792 Tsymseq215792;
typedef struct Tlib215808 Tlib215808;
typedef struct Tinstantiation215812 Tinstantiation215812;
typedef struct Tlistentry135010 Tlistentry135010;
typedef struct TY215913 TY215913;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tlineinfo183337  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Ttmplparser238011  {
Tllstream203204* inp;
NU8 state;
Tlineinfo183337 info;
NI indent;
NI emitpar;
NimStringDesc* x;
Tllstream203204* outp;
NIM_CHAR subschar;
NIM_CHAR nimdirective;
NimStringDesc* emit;
NimStringDesc* conc;
NimStringDesc* tostr;
NI curly;
NI bracket;
NI par;
NIM_BOOL pendingexprline;
};
typedef NU8 TY203404[32];
typedef N_NIMCALL_PTR(void, TY3489) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3494) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3489 marker;
TY3494 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tllstream203204  {
  TNimObject Sup;
NU8 kind;
FILE* f;
NimStringDesc* s;
NI rd;
NI wr;
NI lineoffset;
};
struct  Tnode215790  {
Ttype215828* typ;
Tlineinfo183337 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym215822* sym;
} S4;
struct {Tident190012* ident;
} S5;
struct {Tnodeseq215784* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Tidobj190006  {
  TNimObject Sup;
NI id;
};
struct  Tloc215804  {
NU8 k;
NU8 s;
NU16 flags;
Ttype215828* t;
Ropeobj170006* r;
Ropeobj170006* heaproot;
};
struct  Ttype215828  {
  Tidobj190006 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq215824* sons;
Tnode215790* n;
Tsym215822* owner;
Tsym215822* sym;
Tsym215822* destructor;
Tsym215822* deepcopy;
Tsym215822* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc215804 loc;
};
struct  Tstrtable215794  {
NI counter;
Tsymseq215792* data;
};
struct  Tsym215822  {
  Tidobj190006 Sup;
NU8 kind;
union{
struct {Ttypeseq215824* typeinstcache;
Tscope215816* typscope;
} S1;
struct {TY215925* procinstcache;
Tsym215822* gcunsafetyreason;
} S2;
struct {TY215925* usedgenerics;
Tstrtable215794 tab;
} S3;
struct {Tsym215822* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype215828* typ;
Tident190012* name;
Tlineinfo183337 info;
Tsym215822* owner;
NU32 flags;
Tnode215790* ast;
NU32 options;
NI position;
NI offset;
Tloc215804 loc;
Tlib215808* annex;
Tnode215790* constraint;
};
struct  Tident190012  {
  Tidobj190006 Sup;
NimStringDesc* s;
Tident190012* next;
NI h;
};
struct  Ropeobj170006  {
  TNimObject Sup;
Ropeobj170006* left;
Ropeobj170006* right;
NI length;
NimStringDesc* data;
};
struct  Tscope215816  {
NI depthlevel;
Tstrtable215794 symbols;
Tnodeseq215784* usingsyms;
Tscope215816* parent;
};
struct  Tlistentry135010  {
  TNimObject Sup;
Tlistentry135010* prev;
Tlistentry135010* next;
};
struct  Tlib215808  {
  Tlistentry135010 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj170006* name;
Tnode215790* path;
};
struct  Tinstantiation215812  {
Tsym215822* sym;
Ttypeseq215824* concretetypes;
TY215913* usedby;
NI compilesid;
};
struct Tnodeseq215784 {
  TGenericSeq Sup;
  Tnode215790* data[SEQ_DECL_SIZE];
};
struct Ttypeseq215824 {
  TGenericSeq Sup;
  Ttype215828* data[SEQ_DECL_SIZE];
};
struct TY215925 {
  TGenericSeq Sup;
  Tinstantiation215812* data[SEQ_DECL_SIZE];
};
struct Tsymseq215792 {
  TGenericSeq Sup;
  Tsym215822* data[SEQ_DECL_SIZE];
};
struct TY215913 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
static N_INLINE(Tlineinfo183337, newlineinfo_184029)(NimStringDesc* filename, NI line, NI col);
N_NIMCALL(Tlineinfo183337, newlineinfo_184023)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI32, fileinfoidx_184016)(NimStringDesc* filename);
N_NIMCALL(Tllstream203204*, llstreamopen_203217)(NimStringDesc* data);
N_NIMCALL(NIM_CHAR, chararg_237011)(Tnode215790* n, NimStringDesc* name, NI pos, NIM_CHAR default_237016);
N_NIMCALL(NimStringDesc*, strarg_237017)(Tnode215790* n, NimStringDesc* name, NI pos, NimStringDesc* default_237022);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, llstreamreadline_203550)(Tllstream203204* s, NimStringDesc** line);
N_NIMCALL(void, parseline_238110)(Ttmplparser238011* p);
N_NIMCALL(void, newline_238032)(Ttmplparser238011* p);
N_NIMCALL(void, llstreamwrite_203593)(Tllstream203204* s, NimStringDesc* data);
N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c, NI count);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, scanpar_238036)(Ttmplparser238011* p, NI d);
static N_INLINE(NIM_BOOL, withinexpr_238106)(Ttmplparser238011* p);
N_NIMCALL(NIM_BOOL, endswithopr_203432)(NimStringDesc* x);
N_NIMCALL(NU16, whichkeyword_197366)(NimStringDesc* id);
N_NIMCALL(void, localerror_188080)(Tlineinfo183337 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_101033)(NimStringDesc* s, TY203404 chars);
N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x, NI len);
N_NIMCALL(void, llstreamwrite_203612)(Tllstream203204* s, NIM_CHAR data);
N_NIMCALL(void, llstreamclose_203277)(Tllstream203204* s);
STRING_LITERAL(TMP1522, "", 0);
STRING_LITERAL(TMP1523, "subschar", 8);
STRING_LITERAL(TMP1524, "metachar", 8);
STRING_LITERAL(TMP1525, "emit", 4);
STRING_LITERAL(TMP1526, "result.add", 10);
STRING_LITERAL(TMP1527, "conc", 4);
STRING_LITERAL(TMP1528, " & ", 3);
STRING_LITERAL(TMP1529, "tostring", 8);
STRING_LITERAL(TMP1530, "$", 1);
STRING_LITERAL(TMP1531, "\012", 1);
STRING_LITERAL(TMP1533, "end", 3);
STRING_LITERAL(TMP1534, "#end", 4);
static NIM_CONST TY203404 TMP1535 = {
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(TMP1536, "\"", 1);
STRING_LITERAL(TMP1537, "(\"", 2);
STRING_LITERAL(TMP1538, "\\x", 2);
STRING_LITERAL(TMP1539, "\\\\", 2);
STRING_LITERAL(TMP1540, "\\\'", 2);
STRING_LITERAL(TMP1541, "\\\"", 2);
STRING_LITERAL(TMP1542, "}", 1);
STRING_LITERAL(TMP1543, "\\n\"", 3);

static N_INLINE(Tlineinfo183337, newlineinfo_184029)(NimStringDesc* filename, NI line, NI col) {
	Tlineinfo183337 result;
	NI32 LOC1;
	memset((void*)(&result), 0, sizeof(result));
	LOC1 = 0;
	LOC1 = fileinfoidx_184016(filename);
	result = newlineinfo_184023(LOC1, line, col);
	return result;
}

N_NIMCALL(void, newline_238032)(Ttmplparser238011* p) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = nsuRepeatChar(41, ((NI) ((*p).emitpar)));
	llstreamwrite_203593((*p).outp, LOC1);
	(*p).emitpar = ((NI) 0);
	{
		if (!(((NI16) 1) < (*p).info.line)) goto LA4;
		llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1531));
	}
	LA4: ;
	{
		NimStringDesc* LOC10;
		if (!(*p).pendingexprline) goto LA8;
		LOC10 = 0;
		LOC10 = nsuRepeatChar(32, ((NI) 2));
		llstreamwrite_203593((*p).outp, LOC10);
		(*p).pendingexprline = NIM_FALSE;
	}
	LA8: ;
}

N_NIMCALL(void, scanpar_238036)(Ttmplparser238011* p, NI d) {
	NI i;
	i = d;
	{
		while (1) {
			switch (((NU8)((*p).x->data[i]))) {
			case 0:
			{
				goto LA1;
			}
			break;
			case 40:
			{
				(*p).par += ((NI) 1);
			}
			break;
			case 41:
			{
				(*p).par -= ((NI) 1);
			}
			break;
			case 91:
			{
				(*p).bracket += ((NI) 1);
			}
			break;
			case 93:
			{
				(*p).bracket -= ((NI) 1);
			}
			break;
			case 123:
			{
				(*p).curly += ((NI) 1);
			}
			break;
			case 125:
			{
				(*p).curly -= ((NI) 1);
			}
			break;
			default:
			{
			}
			break;
			}
			i += ((NI) 1);
		}
	} LA1: ;
}

static N_INLINE(NIM_BOOL, withinexpr_238106)(Ttmplparser238011* p) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = (((NI) 0) < (*p).par);
	if (LOC2) goto LA3;
	LOC2 = (((NI) 0) < (*p).bracket);
	LA3: ;
	LOC1 = LOC2;
	if (LOC1) goto LA4;
	LOC1 = (((NI) 0) < (*p).curly);
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, parseline_238110)(Ttmplparser238011* p) {
	NI d;
	NI j;
	NI curly;
	NimStringDesc* keyw;
	d = 0;
	j = 0;
	curly = 0;
	keyw = 0;
	j = ((NI) 0);
	{
		while (1) {
			if (!((NU8)((*p).x->data[j]) == (NU8)(32))) goto LA2;
			j += ((NI) 1);
		} LA2: ;
	}
	{
		NIM_BOOL LOC5;
		LOC5 = 0;
		LOC5 = ((NU8)((*p).x->data[((NI) 0)]) == (NU8)((*p).nimdirective));
		if (!(LOC5)) goto LA6;
		LOC5 = (((NU8)((*p).x->data[((NI) 1)])) == ((NU8)(63)) || ((NU8)((*p).x->data[((NI) 1)])) == ((NU8)(33)));
		LA6: ;
		if (!LOC5) goto LA7;
		newline_238032(p);
	}
	goto LA3;
	LA7: ;
	{
		NIM_BOOL LOC16;
		NU16 LOC18;
		if (!((NU8)((*p).x->data[j]) == (NU8)((*p).nimdirective))) goto LA10;
		newline_238032(p);
		j += ((NI) 1);
		{
			while (1) {
				if (!((NU8)((*p).x->data[j]) == (NU8)(32))) goto LA13;
				j += ((NI) 1);
			} LA13: ;
		}
		d = j;
		keyw = copyString(((NimStringDesc*) &TMP1522));
		{
			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 += ((NI) 1);
			} LA15: ;
		}
		scanpar_238036(p, j);
		LOC16 = 0;
		LOC16 = withinexpr_238106((&(*p)));
		if (LOC16) goto LA17;
		LOC16 = endswithopr_203432((*p).x);
		LA17: ;
		(*p).pendingexprline = LOC16;
		LOC18 = 0;
		LOC18 = whichkeyword_197366(keyw);
		switch (LOC18) {
		case ((NU16) 22):
		{
			NimStringDesc* LOC25;
			{
				if (!(((NI) 2) <= (*p).indent)) goto LA22;
				(*p).indent -= ((NI) 2);
			}
			goto LA20;
			LA22: ;
			{
				(*p).info.col = ((NI16) (j));
				localerror_188080((*p).info, ((NU16) 167), ((NimStringDesc*) &TMP1533));
			}
			LA20: ;
			LOC25 = 0;
			LOC25 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC25);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1534));
		}
		break;
		case ((NU16) 31):
		case ((NU16) 65):
		case ((NU16) 60):
		case ((NU16) 66):
		case ((NU16) 27):
		case ((NU16) 7):
		case ((NU16) 9):
		case ((NU16) 51):
		case ((NU16) 38):
		case ((NU16) 14):
		case ((NU16) 40):
		case ((NU16) 59):
		case ((NU16) 41):
		{
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			LOC27 = 0;
			LOC27 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC27);
			LOC28 = 0;
			LOC28 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC28);
			(*p).indent += ((NI) 2);
		}
		break;
		case ((NU16) 20):
		case ((NU16) 48):
		case ((NU16) 21):
		case ((NU16) 24):
		case ((NU16) 26):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			LOC30 = 0;
			LOC30 = nsuRepeatChar(32, ((NI) ((NI)((*p).indent - ((NI) 2)))));
			llstreamwrite_203593((*p).outp, LOC30);
			LOC31 = 0;
			LOC31 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC31);
		}
		break;
		case ((NU16) 39):
		case ((NU16) 64):
		case ((NU16) 12):
		case ((NU16) 62):
		{
			NimStringDesc* LOC33;
			NimStringDesc* LOC34;
			LOC33 = 0;
			LOC33 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC33);
			LOC34 = 0;
			LOC34 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC34);
			{
				NIM_BOOL LOC37;
				LOC37 = 0;
				LOC37 = contains_101033((*p).x, TMP1535);
				if (!!(LOC37)) goto LA38;
				(*p).indent += ((NI) 2);
			}
			LA38: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC41;
			NimStringDesc* LOC42;
			LOC41 = 0;
			LOC41 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC41);
			LOC42 = 0;
			LOC42 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC42);
		}
		break;
		}
		(*p).state = ((NU8) 0);
	}
	goto LA3;
	LA10: ;
	{
		(*p).par = ((NI) 0);
		(*p).curly = ((NI) 0);
		(*p).bracket = ((NI) 0);
		j = ((NI) 0);
		switch ((*p).state) {
		case ((NU8) 1):
		{
			NimStringDesc* LOC45;
			llstreamwrite_203593((*p).outp, (*p).conc);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1531));
			LOC45 = 0;
			LOC45 = nsuRepeatChar(32, ((NI) ((NI)((*p).indent + ((NI) 2)))));
			llstreamwrite_203593((*p).outp, LOC45);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1536));
		}
		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC47;
			newline_238032(p);
			LOC47 = 0;
			LOC47 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC47);
			llstreamwrite_203593((*p).outp, (*p).emit);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1537));
			(*p).emitpar += ((NI) 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_203593((*p).outp, ((NimStringDesc*) &TMP1538));
					LOC52 = 0;
					LOC52 = nsuToHex(((NI64) (((NU8)((*p).x->data[j])))), ((NI) 2));
					llstreamwrite_203593((*p).outp, LOC52);
					j += ((NI) 1);
				}
				break;
				case 92:
				{
					llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1539));
					j += ((NI) 1);
				}
				break;
				case 39:
				{
					llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1540));
					j += ((NI) 1);
				}
				break;
				case 34:
				{
					llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1541));
					j += ((NI) 1);
				}
				break;
				default:
				{
					{
						if (!((NU8)((*p).x->data[j]) == (NU8)((*p).subschar))) goto LA59;
						j += ((NI) 1);
						switch (((NU8)((*p).x->data[j]))) {
						case 123:
						{
							(*p).info.col = ((NI16) (j));
							llstreamwrite_203612((*p).outp, 34);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203593((*p).outp, (*p).tostr);
							llstreamwrite_203612((*p).outp, 40);
							j += ((NI) 1);
							curly = ((NI) 0);
							{
								while (1) {
									switch (((NU8)((*p).x->data[j]))) {
									case 0:
									{
										localerror_188080((*p).info, ((NU16) 193), ((NimStringDesc*) &TMP1542));
										goto LA62;
									}
									break;
									case 123:
									{
										j += ((NI) 1);
										curly += ((NI) 1);
										llstreamwrite_203612((*p).outp, 123);
									}
									break;
									case 125:
									{
										j += ((NI) 1);
										{
											if (!(curly == ((NI) 0))) goto LA69;
											goto LA62;
										}
										LA69: ;
										{
											if (!(((NI) 0) < curly)) goto LA73;
											curly -= ((NI) 1);
										}
										LA73: ;
										llstreamwrite_203612((*p).outp, 125);
									}
									break;
									default:
									{
										llstreamwrite_203612((*p).outp, (*p).x->data[j]);
										j += ((NI) 1);
									}
									break;
									}
								}
							} LA62: ;
							llstreamwrite_203612((*p).outp, 41);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203612((*p).outp, 34);
						}
						break;
						case 97 ... 122:
						case 65 ... 90:
						case 128 ... 255:
						{
							llstreamwrite_203612((*p).outp, 34);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203593((*p).outp, (*p).tostr);
							llstreamwrite_203612((*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_203612((*p).outp, (*p).x->data[j]);
									j += ((NI) 1);
								} LA78: ;
							}
							llstreamwrite_203612((*p).outp, 41);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203612((*p).outp, 34);
						}
						break;
						default:
						{
							{
								if (!((NU8)((*p).x->data[j]) == (NU8)((*p).subschar))) goto LA82;
								llstreamwrite_203612((*p).outp, (*p).subschar);
								j += ((NI) 1);
							}
							goto LA80;
							LA82: ;
							{
								(*p).info.col = ((NI16) (j));
								localerror_188080((*p).info, ((NU16) 171), ((NimStringDesc*) &TMP1530));
							}
							LA80: ;
						}
						break;
						}
					}
					goto LA57;
					LA59: ;
					{
						llstreamwrite_203612((*p).outp, (*p).x->data[j]);
						j += ((NI) 1);
					}
					LA57: ;
				}
				break;
				}
			}
		} LA48: ;
		llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1543));
	}
	LA3: ;
}

N_NIMCALL(Tllstream203204*, filtertmpl_238003)(Tllstream203204* stdin_238005, NimStringDesc* filename, Tnode215790* call) {
	Tllstream203204* result;
	Ttmplparser238011 p;
	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	p.info = newlineinfo_184029(filename, ((NI) 0), ((NI) 0));
	p.outp = llstreamopen_203217(((NimStringDesc*) &TMP1522));
	p.inp = stdin_238005;
	p.subschar = chararg_237011(call, ((NimStringDesc*) &TMP1523), ((NI) 1), 36);
	p.nimdirective = chararg_237011(call, ((NimStringDesc*) &TMP1524), ((NI) 2), 35);
	p.emit = strarg_237017(call, ((NimStringDesc*) &TMP1525), ((NI) 3), ((NimStringDesc*) &TMP1526));
	p.conc = strarg_237017(call, ((NimStringDesc*) &TMP1527), ((NI) 4), ((NimStringDesc*) &TMP1528));
	p.tostr = strarg_237017(call, ((NimStringDesc*) &TMP1529), ((NI) 5), ((NimStringDesc*) &TMP1530));
	p.x = rawNewString(((NI) 120));
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = llstreamreadline_203550(p.inp, (&p.x));
			if (!LOC3) goto LA2;
			p.info.line = (NI16)(p.info.line + ((NI16) 1));
			parseline_238110((&p));
		} LA2: ;
	}
	newline_238032((&p));
	result = p.outp;
	llstreamclose_203277(p.inp);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, compiler_filter_tmplInit000)(void) {
}

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

