/* Generated by Nim Compiler v0.20.0 */
/*   (c) 2019 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32

#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
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ;
typedef struct tySequence_i7xpiUsxyv6cQ1xK3JbcGQ tySequence_i7xpiUsxyv6cQ1xK3JbcGQ;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct NimStringDesc NimStringDesc;
typedef struct tySequence_sM4lkSb7zS6F7OVMvW9cffQ tySequence_sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence_76wc9cnTOK9c6epudv8uYE0w tySequence_76wc9cnTOK9c6epudv8uYE0w;
typedef struct tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q;
typedef struct tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw;
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 tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg;
typedef struct tySequence_5PunAJrNQYcB8dF0jau3pQ tySequence_5PunAJrNQYcB8dF0jau3pQ;
typedef struct {
N_NIMCALL_PTR(NI, ClP_0) (tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ* x, tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ* y, void* ClE_0);
void* ClE_0;
} tyProc_oUBe9cr5fvX49bNNuH9bVbmnw;
typedef NU8 tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA;
struct TGenericSeq {
NI len;
NI reserved;
};
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;
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;
};
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_8) (tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ* x, tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ* y);
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 tyEnum_IdeCmd_1Ced39bl5eePmZ1PKMPXigQ;
typedef NU8 tyEnum_PrefixMatch_Dkww2nY9cxJVLF9cfoQS5U6Q;
struct tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ {
tyEnum_IdeCmd_1Ced39bl5eePmZ1PKMPXigQ section;
tySequence_sM4lkSb7zS6F7OVMvW9cffQ* qualifiedPath;
NimStringDesc** name;
NimStringDesc* filePath;
NI line;
NI column;
NimStringDesc* doc;
NimStringDesc* forth;
NI quality;
NIM_BOOL isGlobal;
NIM_BOOL contextFits;
tyEnum_PrefixMatch_Dkww2nY9cxJVLF9cfoQS5U6Q prefix;
NU8 symkind;
NI scope;
NI localUsages;
NI globalUsages;
NI tokenLen;
NI version;
};
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_12) (tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ* x, tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ* y);
typedef struct {
N_NIMCALL_PTR(NI, ClP_0) (tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q* x, tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q* y, void* ClE_0);
void* ClE_0;
} tyProc_BX9cYxd9cF2mTlqoQZOdSHDA;
struct tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q {
tyObject_TNode_bROa11lyF5vxEN9aYNbHmhw* pnode;
NI id;
NI idx;
NI lowLink;
NIM_BOOL onStack;
tySequence_76wc9cnTOK9c6epudv8uYE0w* kids;
NI hAQ;
NI hIS;
NI hB;
NI hCmd;
};
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_SiRwrEKZdLgxqz9a9aoVBglg[512];
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_SiRwrEKZdLgxqz9a9aoVBglg 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;
};
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_29) (tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q* x, tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q* y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_32) (tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q* x, tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q* y);
typedef struct {
N_NIMCALL_PTR(NI, ClP_0) (NimStringDesc* x, NimStringDesc* y, void* ClE_0);
void* ClE_0;
} tyProc_kTj9c3SX9agxDQPZYwemi6ug;
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_44) (NimStringDesc* x, NimStringDesc* y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_46) (NimStringDesc* x, NimStringDesc* y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_47) (NimStringDesc* x, NimStringDesc* y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_49) (NimStringDesc* x, NimStringDesc* y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_51) (NimStringDesc* x, NimStringDesc* y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_52) (NimStringDesc* x, NimStringDesc* y, void* ClE_0);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_57) (NimStringDesc* x, NimStringDesc* y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_60) (NimStringDesc* x, NimStringDesc* y);
typedef struct {
N_NIMCALL_PTR(NI, ClP_0) (tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg x, tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg y, void* ClE_0);
void* ClE_0;
} tyProc_zzrK9cTwi9admDvOCMDMSIXQ;
struct tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg {
NimStringDesc* keyword;
NimStringDesc* link;
NimStringDesc* linkTitle;
NimStringDesc* linkDesc;
};
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_76) (tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg x, tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg y);
typedef N_CLOSURE_PTR(NI, TM_JdC9c6SaUkvO1XjYuWP1JWQ_79) (tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg x, tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg y);
struct tySequence_i7xpiUsxyv6cQ1xK3JbcGQ {
  TGenericSeq Sup;
  tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ* data[SEQ_DECL_SIZE];
};
struct tySequence_76wc9cnTOK9c6epudv8uYE0w {
  TGenericSeq Sup;
  tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q* data[SEQ_DECL_SIZE];
};
struct tySequence_sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct tySequence_5PunAJrNQYcB8dF0jau3pQ {
  TGenericSeq Sup;
  tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg data[SEQ_DECL_SIZE];
};
static N_INLINE(NI, divInt)(NI a, NI b);
N_NOINLINE(void, raiseDivByZero)(void);
N_NOINLINE(void, raiseOverflow)(void);
static N_INLINE(NI, chckRange)(NI i, NI a, NI b);
N_NOINLINE(void, raiseRangeError)(NI64 val);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
static N_INLINE(NI, subInt)(NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(void, merge_6r30o9btqT1LYFtPsj530vg)(tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ** a, NI aLen_0, tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ** b, NI bLen_0, NI lo, NI m, NI hi, tyProc_oUBe9cr5fvX49bNNuH9bVbmnw cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order);
static N_INLINE(NI, star__kgZDSIMT2vrZak9bMmeL40walgorithm)(NI x, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order);
N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
static N_INLINE(NI, addInt)(NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl_W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(NI, mulInt)(NI a, NI b);
N_LIB_PRIVATE N_NIMCALL(tySequence_76wc9cnTOK9c6epudv8uYE0w*, newSeq_HX0fzMkXaVGbpAg39bd9bk9ag)(NI len);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef_AT1eRuflKWyTTBdLjEDZbg_3system)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell_QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr);
static N_INLINE(void, decRef_AT1eRuflKWyTTBdLjEDZbgsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
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);
N_LIB_PRIVATE N_NIMCALL(void, sort_Vxb3by8QIdxiQga2mKXTcg)(tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q** a, NI aLen_0, tyProc_BX9cYxd9cF2mTlqoQZOdSHDA cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order);
N_LIB_PRIVATE N_NIMCALL(void, merge_iemomhlJ9bCvkwJyjR9c2ZWg)(tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q** a, NI aLen_0, tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q** b, NI bLen_0, NI lo, NI m, NI hi, tyProc_BX9cYxd9cF2mTlqoQZOdSHDA cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order);
N_LIB_PRIVATE N_NIMCALL(NI, binarySearch_mXuSYz7TnkvkJ0CgoqjIDA)(NimStringDesc** a, NI aLen_0, NimStringDesc* key, tyProc_kTj9c3SX9agxDQPZYwemi6ug cmp);
N_LIB_PRIVATE N_NIMCALL(NI, cmp_NAicU5bAGXmkx2NJujGi7g_2)(NimStringDesc* x, NimStringDesc* y);
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem_JE6t4x7Z3v2iVz27Nx0MRAmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(void, merge_VVQbaBxW408lyw1OOwyNdQ)(NimStringDesc** a, NI aLen_0, NimStringDesc** b, NI bLen_0, NI lo, NI m, NI hi, tyProc_kTj9c3SX9agxDQPZYwemi6ug cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order);
N_LIB_PRIVATE N_NIMCALL(void, merge_8uGPISzqbd9ax9aI8lxSAOQA)(tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg* a, NI aLen_0, tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg* b, NI bLen_0, NI lo, NI m, NI hi, tyProc_zzrK9cTwi9admDvOCMDMSIXQ cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order);
extern TNimType NTI_i7xpiUsxyv6cQ1xK3JbcGQ_;
extern tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ gch_IcYaEuuWivYAS86vFMTS3Q;
extern TNimType NTI_76wc9cnTOK9c6epudv8uYE0w_;
extern TNimType NTI_sM4lkSb7zS6F7OVMvW9cffQ_;
extern TNimType NTI_5PunAJrNQYcB8dF0jau3pQ_;
STRING_LITERAL(TM_JdC9c6SaUkvO1XjYuWP1JWQ_9, "/Users/travis/build/nim-lang/nightlies/nim/e7471cebae2a404f3e42"
"39f199f5a0c422484aac/lib/pure/algorithm.nim(342, 10) `j <= m` ", 125);

static N_INLINE(NI, divInt)(NI a, NI b) {
	NI result;
{	result = (NI)0;
	{
		if (!(b == ((NI) 0))) goto LA3_;
		raiseDivByZero();
	}
	LA3_: ;
	{
		NIM_BOOL T7_;
		T7_ = (NIM_BOOL)0;
		T7_ = (a == ((NI) (-2147483647 -1)));
		if (!(T7_)) goto LA8_;
		T7_ = (b == ((NI) -1));
		LA8_: ;
		if (!T7_) goto LA9_;
		raiseOverflow();
	}
	LA9_: ;
	result = (NI)(a / b);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}

static N_INLINE(NI, chckRange)(NI i, NI a, NI b) {
	NI result;
{	result = (NI)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (a <= i);
		if (!(T3_)) goto LA4_;
		T3_ = (i <= b);
		LA4_: ;
		if (!T3_) goto LA5_;
		result = i;
		goto BeforeRet_;
	}
	goto LA1_;
	LA5_: ;
	{
		raiseRangeError(((NI64) (i)));
	}
	LA1_: ;
	}BeforeRet_: ;
	return result;
}

static N_INLINE(NI, subInt)(NI a, NI b) {
	NI result;
{	result = (NI)0;
	result = (NI)((NU32)(a) - (NU32)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI) 0) <= (NI)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (((NI) 0) <= (NI)(result ^ (NI)((NU32) ~(b))));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}

static N_INLINE(NI, star__kgZDSIMT2vrZak9bMmeL40walgorithm)(NI x, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI result;
	NI y;
	NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_5;
	NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_6;
	result = (NI)0;
	TM_JdC9c6SaUkvO1XjYuWP1JWQ_5 = subInt(order, ((NI) 1));
	y = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_5);
	TM_JdC9c6SaUkvO1XjYuWP1JWQ_6 = subInt((NI)(x ^ y), y);
	result = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_6);
	return result;
}

static N_INLINE(NI, addInt)(NI a, NI b) {
	NI result;
{	result = (NI)0;
	result = (NI)((NU32)(a) + (NU32)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI) 0) <= (NI)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (((NI) 0) <= (NI)(result ^ b));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}

N_LIB_PRIVATE N_NIMCALL(void, merge_6r30o9btqT1LYFtPsj530vg)(tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ** a, NI aLen_0, tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ** b, NI bLen_0, NI lo, NI m, NI hi, tyProc_oUBe9cr5fvX49bNNuH9bVbmnw cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI j;
	NI bb;
	NI i;
	NI k;
{	{
		NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_7;
		NI T3_;
		NI T4_;
		if ((NU)(m) >= (NU)(aLen_0)) raiseIndexError2(m,aLen_0-1);
		TM_JdC9c6SaUkvO1XjYuWP1JWQ_7 = addInt(m, ((NI) 1));
		if ((NU)((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_7)) >= (NU)(aLen_0)) raiseIndexError2((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_7),aLen_0-1);
		T3_ = (NI)0;
		T3_ = cmp.ClE_0? cmp.ClP_0(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_7)], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_8)(cmp.ClP_0))(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_7)]);
		T4_ = (NI)0;
		T4_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T3_, order);
		if (!(T4_ <= ((NI) 0))) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	j = lo;
	{
		if (!!((j <= m))) goto LA9_;
		failedAssertImpl_W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM_JdC9c6SaUkvO1XjYuWP1JWQ_9));
	}
	LA9_: ;
	bb = ((NI) 0);
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_10;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_11;
			if (!(j <= m)) goto LA12;
			if ((NU)(bb) >= (NU)(bLen_0)) raiseIndexError2(bb,bLen_0-1);
			if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
			unsureAsgnRef((void**) (&b[bb]), a[j]);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_10 = addInt(bb, ((NI) 1));
			bb = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_10);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_11 = addInt(j, ((NI) 1));
			j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_11);
		} LA12: ;
	}
	i = ((NI) 0);
	k = lo;
	{
		while (1) {
			NIM_BOOL T15_;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_15;
			T15_ = (NIM_BOOL)0;
			T15_ = (k < j);
			if (!(T15_)) goto LA16_;
			T15_ = (j <= hi);
			LA16_: ;
			if (!T15_) goto LA14;
			{
				NI T19_;
				NI T20_;
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_13;
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				T19_ = (NI)0;
				T19_ = cmp.ClE_0? cmp.ClP_0(b[i], a[j], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_12)(cmp.ClP_0))(b[i], a[j]);
				T20_ = (NI)0;
				T20_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T19_, order);
				if (!(T20_ <= ((NI) 0))) goto LA21_;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				unsureAsgnRef((void**) (&a[k]), b[i]);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_13 = addInt(i, ((NI) 1));
				i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_13);
			}
			goto LA17_;
			LA21_: ;
			{
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_14;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				unsureAsgnRef((void**) (&a[k]), a[j]);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_14 = addInt(j, ((NI) 1));
				j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_14);
			}
			LA17_: ;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_15 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_15);
		} LA14: ;
	}
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_16;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_17;
			if (!(k < j)) goto LA25;
			if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
			if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
			unsureAsgnRef((void**) (&a[k]), b[i]);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_16 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_16);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_17 = addInt(i, ((NI) 1));
			i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_17);
		} LA25: ;
	}
	}BeforeRet_: ;
}

N_LIB_PRIVATE N_NIMCALL(void, sort_kf6UDq4IFBhg8XC5ISz8gQ)(tyObject_SuggestcolonObjectType__bkMuTTb2G70XfpzAiyNrnQ** a, NI aLen_0, tyProc_oUBe9cr5fvX49bNNuH9bVbmnw cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI n;
	tySequence_i7xpiUsxyv6cQ1xK3JbcGQ* b;
	NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_2;
	NI s;
	n = aLen_0;
	b = (tySequence_i7xpiUsxyv6cQ1xK3JbcGQ*)0;
	TM_JdC9c6SaUkvO1XjYuWP1JWQ_2 = divInt(n, ((NI) 2));
	b = (tySequence_i7xpiUsxyv6cQ1xK3JbcGQ*) newSeq((&NTI_i7xpiUsxyv6cQ1xK3JbcGQ_), ((NI)chckRange((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_2), ((NI) 0), ((NI) 2147483647))));
	s = ((NI) 1);
	{
		while (1) {
			NI m;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_3;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_4;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_23;
			if (!(s < n)) goto LA2;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_3 = subInt(n, ((NI) 1));
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_4 = subInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_3), s);
			m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_4);
			{
				while (1) {
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_18;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_19;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_20;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_21;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_22;
					if (!(((NI) 0) <= m)) goto LA4;
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_18 = subInt(m, s);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_19 = addInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_18), ((NI) 1));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_20 = addInt(m, s);
					merge_6r30o9btqT1LYFtPsj530vg(a, aLen_0, b->data, (b ? b->Sup.len : 0), (((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_19) >= ((NI) 0)) ? (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_19) : ((NI) 0)), m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_20), cmp, order);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_21 = mulInt(s, ((NI) 2));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_22 = subInt(m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_21));
					m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_22);
				} LA4: ;
			}
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_23 = mulInt(s, ((NI) 2));
			s = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_23);
		} LA2: ;
	}
}

static N_INLINE(void, incRef_AT1eRuflKWyTTBdLjEDZbg_3system)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
}

static N_INLINE(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell_QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr) {
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* result;
	result = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
	result = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*) ((NI)((NU32)(((NI) (ptrdiff_t) (usr))) - (NU32)(((NI) 8)))));
	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 = (NI)((NU32)((*c).refcount) - (NU32)(((NI) 8)));
	{
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3_;
		rtlAddZCT_AT1eRuflKWyTTBdLjEDZbg_2system(c);
	}
	LA3_: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* T5_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T5_ = usrToCell_QFQqcLB3lgOdwipkv9a60xwsystem(src);
		incRef_AT1eRuflKWyTTBdLjEDZbg_3system(T5_);
	}
	LA3_: ;
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* T10_;
		if (!!(((*dest) == NIM_NIL))) goto LA8_;
		T10_ = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T10_ = usrToCell_QFQqcLB3lgOdwipkv9a60xwsystem((*dest));
		decRef_AT1eRuflKWyTTBdLjEDZbgsystem(T10_);
	}
	LA8_: ;
	(*dest) = src;
}

N_LIB_PRIVATE N_NIMCALL(void, merge_iemomhlJ9bCvkwJyjR9c2ZWg)(tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q** a, NI aLen_0, tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q** b, NI bLen_0, NI lo, NI m, NI hi, tyProc_BX9cYxd9cF2mTlqoQZOdSHDA cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI j;
	NI bb;
	NI i;
	NI k;
{	{
		NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_28;
		NI T3_;
		NI T4_;
		if ((NU)(m) >= (NU)(aLen_0)) raiseIndexError2(m,aLen_0-1);
		TM_JdC9c6SaUkvO1XjYuWP1JWQ_28 = addInt(m, ((NI) 1));
		if ((NU)((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_28)) >= (NU)(aLen_0)) raiseIndexError2((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_28),aLen_0-1);
		T3_ = (NI)0;
		T3_ = cmp.ClE_0? cmp.ClP_0(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_28)], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_29)(cmp.ClP_0))(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_28)]);
		T4_ = (NI)0;
		T4_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T3_, order);
		if (!(T4_ <= ((NI) 0))) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	j = lo;
	{
		if (!!((j <= m))) goto LA9_;
		failedAssertImpl_W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM_JdC9c6SaUkvO1XjYuWP1JWQ_9));
	}
	LA9_: ;
	bb = ((NI) 0);
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_30;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_31;
			if (!(j <= m)) goto LA12;
			if ((NU)(bb) >= (NU)(bLen_0)) raiseIndexError2(bb,bLen_0-1);
			if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
			unsureAsgnRef((void**) (&b[bb]), a[j]);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_30 = addInt(bb, ((NI) 1));
			bb = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_30);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_31 = addInt(j, ((NI) 1));
			j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_31);
		} LA12: ;
	}
	i = ((NI) 0);
	k = lo;
	{
		while (1) {
			NIM_BOOL T15_;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_35;
			T15_ = (NIM_BOOL)0;
			T15_ = (k < j);
			if (!(T15_)) goto LA16_;
			T15_ = (j <= hi);
			LA16_: ;
			if (!T15_) goto LA14;
			{
				NI T19_;
				NI T20_;
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_33;
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				T19_ = (NI)0;
				T19_ = cmp.ClE_0? cmp.ClP_0(b[i], a[j], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_32)(cmp.ClP_0))(b[i], a[j]);
				T20_ = (NI)0;
				T20_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T19_, order);
				if (!(T20_ <= ((NI) 0))) goto LA21_;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				unsureAsgnRef((void**) (&a[k]), b[i]);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_33 = addInt(i, ((NI) 1));
				i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_33);
			}
			goto LA17_;
			LA21_: ;
			{
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_34;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				unsureAsgnRef((void**) (&a[k]), a[j]);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_34 = addInt(j, ((NI) 1));
				j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_34);
			}
			LA17_: ;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_35 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_35);
		} LA14: ;
	}
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_36;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_37;
			if (!(k < j)) goto LA25;
			if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
			if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
			unsureAsgnRef((void**) (&a[k]), b[i]);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_36 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_36);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_37 = addInt(i, ((NI) 1));
			i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_37);
		} LA25: ;
	}
	}BeforeRet_: ;
}

N_LIB_PRIVATE N_NIMCALL(void, sort_Vxb3by8QIdxiQga2mKXTcg)(tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q** a, NI aLen_0, tyProc_BX9cYxd9cF2mTlqoQZOdSHDA cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI n;
	tySequence_76wc9cnTOK9c6epudv8uYE0w* b;
	NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_25;
	NI s;
	n = aLen_0;
	b = (tySequence_76wc9cnTOK9c6epudv8uYE0w*)0;
	TM_JdC9c6SaUkvO1XjYuWP1JWQ_25 = divInt(n, ((NI) 2));
	b = (tySequence_76wc9cnTOK9c6epudv8uYE0w*) newSeq((&NTI_76wc9cnTOK9c6epudv8uYE0w_), ((NI)chckRange((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_25), ((NI) 0), ((NI) 2147483647))));
	s = ((NI) 1);
	{
		while (1) {
			NI m;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_26;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_27;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_43;
			if (!(s < n)) goto LA2;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_26 = subInt(n, ((NI) 1));
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_27 = subInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_26), s);
			m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_27);
			{
				while (1) {
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_38;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_39;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_40;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_41;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_42;
					if (!(((NI) 0) <= m)) goto LA4;
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_38 = subInt(m, s);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_39 = addInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_38), ((NI) 1));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_40 = addInt(m, s);
					merge_iemomhlJ9bCvkwJyjR9c2ZWg(a, aLen_0, b->data, (b ? b->Sup.len : 0), (((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_39) >= ((NI) 0)) ? (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_39) : ((NI) 0)), m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_40), cmp, order);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_41 = mulInt(s, ((NI) 2));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_42 = subInt(m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_41));
					m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_42);
				} LA4: ;
			}
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_43 = mulInt(s, ((NI) 2));
			s = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_43);
		} LA2: ;
	}
}

N_LIB_PRIVATE N_NIMCALL(tySequence_76wc9cnTOK9c6epudv8uYE0w*, sorted_1d6z7mFg8pfnJxr2lUHibg)(tyObject_DepNcolonObjectType__eVONEEaK4II8kv8La51d2Q** a, NI aLen_0, tyProc_BX9cYxd9cF2mTlqoQZOdSHDA cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	tySequence_76wc9cnTOK9c6epudv8uYE0w* result;
	result = (tySequence_76wc9cnTOK9c6epudv8uYE0w*)0;
	result = newSeq_HX0fzMkXaVGbpAg39bd9bk9ag(((NI)chckRange(aLen_0, ((NI) 0), ((NI) 2147483647))));
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (aLen_0-1);
		res = ((NI) 0);
		{
			while (1) {
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_24;
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				if ((NU)(i) >= (NU)(result ? result->Sup.len : 0)) raiseIndexError2(i,(result ? result->Sup.len : 0)-1);
				if ((NU)(i) >= (NU)(aLen_0)) raiseIndexError2(i,aLen_0-1);
				asgnRef((void**) (&result->data[i]), a[i]);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_24 = addInt(res, ((NI) 1));
				res = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_24);
			} LA3: ;
		}
	}
	sort_Vxb3by8QIdxiQga2mKXTcg(result->data, (result ? result->Sup.len : 0), cmp, order);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(NI, binarySearch_mXuSYz7TnkvkJ0CgoqjIDA)(NimStringDesc** a, NI aLen_0, NimStringDesc* key, tyProc_kTj9c3SX9agxDQPZYwemi6ug cmp) {
	NI result;
	NI len;
{	result = (NI)0;
	{
		if (!(aLen_0 == ((NI) 0))) goto LA3_;
		result = ((NI) -1);
		goto BeforeRet_;
	}
	LA3_: ;
	len = aLen_0;
	{
		if (!(len == ((NI) 1))) goto LA7_;
		{
			NI T11_;
			if ((NU)(((NI) 0)) >= (NU)(aLen_0)) raiseIndexError2(((NI) 0),aLen_0-1);
			T11_ = (NI)0;
			T11_ = cmp.ClE_0? cmp.ClP_0(a[((NI) 0)], key, cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_44)(cmp.ClP_0))(a[((NI) 0)], key);
			if (!(T11_ == ((NI) 0))) goto LA12_;
			result = ((NI) 0);
			goto BeforeRet_;
		}
		goto LA9_;
		LA12_: ;
		{
			result = ((NI) -1);
			goto BeforeRet_;
		}
		LA9_: ;
	}
	LA7_: ;
	{
		NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_45;
		NI step;
		NI cmpRes;
		TM_JdC9c6SaUkvO1XjYuWP1JWQ_45 = subInt(len, ((NI) 1));
		if (!((NI)(len & (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_45)) == ((NI) 0))) goto LA17_;
		step = (NI)((NI32)(len) >> (NU32)(((NI) 1)));
		cmpRes = (NI)0;
		{
			while (1) {
				NI i;
				if (!(((NI) 0) < step)) goto LA20;
				i = (NI)(result | step);
				if ((NU)(i) >= (NU)(aLen_0)) raiseIndexError2(i,aLen_0-1);
				cmpRes = cmp.ClE_0? cmp.ClP_0(a[i], key, cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_46)(cmp.ClP_0))(a[i], key);
				{
					if (!(cmpRes == ((NI) 0))) goto LA23_;
					result = i;
					goto BeforeRet_;
				}
				LA23_: ;
				{
					if (!(cmpRes < ((NI) 1))) goto LA27_;
					result = i;
				}
				LA27_: ;
				step = (NI)((NI32)(step) >> (NU32)(((NI) 1)));
			} LA20: ;
		}
		{
			NI T31_;
			if ((NU)(result) >= (NU)(aLen_0)) raiseIndexError2(result,aLen_0-1);
			T31_ = (NI)0;
			T31_ = cmp.ClE_0? cmp.ClP_0(a[result], key, cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_47)(cmp.ClP_0))(a[result], key);
			if (!!((T31_ == ((NI) 0)))) goto LA32_;
			result = ((NI) -1);
		}
		LA32_: ;
	}
	goto LA15_;
	LA17_: ;
	{
		NI b;
		NI cmpRes_2;
		b = len;
		cmpRes_2 = (NI)0;
		{
			while (1) {
				NI mid;
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_48;
				if (!(result < b)) goto LA36;
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_48 = addInt(result, b);
				mid = (NI)((NI32)((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_48)) >> (NU32)(((NI) 1)));
				if ((NU)(mid) >= (NU)(aLen_0)) raiseIndexError2(mid,aLen_0-1);
				cmpRes_2 = cmp.ClE_0? cmp.ClP_0(a[mid], key, cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_49)(cmp.ClP_0))(a[mid], key);
				{
					if (!(cmpRes_2 == ((NI) 0))) goto LA39_;
					result = mid;
					goto BeforeRet_;
				}
				LA39_: ;
				{
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_50;
					if (!(cmpRes_2 < ((NI) 0))) goto LA43_;
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_50 = addInt(mid, ((NI) 1));
					result = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_50);
				}
				goto LA41_;
				LA43_: ;
				{
					b = mid;
				}
				LA41_: ;
			} LA36: ;
		}
		{
			NIM_BOOL T48_;
			NI T50_;
			T48_ = (NIM_BOOL)0;
			T48_ = (len <= result);
			if (T48_) goto LA49_;
			if ((NU)(result) >= (NU)(aLen_0)) raiseIndexError2(result,aLen_0-1);
			T50_ = (NI)0;
			T50_ = cmp.ClE_0? cmp.ClP_0(a[result], key, cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_51)(cmp.ClP_0))(a[result], key);
			T48_ = !((T50_ == ((NI) 0)));
			LA49_: ;
			if (!T48_) goto LA51_;
			result = ((NI) -1);
		}
		LA51_: ;
	}
	LA15_: ;
	}BeforeRet_: ;
	return result;
}

static N_INLINE(void, nimSetMem_JE6t4x7Z3v2iVz27Nx0MRAmemory)(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_JE6t4x7Z3v2iVz27Nx0MRAmemory(p, ((int) 0), size);
}

N_LIB_PRIVATE N_NIMCALL(NI, binarySearch_wa1aY9bsuTdXtbdvM9apunWQ)(NimStringDesc** a, NI aLen_0, NimStringDesc* key) {
	NI result;
	tyProc_kTj9c3SX9agxDQPZYwemi6ug T1_;
	result = (NI)0;
	nimZeroMem((void*)(&T1_), sizeof(tyProc_kTj9c3SX9agxDQPZYwemi6ug));
	T1_.ClP_0 = ((TM_JdC9c6SaUkvO1XjYuWP1JWQ_52) (cmp_NAicU5bAGXmkx2NJujGi7g_2)); T1_.ClE_0 = NIM_NIL;
	result = binarySearch_mXuSYz7TnkvkJ0CgoqjIDA(a, aLen_0, key, T1_);
	return result;
}

N_LIB_PRIVATE N_NIMCALL(void, merge_VVQbaBxW408lyw1OOwyNdQ)(NimStringDesc** a, NI aLen_0, NimStringDesc** b, NI bLen_0, NI lo, NI m, NI hi, tyProc_kTj9c3SX9agxDQPZYwemi6ug cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI j;
	NI bb;
	NI i;
	NI k;
{	{
		NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_56;
		NI T3_;
		NI T4_;
		if ((NU)(m) >= (NU)(aLen_0)) raiseIndexError2(m,aLen_0-1);
		TM_JdC9c6SaUkvO1XjYuWP1JWQ_56 = addInt(m, ((NI) 1));
		if ((NU)((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_56)) >= (NU)(aLen_0)) raiseIndexError2((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_56),aLen_0-1);
		T3_ = (NI)0;
		T3_ = cmp.ClE_0? cmp.ClP_0(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_56)], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_57)(cmp.ClP_0))(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_56)]);
		T4_ = (NI)0;
		T4_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T3_, order);
		if (!(T4_ <= ((NI) 0))) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	j = lo;
	{
		if (!!((j <= m))) goto LA9_;
		failedAssertImpl_W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM_JdC9c6SaUkvO1XjYuWP1JWQ_9));
	}
	LA9_: ;
	bb = ((NI) 0);
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_58;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_59;
			if (!(j <= m)) goto LA12;
			if ((NU)(bb) >= (NU)(bLen_0)) raiseIndexError2(bb,bLen_0-1);
			if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
			unsureAsgnRef((void**) (&b[bb]), a[j]);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_58 = addInt(bb, ((NI) 1));
			bb = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_58);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_59 = addInt(j, ((NI) 1));
			j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_59);
		} LA12: ;
	}
	i = ((NI) 0);
	k = lo;
	{
		while (1) {
			NIM_BOOL T15_;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_63;
			T15_ = (NIM_BOOL)0;
			T15_ = (k < j);
			if (!(T15_)) goto LA16_;
			T15_ = (j <= hi);
			LA16_: ;
			if (!T15_) goto LA14;
			{
				NI T19_;
				NI T20_;
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_61;
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				T19_ = (NI)0;
				T19_ = cmp.ClE_0? cmp.ClP_0(b[i], a[j], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_60)(cmp.ClP_0))(b[i], a[j]);
				T20_ = (NI)0;
				T20_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T19_, order);
				if (!(T20_ <= ((NI) 0))) goto LA21_;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				unsureAsgnRef((void**) (&a[k]), b[i]);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_61 = addInt(i, ((NI) 1));
				i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_61);
			}
			goto LA17_;
			LA21_: ;
			{
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_62;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				unsureAsgnRef((void**) (&a[k]), a[j]);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_62 = addInt(j, ((NI) 1));
				j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_62);
			}
			LA17_: ;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_63 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_63);
		} LA14: ;
	}
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_64;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_65;
			if (!(k < j)) goto LA25;
			if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
			if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
			unsureAsgnRef((void**) (&a[k]), b[i]);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_64 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_64);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_65 = addInt(i, ((NI) 1));
			i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_65);
		} LA25: ;
	}
	}BeforeRet_: ;
}

N_LIB_PRIVATE N_NIMCALL(void, sort_BLQ2Oe9csF8Sez29axQeuW6w)(NimStringDesc** a, NI aLen_0, tyProc_kTj9c3SX9agxDQPZYwemi6ug cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI n;
	tySequence_sM4lkSb7zS6F7OVMvW9cffQ* b;
	NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_53;
	NI s;
	n = aLen_0;
	b = (tySequence_sM4lkSb7zS6F7OVMvW9cffQ*)0;
	TM_JdC9c6SaUkvO1XjYuWP1JWQ_53 = divInt(n, ((NI) 2));
	b = (tySequence_sM4lkSb7zS6F7OVMvW9cffQ*) newSeq((&NTI_sM4lkSb7zS6F7OVMvW9cffQ_), ((NI)chckRange((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_53), ((NI) 0), ((NI) 2147483647))));
	s = ((NI) 1);
	{
		while (1) {
			NI m;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_54;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_55;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_71;
			if (!(s < n)) goto LA2;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_54 = subInt(n, ((NI) 1));
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_55 = subInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_54), s);
			m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_55);
			{
				while (1) {
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_66;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_67;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_68;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_69;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_70;
					if (!(((NI) 0) <= m)) goto LA4;
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_66 = subInt(m, s);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_67 = addInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_66), ((NI) 1));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_68 = addInt(m, s);
					merge_VVQbaBxW408lyw1OOwyNdQ(a, aLen_0, b->data, (b ? b->Sup.len : 0), (((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_67) >= ((NI) 0)) ? (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_67) : ((NI) 0)), m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_68), cmp, order);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_69 = mulInt(s, ((NI) 2));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_70 = subInt(m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_69));
					m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_70);
				} LA4: ;
			}
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_71 = mulInt(s, ((NI) 2));
			s = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_71);
		} LA2: ;
	}
}

N_LIB_PRIVATE N_NIMCALL(void, merge_8uGPISzqbd9ax9aI8lxSAOQA)(tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg* a, NI aLen_0, tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg* b, NI bLen_0, NI lo, NI m, NI hi, tyProc_zzrK9cTwi9admDvOCMDMSIXQ cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI j;
	NI bb;
	NI i;
	NI k;
{	{
		NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_75;
		NI T3_;
		NI T4_;
		if ((NU)(m) >= (NU)(aLen_0)) raiseIndexError2(m,aLen_0-1);
		TM_JdC9c6SaUkvO1XjYuWP1JWQ_75 = addInt(m, ((NI) 1));
		if ((NU)((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_75)) >= (NU)(aLen_0)) raiseIndexError2((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_75),aLen_0-1);
		T3_ = (NI)0;
		T3_ = cmp.ClE_0? cmp.ClP_0(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_75)], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_76)(cmp.ClP_0))(a[m], a[(NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_75)]);
		T4_ = (NI)0;
		T4_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T3_, order);
		if (!(T4_ <= ((NI) 0))) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	j = lo;
	{
		if (!!((j <= m))) goto LA9_;
		failedAssertImpl_W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM_JdC9c6SaUkvO1XjYuWP1JWQ_9));
	}
	LA9_: ;
	bb = ((NI) 0);
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_77;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_78;
			if (!(j <= m)) goto LA12;
			if ((NU)(bb) >= (NU)(bLen_0)) raiseIndexError2(bb,bLen_0-1);
			if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
			unsureAsgnRef((void**) (&b[bb].keyword), a[j].keyword);
			unsureAsgnRef((void**) (&b[bb].link), a[j].link);
			unsureAsgnRef((void**) (&b[bb].linkTitle), a[j].linkTitle);
			unsureAsgnRef((void**) (&b[bb].linkDesc), a[j].linkDesc);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_77 = addInt(bb, ((NI) 1));
			bb = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_77);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_78 = addInt(j, ((NI) 1));
			j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_78);
		} LA12: ;
	}
	i = ((NI) 0);
	k = lo;
	{
		while (1) {
			NIM_BOOL T15_;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_82;
			T15_ = (NIM_BOOL)0;
			T15_ = (k < j);
			if (!(T15_)) goto LA16_;
			T15_ = (j <= hi);
			LA16_: ;
			if (!T15_) goto LA14;
			{
				NI T19_;
				NI T20_;
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_80;
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				T19_ = (NI)0;
				T19_ = cmp.ClE_0? cmp.ClP_0(b[i], a[j], cmp.ClE_0):((TM_JdC9c6SaUkvO1XjYuWP1JWQ_79)(cmp.ClP_0))(b[i], a[j]);
				T20_ = (NI)0;
				T20_ = star__kgZDSIMT2vrZak9bMmeL40walgorithm(T19_, order);
				if (!(T20_ <= ((NI) 0))) goto LA21_;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
				unsureAsgnRef((void**) (&a[k].keyword), b[i].keyword);
				unsureAsgnRef((void**) (&a[k].link), b[i].link);
				unsureAsgnRef((void**) (&a[k].linkTitle), b[i].linkTitle);
				unsureAsgnRef((void**) (&a[k].linkDesc), b[i].linkDesc);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_80 = addInt(i, ((NI) 1));
				i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_80);
			}
			goto LA17_;
			LA21_: ;
			{
				NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_81;
				if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
				if ((NU)(j) >= (NU)(aLen_0)) raiseIndexError2(j,aLen_0-1);
				unsureAsgnRef((void**) (&a[k].keyword), a[j].keyword);
				unsureAsgnRef((void**) (&a[k].link), a[j].link);
				unsureAsgnRef((void**) (&a[k].linkTitle), a[j].linkTitle);
				unsureAsgnRef((void**) (&a[k].linkDesc), a[j].linkDesc);
				TM_JdC9c6SaUkvO1XjYuWP1JWQ_81 = addInt(j, ((NI) 1));
				j = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_81);
			}
			LA17_: ;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_82 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_82);
		} LA14: ;
	}
	{
		while (1) {
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_83;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_84;
			if (!(k < j)) goto LA25;
			if ((NU)(k) >= (NU)(aLen_0)) raiseIndexError2(k,aLen_0-1);
			if ((NU)(i) >= (NU)(bLen_0)) raiseIndexError2(i,bLen_0-1);
			unsureAsgnRef((void**) (&a[k].keyword), b[i].keyword);
			unsureAsgnRef((void**) (&a[k].link), b[i].link);
			unsureAsgnRef((void**) (&a[k].linkTitle), b[i].linkTitle);
			unsureAsgnRef((void**) (&a[k].linkDesc), b[i].linkDesc);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_83 = addInt(k, ((NI) 1));
			k = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_83);
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_84 = addInt(i, ((NI) 1));
			i = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_84);
		} LA25: ;
	}
	}BeforeRet_: ;
}

N_LIB_PRIVATE N_NIMCALL(void, sort_7qlGu9cYbTdvZ8E8NMXzZyQ)(tyObject_IndexEntry_G9ccBDFWfr9aYnLgXTNGDHDg* a, NI aLen_0, tyProc_zzrK9cTwi9admDvOCMDMSIXQ cmp, tyEnum_SortOrder_8iBc6wlNqBa9cju9cUAhUAxA order) {
	NI n;
	tySequence_5PunAJrNQYcB8dF0jau3pQ* b;
	NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_72;
	NI s;
	n = aLen_0;
	b = (tySequence_5PunAJrNQYcB8dF0jau3pQ*)0;
	TM_JdC9c6SaUkvO1XjYuWP1JWQ_72 = divInt(n, ((NI) 2));
	b = (tySequence_5PunAJrNQYcB8dF0jau3pQ*) newSeq((&NTI_5PunAJrNQYcB8dF0jau3pQ_), ((NI)chckRange((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_72), ((NI) 0), ((NI) 2147483647))));
	s = ((NI) 1);
	{
		while (1) {
			NI m;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_73;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_74;
			NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_90;
			if (!(s < n)) goto LA2;
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_73 = subInt(n, ((NI) 1));
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_74 = subInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_73), s);
			m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_74);
			{
				while (1) {
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_85;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_86;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_87;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_88;
					NI TM_JdC9c6SaUkvO1XjYuWP1JWQ_89;
					if (!(((NI) 0) <= m)) goto LA4;
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_85 = subInt(m, s);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_86 = addInt((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_85), ((NI) 1));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_87 = addInt(m, s);
					merge_8uGPISzqbd9ax9aI8lxSAOQA(a, aLen_0, b->data, (b ? b->Sup.len : 0), (((NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_86) >= ((NI) 0)) ? (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_86) : ((NI) 0)), m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_87), cmp, order);
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_88 = mulInt(s, ((NI) 2));
					TM_JdC9c6SaUkvO1XjYuWP1JWQ_89 = subInt(m, (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_88));
					m = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_89);
				} LA4: ;
			}
			TM_JdC9c6SaUkvO1XjYuWP1JWQ_90 = mulInt(s, ((NI) 2));
			s = (NI)(TM_JdC9c6SaUkvO1XjYuWP1JWQ_90);
		} LA2: ;
	}
}
