/* Generated by Nim Compiler v1.3.5 */
/*   (c) 2020 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64

/* section: NIM_merge_HEADERS */

#include "nimbase.h"
#include <string.h>
#include <windows.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

/* section: NIM_merge_FRAME_DEFINES */
#define nimfr_(x, y)
#define nimln_(x, y)

/* section: NIM_merge_FORWARD_TYPES */
typedef struct tySequence__AjV3cEUgs0Y9c7dCt9aItdIA tySequence__AjV3cEUgs0Y9c7dCt9aItdIA;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ;
typedef struct NimStringDesc NimStringDesc;
typedef struct tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg;
typedef struct RootObj RootObj;
typedef struct tySequence__xv3aaFd3JCw8NbmALHiezQ tySequence__xv3aaFd3JCw8NbmALHiezQ;
typedef struct tyTuple__sPaDkVPSC0MkcoXCxPH9ccA tyTuple__sPaDkVPSC0MkcoXCxPH9ccA;
typedef struct Exception Exception;
typedef struct tySequence__aNpJjaoUowCQc7fBn3wtDQ tySequence__aNpJjaoUowCQc7fBn3wtDQ;
typedef struct TSafePoint TSafePoint;
typedef struct GcFrameHeader GcFrameHeader;
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
typedef struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw;
typedef struct tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg;
typedef struct tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg;
typedef struct tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w;

/* section: NIM_merge_TYPES */
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg;
struct tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ {
tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg k;
union{
struct {NimStringDesc* fText;
} _k_1;
struct {NimStringDesc* fTag;
tySequence__AjV3cEUgs0Y9c7dCt9aItdIA* s;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* fAttr;
} _k_2;
};
NI fClientData;
};
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
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__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef NF tyArray__iV2wVpdhi9coq9cstlcqapXg[2001];
struct tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg {
tyArray__iV2wVpdhi9coq9cstlcqapXg tls;
};
struct RootObj {
TNimType* m_type;
};
typedef NU8 tyEnum_StringTableMode__G9c4wVDFIzf0xHmQvxso9a9cQ;
struct tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg {
  RootObj Sup;
NI counter;
tySequence__xv3aaFd3JCw8NbmALHiezQ* data;
tyEnum_StringTableMode__G9c4wVDFIzf0xHmQvxso9a9cQ mode;
};
struct tyTuple__sPaDkVPSC0MkcoXCxPH9ccA {
NimStringDesc* Field0;
NimStringDesc* Field1;
NIM_BOOL Field2;
};
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__9axCnCRMUx32AHzFgBrzSMg) (Exception* e);
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (void* ClE_0);
void* ClE_0;
} tyProc__HzVCwACFYM9cx9aV62PdjtuA;
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
};
typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
tyArray__0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
NI Field1;
};
typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
NI len;
tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
};
struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
NI minLargeObj;
NI maxLargeObj;
tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
};
struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
NI collections;
NI maxThreshold;
NI maxStackSize;
NI freedObjects;
};
struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw {
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* head;
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* tail;
CRITICAL_SECTION lock;
};
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw toDispose;
NI gcThreadId;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
};
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (tyProc__HzVCwACFYM9cx9aV62PdjtuA cbproc, void* ClE_0);
void* ClE_0;
} tyProc__VHS3NdmbwcdcZKmKV1JWhw;

/* section: NIM_merge_SEQ_TYPES */
struct tySequence__AjV3cEUgs0Y9c7dCt9aItdIA {
  TGenericSeq Sup;
  tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* data[SEQ_DECL_SIZE];
};
struct tySequence__xv3aaFd3JCw8NbmALHiezQ {
  TGenericSeq Sup;
  tyTuple__sPaDkVPSC0MkcoXCxPH9ccA data[SEQ_DECL_SIZE];
};
struct tySequence__aNpJjaoUowCQc7fBn3wtDQ {
  TGenericSeq Sup;
  tyProc__HzVCwACFYM9cx9aV62PdjtuA data[SEQ_DECL_SIZE];
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
typedef struct {tyProc__9axCnCRMUx32AHzFgBrzSMg localRaiseHook__EIvMhANBvB9cp2Ezvt29cADg;
NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
tySequence__aNpJjaoUowCQc7fBn3wtDQ* threadDestructionHandlers__8OmU3x0fNdA0DLtOmU3kWw;
NI threadId__wzrdPYhtL9czkCWS4o9an9cRw;
TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
Exception* currException__9bVPeDJlYTi9bQApZpfH8wjg;
GcFrameHeader* gcFramePtr__ot48iojqko9aFxGhyjjjVaA;
tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__IcYaEuuWivYAS86vFMTS3Q;
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* utcInstance__oeKVHn4dFpBJO35HhEkelw;
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* localInstance__cLtN9cK9bCe6IPhJ3UFNLNKA;
NIM_BOOL envComputed__LLyFo9bsdu1ZXMDvAe8DhrQ;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* environment__mlhK49b6YMgc9cgrcYkKq9a3g;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* ownArgv__WVJ54JSHy7VxacV39bwBPFA;
NIM_BOOL ownParsedArgv__9btHydaUC5pNXxitEZsyzIg;
tyProc__VHS3NdmbwcdcZKmKV1JWhw callSoonProc__9b9b4iUSd60RO2UqC52ifJ6A;
tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg* gDisp__yIbBArLUsg2pBJkilx4yvg;
tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w* defaultSslContext__3GZQajZtKdLpqTTN2RjTzw;
NIM_BOOL isSlave__t9a8wsVVRYqGEKhg1vb49b3g;
NIM_BOOL pyThreadFrameInited__0LBR4zzVR5uWvgtv8SrMjg;
NIM_BOOL gcInited__uuy3PWTwb5gov9ao9bXJYBPg;
} NimThreadVars;

/* section: NIM_merge_PROC_HEADERS */
N_LIB_PRIVATE N_NIMCALL(void, findAll__W9akl9bBC9b0X9bbhTM4puTGPQ)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NimStringDesc* tag, tySequence__AjV3cEUgs0Y9c7dCt9aItdIA** result, NIM_BOOL caseInsensitive);
static N_INLINE(NI, len__jVDt9baaY2kubMUFrl05Xrgxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n);
static N_INLINE(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, X5BX5D___oXJB8uaKnmOqZ9bwPjUkzEwxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NI i);
static N_INLINE(NimStringDesc*, tag__I0Wk5Fx2cIQmlClDCKj59agxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, equalMem__9bGgqEk7RXXl6eqM9c1HdELAsystem)(void* a, void* b, NI size);
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a, NimStringDesc* b);
N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
N_LIB_PRIVATE N_NIMCALL(void, nimGCvisit)(void* d, NI op);
static N_NIMCALL(void, Marker_tyRef__TikLQZVsFf7R0nt3oy4s9bg)(void* p, NI op);
static N_NIMCALL(void, Marker_tySequence__AjV3cEUgs0Y9c7dCt9aItdIA)(void* p, NI op);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(void*, GetThreadLocalVars)(void);
N_LIB_PRIVATE N_NIMCALL(void*, threadVarGetValue__O8VJSmwa3WY6y9bP6Ht9b7hw)(NI32 dwTlsIndex);
N_LIB_PRIVATE N_NIMCALL(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, newXmlNode__S1TYbKk8Fe7yxROPoy4ceg)(tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg kind);
N_LIB_PRIVATE N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_LIB_PRIVATE N_NIMCALL(void, addIndent__zdN2Lc7tSuZiLJkksaegQQ)(NimStringDesc** result, NI indent, NIM_BOOL addNewLines);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, noWhitespace__Fh5PelKgH0dQpIvK0CbwzA)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n);
static N_INLINE(tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg, kind__j8p3h8iojolY0RbF1nkaZgxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n);
N_LIB_PRIVATE N_NIMCALL(void, addEscapedAttr__6C2AvGe9brWF3cZheLyMXgA)(NimStringDesc** result, NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(void, add__L5ivS03sIqPjaqmOum9c7Vw)(NimStringDesc** result, tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NI indent, NI indWidth, NIM_BOOL addNewLines);
N_LIB_PRIVATE N_NIMCALL(void, addEscaped__6C2AvGe9brWF3cZheLyMXgA_2)(NimStringDesc** result, NimStringDesc* s);
static N_INLINE(tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg*, attrs__LYDf19bKsKASF4QGUwmglxQxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getOrDefault__2a0cbxcfpWcXtK45m9bR5Kg)(tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* t, NimStringDesc* key, NimStringDesc* default_0);

/* section: NIM_merge_DATA */
N_LIB_PRIVATE TNimType NTI__X79bE2j9a1V7tizbx9blALudQ_;
N_LIB_PRIVATE TNimType NTI__L9a59cbX9cQkF2r36q7xUnCbg_;
TNimNode* NimDT___X79bE2j9a1V7tizbx9blALudQ_k[7];
extern TNimType NTI__77mFvmsOLKik79ci2hXkHEg_;
extern TNimType NTI__n9cmoMXcDs47wYDFGEXuCfw_;
extern TNimType NTI__rR5Bzr1D5krxoo1NcNyeMA_;
N_LIB_PRIVATE TNimType NTI__TikLQZVsFf7R0nt3oy4s9bg_;
N_LIB_PRIVATE TNimType NTI__AjV3cEUgs0Y9c7dCt9aItdIA_;
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_7, "\012", 1);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_8, "=\"", 2);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_9, "&lt;", 4);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_10, "&gt;", 4);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_11, "&amp;", 5);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_12, "&quot;", 6);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_13, " />", 3);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_14, "</", 2);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_15, ">", 1);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_16, "&apos;", 6);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_17, "<!-- ", 5);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_18, " -->", 4);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_19, "<![CDATA[", 9);
STRING_LITERAL(TM__qYyKc6OpDWHHaBXL9bX9aQ2A_20, "]]>", 3);

/* section: NIM_merge_VARS */
extern NI32 globalsSlot__ciXDZu9c27pHpCRMoz4RIgw;

/* section: NIM_merge_PROCS */
static N_INLINE(NI, len__jVDt9baaY2kubMUFrl05Xrgxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n) {
	NI result;
	result = (NI)0;
	{
		NI T5_;
		if (!((*n).k == ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 2))) goto LA3_;
		T5_ = ((*n)._k_2.s ? (*n)._k_2.s->Sup.len : 0);
		result = T5_;
	}
	LA3_: ;
	return result;
}
static N_INLINE(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, X5BX5D___oXJB8uaKnmOqZ9bwPjUkzEwxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NI i) {
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* result;
	result = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
	result = (*n)._k_2.s->data[i];
	return result;
}
static N_INLINE(NimStringDesc*, tag__I0Wk5Fx2cIQmlClDCKj59agxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	result = copyString((*n)._k_2.fTag);
	return result;
}
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
	int result;
	result = (int)0;
	result = memcmp(a, b, ((size_t) (size)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__9bGgqEk7RXXl6eqM9c1HdELAsystem)(void* a, void* b, NI size) {
	NIM_BOOL result;
	int T1_;
	result = (NIM_BOOL)0;
	T1_ = (int)0;
	T1_ = nimCmpMem(a, b, size);
	result = (T1_ == ((NI32) 0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NI alen;
	NI blen;
{	result = (NIM_BOOL)0;
	alen = (a ? a->Sup.len : 0);
	blen = (b ? b->Sup.len : 0);
	{
		if (!(alen == blen)) goto LA3_;
		{
			if (!(alen == ((NI) 0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
		LA7_: ;
		result = equalMem__9bGgqEk7RXXl6eqM9c1HdELAsystem(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
		goto BeforeRet_;
	}
	LA3_: ;
	}BeforeRet_: ;
	return result;
}
static N_NIMCALL(void, Marker_tyRef__TikLQZVsFf7R0nt3oy4s9bg)(void* p, NI op) {
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* a;
	a = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)p;
	switch ((*a).k) {
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 0):
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 1):
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 5):
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 3):
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 4):
	nimGCvisit((void*)(*a)._k_1.fText, op);
	break;
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 2):
	nimGCvisit((void*)(*a)._k_2.fTag, op);
	nimGCvisit((void*)(*a)._k_2.s, op);
	nimGCvisit((void*)(*a)._k_2.fAttr, op);
	break;
	} 
}
static N_NIMCALL(void, Marker_tySequence__AjV3cEUgs0Y9c7dCt9aItdIA)(void* p, NI op) {
	tySequence__AjV3cEUgs0Y9c7dCt9aItdIA* a;
	NI T1_;
	a = (tySequence__AjV3cEUgs0Y9c7dCt9aItdIA*)p;
	T1_ = (NI)0;
	for (T1_ = 0; T1_ < (a ? a->Sup.len : 0); T1_++) {
	nimGCvisit((void*)a->data[T1_], op);
	}
}
static N_INLINE(void*, GetThreadLocalVars)(void) {
	void* result;
	void* T1_;
	result = (void*)0;
	T1_ = (void*)0;
	T1_ = threadVarGetValue__O8VJSmwa3WY6y9bP6Ht9b7hw(globalsSlot__ciXDZu9c27pHpCRMoz4RIgw);
	result = ((void*) ((*((tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg*) (T1_))).tls));
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	NimThreadVars* NimTV_;
	NimTV_ = (NimThreadVars*) GetThreadLocalVars();
	result = (NIM_BOOL*)0;
	result = (&NimTV_->nimInErrorMode__759bT87luu8XGcbkw13FUjA);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, findAll__W9akl9bBC9b0X9bbhTM4puTGPQ)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NimStringDesc* tag, tySequence__AjV3cEUgs0Y9c7dCt9aItdIA** result, NIM_BOOL caseInsensitive) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* child;
		child = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
		{
			NI i;
			NI colontmp_;
			NI T3_;
			NI res;
			i = (NI)0;
			colontmp_ = (NI)0;
			T3_ = (NI)0;
			T3_ = len__jVDt9baaY2kubMUFrl05Xrgxmltree(n);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			colontmp_ = (NI)(T3_ - ((NI) 1));
			res = ((NI) 0);
			{
				while (1) {
					if (!(res <= colontmp_)) goto LA5;
					i = res;
					child = X5BX5D___oXJB8uaKnmOqZ9bwPjUkzEwxmltree(n, i);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					{
						{
							if (!!(((*child).k == ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 2)))) goto LA9_;
							goto LA6;
						}
						LA9_: ;
						{
							NIM_BOOL T13_;
							NimStringDesc* T14_;
							NIM_BOOL T16_;
							NimStringDesc* T18_;
							NI T19_;
							NI T22_;
							T13_ = (NIM_BOOL)0;
							T14_ = (NimStringDesc*)0;
							T14_ = tag__I0Wk5Fx2cIQmlClDCKj59agxmltree(child);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							T13_ = eqStrings(T14_, tag);
							if (T13_) goto LA15_;
							T16_ = (NIM_BOOL)0;
							T16_ = caseInsensitive;
							if (!(T16_)) goto LA17_;
							T18_ = (NimStringDesc*)0;
							T18_ = tag__I0Wk5Fx2cIQmlClDCKj59agxmltree(child);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							T19_ = (NI)0;
							T19_ = nsuCmpIgnoreCase(T18_, tag);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							T16_ = (T19_ == ((NI) 0));
							LA17_: ;
							T13_ = T16_;
							LA15_: ;
							if (!T13_) goto LA20_;
							(*result) = (tySequence__AjV3cEUgs0Y9c7dCt9aItdIA*) incrSeqV3((TGenericSeq*)((*result)), (&NTI__AjV3cEUgs0Y9c7dCt9aItdIA_));
							T22_ = (*result)->Sup.len++;
							(*result)->data[T22_] = child;
						}
						LA20_: ;
						findAll__W9akl9bBC9b0X9bbhTM4puTGPQ(child, tag, result, NIM_FALSE);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					} LA6: ;
					res += ((NI) 1);
				} LA5: ;
			}
		}
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__AjV3cEUgs0Y9c7dCt9aItdIA*, findAll__w9agAVWGplUBvc3mJRF39boA)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NimStringDesc* tag, NIM_BOOL caseInsensitive) {
	tySequence__AjV3cEUgs0Y9c7dCt9aItdIA* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tySequence__AjV3cEUgs0Y9c7dCt9aItdIA*)0;
	result = NIM_NIL;
	findAll__W9akl9bBC9b0X9bbhTM4puTGPQ(n, tag, (&result), caseInsensitive);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, newXmlNode__S1TYbKk8Fe7yxROPoy4ceg)(tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg kind) {
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* result;
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* T1_;
	result = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
	T1_ = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
	T1_ = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*) newObj((&NTI__TikLQZVsFf7R0nt3oy4s9bg_), sizeof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ));
	(*T1_).k = kind;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, newElement__Sxg4tI9bVbPjV9a4F9cRnqlWw)(NimStringDesc* tag) {
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
	result = newXmlNode__S1TYbKk8Fe7yxROPoy4ceg(((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 2));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(*result)._k_2.fTag = copyString(tag);
	(*result)._k_2.s = NIM_NIL;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, newComment__fVXKbnhNzNp9b9agYV9bTcbnw)(NimStringDesc* comment) {
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
	result = newXmlNode__S1TYbKk8Fe7yxROPoy4ceg(((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 5));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(*result)._k_1.fText = copyString(comment);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, newText__rOUtNKhUmBcgHQCsK4WhEw)(NimStringDesc* text) {
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
	result = newXmlNode__S1TYbKk8Fe7yxROPoy4ceg(((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 0));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(*result)._k_1.fText = copyString(text);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*, newCData__PLqWE9bsPdmSMjx89co9cz9bPg)(NimStringDesc* cdata) {
	tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
	result = newXmlNode__S1TYbKk8Fe7yxROPoy4ceg(((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 3));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(*result)._k_1.fText = copyString(cdata);
	}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__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) {
	nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	{
		void* T5_;
		void* T6_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (void*)0;
		T5_ = ((void*) ((&(*dest).data[(*dest).Sup.len])));
		T6_ = (void*)0;
		T6_ = ((void*) ((*src).data));
		copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T5_, T6_, ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
		(*dest).Sup.len += (*src).Sup.len;
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addIndent__zdN2Lc7tSuZiLJkksaegQQ)(NimStringDesc** result, NI indent, NIM_BOOL addNewLines) {
	{
		if (!addNewLines) goto LA3_;
		(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_7));
	}
	LA3_: ;
	{
		NI i;
		NI res;
		i = (NI)0;
		res = ((NI) 1);
		{
			while (1) {
				if (!(res <= indent)) goto LA7;
				i = res;
				(*result) = addChar((*result), 32);
				res += ((NI) 1);
			} LA7: ;
		}
	}
}
static N_INLINE(tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg, kind__j8p3h8iojolY0RbF1nkaZgxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n) {
	tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg result;
	result = (tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg)0;
	result = (*n).k;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, noWhitespace__Fh5PelKgH0dQpIvK0CbwzA)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n) {
	NIM_BOOL result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	{
		NI i;
		NI colontmp_;
		NI i_2;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = len__jVDt9baaY2kubMUFrl05Xrgxmltree(n);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < colontmp_)) goto LA3;
				i = i_2;
				{
					tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* T6_;
					tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg T7_;
					T6_ = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
					T6_ = X5BX5D___oXJB8uaKnmOqZ9bwPjUkzEwxmltree(n, i);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					T7_ = (tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg)0;
					T7_ = kind__j8p3h8iojolY0RbF1nkaZgxmltree(T6_);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					if (!((17 &(1U<<((NU)(T7_)&7U)))!=0)) goto LA8_;
					result = NIM_TRUE;
					goto BeforeRet_;
				}
				LA8_: ;
				i_2 += ((NI) 1);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, addEscapedAttr__6C2AvGe9brWF3cZheLyMXgA)(NimStringDesc** result, NimStringDesc* s) {
	{
		NIM_CHAR c;
		NI i;
		NI L;
		c = (NIM_CHAR)0;
		i = ((NI) 0);
		L = (s ? s->Sup.len : 0);
		{
			while (1) {
				if (!(i < L)) goto LA3;
				c = s->data[i];
				switch (((NU8)(c))) {
				case 60:
				{
					(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_9));
				}
				break;
				case 62:
				{
					(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_10));
				}
				break;
				case 38:
				{
					(*result) = resizeString((*result), 5);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_11));
				}
				break;
				case 34:
				{
					(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_12));
				}
				break;
				default:
				{
					(*result) = addChar((*result), c);
				}
				break;
				}
				i += ((NI) 1);
			} LA3: ;
		}
	}
}
N_LIB_PRIVATE N_NIMCALL(void, addEscaped__6C2AvGe9brWF3cZheLyMXgA_2)(NimStringDesc** result, NimStringDesc* s) {
	{
		NIM_CHAR c;
		NI i;
		NI L;
		c = (NIM_CHAR)0;
		i = ((NI) 0);
		L = (s ? s->Sup.len : 0);
		{
			while (1) {
				if (!(i < L)) goto LA3;
				c = s->data[i];
				switch (((NU8)(c))) {
				case 60:
				{
					(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_9));
				}
				break;
				case 62:
				{
					(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_10));
				}
				break;
				case 38:
				{
					(*result) = resizeString((*result), 5);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_11));
				}
				break;
				case 34:
				{
					(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_12));
				}
				break;
				case 39:
				{
					(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_16));
				}
				break;
				default:
				{
					(*result) = addChar((*result), c);
				}
				break;
				}
				i += ((NI) 1);
			} LA3: ;
		}
	}
}
N_LIB_PRIVATE N_NIMCALL(void, add__L5ivS03sIqPjaqmOum9c7Vw)(NimStringDesc** result, tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NI indent, NI indWidth, NIM_BOOL addNewLines) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		if (!(n == NIM_NIL)) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	switch ((*n).k) {
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 2):
	{
		NIM_BOOL addNewLines_2;
		NI indentNext;
		{
			if (!(((NI) 0) < indent)) goto LA8_;
			addIndent__zdN2Lc7tSuZiLJkksaegQQ(result, indent, addNewLines);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA8_: ;
		{
			NIM_BOOL T12_;
			T12_ = (NIM_BOOL)0;
			T12_ = noWhitespace__Fh5PelKgH0dQpIvK0CbwzA(n);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!T12_) goto LA13_;
			addNewLines_2 = NIM_FALSE;
		}
		goto LA10_;
		LA13_: ;
		{
			addNewLines_2 = addNewLines;
		}
		LA10_: ;
		(*result) = addChar((*result), 60);
		(*result) = resizeString((*result), ((*n)._k_2.fTag ? (*n)._k_2.fTag->Sup.len : 0) + 0);
appendString((*result), (*n)._k_2.fTag);
		{
			if (!!(((*n)._k_2.fAttr == 0))) goto LA18_;
			{
				NimStringDesc* key;
				NimStringDesc* val;
				tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* colontmp_;
				key = (NimStringDesc*)0;
				val = (NimStringDesc*)0;
				colontmp_ = (tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg*)0;
				colontmp_ = (*n)._k_2.fAttr;
				{
					NI h;
					NI colontmp__2;
					NI T22_;
					NI res;
					h = (NI)0;
					colontmp__2 = (NI)0;
					T22_ = (((*colontmp_).data ? (*colontmp_).data->Sup.len : 0)-1);
					colontmp__2 = T22_;
					res = ((NI) 0);
					{
						while (1) {
							if (!(res <= colontmp__2)) goto LA24;
							h = res;
							{
								if (!(*colontmp_).data->data[h].Field2) goto LA27_;
								key = (*colontmp_).data->data[h].Field0;
								val = (*colontmp_).data->data[h].Field1;
								(*result) = addChar((*result), 32);
								(*result) = resizeString((*result), (key ? key->Sup.len : 0) + 0);
appendString((*result), key);
								(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_8));
								addEscapedAttr__6C2AvGe9brWF3cZheLyMXgA(result, val);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								(*result) = addChar((*result), 34);
							}
							LA27_: ;
							res += ((NI) 1);
						} LA24: ;
					}
				}
			}
		}
		LA18_: ;
		{
			NI T31_;
			T31_ = (NI)0;
			T31_ = len__jVDt9baaY2kubMUFrl05Xrgxmltree(n);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!(T31_ == ((NI) 0))) goto LA32_;
			(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_13));
			goto BeforeRet_;
		}
		LA32_: ;
		{
			NIM_BOOL T36_;
			T36_ = (NIM_BOOL)0;
			T36_ = noWhitespace__Fh5PelKgH0dQpIvK0CbwzA(n);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!T36_) goto LA37_;
			indentNext = indent;
		}
		goto LA34_;
		LA37_: ;
		{
			indentNext = (NI)(indent + indWidth);
		}
		LA34_: ;
		(*result) = addChar((*result), 62);
		{
			NI i;
			NI colontmp__3;
			NI i_2;
			i = (NI)0;
			colontmp__3 = (NI)0;
			colontmp__3 = len__jVDt9baaY2kubMUFrl05Xrgxmltree(n);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			i_2 = ((NI) 0);
			{
				while (1) {
					tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* T43_;
					if (!(i_2 < colontmp__3)) goto LA42;
					i = i_2;
					T43_ = (tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*)0;
					T43_ = X5BX5D___oXJB8uaKnmOqZ9bwPjUkzEwxmltree(n, i);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					add__L5ivS03sIqPjaqmOum9c7Vw(result, T43_, indentNext, indWidth, addNewLines_2);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					i_2 += ((NI) 1);
				} LA42: ;
			}
		}
		{
			NIM_BOOL T46_;
			T46_ = (NIM_BOOL)0;
			T46_ = noWhitespace__Fh5PelKgH0dQpIvK0CbwzA(n);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!!(T46_)) goto LA47_;
			addIndent__zdN2Lc7tSuZiLJkksaegQQ(result, indent, addNewLines_2);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA47_: ;
		(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_14));
		(*result) = resizeString((*result), ((*n)._k_2.fTag ? (*n)._k_2.fTag->Sup.len : 0) + 0);
appendString((*result), (*n)._k_2.fTag);
		(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_15));
	}
	break;
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 0):
	{
		addEscaped__6C2AvGe9brWF3cZheLyMXgA_2(result, (*n)._k_1.fText);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	break;
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 1):
	{
		(*result) = resizeString((*result), ((*n)._k_1.fText ? (*n)._k_1.fText->Sup.len : 0) + 0);
appendString((*result), (*n)._k_1.fText);
	}
	break;
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 5):
	{
		(*result) = resizeString((*result), 5);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_17));
		addEscaped__6C2AvGe9brWF3cZheLyMXgA_2(result, (*n)._k_1.fText);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(*result) = resizeString((*result), 4);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_18));
	}
	break;
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 3):
	{
		(*result) = resizeString((*result), 9);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_19));
		(*result) = resizeString((*result), ((*n)._k_1.fText ? (*n)._k_1.fText->Sup.len : 0) + 0);
appendString((*result), (*n)._k_1.fText);
		(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_20));
	}
	break;
	case ((tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg) 4):
	{
		(*result) = addChar((*result), 38);
		(*result) = resizeString((*result), ((*n)._k_1.fText ? (*n)._k_1.fText->Sup.len : 0) + 0);
appendString((*result), (*n)._k_1.fText);
		(*result) = addChar((*result), 59);
	}
	break;
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___OuMIOHiWWdpO1R0c3qsNmg)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n) {
	NimStringDesc* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NimStringDesc*)0;
	result = ((NimStringDesc*) NIM_NIL);
	add__L5ivS03sIqPjaqmOum9c7Vw((&result), n, ((NI) 0), ((NI) 2), NIM_TRUE);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg*, attrs__LYDf19bKsKASF4QGUwmglxQxmltree)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n) {
	tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* result;
	result = (tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg*)0;
	result = (*n)._k_2.fAttr;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, attr__fuJGY6X7Jyktf8X8Q0Pqcw)(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ* n, NimStringDesc* name) {
	NimStringDesc* result;
	tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* T6_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NimStringDesc*)0;
	{
		tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* T3_;
		T3_ = (tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg*)0;
		T3_ = attrs__LYDf19bKsKASF4QGUwmglxQxmltree(n);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!(T3_ == NIM_NIL)) goto LA4_;
		result = ((NimStringDesc*) NIM_NIL);
		goto BeforeRet_;
	}
	LA4_: ;
	T6_ = (tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg*)0;
	T6_ = attrs__LYDf19bKsKASF4QGUwmglxQxmltree(n);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	result = getOrDefault__2a0cbxcfpWcXtK45m9bR5Kg(T6_, name, ((NimStringDesc*) NIM_NIL));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, stdlib_xmltreeDatInit000)(void) {

/* section: NIM_merge_TYPE_INIT1 */
static TNimNode* TM__qYyKc6OpDWHHaBXL9bX9aQ2A_2_2[2];
static TNimNode* TM__qYyKc6OpDWHHaBXL9bX9aQ2A_3_6[6];
NI TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5;
static char* NIM_CONST TM__qYyKc6OpDWHHaBXL9bX9aQ2A_4[6] = {
"xnText", 
"xnVerbatimText", 
"xnElement", 
"xnCData", 
"xnEntity", 
"xnComment"};
static TNimNode* TM__qYyKc6OpDWHHaBXL9bX9aQ2A_6_3[3];
static TNimNode TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[15];

/* section: NIM_merge_TYPE_INIT3 */
NTI__X79bE2j9a1V7tizbx9blALudQ_.size = sizeof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ);
NTI__X79bE2j9a1V7tizbx9blALudQ_.align = NIM_ALIGNOF(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ);
NTI__X79bE2j9a1V7tizbx9blALudQ_.kind = 18;
NTI__X79bE2j9a1V7tizbx9blALudQ_.base = 0;
NTI__X79bE2j9a1V7tizbx9blALudQ_.flags = 2;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_2_2[0] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[1];
NTI__L9a59cbX9cQkF2r36q7xUnCbg_.size = sizeof(tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg);
NTI__L9a59cbX9cQkF2r36q7xUnCbg_.align = NIM_ALIGNOF(tyEnum_XmlNodeKind__L9a59cbX9cQkF2r36q7xUnCbg);
NTI__L9a59cbX9cQkF2r36q7xUnCbg_.kind = 14;
NTI__L9a59cbX9cQkF2r36q7xUnCbg_.base = 0;
NTI__L9a59cbX9cQkF2r36q7xUnCbg_.flags = 3;
for (TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5 = 0; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5 < 6; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5++) {
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5+2].kind = 1;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5+2].offset = TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5+2].name = TM__qYyKc6OpDWHHaBXL9bX9aQ2A_4[TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_3_6[TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[TM__qYyKc6OpDWHHaBXL9bX9aQ2A_5+2];
}
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[8].len = 6; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[8].kind = 2; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[8].sons = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_3_6[0];
NTI__L9a59cbX9cQkF2r36q7xUnCbg_.node = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[8];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[1].kind = 3;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[1].offset = offsetof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ, k);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[1].typ = (&NTI__L9a59cbX9cQkF2r36q7xUnCbg_);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[1].name = "k";
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[1].sons = &NimDT___X79bE2j9a1V7tizbx9blALudQ_k[0];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[1].len = 6;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9].kind = 1;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9].offset = offsetof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ, _k_1.fText);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9].typ = (&NTI__77mFvmsOLKik79ci2hXkHEg_);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9].name = "fText";
NimDT___X79bE2j9a1V7tizbx9blALudQ_k[0] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9];
NimDT___X79bE2j9a1V7tizbx9blALudQ_k[1] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9];
NimDT___X79bE2j9a1V7tizbx9blALudQ_k[5] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9];
NimDT___X79bE2j9a1V7tizbx9blALudQ_k[3] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9];
NimDT___X79bE2j9a1V7tizbx9blALudQ_k[4] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[9];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_6_3[0] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[11];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[11].kind = 1;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[11].offset = offsetof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ, _k_2.fTag);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[11].typ = (&NTI__77mFvmsOLKik79ci2hXkHEg_);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[11].name = "fTag";
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_6_3[1] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[12];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[12].kind = 1;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[12].offset = offsetof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ, _k_2.s);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[12].typ = (&NTI__AjV3cEUgs0Y9c7dCt9aItdIA_);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[12].name = "s";
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_6_3[2] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[13];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[13].kind = 1;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[13].offset = offsetof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ, _k_2.fAttr);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[13].typ = (&NTI__n9cmoMXcDs47wYDFGEXuCfw_);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[13].name = "fAttr";
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[10].len = 3; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[10].kind = 2; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[10].sons = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_6_3[0];
NimDT___X79bE2j9a1V7tizbx9blALudQ_k[2] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[10];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_2_2[1] = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[14];
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[14].kind = 1;
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[14].offset = offsetof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ, fClientData);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[14].typ = (&NTI__rR5Bzr1D5krxoo1NcNyeMA_);
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[14].name = "fClientData";
TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[0].len = 2; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[0].kind = 2; TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[0].sons = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_2_2[0];
NTI__X79bE2j9a1V7tizbx9blALudQ_.node = &TM__qYyKc6OpDWHHaBXL9bX9aQ2A_0[0];
NTI__TikLQZVsFf7R0nt3oy4s9bg_.size = sizeof(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*);
NTI__TikLQZVsFf7R0nt3oy4s9bg_.align = NIM_ALIGNOF(tyObject_XmlNodeObj__X79bE2j9a1V7tizbx9blALudQ*);
NTI__TikLQZVsFf7R0nt3oy4s9bg_.kind = 22;
NTI__TikLQZVsFf7R0nt3oy4s9bg_.base = (&NTI__X79bE2j9a1V7tizbx9blALudQ_);
NTI__TikLQZVsFf7R0nt3oy4s9bg_.flags = 2;
NTI__TikLQZVsFf7R0nt3oy4s9bg_.marker = Marker_tyRef__TikLQZVsFf7R0nt3oy4s9bg;
NTI__AjV3cEUgs0Y9c7dCt9aItdIA_.size = sizeof(tySequence__AjV3cEUgs0Y9c7dCt9aItdIA*);
NTI__AjV3cEUgs0Y9c7dCt9aItdIA_.align = NIM_ALIGNOF(tySequence__AjV3cEUgs0Y9c7dCt9aItdIA*);
NTI__AjV3cEUgs0Y9c7dCt9aItdIA_.kind = 24;
NTI__AjV3cEUgs0Y9c7dCt9aItdIA_.base = (&NTI__TikLQZVsFf7R0nt3oy4s9bg_);
NTI__AjV3cEUgs0Y9c7dCt9aItdIA_.flags = 2;
NTI__AjV3cEUgs0Y9c7dCt9aItdIA_.marker = Marker_tySequence__AjV3cEUgs0Y9c7dCt9aItdIA;
}

