/* Generated by Nimrod Compiler v0.9.4 */
/*   (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  -I/build/nimrod/src/nimrod/lib -o nimcache/stdlib_streams.o nimcache/stdlib_streams.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>

#include <stdio.h>
typedef struct eio2433 eio2433;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct esystem2431 esystem2431;
typedef struct esynch2429 esynch2429;
typedef struct E_Base E_Base;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tcell41290 tcell41290;
typedef struct tcellseq41306 tcellseq41306;
typedef struct tgcheap43216 tgcheap43216;
typedef struct tcellset41302 tcellset41302;
typedef struct tpagedesc41298 tpagedesc41298;
typedef struct tmemregion23610 tmemregion23610;
typedef struct tsmallchunk22838 tsmallchunk22838;
typedef struct tllchunk23604 tllchunk23604;
typedef struct tbigchunk22840 tbigchunk22840;
typedef struct tintset22815 tintset22815;
typedef struct ttrunk22811 ttrunk22811;
typedef struct tavlnode23608 tavlnode23608;
typedef struct tgcstat43214 tgcstat43214;
typedef struct tstream123829 tstream123829;
typedef struct tstringstream124230 tstringstream124230;
typedef struct tfilestream124356 tfilestream124356;
typedef struct tbasechunk22836 tbasechunk22836;
typedef struct tfreecell22828 tfreecell22828;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
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  E_Base  {
  TNimObject Sup;
E_Base* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  esynch2429  {
  E_Base Sup;
};
struct  esystem2431  {
  esynch2429 Sup;
};
struct  eio2433  {
  esystem2431 Sup;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tcell41290  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41306  {
NI Len;
NI Cap;
tcell41290** D;
};
struct  tcellset41302  {
NI Counter;
NI Max;
tpagedesc41298* Head;
tpagedesc41298** Data;
};
typedef tsmallchunk22838* TY23622[512];
typedef ttrunk22811* ttrunkbuckets22813[256];
struct  tintset22815  {
ttrunkbuckets22813 Data;
};
struct  tmemregion23610  {
NI Minlargeobj;
NI Maxlargeobj;
TY23622 Freesmallchunks;
tllchunk23604* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22840* Freechunkslist;
tintset22815 Chunkstarts;
tavlnode23608* Root;
tavlnode23608* Deleted;
tavlnode23608* Last;
tavlnode23608* Freeavlnodes;
};
struct  tgcstat43214  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43216  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41306 Zct;
tcellseq41306 Decstack;
tcellset41302 Cycleroots;
tcellseq41306 Tempstack;
NI Recgclock;
tmemregion23610 Region;
tgcstat43214 Stat;
};
typedef N_NIMCALL_PTR(void, TY123830) (tstream123829* s);
typedef N_NIMCALL_PTR(NIM_BOOL, TY123834) (tstream123829* s);
typedef N_NIMCALL_PTR(void, TY123838) (tstream123829* s, NI pos);
typedef N_NIMCALL_PTR(NI, TY123843) (tstream123829* s);
typedef N_NIMCALL_PTR(NI, TY123847) (tstream123829* s, void* buffer, NI buflen);
typedef N_NIMCALL_PTR(void, TY123853) (tstream123829* s, void* buffer, NI buflen);
typedef N_NIMCALL_PTR(void, TY123859) (tstream123829* s);
struct  tstream123829  {
  TNimObject Sup;
TY123830 Closeimpl;
TY123834 Atendimpl;
TY123838 Setpositionimpl;
TY123843 Getpositionimpl;
TY123847 Readdataimpl;
TY123853 Writedataimpl;
TY123859 Flushimpl;
};
struct  tstringstream124230  {
  tstream123829 Sup;
NimStringDesc* Data;
NI Pos;
};
struct  tfilestream124356  {
  tstream123829 Sup;
FILE* F;
};
typedef NI TY22818[16];
struct  tpagedesc41298  {
tpagedesc41298* Next;
NI Key;
TY22818 Bits;
};
struct  tbasechunk22836  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22838  {
  tbasechunk22836 Sup;
tsmallchunk22838* Next;
tsmallchunk22838* Prev;
tfreecell22828* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23604  {
NI Size;
NI Acc;
tllchunk23604* Next;
};
struct  tbigchunk22840  {
  tbasechunk22836 Sup;
tbigchunk22840* Next;
tbigchunk22840* Prev;
NI Align;
NF Data;
};
struct  ttrunk22811  {
ttrunk22811* Next;
NI Key;
TY22818 Bits;
};
typedef tavlnode23608* TY23614[2];
struct  tavlnode23608  {
TY23614 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tfreecell22828  {
tfreecell22828* Next;
NI Zerofield;
};
N_NIMCALL(eio2433*, neweio_123803)(NimStringDesc* msg);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell41290*, usrtocell_44643)(void* usr);
static N_INLINE(void, nimFrame)(TFrame* s);
static N_INLINE(void, popFrame)(void);
static N_INLINE(void, rtladdzct_46202)(tcell41290* c);
N_NOINLINE(void, addzct_44618)(tcellseq41306* s, tcell41290* c);
N_NIMCALL(void, flush_123864)(tstream123829* s);
N_NIMCALL(void, close_123876)(tstream123829* s);
N_NIMCALL(void, close_123888)(tstream123829* s, tstream123829* unused);
N_NIMCALL(NIM_BOOL, atend_123894)(tstream123829* s);
N_NIMCALL(NIM_BOOL, atend_123900)(tstream123829* s, tstream123829* unused);
N_NIMCALL(void, setposition_123907)(tstream123829* s, NI pos);
N_NIMCALL(void, setposition_123913)(tstream123829* s, tstream123829* unused, NI pos);
N_NIMCALL(NI, getposition_123920)(tstream123829* s);
N_NIMCALL(NI, getposition_123926)(tstream123829* s, tstream123829* unused);
N_NIMCALL(NI, readdata_123933)(tstream123829* s, void* buffer, NI buflen);
N_NIMCALL(NI, readdata_123941)(tstream123829* s, tstream123829* unused, void* buffer, NI buflen);
N_NIMCALL(void, writedata_123950)(tstream123829* s, void* buffer, NI buflen);
N_NIMCALL(void, writedata_123957)(tstream123829* s, tstream123829* unused, void* buffer, NI buflen);
N_NIMCALL(void, write_123974)(tstream123829* s, NimStringDesc* x);
N_NIMCALL(void, writeln_123980)(tstream123829* s, NimStringDesc** args, NI argsLen0);
N_NOINLINE(void, raiseIndexError)(void);
static N_INLINE(NI, addInt)(NI a, NI b);
N_NOINLINE(void, raiseOverflow)(void);
N_NIMCALL(NIM_CHAR, readchar_124011)(tstream123829* s);
N_NIMCALL(void, read_124024)(tstream123829* s_124028, NIM_BOOL* result_124032);
N_NIMCALL(void, raiseException)(E_Base* e, NCSTRING ename);
N_NIMCALL(NIM_BOOL, readbool_124018)(tstream123829* s);
N_NIMCALL(void, read_124049)(tstream123829* s_124053, NI8* result_124057);
N_NIMCALL(NI8, readint8_124043)(tstream123829* s);
N_NIMCALL(void, read_124074)(tstream123829* s_124078, NI16* result_124082);
N_NIMCALL(NI16, readint16_124068)(tstream123829* s);
N_NIMCALL(void, read_124099)(tstream123829* s_124103, NI32* result_124107);
N_NIMCALL(NI32, readint32_124093)(tstream123829* s);
N_NIMCALL(void, read_124124)(tstream123829* s_124128, NI64* result_124132);
N_NIMCALL(NI64, readint64_124118)(tstream123829* s);
N_NIMCALL(void, read_124149)(tstream123829* s_124153, NF32* result_124157);
N_NIMCALL(NF32, readfloat32_124143)(tstream123829* s);
N_NIMCALL(void, read_124174)(tstream123829* s_124178, NF* result_124182);
N_NIMCALL(NF, readfloat64_124168)(tstream123829* s);
N_NIMCALL(NimStringDesc*, readstr_124193)(tstream123829* s, NI length);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(NIM_BOOL, readline_124204)(tstream123829* s, NimStringDesc** line);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, readline_124217)(tstream123829* s);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NIM_BOOL, ssatend_124234)(tstream123829* s_124236);
N_NIMCALL(void, chckObj)(TNimType* obj, TNimType* subclass);
N_NIMCALL(NI, clamp_124247)(NI x_124251, NI a_124253, NI b_124255);
N_NIMCALL(void, sssetposition_124241)(tstream123829* s_124243, NI pos);
N_NIMCALL(NI, ssgetposition_124262)(tstream123829* s_124264);
N_NIMCALL(NI, ssreaddata_124269)(tstream123829* s_124271, void* buffer, NI buflen);
static N_INLINE(NI, subInt)(NI a, NI b);
N_NIMCALL(void, sswritedata_124299)(tstream123829* s_124301, void* buffer, NI buflen);
N_NIMCALL(void, ssclose_124325)(tstream123829* s_124327);
N_NIMCALL(tstringstream124230*, newstringstream_124331)(NimStringDesc* s);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP320)(void* p, NI op);
N_NIMCALL(void, fsclose_124358)(tstream123829* s);
N_NIMCALL(void, fsflush_124379)(tstream123829* s);
N_NIMCALL(NIM_BOOL, fsatend_124383)(tstream123829* s);
N_NIMCALL(NIM_BOOL, endoffile_10428)(FILE* f);
N_NIMCALL(void, fssetposition_124388)(tstream123829* s, NI pos);
N_NIMCALL(void, setfilepos_10651)(FILE* f, NI64 pos);
N_NIMCALL(NI, fsgetposition_124393)(tstream123829* s);
N_NIMCALL(NI64, getfilepos_10655)(FILE* f);
N_NIMCALL(NI64, chckRange64)(NI64 i, NI64 a, NI64 b);
N_NIMCALL(NI, fsreaddata_124398)(tstream123829* s, void* buffer, NI buflen);
N_NIMCALL(NI, readbuffer_10627)(FILE* f, void* buffer, NI len);
N_NIMCALL(void, fswritedata_124405)(tstream123829* s, void* buffer, NI buflen);
N_NIMCALL(NI, writebuffer_10646)(FILE* f, void* buffer, NI len);
N_NIMCALL(tfilestream124356*, newfilestream_124411)(FILE* f);
N_NIMCALL(void, TMP322)(void* p, NI op);
N_NIMCALL(tfilestream124356*, newfilestream_124432)(NimStringDesc* filename, NU8 mode);
N_NIMCALL(NIM_BOOL, open_10203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(void, TMP347)(void* p, NI op);
STRING_LITERAL(TMP313, "\012", 1);
STRING_LITERAL(TMP314, "cannot read from stream", 23);
STRING_LITERAL(TMP315, "", 0);
STRING_LITERAL(TMP321, "cannot write to stream", 22);
extern TNimType NTI10401; /* ref EIO */
extern TNimType NTI2433; /* EIO */
extern TFrame* frameptr_13038;
extern tgcheap43216 gch_43244;
extern TNimType NTI2409; /* TObject */
TNimType NTI123829; /* TStream */
TNimType NTI123830; /* proc (PStream) */
TNimType NTI123834; /* proc (PStream): bool */
TNimType NTI123838; /* proc (PStream, int) */
TNimType NTI123843; /* proc (PStream): int */
TNimType NTI123847; /* proc (PStream, pointer, int): int */
TNimType NTI123853; /* proc (PStream, pointer, int) */
TNimType NTI123859; /* proc (PStream) */
TNimType NTI124230; /* TStringStream */
extern TNimType NTI143; /* string */
extern TNimType NTI106; /* int */
TNimType NTI124228; /* PStringStream */
TNimType NTI124356; /* TFileStream */
extern TNimType NTI10004; /* TFile */
TNimType NTI124354; /* PFileStream */
TNimType NTI123827; /* PStream */

static N_INLINE(void, nimFrame)(TFrame* s) {
	(*s).prev = frameptr_13038;
	frameptr_13038 = s;
}

static N_INLINE(void, popFrame)(void) {
	frameptr_13038 = (*frameptr_13038).prev;
}

static N_INLINE(tcell41290*, usrtocell_44643)(void* usr) {
	tcell41290* result;
	nimfr("usrToCell", "gc.nim")
	result = 0;
	nimln(118, "gc.nim");
	nimln(118, "gc.nim");
	nimln(118, "gc.nim");
	result = ((tcell41290*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(tcell41290))))));
	popFrame();
	return result;
}

static N_INLINE(void, rtladdzct_46202)(tcell41290* c) {
	nimfr("rtlAddZCT", "gc.nim")
	nimln(199, "gc.nim");
	addzct_44618(&gch_43244.Zct, c);
	popFrame();
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41290* c;
	nimfr("nimGCunrefNoCycle", "gc.nim")
	nimln(233, "gc.nim");
	c = usrtocell_44643(p);
	nimln(235, "gc.nim");
	{
		nimln(167, "gc.nim");
		(*c).Refcount -= 8;
		nimln(168, "gc.nim");
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		nimln(236, "gc.nim");
		rtladdzct_46202(c);
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(eio2433*, neweio_123803)(NimStringDesc* msg) {
	eio2433* result;
	NimStringDesc* LOC1;
	nimfr("newEIO", "streams.nim")
	result = 0;
	nimln(18, "streams.nim");
	result = (eio2433*) newObj((&NTI10401), sizeof(eio2433));
	(*result).Sup.Sup.Sup.Sup.m_type = (&NTI2433);
	nimln(19, "streams.nim");
	LOC1 = 0;
	LOC1 = (*result).Sup.Sup.Sup.message; (*result).Sup.Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	popFrame();
	return result;
}

N_NIMCALL(void, flush_123864)(tstream123829* s) {
	nimfr("flush", "streams.nim")
	nimln(40, "streams.nim");
	{
		nimln(40, "streams.nim");
		nimln(40, "streams.nim");
		if (!!((*s).Flushimpl == 0)) goto LA3;
		nimln(40, "streams.nim");
		(*s).Flushimpl(s);
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, close_123876)(tstream123829* s) {
	nimfr("close", "streams.nim")
	nimln(44, "streams.nim");
	{
		nimln(44, "streams.nim");
		nimln(44, "streams.nim");
		if (!!((*s).Closeimpl == 0)) goto LA3;
		nimln(44, "streams.nim");
		(*s).Closeimpl(s);
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, close_123888)(tstream123829* s, tstream123829* unused) {
	nimfr("close", "streams.nim")
	nimln(48, "streams.nim");
	(*s).Closeimpl(s);
	popFrame();
}

N_NIMCALL(NIM_BOOL, atend_123894)(tstream123829* s) {
	NIM_BOOL result;
	nimfr("atEnd", "streams.nim")
	result = 0;
	nimln(53, "streams.nim");
	result = (*s).Atendimpl(s);
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, atend_123900)(tstream123829* s, tstream123829* unused) {
	NIM_BOOL result;
	nimfr("atEnd", "streams.nim")
	result = 0;
	nimln(58, "streams.nim");
	result = (*s).Atendimpl(s);
	popFrame();
	return result;
}

N_NIMCALL(void, setposition_123907)(tstream123829* s, NI pos) {
	nimfr("setPosition", "streams.nim")
	nimln(62, "streams.nim");
	(*s).Setpositionimpl(s, pos);
	popFrame();
}

N_NIMCALL(void, setposition_123913)(tstream123829* s, tstream123829* unused, NI pos) {
	nimfr("setPosition", "streams.nim")
	nimln(66, "streams.nim");
	(*s).Setpositionimpl(s, pos);
	popFrame();
}

N_NIMCALL(NI, getposition_123920)(tstream123829* s) {
	NI result;
	nimfr("getPosition", "streams.nim")
	result = 0;
	nimln(70, "streams.nim");
	result = (*s).Getpositionimpl(s);
	popFrame();
	return result;
}

N_NIMCALL(NI, getposition_123926)(tstream123829* s, tstream123829* unused) {
	NI result;
	nimfr("getPosition", "streams.nim")
	result = 0;
	nimln(74, "streams.nim");
	result = (*s).Getpositionimpl(s);
	popFrame();
	return result;
}

N_NIMCALL(NI, readdata_123933)(tstream123829* s, void* buffer, NI buflen) {
	NI result;
	nimfr("readData", "streams.nim")
	result = 0;
	nimln(78, "streams.nim");
	result = (*s).Readdataimpl(s, buffer, buflen);
	popFrame();
	return result;
}

N_NIMCALL(NI, readdata_123941)(tstream123829* s, tstream123829* unused, void* buffer, NI buflen) {
	NI result;
	nimfr("readData", "streams.nim")
	result = 0;
	nimln(83, "streams.nim");
	result = (*s).Readdataimpl(s, buffer, buflen);
	popFrame();
	return result;
}

N_NIMCALL(void, writedata_123950)(tstream123829* s, void* buffer, NI buflen) {
	nimfr("writeData", "streams.nim")
	nimln(88, "streams.nim");
	(*s).Writedataimpl(s, buffer, buflen);
	popFrame();
}

N_NIMCALL(void, writedata_123957)(tstream123829* s, tstream123829* unused, void* buffer, NI buflen) {
	nimfr("writeData", "streams.nim")
	nimln(94, "streams.nim");
	(*s).Writedataimpl(s, buffer, buflen);
	popFrame();
}

N_NIMCALL(void, write_123974)(tstream123829* s, NimStringDesc* x) {
	nimfr("write", "streams.nim")
	nimln(109, "streams.nim");
	nimln(109, "streams.nim");
	writedata_123950(s, ((void*) (x->data)), x->Sup.len);
	popFrame();
}

static N_INLINE(NI, addInt)(NI a, NI b) {
	NI result;
	result = 0;
	result = (NI)((NU32)(a) + (NU32)(b));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (0 <= (NI)(result ^ a));
		if (LOC3) goto LA4;
		LOC3 = (0 <= (NI)(result ^ b));
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, writeln_123980)(tstream123829* s, NimStringDesc** args, NI argsLen0) {
	NimStringDesc* str_123996;
	NI i_123998;
	nimfr("writeln", "streams.nim")
	str_123996 = 0;
	nimln(1531, "system.nim");
	i_123998 = 0;
	nimln(1532, "system.nim");
	while (1) {
		nimln(1532, "system.nim");
		nimln(1532, "system.nim");
		if (!(i_123998 < argsLen0)) goto LA1;
		nimln(1533, "system.nim");
		if ((NU)(i_123998) >= (NU)(argsLen0)) raiseIndexError();
		str_123996 = args[i_123998];
		nimln(114, "streams.nim");
		write_123974(s, str_123996);
		nimln(1534, "system.nim");
		i_123998 = addInt(i_123998, 1);
	} LA1: ;
	nimln(115, "streams.nim");
	write_123974(s, ((NimStringDesc*) &TMP313));
	popFrame();
}

N_NIMCALL(NIM_CHAR, readchar_124011)(tstream123829* s) {
	NIM_CHAR result;
	nimfr("readChar", "streams.nim")
	result = 0;
	nimln(125, "streams.nim");
	{
		NI LOC3;
		nimln(125, "streams.nim");
		nimln(125, "streams.nim");
		nimln(125, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s, ((void*) (&result)), 1);
		if (!!((LOC3 == 1))) goto LA4;
		nimln(125, "streams.nim");
		result = 0;
	}
	LA4: ;
	popFrame();
	return result;
}

N_NIMCALL(void, read_124024)(tstream123829* s_124028, NIM_BOOL* result_124032) {
	nimfr("read", "streams.nim")
	nimln(119, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s_124028, ((void*) (result_124032)), 1);
		if (!!((LOC3 == 1))) goto LA4;
		nimln(120, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP314));
		nimln(120, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NIM_BOOL, readbool_124018)(tstream123829* s) {
	NIM_BOOL result;
	nimfr("readBool", "streams.nim")
	result = 0;
	nimln(129, "streams.nim");
	read_124024(s, &result);
	popFrame();
	return result;
}

N_NIMCALL(void, read_124049)(tstream123829* s_124053, NI8* result_124057) {
	nimfr("read", "streams.nim")
	nimln(119, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s_124053, ((void*) (result_124057)), 1);
		if (!!((LOC3 == 1))) goto LA4;
		nimln(120, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP314));
		nimln(120, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NI8, readint8_124043)(tstream123829* s) {
	NI8 result;
	nimfr("readInt8", "streams.nim")
	result = 0;
	nimln(133, "streams.nim");
	read_124049(s, &result);
	popFrame();
	return result;
}

N_NIMCALL(void, read_124074)(tstream123829* s_124078, NI16* result_124082) {
	nimfr("read", "streams.nim")
	nimln(119, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s_124078, ((void*) (result_124082)), 2);
		if (!!((LOC3 == 2))) goto LA4;
		nimln(120, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP314));
		nimln(120, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NI16, readint16_124068)(tstream123829* s) {
	NI16 result;
	nimfr("readInt16", "streams.nim")
	result = 0;
	nimln(137, "streams.nim");
	read_124074(s, &result);
	popFrame();
	return result;
}

N_NIMCALL(void, read_124099)(tstream123829* s_124103, NI32* result_124107) {
	nimfr("read", "streams.nim")
	nimln(119, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s_124103, ((void*) (result_124107)), 4);
		if (!!((LOC3 == 4))) goto LA4;
		nimln(120, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP314));
		nimln(120, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NI32, readint32_124093)(tstream123829* s) {
	NI32 result;
	nimfr("readInt32", "streams.nim")
	result = 0;
	nimln(141, "streams.nim");
	read_124099(s, &result);
	popFrame();
	return result;
}

N_NIMCALL(void, read_124124)(tstream123829* s_124128, NI64* result_124132) {
	nimfr("read", "streams.nim")
	nimln(119, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s_124128, ((void*) (result_124132)), 8);
		if (!!((LOC3 == 8))) goto LA4;
		nimln(120, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP314));
		nimln(120, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NI64, readint64_124118)(tstream123829* s) {
	NI64 result;
	nimfr("readInt64", "streams.nim")
	result = 0;
	nimln(145, "streams.nim");
	read_124124(s, &result);
	popFrame();
	return result;
}

N_NIMCALL(void, read_124149)(tstream123829* s_124153, NF32* result_124157) {
	nimfr("read", "streams.nim")
	nimln(119, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s_124153, ((void*) (result_124157)), 4);
		if (!!((LOC3 == 4))) goto LA4;
		nimln(120, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP314));
		nimln(120, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NF32, readfloat32_124143)(tstream123829* s) {
	NF32 result;
	nimfr("readFloat32", "streams.nim")
	result = 0;
	nimln(149, "streams.nim");
	read_124149(s, &result);
	popFrame();
	return result;
}

N_NIMCALL(void, read_124174)(tstream123829* s_124178, NF* result_124182) {
	nimfr("read", "streams.nim")
	nimln(119, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		nimln(119, "streams.nim");
		LOC3 = 0;
		LOC3 = readdata_123933(s_124178, ((void*) (result_124182)), 8);
		if (!!((LOC3 == 8))) goto LA4;
		nimln(120, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP314));
		nimln(120, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NF, readfloat64_124168)(tstream123829* s) {
	NF result;
	nimfr("readFloat64", "streams.nim")
	result = 0;
	nimln(153, "streams.nim");
	read_124174(s, &result);
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, readstr_124193)(tstream123829* s, NI length) {
	NimStringDesc* result;
	NI l;
	nimfr("readStr", "streams.nim")
	result = 0;
	nimln(158, "streams.nim");
	nimln(158, "streams.nim");
	result = mnewString(length);
	nimln(159, "streams.nim");
	if ((NU)(0) > (NU)(result->Sup.len)) raiseIndexError();
	l = readdata_123933(s, ((void*) (&result->data[0])), length);
	nimln(160, "streams.nim");
	{
		nimln(160, "streams.nim");
		nimln(160, "streams.nim");
		if (!!((l == length))) goto LA3;
		nimln(160, "streams.nim");
		result = setLengthStr(result, l);
	}
	LA3: ;
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, readline_124204)(tstream123829* s, NimStringDesc** line) {
	NIM_BOOL result;
	nimfr("readLine", "streams.nim")
	result = 0;
	nimln(169, "streams.nim");
	(*line) = setLengthStr((*line), 0);
	nimln(170, "streams.nim");
	while (1) {
		NIM_CHAR c;
		nimln(171, "streams.nim");
		c = readchar_124011(s);
		nimln(172, "streams.nim");
		{
			nimln(172, "streams.nim");
			if (!((NU8)(c) == (NU8)(13))) goto LA4;
			nimln(173, "streams.nim");
			c = readchar_124011(s);
			nimln(174, "streams.nim");
			goto LA1;
		}
		goto LA2;
		LA4: ;
		{
			nimln(175, "streams.nim");
			if (!((NU8)(c) == (NU8)(10))) goto LA7;
			nimln(175, "streams.nim");
			goto LA1;
		}
		goto LA2;
		LA7: ;
		{
			nimln(176, "streams.nim");
			if (!((NU8)(c) == (NU8)(0))) goto LA10;
			nimln(177, "streams.nim");
			{
				nimln(177, "streams.nim");
				nimln(177, "streams.nim");
				if (!(0 < (*line)->Sup.len)) goto LA14;
				nimln(177, "streams.nim");
				goto LA1;
			}
			goto LA12;
			LA14: ;
			{
				nimln(178, "streams.nim");
				nimln(178, "streams.nim");
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA12: ;
		}
		goto LA2;
		LA10: ;
		LA2: ;
		nimln(179, "streams.nim");
		(*line) = addChar((*line), c);
	} LA1: ;
	nimln(180, "streams.nim");
	result = NIM_TRUE;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, readline_124217)(tstream123829* s) {
	NimStringDesc* result;
	nimfr("readLine", "streams.nim")
	result = 0;
	nimln(185, "streams.nim");
	result = copyString(((NimStringDesc*) &TMP315));
	nimln(186, "streams.nim");
	while (1) {
		NIM_CHAR c;
		nimln(187, "streams.nim");
		c = readchar_124011(s);
		nimln(188, "streams.nim");
		{
			nimln(188, "streams.nim");
			if (!((NU8)(c) == (NU8)(13))) goto LA4;
			nimln(189, "streams.nim");
			c = readchar_124011(s);
			nimln(190, "streams.nim");
			goto LA1;
		}
		LA4: ;
		nimln(191, "streams.nim");
		{
			NIM_BOOL LOC8;
			nimln(191, "streams.nim");
			LOC8 = 0;
			nimln(191, "streams.nim");
			LOC8 = ((NU8)(c) == (NU8)(10));
			if (LOC8) goto LA9;
			nimln(191, "streams.nim");
			LOC8 = ((NU8)(c) == (NU8)(0));
			LA9: ;
			if (!LOC8) goto LA10;
			nimln(192, "streams.nim");
			goto LA1;
		}
		goto LA6;
		LA10: ;
		{
			nimln(194, "streams.nim");
			result = addChar(result, c);
		}
		LA6: ;
	} LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, ssatend_124234)(tstream123829* s_124236) {
	NIM_BOOL result;
	tstringstream124230* s;
	nimfr("ssAtEnd", "streams.nim")
	result = 0;
	nimln(203, "streams.nim");
	if (s_124236) chckObj((*s_124236).Sup.m_type, (&NTI124230));
	s = ((tstringstream124230*) (s_124236));
	nimln(204, "streams.nim");
	nimln(204, "streams.nim");
	nimln(204, "streams.nim");
	nimln(204, "streams.nim");
	result = ((*s).Data->Sup.len <= (*s).Pos);
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void, sssetposition_124241)(tstream123829* s_124243, NI pos) {
	tstringstream124230* s;
	nimfr("ssSetPosition", "streams.nim")
	nimln(207, "streams.nim");
	if (s_124243) chckObj((*s_124243).Sup.m_type, (&NTI124230));
	s = ((tstringstream124230*) (s_124243));
	nimln(208, "streams.nim");
	nimln(208, "streams.nim");
	(*s).Pos = clamp_124247(pos, 0, ((*s).Data->Sup.len-1));
	popFrame();
}

N_NIMCALL(NI, ssgetposition_124262)(tstream123829* s_124264) {
	NI result;
	tstringstream124230* s;
	nimfr("ssGetPosition", "streams.nim")
	result = 0;
	nimln(211, "streams.nim");
	if (s_124264) chckObj((*s_124264).Sup.m_type, (&NTI124230));
	s = ((tstringstream124230*) (s_124264));
	nimln(212, "streams.nim");
	nimln(212, "streams.nim");
	result = (*s).Pos;
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

static N_INLINE(NI, subInt)(NI a, NI b) {
	NI result;
	result = 0;
	result = (NI)((NU32)(a) - (NU32)(b));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (0 <= (NI)(result ^ a));
		if (LOC3) goto LA4;
		LOC3 = (0 <= (NI)(result ^ (NI)((NU32) ~(b))));
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, ssreaddata_124269)(tstream123829* s_124271, void* buffer, NI buflen) {
	NI result;
	tstringstream124230* s;
	NI TMP318;
	nimfr("ssReadData", "streams.nim")
	result = 0;
	nimln(215, "streams.nim");
	if (s_124271) chckObj((*s_124271).Sup.m_type, (&NTI124230));
	s = ((tstringstream124230*) (s_124271));
	nimln(216, "streams.nim");
	nimln(216, "streams.nim");
	nimln(216, "streams.nim");
	nimln(216, "streams.nim");
	TMP318 = subInt((*s).Data->Sup.len, (*s).Pos);
	result = ((buflen <= (NI32)(TMP318)) ? buflen : (NI32)(TMP318));
	nimln(217, "streams.nim");
	{
		nimln(217, "streams.nim");
		if (!(0 < result)) goto LA3;
		nimln(218, "streams.nim");
		if ((NU)((*s).Pos) > (NU)((*s).Data->Sup.len)) raiseIndexError();
		memcpy(buffer, ((void*) (&(*s).Data->data[(*s).Pos])), result);
		nimln(219, "streams.nim");
		(*s).Pos = addInt((*s).Pos, result);
	}
	LA3: ;
	popFrame();
	return result;
}

N_NIMCALL(void, sswritedata_124299)(tstream123829* s_124301, void* buffer, NI buflen) {
	tstringstream124230* s;
	nimfr("ssWriteData", "streams.nim")
	nimln(222, "streams.nim");
	if (s_124301) chckObj((*s_124301).Sup.m_type, (&NTI124230));
	s = ((tstringstream124230*) (s_124301));
	nimln(223, "streams.nim");
	{
		NI TMP319;
		nimln(223, "streams.nim");
		if (!(0 < buflen)) goto LA3;
		nimln(224, "streams.nim");
		nimln(224, "streams.nim");
		nimln(224, "streams.nim");
		TMP319 = addInt((*s).Data->Sup.len, buflen);
		(*s).Data = setLengthStr((*s).Data, (NI32)(TMP319));
		nimln(225, "streams.nim");
		if ((NU)((*s).Pos) > (NU)((*s).Data->Sup.len)) raiseIndexError();
		memcpy(((void*) (&(*s).Data->data[(*s).Pos])), buffer, buflen);
		nimln(226, "streams.nim");
		(*s).Pos = addInt((*s).Pos, buflen);
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, ssclose_124325)(tstream123829* s_124327) {
	tstringstream124230* s;
	NimStringDesc* LOC1;
	nimfr("ssClose", "streams.nim")
	nimln(229, "streams.nim");
	if (s_124327) chckObj((*s_124327).Sup.m_type, (&NTI124230));
	s = ((tstringstream124230*) (s_124327));
	nimln(230, "streams.nim");
	LOC1 = 0;
	LOC1 = (*s).Data; (*s).Data = copyStringRC1(NIM_NIL);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	popFrame();
}
N_NIMCALL(void, TMP320)(void* p, NI op) {
	tstringstream124230* a;
	a = (tstringstream124230*)p;
	nimGCvisit((void*)(*a).Data, op);
}

N_NIMCALL(tstringstream124230*, newstringstream_124331)(NimStringDesc* s) {
	tstringstream124230* result;
	NimStringDesc* LOC1;
	nimfr("newStringStream", "streams.nim")
	result = 0;
	nimln(234, "streams.nim");
	result = (tstringstream124230*) newObj((&NTI124228), sizeof(tstringstream124230));
	(*result).Sup.Sup.m_type = (&NTI124230);
	nimln(235, "streams.nim");
	LOC1 = 0;
	LOC1 = (*result).Data; (*result).Data = copyStringRC1(s);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	nimln(236, "streams.nim");
	(*result).Pos = 0;
	nimln(237, "streams.nim");
	(*result).Sup.Closeimpl = ssclose_124325;
	nimln(238, "streams.nim");
	(*result).Sup.Atendimpl = ssatend_124234;
	nimln(239, "streams.nim");
	(*result).Sup.Setpositionimpl = sssetposition_124241;
	nimln(240, "streams.nim");
	(*result).Sup.Getpositionimpl = ssgetposition_124262;
	nimln(241, "streams.nim");
	(*result).Sup.Readdataimpl = ssreaddata_124269;
	nimln(242, "streams.nim");
	(*result).Sup.Writedataimpl = sswritedata_124299;
	popFrame();
	return result;
}

N_NIMCALL(void, fsclose_124358)(tstream123829* s) {
	nimfr("fsClose", "streams.nim")
	nimln(252, "streams.nim");
	{
		nimln(252, "streams.nim");
		nimln(252, "streams.nim");
		if (s) chckObj((*s).Sup.m_type, (&NTI124356));
		if (!!(((*((tfilestream124356*) (s))).F == NIM_NIL))) goto LA3;
		nimln(253, "streams.nim");
		if (s) chckObj((*s).Sup.m_type, (&NTI124356));
		fclose((*((tfilestream124356*) (s))).F);
		nimln(254, "streams.nim");
		if (s) chckObj((*s).Sup.m_type, (&NTI124356));
		(*((tfilestream124356*) (s))).F = NIM_NIL;
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, fsflush_124379)(tstream123829* s) {
	nimfr("fsFlush", "streams.nim")
	nimln(255, "streams.nim");
	if (s) chckObj((*s).Sup.m_type, (&NTI124356));
	fflush((*((tfilestream124356*) (s))).F);
	popFrame();
}

N_NIMCALL(NIM_BOOL, fsatend_124383)(tstream123829* s) {
	NIM_BOOL result;
	nimfr("fsAtEnd", "streams.nim")
	result = 0;
	nimln(256, "streams.nim");
	nimln(256, "streams.nim");
	if (s) chckObj((*s).Sup.m_type, (&NTI124356));
	result = endoffile_10428((*((tfilestream124356*) (s))).F);
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void, fssetposition_124388)(tstream123829* s, NI pos) {
	nimfr("fsSetPosition", "streams.nim")
	nimln(257, "streams.nim");
	if (s) chckObj((*s).Sup.m_type, (&NTI124356));
	setfilepos_10651((*((tfilestream124356*) (s))).F, ((NI64) (pos)));
	popFrame();
}

N_NIMCALL(NI, fsgetposition_124393)(tstream123829* s) {
	NI result;
	NI64 LOC1;
	nimfr("fsGetPosition", "streams.nim")
	result = 0;
	nimln(258, "streams.nim");
	nimln(258, "streams.nim");
	nimln(258, "streams.nim");
	if (s) chckObj((*s).Sup.m_type, (&NTI124356));
	LOC1 = 0;
	LOC1 = getfilepos_10655((*((tfilestream124356*) (s))).F);
	result = ((NI)chckRange64(LOC1, (-2147483647 -1), 2147483647));
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NI, fsreaddata_124398)(tstream123829* s, void* buffer, NI buflen) {
	NI result;
	nimfr("fsReadData", "streams.nim")
	result = 0;
	nimln(261, "streams.nim");
	if (s) chckObj((*s).Sup.m_type, (&NTI124356));
	result = readbuffer_10627((*((tfilestream124356*) (s))).F, buffer, buflen);
	popFrame();
	return result;
}

N_NIMCALL(void, fswritedata_124405)(tstream123829* s, void* buffer, NI buflen) {
	nimfr("fsWriteData", "streams.nim")
	nimln(264, "streams.nim");
	{
		NI LOC3;
		eio2433* LOC6;
		nimln(264, "streams.nim");
		nimln(264, "streams.nim");
		nimln(264, "streams.nim");
		if (s) chckObj((*s).Sup.m_type, (&NTI124356));
		LOC3 = 0;
		LOC3 = writebuffer_10646((*((tfilestream124356*) (s))).F, buffer, buflen);
		if (!!((LOC3 == buflen))) goto LA4;
		nimln(265, "streams.nim");
		LOC6 = 0;
		LOC6 = neweio_123803(((NimStringDesc*) &TMP321));
		nimln(265, "streams.nim");
		raiseException((E_Base*)LOC6, "EIO");
	}
	LA4: ;
	popFrame();
}
N_NIMCALL(void, TMP322)(void* p, NI op) {
	tfilestream124356* a;
	a = (tfilestream124356*)p;
}

N_NIMCALL(tfilestream124356*, newfilestream_124411)(FILE* f) {
	tfilestream124356* result;
	nimfr("newFileStream", "streams.nim")
	result = 0;
	nimln(269, "streams.nim");
	result = (tfilestream124356*) newObj((&NTI124354), sizeof(tfilestream124356));
	(*result).Sup.Sup.m_type = (&NTI124356);
	nimln(270, "streams.nim");
	(*result).F = f;
	nimln(271, "streams.nim");
	(*result).Sup.Closeimpl = fsclose_124358;
	nimln(272, "streams.nim");
	(*result).Sup.Atendimpl = fsatend_124383;
	nimln(273, "streams.nim");
	(*result).Sup.Setpositionimpl = fssetposition_124388;
	nimln(274, "streams.nim");
	(*result).Sup.Getpositionimpl = fsgetposition_124393;
	nimln(275, "streams.nim");
	(*result).Sup.Readdataimpl = fsreaddata_124398;
	nimln(276, "streams.nim");
	(*result).Sup.Writedataimpl = fswritedata_124405;
	nimln(277, "streams.nim");
	(*result).Sup.Flushimpl = fsflush_124379;
	popFrame();
	return result;
}

N_NIMCALL(tfilestream124356*, newfilestream_124432)(NimStringDesc* filename, NU8 mode) {
	tfilestream124356* result;
	FILE* f;
	nimfr("newFileStream", "streams.nim")
	result = 0;
	f = 0;
	nimln(284, "streams.nim");
	{
		NIM_BOOL LOC3;
		nimln(284, "streams.nim");
		LOC3 = 0;
		LOC3 = open_10203(&f, filename, mode, -1);
		if (!LOC3) goto LA4;
		nimln(284, "streams.nim");
		result = newfilestream_124411(f);
	}
	LA4: ;
	popFrame();
	return result;
}
N_NIMCALL(void, TMP347)(void* p, NI op) {
	tstream123829* a;
	a = (tstream123829*)p;
}
N_NOINLINE(void, stdlibstreamsInit)(void) {
	nimfr("streams", "streams.nim")
	popFrame();
}

N_NOINLINE(void, stdlibstreamsDatInit)(void) {
static TNimNode* TMP316[7];
static TNimNode* TMP317[2];
static TNimNode TMP311[12];
NTI123829.size = sizeof(tstream123829);
NTI123829.kind = 17;
NTI123829.base = (&NTI2409);
NTI123829.flags = 1;
TMP316[0] = &TMP311[1];
NTI123830.size = sizeof(TY123830);
NTI123830.kind = 25;
NTI123830.base = 0;
NTI123830.flags = 3;
TMP311[1].kind = 1;
TMP311[1].offset = offsetof(tstream123829, Closeimpl);
TMP311[1].typ = (&NTI123830);
TMP311[1].name = "closeImpl";
TMP316[1] = &TMP311[2];
NTI123834.size = sizeof(TY123834);
NTI123834.kind = 25;
NTI123834.base = 0;
NTI123834.flags = 3;
TMP311[2].kind = 1;
TMP311[2].offset = offsetof(tstream123829, Atendimpl);
TMP311[2].typ = (&NTI123834);
TMP311[2].name = "atEndImpl";
TMP316[2] = &TMP311[3];
NTI123838.size = sizeof(TY123838);
NTI123838.kind = 25;
NTI123838.base = 0;
NTI123838.flags = 3;
TMP311[3].kind = 1;
TMP311[3].offset = offsetof(tstream123829, Setpositionimpl);
TMP311[3].typ = (&NTI123838);
TMP311[3].name = "setPositionImpl";
TMP316[3] = &TMP311[4];
NTI123843.size = sizeof(TY123843);
NTI123843.kind = 25;
NTI123843.base = 0;
NTI123843.flags = 3;
TMP311[4].kind = 1;
TMP311[4].offset = offsetof(tstream123829, Getpositionimpl);
TMP311[4].typ = (&NTI123843);
TMP311[4].name = "getPositionImpl";
TMP316[4] = &TMP311[5];
NTI123847.size = sizeof(TY123847);
NTI123847.kind = 25;
NTI123847.base = 0;
NTI123847.flags = 3;
TMP311[5].kind = 1;
TMP311[5].offset = offsetof(tstream123829, Readdataimpl);
TMP311[5].typ = (&NTI123847);
TMP311[5].name = "readDataImpl";
TMP316[5] = &TMP311[6];
NTI123853.size = sizeof(TY123853);
NTI123853.kind = 25;
NTI123853.base = 0;
NTI123853.flags = 3;
TMP311[6].kind = 1;
TMP311[6].offset = offsetof(tstream123829, Writedataimpl);
TMP311[6].typ = (&NTI123853);
TMP311[6].name = "writeDataImpl";
TMP316[6] = &TMP311[7];
NTI123859.size = sizeof(TY123859);
NTI123859.kind = 25;
NTI123859.base = 0;
NTI123859.flags = 3;
TMP311[7].kind = 1;
TMP311[7].offset = offsetof(tstream123829, Flushimpl);
TMP311[7].typ = (&NTI123859);
TMP311[7].name = "flushImpl";
TMP311[0].len = 7; TMP311[0].kind = 2; TMP311[0].sons = &TMP316[0];
NTI123829.node = &TMP311[0];
NTI124230.size = sizeof(tstringstream124230);
NTI124230.kind = 17;
NTI124230.base = (&NTI123829);
TMP317[0] = &TMP311[9];
TMP311[9].kind = 1;
TMP311[9].offset = offsetof(tstringstream124230, Data);
TMP311[9].typ = (&NTI143);
TMP311[9].name = "data";
TMP317[1] = &TMP311[10];
TMP311[10].kind = 1;
TMP311[10].offset = offsetof(tstringstream124230, Pos);
TMP311[10].typ = (&NTI106);
TMP311[10].name = "pos";
TMP311[8].len = 2; TMP311[8].kind = 2; TMP311[8].sons = &TMP317[0];
NTI124230.node = &TMP311[8];
NTI124228.size = sizeof(tstringstream124230*);
NTI124228.kind = 22;
NTI124228.base = (&NTI124230);
NTI124228.marker = TMP320;
NTI124356.size = sizeof(tfilestream124356);
NTI124356.kind = 17;
NTI124356.base = (&NTI123829);
NTI124356.flags = 1;
TMP311[11].kind = 1;
TMP311[11].offset = offsetof(tfilestream124356, F);
TMP311[11].typ = (&NTI10004);
TMP311[11].name = "f";
NTI124356.node = &TMP311[11];
NTI124354.size = sizeof(tfilestream124356*);
NTI124354.kind = 22;
NTI124354.base = (&NTI124356);
NTI124354.marker = TMP322;
NTI123827.size = sizeof(tstream123829*);
NTI123827.kind = 22;
NTI123827.base = (&NTI123829);
NTI123827.marker = TMP347;
}

