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

/* section: NIM_merge_HEADERS */

#include "nimbase.h"
#include <dirent.h>
#include <setjmp.h>
#include <sys/types.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include <glob.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix

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

/* section: NIM_merge_FORWARD_TYPES */
typedef struct tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q;
typedef struct tyObject_Target__9abOl5DLX8suLujOaHSvGzw tyObject_Target__9abOl5DLX8suLujOaHSvGzw;
typedef struct tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg;
typedef struct tyObject_MsgConfig__kV7r8HWT0SqOYW2k2ukC6A tyObject_MsgConfig__kV7r8HWT0SqOYW2k2ukC6A;
typedef struct tySequence__tNFrR3kRuS1FSwuiLGoSSA tySequence__tNFrR3kRuS1FSwuiLGoSSA;
typedef struct tyObject_Table__Ab4q9c36aMR4mtkEOIBzdzA tyObject_Table__Ab4q9c36aMR4mtkEOIBzdzA;
typedef struct tySequence__7lEisrXlQEzwtUKW5pzRCw tySequence__7lEisrXlQEzwtUKW5pzRCw;
typedef struct tySequence__Zi9cGbCWofbtABoHJ5RbLNQ tySequence__Zi9cGbCWofbtABoHJ5RbLNQ;
typedef struct tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg;
typedef struct tySequence__4eRCaZmrYLLw2k30GPTiMw tySequence__4eRCaZmrYLLw2k30GPTiMw;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__pK3qSsBZwdXd6qyUMkd5Jw tySequence__pK3qSsBZwdXd6qyUMkd5Jw;
typedef struct tyObject_SuggestcolonObjectType___bkMuTTb2G70XfpzAiyNrnQ tyObject_SuggestcolonObjectType___bkMuTTb2G70XfpzAiyNrnQ;
typedef struct tyObject_ProfileDatacolonObjectType___rPBBfFL4X0b9cQ6rfMNPXig tyObject_ProfileDatacolonObjectType___rPBBfFL4X0b9cQ6rfMNPXig;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
typedef struct TSafePoint TSafePoint;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA;
typedef struct tyTuple__kN8up2W6YKc5YA9avn5mV5w tyTuple__kN8up2W6YKc5YA9avn5mV5w;
typedef struct tySequence__xv3aaFd3JCw8NbmALHiezQ tySequence__xv3aaFd3JCw8NbmALHiezQ;
typedef struct tyTuple__sPaDkVPSC0MkcoXCxPH9ccA tyTuple__sPaDkVPSC0MkcoXCxPH9ccA;
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
typedef struct tyTuple__z822nu9bFF1AlQnLrHjdwpA tyTuple__z822nu9bFF1AlQnLrHjdwpA;
typedef struct tyTuple__xYhUhS7X82rKTqbT9bRfCnw tyTuple__xYhUhS7X82rKTqbT9bRfCnw;
typedef struct tyObject_TFileInfo__GE3hAakXKOEpch4ap3zXAw tyObject_TFileInfo__GE3hAakXKOEpch4ap3zXAw;
typedef struct tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA;
typedef struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw tyTuple__QeWl6B6ffS4pU6WWrtcrDw;
typedef struct tyObject_Cfile__i9cKq1ZGd1wgagjUEHLVFtg tyObject_Cfile__i9cKq1ZGd1wgagjUEHLVFtg;
typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;

/* section: NIM_merge_TYPES */
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q {
NU16 line;
NI16 col;
NI32 fileIndex;
};
typedef NU8 tyEnum_TBackend__4OBsgZ9cscH2JLUE5Wcz01g;
typedef NU8 tyEnum_TSystemCPU__XYDt7D1G3qcClFyZy1Ky9ag;
typedef NU8 tyEnum_TSystemOS__s7Mlr1t66SUqP6BKJMXLaQ;
struct tyObject_Target__9abOl5DLX8suLujOaHSvGzw {
tyEnum_TSystemCPU__XYDt7D1G3qcClFyZy1Ky9ag targetCPU;
tyEnum_TSystemCPU__XYDt7D1G3qcClFyZy1Ky9ag hostCPU;
tyEnum_TSystemOS__s7Mlr1t66SUqP6BKJMXLaQ targetOS;
tyEnum_TSystemOS__s7Mlr1t66SUqP6BKJMXLaQ hostOS;
NI intSize;
NI floatSize;
NI ptrSize;
NimStringDesc* tnl;
};
typedef NU32 tySet_tyEnum_TOption__WspMeQySXNP2XoTWR5MTgg;
typedef NU64 tySet_tyEnum_TGlobalOption__RAfAEZqjnKMDumgyKKc1qw;
typedef NU8 tySet_tyEnum_TErrorOutput__fBf8Teueoz9aAkO5cXaxrpA;
struct tyObject_Table__Ab4q9c36aMR4mtkEOIBzdzA {
tySequence__7lEisrXlQEzwtUKW5pzRCw* data;
NI counter;
};
struct tyObject_MsgConfig__kV7r8HWT0SqOYW2k2ukC6A {
tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q trackPos;
NIM_BOOL trackPosAttached;
tySet_tyEnum_TErrorOutput__fBf8Teueoz9aAkO5cXaxrpA errorOutputs;
tySequence__tNFrR3kRuS1FSwuiLGoSSA* msgContext;
tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q lastError;
tyObject_Table__Ab4q9c36aMR4mtkEOIBzdzA filenameToIndexTbl;
tySequence__Zi9cGbCWofbtABoHJ5RbLNQ* fileInfos;
NI32 systemFileIdx;
};
typedef NU8 tyEnum_TCommands__VH3ghgQVwLSg3krOAoXigw;
typedef NU8 tyEnum_TGCMode__tkz389aDYNd8ykeZszCuBSw;
typedef NU8 tyEnum_ExceptionSystem__1mkAogyaDAT7g9cQjzsgKLQ;
typedef NU8 tyEnum_SymbolFilesOption__gBES9bqm1ru9ape8SeMRAFgQ;
struct tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg {
tySequence__4eRCaZmrYLLw2k30GPTiMw* data;
NI counter;
};
typedef NU16 tySet_tyEnum_Feature__01UoAKYz1MxZiuG1X2VhNQ;
typedef NU8 tySet_tyEnum_LegacyFeature__hGCD9aOrxPvpXn4Ne6W6OVA;
typedef NU8 tyEnum_IdeCmd__1Ced39bl5eePmZ1PKMPXigQ;
typedef NU8 tyEnum_TSystemCC__1eWBJUonHMOnlBwsOvpFmA;
typedef NU8 tySet_tyEnum_TMsgKind__6kx5ul0BSa9aHxHPGwkvVHg[9];
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (tyObject_SuggestcolonObjectType___bkMuTTb2G70XfpzAiyNrnQ* result, void* ClE_0);
void* ClE_0;
} tyProc__YD0MR9bJ2x4beJkZdnjXN9cA;
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (NimStringDesc* output, void* ClE_0);
void* ClE_0;
} tyProc__k2HFjxisIgDALbEUFojxaQ;
typedef NU8 tyEnum_Severity__x5BWBPGAbIH9clm5pmNp5DA;
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* config, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info, NimStringDesc* msg, tyEnum_Severity__x5BWBPGAbIH9clm5pmNp5DA severity, void* ClE_0);
void* ClE_0;
} tyProc__oL9coyIA2VDTGdUcur9aL9bew;
struct tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw {
tyEnum_TBackend__4OBsgZ9cscH2JLUE5Wcz01g backend;
tyObject_Target__9abOl5DLX8suLujOaHSvGzw target;
NI linesCompiled;
tySet_tyEnum_TOption__WspMeQySXNP2XoTWR5MTgg options;
tySet_tyEnum_TGlobalOption__RAfAEZqjnKMDumgyKKc1qw globalOptions;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* macrosToExpand;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* arcToExpand;
tyObject_MsgConfig__kV7r8HWT0SqOYW2k2ukC6A m;
NI evalTemplateCounter;
NI evalMacroCounter;
NI8 exitcode;
tyEnum_TCommands__VH3ghgQVwLSg3krOAoXigw cmd;
tyEnum_TGCMode__tkz389aDYNd8ykeZszCuBSw selectedGC;
tyEnum_ExceptionSystem__1mkAogyaDAT7g9cQjzsgKLQ exc;
NI verbosity;
NI numberOfProcessors;
NimStringDesc* evalExpr;
NF lastCmdTime;
tyEnum_SymbolFilesOption__gBES9bqm1ru9ape8SeMRAFgQ symbolFiles;
tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg cppDefines;
NimStringDesc* headerFile;
tySet_tyEnum_Feature__01UoAKYz1MxZiuG1X2VhNQ features;
tySet_tyEnum_LegacyFeature__hGCD9aOrxPvpXn4Ne6W6OVA legacyFeatures;
NimStringDesc* arguments;
tyEnum_IdeCmd__1Ced39bl5eePmZ1PKMPXigQ ideCmd;
NIM_BOOL oldNewlines;
tyEnum_TSystemCC__1eWBJUonHMOnlBwsOvpFmA cCompiler;
tySet_tyEnum_TMsgKind__6kx5ul0BSa9aHxHPGwkvVHg modifiedyNotes;
tySet_tyEnum_TMsgKind__6kx5ul0BSa9aHxHPGwkvVHg cmdlineNotes;
tySet_tyEnum_TMsgKind__6kx5ul0BSa9aHxHPGwkvVHg foreignPackageNotes;
tySet_tyEnum_TMsgKind__6kx5ul0BSa9aHxHPGwkvVHg notes;
tySet_tyEnum_TMsgKind__6kx5ul0BSa9aHxHPGwkvVHg warningAsErrors;
tySet_tyEnum_TMsgKind__6kx5ul0BSa9aHxHPGwkvVHg mainPackageNotes;
NI mainPackageId;
NI errorCounter;
NI hintCounter;
NI warnCounter;
NI errorMax;
NI maxLoopIterationsVM;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* configVars;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* symbols;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* packageCache;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* nimblePaths;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* searchPaths;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* lazyPaths;
NimStringDesc* outFile;
NimStringDesc* outDir;
NimStringDesc* jsonBuildFile;
NimStringDesc* prefixDir;
NimStringDesc* libpath;
NimStringDesc* nimcacheDir;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* dllOverrides;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* moduleOverrides;
tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* cfileSpecificOptions;
NimStringDesc* projectName;
NimStringDesc* projectPath;
NimStringDesc* projectFull;
NIM_BOOL projectIsStdin;
NIM_BOOL lastMsgWasDot;
NI32 projectMainIdx;
NI32 projectMainIdx2;
NimStringDesc* command;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* commandArgs;
NimStringDesc* commandLine;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* extraCmds;
NIM_BOOL keepComments;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* implicitImports;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* implicitIncludes;
NimStringDesc* docSeeSrcUrl;
NimStringDesc* docRoot;
NimStringDesc* docCmd;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* cIncludes;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* cLibs;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* cLinkedLibs;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* externalToLink;
NimStringDesc* linkOptionsCmd;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* compileOptionsCmd;
NimStringDesc* linkOptions;
NimStringDesc* compileOptions;
NimStringDesc* cCompilerPath;
tySequence__pK3qSsBZwdXd6qyUMkd5Jw* toCompile;
tyProc__YD0MR9bJ2x4beJkZdnjXN9cA suggestionResultHook;
NI suggestVersion;
NI suggestMaxResults;
tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q lastLineInfo;
tyProc__k2HFjxisIgDALbEUFojxaQ writelnHook;
tyProc__oL9coyIA2VDTGdUcur9aL9bew structuredErrorHook;
NimStringDesc* cppCustomNamespace;
tyObject_ProfileDatacolonObjectType___rPBBfFL4X0b9cQ6rfMNPXig* vmProfileData;
};
typedef NU8 tyEnum_StringTableMode__G9c4wVDFIzf0xHmQvxso9a9cQ;
typedef NU8 tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg;
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
NI align;
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct RootObj {
TNimType* m_type;
};
struct Exception {
  RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
Exception* up;
};
struct TSafePoint {
TSafePoint* prev;
NI status;
jmp_buf context;
};
typedef NIM_CHAR tyArray__dTlC27m9c9aWd5dvuePYanug[256];
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA {
NI a;
NI b;
};
typedef NU8 tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w;
typedef NU8 tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw;
struct tyTuple__kN8up2W6YKc5YA9avn5mV5w {
NimStringDesc* Field0;
NI Field1;
NI Field2;
};
struct tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg {
  RootObj Sup;
NI counter;
tySequence__xv3aaFd3JCw8NbmALHiezQ* data;
tyEnum_StringTableMode__G9c4wVDFIzf0xHmQvxso9a9cQ mode;
};
struct tyTuple__sPaDkVPSC0MkcoXCxPH9ccA {
NimStringDesc* Field0;
NimStringDesc* Field1;
NIM_BOOL Field2;
};
typedef NCSTRING tyUncheckedArray__nvS6J9clHMUMHfoZd8Ad2zg[1];
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
NI refcount;
TNimType* typ;
};
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
};
typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
tyArray__0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
NI Field1;
};
typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
NI len;
tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
};
struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
NI minLargeObj;
NI maxLargeObj;
tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
};
struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
NI counter;
NI max;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
};
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
NI zctThreshold;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
NI gcThreadId;
};
struct tyTuple__z822nu9bFF1AlQnLrHjdwpA {
tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q Field0;
NimStringDesc* Field1;
};
struct tyTuple__xYhUhS7X82rKTqbT9bRfCnw {
NI Field0;
NimStringDesc* Field1;
NI32 Field2;
};
struct tyObject_TFileInfo__GE3hAakXKOEpch4ap3zXAw {
NimStringDesc* fullPath;
NimStringDesc* projPath;
NimStringDesc* shortName;
tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA* quotedName;
tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA* quotedFullName;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* lines;
NimStringDesc* dirtyFile;
NimStringDesc* hash;
NIM_BOOL dirty;
};
struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw {
NI Field0;
NimStringDesc* Field1;
};
typedef NU8 tySet_tyEnum_CfileFlag__Vl9c9ayddDuXiWtnWTsEYGsA;
struct tyObject_Cfile__i9cKq1ZGd1wgagjUEHLVFtg {
NimStringDesc* nimname;
NimStringDesc* cname;
NimStringDesc* obj;
tySet_tyEnum_CfileFlag__Vl9c9ayddDuXiWtnWTsEYGsA flags;
NimStringDesc* customArgs;
};
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
NCSTRING procname;
NI line;
NCSTRING filename;
};

/* section: NIM_merge_SEQ_TYPES */
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct tySequence__tNFrR3kRuS1FSwuiLGoSSA {
  TGenericSeq Sup;
  tyTuple__z822nu9bFF1AlQnLrHjdwpA data[SEQ_DECL_SIZE];
};
struct tySequence__7lEisrXlQEzwtUKW5pzRCw {
  TGenericSeq Sup;
  tyTuple__xYhUhS7X82rKTqbT9bRfCnw data[SEQ_DECL_SIZE];
};
struct tySequence__Zi9cGbCWofbtABoHJ5RbLNQ {
  TGenericSeq Sup;
  tyObject_TFileInfo__GE3hAakXKOEpch4ap3zXAw data[SEQ_DECL_SIZE];
};
struct tySequence__4eRCaZmrYLLw2k30GPTiMw {
  TGenericSeq Sup;
  tyTuple__QeWl6B6ffS4pU6WWrtcrDw data[SEQ_DECL_SIZE];
};
struct tySequence__pK3qSsBZwdXd6qyUMkd5Jw {
  TGenericSeq Sup;
  tyObject_Cfile__i9cKq1ZGd1wgagjUEHLVFtg data[SEQ_DECL_SIZE];
};
struct tySequence__uB9b75OUPRENsBAu4AnoePA {
  TGenericSeq Sup;
  tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
};
struct tySequence__xv3aaFd3JCw8NbmALHiezQ {
  TGenericSeq Sup;
  tyTuple__sPaDkVPSC0MkcoXCxPH9ccA data[SEQ_DECL_SIZE];
};

/* section: NIM_merge_PROC_HEADERS */
static N_INLINE(NIM_BOOL, contains__3L9ahf7LYzqjU9bJ3kGRq42Qsystem)(NimStringDesc** a, NI aLen_0, NimStringDesc* item);
static N_INLINE(NI, find__eBcAkjaD0IwfsG3Z9b0YwOAsystem)(NimStringDesc** a, NI aLen_0, NimStringDesc* item);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___RkPToIJrmXtRS03VT1CneA)(NimStringDesc* x, NimStringDesc* y);
N_LIB_PRIVATE N_NIMCALL(void, insert__qXnbI9b45z8apamwI0NlLCQ)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ** x, NimStringDesc* item, NI i);
N_LIB_PRIVATE N_NIMCALL(void, addPathRec__UEd9aTJg0qrTrAR7KkfO8UA)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* dir, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info);
N_LIB_PRIVATE N_NIMCALL(tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg*, nstnewStringTable)(tyEnum_StringTableMode__G9c4wVDFIzf0xHmQvxso9a9cQ mode);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s);
N_LIB_PRIVATE N_NOINLINE(void, raiseOSError__CWyPYlyH9a6rAuZckFyVxPA)(NI32 errorCode, NimStringDesc* additionalInfo);
N_LIB_PRIVATE N_NIMCALL(NI32, osLastError__9bUWNxbcGnToMWA9b79aTXLIw)(void);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, equalMem__9bGgqEk7RXXl6eqM9c1HdELAsystem)(void* a, void* b, NI size);
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, slash___gEyhbzZ1UcxyenWRLJRXNQ)(NimStringDesc* head, NimStringDesc* tail);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosdirExists)(NimStringDesc* dir);
N_LIB_PRIVATE N_NIMCALL(void, addPackage__Z7wC8Za0js7gE4MP4B7iXQ)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* packages, NimStringDesc* p, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info);
N_LIB_PRIVATE N_NIMCALL(void, getPathVersion__y9bUp9cafyWC25meiwDsmOUg)(NimStringDesc* p, tyTuple__UV3llMMYFckfui8YMBuUZA* Result);
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_LIB_PRIVATE N_NIMCALL(NI, nsuRFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start, NI last);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, noslastPathPart)(NimStringDesc* path);
N_LIB_PRIVATE N_NIMCALL(NI, nsuFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start, NI last);
N_LIB_PRIVATE N_NIMCALL(NI, nsuRFindChar)(NimStringDesc* s, NIM_CHAR sub, NI start, NI last);
static N_INLINE(NimStringDesc*, X5BX5D___FPvLvuwqfYMFkcbGfPM8QQsystem)(NimStringDesc* s, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA x);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
static N_INLINE(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA, dotdot___BokNSDrKN1xmV1nA01G9brAsystem)(NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, substr__iGg0RIKceRvsmvq8FUHOEw)(NimStringDesc* s, NI first);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isValidVersion__0dgQGhHZzK1BiTw7dN6vSQ)(NimStringDesc* v);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, newVersion__W3iW3li9akBsyuI9bUmwiOHg)(NimStringDesc* ver);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___FTCMslDJn4CRjlKnYuYwVQ)(NimStringDesc* ver, NimStringDesc* ver2);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isSpecial__AdvmA61HHSBH32bsbmUbTA)(NimStringDesc* ver);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuNormalize)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitChar)(NimStringDesc* s, NIM_CHAR sep, NI maxsplit);
N_LIB_PRIVATE N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getOrDefault__2a0cbxcfpWcXtK45m9bR5Kg)(tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* t, NimStringDesc* key, NimStringDesc* default_0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsthasKey)(tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* t, NimStringDesc* key);
N_LIB_PRIVATE N_NIMCALL(void, nstPut)(tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* t, NimStringDesc* key, NimStringDesc* val);
N_LIB_PRIVATE N_NOINLINE(void, liMessage__Q6JNH4uRwLyZrj0dJakHew)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info, tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w msg, NimStringDesc* arg, tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw eh, tyTuple__kN8up2W6YKc5YA9avn5mV5w info2, NIM_BOOL isRaw);
N_LIB_PRIVATE N_NIMCALL(tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg, getSymlinkFileKind__wTnLPNAWjgwVnuiJ9ax0ZGQ)(NimStringDesc* path);
static N_INLINE(void, popSafePoint)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimLeaveFinally)(void);
N_LIB_PRIVATE N_NIMCALL(void, reraiseException)(void);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_LIB_PRIVATE N_NIMCALL(void, addNimblePath__LofaeXg9cmO8pKsmWT9a9bH9bw)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* p, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info);
N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, incrSeqV3)(TGenericSeq* s, TNimType* typ);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(void, decRef__AT1eRuflKWyTTBdLjEDZbgsystem)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system)(NI x, NI y);
static N_INLINE(NIM_BOOL, ltpercent___hPljn3JCDQ00ua1R07X9bxQsystem)(NI x, NI y);
static N_INLINE(void, rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__Y66tOYFjgwJ0k4aLz4bc0Q)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitLines)(NimStringDesc* s, NIM_BOOL keepEol);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, readFile__4PGnM9bWmsH0Nu7dnr3XzgA)(NimStringDesc* filename);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosisAbsolute)(NimStringDesc* path);
static N_INLINE(NI, find__iOrh2OFOGGjenBWSS2TTRwsystem)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* a, NimStringDesc* item);
N_LIB_PRIVATE N_NIMCALL(void, delete__DoB9bRPaUM0oAyF41O59cWYQ)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ** x, NI i);

/* section: NIM_merge_DATA */
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_3, ".", 1);
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_4, "..", 2);
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_5, "-#", 2);
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_6, "nimblecmd.nim(25, 11) `ver.len == 0 or ver[0] in {\'#\', \'\\x00\'} "
"+ Digits` Wrong version: ", 88);
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_7, "#head", 5);
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_8, "invalid package name: ", 22);
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_10, "/home/runner/work/nightlies/nightlies/nim/compiler/nimblecmd.ni"
"m", 64);
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__asNQM9aynXXg9ccUABbReyew_9 = {((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_10),
((NI) 97),
((NI) 14)}
;
STRING_LITERAL(TM__asNQM9aynXXg9ccUABbReyew_11, "*.nimble-link", 13);
extern TNimType NTI__sM4lkSb7zS6F7OVMvW9cffQ_;
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__asNQM9aynXXg9ccUABbReyew_13 = {((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_10),
((NI) 117),
((NI) 11)}
;

/* section: NIM_merge_VARS */
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__IcYaEuuWivYAS86vFMTS3Q;

/* section: NIM_merge_PROCS */
static N_INLINE(NI, find__eBcAkjaD0IwfsG3Z9b0YwOAsystem)(NimStringDesc** a, NI aLen_0, NimStringDesc* item) {
	NI result;
{	result = (NI)0;
	result = ((NI) 0);
	{
		NimStringDesc** i;
		NI i_2;
		i = (NimStringDesc**)0;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < aLen_0)) goto LA3;
				i = (&a[i_2]);
				{
					NIM_BOOL T6_;
					T6_ = (NIM_BOOL)0;
					T6_ = eqeq___RkPToIJrmXtRS03VT1CneA((*i), item);
					if (!T6_) goto LA7_;
					goto BeforeRet_;
				}
				LA7_: ;
				result += ((NI) 1);
				i_2 += ((NI) 1);
			} LA3: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, contains__3L9ahf7LYzqjU9bJ3kGRq42Qsystem)(NimStringDesc** a, NI aLen_0, NimStringDesc* item) {
	NIM_BOOL result;
	NI T1_;
{	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = find__eBcAkjaD0IwfsG3Z9b0YwOAsystem(a, aLen_0, item);
	result = (((NI) 0) <= T1_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, addPath__yQoptEnH9cvj9cZKgjcndthg)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* path, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = contains__3L9ahf7LYzqjU9bJ3kGRq42Qsystem((*conf).searchPaths->data, ((*conf).searchPaths ? (*conf).searchPaths->Sup.len : 0), path);
		if (!!(T3_)) goto LA4_;
		insert__qXnbI9b45z8apamwI0NlLCQ((&(*conf).searchPaths), path, ((NI) 0));
	}
	LA4_: ;
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s) {
	NCSTRING result;
	result = (NCSTRING)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (s == ((NimStringDesc*) NIM_NIL));
		if (T3_) goto LA4_;
		T3_ = ((*s).Sup.len == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		result = "";
	}
	goto LA1_;
	LA5_: ;
	{
		result = ((NCSTRING) ((*s).data));
	}
	LA1_: ;
	return result;
}
static N_INLINE(void, pushSafePoint)(TSafePoint* s) {
	(*s).prev = excHandler__rqLlY5bs9atDw2OXYqJEn5g;
	excHandler__rqLlY5bs9atDw2OXYqJEn5g = s;
}
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
	int result;
	result = (int)0;
	result = memcmp(a, b, ((size_t) (size)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__9bGgqEk7RXXl6eqM9c1HdELAsystem)(void* a, void* b, NI size) {
	NIM_BOOL result;
	int T1_;
	result = (NIM_BOOL)0;
	T1_ = (int)0;
	T1_ = nimCmpMem(a, b, size);
	result = (T1_ == ((NI32) 0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NI alen;
	NI blen;
{	result = (NIM_BOOL)0;
	alen = (a ? a->Sup.len : 0);
	blen = (b ? b->Sup.len : 0);
	{
		if (!(alen == blen)) goto LA3_;
		{
			if (!(alen == ((NI) 0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
		LA7_: ;
		result = equalMem__9bGgqEk7RXXl6eqM9c1HdELAsystem(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
		goto BeforeRet_;
	}
	LA3_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
	nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
}
static N_INLINE(NimStringDesc*, X5BX5D___FPvLvuwqfYMFkcbGfPM8QQsystem)(NimStringDesc* s, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA x) {
	NimStringDesc* result;
	NI a;
	NI L;
	result = (NimStringDesc*)0;
	a = x.a;
	L = (NI)((NI)(x.b - a) + ((NI) 1));
	result = mnewString(((NI) (L)));
	{
		NI i;
		NI i_2;
		i = (NI)0;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < L)) goto LA3;
				i = i_2;
				result->data[i] = s->data[(NI)(i + a)];
				i_2 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
static N_INLINE(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA, dotdot___BokNSDrKN1xmV1nA01G9brAsystem)(NI a, NI b) {
	tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA));
	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA));
	result.a = a;
	result.b = b;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, getPathVersion__y9bUp9cafyWC25meiwDsmOUg)(NimStringDesc* p, tyTuple__UV3llMMYFckfui8YMBuUZA* Result) {
	NI last;
	NimStringDesc* T1_;
	NI sepIdx;
	tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA T17_;
{	unsureAsgnRef((void**)&(*Result).Field0, NIM_NIL);
	unsureAsgnRef((void**)&(*Result).Field1, NIM_NIL);
	unsureAsgnRef((void**) (&(*Result).Field0), ((NimStringDesc*) NIM_NIL));
	unsureAsgnRef((void**) (&(*Result).Field1), ((NimStringDesc*) NIM_NIL));
	T1_ = (NimStringDesc*)0;
	T1_ = noslastPathPart(p);
	last = nsuRFindStr(p, T1_, ((NI) 0), ((NI) -1));
	sepIdx = nsuFindStr(p, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_5), ((NI) (last)), ((NI) 0));
	{
		if (!(sepIdx == ((NI) -1))) goto LA4_;
		sepIdx = nsuRFindChar(p, 45, ((NI) (last)), ((NI) -1));
	}
	LA4_: ;
	{
		if (!(sepIdx == ((NI) -1))) goto LA8_;
		unsureAsgnRef((void**) (&(*Result).Field0), copyString(p));
		goto BeforeRet_;
	}
	LA8_: ;
	{
		NI i;
		NI colontmp_;
		NI i_2;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (p ? p->Sup.len : 0);
		i_2 = sepIdx;
		{
			while (1) {
				if (!(i_2 < colontmp_)) goto LA12;
				i = i_2;
				{
					if (!(((NU8)(p->data[i])) == ((NU8)(47)) || ((NU8)(p->data[i])) == ((NU8)(47)))) goto LA15_;
					unsureAsgnRef((void**) (&(*Result).Field0), copyString(p));
					goto BeforeRet_;
				}
				LA15_: ;
				i_2 += ((NI) 1);
			} LA12: ;
		}
	}
	T17_ = dotdot___BokNSDrKN1xmV1nA01G9brAsystem(((NI) 0), (NI)(sepIdx - ((NI) 1)));
	unsureAsgnRef((void**) (&(*Result).Field0), X5BX5D___FPvLvuwqfYMFkcbGfPM8QQsystem(p, T17_));
	unsureAsgnRef((void**) (&(*Result).Field1), substr__iGg0RIKceRvsmvq8FUHOEw(p, (NI)(sepIdx + ((NI) 1))));
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isValidVersion__0dgQGhHZzK1BiTw7dN6vSQ)(NimStringDesc* v) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	{
		if (!(((NI) 0) < (v ? v->Sup.len : 0))) goto LA3_;
		{
			if (!(((NU8)(v->data[((NI) 0)])) == ((NU8)(35)) || ((NU8)(v->data[((NI) 0)])) >= ((NU8)(48)) && ((NU8)(v->data[((NI) 0)])) <= ((NU8)(57)))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
		LA7_: ;
	}
	LA3_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest, source, ((size_t) (size)));
}
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) {
	nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	{
		if (!!((src == ((NimStringDesc*) NIM_NIL)))) goto LA3_;
		copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
		(*dest).Sup.len += (*src).Sup.len;
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, newVersion__W3iW3li9akBsyuI9bUmwiOHg)(NimStringDesc* ver) {
	NimStringDesc* result;
{	result = (NimStringDesc*)0;
	{
		NIM_BOOL T3_;
		NimStringDesc* T7_;
		T3_ = (NIM_BOOL)0;
		T3_ = ((ver ? ver->Sup.len : 0) == ((NI) 0));
		if (T3_) goto LA4_;
		T3_ = (((NU8)(ver->data[((NI) 0)])) == ((NU8)(0)) || ((NU8)(ver->data[((NI) 0)])) == ((NU8)(35)) || ((NU8)(ver->data[((NI) 0)])) >= ((NU8)(48)) && ((NU8)(ver->data[((NI) 0)])) <= ((NU8)(57)));
		LA4_: ;
		if (!!(T3_)) goto LA5_;
		T7_ = (NimStringDesc*)0;
		T7_ = rawNewString((ver ? ver->Sup.len : 0) + 88);
appendString(T7_, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_6));
appendString(T7_, ver);
		failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(T7_);
	}
	LA5_: ;
	result = copyString(ver);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isSpecial__AdvmA61HHSBH32bsbmUbTA)(NimStringDesc* ver) {
	NIM_BOOL result;
	NIM_BOOL T1_;
{	result = (NIM_BOOL)0;
	T1_ = (NIM_BOOL)0;
	T1_ = (((NI) 0) < (ver ? ver->Sup.len : 0));
	if (!(T1_)) goto LA2_;
	T1_ = ((NU8)(ver->data[((NI) 0)]) == (NU8)(35));
	LA2_: ;
	result = T1_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___FTCMslDJn4CRjlKnYuYwVQ)(NimStringDesc* ver, NimStringDesc* ver2) {
	NIM_BOOL result;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* sVer;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* sVer2;
{	result = (NIM_BOOL)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = isSpecial__AdvmA61HHSBH32bsbmUbTA(ver);
		if (T3_) goto LA4_;
		T3_ = isSpecial__AdvmA61HHSBH32bsbmUbTA(ver2);
		LA4_: ;
		if (!T3_) goto LA5_;
		{
			NIM_BOOL T9_;
			NimStringDesc* T11_;
			NimStringDesc* T14_;
			T9_ = (NIM_BOOL)0;
			T9_ = isSpecial__AdvmA61HHSBH32bsbmUbTA(ver2);
			if (!(T9_)) goto LA10_;
			T11_ = (NimStringDesc*)0;
			T11_ = nsuNormalize(ver2);
			T9_ = eqStrings(T11_, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_7));
			LA10_: ;
			if (!T9_) goto LA12_;
			T14_ = (NimStringDesc*)0;
			T14_ = nsuNormalize(ver);
			result = !(eqStrings(T14_, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_7)));
			goto BeforeRet_;
		}
		LA12_: ;
		{
			NIM_BOOL T17_;
			NimStringDesc* T20_;
			T17_ = (NIM_BOOL)0;
			T17_ = isSpecial__AdvmA61HHSBH32bsbmUbTA(ver2);
			if (!!(T17_)) goto LA18_;
			T20_ = (NimStringDesc*)0;
			T20_ = nsuNormalize(ver);
			result = !(eqStrings(T20_, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_7)));
			goto BeforeRet_;
		}
		LA18_: ;
	}
	LA5_: ;
	sVer = nsuSplitChar(ver, 46, ((NI) -1));
	sVer2 = nsuSplitChar(ver2, 46, ((NI) -1));
	{
		NI i;
		NI colontmp_;
		NI T22_;
		NI T23_;
		NI i_2;
		i = (NI)0;
		colontmp_ = (NI)0;
		T22_ = (sVer ? sVer->Sup.len : 0);
		T23_ = (sVer2 ? sVer2->Sup.len : 0);
		colontmp_ = ((T22_ >= T23_) ? T22_ : T23_);
		i_2 = ((NI) 0);
		{
			while (1) {
				NI sVerI;
				NI sVerI2;
				if (!(i_2 < colontmp_)) goto LA25;
				i = i_2;
				sVerI = ((NI) 0);
				{
					NI T28_;
					NI T31_;
					T28_ = (sVer ? sVer->Sup.len : 0);
					if (!(i < T28_)) goto LA29_;
					T31_ = (NI)0;
					T31_ = npuParseInt(sVer->data[i], (&sVerI), ((NI) 0));
					(void)(T31_);
				}
				LA29_: ;
				sVerI2 = ((NI) 0);
				{
					NI T34_;
					NI T37_;
					T34_ = (sVer2 ? sVer2->Sup.len : 0);
					if (!(i < T34_)) goto LA35_;
					T37_ = (NI)0;
					T37_ = npuParseInt(sVer2->data[i], (&sVerI2), ((NI) 0));
					(void)(T37_);
				}
				LA35_: ;
				{
					if (!(sVerI < sVerI2)) goto LA40_;
					result = NIM_TRUE;
					goto BeforeRet_;
				}
				goto LA38_;
				LA40_: ;
				{
					if (!(sVerI == sVerI2)) goto LA43_;
				}
				goto LA38_;
				LA43_: ;
				{
					result = NIM_FALSE;
					goto BeforeRet_;
				}
				LA38_: ;
				i_2 += ((NI) 1);
			} LA25: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, addPackage__Z7wC8Za0js7gE4MP4B7iXQ)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* packages, NimStringDesc* p, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info) {
	tyTuple__UV3llMMYFckfui8YMBuUZA T1_;
	NimStringDesc* name;
	NimStringDesc* ver;
	nimZeroMem((void*)(&T1_), sizeof(tyTuple__UV3llMMYFckfui8YMBuUZA));
	getPathVersion__y9bUp9cafyWC25meiwDsmOUg(p, (&T1_));
	name = (NimStringDesc*)0;
	name = T1_.Field0;
	ver = (NimStringDesc*)0;
	ver = T1_.Field1;
	{
		NIM_BOOL T4_;
		NimStringDesc* version;
		T4_ = (NIM_BOOL)0;
		T4_ = isValidVersion__0dgQGhHZzK1BiTw7dN6vSQ(ver);
		if (!T4_) goto LA5_;
		version = newVersion__W3iW3li9akBsyuI9bUmwiOHg(ver);
		{
			NIM_BOOL T9_;
			NimStringDesc* T10_;
			NimStringDesc* T11_;
			NIM_BOOL T13_;
			T9_ = (NIM_BOOL)0;
			T10_ = (NimStringDesc*)0;
			T10_ = getOrDefault__2a0cbxcfpWcXtK45m9bR5Kg(packages, name, ((NimStringDesc*) NIM_NIL));
			T11_ = (NimStringDesc*)0;
			T11_ = newVersion__W3iW3li9akBsyuI9bUmwiOHg(T10_);
			T9_ = lt___FTCMslDJn4CRjlKnYuYwVQ(T11_, version);
			if (T9_) goto LA12_;
			T13_ = (NIM_BOOL)0;
			T13_ = nsthasKey(packages, name);
			T9_ = !(T13_);
			LA12_: ;
			if (!T9_) goto LA14_;
			nstPut(packages, name, version);
		}
		LA14_: ;
	}
	goto LA2_;
	LA5_: ;
	{
		NimStringDesc* T17_;
		T17_ = (NimStringDesc*)0;
		T17_ = rawNewString((p ? p->Sup.len : 0) + 22);
appendString(T17_, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_8));
appendString(T17_, p);
		liMessage__Q6JNH4uRwLyZrj0dJakHew(conf, info, ((tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w) 10), T17_, ((tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw) 0), TM__asNQM9aynXXg9ccUABbReyew_9, NIM_FALSE);
	}
	LA2_: ;
}
static N_INLINE(void, popSafePoint)(void) {
	excHandler__rqLlY5bs9atDw2OXYqJEn5g = (*excHandler__rqLlY5bs9atDw2OXYqJEn5g).prev;
}
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c) {
	(*dest).data[(*dest).Sup.len] = c;
	(*dest).data[(NI)((*dest).Sup.len + ((NI) 1))] = 0;
	(*dest).Sup.len += ((NI) 1);
}
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
	return result;
}
static N_INLINE(NIM_BOOL, ltpercent___hPljn3JCDQ00ua1R07X9bxQsystem)(NI x, NI y) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
	return result;
}
static N_INLINE(void, rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
	addZCT__Y66tOYFjgwJ0k4aLz4bc0Q((&gch__IcYaEuuWivYAS86vFMTS3Q.zct), c);
}
static N_INLINE(void, decRef__AT1eRuflKWyTTBdLjEDZbgsystem)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
	(*c).refcount = minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system((*c).refcount, ((NI) 8));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = ltpercent___hPljn3JCDQ00ua1R07X9bxQsystem((*c).refcount, ((NI) 8));
		if (!T3_) goto LA4_;
		rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system(c);
	}
	LA4_: ;
}
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr) {
	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
	NI T1_;
	result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
	T1_ = (NI)0;
	T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system(((NI) (ptrdiff_t) (usr)), ((NI) 16));
	result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
	return result;
}
static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_;
	T1_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
	T1_ = usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem(p);
	decRef__AT1eRuflKWyTTBdLjEDZbgsystem(T1_);
}
N_LIB_PRIVATE N_NIMCALL(void, addNimblePath__LofaeXg9cmO8pKsmWT9a9bH9bw)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* p, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info) {
	NimStringDesc* path;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* nimbleLinks;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* resultX60gensym13_;
	path = copyString(p);
	resultX60gensym13_ = NIM_NIL;
	{
		NimStringDesc* xX60gensym13_;
		NimStringDesc* colontmp_;
		glob_t fX60gensym130_;
		NI resX60gensym130_;
		int T2_;
		TSafePoint TM__asNQM9aynXXg9ccUABbReyew_12;
		xX60gensym13_ = (NimStringDesc*)0;
		colontmp_ = (NimStringDesc*)0;
		colontmp_ = slash___gEyhbzZ1UcxyenWRLJRXNQ(p, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_11));
		nimZeroMem((void*)(&fX60gensym130_), sizeof(glob_t));
		resX60gensym130_ = (NI)0;
		fX60gensym130_.gl_offs = ((NI) 0);
		fX60gensym130_.gl_pathc = ((NI) 0);
		fX60gensym130_.gl_pathv = ((NCSTRING*) NIM_NIL);
		T2_ = (int)0;
		T2_ = glob(nimToCStringConv(colontmp_), ((int) 0), NIM_NIL, (&fX60gensym130_));
		resX60gensym130_ = ((NI) (T2_));
		pushSafePoint(&TM__asNQM9aynXXg9ccUABbReyew_12);
		TM__asNQM9aynXXg9ccUABbReyew_12.status = setjmp(TM__asNQM9aynXXg9ccUABbReyew_12.context);
		if (TM__asNQM9aynXXg9ccUABbReyew_12.status == 0) {
		{
			if (!(resX60gensym130_ == ((NI) 0))) goto LA5_;
			{
				NI iX60gensym130_;
				NI colontmp__2;
				NI res;
				iX60gensym130_ = (NI)0;
				colontmp__2 = (NI)0;
				colontmp__2 = (NI)(fX60gensym130_.gl_pathc - ((NI) 1));
				res = ((NI) 0);
				{
					while (1) {
						NimStringDesc* pathX60gensym130_;
						if (!(res <= colontmp__2)) goto LA9;
						iX60gensym130_ = res;
						pathX60gensym130_ = cstrToNimstr(fX60gensym130_.gl_pathv[iX60gensym130_]);
						{
							NI T14_;
							NimStringDesc* T15_;
							if (!NIM_TRUE) goto LA12_;
							xX60gensym13_ = pathX60gensym130_;
							resultX60gensym13_ = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV3((TGenericSeq*)(resultX60gensym13_), (&NTI__sM4lkSb7zS6F7OVMvW9cffQ_));
							T14_ = resultX60gensym13_->Sup.len++;
							T15_ = (NimStringDesc*)0;
							T15_ = resultX60gensym13_->data[T14_]; resultX60gensym13_->data[T14_] = copyStringRC1(xX60gensym13_);
							if (T15_) nimGCunrefNoCycle(T15_);
						}
						LA12_: ;
						res += ((NI) 1);
					} LA9: ;
				}
			}
		}
		LA5_: ;
		popSafePoint();
		}
		else {
			popSafePoint();
		}
		{
			globfree((&fX60gensym130_));
			if (TM__asNQM9aynXXg9ccUABbReyew_12.status != 0) nimLeaveFinally();
		}
		if (TM__asNQM9aynXXg9ccUABbReyew_12.status != 0) reraiseException();
	}
	nimbleLinks = resultX60gensym13_;
	{
		NI T20_;
		tySequence__sM4lkSb7zS6F7OVMvW9cffQ* nimbleLinkLines;
		NimStringDesc* T23_;
		T20_ = (nimbleLinks ? nimbleLinks->Sup.len : 0);
		if (!(((NI) 0) < T20_)) goto LA21_;
		T23_ = (NimStringDesc*)0;
		T23_ = readFile__4PGnM9bWmsH0Nu7dnr3XzgA(nimbleLinks->data[((NI) 0)]);
		nimbleLinkLines = nsuSplitLines(T23_, NIM_FALSE);
		path = copyString(nimbleLinkLines->data[((NI) 1)]);
		{
			NIM_BOOL T26_;
			T26_ = (NIM_BOOL)0;
			T26_ = nosisAbsolute(path);
			if (!!(T26_)) goto LA27_;
			path = slash___gEyhbzZ1UcxyenWRLJRXNQ(p, path);
		}
		LA27_: ;
	}
	LA21_: ;
	{
		NIM_BOOL T31_;
		T31_ = (NIM_BOOL)0;
		T31_ = contains__3L9ahf7LYzqjU9bJ3kGRq42Qsystem((*conf).searchPaths->data, ((*conf).searchPaths ? (*conf).searchPaths->Sup.len : 0), path);
		if (!!(T31_)) goto LA32_;
		liMessage__Q6JNH4uRwLyZrj0dJakHew(conf, info, ((tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w) 66), path, ((tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw) 0), TM__asNQM9aynXXg9ccUABbReyew_13, NIM_FALSE);
		insert__qXnbI9b45z8apamwI0NlLCQ((&(*conf).lazyPaths), path, ((NI) 0));
	}
	LA32_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addPathRec__UEd9aTJg0qrTrAR7KkfO8UA)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* dir, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info) {
	tyObject_StringTableObj__V5PVrt9bIxZEeV7lfvqqtNg* packages;
	NI pos;
	packages = nstnewStringTable(((tyEnum_StringTableMode__G9c4wVDFIzf0xHmQvxso9a9cQ) 2));
	pos = (NI)((dir ? dir->Sup.len : 0) - ((NI) 1));
	{
		if (!(((NU8)(dir->data[pos])) == ((NU8)(47)) || ((NU8)(dir->data[pos])) == ((NU8)(47)))) goto LA3_;
		pos += ((NI) 1);
	}
	LA3_: ;
	{
		tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg k;
		NimStringDesc* p;
		DIR* d;
		k = (tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg)0;
		p = (NimStringDesc*)0;
		d = opendir(nimToCStringConv(dir));
		{
			if (!(d == ((DIR*) NIM_NIL))) goto LA8_;
			{
				NI32 T14_;
				if (!NIM_FALSE) goto LA12_;
				T14_ = (NI32)0;
				T14_ = osLastError__9bUWNxbcGnToMWA9b79aTXLIw();
				raiseOSError__CWyPYlyH9a6rAuZckFyVxPA(T14_, dir);
			}
			LA12_: ;
		}
		goto LA6_;
		LA8_: ;
		{
			TSafePoint TM__asNQM9aynXXg9ccUABbReyew_2;
			pushSafePoint(&TM__asNQM9aynXXg9ccUABbReyew_2);
			TM__asNQM9aynXXg9ccUABbReyew_2.status = setjmp(TM__asNQM9aynXXg9ccUABbReyew_2.context);
			if (TM__asNQM9aynXXg9ccUABbReyew_2.status == 0) {
			{
				while (1) {
					{
						struct dirent* x;
						NimStringDesc* y;
						x = readdir(d);
						{
							if (!(x == ((struct dirent*) NIM_NIL))) goto LA21_;
							goto LA16;
						}
						LA21_: ;
						y = cstrToNimstr(((NCSTRING) ((*x).d_name)));
						{
							NIM_BOOL T25_;
							struct stat s;
							NimStringDesc* path;
							tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg k_2;
							T25_ = (NIM_BOOL)0;
							T25_ = !(eqStrings(y, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_3)));
							if (!(T25_)) goto LA26_;
							T25_ = !(eqStrings(y, ((NimStringDesc*) &TM__asNQM9aynXXg9ccUABbReyew_4)));
							LA26_: ;
							if (!T25_) goto LA27_;
							nimZeroMem((void*)(&s), sizeof(struct stat));
							path = slash___gEyhbzZ1UcxyenWRLJRXNQ(dir, y);
							{
								if (!NIM_TRUE) goto LA31_;
								y = copyString(path);
							}
							LA31_: ;
							k_2 = ((tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg) 0);
							{
								if (!!(((*x).d_type == ((NI8) 0)))) goto LA35_;
								{
									if (!((*x).d_type == ((NI8) 4))) goto LA39_;
									k_2 = ((tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg) 2);
								}
								LA39_: ;
								{
									if (!((*x).d_type == ((NI8) 10))) goto LA43_;
									{
										NIM_BOOL T47_;
										T47_ = (NIM_BOOL)0;
										T47_ = nosdirExists(path);
										if (!T47_) goto LA48_;
										k_2 = ((tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg) 3);
									}
									goto LA45_;
									LA48_: ;
									{
										k_2 = ((tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg) 1);
									}
									LA45_: ;
								}
								LA43_: ;
								k = k_2;
								p = y;
								{
									NIM_BOOL T53_;
									T53_ = (NIM_BOOL)0;
									T53_ = (k == ((tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg) 2));
									if (!(T53_)) goto LA54_;
									T53_ = !(((NU8)(p->data[pos]) == (NU8)(46)));
									LA54_: ;
									if (!T53_) goto LA55_;
									addPackage__Z7wC8Za0js7gE4MP4B7iXQ(conf, packages, p, info);
								}
								LA55_: ;
								goto LA18;
							}
							LA35_: ;
							{
								int T59_;
								T59_ = (int)0;
								T59_ = lstat(nimToCStringConv(path), (&s));
								if (!(T59_ < ((NI32) 0))) goto LA60_;
								goto LA16;
							}
							LA60_: ;
							{
								NIM_BOOL T64_;
								T64_ = (NIM_BOOL)0;
								T64_ = S_ISDIR(s.st_mode);
								if (!T64_) goto LA65_;
								k_2 = ((tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg) 2);
							}
							goto LA62_;
							LA65_: ;
							{
								NIM_BOOL T68_;
								T68_ = (NIM_BOOL)0;
								T68_ = S_ISLNK(s.st_mode);
								if (!T68_) goto LA69_;
								k_2 = getSymlinkFileKind__wTnLPNAWjgwVnuiJ9ax0ZGQ(path);
							}
							goto LA62_;
							LA69_: ;
							LA62_: ;
							k = k_2;
							p = y;
							{
								NIM_BOOL T73_;
								T73_ = (NIM_BOOL)0;
								T73_ = (k == ((tyEnum_PathComponent__9c1SIU9cO1wHcl09b703A9cDrg) 2));
								if (!(T73_)) goto LA74_;
								T73_ = !(((NU8)(p->data[pos]) == (NU8)(46)));
								LA74_: ;
								if (!T73_) goto LA75_;
								addPackage__Z7wC8Za0js7gE4MP4B7iXQ(conf, packages, p, info);
							}
							LA75_: ;
						}
						LA27_: ;
					} LA18: ;
				}
			} LA16: ;
			popSafePoint();
			}
			else {
				popSafePoint();
			}
			{
				int T79_;
				T79_ = (int)0;
				T79_ = closedir(d);
				(void)(T79_);
				if (TM__asNQM9aynXXg9ccUABbReyew_2.status != 0) nimLeaveFinally();
			}
			if (TM__asNQM9aynXXg9ccUABbReyew_2.status != 0) reraiseException();
		}
		LA6_: ;
	}
	{
		NimStringDesc* p_2;
		p_2 = (NimStringDesc*)0;
		{
			NimStringDesc* key;
			NimStringDesc* val;
			key = (NimStringDesc*)0;
			val = (NimStringDesc*)0;
			{
				NI h;
				NI colontmp_;
				NI T83_;
				NI res;
				h = (NI)0;
				colontmp_ = (NI)0;
				T83_ = (((*packages).data ? (*packages).data->Sup.len : 0)-1);
				colontmp_ = T83_;
				res = ((NI) 0);
				{
					while (1) {
						if (!(res <= colontmp_)) goto LA85;
						h = res;
						{
							NimStringDesc* res_2;
							if (!(*packages).data->data[h].Field2) goto LA88_;
							key = (*packages).data->data[h].Field0;
							val = (*packages).data->data[h].Field1;
							{
								if (!((val ? val->Sup.len : 0) == ((NI) 0))) goto LA92_;
								res_2 = key;
							}
							goto LA90_;
							LA92_: ;
							{
								NimStringDesc* T95_;
								T95_ = (NimStringDesc*)0;
								T95_ = rawNewString((key ? key->Sup.len : 0) + (val ? val->Sup.len : 0) + 1);
appendString(T95_, key);
appendChar(T95_, 45);
appendString(T95_, val);
								res_2 = T95_;
							}
							LA90_: ;
							p_2 = res_2;
							addNimblePath__LofaeXg9cmO8pKsmWT9a9bH9bw(conf, p_2, info);
						}
						LA88_: ;
						res += ((NI) 1);
					} LA85: ;
				}
			}
		}
	}
}
static N_INLINE(NI, find__iOrh2OFOGGjenBWSS2TTRwsystem)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* a, NimStringDesc* item) {
	NI result;
{	result = (NI)0;
	result = ((NI) 0);
	{
		NimStringDesc** i;
		NI i_2;
		NI L;
		NI T2_;
		i = (NimStringDesc**)0;
		i_2 = ((NI) 0);
		T2_ = (a ? a->Sup.len : 0);
		L = T2_;
		{
			while (1) {
				if (!(i_2 < L)) goto LA4;
				i = (&a->data[i_2]);
				{
					NIM_BOOL T7_;
					T7_ = (NIM_BOOL)0;
					T7_ = eqeq___RkPToIJrmXtRS03VT1CneA((*i), item);
					if (!T7_) goto LA8_;
					goto BeforeRet_;
				}
				LA8_: ;
				result += ((NI) 1);
				i_2 += ((NI) 1);
			} LA4: ;
		}
	}
	result = ((NI) -1);
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nimblePath__yQoptEnH9cvj9cZKgjcndthg_2)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* path, tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info) {
	NI i;
	addPathRec__UEd9aTJg0qrTrAR7KkfO8UA(conf, path, info);
	addNimblePath__LofaeXg9cmO8pKsmWT9a9bH9bw(conf, path, info);
	i = find__iOrh2OFOGGjenBWSS2TTRwsystem((*conf).nimblePaths, path);
	{
		if (!!((i == ((NI) -1)))) goto LA3_;
		delete__DoB9bRPaUM0oAyF41O59cWYQ((&(*conf).nimblePaths), ((NI) (i)));
	}
	LA3_: ;
	insert__qXnbI9b45z8apamwI0NlLCQ((&(*conf).nimblePaths), path, ((NI) 0));
}
