/* Generated by Nim Compiler v2.2.10 */
#define NIM_INTBITS 64

#include "nimbase.h"
#include <string.h>
#include <dirent.h>
#include <sys/types.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
typedef struct tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA;
typedef struct tyObject_Target__GzbDkV2u8Pgzlf9azvC43FA tyObject_Target__GzbDkV2u8Pgzlf9azvC43FA;
typedef struct tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg;
typedef struct tyObject_MsgConfig__E1VAUnnaNIOngCdEgTI2Dw tyObject_MsgConfig__E1VAUnnaNIOngCdEgTI2Dw;
typedef struct tySequence__E0kio2ZnplNTuln9bsnljSA tySequence__E0kio2ZnplNTuln9bsnljSA;
typedef struct tySequence__E0kio2ZnplNTuln9bsnljSA_Content tySequence__E0kio2ZnplNTuln9bsnljSA_Content;
typedef struct tyObject_Table__PBlYIBD9bHKBu5FQE5lPn7A tyObject_Table__PBlYIBD9bHKBu5FQE5lPn7A;
typedef struct tySequence__7lEisrXlQEzwtUKW5pzRCw tySequence__7lEisrXlQEzwtUKW5pzRCw;
typedef struct tySequence__7lEisrXlQEzwtUKW5pzRCw_Content tySequence__7lEisrXlQEzwtUKW5pzRCw_Content;
typedef struct tySequence__hTEiKNj3evQAjIXUI21elA tySequence__hTEiKNj3evQAjIXUI21elA;
typedef struct tySequence__hTEiKNj3evQAjIXUI21elA_Content tySequence__hTEiKNj3evQAjIXUI21elA_Content;
typedef struct tyObject_HashSet__8IGL0eIK5PYDsNGVA78Wmw tyObject_HashSet__8IGL0eIK5PYDsNGVA78Wmw;
typedef struct tySequence__4eRCaZmrYLLw2k30GPTiMw tySequence__4eRCaZmrYLLw2k30GPTiMw;
typedef struct tySequence__4eRCaZmrYLLw2k30GPTiMw_Content tySequence__4eRCaZmrYLLw2k30GPTiMw_Content;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content;
typedef struct tySequence__xOJ2kx2lq9bBfIm3IXnde3Q tySequence__xOJ2kx2lq9bBfIm3IXnde3Q;
typedef struct tySequence__xOJ2kx2lq9bBfIm3IXnde3Q_Content tySequence__xOJ2kx2lq9bBfIm3IXnde3Q_Content;
typedef struct tyObject_SuggestcolonObjectType___UyASNXAqAMRY5zJmcRD9ccA tyObject_SuggestcolonObjectType___UyASNXAqAMRY5zJmcRD9ccA;
typedef struct tyObject_ProfileDatacolonObjectType___R9cEb9cNTzPRldVmD9bCDO0xQ tyObject_ProfileDatacolonObjectType___R9cEb9cNTzPRldVmD9bCDO0xQ;
typedef struct tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ;
typedef struct tySequence__6j25whH7XTBoIXcM0x1T7A tySequence__6j25whH7XTBoIXcM0x1T7A;
typedef struct tySequence__6j25whH7XTBoIXcM0x1T7A_Content tySequence__6j25whH7XTBoIXcM0x1T7A_Content;
typedef struct tyTuple__wjbnfGBIEcH6aaevyJWrgw tyTuple__wjbnfGBIEcH6aaevyJWrgw;
typedef struct tyTuple__7q7q3E6Oj24ZNVJb9aonhAg tyTuple__7q7q3E6Oj24ZNVJb9aonhAg;
typedef struct tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef struct tyTuple__kN8up2W6YKc5YA9avn5mV5w tyTuple__kN8up2W6YKc5YA9avn5mV5w;
typedef struct tyTuple__9cdgeqdY7FRioNKBoD6G66A tyTuple__9cdgeqdY7FRioNKBoD6G66A;
typedef struct tyTuple__ji9a7IXpM9cONa0mh0VGCVrQ tyTuple__ji9a7IXpM9cONa0mh0VGCVrQ;
typedef struct tyTuple__xYhUhS7X82rKTqbT9bRfCnw tyTuple__xYhUhS7X82rKTqbT9bRfCnw;
typedef struct tyObject_TFileInfo__xPdjmgevOVG8T0Aq8BK7jw tyObject_TFileInfo__xPdjmgevOVG8T0Aq8BK7jw;
typedef struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw tyTuple__QeWl6B6ffS4pU6WWrtcrDw;
typedef struct tyObject_Cfile__DANcxQKXbKf7Ve5cK3l3Wg tyObject_Cfile__DANcxQKXbKf7Ve5cK3l3Wg;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA {
	NU16 line;
	NI16 col;
	NI32 fileIndex;
};
typedef NU8 tyEnum_TBackend__CGWF9bdzxEysXyGIUwpK8cw;
typedef NU8 tyEnum_TSystemCPU__3f9cinURS2hpZEHtBX69bm9cw;
typedef NU8 tyEnum_TSystemOS__Ze8KQVBa9adXItTgDtW0Iqw;
struct tyObject_Target__GzbDkV2u8Pgzlf9azvC43FA {
	tyEnum_TSystemCPU__3f9cinURS2hpZEHtBX69bm9cw targetCPU;
	tyEnum_TSystemCPU__3f9cinURS2hpZEHtBX69bm9cw hostCPU;
	tyEnum_TSystemOS__Ze8KQVBa9adXItTgDtW0Iqw targetOS;
	tyEnum_TSystemOS__Ze8KQVBa9adXItTgDtW0Iqw hostOS;
	NI intSize;
	NI floatSize;
	NI ptrSize;
	NimStringV2 tnl;
};
typedef NU32 tySet_tyEnum_TOption__LEwWf0yAgZkZx5Got2wGSQ;
typedef NU64 tySet_tyEnum_TGlobalOption__bV0ebQD3RnR6keJ3pWsG8A;
typedef NU8 tySet_tyEnum_TErrorOutput__wGgqZXVnY1wkKEe8EL9cL9aw;
struct tySequence__E0kio2ZnplNTuln9bsnljSA {
  NI len; tySequence__E0kio2ZnplNTuln9bsnljSA_Content* p;
};
struct tySequence__7lEisrXlQEzwtUKW5pzRCw {
  NI len; tySequence__7lEisrXlQEzwtUKW5pzRCw_Content* p;
};
struct tyObject_Table__PBlYIBD9bHKBu5FQE5lPn7A {
	tySequence__7lEisrXlQEzwtUKW5pzRCw data;
	NI counter;
};
struct tySequence__hTEiKNj3evQAjIXUI21elA {
  NI len; tySequence__hTEiKNj3evQAjIXUI21elA_Content* p;
};
struct tyObject_MsgConfig__E1VAUnnaNIOngCdEgTI2Dw {
	tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA trackPos;
	NIM_BOOL trackPosAttached;
	tySet_tyEnum_TErrorOutput__wGgqZXVnY1wkKEe8EL9cL9aw errorOutputs;
	tySequence__E0kio2ZnplNTuln9bsnljSA msgContext;
	tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA lastError;
	tyObject_Table__PBlYIBD9bHKBu5FQE5lPn7A filenameToIndexTbl;
	tySequence__hTEiKNj3evQAjIXUI21elA fileInfos;
	NI32 systemFileIdx;
};
typedef NU8 tyEnum_FilenameOption__o3jmnnVs6HdBg5KcNAzYiQ;
typedef NU8 tyEnum_Command__juUdcDlEGhwCRcct3jVHmQ;
typedef NU8 tyEnum_TGCMode__WW4nMw6ktfZDxJ6q84Mivg;
typedef NU8 tyEnum_ExceptionSystem__dJ6sXW7k8NDYNNBUjVZmnw;
typedef NU8 tyEnum_SymbolFilesOption__2eyIIreuRXhYT9buPPZbBYA;
struct tySequence__4eRCaZmrYLLw2k30GPTiMw {
  NI len; tySequence__4eRCaZmrYLLw2k30GPTiMw_Content* p;
};
struct tyObject_HashSet__8IGL0eIK5PYDsNGVA78Wmw {
	tySequence__4eRCaZmrYLLw2k30GPTiMw data;
	NI counter;
};
typedef NU32 tySet_tyEnum_Feature__cS3g03qGjroRW9aHnqpz8MQ;
typedef NU8 tySet_tyEnum_LegacyFeature__yvNVqOQTgcxHpvo1MvfBfA;
typedef NU8 tyEnum_IdeCmd__mZiSMTDWSAKKDbZfXDQwng;
typedef NU8 tyEnum_TSystemCC__A5wZwpTXF1SiKGvwgH1wrA;
typedef NU8 tySet_tyEnum_TMsgKind__4CaO62Zp2vRXWqMPzLEOAw[13];
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  NI len; tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content* p;
};
typedef NU8 tySet_tyEnum_StdOrrKind__so1PI9cHP1cN622ePtqa0yw;
struct tySequence__xOJ2kx2lq9bBfIm3IXnde3Q {
  NI len; tySequence__xOJ2kx2lq9bBfIm3IXnde3Q_Content* p;
};
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (tyObject_SuggestcolonObjectType___UyASNXAqAMRY5zJmcRD9ccA* result_p0, void* ClE_0);
void* ClE_0;
} tyProc__QQyR5yGA47tr5TwLxcC4Gw;
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (NimStringV2 output_p0, void* ClE_0);
void* ClE_0;
} tyProc__k2HFjxisIgDALbEUFojxaQ;
typedef NU8 tyEnum_Severity__mHEDvws7FmOtnFhcQsM8UA;
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* config_p0, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p1, NimStringV2 msg_p2, tyEnum_Severity__mHEDvws7FmOtnFhcQsM8UA severity_p3, void* ClE_0);
void* ClE_0;
} tyProc__DA9aR62IikoxFqfC5rIT9cuw;
struct tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg {
	tyEnum_TBackend__CGWF9bdzxEysXyGIUwpK8cw backend;
	tyObject_Target__GzbDkV2u8Pgzlf9azvC43FA target;
	NI linesCompiled;
	tySet_tyEnum_TOption__LEwWf0yAgZkZx5Got2wGSQ options;
	tySet_tyEnum_TGlobalOption__bV0ebQD3RnR6keJ3pWsG8A globalOptions;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* macrosToExpand;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* arcToExpand;
	tyObject_MsgConfig__E1VAUnnaNIOngCdEgTI2Dw m;
	tyEnum_FilenameOption__o3jmnnVs6HdBg5KcNAzYiQ filenameOption;
	NimStringV2 unitSep;
	NI evalTemplateCounter;
	NI evalMacroCounter;
	NI8 exitcode;
	tyEnum_Command__juUdcDlEGhwCRcct3jVHmQ cmd;
	NimStringV2 cmdInput;
	NIM_BOOL projectIsCmd;
	NIM_BOOL implicitCmd;
	tyEnum_TGCMode__WW4nMw6ktfZDxJ6q84Mivg selectedGC;
	tyEnum_ExceptionSystem__dJ6sXW7k8NDYNNBUjVZmnw exc;
	NIM_BOOL hintProcessingDots;
	NI verbosity;
	NI numberOfProcessors;
	NF lastCmdTime;
	tyEnum_SymbolFilesOption__2eyIIreuRXhYT9buPPZbBYA symbolFiles;
	NI spellSuggestMax;
	tyObject_HashSet__8IGL0eIK5PYDsNGVA78Wmw cppDefines;
	NimStringV2 headerFile;
	NimStringV2 nimbasePattern;
	tySet_tyEnum_Feature__cS3g03qGjroRW9aHnqpz8MQ features;
	tySet_tyEnum_LegacyFeature__yvNVqOQTgcxHpvo1MvfBfA legacyFeatures;
	NimStringV2 arguments;
	tyEnum_IdeCmd__mZiSMTDWSAKKDbZfXDQwng ideCmd;
	tyEnum_TSystemCC__A5wZwpTXF1SiKGvwgH1wrA cCompiler;
	tySet_tyEnum_TMsgKind__4CaO62Zp2vRXWqMPzLEOAw modifiedyNotes;
	tySet_tyEnum_TMsgKind__4CaO62Zp2vRXWqMPzLEOAw cmdlineNotes;
	tySet_tyEnum_TMsgKind__4CaO62Zp2vRXWqMPzLEOAw foreignPackageNotes;
	tySet_tyEnum_TMsgKind__4CaO62Zp2vRXWqMPzLEOAw notes;
	tySet_tyEnum_TMsgKind__4CaO62Zp2vRXWqMPzLEOAw warningAsErrors;
	tySet_tyEnum_TMsgKind__4CaO62Zp2vRXWqMPzLEOAw mainPackageNotes;
	NI mainPackageId;
	NI errorCounter;
	NI hintCounter;
	NI warnCounter;
	NI errorMax;
	NI maxLoopIterationsVM;
	NI maxCallDepthVM;
	NIM_BOOL isVmTrace;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* configVars;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* symbols;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* packageCache;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ nimblePaths;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ searchPaths;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ lazyPaths;
	NimStringV2 outFile;
	NimStringV2 outDir;
	NimStringV2 jsonBuildFile;
	NimStringV2 prefixDir;
	NimStringV2 libpath;
	NimStringV2 nimcacheDir;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* dllOverrides;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* moduleOverrides;
	tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* cfileSpecificOptions;
	NimStringV2 projectName;
	NimStringV2 projectPath;
	NimStringV2 projectFull;
	NIM_BOOL projectIsStdin;
	NimStringV2 stdinFile;
	tySet_tyEnum_StdOrrKind__so1PI9cHP1cN622ePtqa0yw lastMsgWasDot;
	NI32 projectMainIdx;
	NI32 projectMainIdx2;
	NimStringV2 command;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ commandArgs;
	NimStringV2 commandLine;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ extraCmds;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ implicitImports;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ implicitIncludes;
	NimStringV2 docSeeSrcUrl;
	NimStringV2 docRoot;
	NimStringV2 docCmd;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ configFiles;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ cIncludes;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ cLibs;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ cLinkedLibs;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ externalToLink;
	NimStringV2 linkOptionsCmd;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ compileOptionsCmd;
	NimStringV2 linkOptions;
	NimStringV2 compileOptions;
	NimStringV2 cCompilerPath;
	tySequence__xOJ2kx2lq9bBfIm3IXnde3Q toCompile;
	tyProc__QQyR5yGA47tr5TwLxcC4Gw suggestionResultHook;
	NI suggestVersion;
	NI suggestMaxResults;
	tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA lastLineInfo;
	tyProc__k2HFjxisIgDALbEUFojxaQ writelnHook;
	tyProc__DA9aR62IikoxFqfC5rIT9cuw structuredErrorHook;
	NimStringV2 cppCustomNamespace;
	NimStringV2 nimMainPrefix;
	tyObject_ProfileDatacolonObjectType___R9cEb9cNTzPRldVmD9bCDO0xQ* vmProfileData;
	NIM_BOOL expandProgress;
	NI expandLevels;
	NimStringV2 expandNodeResult;
	tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA expandPosition;
	NimStringV2 currentConfigDir;
	NI clientProcessId;
};
struct tySequence__6j25whH7XTBoIXcM0x1T7A {
  NI len; tySequence__6j25whH7XTBoIXcM0x1T7A_Content* p;
};
struct tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ {
	tySequence__6j25whH7XTBoIXcM0x1T7A data;
	NI counter;
};
typedef NU8 tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ;
typedef NIM_CHAR tyArray__bErjiHmvISNmC2iIqkq21Q[256];
struct tyTuple__wjbnfGBIEcH6aaevyJWrgw {
	tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ Field0;
	NIM_BOOL Field1;
};
struct tyTuple__7q7q3E6Oj24ZNVJb9aonhAg {
	NimStringV2 Field0;
	NimStringV2 Field1;
	NimStringV2 Field2;
};
struct tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA {
	NI a;
	NI b;
};
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
	NimStringV2 Field0;
	NimStringV2 Field1;
};
typedef NU8 tyEnum_TMsgKind__Ug4VJQkHi8g218Fa9bQrePA;
typedef NU8 tyEnum_TErrorHandling__9aJ2MrE0UrBy3xCw3BT762w;
struct tyTuple__kN8up2W6YKc5YA9avn5mV5w {
	NimStringV2 Field0;
	NI Field1;
	NI Field2;
};
struct tyTuple__9cdgeqdY7FRioNKBoD6G66A {
	NI Field0;
	NimStringV2 Field1;
	tyTuple__UV3llMMYFckfui8YMBuUZA Field2;
};
typedef NCSTRING tyUncheckedArray__nvS6J9clHMUMHfoZd8Ad2zg[1];
struct tyTuple__ji9a7IXpM9cONa0mh0VGCVrQ {
	tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA Field0;
	NimStringV2 Field1;
};
struct tySequence__E0kio2ZnplNTuln9bsnljSA_Content { NI cap; tyTuple__ji9a7IXpM9cONa0mh0VGCVrQ 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 tyObject_TFileInfo__xPdjmgevOVG8T0Aq8BK7jw {
	NimStringV2 fullPath;
	NimStringV2 projPath;
	NimStringV2 shortName;
	NimStringV2 quotedName;
	NimStringV2 quotedFullName;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ lines;
	NimStringV2 dirtyFile;
	NimStringV2 hash;
	NIM_BOOL dirty;
};
struct tySequence__hTEiKNj3evQAjIXUI21elA_Content { NI cap; tyObject_TFileInfo__xPdjmgevOVG8T0Aq8BK7jw data[SEQ_DECL_SIZE]; };
struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw {
	NI Field0;
	NimStringV2 Field1;
};
struct tySequence__4eRCaZmrYLLw2k30GPTiMw_Content { NI cap; tyTuple__QeWl6B6ffS4pU6WWrtcrDw data[SEQ_DECL_SIZE]; };
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content { NI cap; NimStringV2 data[SEQ_DECL_SIZE]; };
typedef NU8 tySet_tyEnum_CfileFlag__qhMBL5cBz484papsb5WgFQ;
struct tyObject_Cfile__DANcxQKXbKf7Ve5cK3l3Wg {
	NimStringV2 nimname;
	NimStringV2 cname;
	NimStringV2 obj;
	tySet_tyEnum_CfileFlag__qhMBL5cBz484papsb5WgFQ flags;
	NimStringV2 customArgs;
};
struct tySequence__xOJ2kx2lq9bBfIm3IXnde3Q_Content { NI cap; tyObject_Cfile__DANcxQKXbKf7Ve5cK3l3Wg data[SEQ_DECL_SIZE]; };
struct tySequence__6j25whH7XTBoIXcM0x1T7A_Content { NI cap; tyTuple__9cdgeqdY7FRioNKBoD6G66A data[SEQ_DECL_SIZE]; };
static N_INLINE(NIM_BOOL, contains__nimblecmd_u17)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 item_p1);
static N_INLINE(NI, find__nimblecmd_u22)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 item_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___options_u3652)(NimStringV2 x_p0, NimStringV2 y_p1);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, insert__nimblecmd_u51)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* x_p0, NimStringV2 item_p1, NI i_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, eqdup___system_u2697)(NimStringV2 src_p0);
N_LIB_PRIVATE N_NIMCALL(void, addPathRec__nimblecmd_u2203)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, NimStringV2 dir_p1, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p2);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__system_u2172)(void* a_p0, int v_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ, initTable__nimblecmd_u2221)(NI initialSize_p0);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NOINLINE(void, raiseOSError__stdZoserrors_u119)(NI32 errorCode_p0, NimStringV2 additionalInfo_p1);
N_LIB_PRIVATE N_NIMCALL(NI32, osLastError__stdZoserrors_u122)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u2691)(NimStringV2 dest_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, cstrToNimstr)(NCSTRING str_p0);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1);
static N_INLINE(NIM_BOOL, equalMem__system_u1750)(void* a_p0, void* b_p1, NI size_p2);
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2);
static N_INLINE(NimStringV2, slash___stdZprivateZospaths2_u91)(NimStringV2 head_p0, NimStringV2 tail_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nosjoinPath)(NimStringV2 head_p0, NimStringV2 tail_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2694)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(tyTuple__wjbnfGBIEcH6aaevyJWrgw, getSymlinkFileKind__stdZprivateZoscommon_u20)(NimStringV2 path_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2700)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u2688)(NimStringV2* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, addPackage__nimblecmd_u246)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ* packages_p1, NimStringV2 p_p2, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p3);
N_LIB_PRIVATE N_NIMCALL(void, getPathVersionChecksum__nimblecmd_u210)(NimStringV2 p_p0, tyTuple__7q7q3E6Oj24ZNVJb9aonhAg* Result);
N_LIB_PRIVATE N_NIMCALL(NI, nsuRFindChar)(NimStringV2 s_p0, NIM_CHAR sub_p1, NI start_p2, NI last_p3);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u8667)(NimStringV2 s_p0, NI first_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isValidSha1Hash__OOZdistZchecksumsZsrcZchecksumsZsha1_u1007)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(NI, nsuRFindStr)(NimStringV2 s_p0, NimStringV2 sub_p1, NI start_p2, NI last_p3);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u8654)(NimStringV2 s_p0, NI first_p1, NI last_p2);
static N_INLINE(NimStringV2, X5BX5D___pureZstrutils_u1286)(NimStringV2 s_p0, tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA x_p1);
N_NIMCALL(NimStringV2, mnewString)(NI len_p0);
static N_INLINE(void, nimPrepareStrMutationV2)(NimStringV2* s_p0);
N_LIB_PRIVATE N_NIMCALL(void, nimPrepareStrMutationImpl__system_u2430)(NimStringV2* s_p0);
static N_INLINE(tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA, dotdot___stdZstrbasics_u49)(NI a_p0, NI b_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isValidVersion__nimblecmd_u174)(NimStringV2 v_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, newVersion__nimblecmd_u137)(NimStringV2 ver_p0);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_u79)(NimStringV2 msg_p0);
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, copyMem__system_u1742)(void* dest_p0, void* source_p1, NI size_p2);
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, rawNewString)(NI space_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___nimblecmd_u185)(NimStringV2 ver_p0, NimStringV2 ver2_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isSpecial__nimblecmd_u171)(NimStringV2 ver_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuNormalize)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u5509)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ dest_p0);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, nsuSplitChar)(NimStringV2 s_p0, NIM_CHAR sep_p1, NI maxsplit_p2);
N_LIB_PRIVATE N_NIMCALL(NI, parseInt__pureZparseutils_u981)(NimStringV2 s_p0, NI* number_p1, NI start_p2);
N_LIB_PRIVATE N_NIMCALL(void, getOrDefault__nimblecmd_u318)(tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ t_p0, NimStringV2 key_p1, tyTuple__UV3llMMYFckfui8YMBuUZA* Result);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasKey__nimblecmd_u798)(tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ t_p0, NimStringV2 key_p1);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___nimblecmd_u847)(tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ* t_p0, NimStringV2 key_p1, tyTuple__UV3llMMYFckfui8YMBuUZA* val_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZprivateZospaths2_u306)(tyTuple__UV3llMMYFckfui8YMBuUZA* dest_p0);
N_LIB_PRIVATE N_NOINLINE(void, liMessage__msgs_u1227)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p1, tyEnum_TMsgKind__Ug4VJQkHi8g218Fa9bQrePA msg_p2, NimStringV2 arg_p3, tyEnum_TErrorHandling__9aJ2MrE0UrBy3xCw3BT762w eh_p4, tyTuple__kN8up2W6YKc5YA9avn5mV5w* info2_p5, NIM_BOOL isRaw_p6, NIM_BOOL ignoreError_p7);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZos_u236)(tyTuple__7q7q3E6Oj24ZNVJb9aonhAg* dest_p0);
N_LIB_PRIVATE N_NIMCALL(NI, len__nimblecmd_u1912)(tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ t_p0);
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u32)(NI hcode_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___stdZprivateZospaths2_u315)(tyTuple__UV3llMMYFckfui8YMBuUZA* dest_p0, tyTuple__UV3llMMYFckfui8YMBuUZA* src_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqdup___stdZprivateZospaths2_u312)(tyTuple__UV3llMMYFckfui8YMBuUZA* src_p0, tyTuple__UV3llMMYFckfui8YMBuUZA* Result);
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1);
N_LIB_PRIVATE N_NIMCALL(void, prepareAdd)(NimStringV2* s_p0, NI addLen_p1);
N_LIB_PRIVATE N_NIMCALL(void, addNimblePath__nimblecmd_u2168)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, NimStringV2 p_p1, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p2);
N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2);
N_LIB_PRIVATE N_NIMCALL(void, add__stdZenumutils_u71)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* x_p0, NimStringV2 y_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u5506)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ, nsuSplitLines)(NimStringV2 s_p0, NIM_BOOL keepEol_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, readFile__stdZsyncio_u527)(NimStringV2 filename_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosisAbsolute)(NimStringV2 path_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___nimblecmd_u2150)(tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ dest_p0);
static N_INLINE(NI, find__nimblecmd_u2261)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ a_p0, NimStringV2 item_p1);
N_LIB_PRIVATE N_NIMCALL(void, delete__nimblecmd_u2281)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* x_p0, NI i_p1);
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__asNQM9aynXXg9ccUABbReyew_2 = { 1 | NIM_STRLIT_FLAG, "." };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_3 = {1, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_2};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__asNQM9aynXXg9ccUABbReyew_4 = { 2 | NIM_STRLIT_FLAG, ".." };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_5 = {2, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_4};
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__asNQM9aynXXg9ccUABbReyew_6 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_7 = {0, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_6};
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_8 = {0, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_6};
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_9 = {0, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_6};
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_10 = {0, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_6};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__asNQM9aynXXg9ccUABbReyew_11 = { 2 | NIM_STRLIT_FLAG, "-#" };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_12 = {2, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_11};
static const struct {
  NI cap; NIM_CHAR data[88+1];
} TM__asNQM9aynXXg9ccUABbReyew_13 = { 88 | NIM_STRLIT_FLAG, "nimblecmd.nim(32, 11) `ver.len == 0 or ver[0] in {\'#\', \'\\x00\'} + Digits` Wrong version: " };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_14 = {88, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_13};
static const struct {
  NI cap; NIM_CHAR data[5+1];
} TM__asNQM9aynXXg9ccUABbReyew_15 = { 5 | NIM_STRLIT_FLAG, "#head" };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_16 = {5, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_15};
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_17 = {5, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_15};
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_18 = {5, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_15};
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_19 = {0, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_6};
static const struct {
  NI cap; NIM_CHAR data[22+1];
} TM__asNQM9aynXXg9ccUABbReyew_20 = { 22 | NIM_STRLIT_FLAG, "invalid package name: " };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_21 = {22, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_20};
static const struct {
  NI cap; NIM_CHAR data[64+1];
} TM__asNQM9aynXXg9ccUABbReyew_23 = { 64 | NIM_STRLIT_FLAG, "/home/runner/work/nightlies/nightlies/nim/compiler/nimblecmd.nim" };
static const struct {
  NI cap; NIM_CHAR data[13+1];
} TM__asNQM9aynXXg9ccUABbReyew_24 = { 13 | NIM_STRLIT_FLAG, "*.nimble-link" };
static const NimStringV2 TM__asNQM9aynXXg9ccUABbReyew_25 = {13, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_24};
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__asNQM9aynXXg9ccUABbReyew_22 = {{64, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_23},
((NI)126),
((NI)14)}
;
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__asNQM9aynXXg9ccUABbReyew_26 = {{64, (NimStrPayload*)&TM__asNQM9aynXXg9ccUABbReyew_23},
((NI)152),
((NI)11)}
;
extern NIM_BOOL nimInErrorMode__system_u4146;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4146);
	return result;
}
static N_INLINE(NI, find__nimblecmd_u22)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 item_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((NI)0);
	{
		NimStringV2* i_1;
		NI i_2;
		i_1 = (NimStringV2*)0;
		i_2 = ((NI)0);
		{
			while (1) {
				if (!(i_2 < a_p0Len_0)) goto LA3;
				i_1 = (&a_p0[i_2]);
				{
					NIM_BOOL T6_;
					T6_ = (NIM_BOOL)0;
					T6_ = eqeq___options_u3652((*i_1), item_p1);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					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__nimblecmd_u17)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 item_p1) {
	NIM_BOOL result;
	NI T1_;
{	T1_ = (NI)0;
	T1_ = find__nimblecmd_u22(a_p0, a_p0Len_0, item_p1);
	result = (((NI)0) <= T1_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, addPath__nimblecmd_u13)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, NimStringV2 path_p1, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p2) {
	{
		NIM_BOOL T3_;
		NimStringV2 colontmpD_;
		T3_ = (NIM_BOOL)0;
		T3_ = contains__nimblecmd_u17((((*conf_p0).searchPaths).p) ? ((*conf_p0).searchPaths.p->data) : NIM_NIL, (*conf_p0).searchPaths.len, path_p1);
		if (!!(T3_)) goto LA4_;
		colontmpD_ = eqdup___system_u2697(path_p1);
		insert__nimblecmd_u51((&(*conf_p0).searchPaths), colontmpD_, ((NI)0));
	}
LA4_: ;
}
static N_INLINE(void, nimSetMem__system_u2172)(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_u2172(p_p0, ((int)0), size_p1);
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0) {
	NCSTRING result;
	{
		if (!(s_p0.len == ((NI)0))) goto LA3_;
		result = "";
	}
	goto LA1_;
LA3_: ;
	{
		result = ((NCSTRING) ((*s_p0.p).data));
	}
LA1_: ;
	return result;
}
static N_INLINE(int, nimCmpMem)(void* a_p0, void* b_p1, NI size_p2) {
	int result;
	result = memcmp(a_p0, b_p1, ((size_t) (size_p2)));
	return result;
}
static N_INLINE(NIM_BOOL, equalMem__system_u1750)(void* a_p0, void* b_p1, NI size_p2) {
	NIM_BOOL result;
	int T1_;
	T1_ = (int)0;
	T1_ = nimCmpMem(a_p0, b_p1, size_p2);
	result = (T1_ == ((NI32)0));
	return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a_p0, NimStringV2 b_p1) {
	NIM_BOOL result;
	NI alen_1;
	NI blen_1;
{	result = NIM_FALSE;
	alen_1 = a_p0.len;
	blen_1 = b_p1.len;
	{
		if (!(alen_1 == blen_1)) goto LA3_;
		{
			if (!(alen_1 == ((NI)0))) goto LA7_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
LA7_: ;
		result = equalMem__system_u1750(((void*) ((&a_p0.p->data[((NI)0)]))), ((void*) ((&b_p1.p->data[((NI)0)]))), (alen_1));
		goto BeforeRet_;
	}
LA3_: ;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NimStringV2, slash___stdZprivateZospaths2_u91)(NimStringV2 head_p0, NimStringV2 tail_p1) {
	NimStringV2 result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	result = nosjoinPath(head_p0, tail_p1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimPrepareStrMutationV2)(NimStringV2* s_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = !(((*s_p0).p == ((NimStrPayload*) NIM_NIL)));
		if (!(T3_)) goto LA4_;
		T3_ = ((NI)((*(*s_p0).p).cap & ((NI)IL64(4611686018427387904))) == ((NI)IL64(4611686018427387904)));
LA4_: ;
		if (!T3_) goto LA5_;
		nimPrepareStrMutationImpl__system_u2430(s_p0);
	}
LA5_: ;
}
static N_INLINE(NimStringV2, X5BX5D___pureZstrutils_u1286)(NimStringV2 s_p0, tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA x_p1) {
	NimStringV2 result;
	NI a_1;
	NI L_1;
	result.len = 0; result.p = NIM_NIL;
	a_1 = x_p1.a;
	L_1 = (NI)((NI)(x_p1.b - a_1) + ((NI)1));
	result = mnewString((L_1));
	{
		NI i_1;
		NI i_2;
		i_1 = (NI)0;
		i_2 = ((NI)0);
		{
			while (1) {
				if (!(i_2 < L_1)) goto LA3;
				i_1 = i_2;
				nimPrepareStrMutationV2((&result));
				result.p->data[i_1] = s_p0.p->data[(NI)(i_1 + a_1)];
				i_2 += ((NI)1);
			} LA3: ;
		}
	}
	return result;
}
static N_INLINE(tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA, dotdot___stdZstrbasics_u49)(NI a_p0, NI b_p1) {
	tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA result;
	result.a = a_p0;
	result.b = b_p1;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, getPathVersionChecksum__nimblecmd_u210)(NimStringV2 p_p0, tyTuple__7q7q3E6Oj24ZNVJb9aonhAg* Result) {
	NimStringV2 colontmp_;
	NimStringV2 colontmp__2;
	NimStringV2 colontmp__3;
	NimStringV2 blitTmp_1;
	NimStringV2 blitTmp_2;
	NimStringV2 blitTmp_3;
	NI checksumSeparatorIndex_1;
	NI versionSeparatorIndex_1;
	tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA T24_;
	NimStringV2 T25_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	colontmp_.len = 0; colontmp_.p = NIM_NIL;
	colontmp__2.len = 0; colontmp__2.p = NIM_NIL;
	colontmp__3.len = 0; colontmp__3.p = NIM_NIL;
	colontmp_ = TM__asNQM9aynXXg9ccUABbReyew_7;
	colontmp__2 = TM__asNQM9aynXXg9ccUABbReyew_8;
	colontmp__3 = TM__asNQM9aynXXg9ccUABbReyew_9;
	blitTmp_1 = colontmp_;
	(*Result).Field0 = blitTmp_1;
	blitTmp_2 = colontmp__2;
	(*Result).Field1 = blitTmp_2;
	blitTmp_3 = colontmp__3;
	(*Result).Field2 = blitTmp_3;
	checksumSeparatorIndex_1 = nsuRFindChar(p_p0, 45, ((NI)0), ((NI)-1));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NimStringV2 T5_;
		if (!!((checksumSeparatorIndex_1 == ((NI)-1)))) goto LA3_;
		T5_.len = 0; T5_.p = NIM_NIL;
		T5_ = substr__system_u8667(p_p0, (NI)(checksumSeparatorIndex_1 + ((NI)1)));
		eqsink___system_u2700((&(*Result).Field2), T5_);
		{
			NIM_BOOL T8_;
			T8_ = (NIM_BOOL)0;
			T8_ = isValidSha1Hash__OOZdistZchecksumsZsrcZchecksumsZsha1_u1007((*Result).Field2);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!!(T8_)) goto LA9_;
			eqsink___system_u2700((&(*Result).Field2), TM__asNQM9aynXXg9ccUABbReyew_10);
			checksumSeparatorIndex_1 = p_p0.len;
		}
LA9_: ;
	}
	goto LA1_;
LA3_: ;
	{
		checksumSeparatorIndex_1 = p_p0.len;
	}
LA1_: ;
	versionSeparatorIndex_1 = nsuRFindStr(p_p0, TM__asNQM9aynXXg9ccUABbReyew_12, ((NI)0), (NI)(checksumSeparatorIndex_1 - ((NI)1)));
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NimStringV2 T16_;
		if (!!((versionSeparatorIndex_1 == ((NI)-1)))) goto LA14_;
		T16_.len = 0; T16_.p = NIM_NIL;
		T16_ = substr__system_u8654(p_p0, (NI)(versionSeparatorIndex_1 + ((NI)1)), (NI)(checksumSeparatorIndex_1 - ((NI)1)));
		eqsink___system_u2700((&(*Result).Field1), T16_);
	}
	goto LA12_;
LA14_: ;
	{
		versionSeparatorIndex_1 = nsuRFindChar(p_p0, 45, ((NI)0), (NI)(checksumSeparatorIndex_1 - ((NI)1)));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		{
			NimStringV2 T22_;
			if (!!((versionSeparatorIndex_1 == ((NI)-1)))) goto LA20_;
			T22_.len = 0; T22_.p = NIM_NIL;
			T22_ = substr__system_u8654(p_p0, (NI)(versionSeparatorIndex_1 + ((NI)1)), (NI)(checksumSeparatorIndex_1 - ((NI)1)));
			eqsink___system_u2700((&(*Result).Field1), T22_);
		}
		goto LA18_;
LA20_: ;
		{
			versionSeparatorIndex_1 = checksumSeparatorIndex_1;
		}
LA18_: ;
	}
LA12_: ;
	T24_ = dotdot___stdZstrbasics_u49(((NI)0), (NI)(versionSeparatorIndex_1 - ((NI)1)));
	T25_.len = 0; T25_.p = NIM_NIL;
	T25_ = X5BX5D___pureZstrutils_u1286(p_p0, T24_);
	if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u2691(T25_); goto BeforeRet_;}
	eqsink___system_u2700((&(*Result).Field0), T25_);
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isValidVersion__nimblecmd_u174)(NimStringV2 v_p0) {
	NIM_BOOL result;
	{
		if (!(((NI)0) < v_p0.len)) goto LA3_;
		{
			if (!(((NU8)(v_p0.p->data[((NI)0)])) == ((NU8)(35)) || ((NU8)(v_p0.p->data[((NI)0)])) >= ((NU8)(48)) && ((NU8)(v_p0.p->data[((NI)0)])) <= ((NU8)(57)))) goto LA7_;
			result = NIM_TRUE;
		}
		goto LA5_;
LA7_: ;
		{
			result = NIM_FALSE;
		}
LA5_: ;
	}
	goto LA1_;
LA3_: ;
	{
		result = NIM_FALSE;
	}
LA1_: ;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest_p0, source_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, copyMem__system_u1742)(void* dest_p0, void* source_p1, NI size_p2) {
	nimCopyMem(dest_p0, source_p1, size_p2);
}
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1) {
	{
		if (!(((NI)0) < src_p1.len)) goto LA3_;
		copyMem__system_u1742(((void*) ((&(*(*dest_p0).p).data[(*dest_p0).len]))), ((void*) ((&(*src_p1.p).data[((NI)0)]))), (src_p1.len));
		(*dest_p0).len += src_p1.len;
		(*(*dest_p0).p).data[(*dest_p0).len] = 0;
	}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringV2, newVersion__nimblecmd_u137)(NimStringV2 ver_p0) {
	NimStringV2 result;
	NimStringV2 colontmpD_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result.len = 0; result.p = NIM_NIL;
	{
		NIM_BOOL T3_;
		NimStringV2 colontmpD__2;
		NimStringV2 T7_;
		T3_ = (NIM_BOOL)0;
		T3_ = (ver_p0.len == ((NI)0));
		if (T3_) goto LA4_;
		T3_ = (((NU8)(ver_p0.p->data[((NI)0)])) == ((NU8)(0)) || ((NU8)(ver_p0.p->data[((NI)0)])) == ((NU8)(35)) || ((NU8)(ver_p0.p->data[((NI)0)])) >= ((NU8)(48)) && ((NU8)(ver_p0.p->data[((NI)0)])) <= ((NU8)(57)));
LA4_: ;
		if (!!(T3_)) goto LA5_;
		colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
		T7_.len = 0; T7_.p = NIM_NIL;
		T7_ = rawNewString(ver_p0.len + 88);
appendString((&T7_), TM__asNQM9aynXXg9ccUABbReyew_14);
appendString((&T7_), ver_p0);
		colontmpD__2 = T7_;
		failedAssertImpl__stdZassertions_u79(colontmpD__2);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		eqdestroy___system_u2691(colontmpD__2);
	}
LA5_: ;
	colontmpD_ = eqdup___system_u2697(ver_p0);
	result = colontmpD_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isSpecial__nimblecmd_u171)(NimStringV2 ver_p0) {
	NIM_BOOL result;
	NIM_BOOL T1_;
{	T1_ = (NIM_BOOL)0;
	T1_ = (((NI)0) < ver_p0.len);
	if (!(T1_)) goto LA2_;
	T1_ = ((NU8)(ver_p0.p->data[((NI)0)]) == (NU8)(35));
LA2_: ;
	result = T1_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___nimblecmd_u185)(NimStringV2 ver_p0, NimStringV2 ver2_p1) {
	NIM_BOOL result;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ sVer_1;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ sVer2_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NIM_BOOL)0;
	sVer_1.len = 0; sVer_1.p = NIM_NIL;
	sVer2_1.len = 0; sVer2_1.p = NIM_NIL;
	result = NIM_FALSE;
	{
		NIM_BOOL T4_;
		NimStringV2 colontmpD_;
		T4_ = (NIM_BOOL)0;
		T4_ = isSpecial__nimblecmd_u171(ver_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (T4_) goto LA5_;
		T4_ = isSpecial__nimblecmd_u171(ver2_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
LA5_: ;
		if (!T4_) goto LA6_;
		colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
		{
			NIM_BOOL T11_;
			NimStringV2 colontmpD__2;
			T11_ = (NIM_BOOL)0;
			T11_ = isSpecial__nimblecmd_u171(ver2_p1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA8_;
			if (!(T11_)) goto LA12_;
			colontmpD_ = nsuNormalize(ver2_p1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA8_;
			T11_ = eqStrings(colontmpD_, TM__asNQM9aynXXg9ccUABbReyew_16);
LA12_: ;
			if (!T11_) goto LA13_;
			colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
			colontmpD__2 = nsuNormalize(ver_p0);
			if (NIM_UNLIKELY(*nimErr_)) goto LA15_;
			result = !(eqStrings(colontmpD__2, TM__asNQM9aynXXg9ccUABbReyew_17));
			eqdestroy___system_u2691(colontmpD__2);
			eqdestroy___system_u2691(colontmpD_);
			eqdestroy___system_u5509(sVer2_1);
			eqdestroy___system_u5509(sVer_1);
			goto BeforeRet_;
			{
				LA15_:;
			}
			{
				eqdestroy___system_u2691(colontmpD__2);
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA8_;
		}
LA13_: ;
		{
			NIM_BOOL T20_;
			NimStringV2 colontmpD__3;
			T20_ = (NIM_BOOL)0;
			T20_ = isSpecial__nimblecmd_u171(ver2_p1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA8_;
			if (!!(T20_)) goto LA21_;
			colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
			colontmpD__3 = nsuNormalize(ver_p0);
			if (NIM_UNLIKELY(*nimErr_)) goto LA23_;
			result = !(eqStrings(colontmpD__3, TM__asNQM9aynXXg9ccUABbReyew_18));
			eqdestroy___system_u2691(colontmpD__3);
			eqdestroy___system_u2691(colontmpD_);
			eqdestroy___system_u5509(sVer2_1);
			eqdestroy___system_u5509(sVer_1);
			goto BeforeRet_;
			{
				LA23_:;
			}
			{
				eqdestroy___system_u2691(colontmpD__3);
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA8_;
		}
LA21_: ;
		{
			LA8_:;
		}
		{
			eqdestroy___system_u2691(colontmpD_);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA6_: ;
	sVer_1 = nsuSplitChar(ver_p0, 46, ((NI)-1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	sVer2_1 = nsuSplitChar(ver2_p1, 46, ((NI)-1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		NI i_1;
		NI colontmp_;
		NI T29_;
		NI T30_;
		NI i_2;
		i_1 = (NI)0;
		colontmp_ = (NI)0;
		T29_ = sVer_1.len;
		T30_ = sVer2_1.len;
		colontmp_ = ((T29_ >= T30_) ? T29_ : T30_);
		i_2 = ((NI)0);
		{
			while (1) {
				NI sVerI_1;
				NI sVerI2_1;
				if (!(i_2 < colontmp_)) goto LA32;
				i_1 = i_2;
				sVerI_1 = ((NI)0);
				{
					NI T35_;
					NI T38_;
					T35_ = sVer_1.len;
					if (!(i_1 < T35_)) goto LA36_;
					T38_ = (NI)0;
					T38_ = parseInt__pureZparseutils_u981(sVer_1.p->data[i_1], (&sVerI_1), ((NI)0));
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					(void)(T38_);
				}
LA36_: ;
				sVerI2_1 = ((NI)0);
				{
					NI T41_;
					NI T44_;
					T41_ = sVer2_1.len;
					if (!(i_1 < T41_)) goto LA42_;
					T44_ = (NI)0;
					T44_ = parseInt__pureZparseutils_u981(sVer2_1.p->data[i_1], (&sVerI2_1), ((NI)0));
					if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
					(void)(T44_);
				}
LA42_: ;
				{
					if (!(sVerI_1 < sVerI2_1)) goto LA47_;
					result = NIM_TRUE;
					eqdestroy___system_u5509(sVer2_1);
					eqdestroy___system_u5509(sVer_1);
					goto BeforeRet_;
				}
				goto LA45_;
LA47_: ;
				{
					if (!(sVerI_1 == sVerI2_1)) goto LA50_;
				}
				goto LA45_;
LA50_: ;
				{
					result = NIM_FALSE;
					eqdestroy___system_u5509(sVer2_1);
					eqdestroy___system_u5509(sVer_1);
					goto BeforeRet_;
				}
LA45_: ;
				i_2 += ((NI)1);
			} LA32: ;
		}
	}
	{
		LA1_:;
	}
	{
		eqdestroy___system_u5509(sVer2_1);
		eqdestroy___system_u5509(sVer_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, addPackage__nimblecmd_u246)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ* packages_p1, NimStringV2 p_p2, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p3) {
	tyTuple__7q7q3E6Oj24ZNVJb9aonhAg tmpTuple_1;
	NimStringV2 name_1;
	NimStringV2 ver_1;
	NimStringV2 checksum_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)(&tmpTuple_1), sizeof(tyTuple__7q7q3E6Oj24ZNVJb9aonhAg));
	name_1.len = 0; name_1.p = NIM_NIL;
	ver_1.len = 0; ver_1.p = NIM_NIL;
	checksum_1.len = 0; checksum_1.p = NIM_NIL;
	getPathVersionChecksum__nimblecmd_u210(p_p2, (&tmpTuple_1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	name_1 = tmpTuple_1.Field0;
	eqwasMoved___system_u2688((&tmpTuple_1.Field0));
	ver_1 = tmpTuple_1.Field1;
	eqwasMoved___system_u2688((&tmpTuple_1.Field1));
	checksum_1 = tmpTuple_1.Field2;
	eqwasMoved___system_u2688((&tmpTuple_1.Field2));
	{
		NIM_BOOL T4_;
		NimStringV2 version_1;
		tyTuple__UV3llMMYFckfui8YMBuUZA colontmpD_;
		NimStringV2 colontmpD__2;
		T4_ = (NIM_BOOL)0;
		T4_ = isValidVersion__nimblecmd_u174(ver_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		if (!T4_) goto LA5_;
		version_1.len = 0; version_1.p = NIM_NIL;
		nimZeroMem((void*)(&colontmpD_), sizeof(tyTuple__UV3llMMYFckfui8YMBuUZA));
		colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
		version_1 = newVersion__nimblecmd_u137(ver_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
		{
			NIM_BOOL T10_;
			NIM_BOOL T12_;
			T10_ = (NIM_BOOL)0;
			getOrDefault__nimblecmd_u318((*packages_p1), name_1, (&colontmpD_));
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			colontmpD__2 = newVersion__nimblecmd_u137(colontmpD_.Field0);
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			T10_ = lt___nimblecmd_u185(colontmpD__2, version_1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			if (T10_) goto LA11_;
			T12_ = (NIM_BOOL)0;
			T12_ = hasKey__nimblecmd_u798((*packages_p1), name_1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			T10_ = !(T12_);
LA11_: ;
			if (!T10_) goto LA13_;
			{
				NIM_BOOL T17_;
				tyTuple__UV3llMMYFckfui8YMBuUZA T20_;
				NimStringV2 blitTmp_1;
				NimStringV2 blitTmp_2;
				T17_ = (NIM_BOOL)0;
				T17_ = isValidSha1Hash__OOZdistZchecksumsZsrcZchecksumsZsha1_u1007(checksum_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
				if (!T17_) goto LA18_;
				blitTmp_1 = version_1;
				eqwasMoved___system_u2688((&version_1));
				T20_.Field0 = blitTmp_1;
				blitTmp_2 = checksum_1;
				eqwasMoved___system_u2688((&checksum_1));
				T20_.Field1 = blitTmp_2;
				X5BX5Deq___nimblecmd_u847(packages_p1, name_1, (&T20_));
				if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			}
			goto LA15_;
LA18_: ;
			{
				tyTuple__UV3llMMYFckfui8YMBuUZA T22_;
				NimStringV2 blitTmp_3;
				blitTmp_3 = version_1;
				eqwasMoved___system_u2688((&version_1));
				T22_.Field0 = blitTmp_3;
				T22_.Field1 = TM__asNQM9aynXXg9ccUABbReyew_19;
				X5BX5Deq___nimblecmd_u847(packages_p1, name_1, (&T22_));
				if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			}
LA15_: ;
		}
LA13_: ;
		{
			LA7_:;
		}
		{
			eqdestroy___system_u2691(colontmpD__2);
			eqdestroy___stdZprivateZospaths2_u306((&colontmpD_));
			eqdestroy___system_u2691(version_1);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	goto LA2_;
LA5_: ;
	{
		NimStringV2 colontmpD__3;
		NimStringV2 T27_;
		colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
		T27_.len = 0; T27_.p = NIM_NIL;
		T27_ = rawNewString(p_p2.len + 22);
appendString((&T27_), TM__asNQM9aynXXg9ccUABbReyew_21);
appendString((&T27_), p_p2);
		colontmpD__3 = T27_;
		liMessage__msgs_u1227(conf_p0, info_p3, ((tyEnum_TMsgKind__Ug4VJQkHi8g218Fa9bQrePA)17), colontmpD__3, ((tyEnum_TErrorHandling__9aJ2MrE0UrBy3xCw3BT762w)0), (&TM__asNQM9aynXXg9ccUABbReyew_22), NIM_FALSE, NIM_FALSE);
		if (NIM_UNLIKELY(*nimErr_)) goto LA26_;
		{
			LA26_:;
		}
		{
			eqdestroy___system_u2691(colontmpD__3);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA2_: ;
	{
		LA1_:;
	}
	{
		eqdestroy___system_u2691(checksum_1);
		eqdestroy___system_u2691(ver_1);
		eqdestroy___system_u2691(name_1);
		eqdestroy___pureZos_u236((&tmpTuple_1));
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(NIM_BOOL, isFilled__pureZcollectionsZtables_u32)(NI hcode_p0) {
	NIM_BOOL result;
	result = !((hcode_p0 == ((NI)0)));
	return result;
}
static N_INLINE(void, nimAddCharV1)(NimStringV2* s_p0, NIM_CHAR c_p1) {
	prepareAdd(s_p0, ((NI)1));
	(*(*s_p0).p).data[(*s_p0).len] = c_p1;
	(*s_p0).len += ((NI)1);
	(*(*s_p0).p).data[(*s_p0).len] = 0;
}
N_LIB_PRIVATE N_NIMCALL(void, addNimblePath__nimblecmd_u2168)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, NimStringV2 p_p1, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p2) {
	NimStringV2 path_1;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ nimbleLinks_1;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ resultX60gensym40__1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	path_1.len = 0; path_1.p = NIM_NIL;
	nimbleLinks_1.len = 0; nimbleLinks_1.p = NIM_NIL;
	resultX60gensym40__1.len = 0; resultX60gensym40__1.p = NIM_NIL;
	eqcopy___system_u2694((&path_1), p_p1);
	resultX60gensym40__1.len = 0; resultX60gensym40__1.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(0, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
	{
		NimStringV2 xX60gensym40__1;
		NimStringV2 colontmp_;
		glob_t fX60gensym0__1;
		NI resX60gensym0__1;
		int T3_;
		xX60gensym40__1.len = 0; xX60gensym40__1.p = NIM_NIL;
		colontmp_.len = 0; colontmp_.p = NIM_NIL;
		colontmp_ = slash___stdZprivateZospaths2_u91(p_p1, TM__asNQM9aynXXg9ccUABbReyew_25);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		nimZeroMem((void*)(&fX60gensym0__1), sizeof(glob_t));
		resX60gensym0__1 = (NI)0;
		fX60gensym0__1.gl_offs = ((NI)0);
		fX60gensym0__1.gl_pathc = ((NI)0);
		fX60gensym0__1.gl_pathv = ((NCSTRING*) NIM_NIL);
		T3_ = (int)0;
		T3_ = glob(nimToCStringConv(colontmp_), ((int)0), NIM_NIL, (&fX60gensym0__1));
		resX60gensym0__1 = ((NI) (T3_));
		{
			if (!(resX60gensym0__1 == ((NI)0))) goto LA7_;
			{
				NI iX60gensym0__1;
				NI colontmp__2;
				NI res_1;
				iX60gensym0__1 = (NI)0;
				colontmp__2 = (NI)0;
				colontmp__2 = (NI)(fX60gensym0__1.gl_pathc - ((NI)1));
				res_1 = ((NI)0);
				{
					while (1) {
						NimStringV2 pathX60gensym0__1;
						if (!(res_1 <= colontmp__2)) goto LA11;
						pathX60gensym0__1.len = 0; pathX60gensym0__1.p = NIM_NIL;
						iX60gensym0__1 = ((NI) (res_1));
						pathX60gensym0__1 = cstrToNimstr(fX60gensym0__1.gl_pathv[iX60gensym0__1]);
						{
							NimStringV2 blitTmp_1;
							if (!NIM_TRUE) goto LA14_;
							eqsink___system_u2700((&xX60gensym40__1), pathX60gensym0__1);
							eqwasMoved___system_u2688((&pathX60gensym0__1));
							blitTmp_1 = xX60gensym40__1;
							eqwasMoved___system_u2688((&xX60gensym40__1));
							add__stdZenumutils_u71((&resultX60gensym40__1), blitTmp_1);
						}
LA14_: ;
						res_1 += ((NI)1);
						eqdestroy___system_u2691(pathX60gensym0__1);
					} LA11: ;
				}
			}
		}
LA7_: ;
		{
			LA4_:;
		}
		{
			globfree((&fX60gensym0__1));
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		eqdestroy___system_u2691(colontmp_);
		eqdestroy___system_u2691(xX60gensym40__1);
	}
	nimbleLinks_1 = resultX60gensym40__1;
	eqwasMoved___system_u5506((&resultX60gensym40__1));
	{
		NI T20_;
		tySequence__sM4lkSb7zS6F7OVMvW9cffQ nimbleLinkLines_1;
		NimStringV2 colontmpD_;
		T20_ = nimbleLinks_1.len;
		if (!(((NI)0) < T20_)) goto LA21_;
		nimbleLinkLines_1.len = 0; nimbleLinkLines_1.p = NIM_NIL;
		colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
		colontmpD_ = readFile__stdZsyncio_u527(nimbleLinks_1.p->data[((NI)0)]);
		if (NIM_UNLIKELY(*nimErr_)) goto LA23_;
		nimbleLinkLines_1 = nsuSplitLines(colontmpD_, NIM_FALSE);
		if (NIM_UNLIKELY(*nimErr_)) goto LA23_;
		eqsink___system_u2700((&path_1), nimbleLinkLines_1.p->data[((NI)1)]);
		eqwasMoved___system_u2688((&nimbleLinkLines_1.p->data[((NI)1)]));
		{
			NIM_BOOL T26_;
			NimStringV2 T29_;
			T26_ = (NIM_BOOL)0;
			T26_ = nosisAbsolute(path_1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA23_;
			if (!!(T26_)) goto LA27_;
			T29_.len = 0; T29_.p = NIM_NIL;
			T29_ = slash___stdZprivateZospaths2_u91(p_p1, path_1);
			if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___system_u2691(T29_); goto LA23_;}
			eqsink___system_u2700((&path_1), T29_);
		}
LA27_: ;
		{
			LA23_:;
		}
		{
			eqdestroy___system_u2691(colontmpD_);
			eqdestroy___system_u5509(nimbleLinkLines_1);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA21_: ;
	{
		NIM_BOOL T34_;
		NimStringV2 blitTmp_2;
		T34_ = (NIM_BOOL)0;
		T34_ = contains__nimblecmd_u17((((*conf_p0).searchPaths).p) ? ((*conf_p0).searchPaths.p->data) : NIM_NIL, (*conf_p0).searchPaths.len, path_1);
		if (!!(T34_)) goto LA35_;
		liMessage__msgs_u1227(conf_p0, info_p2, ((tyEnum_TMsgKind__Ug4VJQkHi8g218Fa9bQrePA)104), path_1, ((tyEnum_TErrorHandling__9aJ2MrE0UrBy3xCw3BT762w)0), (&TM__asNQM9aynXXg9ccUABbReyew_26), NIM_FALSE, NIM_FALSE);
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		blitTmp_2 = path_1;
		eqwasMoved___system_u2688((&path_1));
		insert__nimblecmd_u51((&(*conf_p0).lazyPaths), blitTmp_2, ((NI)0));
	}
LA35_: ;
	{
		LA1_:;
	}
	{
		eqdestroy___system_u5509(resultX60gensym40__1);
		eqdestroy___system_u5509(nimbleLinks_1);
		eqdestroy___system_u2691(path_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addPathRec__nimblecmd_u2203)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, NimStringV2 dir_p1, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p2) {
	tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ packages_1;
	NI pos_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)(&packages_1), sizeof(tyObject_Table__dvCGcgGns3Ybmlba9cIaZMQ));
	packages_1 = initTable__nimblecmd_u2221(((NI)32));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	pos_1 = (NI)(dir_p1.len - ((NI)1));
	{
		if (!(((NU8)(dir_p1.p->data[pos_1])) == ((NU8)(47)) || ((NU8)(dir_p1.p->data[pos_1])) == ((NU8)(47)))) goto LA4_;
		pos_1 += ((NI)1);
	}
LA4_: ;
	{
		NimStringV2 p_1;
		tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ k_1;
		DIR* d_1;
		p_1.len = 0; p_1.p = NIM_NIL;
		k_1 = (tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ)0;
		d_1 = opendir(nimToCStringConv(dir_p1));
		{
			if (!(d_1 == ((DIR*) NIM_NIL))) goto LA10_;
			{
				NI32 T16_;
				if (!NIM_FALSE) goto LA14_;
				T16_ = (NI32)0;
				T16_ = osLastError__stdZoserrors_u122();
				if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
				raiseOSError__stdZoserrors_u119(T16_, dir_p1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
			}
LA14_: ;
		}
		goto LA8_;
LA10_: ;
		{
			{
				while (1) {
					{
						NimStringV2 y_1;
						struct dirent* x_1;
						y_1.len = 0; y_1.p = NIM_NIL;
						x_1 = readdir(d_1);
						{
							if (!(x_1 == ((struct dirent*) NIM_NIL))) goto LA25_;
							eqdestroy___system_u2691(y_1);
							goto LA19;
						}
LA25_: ;
						y_1 = cstrToNimstr(((NCSTRING) ((*x_1).d_name)));
						{
							NIM_BOOL T29_;
							NimStringV2 path_1;
							struct stat s_1;
							tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ k_2;
							T29_ = (NIM_BOOL)0;
							T29_ = !(eqStrings(y_1, TM__asNQM9aynXXg9ccUABbReyew_3));
							if (!(T29_)) goto LA30_;
							T29_ = !(eqStrings(y_1, TM__asNQM9aynXXg9ccUABbReyew_5));
LA30_: ;
							if (!T29_) goto LA31_;
							path_1.len = 0; path_1.p = NIM_NIL;
							nimZeroMem((void*)(&s_1), sizeof(struct stat));
							path_1 = slash___stdZprivateZospaths2_u91(dir_p1, y_1);
							if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
							{
								if (!NIM_TRUE) goto LA36_;
								eqcopy___system_u2694((&y_1), path_1);
							}
LA36_: ;
							k_2 = ((tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ)0);
							switch ((*x_1).d_type) {
							case ((NI8)4):
							{
								k_2 = ((tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ)2);
							}
							break;
							case ((NI8)10):
							{
								NIM_BOOL isSpecialX60gensym19__1;
								tyTuple__wjbnfGBIEcH6aaevyJWrgw tmpTupleAsgn;
								isSpecialX60gensym19__1 = (NIM_BOOL)0;
								tmpTupleAsgn = getSymlinkFileKind__stdZprivateZoscommon_u20(path_1);
								if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
								k_2 = tmpTupleAsgn.Field0;
								isSpecialX60gensym19__1 = tmpTupleAsgn.Field1;
								{
									NIM_BOOL T42_;
									T42_ = (NIM_BOOL)0;
									T42_ = NIM_FALSE;
									if (!(T42_)) goto LA43_;
									T42_ = isSpecialX60gensym19__1;
LA43_: ;
									if (!T42_) goto LA44_;
									eqdestroy___system_u2691(path_1);
									eqdestroy___system_u2691(y_1);
									goto LA21;
								}
LA44_: ;
							}
							break;
							case ((NI8)0):
							{
								{
									int T49_;
									T49_ = (int)0;
									T49_ = lstat(nimToCStringConv(path_1), (&s_1));
									if (!(T49_ < ((NI32)0))) goto LA50_;
									eqdestroy___system_u2691(path_1);
									eqdestroy___system_u2691(y_1);
									goto LA21;
								}
								goto LA47_;
LA50_: ;
								{
									NIM_BOOL T53_;
									T53_ = (NIM_BOOL)0;
									T53_ = S_ISDIR(s_1.st_mode);
									if (!T53_) goto LA54_;
									k_2 = ((tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ)2);
								}
								goto LA47_;
LA54_: ;
								{
									NIM_BOOL T57_;
									NIM_BOOL isSpecialX60gensym21__1;
									tyTuple__wjbnfGBIEcH6aaevyJWrgw tmpTupleAsgn_2;
									T57_ = (NIM_BOOL)0;
									T57_ = S_ISLNK(s_1.st_mode);
									if (!T57_) goto LA58_;
									isSpecialX60gensym21__1 = (NIM_BOOL)0;
									tmpTupleAsgn_2 = getSymlinkFileKind__stdZprivateZoscommon_u20(path_1);
									if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
									k_2 = tmpTupleAsgn_2.Field0;
									isSpecialX60gensym21__1 = tmpTupleAsgn_2.Field1;
									{
										NIM_BOOL T62_;
										T62_ = (NIM_BOOL)0;
										T62_ = NIM_FALSE;
										if (!(T62_)) goto LA63_;
										T62_ = isSpecialX60gensym21__1;
LA63_: ;
										if (!T62_) goto LA64_;
										eqdestroy___system_u2691(path_1);
										eqdestroy___system_u2691(y_1);
										goto LA21;
									}
LA64_: ;
								}
								goto LA47_;
LA58_: ;
								{
									NIM_BOOL T67_;
									NIM_BOOL T69_;
									T67_ = (NIM_BOOL)0;
									T67_ = NIM_FALSE;
									if (!(T67_)) goto LA68_;
									T69_ = (NIM_BOOL)0;
									T69_ = S_ISREG(s_1.st_mode);
									T67_ = !(T69_);
LA68_: ;
									if (!T67_) goto LA70_;
									eqdestroy___system_u2691(path_1);
									eqdestroy___system_u2691(y_1);
									goto LA21;
								}
								goto LA47_;
LA70_: ;
LA47_: ;
							}
							break;
							default:
							{
								{
									NIM_BOOL T75_;
									T75_ = (NIM_BOOL)0;
									T75_ = NIM_FALSE;
									if (!(T75_)) goto LA76_;
									T75_ = !(((*x_1).d_type == ((NI8)8)));
LA76_: ;
									if (!T75_) goto LA77_;
									eqdestroy___system_u2691(path_1);
									eqdestroy___system_u2691(y_1);
									goto LA21;
								}
								goto LA73_;
LA77_: ;
								{
								}
LA73_: ;
							}
							break;
							}
							k_1 = k_2;
							eqsink___system_u2700((&p_1), y_1);
							eqwasMoved___system_u2688((&y_1));
							{
								NIM_BOOL T82_;
								T82_ = (NIM_BOOL)0;
								T82_ = (k_1 == ((tyEnum_PathComponent__daMOTwam9cW3AQtl6fxq4sQ)2));
								if (!(T82_)) goto LA83_;
								T82_ = !(((NU8)(p_1.p->data[pos_1]) == (NU8)(46)));
LA83_: ;
								if (!T82_) goto LA84_;
								addPackage__nimblecmd_u246(conf_p0, (&packages_1), p_1, info_p2);
								if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
							}
LA84_: ;
							{
								LA33_:;
							}
							{
								eqdestroy___system_u2691(path_1);
							}
							if (NIM_UNLIKELY(*nimErr_)) goto LA22_;
						}
LA31_: ;
						{
							LA22_:;
						}
						{
							eqdestroy___system_u2691(y_1);
						}
						if (NIM_UNLIKELY(*nimErr_)) goto LA18_;
					} LA21: ;
				}
			} LA19: ;
			{
				LA18_:;
			}
			{
				int T92_;
				T92_ = (int)0;
				T92_ = closedir(d_1);
				(void)(T92_);
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
		}
LA8_: ;
		{
			LA7_:;
		}
		{
			eqdestroy___system_u2691(p_1);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
	{
		NimStringV2 p_2;
		p_2.len = 0; p_2.p = NIM_NIL;
		{
			NimStringV2 key_1;
			tyTuple__UV3llMMYFckfui8YMBuUZA val_1;
			NI L_1;
			key_1.len = 0; key_1.p = NIM_NIL;
			nimZeroMem((void*)(&val_1), sizeof(tyTuple__UV3llMMYFckfui8YMBuUZA));
			L_1 = len__nimblecmd_u1912(packages_1);
			if (NIM_UNLIKELY(*nimErr_)) goto LA97_;
			{
				NI h_1;
				NI colontmp_;
				NI T99_;
				NI res_1;
				h_1 = (NI)0;
				colontmp_ = (NI)0;
				T99_ = (packages_1.data.len-1);
				colontmp_ = T99_;
				res_1 = ((NI)0);
				{
					while (1) {
						if (!(res_1 <= colontmp_)) goto LA101;
						h_1 = ((NI) (res_1));
						{
							NIM_BOOL T104_;
							tyTuple__UV3llMMYFckfui8YMBuUZA colontmpD_;
							NimStringV2 res_2;
							T104_ = (NIM_BOOL)0;
							T104_ = isFilled__pureZcollectionsZtables_u32(packages_1.data.p->data[h_1].Field0);
							if (NIM_UNLIKELY(*nimErr_)) goto LA97_;
							if (!T104_) goto LA105_;
							res_2.len = 0; res_2.p = NIM_NIL;
							eqcopy___system_u2694((&key_1), packages_1.data.p->data[h_1].Field1);
							eqdup___stdZprivateZospaths2_u312((&packages_1.data.p->data[h_1].Field2), (&colontmpD_));
							eqsink___stdZprivateZospaths2_u315((&val_1), (&colontmpD_));
							res_2 = key_1;
							eqwasMoved___system_u2688((&key_1));
							{
								if (!!((val_1.Field0.len == ((NI)0)))) goto LA110_;
								nimAddCharV1((&res_2), 45);
								prepareAdd((&res_2), val_1.Field0.len + 0);
appendString((&res_2), val_1.Field0);
							}
LA110_: ;
							{
								if (!!((val_1.Field1.len == ((NI)0)))) goto LA114_;
								nimAddCharV1((&res_2), 45);
								prepareAdd((&res_2), val_1.Field1.len + 0);
appendString((&res_2), val_1.Field1);
							}
LA114_: ;
							p_2 = res_2;
							addNimblePath__nimblecmd_u2168(conf_p0, p_2, info_p2);
							if (NIM_UNLIKELY(*nimErr_)) goto LA107_;
							{
								LA107_:;
							}
							{
								eqdestroy___system_u2691(res_2);
							}
							if (NIM_UNLIKELY(*nimErr_)) goto LA97_;
						}
LA105_: ;
						res_1 += ((NI)1);
					} LA101: ;
				}
			}
			{
				LA97_:;
			}
			{
				eqdestroy___stdZprivateZospaths2_u306((&val_1));
				eqdestroy___system_u2691(key_1);
			}
			if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		}
	}
	{
		LA1_:;
	}
	{
		eqdestroy___nimblecmd_u2150(packages_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(NI, find__nimblecmd_u2261)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ a_p0, NimStringV2 item_p1) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((NI)0);
	{
		NimStringV2* i_1;
		NI i_2;
		NI L_1;
		NI T2_;
		i_1 = (NimStringV2*)0;
		i_2 = ((NI)0);
		T2_ = a_p0.len;
		L_1 = T2_;
		{
			while (1) {
				if (!(i_2 < L_1)) goto LA4;
				i_1 = (&a_p0.p->data[i_2]);
				{
					NIM_BOOL T7_;
					T7_ = (NIM_BOOL)0;
					T7_ = eqeq___options_u3652((*i_1), item_p1);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					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__nimblecmd_u2257)(tyObject_ConfigRefcolonObjectType___S9atckdgEHYT7qfQK9cvzJOg* conf_p0, NimStringV2 path_p1, tyObject_TLineInfo__cGj50BJ9bj3Zx09a9bMvKs8HA info_p2) {
	NimStringV2 colontmpD_;
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	addPathRec__nimblecmd_u2203(conf_p0, path_p1, info_p2);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	addNimblePath__nimblecmd_u2168(conf_p0, path_p1, info_p2);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	i_1 = find__nimblecmd_u2261((*conf_p0).nimblePaths, path_p1);
	{
		if (!!((i_1 == ((NI)-1)))) goto LA3_;
		delete__nimblecmd_u2281((&(*conf_p0).nimblePaths), (i_1));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA3_: ;
	colontmpD_ = eqdup___system_u2697(path_p1);
	insert__nimblecmd_u51((&(*conf_p0).nimblePaths), colontmpD_, ((NI)0));
	}BeforeRet_: ;
}
