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

/* section: NIM_merge_HEADERS */

#include "nimbase.h"
#include <string.h>
#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 tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_TType__v9ae2Dpu13OW2ZJ2U9bNMd9cQ tyObject_TType__v9ae2Dpu13OW2ZJ2U9bNMd9cQ;
typedef struct tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q;
typedef struct tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w;
typedef struct tyObject_TIdent__GufRQq9c0miSybX3zBD4tyA tyObject_TIdent__GufRQq9c0miSybX3zBD4tyA;
typedef struct tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ;
typedef struct tyTuple__7q7q3E6Oj24ZNVJb9aonhAg tyTuple__7q7q3E6Oj24ZNVJb9aonhAg;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
typedef struct tyTuple__kN8up2W6YKc5YA9avn5mV5w tyTuple__kN8up2W6YKc5YA9avn5mV5w;
typedef struct tyObject_TIdObj__iIXPrEsiKHiioLj0HSkQhA tyObject_TIdObj__iIXPrEsiKHiioLj0HSkQhA;
typedef struct tySequence__Ef05srmQTDulnBdXR4Ja6Q tySequence__Ef05srmQTDulnBdXR4Ja6Q;
typedef struct tySequence__DXS6mEo7PVUFJkirsQ9bNQA tySequence__DXS6mEo7PVUFJkirsQ9bNQA;
typedef struct tyObject_TStrTable__f07aOS3dr28kGa5wcE29aFA tyObject_TStrTable__f07aOS3dr28kGa5wcE29aFA;
typedef struct tySequence__DfgJFJEYoj4YBAHLZPl5lQ tySequence__DfgJFJEYoj4YBAHLZPl5lQ;
typedef struct tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA;
typedef struct tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA;
typedef struct tyObject_TLib__NBMxlJ6g3utqUlplqTTHkA tyObject_TLib__NBMxlJ6g3utqUlplqTTHkA;
typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
typedef struct tyObject_TInstantiation__5LqgVn6Tq9ainQRK7TQAQxA tyObject_TInstantiation__5LqgVn6Tq9ainQRK7TQAQxA;

/* 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 NU32 tySet_tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg;
typedef NU8 tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw;
struct tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw {
tyObject_TType__v9ae2Dpu13OW2ZJ2U9bNMd9cQ* typ;
tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info;
tySet_tyEnum_TNodeFlag__jyh9acXHkhZANSSvPIY7ZLg flags;
tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw kind;
union{
struct {NI64 intVal;
} _kind_1;
struct {NF floatVal;
} _kind_2;
struct {NimStringDesc* strVal;
} _kind_3;
struct {tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w* sym;
} _kind_4;
struct {tyObject_TIdent__GufRQq9c0miSybX3zBD4tyA* ident;
} _kind_5;
struct {tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ* sons;
} _kind_6;
};
NimStringDesc* comment;
};
struct tyTuple__7q7q3E6Oj24ZNVJb9aonhAg {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
NI align;
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct RootObj {
TNimType* m_type;
};
struct Exception {
  RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
Exception* up;
};
typedef NU8 tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w;
typedef NU8 tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw;
struct tyTuple__kN8up2W6YKc5YA9avn5mV5w {
NimStringDesc* Field0;
NI Field1;
NI Field2;
};
struct tyObject_TIdObj__iIXPrEsiKHiioLj0HSkQhA {
  RootObj Sup;
NI id;
};
struct tyObject_TIdent__GufRQq9c0miSybX3zBD4tyA {
  tyObject_TIdObj__iIXPrEsiKHiioLj0HSkQhA Sup;
NimStringDesc* s;
tyObject_TIdent__GufRQq9c0miSybX3zBD4tyA* next;
NI h;
};
typedef NU8 tyEnum_TSymKind__cNCW9acsSznmEccl1fgQwkw;
struct tyObject_TStrTable__f07aOS3dr28kGa5wcE29aFA {
NI counter;
tySequence__DfgJFJEYoj4YBAHLZPl5lQ* data;
};
typedef NU16 tyEnum_TMagic__shZhZOdbVC5nnFvcXQAImg;
typedef NU64 tySet_tyEnum_TSymFlag__K9ay6LWMat9bUiT9bIbMxpDHw;
typedef NU32 tySet_tyEnum_TOption__WspMeQySXNP2XoTWR5MTgg;
typedef NU8 tyEnum_TLocKind__O7PRFZKuiBBWbku09cayVBg;
typedef NU8 tyEnum_TStorageLoc__JK9cKMX3XnqHaUky9b6gkGEw;
typedef NU16 tySet_tyEnum_TLocFlag__o2bqJgR4ceIupnUSpxiudA;
struct tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA {
tyEnum_TLocKind__O7PRFZKuiBBWbku09cayVBg k;
tyEnum_TStorageLoc__JK9cKMX3XnqHaUky9b6gkGEw storage;
tySet_tyEnum_TLocFlag__o2bqJgR4ceIupnUSpxiudA flags;
tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* lode;
tyObject_RopeObj__OFzf0kSiPTcNreUIeJgWVA* r;
};
struct tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w {
  tyObject_TIdObj__iIXPrEsiKHiioLj0HSkQhA Sup;
tyEnum_TSymKind__cNCW9acsSznmEccl1fgQwkw kind;
union{
struct {tySequence__Ef05srmQTDulnBdXR4Ja6Q* typeInstCache;
} _kind_1;
struct {tySequence__DXS6mEo7PVUFJkirsQ9bNQA* procInstCache;
tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w* gcUnsafetyReason;
tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* transformedBody;
} _kind_2;
struct {tySequence__DXS6mEo7PVUFJkirsQ9bNQA* usedGenerics;
tyObject_TStrTable__f07aOS3dr28kGa5wcE29aFA tab;
} _kind_3;
struct {tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w* guard;
NI bitsize;
NI alignment;
} _kind_4;
};
tyEnum_TMagic__shZhZOdbVC5nnFvcXQAImg magic;
tyObject_TType__v9ae2Dpu13OW2ZJ2U9bNMd9cQ* typ;
tyObject_TIdent__GufRQq9c0miSybX3zBD4tyA* name;
tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q info;
tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w* owner;
tySet_tyEnum_TSymFlag__K9ay6LWMat9bUiT9bIbMxpDHw flags;
tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* ast;
tySet_tyEnum_TOption__WspMeQySXNP2XoTWR5MTgg options;
NI position;
NI offset;
tyObject_TLoc__EtHNvCB0bgfu9bFjzx9cb6aA loc;
tyObject_TLib__NBMxlJ6g3utqUlplqTTHkA* annex;
tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* constraint;
};
typedef NU16 tySet_tyEnum_TRenderFlag__wrPgUo1ExBlHvFnXN2nSHw;
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
NCSTRING procname;
NI line;
NCSTRING filename;
};

/* section: NIM_merge_SEQ_TYPES */
struct tySequence__ehmV9bTklH2Gt9cXHV9c0HLeQ {
  TGenericSeq Sup;
  tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* data[SEQ_DECL_SIZE];
};
struct tySequence__uB9b75OUPRENsBAu4AnoePA {
  TGenericSeq Sup;
  tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
};
struct tySequence__Ef05srmQTDulnBdXR4Ja6Q {
  TGenericSeq Sup;
  tyObject_TType__v9ae2Dpu13OW2ZJ2U9bNMd9cQ* data[SEQ_DECL_SIZE];
};
struct tySequence__DXS6mEo7PVUFJkirsQ9bNQA {
  TGenericSeq Sup;
  tyObject_TInstantiation__5LqgVn6Tq9ainQRK7TQAQxA* data[SEQ_DECL_SIZE];
};
struct tySequence__DfgJFJEYoj4YBAHLZPl5lQ {
  TGenericSeq Sup;
  tyObject_TSym__JpsEh5i1AcKChGYbg7aV4w* data[SEQ_DECL_SIZE];
};

/* section: NIM_merge_PROC_HEADERS */
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getModuleName__rlFejf61X39bVziQhhH7znQ)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, pathSubs__paMedXIWX6si307wASTsQQ)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* p, NimStringDesc* config);
N_LIB_PRIVATE N_NIMCALL(void, nossplitFile)(NimStringDesc* path, tyTuple__7q7q3E6Oj24ZNVJb9aonhAg* Result);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toFullPath__VW1RaR1l9c9bPnJxr1KuvIrg)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NI32 fileIdx);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass);
static N_INLINE(Exception*, nimBorrowCurrentException)(void);
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);
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(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(void, popCurrentException)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s, NimStringDesc* sub, NimStringDesc* by);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, renderTree__ppjdh9aQ5L0SGPF8yz1gZ9cA)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n, tySet_tyEnum_TRenderFlag__wrPgUo1ExBlHvFnXN2nSHw renderFlags);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, findModule__Y3iZ4DSoNguudlBW9cSwa2A)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* modulename, NimStringDesc* currentModule);
static N_INLINE(NIM_BOOL, isEmpty__kPpSxL0H5sJ9a6ujvdQ0QVQpathutils)(NimStringDesc* x);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___qX5C9b0n9bOP7jk69amC8dA7A)(tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n);
N_LIB_PRIVATE N_NIMCALL(NI32, fileInfoIdx__3HRSVgYDcnQTolSZGx1zjA)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, NimStringDesc* filename);

/* section: NIM_merge_DATA */
extern TNimType NTI__yoNlBGx0D2tRizIdhQuENw_;
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_2, "invalid path: ", 14);
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_4, "/Users/runner/work/nim4py/nim4py/Nim/compiler/modulepaths.nim", 61);
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__GM5IT6miOywfWPAzqo7pmA_3 = {((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_4),
((NI) 116),
((NI) 16)}
;
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_5, " ", 1);
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_6, "using \'.\' instead of \'/\' in import paths is deprecated", 54);
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__GM5IT6miOywfWPAzqo7pmA_7 = {((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_4),
((NI) 147),
((NI) 14)}
;
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_8, ".", 1);
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_9, "/", 1);
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_10, "invalid module name: \'$1\'", 25);
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__GM5IT6miOywfWPAzqo7pmA_11 = {((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_4),
((NI) 152),
((NI) 14)}
;
STRING_LITERAL(TM__GM5IT6miOywfWPAzqo7pmA_12, "cannot open file: ", 18);
static NIM_CONST tyTuple__kN8up2W6YKc5YA9avn5mV5w TM__GM5IT6miOywfWPAzqo7pmA_13 = {((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_4),
((NI) 162),
((NI) 16)}
;

/* section: NIM_merge_VARS */
extern NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
extern Exception* currException__9bVPeDJlYTi9bQApZpfH8wjg;
extern Exception* currException__9bVPeDJlYTi9bQApZpfH8wjg;
extern Exception* currException__9bVPeDJlYTi9bQApZpfH8wjg;

/* section: NIM_merge_PROCS */
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(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (NIM_BOOL*)0;
	result = (&nimInErrorMode__759bT87luu8XGcbkw13FUjA);
	return result;
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
}
static N_INLINE(Exception*, nimBorrowCurrentException)(void) {
	Exception* result;
	result = (Exception*)0;
	result = currException__9bVPeDJlYTi9bQApZpfH8wjg;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest, source, ((size_t) (size)));
}
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) {
	nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	{
		void* T5_;
		void* T6_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (void*)0;
		T5_ = ((void*) ((&(*dest).data[(*dest).Sup.len])));
		T6_ = (void*)0;
		T6_ = ((void*) ((*src).data));
		copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T5_, T6_, ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
		(*dest).Sup.len += (*src).Sup.len;
	}
	LA3_: ;
}
static N_INLINE(void, popCurrentException)(void) {
	currException__9bVPeDJlYTi9bQApZpfH8wjg = (*currException__9bVPeDJlYTi9bQApZpfH8wjg).up;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getModuleName__rlFejf61X39bVziQhhH7znQ)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n) {
	NimStringDesc* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NimStringDesc*)0;
	switch ((*n).kind) {
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 20):
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 21):
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 22):
	{
		tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* T3_;
		NimStringDesc* T4_;
		NimStringDesc* T5_;
		tyTuple__7q7q3E6Oj24ZNVJb9aonhAg T6_;
		NimStringDesc* T7_;
		T3_ = (tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw*)0;
		T3_ = conf;
		T4_ = (NimStringDesc*)0;
		T4_ = (*n)._kind_3.strVal;
		T5_ = (NimStringDesc*)0;
		T5_ = toFullPath__VW1RaR1l9c9bPnJxr1KuvIrg(conf, (*n).info.fileIndex);
		if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
		nimZeroMem((void*)(&T6_), sizeof(tyTuple__7q7q3E6Oj24ZNVJb9aonhAg));
		nossplitFile(T5_, (&T6_));
		if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
		T7_ = (NimStringDesc*)0;
		T7_ = pathSubs__paMedXIWX6si307wASTsQQ(T3_, T4_, T6_.Field0);
		if (NIM_UNLIKELY(*nimErr_)) goto LA2_;
		result = T7_;
		if (NIM_UNLIKELY(*nimErr_)) {
			LA2_:;
			if (isObj(nimBorrowCurrentException()->Sup.m_type, (&NTI__yoNlBGx0D2tRizIdhQuENw_))) {
				tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q T11_;
				NimStringDesc* T12_;
				*nimErr_ = NIM_FALSE;
				T11_ = (*n).info;
				T12_ = (NimStringDesc*)0;
				T12_ = rawNewString(((*n)._kind_3.strVal ? (*n)._kind_3.strVal->Sup.len : 0) + 14);
appendString(T12_, ((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_2));
appendString(T12_, (*n)._kind_3.strVal);
				liMessage__Q6JNH4uRwLyZrj0dJakHew(conf, T11_, ((tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w) 10), T12_, ((tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw) 0), TM__GM5IT6miOywfWPAzqo7pmA_3, NIM_FALSE);
				if (NIM_UNLIKELY(*nimErr_)) goto LA9_;
				result = copyString((*n)._kind_3.strVal);
				popCurrentException();
				LA9_:;
			}
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	break;
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 2):
	{
		result = copyString((*(*n)._kind_5.ident).s);
	}
	break;
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 3):
	{
		result = copyString((*(*(*n)._kind_4.sym).name).s);
	}
	break;
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 29):
	{
		tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n0;
		tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n1;
		NimStringDesc* modname;
		NimStringDesc* T16_;
		NimStringDesc* T17_;
		NimStringDesc* T18_;
		NimStringDesc* T19_;
		n0 = (*n)._kind_6.sons->data[((NI) 0)];
		n1 = (*n)._kind_6.sons->data[((NI) 1)];
		T16_ = (NimStringDesc*)0;
		T16_ = getModuleName__rlFejf61X39bVziQhhH7znQ(conf, (*n)._kind_6.sons->data[((NI) 2)]);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		modname = T16_;
		T17_ = (NimStringDesc*)0;
		T17_ = getModuleName__rlFejf61X39bVziQhhH7znQ(conf, n1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = T17_;
		T18_ = (NimStringDesc*)0;
		T18_ = renderTree__ppjdh9aQ5L0SGPF8yz1gZ9cA(n0, 4);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T19_ = (NimStringDesc*)0;
		T19_ = nsuReplaceStr(T18_, ((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_5), ((NimStringDesc*) NIM_NIL));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = resizeString(result, (T19_ ? T19_->Sup.len : 0) + 0);
appendString(result, T19_);
		result = resizeString(result, (modname ? modname->Sup.len : 0) + 0);
appendString(result, modname);
	}
	break;
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 30):
	{
		NimStringDesc* T21_;
		NimStringDesc* T22_;
		T21_ = (NimStringDesc*)0;
		T21_ = renderTree__ppjdh9aQ5L0SGPF8yz1gZ9cA(n, 4);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T22_ = (NimStringDesc*)0;
		T22_ = nsuReplaceStr(T21_, ((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_5), ((NimStringDesc*) NIM_NIL));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = T22_;
	}
	break;
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 45):
	{
		NimStringDesc* T24_;
		NimStringDesc* T25_;
		liMessage__Q6JNH4uRwLyZrj0dJakHew(conf, (*n).info, ((tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w) 16), ((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_6), ((tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw) 0), TM__GM5IT6miOywfWPAzqo7pmA_7, NIM_FALSE);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T24_ = (NimStringDesc*)0;
		T24_ = renderTree__ppjdh9aQ5L0SGPF8yz1gZ9cA(n, 4);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T25_ = (NimStringDesc*)0;
		T25_ = nsuReplaceStr(T24_, ((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_8), ((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_9));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = T25_;
	}
	break;
	case ((tyEnum_TNodeKind__G4E4Gxe7oI2Cm03rkiOzQw) 78):
	{
		NimStringDesc* T27_;
		T27_ = (NimStringDesc*)0;
		T27_ = getModuleName__rlFejf61X39bVziQhhH7znQ(conf, (*n)._kind_6.sons->data[((NI) 0)]);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = T27_;
	}
	break;
	default:
	{
		tyObject_TLineInfo__WGx4rAexNXnczy1Avn646Q T29_;
		NimStringDesc* T30_;
		NimStringDesc* T31_;
		T29_ = (*n).info;
		T30_ = (NimStringDesc*)0;
		T30_ = renderTree__ppjdh9aQ5L0SGPF8yz1gZ9cA(n, 0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T31_ = (NimStringDesc*)0;
		T31_ = nsuFormatSingleElem(((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_10), T30_);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		liMessage__Q6JNH4uRwLyZrj0dJakHew(conf, T29_, ((tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w) 10), T31_, ((tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw) 0), TM__GM5IT6miOywfWPAzqo7pmA_11, NIM_FALSE);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = ((NimStringDesc*) NIM_NIL);
	}
	break;
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NIM_BOOL, isEmpty__kPpSxL0H5sJ9a6ujvdQ0QVQpathutils)(NimStringDesc* x) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = ((x ? x->Sup.len : 0) == ((NI) 0));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI32, checkModuleName__fDy39b69bb9cFVEyPkMJp3GTg)(tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* conf, tyObject_TNode__bROa11lyF5vxEN9aYNbHmhw* n, NIM_BOOL doLocalError) {
	NI32 result;
	NimStringDesc* modulename;
	NimStringDesc* fullPath;
	tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw* T1_;
	NimStringDesc* T2_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI32)0;
	modulename = getModuleName__rlFejf61X39bVziQhhH7znQ(conf, n);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T1_ = (tyObject_ConfigRefcolonObjectType___LaK09ayL9alwKUad7rts0rTw*)0;
	T1_ = conf;
	T2_ = (NimStringDesc*)0;
	T2_ = toFullPath__VW1RaR1l9c9bPnJxr1KuvIrg(conf, (*n).info.fileIndex);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	fullPath = findModule__Y3iZ4DSoNguudlBW9cSwa2A(T1_, modulename, T2_);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	{
		NIM_BOOL T5_;
		T5_ = (NIM_BOOL)0;
		T5_ = isEmpty__kPpSxL0H5sJ9a6ujvdQ0QVQpathutils(fullPath);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!T5_) goto LA6_;
		{
			NimStringDesc* m;
			NimStringDesc* T17_;
			if (!doLocalError) goto LA10_;
			{
				if (!(((NI) 0) < (modulename ? modulename->Sup.len : 0))) goto LA14_;
				m = modulename;
			}
			goto LA12_;
			LA14_: ;
			{
				m = dollar___qX5C9b0n9bOP7jk69amC8dA7A(n);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			}
			LA12_: ;
			T17_ = (NimStringDesc*)0;
			T17_ = rawNewString((m ? m->Sup.len : 0) + 18);
appendString(T17_, ((NimStringDesc*) &TM__GM5IT6miOywfWPAzqo7pmA_12));
appendString(T17_, m);
			liMessage__Q6JNH4uRwLyZrj0dJakHew(conf, (*n).info, ((tyEnum_TMsgKind__29cbg2fC1z5iM1PAI28kR5w) 10), T17_, ((tyEnum_TErrorHandling__q4fXoCN3Xdcm6SS9cUkWkWw) 0), TM__GM5IT6miOywfWPAzqo7pmA_13, NIM_FALSE);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		LA10_: ;
		result = ((NI32) -1);
	}
	goto LA3_;
	LA6_: ;
	{
		result = fileInfoIdx__3HRSVgYDcnQTolSZGx1zjA(conf, fullPath);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	LA3_: ;
	}BeforeRet_: ;
	return result;
}
