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

#include "nimbase.h"
#include <string.h>
#include <stdio.h>
#undef linux
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Valueerror_Gi06FkNeykJn7mrqRZYrkA Valueerror_Gi06FkNeykJn7mrqRZYrkA;
typedef struct Exception Exception;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Cell_1zcF9cV8XIAtbN8h5HRUB8g Cell_1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct Cellseq_Axo1XVm9aaQueTOldv8le5w Cellseq_Axo1XVm9aaQueTOldv8le5w;
typedef struct Gcheap_1TRH1TZMaVZTnLNcIHuNFQ Gcheap_1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct Gcstack_7fytPA5bBsob6See21YMRA Gcstack_7fytPA5bBsob6See21YMRA;
typedef struct Memregion_x81NhDv59b8ercDZ9bi85jyg Memregion_x81NhDv59b8ercDZ9bi85jyg;
typedef struct Smallchunk_tXn60W2f8h3jgAYdEmy5NQ Smallchunk_tXn60W2f8h3jgAYdEmy5NQ;
typedef struct Llchunk_XsENErzHIZV9bhvyJx56wGw Llchunk_XsENErzHIZV9bhvyJx56wGw;
typedef struct Bigchunk_Rv9c70Uhp2TytkX7eH78qEg Bigchunk_Rv9c70Uhp2TytkX7eH78qEg;
typedef struct Intset_EZObFrE3NC9bIb3YMkY9crZA Intset_EZObFrE3NC9bIb3YMkY9crZA;
typedef struct Trunk_W0r8S0Y3UGke6T9bIUWnnuw Trunk_W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct Avlnode_IaqjtwKhxLEpvDS9bct9blEw Avlnode_IaqjtwKhxLEpvDS9bct9blEw;
typedef struct Gcstat_0RwLoVBHZPfUAcLczmfQAg Gcstat_0RwLoVBHZPfUAcLczmfQAg;
typedef struct Cellset_jG87P0AI9aZtss9ccTYBIISQ Cellset_jG87P0AI9aZtss9ccTYBIISQ;
typedef struct Pagedesc_fublkgIY4LG3mT51LU2WHg Pagedesc_fublkgIY4LG3mT51LU2WHg;
typedef struct TY_sM4lkSb7zS6F7OVMvW9cffQ TY_sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct Basechunk_Sdq7WpT6qAH858F5ZEdG3w Basechunk_Sdq7WpT6qAH858F5ZEdG3w;
typedef struct Freecell_u6M5LHprqzkn9axr04yg9bGQ Freecell_u6M5LHprqzkn9axr04yg9bGQ;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 Tnimkind_jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 Tnimtypeflag_v8QUszD1sWlSIWZz7mC4bQ_Set;
typedef N_NIMCALL_PTR(void, TY_ojoeKfW4VYIm36I9cpDTQIg) (void* p0, NI op0);
typedef N_NIMCALL_PTR(void*, TY_WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p0);
struct  TNimType  {
NI size;
Tnimkind_jIBKr1ejBgsfM33Kxw4j7A kind;
Tnimtypeflag_v8QUszD1sWlSIWZz7mC4bQ_Set flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY_ojoeKfW4VYIm36I9cpDTQIg marker;
TY_WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror_Gi06FkNeykJn7mrqRZYrkA  {
  Exception Sup;
};
typedef NU8 Tnimnodekind_unfNsxrcATrufDZmpBq4HQ;
struct  TNimNode  {
Tnimnodekind_unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Cell_1zcF9cV8XIAtbN8h5HRUB8g  {
NI refcount;
TNimType* typ;
};
struct  Cellseq_Axo1XVm9aaQueTOldv8le5w  {
NI len;
NI cap;
Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef Smallchunk_tXn60W2f8h3jgAYdEmy5NQ* TY_SiRwrEKZdLgxqz9a9aoVBglg[512];
typedef Trunk_W0r8S0Y3UGke6T9bIUWnnuw* TY_lh2A89ahMmYg9bCmpVaplLbA[256];
struct  Intset_EZObFrE3NC9bIb3YMkY9crZA  {
TY_lh2A89ahMmYg9bCmpVaplLbA data;
};
struct  Memregion_x81NhDv59b8ercDZ9bi85jyg  {
NI minlargeobj;
NI maxlargeobj;
TY_SiRwrEKZdLgxqz9a9aoVBglg freesmallchunks;
Llchunk_XsENErzHIZV9bhvyJx56wGw* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk_Rv9c70Uhp2TytkX7eH78qEg* freechunkslist;
Intset_EZObFrE3NC9bIb3YMkY9crZA chunkstarts;
Avlnode_IaqjtwKhxLEpvDS9bct9blEw* root;
Avlnode_IaqjtwKhxLEpvDS9bct9blEw* deleted;
Avlnode_IaqjtwKhxLEpvDS9bct9blEw* last;
Avlnode_IaqjtwKhxLEpvDS9bct9blEw* freeavlnodes;
NIM_BOOL locked;
NIM_BOOL blockchunksizeincrease;
NI nextchunksize;
};
struct  Gcstat_0RwLoVBHZPfUAcLczmfQAg  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Cellset_jG87P0AI9aZtss9ccTYBIISQ  {
NI counter;
NI max;
Pagedesc_fublkgIY4LG3mT51LU2WHg* head;
Pagedesc_fublkgIY4LG3mT51LU2WHg** data;
};
struct  Gcheap_1TRH1TZMaVZTnLNcIHuNFQ  {
Gcstack_7fytPA5bBsob6See21YMRA* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq_Axo1XVm9aaQueTOldv8le5w zct;
Cellseq_Axo1XVm9aaQueTOldv8le5w decstack;
Cellseq_Axo1XVm9aaQueTOldv8le5w tempstack;
NI recgclock;
Memregion_x81NhDv59b8ercDZ9bi85jyg region;
Gcstat_0RwLoVBHZPfUAcLczmfQAg stat;
Cellset_jG87P0AI9aZtss9ccTYBIISQ marked;
Cellseq_Axo1XVm9aaQueTOldv8le5w additionalroots;
};
typedef NimStringDesc* TY_nHXaesL0DJZHyVS07ARPRA[1];
typedef NI TY_9cc9aPiDa8VaWjVcFLabEDZQ[256];
typedef NU8 TY_nmiMWKVIe46vacnhAFrQvw_Set[32];
typedef NU8 Floatformatmode_pNvEoaqwoxKyoASD11vSgQ;
typedef NIM_CHAR TY_9bPFPkkEEeeNM9bKgiV8Q49cg[6];
typedef NIM_CHAR TY_Kn8ZOVsorvcNLB4isUeMzQ[2501];
typedef NIM_CHAR TY_vB7L5YKNrMfbzoUubCEcYg[3];
typedef NU8 Binaryprefixmode_nDtrM19b3byM8T9ab2m7BwvA;
typedef NimStringDesc* TY_17w6ns39bmjfAZ429aQpCFUA[9];
typedef NIM_CHAR TY_1N75LKnZklmK4NsXtZ9bZiA[2];
struct  Gcstack_7fytPA5bBsob6See21YMRA  {
Gcstack_7fytPA5bBsob6See21YMRA* prev;
Gcstack_7fytPA5bBsob6See21YMRA* next;
void* starts;
void* pos;
NI maxstacksize;
};
struct  Basechunk_Sdq7WpT6qAH858F5ZEdG3w  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk_tXn60W2f8h3jgAYdEmy5NQ  {
  Basechunk_Sdq7WpT6qAH858F5ZEdG3w Sup;
Smallchunk_tXn60W2f8h3jgAYdEmy5NQ* next;
Smallchunk_tXn60W2f8h3jgAYdEmy5NQ* prev;
Freecell_u6M5LHprqzkn9axr04yg9bGQ* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk_XsENErzHIZV9bhvyJx56wGw  {
NI size;
NI acc;
Llchunk_XsENErzHIZV9bhvyJx56wGw* next;
};
struct  Bigchunk_Rv9c70Uhp2TytkX7eH78qEg  {
  Basechunk_Sdq7WpT6qAH858F5ZEdG3w Sup;
Bigchunk_Rv9c70Uhp2TytkX7eH78qEg* next;
Bigchunk_Rv9c70Uhp2TytkX7eH78qEg* prev;
NI align;
NF data;
};
typedef NI TY_9agrCtWKhCnWWMJpKKugJag[16];
struct  Trunk_W0r8S0Y3UGke6T9bIUWnnuw  {
Trunk_W0r8S0Y3UGke6T9bIUWnnuw* next;
NI key;
TY_9agrCtWKhCnWWMJpKKugJag bits;
};
typedef Avlnode_IaqjtwKhxLEpvDS9bct9blEw* TY_0aOLqZchNi8nWtMTi8ND8w[2];
struct  Avlnode_IaqjtwKhxLEpvDS9bct9blEw  {
TY_0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperbound;
NI level;
};
struct  Pagedesc_fublkgIY4LG3mT51LU2WHg  {
Pagedesc_fublkgIY4LG3mT51LU2WHg* next;
NI key;
TY_9agrCtWKhCnWWMJpKKugJag bits;
};
struct  Freecell_u6M5LHprqzkn9axr04yg9bGQ  {
Freecell_u6M5LHprqzkn9axr04yg9bGQ* next;
NI zerofield;
};
struct TY_sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NIM_CHAR, nsuToLowerAsciiChar)(NIM_CHAR c0);
N_NIMCALL(NimStringDesc*, mnewString)(NI len0);
N_NIMCALL(NimStringDesc*, mnewString)(NI len0);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space0);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap0);
N_NIMCALL(void, nsuAddf)(NimStringDesc** s0, NimStringDesc* formatstr0, NimStringDesc** a0, NI a0Len0);
N_NOINLINE(void, invalidformatstring_61EJWW6vRISEo9a8gt0tusw)(void);
N_NIMCALL(void*, newObj)(TNimType* typ0, NI size0);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src0);
static N_INLINE(void, nimGCunrefNoCycle)(void* p0);
static N_INLINE(Cell_1zcF9cV8XIAtbN8h5HRUB8g*, usrtocell_yB9aH5WIlwd0xkYrcdPeXrQsystem)(void* usr0);
static N_INLINE(void, rtladdzct_MV4BBk6J1qu70IbBxwEn4w_2system)(Cell_1zcF9cV8XIAtbN8h5HRUB8g* c0);
N_NOINLINE(void, addzct_fCDI7oO1NNVXXURtxSzsRw)(Cellseq_Axo1XVm9aaQueTOldv8le5w* s0, Cell_1zcF9cV8XIAtbN8h5HRUB8g* c0);
N_NIMCALL(void, raiseException)(Exception* e0, NCSTRING ename0);
static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0);
static N_INLINE(void, copymem_fPlwH3r9agN9aEHB6yCPMh0wsystem)(void* dest0, void* source0, NI size0);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest0, NI addlen0);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s0, NIM_CHAR c0);
N_NIMCALL(NI, findnormalized_SW1VCMDsxPTtzxnYrf3N6w)(NimStringDesc* x0, NimStringDesc** inarray0, NI inarray0Len0);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a0, NimStringDesc* b0);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s0, NI start_WPWyPKk58Cr5a6XFFviMjg, NI last0);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s0, NI first0, NI last0);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src0);
N_NIMCALL(NI, npuParseFloat)(NimStringDesc* s0, NF* number0, NI start0);
static N_INLINE(void, asgnRefNoCycle)(void** dest0, void* src0);
N_NIMCALL(NI, npuParseBiggestInt)(NimStringDesc* s0, NI64* number0, NI start0);
N_NIMCALL(void, preprocesssub_IhQT0o4blhF4hbhCz0srsw)(NimStringDesc* sub0, NI* a0);
N_NIMCALL(NI, findaux_twow8DFxO4IDgSmpDGkD0g)(NimStringDesc* s0, NimStringDesc* sub0, NI start0, TY_9cc9aPiDa8VaWjVcFLabEDZQ a0);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s0, NI start0);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s0, NI first0);
N_NIMCALL(NI, nsuFindCharSet)(NimStringDesc* s0, TY_nmiMWKVIe46vacnhAFrQvw_Set chars0, NI start0);
N_NIMCALL(NI, npuParseInt)(NimStringDesc* s0, NI* number0, NI start0);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s0, NI newlen0);
N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s0, NIM_CHAR sub0, NI start0);
N_NIMCALL(void*, newSeq)(TNimType* typ0, NI len0);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq0, NI elemsize0);
N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x0, NI len0);
N_NIMCALL(NimStringDesc*, nsuToLowerAsciiStr)(NimStringDesc* s0);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x0);
static N_INLINE(void, appendChar)(NimStringDesc* dest0, NIM_CHAR c0);
N_NIMCALL(NimStringDesc*, nsuformatBiggestFloat)(NF f0, Floatformatmode_pNvEoaqwoxKyoASD11vSgQ format0, NI precision0, NIM_CHAR decimalsep0);
N_NIMCALL(void, genericAssign)(void* dest0, void* src0, TNimType* mt0);
N_NIMCALL(NimStringDesc*, nsuformatFloat)(NF f0, Floatformatmode_pNvEoaqwoxKyoASD11vSgQ format0, NI precision0, NIM_CHAR decimalsep0);
N_NIMCALL(void, trimzeros_CU4YpFC2uPFH9bObBQmGWxQ)(NimStringDesc** x0);
N_NIMCALL(NIM_BOOL, contains_6e5MGL10HDAJ205lBYpWxw)(NimStringDesc* s0, NIM_CHAR c0);
N_NIMCALL(TY_sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitChar)(NimStringDesc* s0, NIM_CHAR sep0, NI maxsplit0);
N_NIMCALL(void, unsureAsgnRef)(void** dest0, void* src0);
static N_INLINE(NIM_BOOL, contains_I9cy9aN2znlBRynMcXN4pBGgstrutils)(NIM_CHAR* a0, NI a0Len0, NIM_CHAR item0);
static N_INLINE(NI, find_b3HPX1XboPhUmnxkTjazFQstrutils)(NIM_CHAR* a0, NI a0Len0, NIM_CHAR item0);
extern TNimType NTI_yCEN9anxCD6mzBxGjuaRBdg;
extern TNimType NTI_Gi06FkNeykJn7mrqRZYrkA;
extern Gcheap_1TRH1TZMaVZTnLNcIHuNFQ gch_IcYaEuuWivYAS86vFMTS3Q;
extern TNimType NTI_sM4lkSb7zS6F7OVMvW9cffQ;
extern TNimType NTI_77mFvmsOLKik79ci2hXkHEg;
TNimType NTI_17w6ns39bmjfAZ429aQpCFUA;
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_2, "invalid format string", 21);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_3, "invalid float: ", 15);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_4, "invalid integer: ", 17);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_5, "0123456789ABCDEF", 16);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_6, "", 0);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_7, "\\x", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_8, "\\\\", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_9, "\\\'", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_10, "\\\"", 2);
NIM_CONST TY_vB7L5YKNrMfbzoUubCEcYg floatformattochar_WVISPus3ZqCVSuP9bzn9cVxw = {103,
102,
101}
;
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_11, "k", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_12, "M", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_13, "G", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_14, "T", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_15, "P", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_16, "E", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_17, "Z", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_18, "Y", 1);
NIM_CONST TY_17w6ns39bmjfAZ429aQpCFUA collprefixes_biGTDQtLn0RX9aMOaFztEcQ = {((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_6),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_11),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_12),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_13),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_14),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_15),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_16),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_17),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_18)}
;
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_19, "Ki", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_20, "Mi", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_21, "Gi", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_22, "Ti", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_23, "Pi", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_24, "Ei", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_25, "Zi", 2);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_26, "Yi", 2);
NIM_CONST TY_17w6ns39bmjfAZ429aQpCFUA iecprefixes_sg9cD5AlNYzrrY1lS9aWp9bJA = {((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_6),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_19),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_20),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_21),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_22),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_23),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_24),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_25),
((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_26)}
;
NIM_CONST TY_1N75LKnZklmK4NsXtZ9bZiA T_JGc9b9bh2D3nTdUR7TGyq8aA_27 = {44,
46}
;
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_28, "e", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_29, " ", 1);
STRING_LITERAL(T_JGc9b9bh2D3nTdUR7TGyq8aA_30, "B", 1);

N_NIMCALL(NIM_CHAR, nsuToLowerAsciiChar)(NIM_CHAR c0) {
	NIM_CHAR result0;
	result0 = (NIM_CHAR)0;
	{
		if (!(((NU8)(c0)) >= ((NU8)(65)) && ((NU8)(c0)) <= ((NU8)(90)))) goto LA3;
		result0 = ((NIM_CHAR) (((NI) ((NI)(((NI) (((NU8)(c0)))) + ((NI) 32))))));
	}
	goto LA1;
	LA3: ;
	{
		result0 = c0;
	}
	LA1: ;
	return result0;
}

N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a0, NimStringDesc* b0) {
	NI result0;
	NI i0;
	NI j0;
	result0 = (NI)0;
	i0 = ((NI) 0);
	j0 = ((NI) 0);
	{
		while (1) {
			NIM_CHAR aa0;
			NIM_CHAR bb0;
			{
				while (1) {
					if (!((NU8)(a0->data[i0]) == (NU8)(95))) goto LA4;
					i0 += ((NI) 1);
				} LA4: ;
			}
			{
				while (1) {
					if (!((NU8)(b0->data[j0]) == (NU8)(95))) goto LA6;
					j0 += ((NI) 1);
				} LA6: ;
			}
			aa0 = nsuToLowerAsciiChar(a0->data[i0]);
			bb0 = nsuToLowerAsciiChar(b0->data[j0]);
			result0 = (NI)(((NI) (((NU8)(aa0)))) - ((NI) (((NU8)(bb0)))));
			{
				NIM_BOOL LOC9;
				LOC9 = (NIM_BOOL)0;
				LOC9 = !((result0 == ((NI) 0)));
				if (LOC9) goto LA10;
				LOC9 = ((NU8)(aa0) == (NU8)(0));
				LA10: ;
				if (!LOC9) goto LA11;
				goto LA1;
			}
			LA11: ;
			i0 += ((NI) 1);
			j0 += ((NI) 1);
		}
	} LA1: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuToOctal)(NIM_CHAR c0) {
	NimStringDesc* result0;
	NI val0;
	result0 = (NimStringDesc*)0;
	result0 = mnewString(((NI) 3));
	val0 = ((NU8)(c0));
	{
		NI i_9cfVWLIQccp8ssOepJfZqOQ;
		NI res_9bbCZUKnBnPxqgLCvr9ag9aHA;
		i_9cfVWLIQccp8ssOepJfZqOQ = (NI)0;
		res_9bbCZUKnBnPxqgLCvr9ag9aHA = ((NI) 2);
		{
			while (1) {
				if (!(((NI) 0) <= res_9bbCZUKnBnPxqgLCvr9ag9aHA)) goto LA3;
				i_9cfVWLIQccp8ssOepJfZqOQ = res_9bbCZUKnBnPxqgLCvr9ag9aHA;
				result0->data[i_9cfVWLIQccp8ssOepJfZqOQ] = ((NIM_CHAR) (((NI) ((NI)(((NI) ((NI)(((NI) (val0)) % ((NI) 8)))) + ((NI) 48))))));
				val0 = ((NI) ((NI)(((NI) (val0)) / ((NI) 8))));
				res_9bbCZUKnBnPxqgLCvr9ag9aHA -= ((NI) 1);
			} LA3: ;
		}
	}
	return result0;
}

static N_INLINE(Cell_1zcF9cV8XIAtbN8h5HRUB8g*, usrtocell_yB9aH5WIlwd0xkYrcdPeXrQsystem)(void* usr0) {
	Cell_1zcF9cV8XIAtbN8h5HRUB8g* result0;
	result0 = (Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
	result0 = ((Cell_1zcF9cV8XIAtbN8h5HRUB8g*) ((NI)((NU32)(((NI) (usr0))) - (NU32)(((NI)sizeof(Cell_1zcF9cV8XIAtbN8h5HRUB8g))))));
	return result0;
}

static N_INLINE(void, rtladdzct_MV4BBk6J1qu70IbBxwEn4w_2system)(Cell_1zcF9cV8XIAtbN8h5HRUB8g* c0) {
	addzct_fCDI7oO1NNVXXURtxSzsRw((&gch_IcYaEuuWivYAS86vFMTS3Q.zct), c0);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p0) {
	Cell_1zcF9cV8XIAtbN8h5HRUB8g* c0;
	c0 = usrtocell_yB9aH5WIlwd0xkYrcdPeXrQsystem(p0);
	{
		(*c0).refcount -= ((NI) 8);
		if (!((NU32)((*c0).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_MV4BBk6J1qu70IbBxwEn4w_2system(c0);
	}
	LA3: ;
}

N_NOINLINE(void, invalidformatstring_61EJWW6vRISEo9a8gt0tusw)(void) {
	Valueerror_Gi06FkNeykJn7mrqRZYrkA* e_L35A58svp4sBF5unURnN4A;
	NimStringDesc* LOC1;
	e_L35A58svp4sBF5unURnN4A = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*)0;
	e_L35A58svp4sBF5unURnN4A = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*) newObj((&NTI_yCEN9anxCD6mzBxGjuaRBdg), sizeof(Valueerror_Gi06FkNeykJn7mrqRZYrkA));
	(*e_L35A58svp4sBF5unURnN4A).Sup.Sup.m_type = (&NTI_Gi06FkNeykJn7mrqRZYrkA);
	LOC1 = (NimStringDesc*)0;
	LOC1 = (*e_L35A58svp4sBF5unURnN4A).Sup.message; (*e_L35A58svp4sBF5unURnN4A).Sup.message = copyStringRC1(((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_2));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_L35A58svp4sBF5unURnN4A, "ValueError");
}

static N_INLINE(void, copymem_fPlwH3r9agN9aEHB6yCPMh0wsystem)(void* dest0, void* source0, NI size0) {
	void* LOC1;
	LOC1 = (void*)0;
	LOC1 = memcpy(dest0, source0, ((size_t) (size0)));
}

static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0) {
	copymem_fPlwH3r9agN9aEHB6yCPMh0wsystem(((void*) ((&(*dest0).data[((*dest0).Sup.len)- 0]))), ((void*) ((*src0).data)), ((NI) ((NI)((*src0).Sup.len + ((NI) 1)))));
	(*dest0).Sup.len += (*src0).Sup.len;
}

N_NIMCALL(NI, findnormalized_SW1VCMDsxPTtzxnYrf3N6w)(NimStringDesc* x0, NimStringDesc** inarray0, NI inarray0Len0) {
	NI result0;
	NI i0;
{	result0 = (NI)0;
	i0 = ((NI) 0);
	{
		while (1) {
			if (!(i0 < (inarray0Len0-1))) goto LA2;
			{
				NI LOC5;
				LOC5 = (NI)0;
				LOC5 = nsuCmpIgnoreStyle(x0, inarray0[i0]);
				if (!(LOC5 == ((NI) 0))) goto LA6;
				result0 = i0;
				goto BeforeRet;
			}
			LA6: ;
			i0 += ((NI) 2);
		} LA2: ;
	}
	result0 = ((NI) -1);
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(void, nsuAddf)(NimStringDesc** s0, NimStringDesc* formatstr0, NimStringDesc** a0, NI a0Len0) {
	NI i0;
	NI num0;
	i0 = ((NI) 0);
	num0 = ((NI) 0);
	{
		while (1) {
			if (!(i0 < (formatstr0 ? formatstr0->Sup.len : 0))) goto LA2;
			{
				if (!((NU8)(formatstr0->data[i0]) == (NU8)(36))) goto LA5;
				switch (((NU8)(formatstr0->data[(NI)(i0 + ((NI) 1))]))) {
				case 35:
				{
					{
						if (!((NU32)((a0Len0-1)) < (NU32)(num0))) goto LA10;
						invalidformatstring_61EJWW6vRISEo9a8gt0tusw();
					}
					LA10: ;
					(*s0) = resizeString((*s0), a0[num0]->Sup.len + 0);
appendString((*s0), a0[num0]);
					i0 += ((NI) 2);
					num0 += ((NI) 1);
				}
				break;
				case 36:
				{
					(*s0) = addChar((*s0), 36);
					i0 += ((NI) 2);
				}
				break;
				case 49 ... 57:
				case 45:
				{
					NI j0;
					NIM_BOOL negative0;
					NI idx0;
					j0 = ((NI) 0);
					i0 += ((NI) 1);
					negative0 = ((NU8)(formatstr0->data[i0]) == (NU8)(45));
					{
						if (!negative0) goto LA16;
						i0 += ((NI) 1);
					}
					LA16: ;
					{
						while (1) {
							if (!(((NU8)(formatstr0->data[i0])) >= ((NU8)(48)) && ((NU8)(formatstr0->data[i0])) <= ((NU8)(57)))) goto LA19;
							j0 = (NI)((NI)((NI)(j0 * ((NI) 10)) + ((NI) (((NU8)(formatstr0->data[i0]))))) - ((NI) 48));
							i0 += ((NI) 1);
						} LA19: ;
					}
					{
						if (!!(negative0)) goto LA22;
						idx0 = (NI)(j0 - ((NI) 1));
					}
					goto LA20;
					LA22: ;
					{
						idx0 = (NI)(a0Len0 - j0);
					}
					LA20: ;
					{
						if (!((NU32)((a0Len0-1)) < (NU32)(idx0))) goto LA27;
						invalidformatstring_61EJWW6vRISEo9a8gt0tusw();
					}
					LA27: ;
					(*s0) = resizeString((*s0), a0[idx0]->Sup.len + 0);
appendString((*s0), a0[idx0]);
				}
				break;
				case 123:
				{
					NI j0;
					NI x0;
					NimStringDesc* LOC32;
					j0 = (NI)(i0 + ((NI) 1));
					{
						while (1) {
							if (!!((((NU8)(formatstr0->data[j0])) == ((NU8)(0)) || ((NU8)(formatstr0->data[j0])) == ((NU8)(125))))) goto LA31;
							j0 += ((NI) 1);
						} LA31: ;
					}
					LOC32 = (NimStringDesc*)0;
					LOC32 = copyStrLast(formatstr0, (NI)(i0 + ((NI) 2)), (NI)(j0 - ((NI) 1)));
					x0 = findnormalized_SW1VCMDsxPTtzxnYrf3N6w(LOC32, a0, a0Len0);
					{
						NIM_BOOL LOC35;
						LOC35 = (NIM_BOOL)0;
						LOC35 = (((NI) 0) <= x0);
						if (!(LOC35)) goto LA36;
						LOC35 = (x0 < (a0Len0-1));
						LA36: ;
						if (!LOC35) goto LA37;
						(*s0) = resizeString((*s0), a0[(NI)(x0 + ((NI) 1))]->Sup.len + 0);
appendString((*s0), a0[(NI)(x0 + ((NI) 1))]);
					}
					goto LA33;
					LA37: ;
					{
						invalidformatstring_61EJWW6vRISEo9a8gt0tusw();
					}
					LA33: ;
					i0 = (NI)(j0 + ((NI) 1));
				}
				break;
				case 97 ... 122:
				case 65 ... 90:
				case 128 ... 255:
				case 95:
				{
					NI j0;
					NI x0;
					NimStringDesc* LOC43;
					j0 = (NI)(i0 + ((NI) 1));
					{
						while (1) {
							if (!(((NU8)(formatstr0->data[j0])) >= ((NU8)(97)) && ((NU8)(formatstr0->data[j0])) <= ((NU8)(122)) || ((NU8)(formatstr0->data[j0])) >= ((NU8)(65)) && ((NU8)(formatstr0->data[j0])) <= ((NU8)(90)) || ((NU8)(formatstr0->data[j0])) >= ((NU8)(48)) && ((NU8)(formatstr0->data[j0])) <= ((NU8)(57)) || ((NU8)(formatstr0->data[j0])) >= ((NU8)(128)) && ((NU8)(formatstr0->data[j0])) <= ((NU8)(255)) || ((NU8)(formatstr0->data[j0])) == ((NU8)(95)))) goto LA42;
							j0 += ((NI) 1);
						} LA42: ;
					}
					LOC43 = (NimStringDesc*)0;
					LOC43 = copyStrLast(formatstr0, (NI)(i0 + ((NI) 1)), (NI)(j0 - ((NI) 1)));
					x0 = findnormalized_SW1VCMDsxPTtzxnYrf3N6w(LOC43, a0, a0Len0);
					{
						NIM_BOOL LOC46;
						LOC46 = (NIM_BOOL)0;
						LOC46 = (((NI) 0) <= x0);
						if (!(LOC46)) goto LA47;
						LOC46 = (x0 < (a0Len0-1));
						LA47: ;
						if (!LOC46) goto LA48;
						(*s0) = resizeString((*s0), a0[(NI)(x0 + ((NI) 1))]->Sup.len + 0);
appendString((*s0), a0[(NI)(x0 + ((NI) 1))]);
					}
					goto LA44;
					LA48: ;
					{
						invalidformatstring_61EJWW6vRISEo9a8gt0tusw();
					}
					LA44: ;
					i0 = j0;
				}
				break;
				default:
				{
					invalidformatstring_61EJWW6vRISEo9a8gt0tusw();
				}
				break;
				}
			}
			goto LA3;
			LA5: ;
			{
				(*s0) = addChar((*s0), formatstr0->data[i0]);
				i0 += ((NI) 1);
			}
			LA3: ;
		} LA2: ;
	}
}

N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr0, NimStringDesc** a0, NI a0Len0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = rawNewString(((NI) ((NI)((formatstr0 ? formatstr0->Sup.len : 0) + (NI)((NU32)(a0Len0) << (NU32)(((NI) 4)))))));
	nsuAddf((&result0), formatstr0, a0, a0Len0);
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr0, NimStringDesc* a0) {
	NimStringDesc* result0;
	TY_nHXaesL0DJZHyVS07ARPRA LOC1;
	result0 = (NimStringDesc*)0;
	result0 = rawNewString(((NI) ((NI)((formatstr0 ? formatstr0->Sup.len : 0) + (a0 ? a0->Sup.len : 0)))));
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = copyString(a0);
	nsuAddf((&result0), formatstr0, LOC1, 1);
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuRepeatChar)(NIM_CHAR c0, NI count0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = mnewString(count0);
	{
		NI i_3GQd65NoQ8GRAK9aKcUCkqQ;
		NI HEX3Atmp_dzdTGA9bp9cdFQ4FdPqfyPrQ;
		NI res_ZCK9av0K5RQEcyuf9cJ7G5eg;
		i_3GQd65NoQ8GRAK9aKcUCkqQ = (NI)0;
		HEX3Atmp_dzdTGA9bp9cdFQ4FdPqfyPrQ = (NI)0;
		HEX3Atmp_dzdTGA9bp9cdFQ4FdPqfyPrQ = (NI)(((NI) (count0)) - ((NI) 1));
		res_ZCK9av0K5RQEcyuf9cJ7G5eg = ((NI) 0);
		{
			while (1) {
				if (!(res_ZCK9av0K5RQEcyuf9cJ7G5eg <= ((NI) (HEX3Atmp_dzdTGA9bp9cdFQ4FdPqfyPrQ)))) goto LA3;
				i_3GQd65NoQ8GRAK9aKcUCkqQ = ((NI) (res_ZCK9av0K5RQEcyuf9cJ7G5eg));
				result0->data[i_3GQd65NoQ8GRAK9aKcUCkqQ] = c0;
				res_ZCK9av0K5RQEcyuf9cJ7G5eg += ((NI) 1);
			} LA3: ;
		}
	}
	return result0;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest0, void* src0) {
	{
		Cell_1zcF9cV8XIAtbN8h5HRUB8g* c0;
		if (!!((src0 == NIM_NIL))) goto LA3;
		c0 = usrtocell_yB9aH5WIlwd0xkYrcdPeXrQsystem(src0);
		(*c0).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Cell_1zcF9cV8XIAtbN8h5HRUB8g* c0;
		if (!!(((*dest0) == NIM_NIL))) goto LA7;
		c0 = usrtocell_yB9aH5WIlwd0xkYrcdPeXrQsystem((*dest0));
		{
			(*c0).refcount -= ((NI) 8);
			if (!((NU32)((*c0).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_MV4BBk6J1qu70IbBxwEn4w_2system(c0);
		}
		LA11: ;
	}
	LA7: ;
	(*dest0) = src0;
}

N_NIMCALL(NF, nsuParseFloat)(NimStringDesc* s0) {
	NF result0;
	NI L0;
	result0 = (NF)0;
	L0 = npuParseFloat(s0, (&result0), ((NI) 0));
	{
		NIM_BOOL LOC3;
		Valueerror_Gi06FkNeykJn7mrqRZYrkA* e_tBQ1yEygRNCXyDbW7d5n0Q;
		NimStringDesc* LOC7;
		LOC3 = (NIM_BOOL)0;
		LOC3 = !((L0 == (s0 ? s0->Sup.len : 0)));
		if (LOC3) goto LA4;
		LOC3 = (L0 == ((NI) 0));
		LA4: ;
		if (!LOC3) goto LA5;
		e_tBQ1yEygRNCXyDbW7d5n0Q = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*)0;
		e_tBQ1yEygRNCXyDbW7d5n0Q = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*) newObj((&NTI_yCEN9anxCD6mzBxGjuaRBdg), sizeof(Valueerror_Gi06FkNeykJn7mrqRZYrkA));
		(*e_tBQ1yEygRNCXyDbW7d5n0Q).Sup.Sup.m_type = (&NTI_Gi06FkNeykJn7mrqRZYrkA);
		LOC7 = (NimStringDesc*)0;
		LOC7 = rawNewString(s0->Sup.len + 15);
appendString(LOC7, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_3));
appendString(LOC7, s0);
		asgnRefNoCycle((void**) (&(*e_tBQ1yEygRNCXyDbW7d5n0Q).Sup.message), LOC7);
		raiseException((Exception*)e_tBQ1yEygRNCXyDbW7d5n0Q, "ValueError");
	}
	LA5: ;
	return result0;
}

N_NIMCALL(NI64, nsuParseBiggestInt)(NimStringDesc* s0) {
	NI64 result0;
	NI L0;
	result0 = (NI64)0;
	L0 = npuParseBiggestInt(s0, (&result0), ((NI) 0));
	{
		NIM_BOOL LOC3;
		Valueerror_Gi06FkNeykJn7mrqRZYrkA* e_p4geovby25ZtMrv9aTrThJw;
		NimStringDesc* LOC7;
		LOC3 = (NIM_BOOL)0;
		LOC3 = !((L0 == (s0 ? s0->Sup.len : 0)));
		if (LOC3) goto LA4;
		LOC3 = (L0 == ((NI) 0));
		LA4: ;
		if (!LOC3) goto LA5;
		e_p4geovby25ZtMrv9aTrThJw = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*)0;
		e_p4geovby25ZtMrv9aTrThJw = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*) newObj((&NTI_yCEN9anxCD6mzBxGjuaRBdg), sizeof(Valueerror_Gi06FkNeykJn7mrqRZYrkA));
		(*e_p4geovby25ZtMrv9aTrThJw).Sup.Sup.m_type = (&NTI_Gi06FkNeykJn7mrqRZYrkA);
		LOC7 = (NimStringDesc*)0;
		LOC7 = rawNewString(s0->Sup.len + 17);
appendString(LOC7, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_4));
appendString(LOC7, s0);
		asgnRefNoCycle((void**) (&(*e_p4geovby25ZtMrv9aTrThJw).Sup.message), LOC7);
		raiseException((Exception*)e_p4geovby25ZtMrv9aTrThJw, "ValueError");
	}
	LA5: ;
	return result0;
}

N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringDesc* s0, NimStringDesc* prefix0) {
	NIM_BOOL result0;
	NI i0;
{	result0 = (NIM_BOOL)0;
	i0 = ((NI) 0);
	{
		while (1) {
			{
				if (!((NU8)(prefix0->data[i0]) == (NU8)(0))) goto LA5;
				result0 = NIM_TRUE;
				goto BeforeRet;
			}
			LA5: ;
			{
				if (!!(((NU8)(s0->data[i0]) == (NU8)(prefix0->data[i0])))) goto LA9;
				result0 = NIM_FALSE;
				goto BeforeRet;
			}
			LA9: ;
			i0 += ((NI) 1);
		}
	}
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuToHex)(NI64 x0, NI len0) {
	NimStringDesc* result0;
	NI64 n0;
	result0 = (NimStringDesc*)0;
	n0 = x0;
	result0 = mnewString(((NI) (len0)));
	{
		NI j_jtVhfoYpXeRJUwm8SjFcYA;
		NI HEX3Atmp_DL9bYykBTQPZcxEnrzhm9cYg;
		NI res_K9cSgDvHGGBxWzGn3Ng0Dkw;
		j_jtVhfoYpXeRJUwm8SjFcYA = (NI)0;
		HEX3Atmp_DL9bYykBTQPZcxEnrzhm9cYg = (NI)0;
		HEX3Atmp_DL9bYykBTQPZcxEnrzhm9cYg = (NI)(((NI) (len0)) - ((NI) 1));
		res_K9cSgDvHGGBxWzGn3Ng0Dkw = ((NI) (HEX3Atmp_DL9bYykBTQPZcxEnrzhm9cYg));
		{
			while (1) {
				if (!(((NI) 0) <= res_K9cSgDvHGGBxWzGn3Ng0Dkw)) goto LA3;
				j_jtVhfoYpXeRJUwm8SjFcYA = ((NI) (res_K9cSgDvHGGBxWzGn3Ng0Dkw));
				result0->data[j_jtVhfoYpXeRJUwm8SjFcYA] = ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_5)->data[(NI64)(n0 & IL64(15))];
				n0 = (NI64)((NU64)(n0) >> (NU64)(((NI) 4)));
				{
					NIM_BOOL LOC6;
					LOC6 = (NIM_BOOL)0;
					LOC6 = (n0 == IL64(0));
					if (!(LOC6)) goto LA7;
					LOC6 = (x0 < IL64(0));
					LA7: ;
					if (!LOC6) goto LA8;
					n0 = IL64(-1);
				}
				LA8: ;
				res_K9cSgDvHGGBxWzGn3Ng0Dkw -= ((NI) 1);
			} LA3: ;
		}
	}
	return result0;
}

N_NIMCALL(void, preprocesssub_IhQT0o4blhF4hbhCz0srsw)(NimStringDesc* sub0, NI* a0) {
	NI m0;
	m0 = (sub0 ? sub0->Sup.len : 0);
	{
		NI i_e6Fq2F2KbLiz5Un9cYQeH0A;
		NI res_559coKXM747stwdhO9at4t6g;
		i_e6Fq2F2KbLiz5Un9cYQeH0A = (NI)0;
		res_559coKXM747stwdhO9at4t6g = ((NI) 0);
		{
			while (1) {
				if (!(res_559coKXM747stwdhO9at4t6g <= ((NI) 255))) goto LA3;
				i_e6Fq2F2KbLiz5Un9cYQeH0A = res_559coKXM747stwdhO9at4t6g;
				a0[(((NU8)(((NIM_CHAR) (((NI) (i_e6Fq2F2KbLiz5Un9cYQeH0A)))))))- 0] = (NI)(m0 + ((NI) 1));
				res_559coKXM747stwdhO9at4t6g += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NI i_e6Fq2F2KbLiz5Un9cYQeH0A_2;
		NI HEX3Atmp_hfvQ2kAAQr6ctPB7eJPykg;
		NI res_559coKXM747stwdhO9at4t6g_2;
		i_e6Fq2F2KbLiz5Un9cYQeH0A_2 = (NI)0;
		HEX3Atmp_hfvQ2kAAQr6ctPB7eJPykg = (NI)0;
		HEX3Atmp_hfvQ2kAAQr6ctPB7eJPykg = (NI)(m0 - ((NI) 1));
		res_559coKXM747stwdhO9at4t6g_2 = ((NI) 0);
		{
			while (1) {
				if (!(res_559coKXM747stwdhO9at4t6g_2 <= HEX3Atmp_hfvQ2kAAQr6ctPB7eJPykg)) goto LA6;
				i_e6Fq2F2KbLiz5Un9cYQeH0A_2 = res_559coKXM747stwdhO9at4t6g_2;
				a0[(((NU8)(sub0->data[i_e6Fq2F2KbLiz5Un9cYQeH0A_2])))- 0] = (NI)(m0 - i_e6Fq2F2KbLiz5Un9cYQeH0A_2);
				res_559coKXM747stwdhO9at4t6g_2 += ((NI) 1);
			} LA6: ;
		}
	}
}

N_NIMCALL(NI, findaux_twow8DFxO4IDgSmpDGkD0g)(NimStringDesc* s0, NimStringDesc* sub0, NI start0, TY_9cc9aPiDa8VaWjVcFLabEDZQ a0) {
	NI result0;
	NI m0;
	NI n0;
	NI j0;
{	result0 = (NI)0;
	m0 = (sub0 ? sub0->Sup.len : 0);
	n0 = (s0 ? s0->Sup.len : 0);
	j0 = start0;
	{
		while (1) {
			if (!(j0 <= (NI)(n0 - m0))) goto LA2;
			{
				{
					NI k_uC7XjvS9c2GS6xLhF08s2tA;
					NI HEX3Atmp_lYkEjs4J5uPVOwALJAm4zA;
					NI res_FImOo74aopp4R0IZMqyDTw;
					k_uC7XjvS9c2GS6xLhF08s2tA = (NI)0;
					HEX3Atmp_lYkEjs4J5uPVOwALJAm4zA = (NI)0;
					HEX3Atmp_lYkEjs4J5uPVOwALJAm4zA = (NI)(m0 - ((NI) 1));
					res_FImOo74aopp4R0IZMqyDTw = ((NI) 0);
					{
						while (1) {
							if (!(res_FImOo74aopp4R0IZMqyDTw <= HEX3Atmp_lYkEjs4J5uPVOwALJAm4zA)) goto LA6;
							k_uC7XjvS9c2GS6xLhF08s2tA = res_FImOo74aopp4R0IZMqyDTw;
							{
								if (!!(((NU8)(sub0->data[k_uC7XjvS9c2GS6xLhF08s2tA]) == (NU8)(s0->data[(NI)(k_uC7XjvS9c2GS6xLhF08s2tA + j0)])))) goto LA9;
								goto LA3;
							}
							LA9: ;
							res_FImOo74aopp4R0IZMqyDTw += ((NI) 1);
						} LA6: ;
					}
				}
				result0 = j0;
				goto BeforeRet;
			} LA3: ;
			j0 += a0[(((NU8)(s0->data[(NI)(j0 + m0)])))- 0];
		} LA2: ;
	}
	result0 = ((NI) -1);
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuReplaceStr)(NimStringDesc* s0, NimStringDesc* sub0, NimStringDesc* by0) {
	NimStringDesc* result0;
	TY_9cc9aPiDa8VaWjVcFLabEDZQ a0;
	NI i0;
	NimStringDesc* LOC8;
	result0 = (NimStringDesc*)0;
	result0 = copyString(((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_6));
	preprocesssub_IhQT0o4blhF4hbhCz0srsw(sub0, a0);
	i0 = ((NI) 0);
	{
		while (1) {
			NI j0;
			NimStringDesc* LOC7;
			j0 = findaux_twow8DFxO4IDgSmpDGkD0g(s0, sub0, i0, a0);
			{
				if (!(j0 < ((NI) 0))) goto LA5;
				goto LA1;
			}
			LA5: ;
			LOC7 = (NimStringDesc*)0;
			LOC7 = copyStrLast(s0, i0, (NI)(j0 - ((NI) 1)));
			result0 = resizeString(result0, LOC7->Sup.len + 0);
appendString(result0, LOC7);
			result0 = resizeString(result0, by0->Sup.len + 0);
appendString(result0, by0);
			i0 = (NI)(j0 + (sub0 ? sub0->Sup.len : 0));
		}
	} LA1: ;
	LOC8 = (NimStringDesc*)0;
	LOC8 = copyStr(s0, i0);
	result0 = resizeString(result0, LOC8->Sup.len + 0);
appendString(result0, LOC8);
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuToBin)(NI64 x0, NI len0) {
	NimStringDesc* result0;
	NI64 mask0;
	NI64 shift0;
	result0 = (NimStringDesc*)0;
	mask0 = IL64(1);
	shift0 = IL64(0);
	result0 = mnewString(((NI) (len0)));
	{
		NI j_kqDQW71AcD1YE9ck9aCt9bP0g;
		NI HEX3Atmp_LyFPJREsdrXwEph89a66kMQ;
		NI res_27cjPOiZUK3BZEBNVpPExw;
		j_kqDQW71AcD1YE9ck9aCt9bP0g = (NI)0;
		HEX3Atmp_LyFPJREsdrXwEph89a66kMQ = (NI)0;
		HEX3Atmp_LyFPJREsdrXwEph89a66kMQ = (NI)(((NI) (len0)) - ((NI) 1));
		res_27cjPOiZUK3BZEBNVpPExw = ((NI) (HEX3Atmp_LyFPJREsdrXwEph89a66kMQ));
		{
			while (1) {
				if (!(((NI) 0) <= res_27cjPOiZUK3BZEBNVpPExw)) goto LA3;
				j_kqDQW71AcD1YE9ck9aCt9bP0g = ((NI) (res_27cjPOiZUK3BZEBNVpPExw));
				result0->data[j_kqDQW71AcD1YE9ck9aCt9bP0g] = ((NIM_CHAR) (((NI) ((NI)(((NI) ((NI64)((NU64)((NI64)(x0 & mask0)) >> (NU64)(shift0)))) + ((NI) 48))))));
				shift0 = (NI64)(shift0 + IL64(1));
				mask0 = (NI64)((NU64)(mask0) << (NU64)(((NI) 1)));
				res_27cjPOiZUK3BZEBNVpPExw -= ((NI) 1);
			} LA3: ;
		}
	}
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuToOct)(NI64 x0, NI len0) {
	NimStringDesc* result0;
	NI64 mask0;
	NI64 shift0;
	result0 = (NimStringDesc*)0;
	mask0 = IL64(7);
	shift0 = IL64(0);
	result0 = mnewString(((NI) (len0)));
	{
		NI j_XC9cjPBvqVuZpNFrvZwEV9aQ;
		NI HEX3Atmp_Xi8UrXd9cedzMYMg9bT89bm3Q;
		NI res_BJZqaBTiRvKJyZFMDSG6og;
		j_XC9cjPBvqVuZpNFrvZwEV9aQ = (NI)0;
		HEX3Atmp_Xi8UrXd9cedzMYMg9bT89bm3Q = (NI)0;
		HEX3Atmp_Xi8UrXd9cedzMYMg9bT89bm3Q = (NI)(((NI) (len0)) - ((NI) 1));
		res_BJZqaBTiRvKJyZFMDSG6og = ((NI) (HEX3Atmp_Xi8UrXd9cedzMYMg9bT89bm3Q));
		{
			while (1) {
				if (!(((NI) 0) <= res_BJZqaBTiRvKJyZFMDSG6og)) goto LA3;
				j_XC9cjPBvqVuZpNFrvZwEV9aQ = ((NI) (res_BJZqaBTiRvKJyZFMDSG6og));
				result0->data[j_XC9cjPBvqVuZpNFrvZwEV9aQ] = ((NIM_CHAR) (((NI) ((NI)(((NI) ((NI64)((NU64)((NI64)(x0 & mask0)) >> (NU64)(shift0)))) + ((NI) 48))))));
				shift0 = (NI64)(shift0 + IL64(3));
				mask0 = (NI64)((NU64)(mask0) << (NU64)(((NI) 3)));
				res_BJZqaBTiRvKJyZFMDSG6og -= ((NI) 1);
			} LA3: ;
		}
	}
	return result0;
}

N_NIMCALL(NI, nsuFindCharSet)(NimStringDesc* s0, TY_nmiMWKVIe46vacnhAFrQvw_Set chars0, NI start0) {
	NI result0;
{	result0 = (NI)0;
	{
		NI i_S4Ts5NaQRo1vHKx5LGYx5w;
		NI HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q;
		NI res_dBqJ9biAHlqcB0S3Zb0ahAw;
		i_S4Ts5NaQRo1vHKx5LGYx5w = (NI)0;
		HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q = (NI)0;
		HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q = (NI)((s0 ? s0->Sup.len : 0) - ((NI) 1));
		res_dBqJ9biAHlqcB0S3Zb0ahAw = ((NI) (start0));
		{
			while (1) {
				if (!(res_dBqJ9biAHlqcB0S3Zb0ahAw <= HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q)) goto LA3;
				i_S4Ts5NaQRo1vHKx5LGYx5w = res_dBqJ9biAHlqcB0S3Zb0ahAw;
				{
					if (!((chars0[(NU)(((NU8)(s0->data[i_S4Ts5NaQRo1vHKx5LGYx5w])))>>3] &(1U<<((NU)(((NU8)(s0->data[i_S4Ts5NaQRo1vHKx5LGYx5w])))&7U)))!=0)) goto LA6;
					result0 = i_S4Ts5NaQRo1vHKx5LGYx5w;
					goto BeforeRet;
				}
				LA6: ;
				res_dBqJ9biAHlqcB0S3Zb0ahAw += ((NI) 1);
			} LA3: ;
		}
	}
	result0 = ((NI) -1);
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NIM_BOOL, contains_m1TSS3QwQPclQATuiRuVZg)(NimStringDesc* s0, TY_nmiMWKVIe46vacnhAFrQvw_Set chars0) {
	NIM_BOOL result0;
	NI LOC1;
{	result0 = (NIM_BOOL)0;
	LOC1 = (NI)0;
	LOC1 = nsuFindCharSet(s0, chars0, ((NI) 0));
	result0 = (((NI) 0) <= LOC1);
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s0, NIM_BOOL leading0, NIM_BOOL trailing0, TY_nmiMWKVIe46vacnhAFrQvw_Set chars0) {
	NimStringDesc* result0;
	NI first0;
	NI last0;
	result0 = (NimStringDesc*)0;
	first0 = ((NI) 0);
	last0 = (NI)((s0 ? s0->Sup.len : 0) - ((NI) 1));
	{
		if (!leading0) goto LA3;
		{
			while (1) {
				if (!((chars0[(NU)(((NU8)(s0->data[first0])))>>3] &(1U<<((NU)(((NU8)(s0->data[first0])))&7U)))!=0)) goto LA6;
				first0 += ((NI) 1);
			} LA6: ;
		}
	}
	LA3: ;
	{
		if (!trailing0) goto LA9;
		{
			while (1) {
				NIM_BOOL LOC13;
				LOC13 = (NIM_BOOL)0;
				LOC13 = (((NI) 0) <= last0);
				if (!(LOC13)) goto LA14;
				LOC13 = ((chars0[(NU)(((NU8)(s0->data[last0])))>>3] &(1U<<((NU)(((NU8)(s0->data[last0])))&7U)))!=0);
				LA14: ;
				if (!LOC13) goto LA12;
				last0 -= ((NI) 1);
			} LA12: ;
		}
	}
	LA9: ;
	result0 = copyStrLast(s0, first0, last0);
	return result0;
}

N_NIMCALL(NI, nsuCmpIgnoreCase)(NimStringDesc* a0, NimStringDesc* b0) {
	NI result0;
	NI i0;
	NI m0;
{	result0 = (NI)0;
	i0 = ((NI) 0);
	m0 = (((a0 ? a0->Sup.len : 0) <= (b0 ? b0->Sup.len : 0)) ? (a0 ? a0->Sup.len : 0) : (b0 ? b0->Sup.len : 0));
	{
		while (1) {
			NIM_CHAR LOC3;
			NIM_CHAR LOC4;
			if (!(i0 < m0)) goto LA2;
			LOC3 = (NIM_CHAR)0;
			LOC3 = nsuToLowerAsciiChar(a0->data[i0]);
			LOC4 = (NIM_CHAR)0;
			LOC4 = nsuToLowerAsciiChar(b0->data[i0]);
			result0 = (NI)(((NI) (((NU8)(LOC3)))) - ((NI) (((NU8)(LOC4)))));
			{
				if (!!((result0 == ((NI) 0)))) goto LA7;
				goto BeforeRet;
			}
			LA7: ;
			i0 += ((NI) 1);
		} LA2: ;
	}
	result0 = (NI)((a0 ? a0->Sup.len : 0) - (b0 ? b0->Sup.len : 0));
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s0) {
	NI result0;
	NI L0;
	result0 = (NI)0;
	L0 = npuParseInt(s0, (&result0), ((NI) 0));
	{
		NIM_BOOL LOC3;
		Valueerror_Gi06FkNeykJn7mrqRZYrkA* e_h9cJEojVqoNVqDKVeb0IKjg;
		NimStringDesc* LOC7;
		LOC3 = (NIM_BOOL)0;
		LOC3 = !((L0 == (s0 ? s0->Sup.len : 0)));
		if (LOC3) goto LA4;
		LOC3 = (L0 == ((NI) 0));
		LA4: ;
		if (!LOC3) goto LA5;
		e_h9cJEojVqoNVqDKVeb0IKjg = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*)0;
		e_h9cJEojVqoNVqDKVeb0IKjg = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*) newObj((&NTI_yCEN9anxCD6mzBxGjuaRBdg), sizeof(Valueerror_Gi06FkNeykJn7mrqRZYrkA));
		(*e_h9cJEojVqoNVqDKVeb0IKjg).Sup.Sup.m_type = (&NTI_Gi06FkNeykJn7mrqRZYrkA);
		LOC7 = (NimStringDesc*)0;
		LOC7 = rawNewString(s0->Sup.len + 17);
appendString(LOC7, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_4));
appendString(LOC7, s0);
		asgnRefNoCycle((void**) (&(*e_h9cJEojVqoNVqDKVeb0IKjg).Sup.message), LOC7);
		raiseException((Exception*)e_h9cJEojVqoNVqDKVeb0IKjg, "ValueError");
	}
	LA5: ;
	return result0;
}

N_NIMCALL(NI, nsuParseHexInt)(NimStringDesc* s0) {
	NI result0;
	NI i0;
	result0 = (NI)0;
	i0 = ((NI) 0);
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		LOC3 = (NIM_BOOL)0;
		LOC3 = ((NU8)(s0->data[i0]) == (NU8)(48));
		if (!(LOC3)) goto LA4;
		LOC5 = (NIM_BOOL)0;
		LOC5 = ((NU8)(s0->data[(NI)(i0 + ((NI) 1))]) == (NU8)(120));
		if (LOC5) goto LA6;
		LOC5 = ((NU8)(s0->data[(NI)(i0 + ((NI) 1))]) == (NU8)(88));
		LA6: ;
		LOC3 = LOC5;
		LA4: ;
		if (!LOC3) goto LA7;
		i0 += ((NI) 2);
	}
	goto LA1;
	LA7: ;
	{
		if (!((NU8)(s0->data[i0]) == (NU8)(35))) goto LA10;
		i0 += ((NI) 1);
	}
	goto LA1;
	LA10: ;
	LA1: ;
	{
		while (1) {
			switch (((NU8)(s0->data[i0]))) {
			case 95:
			{
				i0 += ((NI) 1);
			}
			break;
			case 48 ... 57:
			{
				result0 = (NI)((NI)((NU32)(result0) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) (((NU8)(s0->data[i0])))) - ((NI) 48)))));
				i0 += ((NI) 1);
			}
			break;
			case 97 ... 102:
			{
				result0 = (NI)((NI)((NU32)(result0) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)(s0->data[i0])))) - ((NI) 97)))) + ((NI) 10)))));
				i0 += ((NI) 1);
			}
			break;
			case 65 ... 70:
			{
				result0 = (NI)((NI)((NU32)(result0) << (NU32)(((NI) 4))) | ((NI) ((NI)(((NI) ((NI)(((NI) (((NU8)(s0->data[i0])))) - ((NI) 65)))) + ((NI) 10)))));
				i0 += ((NI) 1);
			}
			break;
			case 0:
			{
				goto LA12;
			}
			break;
			default:
			{
				Valueerror_Gi06FkNeykJn7mrqRZYrkA* e_s9a8HynXzFiyMdNic0A3chQ;
				NimStringDesc* LOC20;
				e_s9a8HynXzFiyMdNic0A3chQ = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*)0;
				e_s9a8HynXzFiyMdNic0A3chQ = (Valueerror_Gi06FkNeykJn7mrqRZYrkA*) newObj((&NTI_yCEN9anxCD6mzBxGjuaRBdg), sizeof(Valueerror_Gi06FkNeykJn7mrqRZYrkA));
				(*e_s9a8HynXzFiyMdNic0A3chQ).Sup.Sup.m_type = (&NTI_Gi06FkNeykJn7mrqRZYrkA);
				LOC20 = (NimStringDesc*)0;
				LOC20 = rawNewString(s0->Sup.len + 17);
appendString(LOC20, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_4));
appendString(LOC20, s0);
				asgnRefNoCycle((void**) (&(*e_s9a8HynXzFiyMdNic0A3chQ).Sup.message), LOC20);
				raiseException((Exception*)e_s9a8HynXzFiyMdNic0A3chQ, "ValueError");
			}
			break;
			}
		}
	} LA12: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuNormalize)(NimStringDesc* s0) {
	NimStringDesc* result0;
	NI j0;
	result0 = (NimStringDesc*)0;
	result0 = mnewString(((NI) ((s0 ? s0->Sup.len : 0))));
	j0 = ((NI) 0);
	{
		NI i_jpbFLgkKR9chZipjHint9c4g;
		NI HEX3Atmp_ULpmQ4pwpkB9ac9cKHbK9cXJw;
		NI res_9aRtiCFskeEOMEBziesZaaQ;
		i_jpbFLgkKR9chZipjHint9c4g = (NI)0;
		HEX3Atmp_ULpmQ4pwpkB9ac9cKHbK9cXJw = (NI)0;
		HEX3Atmp_ULpmQ4pwpkB9ac9cKHbK9cXJw = (NI)((s0 ? s0->Sup.len : 0) - ((NI) 1));
		res_9aRtiCFskeEOMEBziesZaaQ = ((NI) 0);
		{
			while (1) {
				if (!(res_9aRtiCFskeEOMEBziesZaaQ <= HEX3Atmp_ULpmQ4pwpkB9ac9cKHbK9cXJw)) goto LA3;
				i_jpbFLgkKR9chZipjHint9c4g = res_9aRtiCFskeEOMEBziesZaaQ;
				{
					if (!(((NU8)(s0->data[i_jpbFLgkKR9chZipjHint9c4g])) >= ((NU8)(65)) && ((NU8)(s0->data[i_jpbFLgkKR9chZipjHint9c4g])) <= ((NU8)(90)))) goto LA6;
					result0->data[j0] = ((NIM_CHAR) (((NI) ((NI)(((NI) (((NU8)(s0->data[i_jpbFLgkKR9chZipjHint9c4g])))) + ((NI) 32))))));
					j0 += ((NI) 1);
				}
				goto LA4;
				LA6: ;
				{
					if (!!(((NU8)(s0->data[i_jpbFLgkKR9chZipjHint9c4g]) == (NU8)(95)))) goto LA9;
					result0->data[j0] = s0->data[i_jpbFLgkKR9chZipjHint9c4g];
					j0 += ((NI) 1);
				}
				goto LA4;
				LA9: ;
				LA4: ;
				res_9aRtiCFskeEOMEBziesZaaQ += ((NI) 1);
			} LA3: ;
		}
	}
	{
		if (!!((j0 == (s0 ? s0->Sup.len : 0)))) goto LA13;
		result0 = setLengthStr(result0, ((NI) (j0)));
	}
	LA13: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuToLowerAsciiStr)(NimStringDesc* s0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = mnewString(((NI) ((s0 ? s0->Sup.len : 0))));
	{
		NI i_Q4ErNf9cOnD9bQiwEaTZI6PA;
		NI HEX3Atmp_GYbw9c9aYs4vIjnQGiCqmtRg;
		NI res_kjxR3eSoP8WNRp9c4KDSe2w;
		i_Q4ErNf9cOnD9bQiwEaTZI6PA = (NI)0;
		HEX3Atmp_GYbw9c9aYs4vIjnQGiCqmtRg = (NI)0;
		HEX3Atmp_GYbw9c9aYs4vIjnQGiCqmtRg = (NI)((s0 ? s0->Sup.len : 0) - ((NI) 1));
		res_kjxR3eSoP8WNRp9c4KDSe2w = ((NI) 0);
		{
			while (1) {
				if (!(res_kjxR3eSoP8WNRp9c4KDSe2w <= HEX3Atmp_GYbw9c9aYs4vIjnQGiCqmtRg)) goto LA3;
				i_Q4ErNf9cOnD9bQiwEaTZI6PA = res_kjxR3eSoP8WNRp9c4KDSe2w;
				result0->data[i_Q4ErNf9cOnD9bQiwEaTZI6PA] = nsuToLowerAsciiChar(s0->data[i_Q4ErNf9cOnD9bQiwEaTZI6PA]);
				res_kjxR3eSoP8WNRp9c4KDSe2w += ((NI) 1);
			} LA3: ;
		}
	}
	return result0;
}

N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s0, NimStringDesc* suffix0) {
	NIM_BOOL result0;
	NI i0;
	NI j0;
{	result0 = (NIM_BOOL)0;
	i0 = ((NI) 0);
	j0 = (NI)((s0 ? s0->Sup.len : 0) - (suffix0 ? suffix0->Sup.len : 0));
	{
		while (1) {
			if (!((NU32)((NI)(i0 + j0)) < (NU32)((s0 ? s0->Sup.len : 0)))) goto LA2;
			{
				if (!!(((NU8)(s0->data[(NI)(i0 + j0)]) == (NU8)(suffix0->data[i0])))) goto LA5;
				result0 = NIM_FALSE;
				goto BeforeRet;
			}
			LA5: ;
			i0 += ((NI) 1);
		} LA2: ;
	}
	{
		if (!((NU8)(suffix0->data[i0]) == (NU8)(0))) goto LA9;
		result0 = NIM_TRUE;
		goto BeforeRet;
	}
	LA9: ;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NI, nsuFindChar)(NimStringDesc* s0, NIM_CHAR sub0, NI start0) {
	NI result0;
{	result0 = (NI)0;
	{
		NI i_S4Ts5NaQRo1vHKx5LGYx5w_2;
		NI HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q_2;
		NI res_dBqJ9biAHlqcB0S3Zb0ahAw_2;
		i_S4Ts5NaQRo1vHKx5LGYx5w_2 = (NI)0;
		HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q_2 = (NI)0;
		HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q_2 = (NI)((s0 ? s0->Sup.len : 0) - ((NI) 1));
		res_dBqJ9biAHlqcB0S3Zb0ahAw_2 = ((NI) (start0));
		{
			while (1) {
				if (!(res_dBqJ9biAHlqcB0S3Zb0ahAw_2 <= HEX3Atmp_Ms17sAa0cfUTjtJ6sQnN2Q_2)) goto LA3;
				i_S4Ts5NaQRo1vHKx5LGYx5w_2 = res_dBqJ9biAHlqcB0S3Zb0ahAw_2;
				{
					if (!((NU8)(sub0) == (NU8)(s0->data[i_S4Ts5NaQRo1vHKx5LGYx5w_2]))) goto LA6;
					result0 = i_S4Ts5NaQRo1vHKx5LGYx5w_2;
					goto BeforeRet;
				}
				LA6: ;
				res_dBqJ9biAHlqcB0S3Zb0ahAw_2 += ((NI) 1);
			} LA3: ;
		}
	}
	result0 = ((NI) -1);
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NIM_BOOL, contains_6e5MGL10HDAJ205lBYpWxw)(NimStringDesc* s0, NIM_CHAR c0) {
	NIM_BOOL result0;
	NI LOC1;
{	result0 = (NIM_BOOL)0;
	LOC1 = (NI)0;
	LOC1 = nsuFindChar(s0, c0, ((NI) 0));
	result0 = (((NI) 0) <= LOC1);
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuJoinSep)(NimStringDesc** a0, NI a0Len0, NimStringDesc* sep0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	{
		NI L0;
		if (!(((NI) 0) < a0Len0)) goto LA3;
		L0 = (NI)((sep0 ? sep0->Sup.len : 0) * (NI)(a0Len0 - ((NI) 1)));
		{
			NI i_fREibIaKmq2zYiljMJVMRQ;
			NI HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA;
			NI res_on8ifzaDBjEBmA4tjFkP9bQ;
			i_fREibIaKmq2zYiljMJVMRQ = (NI)0;
			HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA = (NI)0;
			HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA = (a0Len0-1);
			res_on8ifzaDBjEBmA4tjFkP9bQ = ((NI) 0);
			{
				while (1) {
					if (!(res_on8ifzaDBjEBmA4tjFkP9bQ <= HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA)) goto LA7;
					i_fREibIaKmq2zYiljMJVMRQ = res_on8ifzaDBjEBmA4tjFkP9bQ;
					L0 += (a0[i_fREibIaKmq2zYiljMJVMRQ] ? a0[i_fREibIaKmq2zYiljMJVMRQ]->Sup.len : 0);
					res_on8ifzaDBjEBmA4tjFkP9bQ += ((NI) 1);
				} LA7: ;
			}
		}
		result0 = rawNewString(((NI) (L0)));
		result0 = resizeString(result0, a0[((NI) 0)]->Sup.len + 0);
appendString(result0, a0[((NI) 0)]);
		{
			NI i_fREibIaKmq2zYiljMJVMRQ_2;
			NI HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA_2;
			NI res_on8ifzaDBjEBmA4tjFkP9bQ_2;
			i_fREibIaKmq2zYiljMJVMRQ_2 = (NI)0;
			HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA_2 = (NI)0;
			HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA_2 = (a0Len0-1);
			res_on8ifzaDBjEBmA4tjFkP9bQ_2 = ((NI) 1);
			{
				while (1) {
					if (!(res_on8ifzaDBjEBmA4tjFkP9bQ_2 <= HEX3Atmp_l8p5x5I1Hq3gH840mqBnBA_2)) goto LA10;
					i_fREibIaKmq2zYiljMJVMRQ_2 = res_on8ifzaDBjEBmA4tjFkP9bQ_2;
					result0 = resizeString(result0, sep0->Sup.len + 0);
appendString(result0, sep0);
					result0 = resizeString(result0, a0[i_fREibIaKmq2zYiljMJVMRQ_2]->Sup.len + 0);
appendString(result0, a0[i_fREibIaKmq2zYiljMJVMRQ_2]);
					res_on8ifzaDBjEBmA4tjFkP9bQ_2 += ((NI) 1);
				} LA10: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		result0 = copyString(((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_6));
	}
	LA1: ;
	return result0;
}

N_NIMCALL(NI, nsuFindStr)(NimStringDesc* s0, NimStringDesc* sub0, NI start0) {
	NI result0;
	TY_9cc9aPiDa8VaWjVcFLabEDZQ a0;
	result0 = (NI)0;
	preprocesssub_IhQT0o4blhF4hbhCz0srsw(sub0, a0);
	result0 = findaux_twow8DFxO4IDgSmpDGkD0g(s0, sub0, ((NI) (start0)), a0);
	return result0;
}

N_NIMCALL(TY_sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitChar)(NimStringDesc* s0, NIM_CHAR sep0, NI maxsplit0) {
	TY_sM4lkSb7zS6F7OVMvW9cffQ* result0;
	result0 = (TY_sM4lkSb7zS6F7OVMvW9cffQ*)0;
	result0 = (TY_sM4lkSb7zS6F7OVMvW9cffQ*) newSeq((&NTI_sM4lkSb7zS6F7OVMvW9cffQ), 0);
	{
		NimStringDesc* x_i1RTC8M8gCw2O9bxltRP9bug;
		NI last_aZS3H8Em9avjIiTx5gJVWWg;
		NI splits_1KoAqytD225d59az3YUN6QQ;
		x_i1RTC8M8gCw2O9bxltRP9bug = (NimStringDesc*)0;
		last_aZS3H8Em9avjIiTx5gJVWWg = ((NI) 0);
		splits_1KoAqytD225d59az3YUN6QQ = maxsplit0;
		{
			if (!(((NI) 0) < (s0 ? s0->Sup.len : 0))) goto LA4;
			{
				while (1) {
					NI first_PdTEqNTipVVUckMLTj8beg;
					NimStringDesc* LOC16;
					if (!(last_aZS3H8Em9avjIiTx5gJVWWg <= (s0 ? s0->Sup.len : 0))) goto LA7;
					first_PdTEqNTipVVUckMLTj8beg = last_aZS3H8Em9avjIiTx5gJVWWg;
					{
						while (1) {
							NIM_BOOL LOC10;
							LOC10 = (NIM_BOOL)0;
							LOC10 = (last_aZS3H8Em9avjIiTx5gJVWWg < (s0 ? s0->Sup.len : 0));
							if (!(LOC10)) goto LA11;
							LOC10 = !(((NU8)(s0->data[last_aZS3H8Em9avjIiTx5gJVWWg]) == (NU8)(sep0)));
							LA11: ;
							if (!LOC10) goto LA9;
							last_aZS3H8Em9avjIiTx5gJVWWg += ((NI) 1);
						} LA9: ;
					}
					{
						if (!(splits_1KoAqytD225d59az3YUN6QQ == ((NI) 0))) goto LA14;
						last_aZS3H8Em9avjIiTx5gJVWWg = (s0 ? s0->Sup.len : 0);
					}
					LA14: ;
					x_i1RTC8M8gCw2O9bxltRP9bug = copyStrLast(s0, first_PdTEqNTipVVUckMLTj8beg, (NI)(last_aZS3H8Em9avjIiTx5gJVWWg - ((NI) 1)));
					result0 = (TY_sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV2(&(result0)->Sup, sizeof(NimStringDesc*));
					LOC16 = (NimStringDesc*)0;
					LOC16 = result0->data[result0->Sup.len]; result0->data[result0->Sup.len] = copyStringRC1(x_i1RTC8M8gCw2O9bxltRP9bug);
					if (LOC16) nimGCunrefNoCycle(LOC16);
					++result0->Sup.len;
					{
						if (!(splits_1KoAqytD225d59az3YUN6QQ == ((NI) 0))) goto LA19;
						goto LA6;
					}
					LA19: ;
					splits_1KoAqytD225d59az3YUN6QQ -= ((NI) 1);
					last_aZS3H8Em9avjIiTx5gJVWWg += ((NI) 1);
				} LA7: ;
			} LA6: ;
		}
		LA4: ;
	}
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s0, NimStringDesc* prefix0, NimStringDesc* suffix0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = rawNewString(((NI) ((NI)((s0 ? s0->Sup.len : 0) + (NI)((NU32)((s0 ? s0->Sup.len : 0)) >> (NU32)(((NI) 2)))))));
	result0 = resizeString(result0, prefix0->Sup.len + 0);
appendString(result0, prefix0);
	{
		NIM_CHAR c_YVXQcNuWEzuXn6dlnxCkxg;
		NI i_ITzZJ02U1apTS7zwtlf6FQ;
		NI L_c1dMvDAXseN0SGb0n7Q9asg;
		c_YVXQcNuWEzuXn6dlnxCkxg = (NIM_CHAR)0;
		i_ITzZJ02U1apTS7zwtlf6FQ = ((NI) 0);
		L_c1dMvDAXseN0SGb0n7Q9asg = (s0 ? s0->Sup.len : 0);
		{
			while (1) {
				if (!(i_ITzZJ02U1apTS7zwtlf6FQ < L_c1dMvDAXseN0SGb0n7Q9asg)) goto LA3;
				c_YVXQcNuWEzuXn6dlnxCkxg = s0->data[i_ITzZJ02U1apTS7zwtlf6FQ];
				switch (((NU8)(c_YVXQcNuWEzuXn6dlnxCkxg))) {
				case 0 ... 31:
				case 128 ... 255:
				{
					NimStringDesc* LOC5;
					result0 = resizeString(result0, 2);
appendString(result0, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_7));
					LOC5 = (NimStringDesc*)0;
					LOC5 = nsuToHex(((NI64) (((NU8)(c_YVXQcNuWEzuXn6dlnxCkxg)))), ((NI) 2));
					result0 = resizeString(result0, LOC5->Sup.len + 0);
appendString(result0, LOC5);
				}
				break;
				case 92:
				{
					result0 = resizeString(result0, 2);
appendString(result0, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_8));
				}
				break;
				case 39:
				{
					result0 = resizeString(result0, 2);
appendString(result0, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_9));
				}
				break;
				case 34:
				{
					result0 = resizeString(result0, 2);
appendString(result0, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_10));
				}
				break;
				default:
				{
					result0 = addChar(result0, c_YVXQcNuWEzuXn6dlnxCkxg);
				}
				break;
				}
				i_ITzZJ02U1apTS7zwtlf6FQ += ((NI) 1);
			} LA3: ;
		}
	}
	result0 = resizeString(result0, suffix0->Sup.len + 0);
appendString(result0, suffix0);
	return result0;
}

N_NIMCALL(void, nsuDelete)(NimStringDesc** s0, NI first0, NI last0) {
	NI i0;
	NI j0;
	NI newlen0;
	i0 = first0;
	j0 = (NI)(last0 + ((NI) 1));
	newlen0 = (NI)((NI)(((*s0) ? (*s0)->Sup.len : 0) - j0) + i0);
	{
		while (1) {
			if (!(i0 < newlen0)) goto LA2;
			(*s0)->data[i0] = (*s0)->data[j0];
			i0 += ((NI) 1);
			j0 += ((NI) 1);
		} LA2: ;
	}
	(*s0) = setLengthStr((*s0), ((NI) (newlen0)));
}

N_NIMCALL(NimStringDesc*, nsuToLowerStr)(NimStringDesc* s0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = nsuToLowerAsciiStr(s0);
	return result0;
}

N_NIMCALL(NIM_BOOL, allcharsinset_wVfr4F6j4mVzI8ggLoMVdw)(NimStringDesc* s0, TY_nmiMWKVIe46vacnhAFrQvw_Set theset0) {
	NIM_BOOL result0;
{	result0 = (NIM_BOOL)0;
	{
		NIM_CHAR c_OfX9ahk9c2gxTAqT6o9cLontQ;
		NI i_YukgSFsRpghxM0a8yZJrxw;
		NI L_yJ2xOhbK0cwCgg3gx7kF9cg;
		c_OfX9ahk9c2gxTAqT6o9cLontQ = (NIM_CHAR)0;
		i_YukgSFsRpghxM0a8yZJrxw = ((NI) 0);
		L_yJ2xOhbK0cwCgg3gx7kF9cg = (s0 ? s0->Sup.len : 0);
		{
			while (1) {
				if (!(i_YukgSFsRpghxM0a8yZJrxw < L_yJ2xOhbK0cwCgg3gx7kF9cg)) goto LA3;
				c_OfX9ahk9c2gxTAqT6o9cLontQ = s0->data[i_YukgSFsRpghxM0a8yZJrxw];
				{
					if (!!(((theset0[(NU)(((NU8)(c_OfX9ahk9c2gxTAqT6o9cLontQ)))>>3] &(1U<<((NU)(((NU8)(c_OfX9ahk9c2gxTAqT6o9cLontQ)))&7U)))!=0))) goto LA6;
					result0 = NIM_FALSE;
					goto BeforeRet;
				}
				LA6: ;
				i_YukgSFsRpghxM0a8yZJrxw += ((NI) 1);
			} LA3: ;
		}
	}
	result0 = NIM_TRUE;
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(NI, nsuCountLines)(NimStringDesc* s0) {
	NI result0;
	NI i0;
	result0 = (NI)0;
	i0 = ((NI) 0);
	{
		while (1) {
			if (!(i0 < (s0 ? s0->Sup.len : 0))) goto LA2;
			switch (((NU8)(s0->data[i0]))) {
			case 13:
			{
				{
					if (!((NU8)(s0->data[(NI)(i0 + ((NI) 1))]) == (NU8)(10))) goto LA6;
					i0 += ((NI) 1);
				}
				LA6: ;
				result0 += ((NI) 1);
			}
			break;
			case 10:
			{
				result0 += ((NI) 1);
			}
			break;
			default:
			{
			}
			break;
			}
			i0 += ((NI) 1);
		} LA2: ;
	}
	return result0;
}

N_NIMCALL(NIM_BOOL, nsuContinuesWith)(NimStringDesc* s0, NimStringDesc* substr0, NI start0) {
	NIM_BOOL result0;
	NI i0;
{	result0 = (NIM_BOOL)0;
	i0 = ((NI) 0);
	{
		while (1) {
			{
				if (!((NU8)(substr0->data[i0]) == (NU8)(0))) goto LA5;
				result0 = NIM_TRUE;
				goto BeforeRet;
			}
			LA5: ;
			{
				if (!!(((NU8)(s0->data[(NI)(i0 + ((NI) (start0)))]) == (NU8)(substr0->data[i0])))) goto LA9;
				result0 = NIM_FALSE;
				goto BeforeRet;
			}
			LA9: ;
			i0 += ((NI) 1);
		}
	}
	}BeforeRet: ;
	return result0;
}

static N_INLINE(void, appendChar)(NimStringDesc* dest0, NIM_CHAR c0) {
	(*dest0).data[((*dest0).Sup.len)- 0] = c0;
	(*dest0).data[((NI)((*dest0).Sup.len + ((NI) 1)))- 0] = 0;
	(*dest0).Sup.len += ((NI) 1);
}

N_NIMCALL(NimStringDesc*, nsuIntToStr)(NI x0, NI minchars0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = nimIntToStr((x0 > 0? (x0) : -(x0)));
	{
		NI i_0WI5azliNHYkVYV8ChzA6A;
		NI HEX3Atmp_fSOxXjlVMUMPmJjXyPHj4Q;
		NI res_9aPdOY13II9avtAIzc2NHzgg;
		i_0WI5azliNHYkVYV8ChzA6A = (NI)0;
		HEX3Atmp_fSOxXjlVMUMPmJjXyPHj4Q = (NI)0;
		HEX3Atmp_fSOxXjlVMUMPmJjXyPHj4Q = (NI)(((NI) (minchars0)) - (result0 ? result0->Sup.len : 0));
		res_9aPdOY13II9avtAIzc2NHzgg = ((NI) 1);
		{
			while (1) {
				NimStringDesc* LOC4;
				if (!(res_9aPdOY13II9avtAIzc2NHzgg <= HEX3Atmp_fSOxXjlVMUMPmJjXyPHj4Q)) goto LA3;
				i_0WI5azliNHYkVYV8ChzA6A = res_9aPdOY13II9avtAIzc2NHzgg;
				LOC4 = (NimStringDesc*)0;
				LOC4 = rawNewString(result0->Sup.len + 1);
appendChar(LOC4, 48);
appendString(LOC4, result0);
				result0 = LOC4;
				res_9aPdOY13II9avtAIzc2NHzgg += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NimStringDesc* LOC9;
		if (!(x0 < ((NI) 0))) goto LA7;
		LOC9 = (NimStringDesc*)0;
		LOC9 = rawNewString(result0->Sup.len + 1);
appendChar(LOC9, 45);
appendString(LOC9, result0);
		result0 = LOC9;
	}
	LA7: ;
	return result0;
}

N_NIMCALL(NIM_CHAR, nsuToUpperAsciiChar)(NIM_CHAR c0) {
	NIM_CHAR result0;
	result0 = (NIM_CHAR)0;
	{
		if (!(((NU8)(c0)) >= ((NU8)(97)) && ((NU8)(c0)) <= ((NU8)(122)))) goto LA3;
		result0 = ((NIM_CHAR) (((NI) ((NI)(((NI) (((NU8)(c0)))) - ((NI) 32))))));
	}
	goto LA1;
	LA3: ;
	{
		result0 = c0;
	}
	LA1: ;
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuRepeatStr)(NimStringDesc* s0, NI n0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = rawNewString(((NI) ((NI)(((NI) (n0)) * (s0 ? s0->Sup.len : 0)))));
	{
		NI i_3GQd65NoQ8GRAK9aKcUCkqQ_2;
		NI res_ZCK9av0K5RQEcyuf9cJ7G5eg_2;
		i_3GQd65NoQ8GRAK9aKcUCkqQ_2 = (NI)0;
		res_ZCK9av0K5RQEcyuf9cJ7G5eg_2 = ((NI) 1);
		{
			while (1) {
				if (!(res_ZCK9av0K5RQEcyuf9cJ7G5eg_2 <= ((NI) (n0)))) goto LA3;
				i_3GQd65NoQ8GRAK9aKcUCkqQ_2 = ((NI) (res_ZCK9av0K5RQEcyuf9cJ7G5eg_2));
				result0 = resizeString(result0, s0->Sup.len + 0);
appendString(result0, s0);
				res_ZCK9av0K5RQEcyuf9cJ7G5eg_2 += ((NI) 1);
			} LA3: ;
		}
	}
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuReplaceChar)(NimStringDesc* s0, NIM_CHAR sub0, NIM_CHAR by0) {
	NimStringDesc* result0;
	NI i0;
	result0 = (NimStringDesc*)0;
	result0 = mnewString(((NI) ((s0 ? s0->Sup.len : 0))));
	i0 = ((NI) 0);
	{
		while (1) {
			if (!(i0 < (s0 ? s0->Sup.len : 0))) goto LA2;
			{
				if (!((NU8)(s0->data[i0]) == (NU8)(sub0))) goto LA5;
				result0->data[i0] = by0;
			}
			goto LA3;
			LA5: ;
			{
				result0->data[i0] = s0->data[i0];
			}
			LA3: ;
			i0 += ((NI) 1);
		} LA2: ;
	}
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuformatBiggestFloat)(NF f0, Floatformatmode_pNvEoaqwoxKyoASD11vSgQ format0, NI precision0, NIM_CHAR decimalsep0) {
	NimStringDesc* result0;
	TY_9bPFPkkEEeeNM9bKgiV8Q49cg frmtstr0;
	TY_Kn8ZOVsorvcNLB4isUeMzQ buf0;
	int L0;
	result0 = (NimStringDesc*)0;
	L0 = (int)0;
	frmtstr0[(((NI) 0))- 0] = 37;
	{
		if (!(((NI) 0) < ((NI) (precision0)))) goto LA3;
		frmtstr0[(((NI) 1))- 0] = 35;
		frmtstr0[(((NI) 2))- 0] = 46;
		frmtstr0[(((NI) 3))- 0] = 42;
		frmtstr0[(((NI) 4))- 0] = floatformattochar_WVISPus3ZqCVSuP9bzn9cVxw[(format0)- 0];
		frmtstr0[(((NI) 5))- 0] = 0;
		L0 = sprintf(((NCSTRING) (buf0)), ((NCSTRING) (frmtstr0)), precision0, f0);
	}
	goto LA1;
	LA3: ;
	{
		frmtstr0[(((NI) 1))- 0] = floatformattochar_WVISPus3ZqCVSuP9bzn9cVxw[(format0)- 0];
		frmtstr0[(((NI) 2))- 0] = 0;
		L0 = sprintf(((NCSTRING) (buf0)), ((NCSTRING) (frmtstr0)), f0);
	}
	LA1: ;
	result0 = mnewString(((NI) (L0)));
	{
		int i_79aZpkWszIJKpa3OfOokBJQ;
		int i_79aZpkWszIJKpa3OfOokBJQ_2;
		i_79aZpkWszIJKpa3OfOokBJQ = (int)0;
		i_79aZpkWszIJKpa3OfOokBJQ_2 = ((int) 0);
		{
			while (1) {
				if (!(i_79aZpkWszIJKpa3OfOokBJQ_2 < L0)) goto LA8;
				i_79aZpkWszIJKpa3OfOokBJQ = i_79aZpkWszIJKpa3OfOokBJQ_2;
				{
					if (!(((NU8)(buf0[(i_79aZpkWszIJKpa3OfOokBJQ)- 0])) == ((NU8)(46)) || ((NU8)(buf0[(i_79aZpkWszIJKpa3OfOokBJQ)- 0])) == ((NU8)(44)))) goto LA11;
					result0->data[i_79aZpkWszIJKpa3OfOokBJQ] = decimalsep0;
				}
				goto LA9;
				LA11: ;
				{
					result0->data[i_79aZpkWszIJKpa3OfOokBJQ] = buf0[(i_79aZpkWszIJKpa3OfOokBJQ)- 0];
				}
				LA9: ;
				i_79aZpkWszIJKpa3OfOokBJQ_2 += ((NI) 1);
			} LA8: ;
		}
	}
	return result0;
}

N_NIMCALL(NimStringDesc*, nsuformatFloat)(NF f0, Floatformatmode_pNvEoaqwoxKyoASD11vSgQ format0, NI precision0, NIM_CHAR decimalsep0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = nsuformatBiggestFloat(f0, format0, precision0, decimalsep0);
	return result0;
}

static N_INLINE(NI, find_b3HPX1XboPhUmnxkTjazFQstrutils)(NIM_CHAR* a0, NI a0Len0, NIM_CHAR item0) {
	NI result0;
{	result0 = (NI)0;
	{
		NIM_CHAR i_PK51OczLhe60IMTnpDtj2Q;
		NI i_PK51OczLhe60IMTnpDtj2Q_2;
		i_PK51OczLhe60IMTnpDtj2Q = (NIM_CHAR)0;
		i_PK51OczLhe60IMTnpDtj2Q_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_PK51OczLhe60IMTnpDtj2Q_2 < a0Len0)) goto LA3;
				i_PK51OczLhe60IMTnpDtj2Q = a0[i_PK51OczLhe60IMTnpDtj2Q_2];
				{
					if (!((NU8)(i_PK51OczLhe60IMTnpDtj2Q) == (NU8)(item0))) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				result0 += ((NI) 1);
				i_PK51OczLhe60IMTnpDtj2Q_2 += ((NI) 1);
			} LA3: ;
		}
	}
	result0 = ((NI) -1);
	}BeforeRet: ;
	return result0;
}

static N_INLINE(NIM_BOOL, contains_I9cy9aN2znlBRynMcXN4pBGgstrutils)(NIM_CHAR* a0, NI a0Len0, NIM_CHAR item0) {
	NIM_BOOL result0;
	NI LOC1;
{	result0 = (NIM_BOOL)0;
	LOC1 = (NI)0;
	LOC1 = find_b3HPX1XboPhUmnxkTjazFQstrutils(a0, a0Len0, item0);
	result0 = (((NI) 0) <= LOC1);
	goto BeforeRet;
	}BeforeRet: ;
	return result0;
}

N_NIMCALL(void, trimzeros_CU4YpFC2uPFH9bObBQmGWxQ)(NimStringDesc** x0) {
	TY_sM4lkSb7zS6F7OVMvW9cffQ* spl0;
	spl0 = (TY_sM4lkSb7zS6F7OVMvW9cffQ*)0;
	{
		NIM_BOOL LOC3;
		LOC3 = (NIM_BOOL)0;
		LOC3 = contains_6e5MGL10HDAJ205lBYpWxw((*x0), 46);
		if (LOC3) goto LA4;
		LOC3 = contains_6e5MGL10HDAJ205lBYpWxw((*x0), 44);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			LOC9 = (NIM_BOOL)0;
			LOC9 = contains_6e5MGL10HDAJ205lBYpWxw((*x0), 101);
			if (!LOC9) goto LA10;
			spl0 = nsuSplitChar((*x0), 101, ((NI) -1));
			unsureAsgnRef((void**) (&(*x0)), copyString(spl0->data[((NI) 0)]));
		}
		LA10: ;
		{
			while (1) {
				if (!((NU8)((*x0)->data[((*x0) ? ((*x0)->Sup.len-1) : -1)]) == (NU8)(48))) goto LA13;
				(*x0) = setLengthStr((*x0), ((NI) ((NI)(((*x0) ? (*x0)->Sup.len : 0) - ((NI) 1)))));
			} LA13: ;
		}
		{
			NIM_BOOL LOC16;
			LOC16 = (NIM_BOOL)0;
			LOC16 = contains_I9cy9aN2znlBRynMcXN4pBGgstrutils(T_JGc9b9bh2D3nTdUR7TGyq8aA_27, 2, (*x0)->data[((*x0) ? ((*x0)->Sup.len-1) : -1)]);
			if (!LOC16) goto LA17;
			(*x0) = setLengthStr((*x0), ((NI) ((NI)(((*x0) ? (*x0)->Sup.len : 0) - ((NI) 1)))));
		}
		LA17: ;
		{
			NimStringDesc* LOC23;
			if (!(((NI) 0) < (spl0 ? spl0->Sup.len : 0))) goto LA21;
			LOC23 = (NimStringDesc*)0;
			LOC23 = rawNewString(spl0->data[((NI) 1)]->Sup.len + 1);
appendString(LOC23, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_28));
appendString(LOC23, spl0->data[((NI) 1)]);
			(*x0) = resizeString((*x0), LOC23->Sup.len + 0);
appendString((*x0), LOC23);
		}
		LA21: ;
	}
	LA5: ;
}

N_NIMCALL(NimStringDesc*, formatsize_8aoLAblb8HIhlUjVE2aAnA)(NI64 bytes0, NIM_CHAR decimalsep0, Binaryprefixmode_nDtrM19b3byM8T9ab2m7BwvA prefix0, NIM_BOOL includespace0) {
	NimStringDesc* result0;
	NI64 xb0;
	NF fbytes0;
	NI64 lastxb0;
	NI matchedindex0;
	TY_17w6ns39bmjfAZ429aQpCFUA prefixes0;
	result0 = (NimStringDesc*)0;
	xb0 = bytes0;
	fbytes0 = (NF)0;
	lastxb0 = bytes0;
	matchedindex0 = (NI)0;
	memset((void*)prefixes0, 0, sizeof(prefixes0));
	{
		if (!(prefix0 == ((Binaryprefixmode_nDtrM19b3byM8T9ab2m7BwvA) 1))) goto LA3;
		genericAssign((void*)prefixes0, (void*)collprefixes_biGTDQtLn0RX9aMOaFztEcQ, (&NTI_17w6ns39bmjfAZ429aQpCFUA));
	}
	goto LA1;
	LA3: ;
	{
		genericAssign((void*)prefixes0, (void*)iecprefixes_sg9cD5AlNYzrrY1lS9aWp9bJA, (&NTI_17w6ns39bmjfAZ429aQpCFUA));
	}
	LA1: ;
	{
		NI index_oYVnXh8jBVoZWBNoHJ6AQw;
		NI i_pOraFFyI46cInrVwexR9bZQ;
		index_oYVnXh8jBVoZWBNoHJ6AQw = (NI)0;
		i_pOraFFyI46cInrVwexR9bZQ = ((NI) 1);
		{
			while (1) {
				if (!(i_pOraFFyI46cInrVwexR9bZQ < ((NI) 9))) goto LA8;
				index_oYVnXh8jBVoZWBNoHJ6AQw = i_pOraFFyI46cInrVwexR9bZQ;
				lastxb0 = xb0;
				xb0 = (NI64)(bytes0 / (NI64)((NU64)(IL64(1)) << (NU64)((NI)(index_oYVnXh8jBVoZWBNoHJ6AQw * ((NI) 10)))));
				matchedindex0 = index_oYVnXh8jBVoZWBNoHJ6AQw;
				{
					if (!(xb0 == IL64(0))) goto LA11;
					xb0 = lastxb0;
					matchedindex0 = (NI)(index_oYVnXh8jBVoZWBNoHJ6AQw - ((NI) 1));
					goto LA6;
				}
				LA11: ;
				i_pOraFFyI46cInrVwexR9bZQ += ((NI) 1);
			} LA8: ;
		}
	} LA6: ;
	fbytes0 = ((NF)(((NF) (bytes0))) / (NF)(((NF) ((NI64)((NU64)(IL64(1)) << (NU64)((NI)(matchedindex0 * ((NI) 10))))))));
	result0 = nsuformatFloat(fbytes0, ((Floatformatmode_pNvEoaqwoxKyoASD11vSgQ) 1), ((NI) 3), decimalsep0);
	trimzeros_CU4YpFC2uPFH9bObBQmGWxQ((&result0));
	{
		if (!includespace0) goto LA15;
		result0 = resizeString(result0, 1);
appendString(result0, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_29));
	}
	LA15: ;
	result0 = resizeString(result0, prefixes0[(matchedindex0)- 0]->Sup.len + 0);
appendString(result0, prefixes0[(matchedindex0)- 0]);
	result0 = resizeString(result0, 1);
appendString(result0, ((NimStringDesc*) &T_JGc9b9bh2D3nTdUR7TGyq8aA_30));
	return result0;
}
NIM_EXTERNC N_NOINLINE(void, stdlib_strutilsInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_strutilsDatInit000)(void) {
NTI_17w6ns39bmjfAZ429aQpCFUA.size = sizeof(TY_17w6ns39bmjfAZ429aQpCFUA);
NTI_17w6ns39bmjfAZ429aQpCFUA.kind = 16;
NTI_17w6ns39bmjfAZ429aQpCFUA.base = (&NTI_77mFvmsOLKik79ci2hXkHEg);
NTI_17w6ns39bmjfAZ429aQpCFUA.flags = 2;
}

