/* 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/@mbasic@sdepgraphtypes.nim.c.o /Users/runner/work/nightlies/nightlies/nim-2.2.10/dist/atlas/.nimcache/@mbasic@sdepgraphtypes.nim.c */
#define NIM_INTBITS 64
#define NIM_EmulateOverflowChecks

#include "nimbase.h"
#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct tySequence__jw542wgkeGE16s5T1k3nhg tySequence__jw542wgkeGE16s5T1k3nhg;
typedef struct tySequence__jw542wgkeGE16s5T1k3nhg_Content tySequence__jw542wgkeGE16s5T1k3nhg_Content;
typedef struct tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA;
typedef struct tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA;
typedef struct tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw;
typedef struct tyTuple__7q7q3E6Oj24ZNVJb9aonhAg tyTuple__7q7q3E6Oj24ZNVJb9aonhAg;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA;
typedef struct tyObject_OrderedTable__6LH0iEO9c9cdi0YrUiH7Mtdg tyObject_OrderedTable__6LH0iEO9c9cdi0YrUiH7Mtdg;
typedef struct tySequence__jlOSbs9c7TpYbYckLycDaQg tySequence__jlOSbs9c7TpYbYckLycDaQg;
typedef struct tySequence__jlOSbs9c7TpYbYckLycDaQg_Content tySequence__jlOSbs9c7TpYbYckLycDaQg_Content;
typedef struct tyObject_PackageVersioncolonObjectType___nkWxN1qoImjRSFLA34DlGg tyObject_PackageVersioncolonObjectType___nkWxN1qoImjRSFLA34DlGg;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content;
typedef struct tyObject_CommitHash__ENSoVMeDKmDIP8obk69cDaA tyObject_CommitHash__ENSoVMeDKmDIP8obk69cDaA;
typedef struct tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw;
typedef struct tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA;
typedef struct RootObj RootObj;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ;
typedef struct tySequence__DVi6b3oqTLBd6vUX2SNW0g tySequence__DVi6b3oqTLBd6vUX2SNW0g;
typedef struct tySequence__DVi6b3oqTLBd6vUX2SNW0g_Content tySequence__DVi6b3oqTLBd6vUX2SNW0g_Content;
typedef struct tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw;
typedef struct tySequence__oMQEWXk5BpYjO5RbdjG9a1Q tySequence__oMQEWXk5BpYjO5RbdjG9a1Q;
typedef struct tySequence__oMQEWXk5BpYjO5RbdjG9a1Q_Content tySequence__oMQEWXk5BpYjO5RbdjG9a1Q_Content;
typedef struct tyTuple__P9b03d79atTGoSs9bM2vK9bPRA tyTuple__P9b03d79atTGoSs9bM2vK9bPRA;
typedef struct tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw;
typedef struct tySequence__Cv9czsNzurrmCo02svI9bGaw tySequence__Cv9czsNzurrmCo02svI9bGaw;
typedef struct tySequence__Cv9czsNzurrmCo02svI9bGaw_Content tySequence__Cv9czsNzurrmCo02svI9bGaw_Content;
typedef struct tyObject_Table__chgX4ZRn9aA0cwNzdIgL9a3w tyObject_Table__chgX4ZRn9aA0cwNzdIgL9a3w;
typedef struct tySequence__5tFKfHpt6l4YRslMO5BC9aA tySequence__5tFKfHpt6l4YRslMO5BC9aA;
typedef struct tySequence__5tFKfHpt6l4YRslMO5BC9aA_Content tySequence__5tFKfHpt6l4YRslMO5BC9aA_Content;
typedef struct tyObject_Table__RkXBcORzX4aZm9bJbtHRiMA tyObject_Table__RkXBcORzX4aZm9bJbtHRiMA;
typedef struct tySequence__eDvmA6YdVXqDawROf8i9aCg tySequence__eDvmA6YdVXqDawROf8i9aCg;
typedef struct tySequence__eDvmA6YdVXqDawROf8i9aCg_Content tySequence__eDvmA6YdVXqDawROf8i9aCg_Content;
typedef struct tyObject_Table__k9b9b9a4QBdl9cae9coIuQmAotQ tyObject_Table__k9b9b9a4QBdl9cae9coIuQmAotQ;
typedef struct tySequence__7lEisrXlQEzwtUKW5pzRCw tySequence__7lEisrXlQEzwtUKW5pzRCw;
typedef struct tySequence__7lEisrXlQEzwtUKW5pzRCw_Content tySequence__7lEisrXlQEzwtUKW5pzRCw_Content;
typedef struct tyObject_VersionInterval__Fo18dECYIXwkOygWPnb8YA tyObject_VersionInterval__Fo18dECYIXwkOygWPnb8YA;
typedef struct tyTuple__XXBtNszxg1rbD9cnycyLK7A tyTuple__XXBtNszxg1rbD9cnycyLK7A;
typedef struct tyObject_VersionReq__eFOT6plIfXH54d8sBkqpng tyObject_VersionReq__eFOT6plIfXH54d8sBkqpng;
typedef struct tyTuple__GSIE033wnKaKWLU68PPv9cA tyTuple__GSIE033wnKaKWLU68PPv9cA;
typedef struct tyTuple__VBx0n2yS08olqzoAujJNRw tyTuple__VBx0n2yS08olqzoAujJNRw;
typedef struct tyTuple__SgjupenGH7y9bVV9aV67zqsw tyTuple__SgjupenGH7y9bVV9aV67zqsw;
typedef struct tyObject_HashSet__v3AgR4bnzCtqFMiyBA9al4Q tyObject_HashSet__v3AgR4bnzCtqFMiyBA9al4Q;
typedef struct tySequence__4eRCaZmrYLLw2k30GPTiMw tySequence__4eRCaZmrYLLw2k30GPTiMw;
typedef struct tySequence__4eRCaZmrYLLw2k30GPTiMw_Content tySequence__4eRCaZmrYLLw2k30GPTiMw_Content;
typedef struct tyTuple__DuXgJ7FhP2gM03hW7KEKAA tyTuple__DuXgJ7FhP2gM03hW7KEKAA;
typedef struct tyTuple__xYhUhS7X82rKTqbT9bRfCnw tyTuple__xYhUhS7X82rKTqbT9bRfCnw;
typedef struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw tyTuple__QeWl6B6ffS4pU6WWrtcrDw;
struct tySequence__jw542wgkeGE16s5T1k3nhg {
  NI len; tySequence__jw542wgkeGE16s5T1k3nhg_Content* p;
};
struct tyObject_RefHeader__BVEqx9abcuAhztUEHxbqQJA {
	NI rc;
	NI rootIdx;
};
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct tyTuple__7q7q3E6Oj24ZNVJb9aonhAg {
	NimStringV2 Field0;
	NimStringV2 Field1;
	NimStringV2 Field2;
};
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;
};
struct tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw {
	tyTuple__7q7q3E6Oj24ZNVJb9aonhAg qualifiedName;
	NIM_BOOL hasShortName;
	tyObject_Uri__MX62yCLGQmnfVYEE3Hjm9cA u;
};
typedef NU8 tyEnum_PackageState__INzfBajphYPGcwu72ccy8w;
struct tySequence__jlOSbs9c7TpYbYckLycDaQg {
  NI len; tySequence__jlOSbs9c7TpYbYckLycDaQg_Content* p;
};
struct tyObject_OrderedTable__6LH0iEO9c9cdi0YrUiH7Mtdg {
	tySequence__jlOSbs9c7TpYbYckLycDaQg data;
	NI counter;
	NI first;
	NI last;
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  NI len; tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content* p;
};
typedef NU8 tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww;
struct tyObject_CommitHash__ENSoVMeDKmDIP8obk69cDaA {
	NimStringV2 h;
	tyEnum_CommitOrigin__tDM8mWEQT3dZtKoOj7Mgww orig;
};
struct tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA {
	tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw url;
	tyEnum_PackageState__INzfBajphYPGcwu72ccy8w state;
	tyObject_OrderedTable__6LH0iEO9c9cdi0YrUiH7Mtdg versions;
	tyObject_PackageVersioncolonObjectType___nkWxN1qoImjRSFLA34DlGg* activeVersion;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ activeFeatures;
	NimStringV2 module;
	NimStringV2 ondisk;
	NimStringV2 nimbleFile;
	NIM_BOOL active;
	NIM_BOOL isAtlasProject;
	NIM_BOOL isFork;
	NIM_BOOL isRoot;
	NIM_BOOL isLocalOnly;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ errors;
	tyObject_CommitHash__ENSoVMeDKmDIP8obk69cDaA originHead;
};
struct TNimTypeV2 {
	void* destructor;
	NI size;
	NI16 align;
	NI16 depth;
	NU32* display;
	void* traceImpl;
	void* typeInfoV1;
	NI flags;
	void* vTable[SEQ_DECL_SIZE];
};
struct RootObj {
	TNimTypeV2* m_type;
};
struct tySequence__DVi6b3oqTLBd6vUX2SNW0g {
  NI len; tySequence__DVi6b3oqTLBd6vUX2SNW0g_Content* p;
};
struct tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ {
	tySequence__DVi6b3oqTLBd6vUX2SNW0g data;
	NI counter;
};
typedef NU8 tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw;
struct tySequence__oMQEWXk5BpYjO5RbdjG9a1Q {
  NI len; tySequence__oMQEWXk5BpYjO5RbdjG9a1Q_Content* p;
};
struct tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw {
	tySequence__oMQEWXk5BpYjO5RbdjG9a1Q data;
	NI counter;
	NI first;
	NI last;
};
struct tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw {
	tyEnum_TraversalMode__7oigiLe2XsEgCBvsMzDCZw mode;
	tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* root;
	tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw pkgs;
};
struct tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA {
	RootObj Sup;
	tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ visited0;
	tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw graph1;
};
struct tyTuple__P9b03d79atTGoSs9bM2vK9bPRA {
	NI Field0;
	NI Field1;
	tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw Field2;
	tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* Field3;
};
typedef NU8 tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg;
typedef NU8 tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg;
struct tySequence__Cv9czsNzurrmCo02svI9bGaw {
  NI len; tySequence__Cv9czsNzurrmCo02svI9bGaw_Content* p;
};
struct tySequence__5tFKfHpt6l4YRslMO5BC9aA {
  NI len; tySequence__5tFKfHpt6l4YRslMO5BC9aA_Content* p;
};
struct tyObject_Table__chgX4ZRn9aA0cwNzdIgL9a3w {
	tySequence__5tFKfHpt6l4YRslMO5BC9aA data;
	NI counter;
};
struct tySequence__eDvmA6YdVXqDawROf8i9aCg {
  NI len; tySequence__eDvmA6YdVXqDawROf8i9aCg_Content* p;
};
struct tyObject_Table__RkXBcORzX4aZm9bJbtHRiMA {
	tySequence__eDvmA6YdVXqDawROf8i9aCg data;
	NI counter;
};
struct tySequence__7lEisrXlQEzwtUKW5pzRCw {
  NI len; tySequence__7lEisrXlQEzwtUKW5pzRCw_Content* p;
};
struct tyObject_Table__k9b9b9a4QBdl9cae9coIuQmAotQ {
	tySequence__7lEisrXlQEzwtUKW5pzRCw data;
	NI counter;
};
struct tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw {
	NimStringV2 version;
	NimStringV2 nimVersion;
	tyEnum_ReleaseStatus__WQoraXO80GBXtge9ad8aCBg status;
	tySequence__Cv9czsNzurrmCo02svI9bGaw requirements;
	tyObject_Table__chgX4ZRn9aA0cwNzdIgL9a3w reqsByFeatures;
	NIM_BOOL hasInstallHooks;
	NimStringV2 srcDir;
	NimStringV2 err;
	tyObject_Table__RkXBcORzX4aZm9bJbtHRiMA features;
	tyObject_Table__k9b9b9a4QBdl9cae9coIuQmAotQ featureVars;
};
typedef NU8 tyEnum_VersionRelation__4XquEtylWSi3MRH9c7xlRFw;
struct tyObject_VersionReq__eFOT6plIfXH54d8sBkqpng {
	tyEnum_VersionRelation__4XquEtylWSi3MRH9c7xlRFw r;
	NimStringV2 v;
};
struct tyObject_VersionInterval__Fo18dECYIXwkOygWPnb8YA {
	tyObject_VersionReq__eFOT6plIfXH54d8sBkqpng a;
	tyObject_VersionReq__eFOT6plIfXH54d8sBkqpng b;
	NIM_BOOL isInterval;
};
struct tyTuple__XXBtNszxg1rbD9cnycyLK7A {
	tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw Field0;
	tyObject_VersionInterval__Fo18dECYIXwkOygWPnb8YA Field1;
};
typedef struct {
N_NIMCALL_PTR(tySequence__jw542wgkeGE16s5T1k3nhg, ClP_0) (tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_p0, void* ClE_0);
void* ClE_0;
} tyProc__1HuCOSUaM108jhJDTwilSw;
typedef N_CLOSURE_PTR(tySequence__jw542wgkeGE16s5T1k3nhg, TM__3BsTfLOtVwoPl1nBjEFuSA_5) (tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_p0);
typedef N_CLOSURE_PTR(tySequence__jw542wgkeGE16s5T1k3nhg, TM__3BsTfLOtVwoPl1nBjEFuSA_8) (tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_p0);
typedef N_CLOSURE_PTR(tySequence__jw542wgkeGE16s5T1k3nhg, TM__3BsTfLOtVwoPl1nBjEFuSA_9) (tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_p0);
struct tySequence__jw542wgkeGE16s5T1k3nhg_Content { NI cap; tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* data[SEQ_DECL_SIZE]; };
struct tyTuple__GSIE033wnKaKWLU68PPv9cA {
	NI Field0;
	NI Field1;
	tyObject_PackageVersioncolonObjectType___nkWxN1qoImjRSFLA34DlGg* Field2;
	tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw* Field3;
};
struct tySequence__jlOSbs9c7TpYbYckLycDaQg_Content { NI cap; tyTuple__GSIE033wnKaKWLU68PPv9cA data[SEQ_DECL_SIZE]; };
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content { NI cap; NimStringV2 data[SEQ_DECL_SIZE]; };
struct tyTuple__VBx0n2yS08olqzoAujJNRw {
	NI Field0;
	tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw Field1;
	tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg Field2;
};
struct tySequence__DVi6b3oqTLBd6vUX2SNW0g_Content { NI cap; tyTuple__VBx0n2yS08olqzoAujJNRw data[SEQ_DECL_SIZE]; };
struct tySequence__oMQEWXk5BpYjO5RbdjG9a1Q_Content { NI cap; tyTuple__P9b03d79atTGoSs9bM2vK9bPRA data[SEQ_DECL_SIZE]; };
struct tySequence__Cv9czsNzurrmCo02svI9bGaw_Content { NI cap; tyTuple__XXBtNszxg1rbD9cnycyLK7A data[SEQ_DECL_SIZE]; };
struct tySequence__4eRCaZmrYLLw2k30GPTiMw {
  NI len; tySequence__4eRCaZmrYLLw2k30GPTiMw_Content* p;
};
struct tyObject_HashSet__v3AgR4bnzCtqFMiyBA9al4Q {
	tySequence__4eRCaZmrYLLw2k30GPTiMw data;
	NI counter;
};
struct tyTuple__SgjupenGH7y9bVV9aV67zqsw {
	NI Field0;
	tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw Field1;
	tyObject_HashSet__v3AgR4bnzCtqFMiyBA9al4Q Field2;
};
struct tySequence__5tFKfHpt6l4YRslMO5BC9aA_Content { NI cap; tyTuple__SgjupenGH7y9bVV9aV67zqsw data[SEQ_DECL_SIZE]; };
struct tyTuple__DuXgJ7FhP2gM03hW7KEKAA {
	NI Field0;
	NimStringV2 Field1;
	tySequence__Cv9czsNzurrmCo02svI9bGaw Field2;
};
struct tySequence__eDvmA6YdVXqDawROf8i9aCg_Content { NI cap; tyTuple__DuXgJ7FhP2gM03hW7KEKAA data[SEQ_DECL_SIZE]; };
struct tyTuple__xYhUhS7X82rKTqbT9bRfCnw {
	NI Field0;
	NimStringV2 Field1;
	NI32 Field2;
};
struct tySequence__7lEisrXlQEzwtUKW5pzRCw_Content { NI cap; tyTuple__xYhUhS7X82rKTqbT9bRfCnw data[SEQ_DECL_SIZE]; };
struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw {
	NI Field0;
	NimStringV2 Field1;
};
struct tySequence__4eRCaZmrYLLw2k30GPTiMw_Content { NI cap; tyTuple__QeWl6B6ffS4pU6WWrtcrDw data[SEQ_DECL_SIZE]; };
static N_INLINE(NIM_BOOL, nimDecRefIsLast)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u813)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZnimblecontext_u3603)(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, alignedDealloc)(void* p_p0, NI align_p1);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__basicZdepgraphtypes_u4118)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u4032)(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZnimblecontext_u3582)(tySequence__oMQEWXk5BpYjO5RbdjG9a1Q dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u217)(tySequence__DVi6b3oqTLBd6vUX2SNW0g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___basicZdepgraphtypes_u3179)(tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw* dest_p0, tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw* src_p1);
N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___basicZdepgraphtypes_u208)(tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ* dest_p0, tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ src_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ, initTable__basicZdepgraphtypes_u38)(NI initialSize_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u199)(tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ* dest_p0);
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);
static N_INLINE(NI, len__basicZdepgraphtypes_u302)(tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw* t_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i_p0, NI n_p1);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___basicZpkgurls_u264)(tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* dest_p0, tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___basicZdepgraphtypes_u561)(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA** dest_p0, tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___basicZdepgraphtypes_u668)(tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ* t_p0, tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* key_p1, tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg val_p2);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u95)(NimStringV2 msg_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u558)(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZpkgurls_u261)(tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, add__basicZdepgraphtypes_u2795)(tySequence__jw542wgkeGE16s5T1k3nhg* x_p0, tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA** y_p1, NI y_p1Len_0);
N_LIB_PRIVATE N_CLOSURE(tySequence__jw542wgkeGE16s5T1k3nhg, visit__basicZdepgraphtypes_u1880)(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_p0, void* ClE_0);
N_LIB_PRIVATE N_NIMCALL(tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg*, X5BX5D___basicZdepgraphtypes_u1932)(tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ* t_p0, tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* key_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdeptypes_u1632)(tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw* dest_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw*, activeNimbleRelease__basicZdeptypes_u561)(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__basicZdepgraphtypes_u2170)(tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw* t_p0, tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* key_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA**, X5BX5D___basicZdepgraphtypes_u2508)(tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw* t_p0, tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* key_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u2971)(tySequence__jw542wgkeGE16s5T1k3nhg dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, add__basicZdepgraphtypes_u2948)(tySequence__jw542wgkeGE16s5T1k3nhg* x_p0, tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* y_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA*, eqdup___basicZdepgraphtypes_u564)(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* src_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u4072)(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicStatic)(void* p_p0, TNimTypeV2* desc_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, eqcopy___system_u2754)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___basicZversions_u359)(NimStringV2 a_p0, NimStringV2 b_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___basicZversions_u325)(NimStringV2 a_p0, NimStringV2 b_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2760)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u2751)(NimStringV2* dest_p0);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0);
N_LIB_PRIVATE TNimTypeV2 NTIv2__EK8stOI7JrbT69atfAfvt9bA_;
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__3BsTfLOtVwoPl1nBjEFuSA_3 = { 90 | NIM_STRLIT_FLAG, "tables.nim(1822, 11) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__3BsTfLOtVwoPl1nBjEFuSA_4 = {90, (NimStrPayload*)&TM__3BsTfLOtVwoPl1nBjEFuSA_3};
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__3BsTfLOtVwoPl1nBjEFuSA_6 = { 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__3BsTfLOtVwoPl1nBjEFuSA_7 = {90, (NimStrPayload*)&TM__3BsTfLOtVwoPl1nBjEFuSA_6};
static const NimStringV2 TM__3BsTfLOtVwoPl1nBjEFuSA_10 = {90, (NimStrPayload*)&TM__3BsTfLOtVwoPl1nBjEFuSA_3};
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__3BsTfLOtVwoPl1nBjEFuSA_11 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__3BsTfLOtVwoPl1nBjEFuSA_12 = {0, (NimStrPayload*)&TM__3BsTfLOtVwoPl1nBjEFuSA_11};
static const NimStringV2 TM__3BsTfLOtVwoPl1nBjEFuSA_13 = {0, (NimStrPayload*)&TM__3BsTfLOtVwoPl1nBjEFuSA_11};
static const struct {
  NI cap; NIM_CHAR data[90+1];
} TM__3BsTfLOtVwoPl1nBjEFuSA_14 = { 90 | NIM_STRLIT_FLAG, "tables.nim(1885, 11) `len(t) == L` the length of the table changed while iterating over it" };
static const NimStringV2 TM__3BsTfLOtVwoPl1nBjEFuSA_15 = {90, (NimStrPayload*)&TM__3BsTfLOtVwoPl1nBjEFuSA_14};
static NIM_CONST NU32 TM__3BsTfLOtVwoPl1nBjEFuSA_2[2] = {3701606400, 2938942464};
N_LIB_PRIVATE TNimTypeV2 NTIv2__EK8stOI7JrbT69atfAfvt9bA_ = {.destructor = (void*)rttiDestroy__basicZdepgraphtypes_u4118, .size = sizeof(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA), .align = (NI16) NIM_ALIGNOF(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA), .depth = 1, .display = TM__3BsTfLOtVwoPl1nBjEFuSA_2, .traceImpl = (void*)NIM_NIL, .flags = 0};
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4198;
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, 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___basicZdepgraphtypes_u2971)(tySequence__jw542wgkeGE16s5T1k3nhg dest_p0) {
	NI colontmp_;
	colontmp_ = ((NI)0);
	{
		while (1) {
			NI T3_;
			T3_ = dest_p0.len;
			if (!(colontmp_ < T3_)) goto LA2;
			{
				NIM_BOOL T6_;
				T6_ = (NIM_BOOL)0;
				T6_ = nimDecRefIsLast(dest_p0.p->data[colontmp_]);
				if (!T6_) goto LA7_;
				eqdestroy___basicZnimblecontext_u3603((&(*dest_p0.p->data[colontmp_])));
				nimRawDispose(dest_p0.p->data[colontmp_], ((NI)8));
			}
LA7_: ;
			colontmp_ += ((NI)1);
		} LA2: ;
	}
	if (dest_p0.p && !(dest_p0.p->cap & NIM_STRLIT_FLAG)) {
 alignedDealloc(dest_p0.p, NIM_ALIGNOF(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA*));
}
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u4032)(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA* dest_p0) {
	eqdestroy___basicZnimblecontext_u3582((*dest_p0).graph1.pkgs.data);
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLast((*dest_p0).graph1.root);
		if (!T3_) goto LA4_;
		eqdestroy___basicZnimblecontext_u3603((&(*(*dest_p0).graph1.root)));
		nimRawDispose((*dest_p0).graph1.root, ((NI)8));
	}
LA4_: ;
	eqdestroy___basicZdepgraphtypes_u217((*dest_p0).visited0.data);
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__basicZdepgraphtypes_u4118)(void* dest_p0) {
	eqdestroy___basicZdepgraphtypes_u4032(((tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA*) (dest_p0)));
}
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(NI, len__basicZdepgraphtypes_u302)(tyObject_OrderedTable__NAaHKPe5f6Y5G54ThvHCdw* t_p0) {
	NI result;
	result = (*t_p0).counter;
	return result;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u31)(NI hcode_p0) {
	NIM_BOOL result;
	result = !((hcode_p0 == ((NI)0)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___basicZdepgraphtypes_u1482)(tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg* dest_p0) {
	(*dest_p0) = 0;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4198);
	return result;
}
N_LIB_PRIVATE N_CLOSURE(tySequence__jw542wgkeGE16s5T1k3nhg, visit__basicZdepgraphtypes_u1880)(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_p0, void* ClE_0) {
	tySequence__jw542wgkeGE16s5T1k3nhg result;
	tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA* colonenvP__1;
	tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw* release_1;
	tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* colontmpD_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	colonenvP__1 = (tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA*) ClE_0;
	release_1 = NIM_NIL;
	{
		tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg* T4_;
		T4_ = (tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg*)0;
		T4_ = X5BX5D___basicZdepgraphtypes_u1932((&(*colonenvP__1).visited0), (&(*pkg_p0).url));
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (!((*T4_) == ((tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg)2))) goto LA5_;
		eqdestroy___basicZdeptypes_u1632(release_1);
		goto BeforeRet_;
	}
LA5_: ;
	{
		tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg* T9_;
		T9_ = (tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg*)0;
		T9_ = X5BX5D___basicZdepgraphtypes_u1932((&(*colonenvP__1).visited0), (&(*pkg_p0).url));
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (!((*T9_) == ((tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg)1))) goto LA10_;
		eqdestroy___basicZdeptypes_u1632(release_1);
		goto BeforeRet_;
	}
LA10_: ;
	X5BX5Deq___basicZdepgraphtypes_u668((&(*colonenvP__1).visited0), (&(*pkg_p0).url), ((tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg)1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	release_1 = activeNimbleRelease__basicZdeptypes_u561(pkg_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		if (!!((release_1 == 0))) goto LA14_;
		{
			tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw* depUrl_1;
			tyObject_VersionInterval__Fo18dECYIXwkOygWPnb8YA* __1;
			NI i_1;
			NI L_1;
			NI T17_;
			depUrl_1 = (tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw*)0;
			__1 = (tyObject_VersionInterval__Fo18dECYIXwkOygWPnb8YA*)0;
			i_1 = ((NI)0);
			T17_ = (*release_1).requirements.len;
			L_1 = T17_;
			{
				while (1) {
					if (!(i_1 < L_1)) goto LA19;
					if (i_1 < 0 || i_1 >= (*release_1).requirements.len){ raiseIndexError2(i_1,(*release_1).requirements.len-1); goto LA1_;
					}
					depUrl_1 = (&(*release_1).requirements.p->data[i_1].Field0);
					if (i_1 < 0 || i_1 >= (*release_1).requirements.len){ raiseIndexError2(i_1,(*release_1).requirements.len-1); goto LA1_;
					}
					__1 = (&(*release_1).requirements.p->data[i_1].Field1);
					{
						NIM_BOOL T22_;
						tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* depPkg_1;
						tySequence__jw542wgkeGE16s5T1k3nhg colontmpD__2;
						tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA** T26_;
						tyProc__1HuCOSUaM108jhJDTwilSw T27_;
						T22_ = (NIM_BOOL)0;
						T22_ = contains__basicZdepgraphtypes_u2170((&(*colonenvP__1).graph1.pkgs), (&(*depUrl_1)));
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
						if (!T22_) goto LA23_;
						depPkg_1 = NIM_NIL;
						colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
						T26_ = (tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA**)0;
						T26_ = X5BX5D___basicZdepgraphtypes_u2508((&(*colonenvP__1).graph1.pkgs), (&(*depUrl_1)));
						if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
						eqcopy___basicZdepgraphtypes_u561(&depPkg_1, (*T26_));
						nimZeroMem((void*)(&T27_), sizeof(tyProc__1HuCOSUaM108jhJDTwilSw));
						T27_.ClP_0 = visit__basicZdepgraphtypes_u1880; T27_.ClE_0 = colonenvP__1;
						colontmpD__2 = T27_.ClE_0? T27_.ClP_0(depPkg_1, T27_.ClE_0):((TM__3BsTfLOtVwoPl1nBjEFuSA_5)(T27_.ClP_0))(depPkg_1);
						if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
						add__basicZdepgraphtypes_u2795((&result), ((colontmpD__2).p) ? (colontmpD__2.p->data) : NIM_NIL, colontmpD__2.len);
						{
							LA25_:;
						}
						{
							eqdestroy___basicZdepgraphtypes_u2971(colontmpD__2);
							eqdestroy___basicZdepgraphtypes_u558(depPkg_1);
						}
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					}
LA23_: ;
					i_1 += ((NI)1);
					{
						NI T32_;
						T32_ = (*release_1).requirements.len;
						if (!!((T32_ == L_1))) goto LA33_;
						failedAssertImpl__stdZassertions_u95(TM__3BsTfLOtVwoPl1nBjEFuSA_7);
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					}
LA33_: ;
				} LA19: ;
			}
		}
	}
LA14_: ;
	X5BX5Deq___basicZdepgraphtypes_u668((&(*colonenvP__1).visited0), (&(*pkg_p0).url), ((tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg)2));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	colontmpD_ = eqdup___basicZdepgraphtypes_u564(pkg_p0);
	add__basicZdepgraphtypes_u2948((&result), colontmpD_);
	{
		LA1_:;
	}
	{
		eqdestroy___basicZdeptypes_u1632(release_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	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;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___basicZdepgraphtypes_u4072)(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicStatic(dest_p0, ((TNimTypeV2*) ((&NTIv2__EK8stOI7JrbT69atfAfvt9bA_))));
		if (!T3_) goto LA4_;
		eqdestroy___basicZdepgraphtypes_u4032((&(*dest_p0)));
		nimRawDispose(dest_p0, ((NI)8));
	}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tySequence__jw542wgkeGE16s5T1k3nhg, toposorted__basicZdepgraphtypes_u14)(tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw* graph_p0) {
	tySequence__jw542wgkeGE16s5T1k3nhg result;
	tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA* colonenv__1;
	tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA* T2_;
	tyObject_Table__qsyxkhWrSWYbcAfL5HIDXQ T3_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	colonenv__1 = NIM_NIL;
	T2_ = NIM_NIL;
	T2_ = (tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA*) nimNewObj(sizeof(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA), NIM_ALIGNOF(tyObject_Env_depgraphtypesdotnim_toposorted___EK8stOI7JrbT69atfAfvt9bA));
	(*T2_).Sup.m_type = (&NTIv2__EK8stOI7JrbT69atfAfvt9bA_);
	colonenv__1 = T2_;
	eqcopy___basicZdepgraphtypes_u3179((&(*colonenv__1).graph1), graph_p0);
	result.len = 0; result.p = (tySequence__jw542wgkeGE16s5T1k3nhg_Content*) newSeqPayload(0, sizeof(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA*), NIM_ALIGNOF(tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA*));
	T3_ = initTable__basicZdepgraphtypes_u38(((NI)32));
	if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___basicZdepgraphtypes_u199(&T3_); goto LA1_;}
	eqsink___basicZdepgraphtypes_u208((&(*colonenv__1).visited0), T3_);
	{
		tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw url_1;
		tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_1;
		NI L_1;
		nimZeroMem((void*)(&url_1), sizeof(tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw));
		pkg_1 = NIM_NIL;
		L_1 = len__basicZdepgraphtypes_u302((&(*colonenv__1).graph1.pkgs));
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		{
			NI h_1;
			if (!(((NI)0) < (*colonenv__1).graph1.pkgs.counter)) goto LA7_;
			h_1 = (*colonenv__1).graph1.pkgs.first;
			{
				while (1) {
					NI nxt_1;
					if (!(((NI)0) <= h_1)) goto LA10;
					if (h_1 < 0 || h_1 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_1,(*colonenv__1).graph1.pkgs.data.len-1); goto LA1_;
					}
					nxt_1 = (*colonenv__1).graph1.pkgs.data.p->data[h_1].Field1;
					{
						NIM_BOOL T13_;
						if (h_1 < 0 || h_1 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_1,(*colonenv__1).graph1.pkgs.data.len-1); goto LA1_;
						}
						T13_ = (NIM_BOOL)0;
						T13_ = isFilled__pureZcollectionsZtables_u31((*colonenv__1).graph1.pkgs.data.p->data[h_1].Field0);
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
						if (!T13_) goto LA14_;
						if (h_1 < 0 || h_1 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_1,(*colonenv__1).graph1.pkgs.data.len-1); goto LA1_;
						}
						eqcopy___basicZpkgurls_u264((&url_1), (&(*colonenv__1).graph1.pkgs.data.p->data[h_1].Field2));
						if (h_1 < 0 || h_1 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_1,(*colonenv__1).graph1.pkgs.data.len-1); goto LA1_;
						}
						eqcopy___basicZdepgraphtypes_u561(&pkg_1, (*colonenv__1).graph1.pkgs.data.p->data[h_1].Field3);
						X5BX5Deq___basicZdepgraphtypes_u668((&(*colonenv__1).visited0), (&url_1), ((tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg)0));
						if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
						{
							NI T18_;
							T18_ = (NI)0;
							T18_ = len__basicZdepgraphtypes_u302((&(*colonenv__1).graph1.pkgs));
							if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
							if (!!((T18_ == L_1))) goto LA19_;
							failedAssertImpl__stdZassertions_u95(TM__3BsTfLOtVwoPl1nBjEFuSA_4);
							if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
						}
LA19_: ;
					}
LA14_: ;
					h_1 = nxt_1;
				} LA10: ;
			}
		}
LA7_: ;
		eqdestroy___basicZdepgraphtypes_u558(pkg_1);
		eqdestroy___basicZpkgurls_u261((&url_1));
	}
	{
		tySequence__jw542wgkeGE16s5T1k3nhg colontmpD_;
		tyProc__1HuCOSUaM108jhJDTwilSw T26_;
		if (!!(((*colonenv__1).graph1.root == 0))) goto LA23_;
		colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
		nimZeroMem((void*)(&T26_), sizeof(tyProc__1HuCOSUaM108jhJDTwilSw));
		T26_.ClP_0 = visit__basicZdepgraphtypes_u1880; T26_.ClE_0 = colonenv__1;
		colontmpD_ = T26_.ClE_0? T26_.ClP_0((*colonenv__1).graph1.root, T26_.ClE_0):((TM__3BsTfLOtVwoPl1nBjEFuSA_8)(T26_.ClP_0))((*colonenv__1).graph1.root);
		if (NIM_UNLIKELY(*nimErr_)) goto LA25_;
		add__basicZdepgraphtypes_u2795((&result), ((colontmpD_).p) ? (colontmpD_.p->data) : NIM_NIL, colontmpD_.len);
		{
			LA25_:;
		}
		{
			eqdestroy___basicZdepgraphtypes_u2971(colontmpD_);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA23_: ;
	{
		tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw url_2;
		tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_2;
		NI L_2;
		nimZeroMem((void*)(&url_2), sizeof(tyObject_PkgUrl__xtGEmbK9cVcp0WbjakP0xVw));
		pkg_2 = NIM_NIL;
		L_2 = len__basicZdepgraphtypes_u302((&(*colonenv__1).graph1.pkgs));
		if (NIM_UNLIKELY(*nimErr_)) goto LA30_;
		{
			NI h_2;
			if (!(((NI)0) < (*colonenv__1).graph1.pkgs.counter)) goto LA33_;
			h_2 = (*colonenv__1).graph1.pkgs.first;
			{
				while (1) {
					NI nxt_2;
					if (!(((NI)0) <= h_2)) goto LA36;
					if (h_2 < 0 || h_2 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_2,(*colonenv__1).graph1.pkgs.data.len-1); goto LA30_;
					}
					nxt_2 = (*colonenv__1).graph1.pkgs.data.p->data[h_2].Field1;
					{
						NIM_BOOL T39_;
						if (h_2 < 0 || h_2 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_2,(*colonenv__1).graph1.pkgs.data.len-1); goto LA30_;
						}
						T39_ = (NIM_BOOL)0;
						T39_ = isFilled__pureZcollectionsZtables_u31((*colonenv__1).graph1.pkgs.data.p->data[h_2].Field0);
						if (NIM_UNLIKELY(*nimErr_)) goto LA30_;
						if (!T39_) goto LA40_;
						if (h_2 < 0 || h_2 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_2,(*colonenv__1).graph1.pkgs.data.len-1); goto LA30_;
						}
						eqcopy___basicZpkgurls_u264((&url_2), (&(*colonenv__1).graph1.pkgs.data.p->data[h_2].Field2));
						if (h_2 < 0 || h_2 >= (*colonenv__1).graph1.pkgs.data.len){ raiseIndexError2(h_2,(*colonenv__1).graph1.pkgs.data.len-1); goto LA30_;
						}
						eqcopy___basicZdepgraphtypes_u561(&pkg_2, (*colonenv__1).graph1.pkgs.data.p->data[h_2].Field3);
						{
							tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg* T44_;
							tySequence__jw542wgkeGE16s5T1k3nhg colontmpD__2;
							tyProc__1HuCOSUaM108jhJDTwilSw T48_;
							T44_ = (tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg*)0;
							T44_ = X5BX5D___basicZdepgraphtypes_u1932((&(*colonenv__1).visited0), (&url_2));
							if (NIM_UNLIKELY(*nimErr_)) goto LA30_;
							if (!((*T44_) == ((tyEnum_VisitState__2jgngYQVX2Dh9arxuHgCPYg)0))) goto LA45_;
							colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
							nimZeroMem((void*)(&T48_), sizeof(tyProc__1HuCOSUaM108jhJDTwilSw));
							T48_.ClP_0 = visit__basicZdepgraphtypes_u1880; T48_.ClE_0 = colonenv__1;
							colontmpD__2 = T48_.ClE_0? T48_.ClP_0(pkg_2, T48_.ClE_0):((TM__3BsTfLOtVwoPl1nBjEFuSA_9)(T48_.ClP_0))(pkg_2);
							if (NIM_UNLIKELY(*nimErr_)) goto LA47_;
							add__basicZdepgraphtypes_u2795((&result), ((colontmpD__2).p) ? (colontmpD__2.p->data) : NIM_NIL, colontmpD__2.len);
							{
								LA47_:;
							}
							{
								eqdestroy___basicZdepgraphtypes_u2971(colontmpD__2);
							}
							if (NIM_UNLIKELY(*nimErr_)) goto LA30_;
						}
LA45_: ;
						{
							NI T53_;
							T53_ = (NI)0;
							T53_ = len__basicZdepgraphtypes_u302((&(*colonenv__1).graph1.pkgs));
							if (NIM_UNLIKELY(*nimErr_)) goto LA30_;
							if (!!((T53_ == L_2))) goto LA54_;
							failedAssertImpl__stdZassertions_u95(TM__3BsTfLOtVwoPl1nBjEFuSA_10);
							if (NIM_UNLIKELY(*nimErr_)) goto LA30_;
						}
LA54_: ;
					}
LA40_: ;
					h_2 = nxt_2;
				} LA36: ;
			}
		}
LA33_: ;
		{
			LA30_:;
		}
		{
			eqdestroy___basicZdepgraphtypes_u558(pkg_2);
			eqdestroy___basicZpkgurls_u261((&url_2));
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	{
		LA1_:;
	}
	{
		eqdestroy___basicZdepgraphtypes_u4072(colonenv__1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, toDestDir__basicZdepgraphtypes_u3646)(tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw* g_p0, tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* d_p1) {
	NimStringV2 result;
	result.len = 0; result.p = NIM_NIL;
	eqcopy___system_u2754((&result), (*d_p1).ondisk);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2*, getCfgPath__basicZdepgraphtypes_u3924)(tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw* g_p0, tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* d_p1) {
	NimStringV2* result;
	tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw* colontmpD_;
	tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA** T2_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NimStringV2*)0;
	colontmpD_ = NIM_NIL;
	T2_ = (tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA**)0;
	T2_ = X5BX5D___basicZdepgraphtypes_u2508((&(*g_p0).pkgs), (&(*d_p1).url));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	colontmpD_ = activeNimbleRelease__basicZdeptypes_u561((*T2_));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	result = (&(*colontmpD_).srcDir);
	{
		LA1_:;
	}
	{
		eqdestroy___basicZdeptypes_u1632(colontmpD_);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, bestNimVersion__basicZdepgraphtypes_u3982)(tyObject_DepGraph__i1RlFs3c9aTk9bK2vN5Pa2yw* g_p0) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = TM__3BsTfLOtVwoPl1nBjEFuSA_12;
	{
		tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA* pkg_1;
		pkg_1 = NIM_NIL;
		{
			tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA** pkg_2;
			NI L_1;
			pkg_2 = (tyObject_PackagecolonObjectType___oq9cbJmLUyLo2l9clmDFeVSA**)0;
			L_1 = len__basicZdepgraphtypes_u302((&(*g_p0).pkgs));
			if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
			{
				NI h_1;
				if (!(((NI)0) < (*g_p0).pkgs.counter)) goto LA6_;
				h_1 = (*g_p0).pkgs.first;
				{
					while (1) {
						NI nxt_1;
						if (!(((NI)0) <= h_1)) goto LA9;
						if (h_1 < 0 || h_1 >= (*g_p0).pkgs.data.len){ raiseIndexError2(h_1,(*g_p0).pkgs.data.len-1); goto LA2_;
						}
						nxt_1 = (*g_p0).pkgs.data.p->data[h_1].Field1;
						{
							NIM_BOOL T12_;
							tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw* colontmpD_;
							if (h_1 < 0 || h_1 >= (*g_p0).pkgs.data.len){ raiseIndexError2(h_1,(*g_p0).pkgs.data.len-1); goto LA2_;
							}
							T12_ = (NIM_BOOL)0;
							T12_ = isFilled__pureZcollectionsZtables_u31((*g_p0).pkgs.data.p->data[h_1].Field0);
							if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
							if (!T12_) goto LA13_;
							colontmpD_ = NIM_NIL;
							if (h_1 < 0 || h_1 >= (*g_p0).pkgs.data.len){ raiseIndexError2(h_1,(*g_p0).pkgs.data.len-1); goto LA15_;
							}
							pkg_2 = &(*g_p0).pkgs.data.p->data[h_1].Field3;
							eqcopy___basicZdepgraphtypes_u561(&pkg_1, (*pkg_2));
							{
								NIM_BOOL T18_;
								NIM_BOOL T20_;
								NimStringV2 v_1;
								tyObject_NimbleReleasecolonObjectType___Cd1woUEuIWSParVQIsOkuw* colontmpD__2;
								T18_ = (NIM_BOOL)0;
								T18_ = (*pkg_1).active;
								if (!(T18_)) goto LA19_;
								colontmpD_ = activeNimbleRelease__basicZdeptypes_u561(pkg_1);
								if (NIM_UNLIKELY(*nimErr_)) goto LA15_;
								T20_ = (NIM_BOOL)0;
								T20_ = eqeq___basicZversions_u359((*colontmpD_).nimVersion, TM__3BsTfLOtVwoPl1nBjEFuSA_13);
								if (NIM_UNLIKELY(*nimErr_)) goto LA15_;
								T18_ = !(T20_);
LA19_: ;
								if (!T18_) goto LA21_;
								v_1.len = 0; v_1.p = NIM_NIL;
								colontmpD__2 = NIM_NIL;
								colontmpD__2 = activeNimbleRelease__basicZdeptypes_u561(pkg_1);
								if (NIM_UNLIKELY(*nimErr_)) goto LA23_;
								eqcopy___system_u2754((&v_1), (*colontmpD__2).nimVersion);
								{
									NIM_BOOL T26_;
									T26_ = (NIM_BOOL)0;
									T26_ = lt___basicZversions_u325(result, v_1);
									if (NIM_UNLIKELY(*nimErr_)) goto LA23_;
									if (!T26_) goto LA27_;
									eqsink___system_u2760((&result), v_1);
									eqwasMoved___system_u2751((&v_1));
								}
LA27_: ;
								{
									LA23_:;
								}
								{
									eqdestroy___basicZdeptypes_u1632(colontmpD__2);
									if (v_1.p && !(v_1.p->cap & NIM_STRLIT_FLAG)) {
 deallocShared(v_1.p);
}
								}
								if (NIM_UNLIKELY(*nimErr_)) goto LA15_;
							}
LA21_: ;
							{
								NI T33_;
								T33_ = (NI)0;
								T33_ = len__basicZdepgraphtypes_u302((&(*g_p0).pkgs));
								if (NIM_UNLIKELY(*nimErr_)) goto LA15_;
								if (!!((T33_ == L_1))) goto LA34_;
								failedAssertImpl__stdZassertions_u95(TM__3BsTfLOtVwoPl1nBjEFuSA_15);
								if (NIM_UNLIKELY(*nimErr_)) goto LA15_;
							}
LA34_: ;
							{
								LA15_:;
							}
							{
								eqdestroy___basicZdeptypes_u1632(colontmpD_);
							}
							if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
						}
LA13_: ;
						h_1 = nxt_1;
					} LA9: ;
				}
			}
LA6_: ;
		}
		{
			LA2_:;
		}
		{
			eqdestroy___basicZdepgraphtypes_u558(pkg_1);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	}BeforeRet_: ;
	return result;
}
