/* Generated by Nim Compiler v2.2.10 */
/* Compiled for: MacOSX, arm64, clang */
/* Command for C compiler:
   clang -c  -w -ferror-limit=3 -fno-strict-aliasing -pthread -isysroot /Applications/Xcode_16.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -target arm64-apple-darwin24.2.0 -O3   -I/Users/runner/work/nightlies/nightlies/nim-2.2.10/lib -I/Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/src -o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@phttpclient.nim.c.o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@phttpclient.nim.c */
#define NIM_INTBITS 64
#define NIM_EmulateOverflowChecks

#include "nimbase.h"
#include <string.h>
#include <stdio.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
typedef struct tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A;
typedef struct tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A;
typedef struct tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA;
typedef struct tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag;
typedef struct tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA;
typedef struct tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw;
typedef struct tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ;
typedef struct tyObject_SslStruct__nrXQY5VF6Ld9c2BdIxvNUmg tyObject_SslStruct__nrXQY5VF6Ld9c2BdIxvNUmg;
typedef struct tyObject_HashSet__9aAVrrL6o7xnFQncOPM0SYQ tyObject_HashSet__9aAVrrL6o7xnFQncOPM0SYQ;
typedef struct tySequence__8Np6tlClE5az1CyqZdN19bQ tySequence__8Np6tlClE5az1CyqZdN19bQ;
typedef struct tySequence__8Np6tlClE5az1CyqZdN19bQ_Content tySequence__8Np6tlClE5az1CyqZdN19bQ_Content;
typedef struct tyObject_SslContextExtraInternalcolonObjectType___HCHicI3N4HKjbTv49ccrcig tyObject_SslContextExtraInternalcolonObjectType___HCHicI3N4HKjbTv49ccrcig;
typedef struct tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w;
typedef struct tyObject_GcEnv__1z8AJ0tfLlYlFBizZRHD7A tyObject_GcEnv__1z8AJ0tfLlYlFBizZRHD7A;
typedef struct tyObject_CellSeq__ssWvVk43J2HePNvNGK2tCw tyObject_CellSeq__ssWvVk43J2HePNvNGK2tCw;
typedef struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q tyTuple__N4J9cV4JZGem3ljqqj5rT0Q;
typedef struct tyObject_CellSeq__dIiPa2COtDnavhK2KIqxCQ tyObject_CellSeq__dIiPa2COtDnavhK2KIqxCQ;
typedef struct tyTuple__EMes4DT7YbRCwj3TmsFXyA tyTuple__EMes4DT7YbRCwj3TmsFXyA;
typedef struct tyObject_StringStreamObj__FCeo9aaO9bFFsI9aQbl29arbwg tyObject_StringStreamObj__FCeo9aaO9bFFsI9aQbl29arbwg;
typedef struct RootObj RootObj;
typedef struct tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ;
typedef struct tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A;
typedef struct tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content;
typedef struct tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw;
typedef struct tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug;
typedef struct Exception Exception;
typedef struct tySequence__3EvzHGO0xyXGnJBUggwfKQ tySequence__3EvzHGO0xyXGnJBUggwfKQ;
typedef struct tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content;
typedef struct tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw;
typedef struct tyObject_IOError__FsM2LSiW5usgjecIvsloBA tyObject_IOError__FsM2LSiW5usgjecIvsloBA;
typedef struct tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg;
typedef struct tySequence__JiteSJxrvz63iP2o9bcn2Sg tySequence__JiteSJxrvz63iP2o9bcn2Sg;
typedef struct tySequence__JiteSJxrvz63iP2o9bcn2Sg_Content tySequence__JiteSJxrvz63iP2o9bcn2Sg_Content;
typedef struct tyTuple__g1w83cyyBYiVU9c8WEJWnjQ tyTuple__g1w83cyyBYiVU9c8WEJWnjQ;
typedef struct tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg;
typedef struct tyObject_Duration__IhPGomXjacpk8ChnxqMuoA tyObject_Duration__IhPGomXjacpk8ChnxqMuoA;
typedef struct tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ;
typedef struct tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ_Content tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ_Content;
typedef struct tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg;
typedef struct tyObject_FileStreamObj__55YZdAmhEXf1sGHQMYxWjw tyObject_FileStreamObj__55YZdAmhEXf1sGHQMYxWjw;
typedef struct tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ;
typedef struct tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA {
	NI rc;
	NI rootIdx;
};
struct TNimTypeV2 {
	void* destructor;
	NI size;
	NI16 align;
	NI16 depth;
	NU32* display;
	void* traceImpl;
	void* typeInfoV1;
	NI flags;
	void* vTable[SEQ_DECL_SIZE];
};
struct tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA {
	NimStringV2 scheme;
	NimStringV2 username;
	NimStringV2 password;
	NimStringV2 hostname;
	NimStringV2 port;
	NimStringV2 path;
	NimStringV2 query;
	NimStringV2 anchor;
	NIM_BOOL opaque;
	NIM_BOOL isIpv6;
};
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (NI64 total_p0, NI64 progress_p1, NI64 speed_p2, void* ClE_0);
void* ClE_0;
} tyProc__TSOsjF4c9aXotPerq9cEE56A;
struct tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw {
	NI64 ticks;
};
struct tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA {
	tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket;
	NIM_BOOL connected;
	tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA currentURL;
	tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers;
	NI maxRedirects;
	NimStringV2 userAgent;
	NI timeout;
	tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* proxy;
	tyProc__TSOsjF4c9aXotPerq9cEE56A onProgressChanged;
	tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* sslContext;
	NI64 contentTotal;
	NI64 contentProgress;
	NI64 oneSecondProgress;
	tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw lastProgressReport;
	tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* bodyStream;
	NIM_BOOL getBody;
};
struct tySequence__8Np6tlClE5az1CyqZdN19bQ {
  NI len; tySequence__8Np6tlClE5az1CyqZdN19bQ_Content* p;
};
struct tyObject_HashSet__9aAVrrL6o7xnFQncOPM0SYQ {
	tySequence__8Np6tlClE5az1CyqZdN19bQ data;
	NI counter;
};
struct tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A {
	tyObject_SslStruct__nrXQY5VF6Ld9c2BdIxvNUmg* context;
	tyObject_HashSet__9aAVrrL6o7xnFQncOPM0SYQ referencedData;
	tyObject_SslContextExtraInternalcolonObjectType___HCHicI3N4HKjbTv49ccrcig* extraInternal;
};
struct tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A {
	tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA url;
};
struct tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw {
	tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w* table;
	NIM_BOOL isTitleCase;
};
typedef NIM_CHAR tyArray__gmOxl9bvv9akJHrSHNnFSMHg[4001];
typedef NU8 tyEnum_Domain__MfMl870GtGGt9bzO9cicdWqA;
typedef NU8 tyEnum_SockType__wyAiWULDFVysRokh4hHr7Q;
typedef NU8 tyEnum_Protocol__x11L2EqCXuQVMDp2SGyCyA;
struct tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag {
	int fd;
	NIM_BOOL isBuffered;
	tyArray__gmOxl9bvv9akJHrSHNnFSMHg buffer;
	NI currPos;
	NI bufLen;
	NIM_BOOL isSsl;
	tyObject_SslStruct__nrXQY5VF6Ld9c2BdIxvNUmg* sslHandle;
	tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* sslContext;
	NIM_BOOL sslNoHandshake;
	NIM_BOOL sslHasPeekChar;
	NIM_CHAR sslPeekChar;
	NIM_BOOL sslNoShutdown;
	NI32 lastError;
	tyEnum_Domain__MfMl870GtGGt9bzO9cicdWqA domain;
	tyEnum_SockType__wyAiWULDFVysRokh4hHr7Q sockType;
	tyEnum_Protocol__x11L2EqCXuQVMDp2SGyCyA protocol;
};
struct tyObject_CellSeq__ssWvVk43J2HePNvNGK2tCw {
	NI len;
	NI cap;
	tyTuple__N4J9cV4JZGem3ljqqj5rT0Q* d;
};
struct tyObject_CellSeq__dIiPa2COtDnavhK2KIqxCQ {
	NI len;
	NI cap;
	tyTuple__EMes4DT7YbRCwj3TmsFXyA* d;
};
struct tyObject_GcEnv__1z8AJ0tfLlYlFBizZRHD7A {
	tyObject_CellSeq__ssWvVk43J2HePNvNGK2tCw traceStack;
	tyObject_CellSeq__dIiPa2COtDnavhK2KIqxCQ toFree;
	NI freed;
	NI touched;
	NI edges;
	NI rcSum;
	NIM_BOOL keepThreshold;
};
struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q {
	void** Field0;
	TNimTypeV2* Field1;
};
struct RootObj {
	TNimTypeV2* m_type;
};
typedef N_NIMCALL_PTR(void, tyProc__E9aUxUbQfSfG9bDHtjp9bJx4Q) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__DMp9aUCWnCo4HurK9bbMFmZw) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0);
typedef N_NIMCALL_PTR(void, tyProc__itHc4jZtTpxT9bZ9cqWxzfDA) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, NI pos_p1);
typedef N_NIMCALL_PTR(NI, tyProc__n8ia0SZOWi9aLDiLsBb0yjw) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0);
typedef N_NIMCALL_PTR(NI, tyProc__0hYqEcBlB9bEANPIuHrMMfA) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, NimStringV2* buffer_p1, tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ slice_p2);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__wUWG9arq0ePuG9awasbo69cSw) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, NimStringV2* line_p1);
typedef N_NIMCALL_PTR(NI, tyProc__vPMGV5XMHXAc89bq9byt1r9ag) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, void* buffer_p1, NI bufLen_p2);
typedef N_NIMCALL_PTR(void, tyProc__Xz9a8DVGoavze4NXIx9bBtkQ) (tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, void* buffer_p1, NI bufLen_p2);
struct tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ {
	RootObj Sup;
	tyProc__E9aUxUbQfSfG9bDHtjp9bJx4Q closeImpl;
	tyProc__DMp9aUCWnCo4HurK9bbMFmZw atEndImpl;
	tyProc__itHc4jZtTpxT9bZ9cqWxzfDA setPositionImpl;
	tyProc__n8ia0SZOWi9aLDiLsBb0yjw getPositionImpl;
	tyProc__0hYqEcBlB9bEANPIuHrMMfA readDataStrImpl;
	tyProc__wUWG9arq0ePuG9awasbo69cSw readLineImpl;
	tyProc__vPMGV5XMHXAc89bq9byt1r9ag readDataImpl;
	tyProc__vPMGV5XMHXAc89bq9byt1r9ag peekDataImpl;
	tyProc__Xz9a8DVGoavze4NXIx9bBtkQ writeDataImpl;
	tyProc__E9aUxUbQfSfG9bDHtjp9bJx4Q flushImpl;
};
struct tyObject_StringStreamObj__FCeo9aaO9bFFsI9aQbl29arbwg {
	tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ Sup;
	NimStringV2 data;
	NI pos;
};
typedef NU8 tyEnum_SslProtVersion__63N9cTBSInRxyR9c85mYOFZw;
typedef NU8 tyEnum_SslCVerifyMode__EuQlnQ2XUooe3ihTmPFZaQ;
struct tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A {
	NimStringV2 version;
	NimStringV2 status;
	tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers;
	NimStringV2 body;
	tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* bodyStream;
};
typedef NU8 tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA;
typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  NI len; tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content* p;
};
struct tySequence__3EvzHGO0xyXGnJBUggwfKQ {
  NI len; tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content* p;
};
struct Exception {
	RootObj Sup;
	Exception* parent;
	NCSTRING name;
	NimStringV2 message;
	tySequence__3EvzHGO0xyXGnJBUggwfKQ trace;
	Exception* up;
};
struct tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug {
	Exception Sup;
};
struct tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw {
	tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug Sup;
};
struct tyObject_IOError__FsM2LSiW5usgjecIvsloBA {
	tyObject_CatchableError__liO6E8JNJNTVmf9cnXKZiug Sup;
};
struct tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw {
	tyObject_IOError__FsM2LSiW5usgjecIvsloBA Sup;
};
typedef NU8 tySet_tyEnum_SocketFlag__rHOG5kQY7JytAyg5qMPU8w;
struct tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg {
	tyObject_IOError__FsM2LSiW5usgjecIvsloBA Sup;
};
typedef NU8 tyEnum_SslHandshakeType__RgoNg67zPremT9a0QqPHgWQ;
struct tySequence__JiteSJxrvz63iP2o9bcn2Sg {
  NI len; tySequence__JiteSJxrvz63iP2o9bcn2Sg_Content* p;
};
struct tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w {
	tySequence__JiteSJxrvz63iP2o9bcn2Sg data;
	NI counter;
};
struct tyTuple__g1w83cyyBYiVU9c8WEJWnjQ {
	NI Field0;
	NimStringV2 Field1;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ Field2;
};
struct tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg {
	NI a;
	NI b;
};
struct tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ {
	NI a;
	NI b;
};
struct tyObject_Duration__IhPGomXjacpk8ChnxqMuoA {
	NI64 seconds;
	NI nanosecond;
};
typedef N_CLOSURE_PTR(void, TM__9brjMmGFaIx4wBkLyxxXZxw_162) (NI64 total_p0, NI64 progress_p1, NI64 speed_p2);
struct tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ {
  NI len; tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ_Content* p;
};
struct tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ {
	tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ content;
};
struct tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg {
	NimStringV2 name;
	NimStringV2 content;
	NIM_BOOL isFile;
union{
	struct {
	NimStringV2 filename;
	NimStringV2 contentType;
	NI64 fileSize;
	NIM_BOOL isStream;
} _isFile_1;
};
};
struct tyObject_FileStreamObj__55YZdAmhEXf1sGHQMYxWjw {
	tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ Sup;
	FILE* f;
};
typedef NU8 tyEnum_FileMode__wjF0STQGT1PBuQEl3p0tng;
struct tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ {
	NI Field0;
	NI Field1;
};
struct tySequence__8Np6tlClE5az1CyqZdN19bQ_Content { NI cap; tyTuple__1v9bKyksXWMsm0vNwmZ4EuQ data[SEQ_DECL_SIZE]; };
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content { NI cap; NimStringV2 data[SEQ_DECL_SIZE]; };
struct tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw {
	NCSTRING procname;
	NI line;
	NCSTRING filename;
};
struct tySequence__3EvzHGO0xyXGnJBUggwfKQ_Content { NI cap; tyObject_StackTraceEntry__lcKzdyiD6sm3eeh28rx7fw data[SEQ_DECL_SIZE]; };
struct tySequence__JiteSJxrvz63iP2o9bcn2Sg_Content { NI cap; tyTuple__g1w83cyyBYiVU9c8WEJWnjQ data[SEQ_DECL_SIZE]; };
struct tySequence__9bfo7bx6ZLtUN9bJ2Q3dVLwQ_Content { NI cap; tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u1244)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicStatic)(void* p_p0, TNimTypeV2* desc_p1);
static N_INLINE(NI, minuspercent___system_u813)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3555)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA* s_p1, TNimTypeV2* desc_p2);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6518)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u1264)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZnet_u313)(tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p_p0, NI alignment_p1);
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u406)(tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* dest_p0);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpcore_u251)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZnet_u288)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u1276)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* dest_p0, void* env_p1);
static N_INLINE(void, nimTraceRef)(void* q_p0, TNimTypeV2* desc_p1, void* env_p2);
static N_INLINE(void, add__system_u3076)(tyObject_CellSeq__ssWvVk43J2HePNvNGK2tCw* s_p0, void** c_p1, TNimTypeV2* t_p2);
N_LIB_PRIVATE N_NIMCALL(void, resize__system_u3084)(tyObject_CellSeq__ssWvVk43J2HePNvNGK2tCw* s_p0);
static N_INLINE(NI, pluspercent___system_u793)(NI x_p0, NI y_p1);
static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZhttpcore_u280)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw** dest_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2754)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i_p0, NI64 a_p1, NI64 b_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZhttpclient_u445)(tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A** dest_p0, tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* src_p1);
static N_INLINE(void, nimIncRef)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZhttpclient_u1402)(tyProc__TSOsjF4c9aXotPerq9cEE56A* dest_p0, tyProc__TSOsjF4c9aXotPerq9cEE56A src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZstreams_u797)(tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ** dest_p0, tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* src_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_StringStreamObj__FCeo9aaO9bFFsI9aQbl29arbwg*, newStringStream__pureZstreams_u942)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZstreams_u725)(tyObject_StringStreamObj__FCeo9aaO9bFFsI9aQbl29arbwg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZnet_u1582)(tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A** dest_p0, tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* src_p1, NIM_BOOL cyclic_p2);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZnet_u1590)(tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A** dest_p0, tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* src_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A*, newContext__pureZnet_u1430)(tyEnum_SslProtVersion__63N9cTBSInRxyR9c85mYOFZw protVersion_p0, tyEnum_SslCVerifyMode__EuQlnQ2XUooe3ihTmPFZaQ verifyMode_p1, NimStringV2 certFile_p2, NimStringV2 keyFile_p3, NimStringV2 cipherList_p4, NimStringV2 caDir_p5, NimStringV2 caFile_p6, NimStringV2 ciphersuites_p7);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZnet_u1579)(tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u95)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, get__basicZpackageinfos_u555)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NimStringV2 url_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, request__basicZpackageinfos_u562)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NimStringV2 url_p1, tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA httpMethod_p2, NimStringV2 body_p3, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p4, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p5);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__system_u2188)(void* a_p0, int v_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_u1904)(NimStringV2 s_p0, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p1);
N_LIB_PRIVATE N_NIMCALL(void, parseUri__pureZuri_u295)(NimStringV2 uri_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* Result);
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, requestAux__pureZhttpclient_u5713)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* url_p1, tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA httpMethod_p2, NimStringV2 body_p3, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p4, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p5);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e_p0, NCSTRING ename_p1, NCSTRING procname_p2, NCSTRING filename_p3, NI line_p4);
N_LIB_PRIVATE N_NIMCALL(void, newConnection__pureZhttpclient_u4556)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* url_p1);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1);
static N_INLINE(NIM_BOOL, equalMem__system_u1763)(void* a_p0, void* b_p1, NI size_p2);
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZuri_u216)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* dest_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* src_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuToLowerAsciiStr)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6541)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u4442)(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u3757)(tySequence__3EvzHGO0xyXGnJBUggwfKQ dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u4454)(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw* dest_p0, void* env_p1);
N_LIB_PRIVATE N_NIMCALL(void, close__pureZhttpclient_u2143)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0);
N_LIB_PRIVATE N_NIMCALL(void, close__pureZnet_u1942)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, tySet_tyEnum_SocketFlag__rHOG5kQY7JytAyg5qMPU8w flags_p1);
N_LIB_PRIVATE N_NIMCALL(NI, nsuParseInt)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZnet_u525)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag** dest_p0, tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* src_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag*, dial__pureZnet_u2532)(NimStringV2 address_p0, NU16 port_p1, tyEnum_Protocol__x11L2EqCXuQVMDp2SGyCyA protocol_p2, NIM_BOOL buffered_p3);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZnet_u514)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, socks5hHandshake__pureZhttpclient_u4129)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* url_p1);
N_LIB_PRIVATE N_NIMCALL(void, send__pureZnet_u2287)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, NimStringV2 data_p1, tySet_tyEnum_SocketFlag__rHOG5kQY7JytAyg5qMPU8w flags_p2, NI maxRetries_p3);
static N_INLINE(NimStringV2, recv__pureZnet_u2212)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, NI size_p1, NI timeout_p2, tySet_tyEnum_SocketFlag__rHOG5kQY7JytAyg5qMPU8w flags_p3);
N_NIMCALL(NimStringV2, mnewString)(NI len_p0);
N_LIB_PRIVATE N_NIMCALL(NI, recv__pureZnet_u2204)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, NimStringV2* data_p1, NI size_p2, NI timeout_p3, tySet_tyEnum_SocketFlag__rHOG5kQY7JytAyg5qMPU8w flags_p4);
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, copyMem__system_u1755)(void* dest_p0, void* source_p1, NI size_p2);
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorU)(NU64 i_p0, NU64 a_p1, NU64 b_p2);
static N_INLINE(void, appendChar)(NimStringV2* dest_p0, NIM_CHAR c_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, rawNewString)(NI space_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2760)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, eqdestroy___system_u281)(NimStringV2 x_p0);
N_LIB_PRIVATE N_NIMCALL(void, httpError__pureZhttpclient_u311)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u320)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6552)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u340)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u352)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* dest_p0, void* env_p1);
static N_INLINE(void, nimMarkCyclic)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___pureZhttpclient_u317)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg** dest_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toHex__pureZstrutils_u809)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
static N_INLINE(void, nimPrepareStrMutationV2)(NimStringV2* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimPrepareStrMutationImpl__system_u2493)(NimStringV2* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, startSsl__pureZhttpclient_u4576)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NimStringV2 hostname_p1);
N_LIB_PRIVATE N_NIMCALL(void, wrapConnectedSocket__pureZnet_u1798)(tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* ctx_p0, tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p1, tyEnum_SslHandshakeType__RgoNg67zPremT9a0QqPHgWQ handshake_p2, NimStringV2 hostname_p3);
N_LIB_PRIVATE N_NIMCALL(void, raiseDefect)(void);
static N_INLINE(Exception*, getCurrentException)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u3719)(Exception** dest_p0, Exception* src_p1, NIM_BOOL cyclic_p2);
static N_INLINE(void, popCurrentException)(void);
N_LIB_PRIVATE N_NIMCALL(void, initUri__pureZuri_u207)(NIM_BOOL isIpv6_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* Result);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, generateHeaders__pureZhttpclient_u1147)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* requestUrl_p0, tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA httpMethod_p1, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p2, tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* proxy_p3);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___pureZhttpcore_u29)(tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA e_p0);
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1);
N_LIB_PRIVATE N_NIMCALL(void, prepareAdd)(NimStringV2* s_p0, NI addLen_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringV2 s_p0, NimStringV2 prefix_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___pureZuri_u409)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* u_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZuri_u213)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasKey__pureZhttpcore_u2506)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 key_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, encode__pureZbase64_u42)(NIM_CHAR* s_p0, NI s_p0Len_0, NIM_BOOL safe_p1);
N_LIB_PRIVATE N_NIMCALL(NI, len__pureZhttpcore_u901)(tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w* t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u5585)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* dest_p0, tySequence__sM4lkSb7zS6F7OVMvW9cffQ src_p1);
static N_INLINE(NIM_BOOL, nimAddInt)(NI a_p0, NI b_p1, NI* res_p2);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u5582)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ dest_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw*, newHttpHeaders__pureZhttpcore_u109)(NIM_BOOL titleCase_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, parseResponse__pureZhttpclient_u3545)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NIM_BOOL getBody_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u3752)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6597)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u3717)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u3729)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* dest_p0, void* env_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZhttpcore_u286)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw** dest_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpcore_u277)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* dest_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, recvLine__pureZnet_u2240)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, NI timeout_p1, tySet_tyEnum_SocketFlag__rHOG5kQY7JytAyg5qMPU8w flags_p2, NI maxLength_p3);
N_LIB_PRIVATE N_NIMCALL(NI, skipIgnoreCase__pureZparseutils_u926)(NimStringV2 s_p0, NimStringV2 token_p1, NI start_p2);
static N_INLINE(NI, skipWhitespace__pureZparseutils_u917)(NimStringV2 s_p0, NI start_p1);
static N_INLINE(NI, skipWhitespace__pureZparseutils_u130)(NIM_CHAR* s_p0, NI s_p0Len_0);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError4)(NI l1_p0, NI h1_p1, NI h2_p2);
static N_INLINE(NimStringV2, X5BX5D___pureZstrutils_u1319)(NimStringV2 s_p0, tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg x_p1);
static N_INLINE(NIM_BOOL, nimSubInt)(NI a_p0, NI b_p1, NI* res_p2);
static N_INLINE(tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg, dotdot___stdZenumutils_u105)(NI a_p0, NI b_p1);
static N_INLINE(NimStringV2*, X5BX5D___pureZhttpclient_u2928)(NimStringV2* s_p0, NI s_p0Len_0, NI i_p1);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, X5BX5D___pureZhttpcore_u565)(tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w* t_p0, NimStringV2 key_p1);
static N_INLINE(NimStringV2, toCaseInsensitive__pureZhttpcore_u105)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 s_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toTitleCase__pureZhttpcore_u96)(NimStringV2 s_p0);
static N_INLINE(NI, parseUntil__pureZparseutils_u952)(NimStringV2 s_p0, NimStringV2* token_p1, NIM_CHAR until_p2, NI start_p3);
static N_INLINE(NI, parseUntil__pureZparseutils_u252)(NIM_CHAR* s_p0, NI s_p0Len_0, NimStringV2* token_p1, NIM_CHAR until_p2);
N_LIB_PRIVATE N_NIMCALL(void, fastSubstr__pureZparseutils_u225)(NIM_CHAR* s_p0, NI s_p0Len_0, NimStringV2* token_p1, NI length_p2);
N_LIB_PRIVATE N_NIMCALL(void, add__pureZhttpcore_u2291)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 key_p1, NimStringV2 value_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuStrip)(NimStringV2 s_p0, NIM_BOOL leading_p1, NIM_BOOL trailing_p2, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars_p3);
static N_INLINE(NI, len__pureZhttpcore_u2560)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0);
N_LIB_PRIVATE N_NIMCALL(NI, code__pureZhttpclient_u3690)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* response_p0);
static N_INLINE(NimStringV2, X5BX5D___pureZstrutils_u1291)(NimStringV2 s_p0, tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ x_p1);
static N_INLINE(tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ, dotdot___stdZstrbasics_u48)(NI a_p0, NI b_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZstreams_u789)(tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ** dest_p0, tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* src_p1, NIM_BOOL cyclic_p2);
N_LIB_PRIVATE N_NIMCALL(void, parseBody__pureZhttpclient_u2766)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p1, NimStringV2 httpVersion_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toString__pureZhttpcore_u1636)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ values_p0);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, getOrDefault__pureZhttpcore_u2551)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 key_p1, tySequence__sM4lkSb7zS6F7OVMvW9cffQ default_p2);
N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2);
N_LIB_PRIVATE N_NIMCALL(void, parseChunks__pureZhttpclient_u2449)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0);
N_LIB_PRIVATE N_NIMCALL(NI, recvFull__pureZhttpclient_u2130)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NI size_p1, NI timeout_p2, NIM_BOOL keep_p3);
N_LIB_PRIVATE N_NIMCALL(void, write__pureZstreams_u221)(tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, NimStringV2 x_p1);
N_LIB_PRIVATE N_NIMCALL(void, reportProgress__pureZhttpclient_u1850)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NI64 progress_p1);
static N_INLINE(NIM_BOOL, nimAddInt64)(NI64 a_p0, NI64 b_p1, NI64* res_p2);
N_LIB_PRIVATE N_NIMCALL(NI64, inSeconds__pureZtimes_u792)(tyObject_Duration__IhPGomXjacpk8ChnxqMuoA dur_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__IhPGomXjacpk8ChnxqMuoA, minus___stdZmonotimes_u63)(tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw a_p0, tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw b_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw, getMonoTime__stdZmonotimes_u10)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___systemZdollars_u14)(NI xX60gensym0__p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpcore_u1600)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, setPosition__pureZstreams_u70)(tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, NI pos_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u5591)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* dest_p0, tySequence__sM4lkSb7zS6F7OVMvW9cffQ src_p1);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, format__pureZhttpclient_u5127)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, getBoundary__pureZhttpclient_u893)(tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* p_p0);
N_LIB_PRIVATE N_NIMCALL(NI, rand__pureZrandom_u124)(NI max_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__pureZstrutils_u1900)(NimStringV2 s_p0, NimStringV2 sub_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u572)(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___pureZhttpcore_u1698)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 key_p1, NimStringV2 value_p2);
N_LIB_PRIVATE N_NIMCALL(void, readFileSizes__pureZhttpclient_u4742)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseFieldError2)(NimStringV2 f_p0, NI discVal_p1);
N_LIB_PRIVATE N_NIMCALL(NI64, nosgetFileSize)(NimStringV2 file_p0);
N_LIB_PRIVATE N_NIMCALL(void, add__stdZenumutils_u70)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* x_p0, NimStringV2 y_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, format__pureZhttpclient_u4752)(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* entry_p0, NimStringV2 boundary_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___systemZdollars_u34)(NI64 xX60gensym4__p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw*, override__pureZhttpclient_u5163)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* fallback_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* override_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZhttpcore_u182)(tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w* dest_p0, tyObject_Table__9c9cL6DR4DCGVMI1lXj9akt8w src_p1);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___pureZhttpcore_u1748)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 key_p1, tySequence__sM4lkSb7zS6F7OVMvW9cffQ value_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZhttpclient_u575)(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* dest_p0, tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, setLengthStrV2)(NimStringV2* s_p0, NI newLen_p1);
N_LIB_PRIVATE N_NIMCALL(void, sendFile__pureZhttpclient_u1127)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* entry_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__55YZdAmhEXf1sGHQMYxWjw*, newFileStream__pureZstreams_u1210)(NimStringV2 filename_p0, tyEnum_FileMode__wjF0STQGT1PBuQEl3p0tng mode_p1, NI bufSize_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, readStr__pureZstreams_u647)(tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0, NI length_p1);
N_LIB_PRIVATE N_NIMCALL(void, close__pureZstreams_u57)(tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZstreams_u1093)(tyObject_FileStreamObj__55YZdAmhEXf1sGHQMYxWjw* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___pureZuri_u210)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, getNewLocation__pureZhttpclient_u1141)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* lastURL_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p1, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* Result);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u2751)(NimStringV2* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, del__pureZhttpcore_u2440)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 key_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringV2 s_p0, NimStringV2 suffix_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZhttpclient_u3763)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A** dest_p0, tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZuri_u222)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* dest_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* src_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, responseContent__pureZhttpclient_u6012)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* resp_p0);
static N_INLINE(NIM_BOOL, is4xx__pureZhttpcore_u2974)(NI code_p0);
static N_INLINE(NIM_BOOL, contains__pureZtimes_u3403)(tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ s_p0, NI value_p1);
static N_INLINE(NIM_BOOL, is5xx__pureZhttpcore_u3026)(NI code_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, readAll__pureZstreams_u102)(tyObject_StreamObj__bsqueMN9aCOGm2aNaHkuxoQ* s_p0);
N_LIB_PRIVATE TNimTypeV2 NTIv2__qDWGISjAgnhGevjS3zDRKA_;
extern TNimTypeV2 NTIv2__AhFePg9cWdCpCeTypFfYs7A_;
extern TNimTypeV2 NTIv2__TmGWJPpyEwcsRMnCyN509ag_;
static NIM_CONST tyProc__TSOsjF4c9aXotPerq9cEE56A TM__9brjMmGFaIx4wBkLyxxXZxw_3 = {NIM_NIL,NIM_NIL};
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_4 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_5 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_4};
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_6 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_7 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_8 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[300+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_9 = { 300 | NIM_STRLIT_FLAG, "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_10 = {300, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_9};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_11 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_12 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[74+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_13 = { 74 | NIM_STRLIT_FLAG, "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_14 = {74, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_13};
static const struct {
  NI cap; NIM_CHAR data[76+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_15 = { 76 | NIM_STRLIT_FLAG, "httpclient.nim(396, 7) `result != nil` failure to initialize the SSL context" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_16 = {76, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_15};
static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__9brjMmGFaIx4wBkLyxxXZxw_17 = {
0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
static const struct {
  NI cap; NIM_CHAR data[102+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_18 = { 102 | NIM_STRLIT_FLAG, "httpclient.nim(1233, 13) `not url.contains({\'\\r\', \'\\n\'})` url shouldn\'t contain any newline characters" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_19 = {102, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_18};
extern TNimTypeV2 NTIv2__YUzEEs8pGqG7cYmcRoc5rw_;
static const struct {
  NI cap; NIM_CHAR data[23+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_20 = { 23 | NIM_STRLIT_FLAG, "No uri scheme supplied." };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_21 = {23, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_20};
static const struct {
  NI cap; NIM_CHAR data[5+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_22 = { 5 | NIM_STRLIT_FLAG, "https" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_23 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_22};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_24 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_22};
static const struct {
  NI cap; NIM_CHAR data[7+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_25 = { 7 | NIM_STRLIT_FLAG, "socks5h" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_26 = {7, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_25};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_27 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_22};
N_LIB_PRIVATE TNimTypeV2 NTIv2__BY5w1GR9bIATfsg9bf9b7XPrw_;
static const struct {
  NI cap; NIM_CHAR data[85+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_29 = { 85 | NIM_STRLIT_FLAG, "SSL support is not available. Cannot connect over SSL. Compile with -d:ssl to enable." };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_30 = {85, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_29};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_31 = {7, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_25};
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_32 = { 4 | NIM_STRLIT_FLAG, "\005\002\000\002" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_33 = {4, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_32};
static const struct {
  NI cap; NIM_CHAR data[3+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_34 = { 3 | NIM_STRLIT_FLAG, "\005\001\000" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_35 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_34};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_36 = { 2 | NIM_STRLIT_FLAG, "\005\002" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_37 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_36};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_38 = { 1 | NIM_STRLIT_FLAG, "\001" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_39 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_38};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_40 = { 2 | NIM_STRLIT_FLAG, "\001\000" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_41 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_40};
N_LIB_PRIVATE TNimTypeV2 NTIv2__MaZFRbUBnHocDo359czswvg_;
static const struct {
  NI cap; NIM_CHAR data[27+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_43 = { 27 | NIM_STRLIT_FLAG, "Proxy authentication failed" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_44 = {27, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_43};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_45 = { 2 | NIM_STRLIT_FLAG, "\005\000" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_46 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_45};
static const struct {
  NI cap; NIM_CHAR data[27+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_47 = { 27 | NIM_STRLIT_FLAG, "Unexpected proxy response: " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_48 = {27, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_47};
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_49 = { 4 | NIM_STRLIT_FLAG, "http" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_50 = {4, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_49};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_51 = { 2 | NIM_STRLIT_FLAG, "  " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_52 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_51};
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_53 = { 4 | NIM_STRLIT_FLAG, "\005\001\000\003" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_54 = {4, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_53};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_55 = {27, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_47};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_56 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_22};
static const struct {
  NI cap; NIM_CHAR data[3+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_57 = { 3 | NIM_STRLIT_FLAG, "443" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_58 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_57};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_59 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_22};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_60 = { 1 | NIM_STRLIT_FLAG, "/" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_61 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_60};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_62 = { 1 | NIM_STRLIT_FLAG, "\?" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_63 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_62};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_64 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_22};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_65 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[11+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_66 = { 11 | NIM_STRLIT_FLAG, " HTTP/1.1\015\012" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_67 = {11, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_66};
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_68 = { 4 | NIM_STRLIT_FLAG, "Host" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_69 = {4, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_68};
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_70 = { 6 | NIM_STRLIT_FLAG, "Host: " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_71 = {6, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_70};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_72 = { 2 | NIM_STRLIT_FLAG, "\015\012" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_73 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_74 = {6, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_70};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_75 = { 1 | NIM_STRLIT_FLAG, ":" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_76 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_75};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_77 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const struct {
  NI cap; NIM_CHAR data[10+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_78 = { 10 | NIM_STRLIT_FLAG, "Connection" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_79 = {10, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_78};
static const struct {
  NI cap; NIM_CHAR data[24+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_80 = { 24 | NIM_STRLIT_FLAG, "Connection: Keep-Alive\015\012" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_81 = {24, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_80};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_82 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_75};
static const struct {
  NI cap; NIM_CHAR data[27+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_83 = { 27 | NIM_STRLIT_FLAG, "Proxy-Authorization: Basic " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_84 = {27, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_83};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_85 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_86 = { 2 | NIM_STRLIT_FLAG, ": " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_87 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_86};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_88 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_89 = { 90 | NIM_STRLIT_FLAG, "iterators.nim(254, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_90 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_89};
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_91 = { 90 | NIM_STRLIT_FLAG, "tables.nim(1233, 13) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_92 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_91};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_94 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
N_LIB_PRIVATE TNimTypeV2 NTIv2__NJ70CWLkvEEDGugG4cmJ4A_;
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_96 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_97 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_98 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const struct {
  NI cap; NIM_CHAR data[5+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_99 = { 5 | NIM_STRLIT_FLAG, "HTTP/" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_100 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_99};
static const struct {
  NI cap; NIM_CHAR data[23+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_101 = { 23 | NIM_STRLIT_FLAG, "invalid http version, `" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_102 = {23, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_101};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_103 = { 1 | NIM_STRLIT_FLAG, "`" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_104 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_103};
static const struct {
  NI cap; NIM_CHAR data[3+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_106 = { 3 | NIM_STRLIT_FLAG, "1.1" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_107 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_106};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_108 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_106};
static const struct {
  NI cap; NIM_CHAR data[3+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_109 = { 3 | NIM_STRLIT_FLAG, "1.0" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_110 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_109};
static const struct {
  NI cap; NIM_CHAR data[24+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_111 = { 24 | NIM_STRLIT_FLAG, "unsupported http version" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_112 = {24, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_111};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_113 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_109};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_123 = { 1 | NIM_STRLIT_FLAG, "\012" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_124 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_123};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_125 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[44+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_127 = { 44 | NIM_STRLIT_FLAG, "Invalid headers - received empty header name" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_128 = {44, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_127};
static const struct {
  NI cap; NIM_CHAR data[44+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_129 = { 44 | NIM_STRLIT_FLAG, "Invalid headers - no colon after header name" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_130 = {44, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_129};
static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__9brjMmGFaIx4wBkLyxxXZxw_133 = {
0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
static const struct {
  NI cap; NIM_CHAR data[16+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_134 = { 16 | NIM_STRLIT_FLAG, "too many headers" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_135 = {16, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_134};
static const struct {
  NI cap; NIM_CHAR data[55+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_136 = { 55 | NIM_STRLIT_FLAG, "Connection was closed before full request has been made" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_137 = {55, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_136};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_138 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_4};
static const struct {
  NI cap; NIM_CHAR data[17+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_143 = { 17 | NIM_STRLIT_FLAG, "Transfer-Encoding" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_144 = {17, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_143};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_145 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[7+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_146 = { 7 | NIM_STRLIT_FLAG, "chunked" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_147 = {7, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_146};
static const struct {
  NI cap; NIM_CHAR data[40+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_148 = { 40 | NIM_STRLIT_FLAG, "Server terminated connection prematurely" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_149 = {40, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_148};
static const struct {
  NI cap; NIM_CHAR data[20+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_155 = { 20 | NIM_STRLIT_FLAG, "Invalid chunk size: " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_156 = {20, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_155};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_163 = {40, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_148};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_164 = {40, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_148};
static const struct {
  NI cap; NIM_CHAR data[14+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_165 = { 14 | NIM_STRLIT_FLAG, "Content-Length" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_166 = {14, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_165};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_167 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[43+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_168 = { 43 | NIM_STRLIT_FLAG, "Got disconnected while trying to read body." };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_169 = {43, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_168};
static const struct {
  NI cap; NIM_CHAR data[54+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_170 = { 54 | NIM_STRLIT_FLAG, "Received length doesn\'t match expected length. Wanted " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_171 = {54, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_170};
static const struct {
  NI cap; NIM_CHAR data[6+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_172 = { 6 | NIM_STRLIT_FLAG, " got: " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_173 = {6, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_172};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_174 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_109};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_175 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_106};
static const struct {
  NI cap; NIM_CHAR data[10+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_176 = { 10 | NIM_STRLIT_FLAG, "Connection" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_177 = {10, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_176};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_178 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_179 = {10, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_176};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_180 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[5+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_181 = { 5 | NIM_STRLIT_FLAG, "close" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_182 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_181};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_183 = {10, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_176};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_184 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_185 = {5, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_181};
static const struct {
  NI cap; NIM_CHAR data[3+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_186 = { 3 | NIM_STRLIT_FLAG, "200" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_187 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_186};
static const struct {
  NI cap; NIM_CHAR data[93+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_188 = { 93 | NIM_STRLIT_FLAG, "The proxy server rejected a CONNECT request, so a secure connection could not be established." };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_189 = {93, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_188};
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_190 = { 90 | NIM_STRLIT_FLAG, "iterators.nim(187, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_191 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_190};
static const struct {
  NI cap; NIM_CHAR data[12+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_192 = { 12 | NIM_STRLIT_FLAG, "Content-Type" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_193 = {12, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_192};
static const struct {
  NI cap; NIM_CHAR data[30+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_194 = { 30 | NIM_STRLIT_FLAG, "multipart/form-data; boundary=" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_195 = {30, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_194};
static const struct {
  NI cap; NIM_CHAR data[77+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_196 = { 77 | NIM_STRLIT_FLAG, "field \'isStream\' is not accessible for type \'MultipartEntry\' using \'isFile = " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_197 = {77, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_196};
static const struct {
  NI cap; NIM_CHAR data[77+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_198 = { 77 | NIM_STRLIT_FLAG, "field \'fileSize\' is not accessible for type \'MultipartEntry\' using \'isFile = " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_199 = {77, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_198};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_200 = {77, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_198};
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_201 = { 90 | NIM_STRLIT_FLAG, "iterators.nim(263, 11) `len(a) == L` the length of the seq changed while iterating over it" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_202 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_201};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_203 = { 2 | NIM_STRLIT_FLAG, "--" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_204 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_203};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_205 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const struct {
  NI cap; NIM_CHAR data[38+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_206 = { 38 | NIM_STRLIT_FLAG, "Content-Disposition: form-data; name=\"" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_207 = {38, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_206};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_208 = { 1 | NIM_STRLIT_FLAG, "\"" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_209 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_208};
static const struct {
  NI cap; NIM_CHAR data[12+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_210 = { 12 | NIM_STRLIT_FLAG, "; filename=\"" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_211 = {12, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_210};
static const struct {
  NI cap; NIM_CHAR data[77+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_212 = { 77 | NIM_STRLIT_FLAG, "field \'filename\' is not accessible for type \'MultipartEntry\' using \'isFile = " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_213 = {77, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_212};
static const struct {
  NI cap; NIM_CHAR data[3+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_214 = { 3 | NIM_STRLIT_FLAG, "\"\015\012" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_215 = {3, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_214};
static const struct {
  NI cap; NIM_CHAR data[14+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_216 = { 14 | NIM_STRLIT_FLAG, "Content-Type: " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_217 = {14, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_216};
static const struct {
  NI cap; NIM_CHAR data[80+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_218 = { 80 | NIM_STRLIT_FLAG, "field \'contentType\' is not accessible for type \'MultipartEntry\' using \'isFile = " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_219 = {80, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_218};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_220 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_221 = { 4 | NIM_STRLIT_FLAG, "\015\012\015\012" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_222 = {4, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_221};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_223 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_224 = {77, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_198};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_227 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_89};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_228 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_203};
static const struct {
  NI cap; NIM_CHAR data[4+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_229 = { 4 | NIM_STRLIT_FLAG, "--\015\012" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_230 = {4, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_229};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_232 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_89};
static const struct {
  NI cap; NIM_CHAR data[14+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_233 = { 14 | NIM_STRLIT_FLAG, "Content-Length" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_234 = {14, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_233};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_235 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_91};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_237 = {14, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_233};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_238 = {14, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_233};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_239 = {14, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_233};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_240 = { 1 | NIM_STRLIT_FLAG, "0" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_241 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_240};
static const struct {
  NI cap; NIM_CHAR data[10+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_242 = { 10 | NIM_STRLIT_FLAG, "user-agent" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_243 = {10, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_242};
static const struct {
  NI cap; NIM_CHAR data[10+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_244 = { 10 | NIM_STRLIT_FLAG, "User-Agent" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_245 = {10, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_244};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_246 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_247 = {77, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_196};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_248 = {2, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_72};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_249 = {90, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_190};
static const struct {
  NI cap; NIM_CHAR data[8+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_250 = { 8 | NIM_STRLIT_FLAG, "Location" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_251 = {8, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_250};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_252 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const struct {
  NI cap; NIM_CHAR data[24+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_253 = { 24 | NIM_STRLIT_FLAG, "location header expected" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_254 = {24, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_253};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_255 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_256 = {14, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_233};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_257 = {12, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_192};
static const struct {
  NI cap; NIM_CHAR data[17+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_258 = { 17 | NIM_STRLIT_FLAG, "Transfer-Encoding" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_259 = {17, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_258};
static const struct {
  NI cap; NIM_CHAR data[33+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_260 = { 33 | NIM_STRLIT_FLAG, "httpclient.nim(1295, 15) `false` " };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_261 = {33, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_260};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_262 = { 1 | NIM_STRLIT_FLAG, "." };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_263 = {1, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_262};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_264 = {4, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_68};
static const struct {
  NI cap; NIM_CHAR data[13+1];
} TM__9brjMmGFaIx4wBkLyxxXZxw_265 = { 13 | NIM_STRLIT_FLAG, "Authorization" };
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_266 = {13, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_265};
static const NimStringV2 TM__9brjMmGFaIx4wBkLyxxXZxw_268 = {0, (NimStrPayload*)&TM__9brjMmGFaIx4wBkLyxxXZxw_6};
N_LIB_PRIVATE NIM_THREADVAR tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* defaultSslContext__pureZhttpclient_u384;
static NIM_CONST NU32 TM__9brjMmGFaIx4wBkLyxxXZxw_2[1] = {897982720};
N_LIB_PRIVATE TNimTypeV2 NTIv2__qDWGISjAgnhGevjS3zDRKA_ = {.destructor = (void*)rttiDestroy__pureZhttpclient_u6518, .size = sizeof(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA), .align = (NI16) NIM_ALIGNOF(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA), .depth = 0, .display = TM__9brjMmGFaIx4wBkLyxxXZxw_2, .traceImpl = (void*)eqtrace___pureZhttpclient_u1276, .flags = 0};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4198;
static NIM_CONST NU32 TM__9brjMmGFaIx4wBkLyxxXZxw_28[5] = {3701606400, 1285336064, 599397120, 3275107584, 2389758976};
N_LIB_PRIVATE TNimTypeV2 NTIv2__BY5w1GR9bIATfsg9bf9b7XPrw_ = {.destructor = (void*)rttiDestroy__pureZhttpclient_u6541, .size = sizeof(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw), .align = (NI16) NIM_ALIGNOF(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw), .depth = 4, .display = TM__9brjMmGFaIx4wBkLyxxXZxw_28, .traceImpl = (void*)eqtrace___pureZhttpclient_u4454, .flags = 0};
static NIM_CONST NU32 TM__9brjMmGFaIx4wBkLyxxXZxw_42[5] = {3701606400, 1285336064, 599397120, 3275107584, 2789557504};
N_LIB_PRIVATE TNimTypeV2 NTIv2__MaZFRbUBnHocDo359czswvg_ = {.destructor = (void*)rttiDestroy__pureZhttpclient_u6552, .size = sizeof(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg), .align = (NI16) NIM_ALIGNOF(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg), .depth = 4, .display = TM__9brjMmGFaIx4wBkLyxxXZxw_42, .traceImpl = (void*)eqtrace___pureZhttpclient_u352, .flags = 0};
extern NIM_THREADVAR Exception* currException__system_u3686;
static NIM_CONST NU32 TM__9brjMmGFaIx4wBkLyxxXZxw_95[1] = {2666793216};
N_LIB_PRIVATE TNimTypeV2 NTIv2__NJ70CWLkvEEDGugG4cmJ4A_ = {.destructor = (void*)rttiDestroy__pureZhttpclient_u6597, .size = sizeof(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A), .align = (NI16) NIM_ALIGNOF(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A), .depth = 0, .display = TM__9brjMmGFaIx4wBkLyxxXZxw_95, .traceImpl = (void*)eqtrace___pureZhttpclient_u3729, .flags = 0};
static N_INLINE(NI, minuspercent___system_u813)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU64)(((NU) (x_p0))) - (NU64)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicStatic)(void* p_p0, TNimTypeV2* desc_p1) {
	NIM_BOOL result;
	result = NIM_FALSE;
	{
		tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA* cell_1;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u813(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
		cell_1 = ((tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA*) (T5_));
		{
			if (!((NI)((*cell_1).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell_1).rc = minuspercent___system_u813((*cell_1).rc, ((NI)16));
		}
LA6_: ;
		rememberCycle__system_u3555(result, cell_1, desc_p1);
	}
LA3_: ;
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
	NIM_BOOL result;
	result = NIM_FALSE;
	{
		tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA* cell_1;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u813(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
		cell_1 = ((tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA*) (T5_));
		{
			if (!((NI)((*cell_1).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell_1).rc = minuspercent___system_u813((*cell_1).rc, ((NI)16));
		}
LA6_: ;
		rememberCycle__system_u3555(result, cell_1, (*((TNimTypeV2**) (p_p0))));
	}
LA3_: ;
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p_p0) {
	NIM_BOOL result;
	result = NIM_FALSE;
	{
		tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA* cell_1;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u813(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
		cell_1 = ((tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA*) (T5_));
		{
			if (!((NI)((NI64)((*cell_1).rc) >> (NU64)(((NI)4) & (64 - 1))) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell_1).rc = minuspercent___system_u813((*cell_1).rc, ((NI)16));
		}
LA6_: ;
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u406)(tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* dest_p0) {
	if ((*dest_p0).url.anchor.p && !((*dest_p0).url.anchor.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.anchor.p);
}
	if ((*dest_p0).url.query.p && !((*dest_p0).url.query.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.query.p);
}
	if ((*dest_p0).url.path.p && !((*dest_p0).url.path.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.path.p);
}
	if ((*dest_p0).url.port.p && !((*dest_p0).url.port.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.port.p);
}
	if ((*dest_p0).url.hostname.p && !((*dest_p0).url.hostname.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.hostname.p);
}
	if ((*dest_p0).url.password.p && !((*dest_p0).url.password.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.password.p);
}
	if ((*dest_p0).url.username.p && !((*dest_p0).url.username.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.username.p);
}
	if ((*dest_p0).url.scheme.p && !((*dest_p0).url.scheme.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).url.scheme.p);
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u1264)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).bodyStream);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).bodyStream);
	}
LA4_: ;
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastCyclicStatic((*dest_p0).sslContext, ((TNimTypeV2*) ((&NTIv2__AhFePg9cWdCpCeTypFfYs7A_))));
		if (!T8_) goto LA9_;
		eqdestroy___pureZnet_u313((&(*(*dest_p0).sslContext)));
		nimRawDispose((*dest_p0).sslContext, ((NI)8));
	}
LA9_: ;
	{
		NIM_BOOL T13_;
		T13_ = (NIM_BOOL)0;
		T13_ = nimDecRefIsLastCyclicDyn((*dest_p0).onProgressChanged.ClE_0);
		if (!T13_) goto LA14_;
		nimDestroyAndDispose((*dest_p0).onProgressChanged.ClE_0);
	}
LA14_: ;
	{
		NIM_BOOL T18_;
		T18_ = (NIM_BOOL)0;
		T18_ = nimDecRefIsLast((*dest_p0).proxy);
		if (!T18_) goto LA19_;
		eqdestroy___pureZhttpclient_u406((&(*(*dest_p0).proxy)));
		nimRawDispose((*dest_p0).proxy, ((NI)8));
	}
LA19_: ;
	if ((*dest_p0).userAgent.p && !((*dest_p0).userAgent.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).userAgent.p);
}
	{
		NIM_BOOL T23_;
		T23_ = (NIM_BOOL)0;
		T23_ = nimDecRefIsLast((*dest_p0).headers);
		if (!T23_) goto LA24_;
		eqdestroy___pureZhttpcore_u251((&(*(*dest_p0).headers)));
		nimRawDispose((*dest_p0).headers, ((NI)8));
	}
LA24_: ;
	if ((*dest_p0).currentURL.anchor.p && !((*dest_p0).currentURL.anchor.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.anchor.p);
}
	if ((*dest_p0).currentURL.query.p && !((*dest_p0).currentURL.query.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.query.p);
}
	if ((*dest_p0).currentURL.path.p && !((*dest_p0).currentURL.path.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.path.p);
}
	if ((*dest_p0).currentURL.port.p && !((*dest_p0).currentURL.port.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.port.p);
}
	if ((*dest_p0).currentURL.hostname.p && !((*dest_p0).currentURL.hostname.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.hostname.p);
}
	if ((*dest_p0).currentURL.password.p && !((*dest_p0).currentURL.password.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.password.p);
}
	if ((*dest_p0).currentURL.username.p && !((*dest_p0).currentURL.username.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.username.p);
}
	if ((*dest_p0).currentURL.scheme.p && !((*dest_p0).currentURL.scheme.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).currentURL.scheme.p);
}
	{
		NIM_BOOL T28_;
		T28_ = (NIM_BOOL)0;
		T28_ = nimDecRefIsLastCyclicStatic((*dest_p0).socket, ((TNimTypeV2*) ((&NTIv2__TmGWJPpyEwcsRMnCyN509ag_))));
		if (!T28_) goto LA29_;
		eqdestroy___pureZnet_u288((&(*(*dest_p0).socket)));
		nimRawDispose((*dest_p0).socket, ((NI)8));
	}
LA29_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6518)(void* dest_p0) {
	eqdestroy___pureZhttpclient_u1264(((tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA*) (dest_p0)));
}
static N_INLINE(NI, pluspercent___system_u793)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU64)(((NU) (x_p0))) + (NU64)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(void, add__system_u3076)(tyObject_CellSeq__ssWvVk43J2HePNvNGK2tCw* s_p0, void** c_p1, TNimTypeV2* t_p2) {
	void** colontmp_;
	TNimTypeV2* colontmp__2;
	{
		if (!((*s_p0).cap <= (*s_p0).len)) goto LA3_;
		resize__system_u3084(s_p0);
	}
LA3_: ;
	colontmp_ = c_p1;
	colontmp__2 = t_p2;
	(*s_p0).d[(*s_p0).len].Field0 = colontmp_;
	(*s_p0).d[(*s_p0).len].Field1 = colontmp__2;
	(*s_p0).len = pluspercent___system_u793((*s_p0).len, ((NI)1));
}
static N_INLINE(void, nimTraceRef)(void* q_p0, TNimTypeV2* desc_p1, void* env_p2) {
	void** p_1;
	p_1 = ((void**) (q_p0));
	{
		tyObject_GcEnv__1z8AJ0tfLlYlFBizZRHD7A* j_1;
		if (!!(((*p_1) == NIM_NIL))) goto LA3_;
		j_1 = ((tyObject_GcEnv__1z8AJ0tfLlYlFBizZRHD7A*) (env_p2));
		add__system_u3076((&(*j_1).traceStack), p_1, desc_p1);
	}
LA3_: ;
}
static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1) {
	void** p_1;
	p_1 = ((void**) (q_p0));
	{
		tyObject_GcEnv__1z8AJ0tfLlYlFBizZRHD7A* j_1;
		if (!!(((*p_1) == NIM_NIL))) goto LA3_;
		j_1 = ((tyObject_GcEnv__1z8AJ0tfLlYlFBizZRHD7A*) (env_p1));
		add__system_u3076((&(*j_1).traceStack), p_1, (*((TNimTypeV2**) ((*p_1)))));
	}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u1276)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* dest_p0, void* env_p1) {
	nimTraceRef(&(*dest_p0).socket, ((TNimTypeV2*) ((&NTIv2__TmGWJPpyEwcsRMnCyN509ag_))), env_p1);
	nimTraceRefDyn((&(*dest_p0).onProgressChanged.ClE_0), env_p1);
	nimTraceRef(&(*dest_p0).sslContext, ((TNimTypeV2*) ((&NTIv2__AhFePg9cWdCpCeTypFfYs7A_))), env_p1);
	nimTraceRefDyn(&(*dest_p0).bodyStream, env_p1);
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u1244)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicStatic(dest_p0, ((TNimTypeV2*) ((&NTIv2__qDWGISjAgnhGevjS3zDRKA_))));
		if (!T3_) goto LA4_;
		eqdestroy___pureZhttpclient_u1264((&(*dest_p0)));
		nimRawDispose(dest_p0, ((NI)8));
	}
LA4_: ;
}
static N_INLINE(void, nimIncRef)(void* p_p0) {
	NI T1_;
	NI T2_;
	T1_ = (NI)0;
	T1_ = minuspercent___system_u813(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
	T2_ = (NI)0;
	T2_ = minuspercent___system_u813(((NI) (ptrdiff_t) (p_p0)), ((NI)16));
	(*((tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA*) (T1_))).rc = pluspercent___system_u793((*((tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA*) (T2_))).rc, ((NI)16));
}
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZhttpclient_u445)(tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A** dest_p0, tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* src_p1) {
	{
		if (!src_p1) goto LA3_;
		nimIncRef(src_p1);
	}
LA3_: ;
	{
		NIM_BOOL T7_;
		T7_ = (NIM_BOOL)0;
		T7_ = nimDecRefIsLast((*dest_p0));
		if (!T7_) goto LA8_;
		eqdestroy___pureZhttpclient_u406((&(*(*dest_p0))));
		nimRawDispose((*dest_p0), ((NI)8));
	}
LA8_: ;
	(*dest_p0) = src_p1;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZhttpclient_u1402)(tyProc__TSOsjF4c9aXotPerq9cEE56A* dest_p0, tyProc__TSOsjF4c9aXotPerq9cEE56A src_p1) {
	void* colontmp_;
	colontmp_ = (*dest_p0).ClE_0;
	(*dest_p0).ClE_0 = src_p1.ClE_0;
	(*dest_p0).ClP_0 = src_p1.ClP_0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn(colontmp_);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose(colontmp_);
	}
LA4_: ;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4198);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA*, newHttpClient__pureZhttpclient_u1230)(NimStringV2 userAgent_p0, NI maxRedirects_p1, tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* sslContext_p2, tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* proxy_p3, NI timeout_p4, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p5) {
	tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* result;
	tyObject_StringStreamObj__FCeo9aaO9bFFsI9aQbl29arbwg* T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	eqdestroy___pureZhttpclient_u1244(result);
	result = (tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA*) nimNewObj(sizeof(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA), NIM_ALIGNOF(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA));
	eqcopy___pureZhttpcore_u280(&(*result).headers, headers_p5);
	eqcopy___system_u2754((&(*result).userAgent), userAgent_p0);
	if ((maxRedirects_p1) < ((NI)0) || (maxRedirects_p1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(maxRedirects_p1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	(*result).maxRedirects = (maxRedirects_p1);
	eqcopy___pureZhttpclient_u445(&(*result).proxy, proxy_p3);
	(*result).timeout = timeout_p4;
	eqsink___pureZhttpclient_u1402((&(*result).onProgressChanged), TM__9brjMmGFaIx4wBkLyxxXZxw_3);
	T1_ = NIM_NIL;
	T1_ = newStringStream__pureZstreams_u942(TM__9brjMmGFaIx4wBkLyxxXZxw_5);
	if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZstreams_u725(T1_); goto BeforeRet_;}
	eqsink___pureZstreams_u797(&(*result).bodyStream, &T1_->Sup);
	(*result).getBody = NIM_TRUE;
	eqcopy___pureZnet_u1582(&(*result).sslContext, sslContext_p2, NIM_TRUE);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A*, getDefaultSSL__pureZhttpclient_u385)(void) {
	tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	eqcopy___pureZnet_u1582(&result, defaultSslContext__pureZhttpclient_u384, NIM_FALSE);
	{
		tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A* T5_;
		if (!(result == ((tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A*) NIM_NIL))) goto LA3_;
		T5_ = NIM_NIL;
		T5_ = newContext__pureZnet_u1430(((tyEnum_SslProtVersion__63N9cTBSInRxyR9c85mYOFZw)3), ((tyEnum_SslCVerifyMode__EuQlnQ2XUooe3ihTmPFZaQ)1), TM__9brjMmGFaIx4wBkLyxxXZxw_7, TM__9brjMmGFaIx4wBkLyxxXZxw_8, TM__9brjMmGFaIx4wBkLyxxXZxw_10, TM__9brjMmGFaIx4wBkLyxxXZxw_11, TM__9brjMmGFaIx4wBkLyxxXZxw_12, TM__9brjMmGFaIx4wBkLyxxXZxw_14);
		if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZnet_u1579(T5_); goto BeforeRet_;}
		eqsink___pureZnet_u1590(&defaultSslContext__pureZhttpclient_u384, T5_);
		eqcopy___pureZnet_u1582(&result, defaultSslContext__pureZhttpclient_u384, NIM_FALSE);
		{
			if (!!(!((result == ((tyObject_SslContextcolonObjectType___AhFePg9cWdCpCeTypFfYs7A*) NIM_NIL))))) goto LA8_;
			failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_16);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA8_: ;
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimSetMem__system_u2188)(void* a_p0, int v_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a_p0, v_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) {
	nimSetMem__system_u2188(p_p0, ((int)0), size_p1);
}
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2) {
	int result;
	result = memcmp(a_p0, b_p1, ((size_t) (size_p2)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__system_u1763)(void* a_p0, void* b_p1, NI size_p2) {
	NIM_BOOL result;
	int T1_;
	T1_ = (int)0;
	T1_ = nimCmpMem(a_p0, b_p1, size_p2);
	result = (T1_ == ((NI32)0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1) {
	NIM_BOOL result;
	NI alen_1;
	NI blen_1;
{	result = NIM_FALSE;
	alen_1 = a_p0.len;
	blen_1 = b_p1.len;
	{
		if (!(alen_1 == blen_1)) goto LA3_;
		{
			if (!(alen_1 == ((NI)0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
LA7_: ;
		result = equalMem__system_u1763(((void*) ((&a_p0.p->data[((NI)0)]))), ((void*) ((&b_p1.p->data[((NI)0)]))), (alen_1));
		goto BeforeRet_;
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u4442)(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.up);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.up);
	}
LA4_: ;
	eqdestroy___system_u3757((*dest_p0).Sup.Sup.Sup.trace);
	if ((*dest_p0).Sup.Sup.Sup.message.p && !((*dest_p0).Sup.Sup.Sup.message.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).Sup.Sup.Sup.message.p);
}
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.parent);
		if (!T8_) goto LA9_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.parent);
	}
LA9_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6541)(void* dest_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	eqdestroy___pureZhttpclient_u4442(((tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw*) (dest_p0)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u4454)(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw* dest_p0, void* env_p1) {
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.parent, env_p1);
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.up, env_p1);
}
N_LIB_PRIVATE N_NIMCALL(void, close__pureZhttpclient_u2143)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		if (!(*client_p0).connected) goto LA3_;
		close__pureZnet_u1942((*client_p0).socket, 2);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		(*client_p0).connected = NIM_FALSE;
	}
LA3_: ;
	}BeforeRet_: ;
}
static N_INLINE(NimStringV2, recv__pureZnet_u2212)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, NI size_p1, NI timeout_p2, tySet_tyEnum_SocketFlag__rHOG5kQY7JytAyg5qMPU8w flags_p3) {
	NimStringV2 result;
	NI T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	if ((size_p1) < ((NI)0) || (size_p1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(size_p1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString((size_p1));
	T1_ = (NI)0;
	T1_ = recv__pureZnet_u2204(socket_p0, (&result), size_p1, timeout_p2, flags_p3);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	(void)(T1_);
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest_p0, source_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, copyMem__system_u1755)(void* dest_p0, void* source_p1, NI size_p2) {
	nimCopyMem(dest_p0, source_p1, size_p2);
}
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1) {
	{
		if (!(((NI)0) < src_p1.len)) goto LA3_;
		copyMem__system_u1755(((void*) ((&(*(*dest_p0).p).data[(*dest_p0).len]))), ((void*) ((&(*src_p1.p).data[((NI)0)]))), (src_p1.len));
		(*dest_p0).len += src_p1.len;
		(*(*dest_p0).p).data[(*dest_p0).len] = 0;
	}
LA3_: ;
}
static N_INLINE(void, appendChar)(NimStringV2* dest_p0, NIM_CHAR c_p1) {
	(*(*dest_p0).p).data[(*dest_p0).len] = c_p1;
	(*dest_p0).len += ((NI)1);
	(*(*dest_p0).p).data[(*dest_p0).len] = 0;
}
static N_INLINE(void, eqdestroy___system_u281)(NimStringV2 x_p0) {
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u320)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose(dest_p0);
	}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u340)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.up);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.up);
	}
LA4_: ;
	eqdestroy___system_u3757((*dest_p0).Sup.Sup.Sup.trace);
	if ((*dest_p0).Sup.Sup.Sup.message.p && !((*dest_p0).Sup.Sup.Sup.message.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).Sup.Sup.Sup.message.p);
}
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastCyclicDyn((*dest_p0).Sup.Sup.Sup.parent);
		if (!T8_) goto LA9_;
		nimDestroyAndDispose((*dest_p0).Sup.Sup.Sup.parent);
	}
LA9_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6552)(void* dest_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	eqdestroy___pureZhttpclient_u340(((tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg*) (dest_p0)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u352)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* dest_p0, void* env_p1) {
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.parent, env_p1);
	nimTraceRefDyn(&(*dest_p0).Sup.Sup.Sup.up, env_p1);
}
static N_INLINE(void, nimMarkCyclic)(void* p_p0) {
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___pureZhttpclient_u317)(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg** dest_p0) {
	(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(void, httpError__pureZhttpclient_u311)(NimStringV2 msg_p0) {
	tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* e_1;
	tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg* blitTmp_1;
NIM_BOOL oldNimErrFin1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	e_1 = NIM_NIL;
	eqdestroy___pureZhttpclient_u320(e_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	e_1 = (tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg*) nimNewObj(sizeof(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg), NIM_ALIGNOF(tyObject_ProtocolError__MaZFRbUBnHocDo359czswvg));
	(*e_1).Sup.Sup.Sup.Sup.m_type = (&NTIv2__MaZFRbUBnHocDo359czswvg_);
	(*e_1).Sup.Sup.Sup.name = "ProtocolError";
	eqcopy___system_u2754((&(*e_1).Sup.Sup.Sup.message), msg_p0);
	blitTmp_1 = e_1;
	nimMarkCyclic(e_1);
	eqwasMoved___pureZhttpclient_u317(&e_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	raiseExceptionEx((Exception*)blitTmp_1, "ProtocolError", "httpError", "httpclient.nim", 378);
goto LA1_;
	{
		LA1_:;
	}
	{
		oldNimErrFin1_ = *nimErr_; *nimErr_ = NIM_FALSE;
		eqdestroy___pureZhttpclient_u320(e_1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		*nimErr_ = oldNimErrFin1_;
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(void, nimPrepareStrMutationV2)(NimStringV2* s_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = !(((*s_p0).p == ((NimStrPayload*) NIM_NIL)));
		if (!(T3_)) goto LA4_;
		T3_ = ((NI)((*(*s_p0).p).cap & ((NI)IL64(4611686018427387904))) == ((NI)IL64(4611686018427387904)));
LA4_: ;
		if (!T3_) goto LA5_;
		nimPrepareStrMutationImpl__system_u2493(s_p0);
	}
LA5_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, socks5hHandshake__pureZhttpclient_u4129)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* url_p1) {
	NimStringV2 resp_1;
	NI colontmpD_;
	NI colontmpD__2;
	NI colontmpD__3;
	NimStringV2 p_1;
	NimStringV2 colontmpD__4;
	NIM_BOOL hasAuth_1;
	NI port_1;
	NimStringV2 T40_;
	NimStringV2 T41_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	resp_1.len = 0; resp_1.p = NIM_NIL;
	colontmpD_ = (NI)0;
	colontmpD__2 = (NI)0;
	colontmpD__3 = (NI)0;
	p_1.len = 0; p_1.p = NIM_NIL;
	colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
	hasAuth_1 = !(((*(*client_p0).proxy).url.username.len == 0));
	{
		if (!hasAuth_1) goto LA4_;
		send__pureZnet_u2287((*client_p0).socket, TM__9brjMmGFaIx4wBkLyxxXZxw_33, 2, ((NI)100));
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA2_;
LA4_: ;
	{
		send__pureZnet_u2287((*client_p0).socket, TM__9brjMmGFaIx4wBkLyxxXZxw_35, 2, ((NI)100));
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA2_: ;
	resp_1 = recv__pureZnet_u2212((*client_p0).socket, ((NI)2), (*client_p0).timeout, 2);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		NIM_BOOL T9_;
		NimStringV2 authStr_1;
		NimStringV2 T14_;
		NimStringV2 T15_;
		T9_ = (NIM_BOOL)0;
		T9_ = eqStrings(resp_1, TM__9brjMmGFaIx4wBkLyxxXZxw_37);
		if (!(T9_)) goto LA10_;
		T9_ = hasAuth_1;
LA10_: ;
		if (!T9_) goto LA11_;
		authStr_1.len = 0; authStr_1.p = NIM_NIL;
		T14_.len = 0; T14_.p = NIM_NIL;
		if (((*(*client_p0).proxy).url.username.len) < 0 || ((*(*client_p0).proxy).url.username.len) > 255){ raiseRangeErrorU((*(*client_p0).proxy).url.username.len, 0, 255); goto LA13_;
		}
		if (((*(*client_p0).proxy).url.password.len) < 0 || ((*(*client_p0).proxy).url.password.len) > 255){ raiseRangeErrorU((*(*client_p0).proxy).url.password.len, 0, 255); goto LA13_;
		}
		T14_ = rawNewString((*(*client_p0).proxy).url.username.len + (*(*client_p0).proxy).url.password.len + 3);
appendString((&T14_), TM__9brjMmGFaIx4wBkLyxxXZxw_39);
appendChar((&T14_), ((NIM_CHAR) ((*(*client_p0).proxy).url.username.len)));
appendString((&T14_), (*(*client_p0).proxy).url.username);
appendChar((&T14_), ((NIM_CHAR) ((*(*client_p0).proxy).url.password.len)));
appendString((&T14_), (*(*client_p0).proxy).url.password);
		authStr_1 = T14_;
		send__pureZnet_u2287((*client_p0).socket, authStr_1, 2, ((NI)100));
		if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
		T15_.len = 0; T15_.p = NIM_NIL;
		T15_ = recv__pureZnet_u2212((*client_p0).socket, ((NI)2), (*client_p0).timeout, 2);
		if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u281(T15_); goto LA13_;}
		eqsink___system_u2760((&resp_1), T15_);
		{
			if (!!(eqStrings(resp_1, TM__9brjMmGFaIx4wBkLyxxXZxw_41))) goto LA18_;
			httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_44);
			if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
		}
LA18_: ;
		{
			LA13_:;
		}
		{
			if (authStr_1.p && !(authStr_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(authStr_1.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA7_;
LA11_: ;
	{
		NimStringV2 colontmpD__5;
		NimStringV2 colontmpD__6;
		NimStringV2 T26_;
		if (!!(eqStrings(resp_1, TM__9brjMmGFaIx4wBkLyxxXZxw_46))) goto LA23_;
		colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
		colontmpD__6.len = 0; colontmpD__6.p = NIM_NIL;
		T26_.len = 0; T26_.p = NIM_NIL;
		colontmpD__5 = toHex__pureZstrutils_u809(resp_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
		T26_ = rawNewString(colontmpD__5.len + 27);
appendString((&T26_), TM__9brjMmGFaIx4wBkLyxxXZxw_48);
appendString((&T26_), colontmpD__5);
		colontmpD__6 = T26_;
		httpError__pureZhttpclient_u311(colontmpD__6);
		if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
		{
			LA25_:;
		}
		{
			if (colontmpD__6.p && !(colontmpD__6.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__6.p);
}
			if (colontmpD__5.p && !(colontmpD__5.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__5.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA7_;
LA23_: ;
LA7_: ;
	{
		if (!!(((*url_p1).port.len == 0))) goto LA31_;
		colontmpD_ = nsuParseInt((*url_p1).port);
		if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
		port_1 = colontmpD_;
		{
			LA33_:;
		}
		{
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA29_;
LA31_: ;
	{
		if (!eqStrings((*url_p1).scheme, TM__9brjMmGFaIx4wBkLyxxXZxw_50)) goto LA37_;
		colontmpD__2 = ((NI)80);
		port_1 = colontmpD__2;
	}
	goto LA29_;
LA37_: ;
	{
		colontmpD__3 = ((NI)443);
		port_1 = colontmpD__3;
	}
LA29_: ;
	p_1 = TM__9brjMmGFaIx4wBkLyxxXZxw_52;
	if (((NI)0) < 0 || ((NI)0) >= p_1.len){ raiseIndexError2(((NI)0),p_1.len-1); goto LA1_;
	}
	nimPrepareStrMutationV2((&p_1));
	p_1.p->data[((NI)0)] = ((NIM_CHAR) ((NU16)((NU16)(((NU16) (port_1))) >> (NU64)(((NI)8) & (16 - 1)))));
	if (((NI)1) < 0 || ((NI)1) >= p_1.len){ raiseIndexError2(((NI)1),p_1.len-1); goto LA1_;
	}
	nimPrepareStrMutationV2((&p_1));
	p_1.p->data[((NI)1)] = ((NIM_CHAR) (port_1));
	T40_.len = 0; T40_.p = NIM_NIL;
	if (((*url_p1).hostname.len) < 0 || ((*url_p1).hostname.len) > 255){ raiseRangeErrorU((*url_p1).hostname.len, 0, 255); goto LA1_;
	}
	T40_ = rawNewString((*url_p1).hostname.len + p_1.len + 5);
appendString((&T40_), TM__9brjMmGFaIx4wBkLyxxXZxw_54);
appendChar((&T40_), ((NIM_CHAR) ((*url_p1).hostname.len)));
appendString((&T40_), (*url_p1).hostname);
appendString((&T40_), p_1);
	colontmpD__4 = T40_;
	send__pureZnet_u2287((*client_p0).socket, colontmpD__4, 2, ((NI)100));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	T41_.len = 0; T41_.p = NIM_NIL;
	T41_ = recv__pureZnet_u2212((*client_p0).socket, ((NI)10), (*client_p0).timeout, 2);
	if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u281(T41_); goto LA1_;}
	eqsink___system_u2760((&resp_1), T41_);
	{
		NIM_BOOL T44_;
		NIM_BOOL T45_;
		NimStringV2 colontmpD__7;
		NimStringV2 colontmpD__8;
		NimStringV2 T51_;
		T44_ = (NIM_BOOL)0;
		T45_ = (NIM_BOOL)0;
		T45_ = !((resp_1.len == ((NI)10)));
		if (T45_) goto LA46_;
		if (((NI)0) < 0 || ((NI)0) >= resp_1.len){ raiseIndexError2(((NI)0),resp_1.len-1); goto LA1_;
		}
		T45_ = !(((NU8)(resp_1.p->data[((NI)0)]) == (NU8)(5)));
LA46_: ;
		T44_ = T45_;
		if (T44_) goto LA47_;
		if (((NI)1) < 0 || ((NI)1) >= resp_1.len){ raiseIndexError2(((NI)1),resp_1.len-1); goto LA1_;
		}
		T44_ = !(((NU8)(resp_1.p->data[((NI)1)]) == (NU8)(0)));
LA47_: ;
		if (!T44_) goto LA48_;
		colontmpD__7.len = 0; colontmpD__7.p = NIM_NIL;
		colontmpD__8.len = 0; colontmpD__8.p = NIM_NIL;
		T51_.len = 0; T51_.p = NIM_NIL;
		colontmpD__7 = toHex__pureZstrutils_u809(resp_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA50_;
		T51_ = rawNewString(colontmpD__7.len + 27);
appendString((&T51_), TM__9brjMmGFaIx4wBkLyxxXZxw_55);
appendString((&T51_), colontmpD__7);
		colontmpD__8 = T51_;
		httpError__pureZhttpclient_u311(colontmpD__8);
		if (NIM_UNLIKELY(*nimErr_)) goto LA50_;
		{
			LA50_:;
		}
		{
			if (colontmpD__8.p && !(colontmpD__8.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__8.p);
}
			if (colontmpD__7.p && !(colontmpD__7.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__7.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA48_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD__4.p && !(colontmpD__4.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__4.p);
}
		if (p_1.p && !(p_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(p_1.p);
}
		if (resp_1.p && !(resp_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(resp_1.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(Exception*, getCurrentException)(void) {
	Exception* result;
	result = NIM_NIL;
	eqcopy___system_u3719(&result, currException__system_u3686, NIM_FALSE);
	return result;
}
static N_INLINE(void, popCurrentException)(void) {
	eqcopy___system_u3719(&currException__system_u3686, (*currException__system_u3686).up, NIM_FALSE);
}
N_LIB_PRIVATE N_NIMCALL(void, startSsl__pureZhttpclient_u4576)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NimStringV2 hostname_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	wrapConnectedSocket__pureZnet_u1798((*client_p0).sslContext, (*client_p0).socket, ((tyEnum_SslHandshakeType__RgoNg67zPremT9a0QqPHgWQ)0), hostname_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	if (NIM_UNLIKELY(*nimErr_)) {
		LA1_:;
		{
			Exception* T5_;
			*nimErr_ = NIM_FALSE;
			raiseDefect();
			close__pureZnet_u1942((*client_p0).socket, 2);
			if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			T5_ = NIM_NIL;
			T5_ = getCurrentException();
			popCurrentException();
			raiseExceptionEx((Exception*)T5_, "Exception", "startSsl", "httpclient.nim", 976);
goto LA3_;
			popCurrentException();
			LA3_:;
		}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1) {
	prepareAdd(s_p0, ((NI)1));
	(*(*s_p0).p).data[(*s_p0).len] = c_p1;
	(*s_p0).len += ((NI)1);
	(*(*s_p0).p).data[(*s_p0).len] = 0;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
	NIM_BOOL result;
	result = !((hcode_p0 == ((NI)0)));
	return result;
}
static N_INLINE(NIM_BOOL, nimAddInt)(NI a_p0, NI b_p1, NI* res_p2) {
	NIM_BOOL result;
	NI r_1;
	result = (NIM_BOOL)0;
	r_1 = ((NI) ((NU)((NU64)(((NU) (a_p0))) + (NU64)(((NU) (b_p1))))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI)0) <= (NI)(r_1 ^ a_p0));
		if (T3_) goto LA4_;
		T3_ = (((NI)0) <= (NI)(r_1 ^ b_p1));
LA4_: ;
		if (!T3_) goto LA5_;
		(*res_p2) = r_1;
	}
	goto LA1_;
LA5_: ;
	{
		result = NIM_TRUE;
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, generateHeaders__pureZhttpclient_u1147)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* requestUrl_p0, tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA httpMethod_p1, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p2, tyObject_ProxycolonObjectType___1adNpKdVBJZguvplkL5T7A* proxy_p3) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = dollar___pureZhttpcore_u29(httpMethod_p1);
	nimAddCharV1((&result), 32);
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (proxy_p3 == 0);
		if (T3_) goto LA4_;
		T3_ = eqStrings((*requestUrl_p0).scheme, TM__9brjMmGFaIx4wBkLyxxXZxw_59);
LA4_: ;
		if (!T3_) goto LA5_;
		{
			NIM_BOOL T9_;
			T9_ = (NIM_BOOL)0;
			T9_ = nsuStartsWith((*requestUrl_p0).path, TM__9brjMmGFaIx4wBkLyxxXZxw_61);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!!(T9_)) goto LA10_;
			nimAddCharV1((&result), 47);
		}
LA10_: ;
		prepareAdd((&result), (*requestUrl_p0).path.len + 0);
appendString((&result), (*requestUrl_p0).path);
		{
			NimStringV2 colontmpD_;
			NimStringV2 T16_;
			if (!(((NI)0) < (*requestUrl_p0).query.len)) goto LA14_;
			colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
			T16_.len = 0; T16_.p = NIM_NIL;
			T16_ = rawNewString((*requestUrl_p0).query.len + 1);
appendString((&T16_), TM__9brjMmGFaIx4wBkLyxxXZxw_63);
appendString((&T16_), (*requestUrl_p0).query);
			colontmpD_ = T16_;
			prepareAdd((&result), colontmpD_.len + 0);
appendString((&result), colontmpD_);
			if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
		}
LA14_: ;
	}
	goto LA1_;
LA5_: ;
	{
		tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA modifiedUrl_1;
		NimStringV2 colontmpD__2;
		nimZeroMem((void*)(&modifiedUrl_1), sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
		colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
		eqcopy___pureZuri_u216((&modifiedUrl_1), requestUrl_p0);
		{
			if (!eqStrings((*requestUrl_p0).scheme, TM__9brjMmGFaIx4wBkLyxxXZxw_64)) goto LA20_;
			eqsink___system_u2760((&modifiedUrl_1.scheme), TM__9brjMmGFaIx4wBkLyxxXZxw_65);
		}
LA20_: ;
		colontmpD__2 = dollar___pureZuri_u409((&modifiedUrl_1));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		prepareAdd((&result), colontmpD__2.len + 0);
appendString((&result), colontmpD__2);
		if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
		eqdestroy___pureZuri_u213((&modifiedUrl_1));
	}
LA1_: ;
	prepareAdd((&result), 11);
appendString((&result), TM__9brjMmGFaIx4wBkLyxxXZxw_67);
	{
		NIM_BOOL T24_;
		T24_ = (NIM_BOOL)0;
		T24_ = hasKey__pureZhttpcore_u2506(headers_p2, TM__9brjMmGFaIx4wBkLyxxXZxw_69);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!!(T24_)) goto LA25_;
		{
			NimStringV2 colontmpD__3;
			NimStringV2 T31_;
			if (!((*requestUrl_p0).port.len == 0)) goto LA29_;
			colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
			T31_.len = 0; T31_.p = NIM_NIL;
			T31_ = rawNewString((*requestUrl_p0).hostname.len + 8);
appendString((&T31_), TM__9brjMmGFaIx4wBkLyxxXZxw_71);
appendString((&T31_), (*requestUrl_p0).hostname);
appendString((&T31_), TM__9brjMmGFaIx4wBkLyxxXZxw_73);
			colontmpD__3 = T31_;
			prepareAdd((&result), colontmpD__3.len + 0);
appendString((&result), colontmpD__3);
			if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
		}
		goto LA27_;
LA29_: ;
		{
			NimStringV2 colontmpD__4;
			NimStringV2 T33_;
			colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
			T33_.len = 0; T33_.p = NIM_NIL;
			T33_ = rawNewString((*requestUrl_p0).hostname.len + (*requestUrl_p0).port.len + 9);
appendString((&T33_), TM__9brjMmGFaIx4wBkLyxxXZxw_74);
appendString((&T33_), (*requestUrl_p0).hostname);
appendString((&T33_), TM__9brjMmGFaIx4wBkLyxxXZxw_76);
appendString((&T33_), (*requestUrl_p0).port);
appendString((&T33_), TM__9brjMmGFaIx4wBkLyxxXZxw_77);
			colontmpD__4 = T33_;
			prepareAdd((&result), colontmpD__4.len + 0);
appendString((&result), colontmpD__4);
			if (colontmpD__4.p && !(colontmpD__4.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__4.p);
}
		}
LA27_: ;
	}
LA25_: ;
	{
		NIM_BOOL T36_;
		T36_ = (NIM_BOOL)0;
		T36_ = hasKey__pureZhttpcore_u2506(headers_p2, TM__9brjMmGFaIx4wBkLyxxXZxw_79);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!!(T36_)) goto LA37_;
		prepareAdd((&result), 24);
appendString((&result), TM__9brjMmGFaIx4wBkLyxxXZxw_81);
	}
LA37_: ;
	{
		NIM_BOOL T41_;
		NimStringV2 auth_1;
		NimStringV2 colontmpD__5;
		NimStringV2 colontmpD__6;
		NimStringV2 T45_;
		NimStringV2 T46_;
		T41_ = (NIM_BOOL)0;
		T41_ = !((proxy_p3 == 0));
		if (!(T41_)) goto LA42_;
		T41_ = !(((*proxy_p3).url.username.len == 0));
LA42_: ;
		if (!T41_) goto LA43_;
		auth_1.len = 0; auth_1.p = NIM_NIL;
		colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
		colontmpD__6.len = 0; colontmpD__6.p = NIM_NIL;
		T45_.len = 0; T45_.p = NIM_NIL;
		T45_ = rawNewString((*proxy_p3).url.username.len + (*proxy_p3).url.password.len + 1);
appendString((&T45_), (*proxy_p3).url.username);
appendString((&T45_), TM__9brjMmGFaIx4wBkLyxxXZxw_82);
appendString((&T45_), (*proxy_p3).url.password);
		colontmpD__5 = T45_;
		auth_1 = encode__pureZbase64_u42(((colontmpD__5).p) ? (colontmpD__5.p->data) : NIM_NIL, colontmpD__5.len, NIM_FALSE);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T46_.len = 0; T46_.p = NIM_NIL;
		T46_ = rawNewString(auth_1.len + 29);
appendString((&T46_), TM__9brjMmGFaIx4wBkLyxxXZxw_84);
appendString((&T46_), auth_1);
appendString((&T46_), TM__9brjMmGFaIx4wBkLyxxXZxw_85);
		colontmpD__6 = T46_;
		prepareAdd((&result), colontmpD__6.len + 0);
appendString((&result), colontmpD__6);
		if (colontmpD__6.p && !(colontmpD__6.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__6.p);
}
		if (colontmpD__5.p && !(colontmpD__5.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__5.p);
}
		if (auth_1.p && !(auth_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(auth_1.p);
}
	}
LA43_: ;
	{
		NimStringV2 key_1;
		NimStringV2 val_1;
		key_1.len = 0; key_1.p = NIM_NIL;
		val_1.len = 0; val_1.p = NIM_NIL;
		{
			NimStringV2 k_1;
			tySequence__sM4lkSb7zS6F7OVMvW9cffQ v_1;
			NI L_1;
			k_1.len = 0; k_1.p = NIM_NIL;
			v_1.len = 0; v_1.p = NIM_NIL;
			L_1 = len__pureZhttpcore_u901((*headers_p2).table);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			{
				NI h_1;
				NI colontmp_;
				NI T50_;
				NI res_1;
				h_1 = (NI)0;
				colontmp_ = (NI)0;
				T50_ = ((*(*headers_p2).table).data.len-1);
				colontmp_ = T50_;
				res_1 = ((NI)0);
				{
					while (1) {
						NI TM__9brjMmGFaIx4wBkLyxxXZxw_93;
						if (!(res_1 <= colontmp_)) goto LA52;
						h_1 = ((NI) (res_1));
						{
							NIM_BOOL T55_;
							if (h_1 < 0 || h_1 >= (*(*headers_p2).table).data.len){ raiseIndexError2(h_1,(*(*headers_p2).table).data.len-1); goto BeforeRet_;
							}
							T55_ = (NIM_BOOL)0;
							T55_ = isFilled__pureZcollectionsZtables_u31((*(*headers_p2).table).data.p->data[h_1].Field0);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							if (!T55_) goto LA56_;
							if (h_1 < 0 || h_1 >= (*(*headers_p2).table).data.len){ raiseIndexError2(h_1,(*(*headers_p2).table).data.len-1); goto BeforeRet_;
							}
							eqcopy___system_u2754((&k_1), (*(*headers_p2).table).data.p->data[h_1].Field1);
							if (h_1 < 0 || h_1 >= (*(*headers_p2).table).data.len){ raiseIndexError2(h_1,(*(*headers_p2).table).data.len-1); goto BeforeRet_;
							}
							eqcopy___system_u5585((&v_1), (*(*headers_p2).table).data.p->data[h_1].Field2);
							{
								NimStringV2* value_1;
								NI i_1;
								NI L_2;
								NI T59_;
								value_1 = (NimStringV2*)0;
								i_1 = ((NI)0);
								T59_ = v_1.len;
								L_2 = T59_;
								{
									while (1) {
										NimStringV2 colontmpD__7;
										NimStringV2 T62_;
										if (!(i_1 < L_2)) goto LA61;
										colontmpD__7.len = 0; colontmpD__7.p = NIM_NIL;
										if (i_1 < 0 || i_1 >= v_1.len){ raiseIndexError2(i_1,v_1.len-1); goto BeforeRet_;
										}
										value_1 = (&v_1.p->data[i_1]);
										eqcopy___system_u2754((&key_1), k_1);
										eqcopy___system_u2754((&val_1), (*value_1));
										T62_.len = 0; T62_.p = NIM_NIL;
										T62_ = rawNewString(key_1.len + val_1.len + 4);
appendString((&T62_), key_1);
appendString((&T62_), TM__9brjMmGFaIx4wBkLyxxXZxw_87);
appendString((&T62_), val_1);
appendString((&T62_), TM__9brjMmGFaIx4wBkLyxxXZxw_88);
										colontmpD__7 = T62_;
										prepareAdd((&result), colontmpD__7.len + 0);
appendString((&result), colontmpD__7);
										i_1 += ((NI)1);
										{
											NI T65_;
											T65_ = v_1.len;
											if (!!((T65_ == L_2))) goto LA66_;
											failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_90);
											if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
										}
LA66_: ;
										if (colontmpD__7.p && !(colontmpD__7.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__7.p);
}
									} LA61: ;
								}
							}
							{
								NI T70_;
								T70_ = (NI)0;
								T70_ = len__pureZhttpcore_u901((*headers_p2).table);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
								if (!!((T70_ == L_1))) goto LA71_;
								failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_92);
								if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							}
LA71_: ;
						}
LA56_: ;
						if (nimAddInt(res_1, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_93)) { raiseOverflow(); goto BeforeRet_;
						};
						res_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_93);
					} LA52: ;
				}
			}
			eqdestroy___system_u5582(v_1);
			if (k_1.p && !(k_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(k_1.p);
}
		}
		if (val_1.p && !(val_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(val_1.p);
}
		if (key_1.p && !(key_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(key_1.p);
}
	}
	prepareAdd((&result), 2);
appendString((&result), TM__9brjMmGFaIx4wBkLyxxXZxw_94);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u3717)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).bodyStream);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).bodyStream);
	}
LA4_: ;
	if ((*dest_p0).body.p && !((*dest_p0).body.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).body.p);
}
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLast((*dest_p0).headers);
		if (!T8_) goto LA9_;
		eqdestroy___pureZhttpcore_u251((&(*(*dest_p0).headers)));
		nimRawDispose((*dest_p0).headers, ((NI)8));
	}
LA9_: ;
	if ((*dest_p0).status.p && !((*dest_p0).status.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).status.p);
}
	if ((*dest_p0).version.p && !((*dest_p0).version.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).version.p);
}
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZhttpclient_u6597)(void* dest_p0) {
	eqdestroy___pureZhttpclient_u3717(((tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*) (dest_p0)));
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZhttpclient_u3729)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* dest_p0, void* env_p1) {
	nimTraceRefDyn(&(*dest_p0).bodyStream, env_p1);
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u3752)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicStatic(dest_p0, ((TNimTypeV2*) ((&NTIv2__NJ70CWLkvEEDGugG4cmJ4A_))));
		if (!T3_) goto LA4_;
		eqdestroy___pureZhttpclient_u3717((&(*dest_p0)));
		nimRawDispose(dest_p0, ((NI)8));
	}
LA4_: ;
}
static N_INLINE(NI, skipWhitespace__pureZparseutils_u130)(NIM_CHAR* s_p0, NI s_p0Len_0) {
	NI result;
{	result = ((NI)0);
	{
		while (1) {
			NIM_BOOL T3_;
			NI TM__9brjMmGFaIx4wBkLyxxXZxw_115;
			T3_ = (NIM_BOOL)0;
			T3_ = (result < s_p0Len_0);
			if (!(T3_)) goto LA4_;
			if (result < 0 || result >= s_p0Len_0){ raiseIndexError2(result,s_p0Len_0-1); goto BeforeRet_;
			}
			T3_ = (((NU8)(s_p0[result])) == ((NU8)(32)) || ((NU8)(s_p0[result])) == ((NU8)(9)) || ((NU8)(s_p0[result])) == ((NU8)(11)) || ((NU8)(s_p0[result])) == ((NU8)(13)) || ((NU8)(s_p0[result])) == ((NU8)(10)) || ((NU8)(s_p0[result])) == ((NU8)(12)));
LA4_: ;
			if (!T3_) goto LA2;
			if (nimAddInt(result, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_115)) { raiseOverflow(); goto BeforeRet_;
			};
			result = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_115);
		} LA2: ;
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, skipWhitespace__pureZparseutils_u917)(NimStringV2 s_p0, NI start_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	if ((s_p0.len-1)-start_p1 != -1 && (start_p1 < 0 || start_p1 >= s_p0.len || (s_p0.len-1) < 0 || (s_p0.len-1) >= s_p0.len)){ raiseIndexError4(start_p1, (s_p0.len-1), s_p0.len); goto BeforeRet_;
	}
	result = skipWhitespace__pureZparseutils_u130((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p1)) : NIM_NIL), ((s_p0.len-1))-(start_p1)+1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, nimSubInt)(NI a_p0, NI b_p1, NI* res_p2) {
	NIM_BOOL result;
	NI r_1;
	result = (NIM_BOOL)0;
	r_1 = ((NI) ((NU)((NU64)(((NU) (a_p0))) - (NU64)(((NU) (b_p1))))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI)0) <= (NI)(r_1 ^ a_p0));
		if (T3_) goto LA4_;
		T3_ = (((NI)0) <= (NI)(r_1 ^ (NI)((NU64) ~(b_p1))));
LA4_: ;
		if (!T3_) goto LA5_;
		(*res_p2) = r_1;
	}
	goto LA1_;
LA5_: ;
	{
		result = NIM_TRUE;
	}
LA1_: ;
	return result;
}
static N_INLINE(NimStringV2, X5BX5D___pureZstrutils_u1319)(NimStringV2 s_p0, tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg x_p1) {
	NimStringV2 result;
	NI a_1;
	NI L_1;
	NI TM__9brjMmGFaIx4wBkLyxxXZxw_117;
	NI TM__9brjMmGFaIx4wBkLyxxXZxw_118;
	NI TM__9brjMmGFaIx4wBkLyxxXZxw_119;
{	result.len = 0; result.p = NIM_NIL;
	a_1 = x_p1.a;
	if (nimSubInt(s_p0.len, x_p1.b, &TM__9brjMmGFaIx4wBkLyxxXZxw_117)) { raiseOverflow(); goto BeforeRet_;
	};
	if (nimSubInt((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_117), a_1, &TM__9brjMmGFaIx4wBkLyxxXZxw_118)) { raiseOverflow(); goto BeforeRet_;
	};
	if (nimAddInt((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_118), ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_119)) { raiseOverflow(); goto BeforeRet_;
	};
	L_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_119);
	if ((L_1) < ((NI)0) || (L_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(L_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString((L_1));
	{
		NI i_1;
		NI i_2;
		i_1 = (NI)0;
		i_2 = ((NI)0);
		{
			while (1) {
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_120;
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_121;
				if (!(i_2 < L_1)) goto LA3;
				i_1 = i_2;
				if (i_1 < 0 || i_1 >= result.len){ raiseIndexError2(i_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if (nimAddInt(i_1, a_1, &TM__9brjMmGFaIx4wBkLyxxXZxw_120)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_120) < 0 || (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_120) >= s_p0.len){ raiseIndexError2((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_120),s_p0.len-1); goto BeforeRet_;
				}
				result.p->data[i_1] = s_p0.p->data[(NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_120)];
				if (nimAddInt(i_2, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_121)) { raiseOverflow(); goto BeforeRet_;
				};
				i_2 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_121);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg, dotdot___stdZenumutils_u105)(NI a_p0, NI b_p1) {
	tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg result;
	result.a = a_p0;
	result.b = b_p1;
	return result;
}
static N_INLINE(NimStringV2*, X5BX5D___pureZhttpclient_u2928)(NimStringV2* s_p0, NI s_p0Len_0, NI i_p1) {
	NimStringV2* result;
	NI TM__9brjMmGFaIx4wBkLyxxXZxw_122;
{	result = (NimStringV2*)0;
	if (nimSubInt(s_p0Len_0, i_p1, &TM__9brjMmGFaIx4wBkLyxxXZxw_122)) { raiseOverflow(); goto BeforeRet_;
	};
	if ((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_122) < 0 || (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_122) >= s_p0Len_0){ raiseIndexError2((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_122),s_p0Len_0-1); goto BeforeRet_;
	}
	result = (&s_p0[(NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_122)]);
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NimStringV2, toCaseInsensitive__pureZhttpcore_u105)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0, NimStringV2 s_p1) {
	NimStringV2 result;
	NimStringV2 T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	T1_.len = 0; T1_.p = NIM_NIL;
	{
		if (!(*headers_p0).isTitleCase) goto LA4_;
		result = toTitleCase__pureZhttpcore_u96(s_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	goto LA2_;
LA4_: ;
	{
		result = nsuToLowerAsciiStr(s_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA2_: ;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, parseUntil__pureZparseutils_u252)(NIM_CHAR* s_p0, NI s_p0Len_0, NimStringV2* token_p1, NIM_CHAR until_p2) {
	NI result;
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	i_1 = ((NI)0);
	{
		while (1) {
			NIM_BOOL T3_;
			NI TM__9brjMmGFaIx4wBkLyxxXZxw_126;
			T3_ = (NIM_BOOL)0;
			T3_ = (i_1 < s_p0Len_0);
			if (!(T3_)) goto LA4_;
			if (i_1 < 0 || i_1 >= s_p0Len_0){ raiseIndexError2(i_1,s_p0Len_0-1); goto BeforeRet_;
			}
			T3_ = !(((NU8)(s_p0[i_1]) == (NU8)(until_p2)));
LA4_: ;
			if (!T3_) goto LA2;
			if (nimAddInt(i_1, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_126)) { raiseOverflow(); goto BeforeRet_;
			};
			i_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_126);
		} LA2: ;
	}
	result = i_1;
	fastSubstr__pureZparseutils_u225(s_p0, s_p0Len_0, token_p1, result);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, parseUntil__pureZparseutils_u952)(NimStringV2 s_p0, NimStringV2* token_p1, NIM_CHAR until_p2, NI start_p3) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	if ((s_p0.len-1)-start_p3 != -1 && (start_p3 < 0 || start_p3 >= s_p0.len || (s_p0.len-1) < 0 || (s_p0.len-1) >= s_p0.len)){ raiseIndexError4(start_p3, (s_p0.len-1), s_p0.len); goto BeforeRet_;
	}
	result = parseUntil__pureZparseutils_u252((((s_p0).p) ? ((NIM_CHAR*)s_p0.p->data+(start_p3)) : NIM_NIL), ((s_p0.len-1))-(start_p3)+1, token_p1, until_p2);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, len__pureZhttpcore_u2560)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p0) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = len__pureZhttpcore_u901((*headers_p0).table);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NimStringV2, X5BX5D___pureZstrutils_u1291)(NimStringV2 s_p0, tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ x_p1) {
	NimStringV2 result;
	NI a_1;
	NI L_1;
	NI TM__9brjMmGFaIx4wBkLyxxXZxw_139;
	NI TM__9brjMmGFaIx4wBkLyxxXZxw_140;
{	result.len = 0; result.p = NIM_NIL;
	a_1 = x_p1.a;
	if (nimSubInt(x_p1.b, a_1, &TM__9brjMmGFaIx4wBkLyxxXZxw_139)) { raiseOverflow(); goto BeforeRet_;
	};
	if (nimAddInt((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_139), ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_140)) { raiseOverflow(); goto BeforeRet_;
	};
	L_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_140);
	if ((L_1) < ((NI)0) || (L_1) > ((NI)IL64(9223372036854775807))){ raiseRangeErrorI(L_1, ((NI)0), ((NI)IL64(9223372036854775807))); goto BeforeRet_;
	}
	result = mnewString((L_1));
	{
		NI i_1;
		NI i_2;
		i_1 = (NI)0;
		i_2 = ((NI)0);
		{
			while (1) {
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_141;
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_142;
				if (!(i_2 < L_1)) goto LA3;
				i_1 = i_2;
				if (i_1 < 0 || i_1 >= result.len){ raiseIndexError2(i_1,result.len-1); goto BeforeRet_;
				}
				nimPrepareStrMutationV2((&result));
				if (nimAddInt(i_1, a_1, &TM__9brjMmGFaIx4wBkLyxxXZxw_141)) { raiseOverflow(); goto BeforeRet_;
				};
				if ((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_141) < 0 || (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_141) >= s_p0.len){ raiseIndexError2((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_141),s_p0.len-1); goto BeforeRet_;
				}
				result.p->data[i_1] = s_p0.p->data[(NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_141)];
				if (nimAddInt(i_2, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_142)) { raiseOverflow(); goto BeforeRet_;
				};
				i_2 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_142);
			} LA3: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ, dotdot___stdZstrbasics_u48)(NI a_p0, NI b_p1) {
	tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ result;
	result.a = a_p0;
	result.b = b_p1;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, code__pureZhttpclient_u3690)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* response_p0) {
	NI result;
	NimStringV2 colontmpD_;
	tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ T2_;
	NI T3_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	T2_ = dotdot___stdZstrbasics_u48(((NI)0), ((NI)2));
	colontmpD_ = X5BX5D___pureZstrutils_u1291((*response_p0).status, T2_);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	T3_ = (NI)0;
	T3_ = nsuParseInt(colontmpD_);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	if ((T3_) < ((NI)0) || (T3_) > ((NI)599)){ raiseRangeErrorI(T3_, ((NI)0), ((NI)599)); goto LA1_;
	}
	result = (T3_);
	if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	goto BeforeRet_;
	{
		LA1_:;
	}
	{
		if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, nimAddInt64)(NI64 a_p0, NI64 b_p1, NI64* res_p2) {
	NIM_BOOL result;
	NI64 r_1;
	result = (NIM_BOOL)0;
	r_1 = ((NI64) ((NU64)((NU64)(((NU64) (a_p0))) + (NU64)(((NU64) (b_p1))))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (IL64(0) <= (NI64)(r_1 ^ a_p0));
		if (T3_) goto LA4_;
		T3_ = (IL64(0) <= (NI64)(r_1 ^ b_p1));
LA4_: ;
		if (!T3_) goto LA5_;
		(*res_p2) = r_1;
	}
	goto LA1_;
LA5_: ;
	{
		result = NIM_TRUE;
	}
LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, reportProgress__pureZhttpclient_u1850)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NI64 progress_p1) {
	NI64 TM__9brjMmGFaIx4wBkLyxxXZxw_160;
	NI64 TM__9brjMmGFaIx4wBkLyxxXZxw_161;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	if (nimAddInt64((*client_p0).contentProgress, progress_p1, &TM__9brjMmGFaIx4wBkLyxxXZxw_160)) { raiseOverflow(); goto BeforeRet_;
	};
	(*client_p0).contentProgress = (NI64)(TM__9brjMmGFaIx4wBkLyxxXZxw_160);
	if (nimAddInt64((*client_p0).oneSecondProgress, progress_p1, &TM__9brjMmGFaIx4wBkLyxxXZxw_161)) { raiseOverflow(); goto BeforeRet_;
	};
	(*client_p0).oneSecondProgress = (NI64)(TM__9brjMmGFaIx4wBkLyxxXZxw_161);
	{
		tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw T3_;
		tyObject_Duration__IhPGomXjacpk8ChnxqMuoA T4_;
		NI64 T5_;
		T3_ = getMonoTime__stdZmonotimes_u10();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T4_ = minus___stdZmonotimes_u63(T3_, (*client_p0).lastProgressReport);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T5_ = (NI64)0;
		T5_ = inSeconds__pureZtimes_u792(T4_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!(IL64(1) <= T5_)) goto LA6_;
		{
			tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw T12_;
			if (!!(((*client_p0).onProgressChanged.ClP_0 == 0))) goto LA10_;
			(*client_p0).onProgressChanged.ClE_0? (*client_p0).onProgressChanged.ClP_0((*client_p0).contentTotal, (*client_p0).contentProgress, (*client_p0).oneSecondProgress, (*client_p0).onProgressChanged.ClE_0):((TM__9brjMmGFaIx4wBkLyxxXZxw_162)((*client_p0).onProgressChanged.ClP_0))((*client_p0).contentTotal, (*client_p0).contentProgress, (*client_p0).oneSecondProgress);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			(*client_p0).oneSecondProgress = IL64(0);
			nimZeroMem((void*)(&T12_), sizeof(tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw));
			T12_ = getMonoTime__stdZmonotimes_u10();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			(*client_p0).lastProgressReport = T12_;
		}
LA10_: ;
	}
LA6_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NI, recvFull__pureZhttpclient_u2130)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NI size_p1, NI timeout_p2, NIM_BOOL keep_p3) {
	NI result;
	NI readLen_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	readLen_1 = ((NI)0);
	{
		while (1) {
			NimStringV2 data_1;
			NI remainingSize_1;
			NI TM__9brjMmGFaIx4wBkLyxxXZxw_158;
			NI sizeToRecv_1;
			NI TM__9brjMmGFaIx4wBkLyxxXZxw_159;
			data_1.len = 0; data_1.p = NIM_NIL;
			{
				if (!(size_p1 == readLen_1)) goto LA6_;
				if (data_1.p && !(data_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(data_1.p);
}
				goto LA1;
			}
LA6_: ;
			if (nimSubInt(size_p1, readLen_1, &TM__9brjMmGFaIx4wBkLyxxXZxw_158)) { raiseOverflow(); goto LA3_;
			};
			remainingSize_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_158);
			sizeToRecv_1 = ((remainingSize_1 <= ((NI)4000)) ? remainingSize_1 : ((NI)4000));
			data_1 = recv__pureZnet_u2212((*client_p0).socket, sizeToRecv_1, timeout_p2, 2);
			if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			{
				if (!(data_1.len == 0)) goto LA10_;
				close__pureZhttpclient_u2143(client_p0);
				if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
				if (data_1.p && !(data_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(data_1.p);
}
				goto LA1;
			}
LA10_: ;
			if (nimAddInt(readLen_1, data_1.len, &TM__9brjMmGFaIx4wBkLyxxXZxw_159)) { raiseOverflow(); goto LA3_;
			};
			readLen_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_159);
			{
				if (!keep_p3) goto LA14_;
				write__pureZstreams_u221((*client_p0).bodyStream, data_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			}
LA14_: ;
			reportProgress__pureZhttpclient_u1850(client_p0, ((NI64) (data_1.len)));
			if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			{
				LA3_:;
			}
			{
				if (data_1.p && !(data_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(data_1.p);
}
			}
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
	} LA1: ;
	result = readLen_1;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, parseChunks__pureZhttpclient_u2449)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		while (1) {
			NimStringV2 chunkSizeStr_1;
			NI chunkSize_1;
			NI i_1;
			NI bytesRead_1;
			chunkSizeStr_1.len = 0; chunkSizeStr_1.p = NIM_NIL;
			chunkSize_1 = ((NI)0);
			chunkSizeStr_1 = recvLine__pureZnet_u2240((*client_p0).socket, ((NI)-1), 2, ((NI)1000000));
			if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			i_1 = ((NI)0);
			{
				if (!(chunkSizeStr_1.len == 0)) goto LA6_;
				httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_149);
				if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			}
LA6_: ;
			{
				while (1) {
					NI TM__9brjMmGFaIx4wBkLyxxXZxw_157;
					if (!(i_1 < chunkSizeStr_1.len)) goto LA9;
					if (i_1 < 0 || i_1 >= chunkSizeStr_1.len){ raiseIndexError2(i_1,chunkSizeStr_1.len-1); goto LA3_;
					}
					switch (((NU8)(chunkSizeStr_1.p->data[i_1]))) {
					case 48 ... 57:
					{
						NI TM__9brjMmGFaIx4wBkLyxxXZxw_150;
						if (i_1 < 0 || i_1 >= chunkSizeStr_1.len){ raiseIndexError2(i_1,chunkSizeStr_1.len-1); goto LA3_;
						}
						if (nimSubInt(((NU8)(chunkSizeStr_1.p->data[i_1])), ((NI)48), &TM__9brjMmGFaIx4wBkLyxxXZxw_150)) { raiseOverflow(); goto LA3_;
						};
						chunkSize_1 = (NI)((NI)((NU64)(chunkSize_1) << (NU64)(((NI)4) & (64 - 1))) | (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_150));
					}
					break;
					case 97 ... 102:
					{
						NI TM__9brjMmGFaIx4wBkLyxxXZxw_151;
						NI TM__9brjMmGFaIx4wBkLyxxXZxw_152;
						if (i_1 < 0 || i_1 >= chunkSizeStr_1.len){ raiseIndexError2(i_1,chunkSizeStr_1.len-1); goto LA3_;
						}
						if (nimSubInt(((NU8)(chunkSizeStr_1.p->data[i_1])), ((NI)97), &TM__9brjMmGFaIx4wBkLyxxXZxw_151)) { raiseOverflow(); goto LA3_;
						};
						if (nimAddInt((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_151), ((NI)10), &TM__9brjMmGFaIx4wBkLyxxXZxw_152)) { raiseOverflow(); goto LA3_;
						};
						chunkSize_1 = (NI)((NI)((NU64)(chunkSize_1) << (NU64)(((NI)4) & (64 - 1))) | (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_152));
					}
					break;
					case 65 ... 70:
					{
						NI TM__9brjMmGFaIx4wBkLyxxXZxw_153;
						NI TM__9brjMmGFaIx4wBkLyxxXZxw_154;
						if (i_1 < 0 || i_1 >= chunkSizeStr_1.len){ raiseIndexError2(i_1,chunkSizeStr_1.len-1); goto LA3_;
						}
						if (nimSubInt(((NU8)(chunkSizeStr_1.p->data[i_1])), ((NI)65), &TM__9brjMmGFaIx4wBkLyxxXZxw_153)) { raiseOverflow(); goto LA3_;
						};
						if (nimAddInt((NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_153), ((NI)10), &TM__9brjMmGFaIx4wBkLyxxXZxw_154)) { raiseOverflow(); goto LA3_;
						};
						chunkSize_1 = (NI)((NI)((NU64)(chunkSize_1) << (NU64)(((NI)4) & (64 - 1))) | (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_154));
					}
					break;
					case 59:
					{
						goto LA8;
					}
					break;
					default:
					{
						NimStringV2 colontmpD_;
						NimStringV2 T16_;
						colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
						T16_.len = 0; T16_.p = NIM_NIL;
						T16_ = rawNewString(chunkSizeStr_1.len + 20);
appendString((&T16_), TM__9brjMmGFaIx4wBkLyxxXZxw_156);
appendString((&T16_), chunkSizeStr_1);
						colontmpD_ = T16_;
						httpError__pureZhttpclient_u311(colontmpD_);
						if (NIM_UNLIKELY(*nimErr_)) goto LA15_;
						{
							LA15_:;
						}
						{
							if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
						}
						if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
					}
					break;
					}
					if (nimAddInt(i_1, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_157)) { raiseOverflow(); goto LA3_;
					};
					i_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_157);
				} LA9: ;
			} LA8: ;
			{
				NI T23_;
				if (!(chunkSize_1 <= ((NI)0))) goto LA21_;
				T23_ = (NI)0;
				T23_ = recvFull__pureZhttpclient_u2130(client_p0, ((NI)2), (*client_p0).timeout, NIM_FALSE);
				if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
				(void)(T23_);
				if (chunkSizeStr_1.p && !(chunkSizeStr_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(chunkSizeStr_1.p);
}
				goto LA1;
			}
LA21_: ;
			bytesRead_1 = recvFull__pureZhttpclient_u2130(client_p0, chunkSize_1, (*client_p0).timeout, NIM_TRUE);
			if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			{
				if (!!((bytesRead_1 == chunkSize_1))) goto LA26_;
				httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_163);
				if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			}
LA26_: ;
			bytesRead_1 = recvFull__pureZhttpclient_u2130(client_p0, ((NI)2), (*client_p0).timeout, NIM_FALSE);
			if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			{
				if (!!((bytesRead_1 == ((NI)2)))) goto LA30_;
				httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_164);
				if (NIM_UNLIKELY(*nimErr_)) goto LA3_;
			}
LA30_: ;
			{
				LA3_:;
			}
			{
				if (chunkSizeStr_1.p && !(chunkSizeStr_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(chunkSizeStr_1.p);
}
			}
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
	} LA1: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, parseBody__pureZhttpclient_u2766)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p1, NimStringV2 httpVersion_p2) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD_;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__2;
	NimStringV2 colontmpD__3;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__4;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__5;
	NimStringV2 colontmpD__6;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
	colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
	colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
	colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
	colontmpD__6.len = 0; colontmpD__6.p = NIM_NIL;
	(*client_p0).contentTotal = IL64(0);
	(*client_p0).contentProgress = IL64(0);
	(*client_p0).oneSecondProgress = IL64(0);
	nimZeroMem((void*)(&(*client_p0).lastProgressReport), sizeof(tyObject_MonoTime__OPj9am9cm67Ww8xBOG3ksEhw));
	{
		colontmpD_.len = 1; colontmpD_.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(1, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
		colontmpD_.p->data[0] = TM__9brjMmGFaIx4wBkLyxxXZxw_145;
		colontmpD__2 = getOrDefault__pureZhttpcore_u2551(headers_p1, TM__9brjMmGFaIx4wBkLyxxXZxw_144, colontmpD_);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		colontmpD__3 = toString__pureZhttpcore_u1636(colontmpD__2);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (!eqStrings(colontmpD__3, TM__9brjMmGFaIx4wBkLyxxXZxw_147)) goto LA4_;
		parseChunks__pureZhttpclient_u2449(client_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA2_;
LA4_: ;
	{
		tySequence__sM4lkSb7zS6F7OVMvW9cffQ contentLengthHeader_1;
		tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__7;
		NimStringV2 colontmpD__8;
		contentLengthHeader_1.len = 0; contentLengthHeader_1.p = NIM_NIL;
		colontmpD__7.len = 0; colontmpD__7.p = NIM_NIL;
		colontmpD__8.len = 0; colontmpD__8.p = NIM_NIL;
		colontmpD__7.len = 1; colontmpD__7.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(1, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
		colontmpD__7.p->data[0] = TM__9brjMmGFaIx4wBkLyxxXZxw_167;
		contentLengthHeader_1 = getOrDefault__pureZhttpcore_u2551(headers_p1, TM__9brjMmGFaIx4wBkLyxxXZxw_166, colontmpD__7);
		if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
		{
			NimStringV2 colontmpD__9;
			NI length_1;
			colontmpD__8 = toString__pureZhttpcore_u1636(contentLengthHeader_1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			if (!!((colontmpD__8.len == 0))) goto LA10_;
			colontmpD__9.len = 0; colontmpD__9.p = NIM_NIL;
			colontmpD__9 = toString__pureZhttpcore_u1636(contentLengthHeader_1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA12_;
			length_1 = nsuParseInt(colontmpD__9);
			if (NIM_UNLIKELY(*nimErr_)) goto LA12_;
			(*client_p0).contentTotal = ((NI64) (length_1));
			{
				NI recvLen_1;
				if (!(((NI)0) < length_1)) goto LA15_;
				recvLen_1 = recvFull__pureZhttpclient_u2130(client_p0, length_1, (*client_p0).timeout, NIM_TRUE);
				if (NIM_UNLIKELY(*nimErr_)) goto LA12_;
				{
					if (!(recvLen_1 == ((NI)0))) goto LA19_;
					close__pureZhttpclient_u2143(client_p0);
					if (NIM_UNLIKELY(*nimErr_)) goto LA12_;
					httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_169);
					if (NIM_UNLIKELY(*nimErr_)) goto LA12_;
				}
LA19_: ;
				{
					NimStringV2 colontmpD__10;
					NimStringV2 colontmpD__11;
					NimStringV2 colontmpD__12;
					NimStringV2 T26_;
					if (!!((recvLen_1 == length_1))) goto LA23_;
					colontmpD__10.len = 0; colontmpD__10.p = NIM_NIL;
					colontmpD__11.len = 0; colontmpD__11.p = NIM_NIL;
					colontmpD__12.len = 0; colontmpD__12.p = NIM_NIL;
					T26_.len = 0; T26_.p = NIM_NIL;
					colontmpD__10 = dollar___systemZdollars_u14(length_1);
					if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
					colontmpD__11 = dollar___systemZdollars_u14(recvLen_1);
					if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
					T26_ = rawNewString(colontmpD__10.len + colontmpD__11.len + 60);
appendString((&T26_), TM__9brjMmGFaIx4wBkLyxxXZxw_171);
appendString((&T26_), colontmpD__10);
appendString((&T26_), TM__9brjMmGFaIx4wBkLyxxXZxw_173);
appendString((&T26_), colontmpD__11);
					colontmpD__12 = T26_;
					httpError__pureZhttpclient_u311(colontmpD__12);
					if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
					{
						LA25_:;
					}
					{
						if (colontmpD__12.p && !(colontmpD__12.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__12.p);
}
						if (colontmpD__11.p && !(colontmpD__11.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__11.p);
}
						if (colontmpD__10.p && !(colontmpD__10.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__10.p);
}
					}
					if (NIM_UNLIKELY(*nimErr_)) goto LA12_;
				}
LA23_: ;
			}
LA15_: ;
			{
				LA12_:;
			}
			{
				if (colontmpD__9.p && !(colontmpD__9.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__9.p);
}
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
		}
		goto LA8_;
LA10_: ;
		{
			tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__13;
			tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__14;
			NimStringV2 colontmpD__15;
			tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__16;
			tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD__17;
			NimStringV2 colontmpD__18;
			NIM_BOOL implicitConnectionClose_1;
			NIM_BOOL T33_;
			NIM_BOOL T35_;
			colontmpD__13.len = 0; colontmpD__13.p = NIM_NIL;
			colontmpD__14.len = 0; colontmpD__14.p = NIM_NIL;
			colontmpD__15.len = 0; colontmpD__15.p = NIM_NIL;
			colontmpD__16.len = 0; colontmpD__16.p = NIM_NIL;
			colontmpD__17.len = 0; colontmpD__17.p = NIM_NIL;
			colontmpD__18.len = 0; colontmpD__18.p = NIM_NIL;
			T33_ = (NIM_BOOL)0;
			T33_ = eqStrings(httpVersion_p2, TM__9brjMmGFaIx4wBkLyxxXZxw_174);
			if (T33_) goto LA34_;
			T35_ = (NIM_BOOL)0;
			T35_ = eqStrings(httpVersion_p2, TM__9brjMmGFaIx4wBkLyxxXZxw_175);
			if (!(T35_)) goto LA36_;
			colontmpD__13.len = 1; colontmpD__13.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(1, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
			colontmpD__13.p->data[0] = TM__9brjMmGFaIx4wBkLyxxXZxw_178;
			colontmpD__14 = getOrDefault__pureZhttpcore_u2551(headers_p1, TM__9brjMmGFaIx4wBkLyxxXZxw_177, colontmpD__13);
			if (NIM_UNLIKELY(*nimErr_)) goto LA32_;
			colontmpD__15 = toString__pureZhttpcore_u1636(colontmpD__14);
			if (NIM_UNLIKELY(*nimErr_)) goto LA32_;
			T35_ = (colontmpD__15.len == 0);
LA36_: ;
			T33_ = T35_;
LA34_: ;
			implicitConnectionClose_1 = T33_;
			{
				NIM_BOOL T39_;
				T39_ = (NIM_BOOL)0;
				colontmpD__16.len = 1; colontmpD__16.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(1, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
				colontmpD__16.p->data[0] = TM__9brjMmGFaIx4wBkLyxxXZxw_180;
				colontmpD__17 = getOrDefault__pureZhttpcore_u2551(headers_p1, TM__9brjMmGFaIx4wBkLyxxXZxw_179, colontmpD__16);
				if (NIM_UNLIKELY(*nimErr_)) goto LA32_;
				colontmpD__18 = toString__pureZhttpcore_u1636(colontmpD__17);
				if (NIM_UNLIKELY(*nimErr_)) goto LA32_;
				T39_ = eqStrings(colontmpD__18, TM__9brjMmGFaIx4wBkLyxxXZxw_182);
				if (T39_) goto LA40_;
				T39_ = implicitConnectionClose_1;
LA40_: ;
				if (!T39_) goto LA41_;
				{
					while (1) {
						NI recvLen_2;
						recvLen_2 = recvFull__pureZhttpclient_u2130(client_p0, ((NI)4000), (*client_p0).timeout, NIM_TRUE);
						if (NIM_UNLIKELY(*nimErr_)) goto LA32_;
						{
							if (!!((recvLen_2 == ((NI)4000)))) goto LA47_;
							close__pureZhttpclient_u2143(client_p0);
							if (NIM_UNLIKELY(*nimErr_)) goto LA32_;
							goto LA43;
						}
LA47_: ;
					}
				} LA43: ;
			}
LA41_: ;
			{
				LA32_:;
			}
			{
				if (colontmpD__18.p && !(colontmpD__18.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__18.p);
}
				eqdestroy___pureZhttpcore_u1600(colontmpD__17);
				eqdestroy___system_u5582(colontmpD__16);
				if (colontmpD__15.p && !(colontmpD__15.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__15.p);
}
				eqdestroy___pureZhttpcore_u1600(colontmpD__14);
				eqdestroy___system_u5582(colontmpD__13);
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
		}
LA8_: ;
		{
			LA7_:;
		}
		{
			if (colontmpD__8.p && !(colontmpD__8.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__8.p);
}
			eqdestroy___system_u5582(colontmpD__7);
			eqdestroy___pureZhttpcore_u1600(contentLengthHeader_1);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA2_: ;
	setPosition__pureZstreams_u70((*client_p0).bodyStream, ((NI)0));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		colontmpD__4.len = 1; colontmpD__4.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(1, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
		colontmpD__4.p->data[0] = TM__9brjMmGFaIx4wBkLyxxXZxw_184;
		colontmpD__5 = getOrDefault__pureZhttpcore_u2551(headers_p1, TM__9brjMmGFaIx4wBkLyxxXZxw_183, colontmpD__4);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		colontmpD__6 = toString__pureZhttpcore_u1636(colontmpD__5);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (!eqStrings(colontmpD__6, TM__9brjMmGFaIx4wBkLyxxXZxw_185)) goto LA55_;
		close__pureZhttpclient_u2143(client_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA55_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD__6.p && !(colontmpD__6.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__6.p);
}
		eqdestroy___pureZhttpcore_u1600(colontmpD__5);
		eqdestroy___system_u5582(colontmpD__4);
		if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
		eqdestroy___pureZhttpcore_u1600(colontmpD__2);
		eqdestroy___system_u5582(colontmpD_);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, parseResponse__pureZhttpclient_u3545)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NIM_BOOL getBody_p1) {
	tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* result;
	NimStringV2 lastHeaderName_1;
	NimStringV2 line_1;
	NIM_BOOL parsedStatus_1;
	NI linei_1;
	NIM_BOOL fullyRead_1;
	tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* T2_;
	tyObject_StringStreamObj__FCeo9aaO9bFFsI9aQbl29arbwg* T76_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	lastHeaderName_1.len = 0; lastHeaderName_1.p = NIM_NIL;
	line_1.len = 0; line_1.p = NIM_NIL;
	eqdestroy___pureZhttpclient_u3752(result);
	result = (tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*) nimNewObj(sizeof(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A), NIM_ALIGNOF(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A));
	parsedStatus_1 = NIM_FALSE;
	linei_1 = ((NI)0);
	fullyRead_1 = NIM_FALSE;
	lastHeaderName_1 = TM__9brjMmGFaIx4wBkLyxxXZxw_96;
	line_1 = TM__9brjMmGFaIx4wBkLyxxXZxw_97;
	T2_ = NIM_NIL;
	T2_ = newHttpHeaders__pureZhttpcore_u109(NIM_FALSE);
	if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZhttpcore_u277(T2_); goto LA1_;}
	eqsink___pureZhttpcore_u286(&(*result).headers, T2_);
	{
		while (1) {
			NimStringV2 T5_;
			linei_1 = ((NI)0);
			T5_.len = 0; T5_.p = NIM_NIL;
			T5_ = recvLine__pureZnet_u2240((*client_p0).socket, (*client_p0).timeout, 2, ((NI)1000000));
			if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u281(T5_); goto LA1_;}
			eqsink___system_u2760((&line_1), T5_);
			{
				if (!(line_1.len == 0)) goto LA8_;
				close__pureZhttpclient_u2143(client_p0);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				goto LA3;
			}
LA8_: ;
			{
				if (!eqStrings(line_1, TM__9brjMmGFaIx4wBkLyxxXZxw_98)) goto LA12_;
				fullyRead_1 = NIM_TRUE;
				goto LA3;
			}
LA12_: ;
			{
				NI le_1;
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_105;
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_114;
				NI T35_;
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_116;
				tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg T36_;
				NimStringV2 T37_;
				if (!!(parsedStatus_1)) goto LA16_;
				le_1 = skipIgnoreCase__pureZparseutils_u926(line_1, TM__9brjMmGFaIx4wBkLyxxXZxw_100, linei_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				{
					NimStringV2 colontmpD_;
					NimStringV2 T23_;
					if (!(le_1 <= ((NI)0))) goto LA20_;
					colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
					T23_.len = 0; T23_.p = NIM_NIL;
					T23_ = rawNewString(line_1.len + 24);
appendString((&T23_), TM__9brjMmGFaIx4wBkLyxxXZxw_102);
appendString((&T23_), line_1);
appendString((&T23_), TM__9brjMmGFaIx4wBkLyxxXZxw_104);
					colontmpD_ = T23_;
					httpError__pureZhttpclient_u311(colontmpD_);
					if (NIM_UNLIKELY(*nimErr_)) goto LA22_;
					{
						LA22_:;
					}
					{
						if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
					}
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				}
LA20_: ;
				if (nimAddInt(linei_1, le_1, &TM__9brjMmGFaIx4wBkLyxxXZxw_105)) { raiseOverflow(); goto LA1_;
				};
				linei_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_105);
				le_1 = skipIgnoreCase__pureZparseutils_u926(line_1, TM__9brjMmGFaIx4wBkLyxxXZxw_107, linei_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				{
					if (!(((NI)0) < le_1)) goto LA28_;
					eqsink___system_u2760((&(*result).version), TM__9brjMmGFaIx4wBkLyxxXZxw_108);
				}
				goto LA26_;
LA28_: ;
				{
					le_1 = skipIgnoreCase__pureZparseutils_u926(line_1, TM__9brjMmGFaIx4wBkLyxxXZxw_110, linei_1);
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					{
						if (!(le_1 <= ((NI)0))) goto LA33_;
						httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_112);
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					}
LA33_: ;
					eqsink___system_u2760((&(*result).version), TM__9brjMmGFaIx4wBkLyxxXZxw_113);
				}
LA26_: ;
				if (nimAddInt(linei_1, le_1, &TM__9brjMmGFaIx4wBkLyxxXZxw_114)) { raiseOverflow(); goto LA1_;
				};
				linei_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_114);
				T35_ = (NI)0;
				T35_ = skipWhitespace__pureZparseutils_u917(line_1, linei_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				if (nimAddInt(linei_1, T35_, &TM__9brjMmGFaIx4wBkLyxxXZxw_116)) { raiseOverflow(); goto LA1_;
				};
				linei_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_116);
				T36_ = dotdot___stdZenumutils_u105(linei_1, ((NI)1));
				T37_.len = 0; T37_.p = NIM_NIL;
				T37_ = X5BX5D___pureZstrutils_u1319(line_1, T36_);
				if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u281(T37_); goto LA1_;}
				eqsink___system_u2760((&(*result).status), T37_);
				parsedStatus_1 = NIM_TRUE;
			}
			goto LA14_;
LA16_: ;
			{
				{
					if (((NI)0) < 0 || ((NI)0) >= line_1.len){ raiseIndexError2(((NI)0),line_1.len-1); goto LA1_;
					}
					if (!(((NU8)(line_1.p->data[((NI)0)])) == ((NU8)(32)) || ((NU8)(line_1.p->data[((NI)0)])) == ((NU8)(9)))) goto LA41_;
					{
						if (!(lastHeaderName_1.len == 0)) goto LA45_;
					}
					goto LA43_;
LA45_: ;
					{
						NimStringV2 colontmpD__2;
						NimStringV2 colontmpD__3;
						tySequence__sM4lkSb7zS6F7OVMvW9cffQ* T49_;
						NimStringV2* T50_;
						NimStringV2 T51_;
						colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
						colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
						colontmpD__2 = toCaseInsensitive__pureZhttpcore_u105((*result).headers, lastHeaderName_1);
						if (NIM_UNLIKELY(*nimErr_)) goto LA48_;
						T49_ = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*)0;
						T49_ = X5BX5D___pureZhttpcore_u565((*(*result).headers).table, colontmpD__2);
						if (NIM_UNLIKELY(*nimErr_)) goto LA48_;
						T50_ = (NimStringV2*)0;
						T50_ = X5BX5D___pureZhttpclient_u2928(((*T49_).p) ? ((*T49_).p->data) : NIM_NIL, (*T49_).len, ((NI)1));
						if (NIM_UNLIKELY(*nimErr_)) goto LA48_;
						T51_.len = 0; T51_.p = NIM_NIL;
						T51_ = rawNewString(line_1.len + 1);
appendString((&T51_), TM__9brjMmGFaIx4wBkLyxxXZxw_124);
appendString((&T51_), line_1);
						colontmpD__3 = T51_;
						prepareAdd((&(*T50_)), colontmpD__3.len + 0);
appendString((&(*T50_)), colontmpD__3);
						{
							LA48_:;
						}
						{
							if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
							if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
						}
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					}
LA43_: ;
				}
				goto LA39_;
LA41_: ;
				{
					NimStringV2 name_1;
					NimStringV2 colontmpD__4;
					NimStringV2 colontmpD__5;
					NI le_2;
					NI TM__9brjMmGFaIx4wBkLyxxXZxw_131;
					NI TM__9brjMmGFaIx4wBkLyxxXZxw_132;
					tyObject_HSlice__LlH5wTnoA9aQeGwJu9b9bzAYg T64_;
					name_1.len = 0; name_1.p = NIM_NIL;
					colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
					colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
					name_1 = TM__9brjMmGFaIx4wBkLyxxXZxw_125;
					le_2 = parseUntil__pureZparseutils_u952(line_1, (&name_1), 58, linei_1);
					if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
					{
						if (!(le_2 <= ((NI)0))) goto LA58_;
						httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_128);
						if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
					}
LA58_: ;
					{
						if (!(line_1.len == le_2)) goto LA62_;
						httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_130);
						if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
					}
LA62_: ;
					if (nimAddInt(linei_1, le_2, &TM__9brjMmGFaIx4wBkLyxxXZxw_131)) { raiseOverflow(); goto LA55_;
					};
					linei_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_131);
					if (nimAddInt(linei_1, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_132)) { raiseOverflow(); goto LA55_;
					};
					linei_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_132);
					eqcopy___system_u2754((&lastHeaderName_1), name_1);
					T64_ = dotdot___stdZenumutils_u105(linei_1, ((NI)1));
					colontmpD__4 = X5BX5D___pureZstrutils_u1319(line_1, T64_);
					if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
					colontmpD__5 = nsuStrip(colontmpD__4, NIM_TRUE, NIM_TRUE, TM__9brjMmGFaIx4wBkLyxxXZxw_133);
					if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
					add__pureZhttpcore_u2291((*result).headers, name_1, colontmpD__5);
					if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
					{
						NI T67_;
						T67_ = (NI)0;
						T67_ = len__pureZhttpcore_u2560((*result).headers);
						if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
						if (!(((NI)10000) < T67_)) goto LA68_;
						httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_135);
						if (NIM_UNLIKELY(*nimErr_)) goto LA55_;
					}
LA68_: ;
					{
						LA55_:;
					}
					{
						if (colontmpD__5.p && !(colontmpD__5.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__5.p);
}
						if (colontmpD__4.p && !(colontmpD__4.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__4.p);
}
						if (name_1.p && !(name_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(name_1.p);
}
					}
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				}
LA39_: ;
			}
LA14_: ;
		}
	} LA3: ;
	{
		if (!!(fullyRead_1)) goto LA74_;
		httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_137);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA74_: ;
	T76_ = NIM_NIL;
	T76_ = newStringStream__pureZstreams_u942(TM__9brjMmGFaIx4wBkLyxxXZxw_138);
	if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZstreams_u725(T76_); goto LA1_;}
	eqsink___pureZstreams_u797(&(*result).bodyStream, &T76_->Sup);
	{
		NIM_BOOL T79_;
		NI T81_;
		T79_ = (NIM_BOOL)0;
		T79_ = getBody_p1;
		if (!(T79_)) goto LA80_;
		T81_ = (NI)0;
		T81_ = code__pureZhttpclient_u3690(result);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		T79_ = !((T81_ == ((NI)204)));
LA80_: ;
		if (!T79_) goto LA82_;
		eqcopy___pureZstreams_u789(&(*client_p0).bodyStream, (*result).bodyStream, NIM_TRUE);
		parseBody__pureZhttpclient_u2766(client_p0, (*result).headers, (*result).version);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA77_;
LA82_: ;
	{
	}
LA77_: ;
	{
		LA1_:;
	}
	{
		if (line_1.p && !(line_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(line_1.p);
}
		if (lastHeaderName_1.p && !(lastHeaderName_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(lastHeaderName_1.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, newConnection__pureZhttpclient_u4556)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* url_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		NIM_BOOL T3_;
		NIM_BOOL T4_;
		NIM_BOOL T5_;
		tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA connectionUrl_1;
		NU16 colontmpD_;
		NU16 colontmpD__2;
		NimStringV2 colontmpD__3;
		NIM_BOOL isSsl_1;
		NU16 port_1;
		tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* T49_;
		T3_ = (NIM_BOOL)0;
		T4_ = (NIM_BOOL)0;
		T5_ = (NIM_BOOL)0;
		T5_ = !(eqStrings((*client_p0).currentURL.hostname, (*url_p1).hostname));
		if (T5_) goto LA6_;
		T5_ = !(eqStrings((*client_p0).currentURL.scheme, (*url_p1).scheme));
LA6_: ;
		T4_ = T5_;
		if (T4_) goto LA7_;
		T4_ = !(eqStrings((*client_p0).currentURL.port, (*url_p1).port));
LA7_: ;
		T3_ = T4_;
		if (T3_) goto LA8_;
		T3_ = !((*client_p0).connected);
LA8_: ;
		if (!T3_) goto LA9_;
		nimZeroMem((void*)(&connectionUrl_1), sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
		colontmpD_ = (NU16)0;
		colontmpD__2 = (NU16)0;
		colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
		isSsl_1 = NIM_FALSE;
		eqcopy___pureZuri_u216((&connectionUrl_1), url_p1);
		{
			NimStringV2 colontmpD__4;
			if (!((*client_p0).proxy == 0)) goto LA14_;
			colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
			colontmpD__4 = nsuToLowerAsciiStr((*url_p1).scheme);
			if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			isSsl_1 = eqStrings(colontmpD__4, TM__9brjMmGFaIx4wBkLyxxXZxw_23);
			if (colontmpD__4.p && !(colontmpD__4.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__4.p);
}
		}
		goto LA12_;
LA14_: ;
		{
			NimStringV2 proxyScheme_1;
			proxyScheme_1.len = 0; proxyScheme_1.p = NIM_NIL;
			eqcopy___pureZuri_u216((&connectionUrl_1), (&(*(*client_p0).proxy).url));
			proxyScheme_1 = nsuToLowerAsciiStr(connectionUrl_1.scheme);
			if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			{
				if (!eqStrings(proxyScheme_1, TM__9brjMmGFaIx4wBkLyxxXZxw_24)) goto LA19_;
				isSsl_1 = NIM_TRUE;
			}
			goto LA17_;
LA19_: ;
			{
				NimStringV2 colontmpD__5;
				if (!eqStrings(proxyScheme_1, TM__9brjMmGFaIx4wBkLyxxXZxw_26)) goto LA22_;
				colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
				colontmpD__5 = nsuToLowerAsciiStr((*url_p1).scheme);
				if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
				isSsl_1 = eqStrings(colontmpD__5, TM__9brjMmGFaIx4wBkLyxxXZxw_27);
				if (colontmpD__5.p && !(colontmpD__5.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__5.p);
}
			}
			goto LA17_;
LA22_: ;
LA17_: ;
			if (proxyScheme_1.p && !(proxyScheme_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(proxyScheme_1.p);
}
		}
LA12_: ;
		{
			NIM_BOOL T26_;
			tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw* T30_;
			T26_ = (NIM_BOOL)0;
			T26_ = isSsl_1;
			if (!(T26_)) goto LA27_;
			T26_ = NIM_FALSE;
LA27_: ;
			if (!T26_) goto LA28_;
			T30_ = NIM_NIL;
			T30_ = (tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw*) nimNewObj(sizeof(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw), NIM_ALIGNOF(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw));
			(*T30_).Sup.Sup.Sup.Sup.m_type = (&NTIv2__BY5w1GR9bIATfsg9bf9b7XPrw_);
			(*T30_).Sup.Sup.Sup.name = "HttpRequestError";
			(*T30_).Sup.Sup.Sup.message = TM__9brjMmGFaIx4wBkLyxxXZxw_30;
			(*T30_).Sup.Sup.Sup.parent = ((Exception*) NIM_NIL);
			raiseExceptionEx((Exception*)T30_, "HttpRequestError", "newConnection", "httpclient.nim", 1040);
goto LA11_;
		}
LA28_: ;
		{
			if (!(*client_p0).connected) goto LA33_;
			close__pureZhttpclient_u2143(client_p0);
			if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			(*client_p0).connected = NIM_FALSE;
		}
LA33_: ;
		{
			NU16 colontmpD__6;
			NU16 colontmpD__7;
			if (!(connectionUrl_1.port.len == 0)) goto LA37_;
			colontmpD__6 = (NU16)0;
			colontmpD__7 = (NU16)0;
			{
				if (!isSsl_1) goto LA41_;
				colontmpD__6 = ((NU16)443);
				colontmpD_ = colontmpD__6;
			}
			goto LA39_;
LA41_: ;
			{
				colontmpD__7 = ((NU16)80);
				colontmpD_ = colontmpD__7;
			}
LA39_: ;
			port_1 = colontmpD_;
		}
		goto LA35_;
LA37_: ;
		{
			NI T46_;
			T46_ = (NI)0;
			T46_ = nsuParseInt(connectionUrl_1.port);
			if (NIM_UNLIKELY(*nimErr_)) goto LA45_;
			colontmpD__2 = ((NU16) (T46_));
			port_1 = colontmpD__2;
			{
				LA45_:;
			}
			{
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
		}
LA35_: ;
		T49_ = NIM_NIL;
		T49_ = dial__pureZnet_u2532(connectionUrl_1.hostname, port_1, ((tyEnum_Protocol__x11L2EqCXuQVMDp2SGyCyA)6), NIM_TRUE);
		if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZnet_u514(T49_); goto LA11_;}
		eqsink___pureZnet_u525(&(*client_p0).socket, T49_);
		{
			NIM_BOOL T52_;
			T52_ = (NIM_BOOL)0;
			T52_ = !(((*client_p0).proxy == 0));
			if (!(T52_)) goto LA53_;
			colontmpD__3 = nsuToLowerAsciiStr((*(*client_p0).proxy).url.scheme);
			if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			T52_ = eqStrings(colontmpD__3, TM__9brjMmGFaIx4wBkLyxxXZxw_31);
LA53_: ;
			if (!T52_) goto LA54_;
			socks5hHandshake__pureZhttpclient_u4129(client_p0, url_p1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			{
				if (!isSsl_1) goto LA58_;
				startSsl__pureZhttpclient_u4576(client_p0, (*url_p1).hostname);
				if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			}
LA58_: ;
		}
		goto LA50_;
LA54_: ;
		{
			{
				if (!isSsl_1) goto LA63_;
				startSsl__pureZhttpclient_u4576(client_p0, connectionUrl_1.hostname);
				if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			}
LA63_: ;
			{
				NIM_BOOL T67_;
				tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA connectUrl_1;
				NimStringV2 proxyHeaderString_1;
				tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* colontmpD__8;
				tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* proxyResp_1;
				NimStringV2 T72_;
				T67_ = (NIM_BOOL)0;
				T67_ = eqStrings((*url_p1).scheme, TM__9brjMmGFaIx4wBkLyxxXZxw_56);
				if (!(T67_)) goto LA68_;
				T67_ = !(((*client_p0).proxy == 0));
LA68_: ;
				if (!T67_) goto LA69_;
				nimZeroMem((void*)(&connectUrl_1), sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
				proxyHeaderString_1.len = 0; proxyHeaderString_1.p = NIM_NIL;
				colontmpD__8 = NIM_NIL;
				proxyResp_1 = NIM_NIL;
				initUri__pureZuri_u207(NIM_FALSE, (&connectUrl_1));
				if (NIM_UNLIKELY(*nimErr_)) goto LA71_;
				eqcopy___system_u2754((&connectUrl_1.hostname), (*url_p1).hostname);
				T72_.len = 0; T72_.p = NIM_NIL;
				{
					if (!!(((*url_p1).port.len == 0))) goto LA75_;
					eqcopy___system_u2754((&connectUrl_1.port), (*url_p1).port);
				}
				goto LA73_;
LA75_: ;
				{
					eqsink___system_u2760((&connectUrl_1.port), TM__9brjMmGFaIx4wBkLyxxXZxw_58);
				}
LA73_: ;
				colontmpD__8 = newHttpHeaders__pureZhttpcore_u109(NIM_FALSE);
				if (NIM_UNLIKELY(*nimErr_)) goto LA71_;
				proxyHeaderString_1 = generateHeaders__pureZhttpclient_u1147((&connectUrl_1), ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)7), colontmpD__8, (*client_p0).proxy);
				if (NIM_UNLIKELY(*nimErr_)) goto LA71_;
				send__pureZnet_u2287((*client_p0).socket, proxyHeaderString_1, 2, ((NI)100));
				if (NIM_UNLIKELY(*nimErr_)) goto LA71_;
				proxyResp_1 = parseResponse__pureZhttpclient_u3545(client_p0, NIM_FALSE);
				if (NIM_UNLIKELY(*nimErr_)) goto LA71_;
				{
					NIM_BOOL T80_;
					tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw* T83_;
					T80_ = (NIM_BOOL)0;
					T80_ = nsuStartsWith((*proxyResp_1).status, TM__9brjMmGFaIx4wBkLyxxXZxw_187);
					if (NIM_UNLIKELY(*nimErr_)) goto LA71_;
					if (!!(T80_)) goto LA81_;
					T83_ = NIM_NIL;
					T83_ = (tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw*) nimNewObj(sizeof(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw), NIM_ALIGNOF(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw));
					(*T83_).Sup.Sup.Sup.Sup.m_type = (&NTIv2__BY5w1GR9bIATfsg9bf9b7XPrw_);
					(*T83_).Sup.Sup.Sup.name = "HttpRequestError";
					(*T83_).Sup.Sup.Sup.message = TM__9brjMmGFaIx4wBkLyxxXZxw_189;
					(*T83_).Sup.Sup.Sup.parent = ((Exception*) NIM_NIL);
					raiseExceptionEx((Exception*)T83_, "HttpRequestError", "newConnection", "httpclient.nim", 1081);
goto LA71_;
				}
LA81_: ;
				wrapConnectedSocket__pureZnet_u1798((*client_p0).sslContext, (*client_p0).socket, ((tyEnum_SslHandshakeType__RgoNg67zPremT9a0QqPHgWQ)0), (*url_p1).hostname);
				if (NIM_UNLIKELY(*nimErr_)) goto LA71_;
				{
					LA71_:;
				}
				{
					eqdestroy___pureZhttpclient_u3752(proxyResp_1);
					eqdestroy___pureZhttpcore_u277(colontmpD__8);
					if (proxyHeaderString_1.p && !(proxyHeaderString_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(proxyHeaderString_1.p);
}
					eqdestroy___pureZuri_u213((&connectUrl_1));
				}
				if (NIM_UNLIKELY(*nimErr_)) goto LA11_;
			}
LA69_: ;
		}
LA50_: ;
		eqcopy___pureZuri_u216((&(*client_p0).currentURL), url_p1);
		(*client_p0).connected = NIM_TRUE;
		{
			LA11_:;
		}
		{
			if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
			eqdestroy___pureZuri_u213((&connectionUrl_1));
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA9_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZhttpclient_u572)(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* dest_p0) {
	switch ((*dest_p0).isFile) {
	case NIM_TRUE:
	{
		if ((*dest_p0)._isFile_1.contentType.p && !((*dest_p0)._isFile_1.contentType.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0)._isFile_1.contentType.p);
}
		if ((*dest_p0)._isFile_1.filename.p && !((*dest_p0)._isFile_1.filename.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0)._isFile_1.filename.p);
}
	}
	break;
	default:
	{
	}
	break;
	}
	if ((*dest_p0).content.p && !((*dest_p0).content.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).content.p);
}
	if ((*dest_p0).name.p && !((*dest_p0).name.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared((*dest_p0).name.p);
}
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, getBoundary__pureZhttpclient_u893)(tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* p_p0) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	{
		NIM_BOOL T3_;
		NI T5_;
		T3_ = (NIM_BOOL)0;
		T3_ = (p_p0 == ((tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ*) NIM_NIL));
		if (T3_) goto LA4_;
		T5_ = (*p_p0).content.len;
		T3_ = (T5_ == ((NI)0));
LA4_: ;
		if (!T3_) goto LA6_;
		goto BeforeRet_;
	}
LA6_: ;
	{
		while (1) {
			NI T10_;
			NimStringV2 T11_;
			T10_ = (NI)0;
			T10_ = rand__pureZrandom_u124(((NI)IL64(9223372036854775807)));
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			T11_.len = 0; T11_.p = NIM_NIL;
			T11_ = dollar___systemZdollars_u14(T10_);
			if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u281(T11_); goto BeforeRet_;}
			eqsink___system_u2760((&result), T11_);
			{
				tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg entry_1;
				tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg colontmpD_;
				NI i_1;
				NI i_2;
				NI L_1;
				NI T14_;
				nimZeroMem((void*)(&entry_1), sizeof(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg));
				nimZeroMem((void*)(&colontmpD_), sizeof(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg));
				i_1 = (NI)0;
				nimZeroMem((void*)(&colontmpD_), sizeof(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg));
				entry_1 = colontmpD_;
				i_2 = ((NI)0);
				T14_ = (*p_p0).content.len;
				L_1 = T14_;
				{
					while (1) {
						if (!(i_2 < L_1)) goto LA16;
						i_1 = i_2;
						if (i_2 < 0 || i_2 >= (*p_p0).content.len){ raiseIndexError2(i_2,(*p_p0).content.len-1); goto LA13_;
						}
						entry_1 = (*p_p0).content.p->data[i_2];
						{
							NIM_BOOL T19_;
							T19_ = (NIM_BOOL)0;
							T19_ = contains__pureZstrutils_u1900(entry_1.content, result);
							if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
							if (!T19_) goto LA20_;
							eqdestroy___pureZhttpclient_u572((&colontmpD_));
							goto LA12;
						}
						goto LA17_;
LA20_: ;
						{
							NI T23_;
							T23_ = ((*p_p0).content.len-1);
							if (!(i_1 == T23_)) goto LA24_;
							eqdestroy___pureZhttpclient_u572((&colontmpD_));
							goto BeforeRet_;
						}
						goto LA17_;
LA24_: ;
LA17_: ;
						i_2 += ((NI)1);
						{
							NI T28_;
							T28_ = (*p_p0).content.len;
							if (!!((T28_ == L_1))) goto LA29_;
							failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_191);
							if (NIM_UNLIKELY(*nimErr_)) goto LA13_;
						}
LA29_: ;
					} LA16: ;
				}
				{
					LA13_:;
				}
				{
					eqdestroy___pureZhttpclient_u572((&colontmpD_));
				}
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			} LA12: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, readFileSizes__pureZhttpclient_u4742)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p1) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* entry_1;
		NI i_1;
		NI L_1;
		NI T2_;
		entry_1 = (tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg*)0;
		i_1 = ((NI)0);
		T2_ = (*multipart_p1).content.len;
		L_1 = T2_;
		{
			while (1) {
				if (!(i_1 < L_1)) goto LA4;
				if (i_1 < 0 || i_1 >= (*multipart_p1).content.len){ raiseIndexError2(i_1,(*multipart_p1).content.len-1); goto BeforeRet_;
				}
				entry_1 = (&(*multipart_p1).content.p->data[i_1]);
				{
					NI64 fileSize_1;
					{
						if (!!((*entry_1).isFile)) goto LA8_;
						goto LA5;
					}
LA8_: ;
					{
						if (!(((2 &((NU8)1<<((NU)(((*entry_1).isFile))&7U)))!=0))) 						{ raiseFieldError2(TM__9brjMmGFaIx4wBkLyxxXZxw_197, (NI)((*entry_1).isFile)); goto BeforeRet_;
						}
						if (!!((*entry_1)._isFile_1.isStream)) goto LA12_;
						if (!(((2 &((NU8)1<<((NU)(((*entry_1).isFile))&7U)))!=0))) 						{ raiseFieldError2(TM__9brjMmGFaIx4wBkLyxxXZxw_199, (NI)((*entry_1).isFile)); goto BeforeRet_;
						}
						(*entry_1)._isFile_1.fileSize = ((NI64) ((*entry_1).content.len));
						goto LA5;
					}
LA12_: ;
					fileSize_1 = nosgetFileSize((*entry_1).content);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					if (!(((2 &((NU8)1<<((NU)(((*entry_1).isFile))&7U)))!=0))) 					{ raiseFieldError2(TM__9brjMmGFaIx4wBkLyxxXZxw_200, (NI)((*entry_1).isFile)); goto BeforeRet_;
					}
					(*entry_1)._isFile_1.fileSize = fileSize_1;
				} LA5: ;
				i_1 += ((NI)1);
				{
					NI T16_;
					T16_ = (*multipart_p1).content.len;
					if (!!((T16_ == L_1))) goto LA17_;
					failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_202);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
LA17_: ;
			} LA4: ;
		}
	}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, format__pureZhttpclient_u4752)(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* entry_p0, NimStringV2 boundary_p1) {
	NimStringV2 result;
	NimStringV2 colontmpD_;
	NimStringV2 T1_;
	NimStringV2 T2_;
{	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	T1_.len = 0; T1_.p = NIM_NIL;
	T1_ = rawNewString(boundary_p1.len + 4);
appendString((&T1_), TM__9brjMmGFaIx4wBkLyxxXZxw_204);
appendString((&T1_), boundary_p1);
appendString((&T1_), TM__9brjMmGFaIx4wBkLyxxXZxw_205);
	result = T1_;
	T2_.len = 0; T2_.p = NIM_NIL;
	T2_ = rawNewString((*entry_p0).name.len + 39);
appendString((&T2_), TM__9brjMmGFaIx4wBkLyxxXZxw_207);
appendString((&T2_), (*entry_p0).name);
appendString((&T2_), TM__9brjMmGFaIx4wBkLyxxXZxw_209);
	colontmpD_ = T2_;
	prepareAdd((&result), colontmpD_.len + 0);
appendString((&result), colontmpD_);
	{
		NimStringV2 colontmpD__2;
		NimStringV2 colontmpD__3;
		NimStringV2 T7_;
		NimStringV2 T8_;
		if (!(*entry_p0).isFile) goto LA5_;
		colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
		colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
		T7_.len = 0; T7_.p = NIM_NIL;
		if (!(((2 &((NU8)1<<((NU)(((*entry_p0).isFile))&7U)))!=0))) 		{ raiseFieldError2(TM__9brjMmGFaIx4wBkLyxxXZxw_213, (NI)((*entry_p0).isFile)); goto BeforeRet_;
		}
		T7_ = rawNewString((*entry_p0)._isFile_1.filename.len + 15);
appendString((&T7_), TM__9brjMmGFaIx4wBkLyxxXZxw_211);
appendString((&T7_), (*entry_p0)._isFile_1.filename);
appendString((&T7_), TM__9brjMmGFaIx4wBkLyxxXZxw_215);
		colontmpD__2 = T7_;
		prepareAdd((&result), colontmpD__2.len + 0);
appendString((&result), colontmpD__2);
		T8_.len = 0; T8_.p = NIM_NIL;
		if (!(((2 &((NU8)1<<((NU)(((*entry_p0).isFile))&7U)))!=0))) 		{ raiseFieldError2(TM__9brjMmGFaIx4wBkLyxxXZxw_219, (NI)((*entry_p0).isFile)); goto BeforeRet_;
		}
		T8_ = rawNewString((*entry_p0)._isFile_1.contentType.len + 16);
appendString((&T8_), TM__9brjMmGFaIx4wBkLyxxXZxw_217);
appendString((&T8_), (*entry_p0)._isFile_1.contentType);
appendString((&T8_), TM__9brjMmGFaIx4wBkLyxxXZxw_220);
		colontmpD__3 = T8_;
		prepareAdd((&result), colontmpD__3.len + 0);
appendString((&result), colontmpD__3);
		if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
		if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
	}
	goto LA3_;
LA5_: ;
	{
		NimStringV2 colontmpD__4;
		NimStringV2 T10_;
		colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
		T10_.len = 0; T10_.p = NIM_NIL;
		T10_ = rawNewString((*entry_p0).content.len + 4);
appendString((&T10_), TM__9brjMmGFaIx4wBkLyxxXZxw_222);
appendString((&T10_), (*entry_p0).content);
		colontmpD__4 = T10_;
		prepareAdd((&result), colontmpD__4.len + 0);
appendString((&result), colontmpD__4);
		if (colontmpD__4.p && !(colontmpD__4.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__4.p);
}
	}
LA3_: ;
	if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, format__pureZhttpclient_u5127)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p1) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ result;
	NimStringV2 bound_1;
	NimStringV2 colontmpD_;
	NimStringV2 colontmpD__2;
	NimStringV2 T2_;
	NI64 length_1;
	NimStringV2 T17_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	bound_1.len = 0; bound_1.p = NIM_NIL;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
	result.len = 0; result.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(0, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
	bound_1 = getBoundary__pureZhttpclient_u893(multipart_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	T2_.len = 0; T2_.p = NIM_NIL;
	T2_ = rawNewString(bound_1.len + 30);
appendString((&T2_), TM__9brjMmGFaIx4wBkLyxxXZxw_195);
appendString((&T2_), bound_1);
	colontmpD_ = T2_;
	X5BX5Deq___pureZhttpcore_u1698((*client_p0).headers, TM__9brjMmGFaIx4wBkLyxxXZxw_193, colontmpD_);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	readFileSizes__pureZhttpclient_u4742(client_p0, multipart_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	length_1 = IL64(0);
	{
		tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* entry_1;
		NI i_1;
		NI L_1;
		NI T4_;
		entry_1 = (tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg*)0;
		i_1 = ((NI)0);
		T4_ = (*multipart_p1).content.len;
		L_1 = T4_;
		{
			while (1) {
				NimStringV2 colontmpD__3;
				NimStringV2 T7_;
				if (!(i_1 < L_1)) goto LA6;
				colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
				if (i_1 < 0 || i_1 >= (*multipart_p1).content.len){ raiseIndexError2(i_1,(*multipart_p1).content.len-1); goto LA1_;
				}
				entry_1 = (&(*multipart_p1).content.p->data[i_1]);
				T7_.len = 0; T7_.p = NIM_NIL;
				colontmpD__3 = format__pureZhttpclient_u4752((&(*entry_1)), bound_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				T7_ = rawNewString(colontmpD__3.len + 2);
appendString((&T7_), colontmpD__3);
appendString((&T7_), TM__9brjMmGFaIx4wBkLyxxXZxw_223);
				add__stdZenumutils_u70((&result), T7_);
				{
					NI64 TM__9brjMmGFaIx4wBkLyxxXZxw_225;
					NI64 TM__9brjMmGFaIx4wBkLyxxXZxw_226;
					if (!(*entry_1).isFile) goto LA10_;
					if (!(((2 &((NU8)1<<((NU)(((*entry_1).isFile))&7U)))!=0))) 					{ raiseFieldError2(TM__9brjMmGFaIx4wBkLyxxXZxw_224, (NI)((*entry_1).isFile)); goto LA1_;
					}
					if (nimAddInt64((*entry_1)._isFile_1.fileSize, IL64(2), &TM__9brjMmGFaIx4wBkLyxxXZxw_225)) { raiseOverflow(); goto LA1_;
					};
					if (nimAddInt64(length_1, (NI64)(TM__9brjMmGFaIx4wBkLyxxXZxw_225), &TM__9brjMmGFaIx4wBkLyxxXZxw_226)) { raiseOverflow(); goto LA1_;
					};
					length_1 = (NI64)(TM__9brjMmGFaIx4wBkLyxxXZxw_226);
				}
LA10_: ;
				i_1 += ((NI)1);
				{
					NI T14_;
					T14_ = (*multipart_p1).content.len;
					if (!!((T14_ == L_1))) goto LA15_;
					failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_227);
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				}
LA15_: ;
				if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
			} LA6: ;
		}
	}
	T17_.len = 0; T17_.p = NIM_NIL;
	T17_ = rawNewString(bound_1.len + 6);
appendString((&T17_), TM__9brjMmGFaIx4wBkLyxxXZxw_228);
appendString((&T17_), bound_1);
appendString((&T17_), TM__9brjMmGFaIx4wBkLyxxXZxw_230);
	add__stdZenumutils_u70((&result), T17_);
	{
		NimStringV2* s_1;
		NI i_2;
		NI L_2;
		NI T19_;
		s_1 = (NimStringV2*)0;
		i_2 = ((NI)0);
		T19_ = result.len;
		L_2 = T19_;
		{
			while (1) {
				NI64 TM__9brjMmGFaIx4wBkLyxxXZxw_231;
				if (!(i_2 < L_2)) goto LA21;
				if (i_2 < 0 || i_2 >= result.len){ raiseIndexError2(i_2,result.len-1); goto LA1_;
				}
				s_1 = (&result.p->data[i_2]);
				if (nimAddInt64(length_1, ((NI64) ((*s_1).len)), &TM__9brjMmGFaIx4wBkLyxxXZxw_231)) { raiseOverflow(); goto LA1_;
				};
				length_1 = (NI64)(TM__9brjMmGFaIx4wBkLyxxXZxw_231);
				i_2 += ((NI)1);
				{
					NI T24_;
					T24_ = result.len;
					if (!!((T24_ == L_2))) goto LA25_;
					failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_232);
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				}
LA25_: ;
			} LA21: ;
		}
	}
	colontmpD__2 = dollar___systemZdollars_u34(length_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	X5BX5Deq___pureZhttpcore_u1698((*client_p0).headers, TM__9brjMmGFaIx4wBkLyxxXZxw_234, colontmpD__2);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		LA1_:;
	}
	{
		if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
		if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
		if (bound_1.p && !(bound_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(bound_1.p);
}
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw*, override__pureZhttpclient_u5163)(tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* fallback_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* override_p1) {
	tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	result = newHttpHeaders__pureZhttpcore_u109(NIM_FALSE);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	eqcopy___pureZhttpcore_u182((&(*(*result).table)), (*(*fallback_p0).table));
	{
		if (!(override_p1 == 0)) goto LA3_;
		goto BeforeRet_;
	}
LA3_: ;
	{
		NimStringV2 k_1;
		tySequence__sM4lkSb7zS6F7OVMvW9cffQ vs_1;
		NI L_1;
		k_1.len = 0; k_1.p = NIM_NIL;
		vs_1.len = 0; vs_1.p = NIM_NIL;
		L_1 = len__pureZhttpcore_u901((*override_p1).table);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		{
			NI h_1;
			NI colontmp_;
			NI T7_;
			NI res_1;
			h_1 = (NI)0;
			colontmp_ = (NI)0;
			T7_ = ((*(*override_p1).table).data.len-1);
			colontmp_ = T7_;
			res_1 = ((NI)0);
			{
				while (1) {
					NI TM__9brjMmGFaIx4wBkLyxxXZxw_236;
					if (!(res_1 <= colontmp_)) goto LA9;
					h_1 = ((NI) (res_1));
					{
						NIM_BOOL T12_;
						if (h_1 < 0 || h_1 >= (*(*override_p1).table).data.len){ raiseIndexError2(h_1,(*(*override_p1).table).data.len-1); goto BeforeRet_;
						}
						T12_ = (NIM_BOOL)0;
						T12_ = isFilled__pureZcollectionsZtables_u31((*(*override_p1).table).data.p->data[h_1].Field0);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						if (!T12_) goto LA13_;
						if (h_1 < 0 || h_1 >= (*(*override_p1).table).data.len){ raiseIndexError2(h_1,(*(*override_p1).table).data.len-1); goto BeforeRet_;
						}
						eqcopy___system_u2754((&k_1), (*(*override_p1).table).data.p->data[h_1].Field1);
						if (h_1 < 0 || h_1 >= (*(*override_p1).table).data.len){ raiseIndexError2(h_1,(*(*override_p1).table).data.len-1); goto BeforeRet_;
						}
						eqcopy___system_u5585((&vs_1), (*(*override_p1).table).data.p->data[h_1].Field2);
						X5BX5Deq___pureZhttpcore_u1748(result, k_1, vs_1);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						{
							NI T17_;
							T17_ = (NI)0;
							T17_ = len__pureZhttpcore_u901((*override_p1).table);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							if (!!((T17_ == L_1))) goto LA18_;
							failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_235);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						}
LA18_: ;
					}
LA13_: ;
					if (nimAddInt(res_1, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_236)) { raiseOverflow(); goto BeforeRet_;
					};
					res_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_236);
				} LA9: ;
			}
		}
		eqdestroy___system_u5582(vs_1);
		if (k_1.p && !(k_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(k_1.p);
}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZhttpclient_u575)(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* dest_p0, tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* src_p1) {
	tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg colontmp_;
{	{
		if (!(dest_p0 == src_p1)) goto LA3_;
		goto BeforeRet_;
	}
LA3_: ;
	nimZeroMem((void*)(&colontmp_), sizeof(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg));
	colontmp_ = (*dest_p0);
	nimZeroMem((void*)(&(*dest_p0)), sizeof(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg));
	eqcopy___system_u2754((&(*dest_p0).name), (*src_p1).name);
	eqcopy___system_u2754((&(*dest_p0).content), (*src_p1).content);
	(*dest_p0).isFile = (*src_p1).isFile;
	switch ((*dest_p0).isFile) {
	case NIM_TRUE:
	{
		(*dest_p0)._isFile_1.filename.len = 0; (*dest_p0)._isFile_1.filename.p = NIM_NIL;
		eqcopy___system_u2754((&(*dest_p0)._isFile_1.filename), (*src_p1)._isFile_1.filename);
		(*dest_p0)._isFile_1.contentType.len = 0; (*dest_p0)._isFile_1.contentType.p = NIM_NIL;
		eqcopy___system_u2754((&(*dest_p0)._isFile_1.contentType), (*src_p1)._isFile_1.contentType);
		(*dest_p0)._isFile_1.fileSize = 0;
		(*dest_p0)._isFile_1.fileSize = (*src_p1)._isFile_1.fileSize;
		(*dest_p0)._isFile_1.isStream = 0;
		(*dest_p0)._isFile_1.isStream = (*src_p1)._isFile_1.isStream;
	}
	break;
	default:
	{
	}
	break;
	}
	switch (colontmp_.isFile) {
	case NIM_TRUE:
	{
		if (colontmp_._isFile_1.contentType.p && !(colontmp_._isFile_1.contentType.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmp_._isFile_1.contentType.p);
}
		if (colontmp_._isFile_1.filename.p && !(colontmp_._isFile_1.filename.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmp_._isFile_1.filename.p);
}
	}
	break;
	default:
	{
	}
	break;
	}
	if (colontmp_.content.p && !(colontmp_.content.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmp_.content.p);
}
	if (colontmp_.name.p && !(colontmp_.name.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmp_.name.p);
}
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, sendFile__pureZhttpclient_u1127)(tyObject_SocketImpl__TmGWJPpyEwcsRMnCyN509ag* socket_p0, tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg* entry_p1) {
	tyObject_FileStreamObj__55YZdAmhEXf1sGHQMYxWjw* file_1;
	NimStringV2 buffer_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	file_1 = NIM_NIL;
	buffer_1.len = 0; buffer_1.p = NIM_NIL;
	file_1 = newFileStream__pureZstreams_u1210((*entry_p1).content, ((tyEnum_FileMode__wjF0STQGT1PBuQEl3p0tng)0), ((NI)-1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		while (1) {
			NimStringV2 T4_;
			T4_.len = 0; T4_.p = NIM_NIL;
			T4_ = readStr__pureZstreams_u647(&file_1->Sup, ((NI)262144));
			if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u281(T4_); goto LA1_;}
			eqsink___system_u2760((&buffer_1), T4_);
			{
				if (!(buffer_1.len == ((NI)0))) goto LA7_;
				goto LA2;
			}
LA7_: ;
			send__pureZnet_u2287(socket_p0, buffer_1, 2, ((NI)100));
			if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		}
	} LA2: ;
	close__pureZstreams_u57(&file_1->Sup);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		LA1_:;
	}
	{
		if (buffer_1.p && !(buffer_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(buffer_1.p);
}
		eqdestroy___pureZstreams_u1093(file_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, requestAux__pureZhttpclient_u5713)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* url_p1, tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA httpMethod_p2, NimStringV2 body_p3, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p4, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p5) {
	tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* result;
	tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* newHeaders_1;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ data_1;
	NimStringV2 headerString_1;
	NIM_BOOL getBody_1;
	NIM_BOOL T74_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	newHeaders_1 = NIM_NIL;
	data_1.len = 0; data_1.p = NIM_NIL;
	headerString_1.len = 0; headerString_1.p = NIM_NIL;
	{
		tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw* T6_;
		if (!((*url_p1).scheme.len == 0)) goto LA4_;
		T6_ = NIM_NIL;
		T6_ = (tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw*) nimNewObj(sizeof(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw), NIM_ALIGNOF(tyObject_ValueError__YUzEEs8pGqG7cYmcRoc5rw));
		(*T6_).Sup.Sup.Sup.m_type = (&NTIv2__YUzEEs8pGqG7cYmcRoc5rw_);
		(*T6_).Sup.Sup.name = "ValueError";
		(*T6_).Sup.Sup.message = TM__9brjMmGFaIx4wBkLyxxXZxw_21;
		(*T6_).Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T6_, "ValueError", "requestAux", "httpclient.nim", 1154);
goto LA1_;
	}
LA4_: ;
	newConnection__pureZhttpclient_u4556(client_p0, url_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	data_1.len = 0; data_1.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(0, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
	{
		NIM_BOOL T9_;
		NI T11_;
		tySequence__sM4lkSb7zS6F7OVMvW9cffQ T14_;
		T9_ = (NIM_BOOL)0;
		T9_ = !((multipart_p5 == ((tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ*) NIM_NIL)));
		if (!(T9_)) goto LA10_;
		T11_ = (*multipart_p5).content.len;
		T9_ = (((NI)0) < T11_);
LA10_: ;
		if (!T9_) goto LA12_;
		T14_.len = 0; T14_.p = NIM_NIL;
		T14_ = format__pureZhttpclient_u5127(client_p0, multipart_p5);
		if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u5582(T14_); goto LA1_;}
		eqsink___system_u5591((&data_1), T14_);
		newHeaders_1 = override__pureZhttpclient_u5163((*client_p0).headers, headers_p4);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA7_;
LA12_: ;
	{
		newHeaders_1 = override__pureZhttpclient_u5163((*client_p0).headers, headers_p4);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		{
			NIM_BOOL T18_;
			T18_ = (NIM_BOOL)0;
			T18_ = hasKey__pureZhttpcore_u2506(newHeaders_1, TM__9brjMmGFaIx4wBkLyxxXZxw_237);
			if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
			if (!!(T18_)) goto LA19_;
			{
				NimStringV2 colontmpD_;
				if (!!((body_p3.len == ((NI)0)))) goto LA23_;
				colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
				colontmpD_ = dollar___systemZdollars_u14(body_p3.len);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				X5BX5Deq___pureZhttpcore_u1698(newHeaders_1, TM__9brjMmGFaIx4wBkLyxxXZxw_238, colontmpD_);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
			}
			goto LA21_;
LA23_: ;
			{
				if (!!((httpMethod_p2 == ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)1) || httpMethod_p2 == ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)0)))) goto LA26_;
				X5BX5Deq___pureZhttpcore_u1698(newHeaders_1, TM__9brjMmGFaIx4wBkLyxxXZxw_239, TM__9brjMmGFaIx4wBkLyxxXZxw_241);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
			}
			goto LA21_;
LA26_: ;
LA21_: ;
		}
LA19_: ;
	}
LA7_: ;
	{
		NIM_BOOL T30_;
		NIM_BOOL T31_;
		T30_ = (NIM_BOOL)0;
		T31_ = (NIM_BOOL)0;
		T31_ = hasKey__pureZhttpcore_u2506(newHeaders_1, TM__9brjMmGFaIx4wBkLyxxXZxw_243);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		T30_ = !(T31_);
		if (!(T30_)) goto LA32_;
		T30_ = (((NI)0) < (*client_p0).userAgent.len);
LA32_: ;
		if (!T30_) goto LA33_;
		X5BX5Deq___pureZhttpcore_u1698(newHeaders_1, TM__9brjMmGFaIx4wBkLyxxXZxw_245, (*client_p0).userAgent);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA33_: ;
	headerString_1 = generateHeaders__pureZhttpclient_u1147(url_p1, httpMethod_p2, newHeaders_1, (*client_p0).proxy);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	send__pureZnet_u2287((*client_p0).socket, headerString_1, 2, ((NI)100));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		NI T37_;
		NimStringV2 buffer_1;
		NimStringV2 colontmpD__2;
		NimStringV2 T67_;
		NimStringV2* T68_;
		T37_ = data_1.len;
		if (!(((NI)0) < T37_)) goto LA38_;
		buffer_1.len = 0; buffer_1.p = NIM_NIL;
		colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
		buffer_1 = TM__9brjMmGFaIx4wBkLyxxXZxw_246;
		{
			tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg entry_1;
			NI i_1;
			NI i_2;
			NI L_1;
			NI T43_;
			nimZeroMem((void*)(&entry_1), sizeof(tyObject_MultipartEntry__6nG9aLAZXMDRGzr6m52nfxg));
			i_1 = (NI)0;
			i_2 = ((NI)0);
			T43_ = (*multipart_p5).content.len;
			L_1 = T43_;
			{
				while (1) {
					if (!(i_2 < L_1)) goto LA45;
					i_1 = i_2;
					if (i_2 < 0 || i_2 >= (*multipart_p5).content.len){ raiseIndexError2(i_2,(*multipart_p5).content.len-1); goto LA42_;
					}
					eqcopy___pureZhttpclient_u575((&entry_1), (&(*multipart_p5).content.p->data[i_2]));
					{
						if (i_1 < 0 || i_1 >= data_1.len){ raiseIndexError2(i_1,data_1.len-1); goto LA42_;
						}
						prepareAdd((&buffer_1), data_1.p->data[i_1].len + 0);
appendString((&buffer_1), data_1.p->data[i_1]);
						{
							if (!!(entry_1.isFile)) goto LA49_;
							goto LA46;
						}
LA49_: ;
						{
							if (!(((NI)0) < buffer_1.len)) goto LA53_;
							send__pureZnet_u2287((*client_p0).socket, buffer_1, 2, ((NI)100));
							if (NIM_UNLIKELY(*nimErr_)) goto LA42_;
							setLengthStrV2((&buffer_1), ((NI)0));
						}
LA53_: ;
						{
							if (!(((2 &((NU8)1<<((NU)((entry_1.isFile))&7U)))!=0))) 							{ raiseFieldError2(TM__9brjMmGFaIx4wBkLyxxXZxw_247, (NI)(entry_1.isFile)); goto LA42_;
							}
							if (!entry_1._isFile_1.isStream) goto LA57_;
							sendFile__pureZhttpclient_u1127((*client_p0).socket, (&entry_1));
							if (NIM_UNLIKELY(*nimErr_)) goto LA42_;
						}
						goto LA55_;
LA57_: ;
						{
							send__pureZnet_u2287((*client_p0).socket, entry_1.content, 2, ((NI)100));
							if (NIM_UNLIKELY(*nimErr_)) goto LA42_;
						}
LA55_: ;
						prepareAdd((&buffer_1), 2);
appendString((&buffer_1), TM__9brjMmGFaIx4wBkLyxxXZxw_248);
					} LA46: ;
					i_2 += ((NI)1);
					{
						NI T62_;
						T62_ = (*multipart_p5).content.len;
						if (!!((T62_ == L_1))) goto LA63_;
						failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_249);
						if (NIM_UNLIKELY(*nimErr_)) goto LA42_;
					}
LA63_: ;
				} LA45: ;
			}
			{
				LA42_:;
			}
			{
				eqdestroy___pureZhttpclient_u572((&entry_1));
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA40_;
		}
		T67_.len = 0; T67_.p = NIM_NIL;
		T68_ = (NimStringV2*)0;
		T68_ = X5BX5D___pureZhttpclient_u2928(((data_1).p) ? (data_1.p->data) : NIM_NIL, data_1.len, ((NI)1));
		if (NIM_UNLIKELY(*nimErr_)) goto LA40_;
		T67_ = rawNewString(buffer_1.len + (*T68_).len + 0);
appendString((&T67_), buffer_1);
appendString((&T67_), (*T68_));
		colontmpD__2 = T67_;
		send__pureZnet_u2287((*client_p0).socket, colontmpD__2, 2, ((NI)100));
		if (NIM_UNLIKELY(*nimErr_)) goto LA40_;
		{
			LA40_:;
		}
		{
			if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
			if (buffer_1.p && !(buffer_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(buffer_1.p);
}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA35_;
LA38_: ;
	{
		if (!(((NI)0) < body_p3.len)) goto LA72_;
		send__pureZnet_u2287((*client_p0).socket, body_p3, 2, ((NI)100));
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA35_;
LA72_: ;
LA35_: ;
	T74_ = (NIM_BOOL)0;
	T74_ = !((httpMethod_p2 == ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)0) || httpMethod_p2 == ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)7)));
	if (!(T74_)) goto LA75_;
	T74_ = (*client_p0).getBody;
LA75_: ;
	getBody_1 = T74_;
	result = parseResponse__pureZhttpclient_u3545(client_p0, getBody_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		LA1_:;
	}
	{
		if (headerString_1.p && !(headerString_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(headerString_1.p);
}
		eqdestroy___system_u5582(data_1);
		eqdestroy___pureZhttpcore_u277(newHeaders_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, getNewLocation__pureZhttpclient_u1141)(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* lastURL_p0, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p1, tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA* Result) {
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ newLocation_1;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ colontmpD_;
	NimStringV2 colontmpD__2;
	tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA parsedLocation_1;
	NimStringV2 colontmpD__3;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)Result, sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
	newLocation_1.len = 0; newLocation_1.p = NIM_NIL;
	colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
	colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
	nimZeroMem((void*)(&parsedLocation_1), sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
	colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
	colontmpD_.len = 1; colontmpD_.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(1, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
	colontmpD_.p->data[0] = TM__9brjMmGFaIx4wBkLyxxXZxw_252;
	newLocation_1 = getOrDefault__pureZhttpcore_u2551(headers_p1, TM__9brjMmGFaIx4wBkLyxxXZxw_251, colontmpD_);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		colontmpD__2 = toString__pureZhttpcore_u1636(newLocation_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (!(colontmpD__2.len == 0)) goto LA4_;
		httpError__pureZhttpclient_u311(TM__9brjMmGFaIx4wBkLyxxXZxw_254);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA4_: ;
	colontmpD__3 = toString__pureZhttpcore_u1636(newLocation_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	parseUri__pureZuri_u295(colontmpD__3, (&parsedLocation_1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = (parsedLocation_1.hostname.len == 0);
		if (!(T8_)) goto LA9_;
		T8_ = !((parsedLocation_1.path.len == 0));
LA9_: ;
		if (!T8_) goto LA10_;
		eqcopy___pureZuri_u216(Result, lastURL_p0);
		eqsink___system_u2760((&(*Result).path), parsedLocation_1.path);
		eqwasMoved___system_u2751((&parsedLocation_1.path));
		eqsink___system_u2760((&(*Result).query), parsedLocation_1.query);
		eqwasMoved___system_u2751((&parsedLocation_1.query));
		eqsink___system_u2760((&(*Result).anchor), parsedLocation_1.anchor);
		eqwasMoved___system_u2751((&parsedLocation_1.anchor));
	}
	goto LA6_;
LA10_: ;
	{
		(*Result) = parsedLocation_1;
		eqwasMoved___pureZuri_u210((&parsedLocation_1));
	}
LA6_: ;
	{
		LA1_:;
	}
	{
		if (colontmpD__3.p && !(colontmpD__3.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__3.p);
}
		eqdestroy___pureZuri_u213((&parsedLocation_1));
		if (colontmpD__2.p && !(colontmpD__2.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD__2.p);
}
		eqdestroy___system_u5582(colontmpD_);
		eqdestroy___pureZhttpcore_u1600(newLocation_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZhttpclient_u3763)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A** dest_p0, tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* src_p1) {
	tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* colontmp_;
	colontmp_ = (*dest_p0);
	(*dest_p0) = src_p1;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicStatic(colontmp_, ((TNimTypeV2*) ((&NTIv2__NJ70CWLkvEEDGugG4cmJ4A_))));
		if (!T3_) goto LA4_;
		eqdestroy___pureZhttpclient_u3717((&(*colontmp_)));
		nimRawDispose(colontmp_, ((NI)8));
	}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, request__basicZpackageinfos_u562)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NimStringV2 url_p1, tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA httpMethod_p2, NimStringV2 body_p3, tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw* headers_p4, tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ* multipart_p5) {
	tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* result;
	tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA url_2;
	tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA lastURL_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	nimZeroMem((void*)(&url_2), sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
	nimZeroMem((void*)(&lastURL_1), sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
	{
		NIM_BOOL T4_;
		T4_ = (NIM_BOOL)0;
		T4_ = contains__pureZstrutils_u1904(url_p1, TM__9brjMmGFaIx4wBkLyxxXZxw_17);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (!!(!(T4_))) goto LA5_;
		failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_19);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA5_: ;
	parseUri__pureZuri_u295(url_p1, (&url_2));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	result = requestAux__pureZhttpclient_u5713(client_p0, (&url_2), httpMethod_p2, body_p3, headers_p4, multipart_p5);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	lastURL_1 = url_2;
	eqwasMoved___pureZuri_u210((&url_2));
	{
		NI i_1;
		NI res_1;
		i_1 = (NI)0;
		res_1 = ((NI)1);
		{
			while (1) {
				tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA redirectTo_1;
				NimStringV2 redirectBody_1;
				NimStringV2 colontmpD_;
				NI statusCode_1;
				tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA redirectMethod_1;
				tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* T43_;
				NI TM__9brjMmGFaIx4wBkLyxxXZxw_267;
				if (!(res_1 <= (*client_p0).maxRedirects)) goto LA9;
				nimZeroMem((void*)(&redirectTo_1), sizeof(tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA));
				redirectBody_1.len = 0; redirectBody_1.p = NIM_NIL;
				colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
				i_1 = ((NI) (res_1));
				statusCode_1 = code__pureZhttpclient_u3690(result);
				if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
				{
					if (!!((statusCode_1 == ((NI)301) || statusCode_1 == ((NI)302) || statusCode_1 == ((NI)303) || statusCode_1 == ((NI)307) || statusCode_1 == ((NI)308)))) goto LA13_;
					if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
					if (redirectBody_1.p && !(redirectBody_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(redirectBody_1.p);
}
					eqdestroy___pureZuri_u213((&redirectTo_1));
					goto LA7;
				}
LA13_: ;
				getNewLocation__pureZhttpclient_u1141((&lastURL_1), (*result).headers, (&redirectTo_1));
				if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
				redirectMethod_1 = (tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)0;
				redirectBody_1.len = 0; redirectBody_1.p = NIM_NIL;
				switch (statusCode_1) {
				case ((NI)301):
				case ((NI)302):
				case ((NI)303):
				{
					{
						if (!!((httpMethod_p2 == ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)1) || httpMethod_p2 == ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)0)))) goto LA18_;
						redirectMethod_1 = ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)1);
					}
					goto LA16_;
LA18_: ;
					{
						redirectMethod_1 = httpMethod_p2;
					}
LA16_: ;
					redirectBody_1 = TM__9brjMmGFaIx4wBkLyxxXZxw_255;
					{
						if (!!((headers_p4 == 0))) goto LA23_;
						del__pureZhttpcore_u2440(headers_p4, TM__9brjMmGFaIx4wBkLyxxXZxw_256);
						if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
						del__pureZhttpcore_u2440(headers_p4, TM__9brjMmGFaIx4wBkLyxxXZxw_257);
						if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
						del__pureZhttpcore_u2440(headers_p4, TM__9brjMmGFaIx4wBkLyxxXZxw_259);
						if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
					}
LA23_: ;
				}
				break;
				case ((NI)307):
				case ((NI)308):
				{
					redirectMethod_1 = httpMethod_p2;
					eqcopy___system_u2754((&redirectBody_1), body_p3);
				}
				break;
				default:
				{
					{
						if (!NIM_TRUE) goto LA29_;
						failedAssertImpl__stdZassertions_u95(TM__9brjMmGFaIx4wBkLyxxXZxw_261);
						if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
					}
LA29_: ;
				}
				break;
				}
				{
					NIM_BOOL T33_;
					NimStringV2 T35_;
					NIM_BOOL T36_;
					T33_ = (NIM_BOOL)0;
					T33_ = !(eqStrings(redirectTo_1.hostname, lastURL_1.hostname));
					if (!(T33_)) goto LA34_;
					T35_.len = 0; T35_.p = NIM_NIL;
					T35_ = rawNewString(lastURL_1.hostname.len + 1);
appendString((&T35_), TM__9brjMmGFaIx4wBkLyxxXZxw_263);
appendString((&T35_), lastURL_1.hostname);
					colontmpD_ = T35_;
					T36_ = (NIM_BOOL)0;
					T36_ = nsuEndsWith(redirectTo_1.hostname, colontmpD_);
					if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
					T33_ = !(T36_);
LA34_: ;
					if (!T33_) goto LA37_;
					{
						if (!!((headers_p4 == ((tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw*) NIM_NIL)))) goto LA41_;
						del__pureZhttpcore_u2440(headers_p4, TM__9brjMmGFaIx4wBkLyxxXZxw_264);
						if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
						del__pureZhttpcore_u2440(headers_p4, TM__9brjMmGFaIx4wBkLyxxXZxw_266);
						if (NIM_UNLIKELY(*nimErr_)) goto LA10_;
					}
LA41_: ;
				}
LA37_: ;
				T43_ = NIM_NIL;
				T43_ = requestAux__pureZhttpclient_u5713(client_p0, (&redirectTo_1), redirectMethod_1, redirectBody_1, headers_p4, multipart_p5);
				if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZhttpclient_u3752(T43_); goto LA10_;}
				eqsink___pureZhttpclient_u3763(&result, T43_);
				eqsink___pureZuri_u222((&lastURL_1), (&redirectTo_1));
				eqwasMoved___pureZuri_u210((&redirectTo_1));
				if (nimAddInt(res_1, ((NI)1), &TM__9brjMmGFaIx4wBkLyxxXZxw_267)) { raiseOverflow(); goto LA10_;
				};
				res_1 = (NI)(TM__9brjMmGFaIx4wBkLyxxXZxw_267);
				{
					LA10_:;
				}
				{
					if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(colontmpD_.p);
}
					if (redirectBody_1.p && !(redirectBody_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(redirectBody_1.p);
}
					eqdestroy___pureZuri_u213((&redirectTo_1));
				}
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
			} LA9: ;
		}
	} LA7: ;
	{
		LA1_:;
	}
	{
		eqdestroy___pureZuri_u213((&lastURL_1));
		eqdestroy___pureZuri_u213((&url_2));
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A*, get__basicZpackageinfos_u555)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NimStringV2 url_p1) {
	tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	result = request__basicZpackageinfos_u562(client_p0, url_p1, ((tyEnum_HttpMethod__4f4sGD4WkkWl9cb0irqiumA)1), TM__9brjMmGFaIx4wBkLyxxXZxw_268, ((tyObject_HttpHeaderscolonObjectType___BaFYu4PR2nlvZibU89b3Qqw*) NIM_NIL), ((tyObject_MultipartDatacolonObjectType___J3VLKyc1NjIgc9cTu2eRMRQ*) NIM_NIL));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, contains__pureZtimes_u3403)(tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ s_p0, NI value_p1) {
	NIM_BOOL result;
	NIM_BOOL T1_;
	T1_ = (NIM_BOOL)0;
	T1_ = (s_p0.a <= value_p1);
	if (!(T1_)) goto LA2_;
	T1_ = (value_p1 <= s_p0.b);
LA2_: ;
	result = T1_;
	return result;
}
static N_INLINE(NIM_BOOL, is4xx__pureZhttpcore_u2974)(NI code_p0) {
	NIM_BOOL result;
	tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ T1_;
	T1_ = dotdot___stdZstrbasics_u48(((NI)400), ((NI)499));
	result = contains__pureZtimes_u3403(T1_, code_p0);
	return result;
}
static N_INLINE(NIM_BOOL, is5xx__pureZhttpcore_u3026)(NI code_p0) {
	NIM_BOOL result;
	tyObject_HSlice__atPNPXY5GObvliR9b4ZIorQ T1_;
	T1_ = dotdot___stdZstrbasics_u48(((NI)500), ((NI)599));
	result = contains__pureZtimes_u3403(T1_, code_p0);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, responseContent__pureZhttpclient_u6012)(tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* resp_p0) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	{
		NIM_BOOL T3_;
		NI T4_;
		NI T6_;
		tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw* T9_;
		T3_ = (NIM_BOOL)0;
		T4_ = (NI)0;
		T4_ = code__pureZhttpclient_u3690(resp_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T3_ = is4xx__pureZhttpcore_u2974(T4_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (T3_) goto LA5_;
		T6_ = (NI)0;
		T6_ = code__pureZhttpclient_u3690(resp_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T3_ = is5xx__pureZhttpcore_u3026(T6_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
LA5_: ;
		if (!T3_) goto LA7_;
		T9_ = NIM_NIL;
		T9_ = (tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw*) nimNewObj(sizeof(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw), NIM_ALIGNOF(tyObject_HttpRequestError__BY5w1GR9bIATfsg9bf9b7XPrw));
		(*T9_).Sup.Sup.Sup.Sup.m_type = (&NTIv2__BY5w1GR9bIATfsg9bf9b7XPrw_);
		(*T9_).Sup.Sup.Sup.name = "HttpRequestError";
		(*T9_).Sup.Sup.Sup.message = (*resp_p0).status;
		eqwasMoved___system_u2751((&(*resp_p0).status));
		(*T9_).Sup.Sup.Sup.parent = ((Exception*) NIM_NIL);
		raiseExceptionEx((Exception*)T9_, "HttpRequestError", "responseContent", "httpclient.nim", 1318);
goto BeforeRet_;
	}
	goto LA1_;
LA7_: ;
	{
		result = readAll__pureZstreams_u102((*resp_p0).bodyStream);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		goto BeforeRet_;
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, getContent__basicZpackageinfos_u548)(tyObject_HttpClientBasecolonObjectType___qDWGISjAgnhGevjS3zDRKA* client_p0, NimStringV2 url_p1) {
	NimStringV2 result;
	tyObject_ResponsecolonObjectType___NJ70CWLkvEEDGugG4cmJ4A* resp_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	resp_1 = NIM_NIL;
	resp_1 = get__basicZpackageinfos_u555(client_p0, url_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	result = responseContent__pureZhttpclient_u6012(resp_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	eqdestroy___pureZhttpclient_u3752(resp_1);
	goto BeforeRet_;
	{
		LA1_:;
	}
	{
		eqdestroy___pureZhttpclient_u3752(resp_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
