/* Generated by Nim Compiler v1.6.14 */
#define NIM_INTBITS 32

#include "nimbase.h"
#include <stdio.h>
#include <setjmp.h>
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg;
typedef struct RootObj RootObj;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw;
typedef struct tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA;
typedef struct Exception Exception;
typedef struct tySequence__QbmGqFaLnb1IWWToREeaIA tySequence__QbmGqFaLnb1IWWToREeaIA;
typedef struct TSafePoint TSafePoint;
typedef struct tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA;
typedef struct tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ;
typedef struct tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g;
typedef struct tyObject_CellSeq__nav876ELHgxScHhs30CKiA tyObject_CellSeq__nav876ELHgxScHhs30CKiA;
typedef struct tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ;
typedef struct tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ;
typedef struct tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ;
typedef struct tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw;
typedef struct tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA;
typedef struct tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA;
typedef struct tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A;
typedef struct tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg;
typedef struct tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw;
typedef struct tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw;
typedef struct tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA;
typedef struct tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg;
typedef struct tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA;
typedef struct tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ;
typedef struct tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g;
typedef struct tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA;
typedef NU8 tyEnum_TNimKind__pspQAsqJLrw3jEKBD9bxmyQ;
typedef NU8 tySet_tyEnum_TNimTypeFlag__Yt5hq6z2IoHhKZrzIVrc1w;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
NI align;
tyEnum_TNimKind__pspQAsqJLrw3jEKBD9bxmyQ kind;
tySet_tyEnum_TNimTypeFlag__Yt5hq6z2IoHhKZrzIVrc1w flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
typedef NU8 tyEnum_TNimNodeKind__rrp49bl1h9aEkXfXp9bNg0yZw;
struct TNimNode {
tyEnum_TNimNodeKind__rrp49bl1h9aEkXfXp9bNg0yZw kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct RootObj {
TNimType* m_type;
};
typedef N_NIMCALL_PTR(void, tyProc__u1QtPTYUJu1ozpzb9a8xchw) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__VytW5cBLp1DOuwAj9cjoj3Q) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
typedef N_NIMCALL_PTR(void, tyProc__nAUmmvz53fMDhkU9aQ4i60Q) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NI pos);
typedef N_NIMCALL_PTR(NI, tyProc__rvgAWCz6iG9cntloh2xzZmQ) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef N_NIMCALL_PTR(NI, tyProc__sAr4e3JGOuIBVEZ29aGGKUQ) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** buffer, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw slice);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__7SoiV5lfjKUldz1ENKXq1w) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** line);
typedef N_NIMCALL_PTR(NI, tyProc__mPF9ae7sAGGCOezlsIuH6Yg) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
typedef N_NIMCALL_PTR(void, tyProc__1nrRaSRiXjiE9bnEpZhmOsA) (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
struct tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg {
  RootObj Sup;
tyProc__u1QtPTYUJu1ozpzb9a8xchw closeImpl;
tyProc__VytW5cBLp1DOuwAj9cjoj3Q atEndImpl;
tyProc__nAUmmvz53fMDhkU9aQ4i60Q setPositionImpl;
tyProc__rvgAWCz6iG9cntloh2xzZmQ getPositionImpl;
tyProc__sAr4e3JGOuIBVEZ29aGGKUQ readDataStrImpl;
tyProc__7SoiV5lfjKUldz1ENKXq1w readLineImpl;
tyProc__mPF9ae7sAGGCOezlsIuH6Yg readDataImpl;
tyProc__mPF9ae7sAGGCOezlsIuH6Yg peekDataImpl;
tyProc__1nrRaSRiXjiE9bnEpZhmOsA writeDataImpl;
tyProc__u1QtPTYUJu1ozpzb9a8xchw flushImpl;
};
struct tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA {
  tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg Sup;
FILE* f;
};
typedef NU8 tyEnum_FileSeekPos__3d8x2zL20seOaib8DHfcRg;
struct tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw {
NI a;
NI b;
};
struct Exception {
  RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__QbmGqFaLnb1IWWToREeaIA* trace;
Exception* up;
};
struct TSafePoint {
TSafePoint* prev;
NI status;
jmp_buf context;
};
struct tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ {
  Exception Sup;
};
struct tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA {
  tyObject_CatchableError__8K3kdpxrBD9aI27J0kpSCpQ Sup;
};
struct tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g {
NI refcount;
TNimType* typ;
};
struct tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ {
void* bottom;
};
struct tyObject_CellSeq__nav876ELHgxScHhs30CKiA {
NI len;
NI cap;
tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g** d;
};
typedef tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw* tyArray__1eFxjkcKGHnofywkmCV8oQ[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA* tyArray__KxTmKT9a3kTkdwYfqXhEYSw[32];
typedef tyArray__KxTmKT9a3kTkdwYfqXhEYSw tyArray__ATT5LBefmjy9bg8ApRmg3rw[24];
typedef tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg* tyArray__RxhBwkGQwTHLKhoK685Xfg[256];
struct tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A {
tyArray__RxhBwkGQwTHLKhoK685Xfg data;
};
typedef tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* tyArray__DrxDrI9bg9apB70ydOoNZrWw[2];
struct tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw {
tyArray__DrxDrI9bg9apB70ydOoNZrWw link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA {
tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA* Field0;
NI Field1;
};
typedef tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA tyArray__wsokuoa9bVBSU4gPLKbFaaw[30];
struct tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw {
NI len;
tyArray__wsokuoa9bVBSU4gPLKbFaaw chunks;
tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw* next;
};
struct tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ {
NI minLargeObj;
NI maxLargeObj;
tyArray__1eFxjkcKGHnofywkmCV8oQ freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__ATT5LBefmjy9bg8ApRmg3rw matrix;
tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A chunkStarts;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* root;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* deleted;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* last;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw bottomData;
tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw heapLinks;
};
struct tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA {
NI counter;
NI max;
tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ* head;
tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ** data;
};
struct tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ {
tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ stack;
NI cycleThreshold;
NI zctThreshold;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA zct;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA decStack;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA tempStack;
NI recGcLock;
tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ region;
tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg stat;
tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA marked;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA additionalRoots;
NI gcThreadId;
};
struct tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g {
  tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg Sup;
NimStringDesc* data;
NI pos;
};
typedef NU8 tyEnum_FileMode__l9cwNsPPKSvz36rQZGh2S7w;
struct tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA {
NCSTRING procname;
NI line;
NCSTRING filename;
};
struct tySequence__QbmGqFaLnb1IWWToREeaIA {
  TGenericSeq Sup;
  tyObject_StackTraceEntry__3r2E7OgmrW3VdUTaooCuyA data[SEQ_DECL_SIZE];
};
static N_NIMCALL(void, Marker_tyRef__aYUZBpFIj29a9ckz9chwQ9buAQ)(void* p, NI op);
N_LIB_PRIVATE N_NIMCALL(void, writeData__pureZstreams_168)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s);
static N_NIMCALL(void, Marker_tyRef__jcGAekSagpWdpBSIj0zx9ag)(void* p, NI op);
N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
N_LIB_PRIVATE N_NIMCALL(void, fsClose__pureZstreams_757)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(void, close__systemZio_218)(FILE* f);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, fsAtEnd__pureZstreams_774)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, endOfFile__systemZio_339)(FILE* f);
N_LIB_PRIVATE N_NIMCALL(void, fsSetPosition__pureZstreams_777)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NI pos);
N_LIB_PRIVATE N_NIMCALL(void, setFilePos__systemZio_438)(FILE* f, NI64 pos, tyEnum_FileSeekPos__3d8x2zL20seOaib8DHfcRg relativeTo);
N_LIB_PRIVATE N_NIMCALL(NI, fsGetPosition__pureZstreams_780)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(NI64, getFilePos__systemZio_451)(FILE* f);
N_LIB_PRIVATE N_NIMCALL(NI, fsReadDataStr__pureZstreams_788)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** buffer, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw slice);
N_LIB_PRIVATE N_NIMCALL(NI, readBuffer__systemZio_144)(FILE* f, void* buffer, NI len);
N_LIB_PRIVATE N_NIMCALL(NI, fsReadData__pureZstreams_783)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, fsReadLine__pureZstreams_804)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** line);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, readLine__systemZio_240)(FILE* f, NimStringDesc** line);
N_LIB_PRIVATE N_NIMCALL(NI, fsPeekData__pureZstreams_794)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
static N_INLINE(void, popSafePoint)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimLeaveFinally)(void);
N_LIB_PRIVATE N_NIMCALL(void, reraiseException)(void);
N_LIB_PRIVATE N_NIMCALL(void, fsWriteData__pureZstreams_800)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
N_LIB_PRIVATE N_NIMCALL(NI, writeBuffer__systemZio_176)(FILE* f, void* buffer, NI len);
N_LIB_PRIVATE N_NIMCALL(tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA*, newEIO__pureZstreams_2)(NimStringDesc* msg);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(void, decRef__system_5317)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
static N_INLINE(void, rtlAddZCT__system_5315)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5266)(tyObject_CellSeq__nav876ELHgxScHhs30CKiA* s, tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5272)(void* usr);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
N_LIB_PRIVATE N_NIMCALL(void, fsFlush__pureZstreams_772)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(void, flushFile__systemZio_227)(FILE* f);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, atEnd__pureZstreams_63)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, readChar__pureZstreams_202)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(NI, readData__pureZstreams_75)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newLen);
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
static N_INLINE(void, prepareMutation__system_7808)(NimStringDesc** s);
N_LIB_PRIVATE N_NIMCALL(void, nimGCvisit)(void* d, NI op);
static N_NIMCALL(void, Marker_tyRef__QVGI45l8e9btO3nUd89aeWNw)(void* p, NI op);
N_LIB_PRIVATE N_NIMCALL(void, ssClose__pureZstreams_673)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef__system_5310)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, ssAtEnd__pureZstreams_558)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(void, ssSetPosition__pureZstreams_580)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NI pos);
N_LIB_PRIVATE N_NIMCALL(NI, clamp__pureZstreams_584)(NI x, NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(NI, ssGetPosition__pureZstreams_590)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s);
N_LIB_PRIVATE N_NIMCALL(NI, ssReadDataStr__pureZstreams_594)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** buffer, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw slice);
static N_INLINE(void, copyMem__system_1733)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, ssReadData__pureZstreams_648)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
N_LIB_PRIVATE N_NIMCALL(NI, ssPeekData__pureZstreams_658)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
N_LIB_PRIVATE N_NIMCALL(void, ssWriteData__pureZstreams_664)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, open__systemZio_391)(FILE** f, NimStringDesc* filename, tyEnum_FileMode__l9cwNsPPKSvz36rQZGh2S7w mode, NI bufSize);
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*, newFileStream__pureZstreams_808)(FILE* f);
extern TNimType NTIrootobj__ytyiCJqK439aF9cIibuRVpAg_;
N_LIB_PRIVATE TNimType NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_;
N_LIB_PRIVATE TNimType NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_;
N_LIB_PRIVATE TNimType NTIprocLs58streamT58boolLOnimcall_gcsafeOT__VytW5cBLp1DOuwAj9cjoj3Q_;
N_LIB_PRIVATE TNimType NTIprocLs58stream_pos58intTLOnimcall_gcsafeOT__nAUmmvz53fMDhkU9aQ4i60Q_;
N_LIB_PRIVATE TNimType NTIprocLs58streamT58intLOnimcall_gcsafeOT__rvgAWCz6iG9cntloh2xzZmQ_;
N_LIB_PRIVATE TNimType NTIprocLs58stream_buffer58varstring_slice58sliceLsystemOintTT58intLOnimcall_gcsafeOT__sAr4e3JGOuIBVEZ29aGGKUQ_;
N_LIB_PRIVATE TNimType NTIprocLs58stream_line58varstringT58boolLOnimcall_gcsafeOT__7SoiV5lfjKUldz1ENKXq1w_;
N_LIB_PRIVATE TNimType NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_;
N_LIB_PRIVATE TNimType NTIprocLs58stream_buffer58pointer_buflen58intTLOnimcall_gcsafeOT__1nrRaSRiXjiE9bnEpZhmOsA_;
N_LIB_PRIVATE TNimType NTIstream__aYUZBpFIj29a9ckz9chwQ9buAQ_;
N_LIB_PRIVATE TNimType NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_;
extern TNimType NTIfile__dk9aLikxD1GCAjU8N55Nb7A_;
N_LIB_PRIVATE TNimType NTIfilestream__jcGAekSagpWdpBSIj0zx9ag_;
extern TNimType NTIrefioerror__0NUycR3lTt5ae7Mj01Qw8A_;
extern TNimType NTIioerror__5GCiDuy5Wsuc9an2QZvqgIA_;
STRING_LITERAL(TM__Ue7tnBcsL67VCiRfvt8q0A_4, "cannot write to stream", 22);
STRING_LITERAL(TM__Ue7tnBcsL67VCiRfvt8q0A_5, "cannot read from stream", 23);
N_LIB_PRIVATE TNimType NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_;
extern TNimType NTIstring__77mFvmsOLKik79ci2hXkHEg_;
extern TNimType NTIint__rR5Bzr1D5krxoo1NcNyeMA_;
N_LIB_PRIVATE TNimType NTIstringstream__QVGI45l8e9btO3nUd89aeWNw_;
extern TSafePoint* excHandler__system_2565;
extern TSafePoint* excHandler__system_2565;
extern TSafePoint* excHandler__system_2565;
extern TSafePoint* excHandler__system_2565;
extern tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ gch__system_5219;
static N_NIMCALL(void, Marker_tyRef__aYUZBpFIj29a9ckz9chwQ9buAQ)(void* p, NI op) {
	tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* a;
	a = (tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg*)p;
}
N_LIB_PRIVATE N_NIMCALL(void, writeData__pureZstreams_168)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	(*s).writeDataImpl(s, buffer, bufLen);
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s) {
	NCSTRING result;
	result = (NCSTRING)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (s == ((NimStringDesc*) NIM_NIL));
		if (T3_) goto LA4_;
		T3_ = ((*s).Sup.len == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		result = "";
	}
	goto LA1_;
	LA5_: ;
	{
		result = ((NCSTRING) ((*s).data));
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, write__pureZstreams_177)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc* x) {
	{
		if (!(((NI) 0) < (x ? x->Sup.len : 0))) goto LA3_;
		writeData__pureZstreams_168(s, ((void*) (nimToCStringConv(x))), (x ? x->Sup.len : 0));
	}
	LA3_: ;
}
static N_NIMCALL(void, Marker_tyRef__jcGAekSagpWdpBSIj0zx9ag)(void* p, NI op) {
	tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA* a;
	a = (tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*)p;
}
N_LIB_PRIVATE N_NIMCALL(void, fsClose__pureZstreams_757)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	{
		if (!!(((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f == ((FILE*) NIM_NIL)))) goto LA3_;
		close__systemZio_218((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f);
		(*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f = ((FILE*) NIM_NIL);
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, fsAtEnd__pureZstreams_774)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	result = endOfFile__systemZio_339((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, fsSetPosition__pureZstreams_777)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NI pos) {
	setFilePos__systemZio_438((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f, ((NI64) (pos)), ((tyEnum_FileSeekPos__3d8x2zL20seOaib8DHfcRg) 0));
}
N_LIB_PRIVATE N_NIMCALL(NI, fsGetPosition__pureZstreams_780)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	NI result;
	NI64 T1_;
{	result = (NI)0;
	T1_ = (NI64)0;
	T1_ = getFilePos__systemZio_451((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f);
	result = ((NI) (T1_));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, fsReadDataStr__pureZstreams_788)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** buffer, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw slice) {
	NI result;
	result = (NI)0;
	result = readBuffer__systemZio_144((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f, ((void*) ((&(*buffer)->data[slice.a]))), ((NI) ((NI)((NI)(slice.b + ((NI) 1)) - slice.a))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, fsReadData__pureZstreams_783)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	NI result;
	result = (NI)0;
	result = readBuffer__systemZio_144((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f, buffer, ((NI) (bufLen)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, fsReadLine__pureZstreams_804)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** line) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = readLine__systemZio_240((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f, line);
	return result;
}
static N_INLINE(void, pushSafePoint)(TSafePoint* s) {
	(*s).prev = excHandler__system_2565;
	excHandler__system_2565 = s;
}
static N_INLINE(void, popSafePoint)(void) {
	excHandler__system_2565 = (*excHandler__system_2565).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, fsPeekData__pureZstreams_794)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	NI result;
	NI pos;
	TSafePoint TM__Ue7tnBcsL67VCiRfvt8q0A_3;
	result = (NI)0;
	pos = fsGetPosition__pureZstreams_780(s);
	pushSafePoint(&TM__Ue7tnBcsL67VCiRfvt8q0A_3);
	TM__Ue7tnBcsL67VCiRfvt8q0A_3.status = _setjmp(TM__Ue7tnBcsL67VCiRfvt8q0A_3.context);
	if (TM__Ue7tnBcsL67VCiRfvt8q0A_3.status == 0) {
	result = readBuffer__systemZio_144((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f, buffer, ((NI) (bufLen)));
	popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fsSetPosition__pureZstreams_777(s, pos);
		if (TM__Ue7tnBcsL67VCiRfvt8q0A_3.status != 0) nimLeaveFinally();
	}
	if (TM__Ue7tnBcsL67VCiRfvt8q0A_3.status != 0) reraiseException();
	return result;
}
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU32)(((NU) (x))) - (NU32)(((NU) (y))))));
	return result;
}
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = ((NU32)(((NU) (x))) < (NU32)(((NU) (y))));
	return result;
}
static N_INLINE(void, rtlAddZCT__system_5315)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	addZCT__system_5266((&gch__system_5219.zct), c);
}
static N_INLINE(void, decRef__system_5317)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	(*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
		if (!T3_) goto LA4_;
		rtlAddZCT__system_5315(c);
	}
	LA4_: ;
}
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5272)(void* usr) {
	tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* result;
	NI T1_;
	result = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
	T1_ = (NI)0;
	T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 8));
	result = ((tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*) (T1_));
	return result;
}
static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T1_;
	T1_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
	T1_ = usrToCell__system_5272(p);
	decRef__system_5317(T1_);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA*, newEIO__pureZstreams_2)(NimStringDesc* msg) {
	tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA* result;
	NimStringDesc* T1_;
	result = NIM_NIL;
	result = (tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA*) newObj((&NTIrefioerror__0NUycR3lTt5ae7Mj01Qw8A_), sizeof(tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA));
	(*result).Sup.Sup.Sup.m_type = (&NTIioerror__5GCiDuy5Wsuc9an2QZvqgIA_);
	(*result).Sup.Sup.name = "IOError";
	T1_ = NIM_NIL;
	T1_ = (*result).Sup.Sup.message; (*result).Sup.Sup.message = copyStringRC1(msg);
	if (T1_) nimGCunrefNoCycle(T1_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, fsWriteData__pureZstreams_800)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	{
		NI T3_;
		tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA* T6_;
		T3_ = (NI)0;
		T3_ = writeBuffer__systemZio_176((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f, buffer, ((NI) (bufLen)));
		if (!!((T3_ == bufLen))) goto LA4_;
		T6_ = NIM_NIL;
		T6_ = newEIO__pureZstreams_2(((NimStringDesc*) &TM__Ue7tnBcsL67VCiRfvt8q0A_4));
		raiseExceptionEx((Exception*)T6_, "IOError", "fsWriteData", "streams.nim", 1333);
	}
	LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, fsFlush__pureZstreams_772)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	flushFile__systemZio_227((*((tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) (s))).f);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*, newFileStream__pureZstreams_808)(FILE* f) {
	tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA* result;
	result = NIM_NIL;
	result = (tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*) newObj((&NTIfilestream__jcGAekSagpWdpBSIj0zx9ag_), sizeof(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA));
	(*result).Sup.Sup.m_type = (&NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_);
	(*result).f = f;
	(*result).Sup.closeImpl = fsClose__pureZstreams_757;
	(*result).Sup.atEndImpl = fsAtEnd__pureZstreams_774;
	(*result).Sup.setPositionImpl = fsSetPosition__pureZstreams_777;
	(*result).Sup.getPositionImpl = fsGetPosition__pureZstreams_780;
	(*result).Sup.readDataStrImpl = fsReadDataStr__pureZstreams_788;
	(*result).Sup.readDataImpl = fsReadData__pureZstreams_783;
	(*result).Sup.readLineImpl = fsReadLine__pureZstreams_804;
	(*result).Sup.peekDataImpl = fsPeekData__pureZstreams_794;
	(*result).Sup.writeDataImpl = fsWriteData__pureZstreams_800;
	(*result).Sup.flushImpl = fsFlush__pureZstreams_772;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, close__pureZstreams_57)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	{
		if (!!(((*s).closeImpl == 0))) goto LA3_;
		(*s).closeImpl(s);
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, atEnd__pureZstreams_63)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = (*s).atEndImpl(s);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, readData__pureZstreams_75)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	NI result;
	result = (NI)0;
	result = (*s).readDataImpl(s, buffer, bufLen);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_CHAR, readChar__pureZstreams_202)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	NIM_CHAR result;
	result = (NIM_CHAR)0;
	{
		{
			NI T4_;
			T4_ = (NI)0;
			T4_ = readData__pureZstreams_75(s, ((void*) ((&result))), ((NI) 1));
			if (!!((T4_ == ((NI) 1)))) goto LA5_;
			result = 0;
		}
		LA5_: ;
	}
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, readLine__pureZstreams_539)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	NimStringDesc* result;
	result = NIM_NIL;
	result = ((NimStringDesc*) NIM_NIL);
	{
		NIM_BOOL T3_;
		tyObject_IOError__5GCiDuy5Wsuc9an2QZvqgIA* T6_;
		T3_ = (NIM_BOOL)0;
		T3_ = atEnd__pureZstreams_63(s);
		if (!T3_) goto LA4_;
		T6_ = NIM_NIL;
		T6_ = newEIO__pureZstreams_2(((NimStringDesc*) &TM__Ue7tnBcsL67VCiRfvt8q0A_5));
		raiseExceptionEx((Exception*)T6_, "IOError", "readLine", "streams.nim", 1071);
	}
	LA4_: ;
	{
		while (1) {
			NIM_CHAR c;
			c = readChar__pureZstreams_202(s);
			{
				if (!((NU8)(c) == (NU8)(13))) goto LA11_;
				c = readChar__pureZstreams_202(s);
				goto LA7;
			}
			LA11_: ;
			{
				NIM_BOOL T15_;
				T15_ = (NIM_BOOL)0;
				T15_ = ((NU8)(c) == (NU8)(10));
				if (T15_) goto LA16_;
				T15_ = ((NU8)(c) == (NU8)(0));
				LA16_: ;
				if (!T15_) goto LA17_;
				goto LA7;
			}
			goto LA13_;
			LA17_: ;
			{
				result = addChar(result, c);
			}
			LA13_: ;
		}
	} LA7: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, readLine__pureZstreams_524)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** line) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	{
		if (!!(((*s).readLineImpl == NIM_NIL))) goto LA3_;
		result = (*s).readLineImpl(s, line);
	}
	goto LA1_;
	LA3_: ;
	{
		unsureAsgnRef((void**) (&(*line)), setLengthStr((*line), ((NI) 0)));
		{
			while (1) {
				NIM_CHAR c;
				c = readChar__pureZstreams_202(s);
				{
					if (!((NU8)(c) == (NU8)(13))) goto LA10_;
					c = readChar__pureZstreams_202(s);
					goto LA6;
				}
				goto LA8_;
				LA10_: ;
				{
					if (!((NU8)(c) == (NU8)(10))) goto LA13_;
					goto LA6;
				}
				goto LA8_;
				LA13_: ;
				{
					if (!((NU8)(c) == (NU8)(0))) goto LA16_;
					{
						if (!(((NI) 0) < ((*line) ? (*line)->Sup.len : 0))) goto LA20_;
						goto LA6;
					}
					goto LA18_;
					LA20_: ;
					{
						result = NIM_FALSE;
						goto BeforeRet_;
					}
					LA18_: ;
				}
				goto LA8_;
				LA16_: ;
				LA8_: ;
				unsureAsgnRef((void**) (&(*line)), addChar((*line), c));
			}
		} LA6: ;
		result = NIM_TRUE;
	}
	LA1_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, prepareMutation__system_7808)(NimStringDesc** s) {
}
N_LIB_PRIVATE N_NIMCALL(NI, readDataStr__pureZstreams_81)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** buffer, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw slice) {
	NI result;
	result = (NI)0;
	{
		if (!!(((*s).readDataStrImpl == NIM_NIL))) goto LA3_;
		result = (*s).readDataStrImpl(s, buffer, slice);
	}
	goto LA1_;
	LA3_: ;
	{
		prepareMutation__system_7808(buffer);
		result = readData__pureZstreams_75(s, ((void*) ((&(*buffer)->data[slice.a]))), (NI)((NI)(slice.b + ((NI) 1)) - slice.a));
	}
	LA1_: ;
	return result;
}
static N_NIMCALL(void, Marker_tyRef__QVGI45l8e9btO3nUd89aeWNw)(void* p, NI op) {
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* a;
	a = (tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*)p;
	nimGCvisit((void*)(*a).data, op);
}
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU32)(((NU) (x))) + (NU32)(((NU) (y))))));
	return result;
}
static N_INLINE(void, incRef__system_5310)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	(*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
}
static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T5_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
		T5_ = usrToCell__system_5272(src);
		incRef__system_5310(T5_);
	}
	LA3_: ;
	{
		tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T10_;
		if (!!(((*dest) == NIM_NIL))) goto LA8_;
		T10_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
		T10_ = usrToCell__system_5272((*dest));
		decRef__system_5317(T10_);
	}
	LA8_: ;
	(*dest) = src;
}
N_LIB_PRIVATE N_NIMCALL(void, ssClose__pureZstreams_673)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	asgnRef((void**) (&(*s_2).data), ((NimStringDesc*) NIM_NIL));
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, ssAtEnd__pureZstreams_558)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	NIM_BOOL result;
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
{	result = (NIM_BOOL)0;
	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	result = (((*s_2).data ? (*s_2).data->Sup.len : 0) <= (*s_2).pos);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, ssSetPosition__pureZstreams_580)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NI pos) {
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	(*s_2).pos = clamp__pureZstreams_584(pos, ((NI) 0), ((*s_2).data ? (*s_2).data->Sup.len : 0));
}
N_LIB_PRIVATE N_NIMCALL(NI, ssGetPosition__pureZstreams_590)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s) {
	NI result;
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
{	result = (NI)0;
	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	result = (*s_2).pos;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest, source, ((size_t) (size)));
}
static N_INLINE(void, copyMem__system_1733)(void* dest, void* source, NI size) {
	nimCopyMem(dest, source, size);
}
N_LIB_PRIVATE N_NIMCALL(NI, ssReadDataStr__pureZstreams_594)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, NimStringDesc** buffer, tyObject_HSlice__dyNB5o2GYLzoO6FJ2RhiZw slice) {
	NI result;
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
	result = (NI)0;
	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	prepareMutation__system_7808(buffer);
	result = (((NI)((NI)(slice.b + ((NI) 1)) - slice.a) <= (NI)(((*s_2).data ? (*s_2).data->Sup.len : 0) - (*s_2).pos)) ? (NI)((NI)(slice.b + ((NI) 1)) - slice.a) : (NI)(((*s_2).data ? (*s_2).data->Sup.len : 0) - (*s_2).pos));
	{
		if (!(((NI) 0) < result)) goto LA3_;
		{
			copyMem__system_1733(((void*) ((&(*buffer)->data[slice.a]))), ((void*) ((&(*s_2).data->data[(*s_2).pos]))), ((NI) (result)));
		}
		(*s_2).pos += result;
	}
	goto LA1_;
	LA3_: ;
	{
		result = ((NI) 0);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, ssReadData__pureZstreams_648)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	NI result;
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
	result = (NI)0;
	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	result = ((bufLen <= (NI)(((*s_2).data ? (*s_2).data->Sup.len : 0) - (*s_2).pos)) ? bufLen : (NI)(((*s_2).data ? (*s_2).data->Sup.len : 0) - (*s_2).pos));
	{
		if (!(((NI) 0) < result)) goto LA3_;
		copyMem__system_1733(buffer, ((void*) ((&(*s_2).data->data[(*s_2).pos]))), ((NI) (result)));
		(*s_2).pos += result;
	}
	goto LA1_;
	LA3_: ;
	{
		result = ((NI) 0);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, ssPeekData__pureZstreams_658)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	NI result;
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
	result = (NI)0;
	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	result = ((bufLen <= (NI)(((*s_2).data ? (*s_2).data->Sup.len : 0) - (*s_2).pos)) ? bufLen : (NI)(((*s_2).data ? (*s_2).data->Sup.len : 0) - (*s_2).pos));
	{
		if (!(((NI) 0) < result)) goto LA3_;
		copyMem__system_1733(buffer, ((void*) ((&(*s_2).data->data[(*s_2).pos]))), ((NI) (result)));
	}
	goto LA1_;
	LA3_: ;
	{
		result = ((NI) 0);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, ssWriteData__pureZstreams_664)(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg* s, void* buffer, NI bufLen) {
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* s_2;
{	s_2 = ((tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) (s));
	{
		if (!(bufLen <= ((NI) 0))) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	{
		if (!(((*s_2).data ? (*s_2).data->Sup.len : 0) < (NI)((*s_2).pos + bufLen))) goto LA7_;
		asgnRef((void**) (&(*s_2).data), setLengthStr((*s_2).data, ((NI) ((NI)((*s_2).pos + bufLen)))));
	}
	LA7_: ;
	copyMem__system_1733(((void*) ((&(*s_2).data->data[(*s_2).pos]))), buffer, ((NI) (bufLen)));
	(*s_2).pos += bufLen;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*, newStringStream__pureZstreams_676)(NimStringDesc* s) {
	tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g* result;
	NimStringDesc* T1_;
	result = NIM_NIL;
	result = (tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*) newObj((&NTIstringstream__QVGI45l8e9btO3nUd89aeWNw_), sizeof(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g));
	(*result).Sup.Sup.m_type = (&NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_);
	T1_ = NIM_NIL;
	T1_ = (*result).data; (*result).data = copyStringRC1(s);
	if (T1_) nimGCunrefNoCycle(T1_);
	prepareMutation__system_7808((&(*result).data));
	(*result).pos = ((NI) 0);
	(*result).Sup.closeImpl = ssClose__pureZstreams_673;
	(*result).Sup.atEndImpl = ssAtEnd__pureZstreams_558;
	(*result).Sup.setPositionImpl = ssSetPosition__pureZstreams_580;
	(*result).Sup.getPositionImpl = ssGetPosition__pureZstreams_590;
	(*result).Sup.readDataStrImpl = ssReadDataStr__pureZstreams_594;
	(*result).Sup.readDataImpl = ssReadData__pureZstreams_648;
	(*result).Sup.peekDataImpl = ssPeekData__pureZstreams_658;
	(*result).Sup.writeDataImpl = ssWriteData__pureZstreams_664;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*, newFileStream__pureZstreams_832)(NimStringDesc* filename, tyEnum_FileMode__l9cwNsPPKSvz36rQZGh2S7w mode, NI bufSize) {
	tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA* result;
	FILE* f;
	result = NIM_NIL;
	f = (FILE*)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = open__systemZio_391(&f, filename, mode, bufSize);
		if (!T3_) goto LA4_;
		result = newFileStream__pureZstreams_808(f);
	}
	LA4_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatslibatspureatsstreamsdotnim_DatInit000)(void) {
static TNimNode* TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[10];
static TNimNode* TM__Ue7tnBcsL67VCiRfvt8q0A_6_2[2];
static TNimNode TM__Ue7tnBcsL67VCiRfvt8q0A_0[15];
NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_.size = sizeof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg);
NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_.align = NIM_ALIGNOF(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg);
NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_.kind = 17;
NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_.base = (&NTIrootobj__ytyiCJqK439aF9cIibuRVpAg_);
NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_.flags = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[0] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[1];
NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_.size = sizeof(tyProc__u1QtPTYUJu1ozpzb9a8xchw);
NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_.align = NIM_ALIGNOF(tyProc__u1QtPTYUJu1ozpzb9a8xchw);
NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_.kind = 25;
NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_.base = 0;
NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[1].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[1].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, closeImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[1].typ = (&NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[1].name = "closeImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[1] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[2];
NTIprocLs58streamT58boolLOnimcall_gcsafeOT__VytW5cBLp1DOuwAj9cjoj3Q_.size = sizeof(tyProc__VytW5cBLp1DOuwAj9cjoj3Q);
NTIprocLs58streamT58boolLOnimcall_gcsafeOT__VytW5cBLp1DOuwAj9cjoj3Q_.align = NIM_ALIGNOF(tyProc__VytW5cBLp1DOuwAj9cjoj3Q);
NTIprocLs58streamT58boolLOnimcall_gcsafeOT__VytW5cBLp1DOuwAj9cjoj3Q_.kind = 25;
NTIprocLs58streamT58boolLOnimcall_gcsafeOT__VytW5cBLp1DOuwAj9cjoj3Q_.base = 0;
NTIprocLs58streamT58boolLOnimcall_gcsafeOT__VytW5cBLp1DOuwAj9cjoj3Q_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[2].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[2].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, atEndImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[2].typ = (&NTIprocLs58streamT58boolLOnimcall_gcsafeOT__VytW5cBLp1DOuwAj9cjoj3Q_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[2].name = "atEndImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[2] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[3];
NTIprocLs58stream_pos58intTLOnimcall_gcsafeOT__nAUmmvz53fMDhkU9aQ4i60Q_.size = sizeof(tyProc__nAUmmvz53fMDhkU9aQ4i60Q);
NTIprocLs58stream_pos58intTLOnimcall_gcsafeOT__nAUmmvz53fMDhkU9aQ4i60Q_.align = NIM_ALIGNOF(tyProc__nAUmmvz53fMDhkU9aQ4i60Q);
NTIprocLs58stream_pos58intTLOnimcall_gcsafeOT__nAUmmvz53fMDhkU9aQ4i60Q_.kind = 25;
NTIprocLs58stream_pos58intTLOnimcall_gcsafeOT__nAUmmvz53fMDhkU9aQ4i60Q_.base = 0;
NTIprocLs58stream_pos58intTLOnimcall_gcsafeOT__nAUmmvz53fMDhkU9aQ4i60Q_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[3].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[3].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, setPositionImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[3].typ = (&NTIprocLs58stream_pos58intTLOnimcall_gcsafeOT__nAUmmvz53fMDhkU9aQ4i60Q_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[3].name = "setPositionImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[3] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[4];
NTIprocLs58streamT58intLOnimcall_gcsafeOT__rvgAWCz6iG9cntloh2xzZmQ_.size = sizeof(tyProc__rvgAWCz6iG9cntloh2xzZmQ);
NTIprocLs58streamT58intLOnimcall_gcsafeOT__rvgAWCz6iG9cntloh2xzZmQ_.align = NIM_ALIGNOF(tyProc__rvgAWCz6iG9cntloh2xzZmQ);
NTIprocLs58streamT58intLOnimcall_gcsafeOT__rvgAWCz6iG9cntloh2xzZmQ_.kind = 25;
NTIprocLs58streamT58intLOnimcall_gcsafeOT__rvgAWCz6iG9cntloh2xzZmQ_.base = 0;
NTIprocLs58streamT58intLOnimcall_gcsafeOT__rvgAWCz6iG9cntloh2xzZmQ_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[4].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[4].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, getPositionImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[4].typ = (&NTIprocLs58streamT58intLOnimcall_gcsafeOT__rvgAWCz6iG9cntloh2xzZmQ_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[4].name = "getPositionImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[4] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[5];
NTIprocLs58stream_buffer58varstring_slice58sliceLsystemOintTT58intLOnimcall_gcsafeOT__sAr4e3JGOuIBVEZ29aGGKUQ_.size = sizeof(tyProc__sAr4e3JGOuIBVEZ29aGGKUQ);
NTIprocLs58stream_buffer58varstring_slice58sliceLsystemOintTT58intLOnimcall_gcsafeOT__sAr4e3JGOuIBVEZ29aGGKUQ_.align = NIM_ALIGNOF(tyProc__sAr4e3JGOuIBVEZ29aGGKUQ);
NTIprocLs58stream_buffer58varstring_slice58sliceLsystemOintTT58intLOnimcall_gcsafeOT__sAr4e3JGOuIBVEZ29aGGKUQ_.kind = 25;
NTIprocLs58stream_buffer58varstring_slice58sliceLsystemOintTT58intLOnimcall_gcsafeOT__sAr4e3JGOuIBVEZ29aGGKUQ_.base = 0;
NTIprocLs58stream_buffer58varstring_slice58sliceLsystemOintTT58intLOnimcall_gcsafeOT__sAr4e3JGOuIBVEZ29aGGKUQ_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[5].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[5].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, readDataStrImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[5].typ = (&NTIprocLs58stream_buffer58varstring_slice58sliceLsystemOintTT58intLOnimcall_gcsafeOT__sAr4e3JGOuIBVEZ29aGGKUQ_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[5].name = "readDataStrImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[5] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[6];
NTIprocLs58stream_line58varstringT58boolLOnimcall_gcsafeOT__7SoiV5lfjKUldz1ENKXq1w_.size = sizeof(tyProc__7SoiV5lfjKUldz1ENKXq1w);
NTIprocLs58stream_line58varstringT58boolLOnimcall_gcsafeOT__7SoiV5lfjKUldz1ENKXq1w_.align = NIM_ALIGNOF(tyProc__7SoiV5lfjKUldz1ENKXq1w);
NTIprocLs58stream_line58varstringT58boolLOnimcall_gcsafeOT__7SoiV5lfjKUldz1ENKXq1w_.kind = 25;
NTIprocLs58stream_line58varstringT58boolLOnimcall_gcsafeOT__7SoiV5lfjKUldz1ENKXq1w_.base = 0;
NTIprocLs58stream_line58varstringT58boolLOnimcall_gcsafeOT__7SoiV5lfjKUldz1ENKXq1w_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[6].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[6].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, readLineImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[6].typ = (&NTIprocLs58stream_line58varstringT58boolLOnimcall_gcsafeOT__7SoiV5lfjKUldz1ENKXq1w_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[6].name = "readLineImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[6] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[7];
NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_.size = sizeof(tyProc__mPF9ae7sAGGCOezlsIuH6Yg);
NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_.align = NIM_ALIGNOF(tyProc__mPF9ae7sAGGCOezlsIuH6Yg);
NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_.kind = 25;
NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_.base = 0;
NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[7].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[7].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, readDataImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[7].typ = (&NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[7].name = "readDataImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[7] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[8];
TM__Ue7tnBcsL67VCiRfvt8q0A_0[8].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[8].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, peekDataImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[8].typ = (&NTIprocLs58stream_buffer58pointer_buflen58intT58intLOnimcall_gcsafeOT__mPF9ae7sAGGCOezlsIuH6Yg_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[8].name = "peekDataImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[8] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[9];
NTIprocLs58stream_buffer58pointer_buflen58intTLOnimcall_gcsafeOT__1nrRaSRiXjiE9bnEpZhmOsA_.size = sizeof(tyProc__1nrRaSRiXjiE9bnEpZhmOsA);
NTIprocLs58stream_buffer58pointer_buflen58intTLOnimcall_gcsafeOT__1nrRaSRiXjiE9bnEpZhmOsA_.align = NIM_ALIGNOF(tyProc__1nrRaSRiXjiE9bnEpZhmOsA);
NTIprocLs58stream_buffer58pointer_buflen58intTLOnimcall_gcsafeOT__1nrRaSRiXjiE9bnEpZhmOsA_.kind = 25;
NTIprocLs58stream_buffer58pointer_buflen58intTLOnimcall_gcsafeOT__1nrRaSRiXjiE9bnEpZhmOsA_.base = 0;
NTIprocLs58stream_buffer58pointer_buflen58intTLOnimcall_gcsafeOT__1nrRaSRiXjiE9bnEpZhmOsA_.flags = 3;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[9].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[9].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, writeDataImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[9].typ = (&NTIprocLs58stream_buffer58pointer_buflen58intTLOnimcall_gcsafeOT__1nrRaSRiXjiE9bnEpZhmOsA_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[9].name = "writeDataImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[9] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[10];
TM__Ue7tnBcsL67VCiRfvt8q0A_0[10].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[10].offset = offsetof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg, flushImpl);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[10].typ = (&NTIprocLs58streamTLOnimcall_gcsafeOT__u1QtPTYUJu1ozpzb9a8xchw_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[10].name = "flushImpl";
TM__Ue7tnBcsL67VCiRfvt8q0A_0[0].len = 10; TM__Ue7tnBcsL67VCiRfvt8q0A_0[0].kind = 2; TM__Ue7tnBcsL67VCiRfvt8q0A_0[0].sons = &TM__Ue7tnBcsL67VCiRfvt8q0A_2_10[0];
NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_.node = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[0];
NTIstream__aYUZBpFIj29a9ckz9chwQ9buAQ_.size = sizeof(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg*);
NTIstream__aYUZBpFIj29a9ckz9chwQ9buAQ_.align = NIM_ALIGNOF(tyObject_StreamObj__QJOHa8TkfjsZVXTbMulWFg*);
NTIstream__aYUZBpFIj29a9ckz9chwQ9buAQ_.kind = 22;
NTIstream__aYUZBpFIj29a9ckz9chwQ9buAQ_.base = (&NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_);
NTIstream__aYUZBpFIj29a9ckz9chwQ9buAQ_.marker = Marker_tyRef__aYUZBpFIj29a9ckz9chwQ9buAQ;
NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_.size = sizeof(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA);
NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_.align = NIM_ALIGNOF(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA);
NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_.kind = 17;
NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_.base = (&NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_);
NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_.flags = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[11].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[11].offset = offsetof(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA, f);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[11].typ = (&NTIfile__dk9aLikxD1GCAjU8N55Nb7A_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[11].name = "f";
NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_.node = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[11];
NTIfilestream__jcGAekSagpWdpBSIj0zx9ag_.size = sizeof(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*);
NTIfilestream__jcGAekSagpWdpBSIj0zx9ag_.align = NIM_ALIGNOF(tyObject_FileStreamObj__tYEhzw9bqtvCVwdyniGzYfA*);
NTIfilestream__jcGAekSagpWdpBSIj0zx9ag_.kind = 22;
NTIfilestream__jcGAekSagpWdpBSIj0zx9ag_.base = (&NTIfilestreamobj__tYEhzw9bqtvCVwdyniGzYfA_);
NTIfilestream__jcGAekSagpWdpBSIj0zx9ag_.marker = Marker_tyRef__jcGAekSagpWdpBSIj0zx9ag;
NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_.size = sizeof(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g);
NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_.align = NIM_ALIGNOF(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g);
NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_.kind = 17;
NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_.base = (&NTIstreamobj__QJOHa8TkfjsZVXTbMulWFg_);
TM__Ue7tnBcsL67VCiRfvt8q0A_6_2[0] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[13];
TM__Ue7tnBcsL67VCiRfvt8q0A_0[13].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[13].offset = offsetof(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g, data);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[13].typ = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[13].name = "data";
TM__Ue7tnBcsL67VCiRfvt8q0A_6_2[1] = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[14];
TM__Ue7tnBcsL67VCiRfvt8q0A_0[14].kind = 1;
TM__Ue7tnBcsL67VCiRfvt8q0A_0[14].offset = offsetof(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g, pos);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[14].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
TM__Ue7tnBcsL67VCiRfvt8q0A_0[14].name = "pos";
TM__Ue7tnBcsL67VCiRfvt8q0A_0[12].len = 2; TM__Ue7tnBcsL67VCiRfvt8q0A_0[12].kind = 2; TM__Ue7tnBcsL67VCiRfvt8q0A_0[12].sons = &TM__Ue7tnBcsL67VCiRfvt8q0A_6_2[0];
NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_.node = &TM__Ue7tnBcsL67VCiRfvt8q0A_0[12];
NTIstringstream__QVGI45l8e9btO3nUd89aeWNw_.size = sizeof(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*);
NTIstringstream__QVGI45l8e9btO3nUd89aeWNw_.align = NIM_ALIGNOF(tyObject_StringStreamObj__0donmYG9cFGYrdaYfy8rp2g*);
NTIstringstream__QVGI45l8e9btO3nUd89aeWNw_.kind = 22;
NTIstringstream__QVGI45l8e9btO3nUd89aeWNw_.base = (&NTIstringstreamobj__0donmYG9cFGYrdaYfy8rp2g_);
NTIstringstream__QVGI45l8e9btO3nUd89aeWNw_.marker = Marker_tyRef__QVGI45l8e9btO3nUd89aeWNw;
}

