1 /* Generated by Nim Compiler v1.6.2 */
2 #define NIM_INTBITS 64
3 
4 #include "nimbase.h"
5 #include <string.h>
6 #undef LANGUAGE_C
7 #undef MIPSEB
8 #undef MIPSEL
9 #undef PPC
10 #undef R3000
11 #undef R4000
12 #undef i386
13 #undef linux
14 #undef mips
15 #undef near
16 #undef far
17 #undef powerpc
18 #undef unix
19 #define nimfr_(x, y)
20 #define nimln_(x, y)
21 typedef struct TNimType TNimType;
22 typedef struct TNimNode TNimNode;
23 typedef struct tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg;
24 typedef struct RootObj RootObj;
25 typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
26 typedef struct NimStringDesc NimStringDesc;
27 typedef struct TGenericSeq TGenericSeq;
28 typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
29 typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
30 typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
31 typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
32 typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
33 typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
34 typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
35 typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
36 typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
37 typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
38 typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
39 typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
40 typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
41 typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
42 typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
43 typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
44 typedef struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA;
45 typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
46 typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
47 typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
48 typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
49 struct TNimType {
50 NI size;
51 NI align;
52 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
53 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
54 TNimType* base;
55 TNimNode* node;
56 void* finalizer;
57 tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
58 tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
59 };
60 typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
61 struct TNimNode {
62 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
63 NI offset;
64 TNimType* typ;
65 NCSTRING name;
66 NI len;
67 TNimNode** sons;
68 };
69 struct RootObj {
70 TNimType* m_type;
71 };
72 typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
73 typedef NU8 tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA;
74 struct TGenericSeq {
75 NI len;
76 NI reserved;
77 };
78 struct NimStringDesc {
79   TGenericSeq Sup;
80 NIM_CHAR data[SEQ_DECL_SIZE];
81 };
82 struct tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg {
83   RootObj Sup;
84 NI pos;
85 NIM_BOOL inShortState;
86 NIM_BOOL allowWhitespaceAfterColon;
87 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw shortNoVal;
88 tySequence__sM4lkSb7zS6F7OVMvW9cffQ* longNoVal;
89 tySequence__sM4lkSb7zS6F7OVMvW9cffQ* cmds;
90 NI idx;
91 tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA kind;
92 NimStringDesc* key;
93 NimStringDesc* val;
94 };
95 struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
96 NI refcount;
97 TNimType* typ;
98 };
99 struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
100 void* bottom;
101 };
102 struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
103 NI len;
104 NI cap;
105 tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
106 };
107 typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
108 typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
109 typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
110 typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
111 typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
112 struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
113 tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
114 };
115 typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
116 struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
117 tyArray__0aOLqZchNi8nWtMTi8ND8w link;
118 NI key;
119 NI upperBound;
120 NI level;
121 };
122 struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
123 tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
124 NI Field1;
125 };
126 typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
127 struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
128 NI len;
129 tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
130 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
131 };
132 struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
133 NI minLargeObj;
134 NI maxLargeObj;
135 tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
136 NU32 flBitmap;
137 tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
138 tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
139 tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
140 NI currMem;
141 NI maxMem;
142 NI freeMem;
143 NI occ;
144 NI lastSize;
145 tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
146 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
147 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
148 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
149 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
150 NIM_BOOL locked;
151 NIM_BOOL blockChunkSizeIncrease;
152 NI nextChunkSize;
153 tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
154 tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
155 };
156 struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
157 NI stackScans;
158 NI cycleCollections;
159 NI maxThreshold;
160 NI maxStackSize;
161 NI maxStackCells;
162 NI cycleTableSize;
163 NI64 maxPause;
164 };
165 struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
166 NI counter;
167 NI max;
168 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
169 tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
170 };
171 struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
172 tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
173 NI cycleThreshold;
174 NI zctThreshold;
175 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
176 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
177 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
178 NI recGcLock;
179 tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
180 tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
181 tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
182 tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
183 NI gcThreadId;
184 };
185 typedef NU8 tyArray__S8ib5N31oJbAkqOZTlNg5Q[8192];
186 struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA {
187 NI a;
188 NI b;
189 };
190 struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
191   TGenericSeq Sup;
192   NimStringDesc* data[SEQ_DECL_SIZE];
193 };
194 N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
195 static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
196 N_LIB_PRIVATE N_NIMCALL(void, genericSeqAssign)(void* dest, void* src, TNimType* mt);
197 N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, nosparseCmdLine)(NimStringDesc* c);
198 N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, newSeq__systemZio_501)(NI len);
199 N_LIB_PRIVATE N_NIMCALL(NI, paramCount__pureZos_1535)(void);
200 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, paramStr__pureZos_1529)(NI i);
201 static N_INLINE(void, asgnRef)(void** dest, void* src);
202 static N_INLINE(void, incRef__system_5317)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
203 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
204 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5279)(void* usr);
205 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
206 static N_INLINE(void, decRef__system_5324)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
207 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
208 static N_INLINE(void, rtlAddZCT__system_5322)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
209 N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5273)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
210 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newLen);
211 N_LIB_PRIVATE N_NIMCALL(void, handleShortOption__pureZparseopt_127)(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg* p, NimStringDesc* cmd);
212 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
213 static N_INLINE(NI, cardSet)(tyArray__S8ib5N31oJbAkqOZTlNg5Q s, NI len);
214 static N_INLINE(NI, countBits64)(NU64 n);
215 static N_INLINE(NI, countSetBitsImpl__systemZcountbits95impl_61)(NU64 x);
216 N_CDECL(int, __builtin_popcountll)(unsigned long long x);
217 static N_INLINE(NI, countBits32)(NU32 n);
218 static N_INLINE(NI, countSetBitsImpl__systemZcountbits95impl_26)(NU32 x);
219 N_CDECL(int, __builtin_popcount)(unsigned int x);
220 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, substr__system_7766)(NimStringDesc* s, NI first);
221 N_LIB_PRIVATE N_NIMCALL(NI, parseWord__pureZparseopt_25)(NimStringDesc* s, NI i, NimStringDesc** w, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw delim);
222 static N_INLINE(NIM_BOOL, contains__stdZenumutils_43)(NimStringDesc** a, NI aLen_0, NimStringDesc* item);
223 static N_INLINE(NI, find__stdZenumutils_48)(NimStringDesc** a, NI aLen_0, NimStringDesc* item);
224 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
225 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size);
226 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
227 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
228 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, quoteShellCommand__pureZos_601)(NimStringDesc** args, NI argsLen_0);
229 N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, X5BX5D___pureZparseopt_275)(NimStringDesc** s, NI sLen_0, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA x);
230 N_LIB_PRIVATE N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
231 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
232 static N_INLINE(void, nimGCunrefNoCycle)(void* p);
233 static N_INLINE(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA, dotdot___stdZenumutils_80)(NI a, NI b);
234 static N_INLINE(void, nimZeroMem)(void* p, NI size);
235 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
236 extern TNimType NTIrootobj__ytyiCJqK439aF9cIibuRVpAg_;
237 N_LIB_PRIVATE TNimType NTIoptparser__l9cyoK9aLLTUH7LBRIbLqETg_;
238 extern TNimType NTIint__rR5Bzr1D5krxoo1NcNyeMA_;
239 extern TNimType NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_;
240 extern TNimType NTIchar__nmiMWKVIe46vacnhAFrQvw_;
241 N_LIB_PRIVATE TNimType NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_;
242 extern TNimType NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_;
243 N_LIB_PRIVATE TNimType NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_;
244 extern TNimType NTIstring__77mFvmsOLKik79ci2hXkHEg_;
245 static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__GYgvYKeHVTEls0AcywABHQ_6 = {
246 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x24,
247 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
248 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
249 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
250 ;
251 extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5226;
N_INLINE(void,nimCopyMem)252 static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
253 	void* T1_;
254 	T1_ = (void*)0;
255 	T1_ = memcpy(dest, source, ((size_t) (size)));
256 }
N_INLINE(NI,pluspercent___system_696)257 static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
258 	NI result;
259 	result = (NI)0;
260 	result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
261 	return result;
262 }
N_INLINE(void,incRef__system_5317)263 static N_INLINE(void, incRef__system_5317)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
264 	(*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
265 }
N_INLINE(NI,minuspercent___system_716)266 static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
267 	NI result;
268 	result = (NI)0;
269 	result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
270 	return result;
271 }
N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g *,usrToCell__system_5279)272 static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5279)(void* usr) {
273 	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
274 	NI T1_;
275 	result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
276 	T1_ = (NI)0;
277 	T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
278 	result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
279 	return result;
280 }
N_INLINE(NIM_BOOL,ltpercent___system_1005)281 static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
282 	NIM_BOOL result;
283 	result = (NIM_BOOL)0;
284 	result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
285 	return result;
286 }
N_INLINE(void,rtlAddZCT__system_5322)287 static N_INLINE(void, rtlAddZCT__system_5322)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
288 	addZCT__system_5273((&gch__system_5226.zct), c);
289 }
N_INLINE(void,decRef__system_5324)290 static N_INLINE(void, decRef__system_5324)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
291 	(*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
292 	{
293 		NIM_BOOL T3_;
294 		T3_ = (NIM_BOOL)0;
295 		T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
296 		if (!T3_) goto LA4_;
297 		rtlAddZCT__system_5322(c);
298 	}
299 	LA4_: ;
300 }
N_INLINE(void,asgnRef)301 static N_INLINE(void, asgnRef)(void** dest, void* src) {
302 	{
303 		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
304 		if (!!((src == NIM_NIL))) goto LA3_;
305 		T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
306 		T5_ = usrToCell__system_5279(src);
307 		incRef__system_5317(T5_);
308 	}
309 	LA3_: ;
310 	{
311 		tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
312 		if (!!(((*dest) == NIM_NIL))) goto LA8_;
313 		T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
314 		T10_ = usrToCell__system_5279((*dest));
315 		decRef__system_5324(T10_);
316 	}
317 	LA8_: ;
318 	(*dest) = src;
319 }
N_NIMCALL(void,initOptParser__pureZparseopt_51)320 N_LIB_PRIVATE N_NIMCALL(void, initOptParser__pureZparseopt_51)(NimStringDesc* cmdline, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw shortNoVal, tySequence__sM4lkSb7zS6F7OVMvW9cffQ* longNoVal, NIM_BOOL allowWhitespaceAfterColon, tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg* Result) {
321 	(*Result).pos = 0;
322 	(*Result).inShortState = 0;
323 	(*Result).allowWhitespaceAfterColon = 0;
324 	unsureAsgnRef((void**)&(*Result).longNoVal, NIM_NIL);
325 	unsureAsgnRef((void**)&(*Result).cmds, NIM_NIL);
326 	(*Result).idx = 0;
327 	(*Result).kind = 0;
328 	unsureAsgnRef((void**)&(*Result).key, NIM_NIL);
329 	unsureAsgnRef((void**)&(*Result).val, NIM_NIL);
330 	(*Result).Sup.m_type = (&NTIoptparser__l9cyoK9aLLTUH7LBRIbLqETg_);
331 	(*Result).pos = ((NI) 0);
332 	(*Result).idx = ((NI) 0);
333 	(*Result).inShortState = NIM_FALSE;
334 	nimCopyMem((void*)(*Result).shortNoVal, (NIM_CONST void*)shortNoVal, 32);
335 	genericSeqAssign((&(*Result).longNoVal), longNoVal, (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_));
336 	(*Result).allowWhitespaceAfterColon = allowWhitespaceAfterColon;
337 	{
338 		if (!!(((cmdline ? cmdline->Sup.len : 0) == 0))) goto LA3_;
339 		unsureAsgnRef((void**) (&(*Result).cmds), nosparseCmdLine(cmdline));
340 	}
341 	goto LA1_;
342 	LA3_: ;
343 	{
344 		NI T6_;
345 		T6_ = (NI)0;
346 		T6_ = paramCount__pureZos_1535();
347 		unsureAsgnRef((void**) (&(*Result).cmds), newSeq__systemZio_501(((NI) (T6_))));
348 		{
349 			NI i;
350 			NI colontmp_;
351 			NI res;
352 			i = (NI)0;
353 			colontmp_ = (NI)0;
354 			colontmp_ = paramCount__pureZos_1535();
355 			res = ((NI) 1);
356 			{
357 				while (1) {
358 					if (!(res <= colontmp_)) goto LA9;
359 					i = res;
360 					asgnRef((void**) (&(*Result).cmds->data[(NI)(i - ((NI) 1))]), paramStr__pureZos_1529(i));
361 					res += ((NI) 1);
362 				} LA9: ;
363 			}
364 		}
365 	}
366 	LA1_: ;
367 	(*Result).kind = ((tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA) 0);
368 	unsureAsgnRef((void**) (&(*Result).key), ((NimStringDesc*) NIM_NIL));
369 	unsureAsgnRef((void**) (&(*Result).val), ((NimStringDesc*) NIM_NIL));
370 }
N_INLINE(NI,countSetBitsImpl__systemZcountbits95impl_61)371 static N_INLINE(NI, countSetBitsImpl__systemZcountbits95impl_61)(NU64 x) {
372 	NI result;
373 	int T1_;
374 	result = (NI)0;
375 	T1_ = (int)0;
376 	T1_ = __builtin_popcountll(x);
377 	result = ((NI) (T1_));
378 	return result;
379 }
N_INLINE(NI,countBits64)380 static N_INLINE(NI, countBits64)(NU64 n) {
381 	NI result;
382 	result = (NI)0;
383 	result = countSetBitsImpl__systemZcountbits95impl_61(n);
384 	return result;
385 }
N_INLINE(NI,countSetBitsImpl__systemZcountbits95impl_26)386 static N_INLINE(NI, countSetBitsImpl__systemZcountbits95impl_26)(NU32 x) {
387 	NI result;
388 	int T1_;
389 	result = (NI)0;
390 	T1_ = (int)0;
391 	T1_ = __builtin_popcount(x);
392 	result = ((NI) (T1_));
393 	return result;
394 }
N_INLINE(NI,countBits32)395 static N_INLINE(NI, countBits32)(NU32 n) {
396 	NI result;
397 	result = (NI)0;
398 	result = countSetBitsImpl__systemZcountbits95impl_26(n);
399 	return result;
400 }
N_INLINE(NI,cardSet)401 static N_INLINE(NI, cardSet)(tyArray__S8ib5N31oJbAkqOZTlNg5Q s, NI len) {
402 	NI result;
403 	NI i;
404 	result = (NI)0;
405 	i = ((NI) 0);
406 	result = ((NI) 0);
407 	{
408 		while (1) {
409 			NI T3_;
410 			if (!(i < (NI)(len - ((NI) 8)))) goto LA2;
411 			T3_ = (NI)0;
412 			T3_ = countBits64((*((NU64*) ((&s[(i)- 0])))));
413 			result += T3_;
414 			i += ((NI) 8);
415 		} LA2: ;
416 	}
417 	{
418 		while (1) {
419 			NI T6_;
420 			if (!(i < len)) goto LA5;
421 			T6_ = (NI)0;
422 			T6_ = countBits32(((NU32) (s[(i)- 0])));
423 			result += T6_;
424 			i += ((NI) 1);
425 		} LA5: ;
426 	}
427 	return result;
428 }
N_NIMCALL(void,handleShortOption__pureZparseopt_127)429 N_LIB_PRIVATE N_NIMCALL(void, handleShortOption__pureZparseopt_127)(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg* p, NimStringDesc* cmd) {
430 	NI i;
431 	i = (*p).pos;
432 	(*p).kind = ((tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA) 3);
433 	{
434 		if (!(i < (cmd ? cmd->Sup.len : 0))) goto LA3_;
435 		unsureAsgnRef((void**) (&(*p).key), addChar((*p).key, cmd->data[i]));
436 		i += ((NI) 1);
437 	}
438 	LA3_: ;
439 	(*p).inShortState = NIM_TRUE;
440 	{
441 		while (1) {
442 			NIM_BOOL T7_;
443 			T7_ = (NIM_BOOL)0;
444 			T7_ = (i < (cmd ? cmd->Sup.len : 0));
445 			if (!(T7_)) goto LA8_;
446 			T7_ = (((NU8)(cmd->data[i])) == ((NU8)(9)) || ((NU8)(cmd->data[i])) == ((NU8)(32)));
447 			LA8_: ;
448 			if (!T7_) goto LA6;
449 			i += ((NI) 1);
450 			(*p).inShortState = NIM_FALSE;
451 		} LA6: ;
452 	}
453 	{
454 		NIM_BOOL T11_;
455 		NIM_BOOL T13_;
456 		NIM_BOOL T15_;
457 		T11_ = (NIM_BOOL)0;
458 		T11_ = (i < (cmd ? cmd->Sup.len : 0));
459 		if (!(T11_)) goto LA12_;
460 		T13_ = (NIM_BOOL)0;
461 		T13_ = (((NU8)(cmd->data[i])) == ((NU8)(58)) || ((NU8)(cmd->data[i])) == ((NU8)(61)));
462 		if (T13_) goto LA14_;
463 		T15_ = (NIM_BOOL)0;
464 		T15_ = (((NI) 0) < cardSet((*p).shortNoVal, 32));
465 		if (!(T15_)) goto LA16_;
466 		T15_ = !((((*p).shortNoVal[(NU)(((NU8)((*p).key->data[((NI) 0)])))>>3] &(1U<<((NU)(((NU8)((*p).key->data[((NI) 0)])))&7U)))!=0));
467 		LA16_: ;
468 		T13_ = T15_;
469 		LA14_: ;
470 		T11_ = T13_;
471 		LA12_: ;
472 		if (!T11_) goto LA17_;
473 		{
474 			NIM_BOOL T21_;
475 			T21_ = (NIM_BOOL)0;
476 			T21_ = (i < (cmd ? cmd->Sup.len : 0));
477 			if (!(T21_)) goto LA22_;
478 			T21_ = (((NU8)(cmd->data[i])) == ((NU8)(58)) || ((NU8)(cmd->data[i])) == ((NU8)(61)));
479 			LA22_: ;
480 			if (!T21_) goto LA23_;
481 			i += ((NI) 1);
482 		}
483 		LA23_: ;
484 		(*p).inShortState = NIM_FALSE;
485 		{
486 			while (1) {
487 				NIM_BOOL T27_;
488 				T27_ = (NIM_BOOL)0;
489 				T27_ = (i < (cmd ? cmd->Sup.len : 0));
490 				if (!(T27_)) goto LA28_;
491 				T27_ = (((NU8)(cmd->data[i])) == ((NU8)(9)) || ((NU8)(cmd->data[i])) == ((NU8)(32)));
492 				LA28_: ;
493 				if (!T27_) goto LA26;
494 				i += ((NI) 1);
495 			} LA26: ;
496 		}
497 		unsureAsgnRef((void**) (&(*p).val), substr__system_7766(cmd, i));
498 		(*p).pos = ((NI) 0);
499 		(*p).idx += ((NI) 1);
500 	}
501 	goto LA9_;
502 	LA17_: ;
503 	{
504 		(*p).pos = i;
505 	}
506 	LA9_: ;
507 	{
508 		if (!((cmd ? cmd->Sup.len : 0) <= i)) goto LA32_;
509 		(*p).inShortState = NIM_FALSE;
510 		(*p).pos = ((NI) 0);
511 		(*p).idx += ((NI) 1);
512 	}
513 	LA32_: ;
514 }
N_NIMCALL(NI,parseWord__pureZparseopt_25)515 N_LIB_PRIVATE N_NIMCALL(NI, parseWord__pureZparseopt_25)(NimStringDesc* s, NI i, NimStringDesc** w, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw delim) {
516 	NI result;
517 	result = (NI)0;
518 	result = i;
519 	{
520 		NIM_BOOL T3_;
521 		T3_ = (NIM_BOOL)0;
522 		T3_ = (result < (s ? s->Sup.len : 0));
523 		if (!(T3_)) goto LA4_;
524 		T3_ = ((NU8)(s->data[result]) == (NU8)(34));
525 		LA4_: ;
526 		if (!T3_) goto LA5_;
527 		result += ((NI) 1);
528 		{
529 			while (1) {
530 				if (!(result < (s ? s->Sup.len : 0))) goto LA8;
531 				{
532 					if (!((NU8)(s->data[result]) == (NU8)(34))) goto LA11_;
533 					result += ((NI) 1);
534 					goto LA7;
535 				}
536 				LA11_: ;
537 				unsureAsgnRef((void**) (&(*w)), addChar((*w), s->data[result]));
538 				result += ((NI) 1);
539 			} LA8: ;
540 		} LA7: ;
541 	}
542 	goto LA1_;
543 	LA5_: ;
544 	{
545 		{
546 			while (1) {
547 				NIM_BOOL T16_;
548 				T16_ = (NIM_BOOL)0;
549 				T16_ = (result < (s ? s->Sup.len : 0));
550 				if (!(T16_)) goto LA17_;
551 				T16_ = !(((delim[(NU)(((NU8)(s->data[result])))>>3] &(1U<<((NU)(((NU8)(s->data[result])))&7U)))!=0));
552 				LA17_: ;
553 				if (!T16_) goto LA15;
554 				unsureAsgnRef((void**) (&(*w)), addChar((*w), s->data[result]));
555 				result += ((NI) 1);
556 			} LA15: ;
557 		}
558 	}
559 	LA1_: ;
560 	return result;
561 }
N_INLINE(int,nimCmpMem)562 static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
563 	int result;
564 	result = (int)0;
565 	result = memcmp(a, b, ((size_t) (size)));
566 	return result;
567 }
N_INLINE(NIM_BOOL,equalMem__system_1735)568 static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size) {
569 	NIM_BOOL result;
570 	int T1_;
571 	result = (NIM_BOOL)0;
572 	T1_ = (int)0;
573 	T1_ = nimCmpMem(a, b, size);
574 	result = (T1_ == ((NI32) 0));
575 	return result;
576 }
N_INLINE(NIM_BOOL,eqStrings)577 static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
578 	NIM_BOOL result;
579 	NI alen;
580 	NI blen;
581 {	result = (NIM_BOOL)0;
582 	alen = (a ? a->Sup.len : 0);
583 	blen = (b ? b->Sup.len : 0);
584 	{
585 		if (!(alen == blen)) goto LA3_;
586 		{
587 			if (!(alen == ((NI) 0))) goto LA7_;
588 			result = NIM_TRUE;
589 			goto BeforeRet_;
590 		}
591 		LA7_: ;
592 		result = equalMem__system_1735(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
593 		goto BeforeRet_;
594 	}
595 	LA3_: ;
596 	}BeforeRet_: ;
597 	return result;
598 }
N_INLINE(NI,find__stdZenumutils_48)599 static N_INLINE(NI, find__stdZenumutils_48)(NimStringDesc** a, NI aLen_0, NimStringDesc* item) {
600 	NI result;
601 {	result = (NI)0;
602 	result = ((NI) 0);
603 	{
604 		NimStringDesc** i;
605 		NI i_2;
606 		i = (NimStringDesc**)0;
607 		i_2 = ((NI) 0);
608 		{
609 			while (1) {
610 				if (!(i_2 < aLen_0)) goto LA3;
611 				i = (&a[i_2]);
612 				{
613 					if (!eqStrings((*i), item)) goto LA6_;
614 					goto BeforeRet_;
615 				}
616 				LA6_: ;
617 				result += ((NI) 1);
618 				i_2 += ((NI) 1);
619 			} LA3: ;
620 		}
621 	}
622 	result = ((NI) -1);
623 	}BeforeRet_: ;
624 	return result;
625 }
N_INLINE(NIM_BOOL,contains__stdZenumutils_43)626 static N_INLINE(NIM_BOOL, contains__stdZenumutils_43)(NimStringDesc** a, NI aLen_0, NimStringDesc* item) {
627 	NIM_BOOL result;
628 	NI T1_;
629 {	result = (NIM_BOOL)0;
630 	T1_ = (NI)0;
631 	T1_ = find__stdZenumutils_48(a, aLen_0, item);
632 	result = (((NI) 0) <= T1_);
633 	goto BeforeRet_;
634 	}BeforeRet_: ;
635 	return result;
636 }
N_NIMCALL(void,nponext)637 N_LIB_PRIVATE N_NIMCALL(void, nponext)(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg* p) {
638 	NI i;
639 {	{
640 		NI T3_;
641 		T3_ = ((*p).cmds ? (*p).cmds->Sup.len : 0);
642 		if (!(T3_ <= (*p).idx)) goto LA4_;
643 		(*p).kind = ((tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA) 0);
644 		goto BeforeRet_;
645 	}
646 	LA4_: ;
647 	i = (*p).pos;
648 	{
649 		while (1) {
650 			NIM_BOOL T8_;
651 			T8_ = (NIM_BOOL)0;
652 			T8_ = (i < ((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0));
653 			if (!(T8_)) goto LA9_;
654 			T8_ = (((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(9)) || ((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(32)));
655 			LA9_: ;
656 			if (!T8_) goto LA7;
657 			i += ((NI) 1);
658 		} LA7: ;
659 	}
660 	(*p).pos = i;
661 	unsureAsgnRef((void**) (&(*p).key), setLengthStr((*p).key, ((NI) 0)));
662 	unsureAsgnRef((void**) (&(*p).val), setLengthStr((*p).val, ((NI) 0)));
663 	{
664 		if (!(*p).inShortState) goto LA12_;
665 		(*p).inShortState = NIM_FALSE;
666 		{
667 			if (!(((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0) <= i)) goto LA16_;
668 			(*p).idx += ((NI) 1);
669 			(*p).pos = ((NI) 0);
670 			{
671 				NI T20_;
672 				T20_ = ((*p).cmds ? (*p).cmds->Sup.len : 0);
673 				if (!(T20_ <= (*p).idx)) goto LA21_;
674 				(*p).kind = ((tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA) 0);
675 				goto BeforeRet_;
676 			}
677 			LA21_: ;
678 		}
679 		goto LA14_;
680 		LA16_: ;
681 		{
682 			handleShortOption__pureZparseopt_127(p, (*p).cmds->data[(*p).idx]);
683 			goto BeforeRet_;
684 		}
685 		LA14_: ;
686 	}
687 	LA12_: ;
688 	{
689 		NIM_BOOL T26_;
690 		T26_ = (NIM_BOOL)0;
691 		T26_ = (i < ((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0));
692 		if (!(T26_)) goto LA27_;
693 		T26_ = ((NU8)((*p).cmds->data[(*p).idx]->data[i]) == (NU8)(45));
694 		LA27_: ;
695 		if (!T26_) goto LA28_;
696 		i += ((NI) 1);
697 		{
698 			NIM_BOOL T32_;
699 			T32_ = (NIM_BOOL)0;
700 			T32_ = (i < ((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0));
701 			if (!(T32_)) goto LA33_;
702 			T32_ = ((NU8)((*p).cmds->data[(*p).idx]->data[i]) == (NU8)(45));
703 			LA33_: ;
704 			if (!T32_) goto LA34_;
705 			(*p).kind = ((tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA) 2);
706 			i += ((NI) 1);
707 			i = parseWord__pureZparseopt_25((*p).cmds->data[(*p).idx], i, (&(*p).key), TM__GYgvYKeHVTEls0AcywABHQ_6);
708 			{
709 				while (1) {
710 					NIM_BOOL T38_;
711 					T38_ = (NIM_BOOL)0;
712 					T38_ = (i < ((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0));
713 					if (!(T38_)) goto LA39_;
714 					T38_ = (((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(9)) || ((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(32)));
715 					LA39_: ;
716 					if (!T38_) goto LA37;
717 					i += ((NI) 1);
718 				} LA37: ;
719 			}
720 			{
721 				NIM_BOOL T42_;
722 				T42_ = (NIM_BOOL)0;
723 				T42_ = (i < ((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0));
724 				if (!(T42_)) goto LA43_;
725 				T42_ = (((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(58)) || ((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(61)));
726 				LA43_: ;
727 				if (!T42_) goto LA44_;
728 				i += ((NI) 1);
729 				{
730 					while (1) {
731 						NIM_BOOL T48_;
732 						T48_ = (NIM_BOOL)0;
733 						T48_ = (i < ((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0));
734 						if (!(T48_)) goto LA49_;
735 						T48_ = (((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(9)) || ((NU8)((*p).cmds->data[(*p).idx]->data[i])) == ((NU8)(32)));
736 						LA49_: ;
737 						if (!T48_) goto LA47;
738 						i += ((NI) 1);
739 					} LA47: ;
740 				}
741 				{
742 					NIM_BOOL T52_;
743 					NIM_BOOL T53_;
744 					NI T55_;
745 					T52_ = (NIM_BOOL)0;
746 					T53_ = (NIM_BOOL)0;
747 					T53_ = (((*p).cmds->data[(*p).idx] ? (*p).cmds->data[(*p).idx]->Sup.len : 0) <= i);
748 					if (!(T53_)) goto LA54_;
749 					T55_ = ((*p).cmds ? (*p).cmds->Sup.len : 0);
750 					T53_ = ((*p).idx < T55_);
751 					LA54_: ;
752 					T52_ = T53_;
753 					if (!(T52_)) goto LA56_;
754 					T52_ = (*p).allowWhitespaceAfterColon;
755 					LA56_: ;
756 					if (!T52_) goto LA57_;
757 					(*p).idx += ((NI) 1);
758 					i = ((NI) 0);
759 				}
760 				LA57_: ;
761 				{
762 					NI T61_;
763 					T61_ = ((*p).cmds ? (*p).cmds->Sup.len : 0);
764 					if (!((*p).idx < T61_)) goto LA62_;
765 					unsureAsgnRef((void**) (&(*p).val), substr__system_7766((*p).cmds->data[(*p).idx], i));
766 				}
767 				LA62_: ;
768 			}
769 			goto LA40_;
770 			LA44_: ;
771 			{
772 				NIM_BOOL T65_;
773 				NIM_BOOL T66_;
774 				NI T67_;
775 				NIM_BOOL T69_;
776 				NI T71_;
777 				T65_ = (NIM_BOOL)0;
778 				T66_ = (NIM_BOOL)0;
779 				T67_ = ((*p).longNoVal ? (*p).longNoVal->Sup.len : 0);
780 				T66_ = (((NI) 0) < T67_);
781 				if (!(T66_)) goto LA68_;
782 				T69_ = (NIM_BOOL)0;
783 				T69_ = contains__stdZenumutils_43((*p).longNoVal->data, ((*p).longNoVal ? (*p).longNoVal->Sup.len : 0), (*p).key);
784 				T66_ = !(T69_);
785 				LA68_: ;
786 				T65_ = T66_;
787 				if (!(T65_)) goto LA70_;
788 				T71_ = ((*p).cmds ? (*p).cmds->Sup.len : 0);
789 				T65_ = ((NI)((*p).idx + ((NI) 1)) < T71_);
790 				LA70_: ;
791 				if (!T65_) goto LA72_;
792 				unsureAsgnRef((void**) (&(*p).val), copyString((*p).cmds->data[(NI)((*p).idx + ((NI) 1))]));
793 				(*p).idx += ((NI) 1);
794 			}
795 			goto LA40_;
796 			LA72_: ;
797 			{
798 				unsureAsgnRef((void**) (&(*p).val), ((NimStringDesc*) NIM_NIL));
799 			}
800 			LA40_: ;
801 			(*p).idx += ((NI) 1);
802 			(*p).pos = ((NI) 0);
803 		}
804 		goto LA30_;
805 		LA34_: ;
806 		{
807 			(*p).pos = i;
808 			handleShortOption__pureZparseopt_127(p, (*p).cmds->data[(*p).idx]);
809 		}
810 		LA30_: ;
811 	}
812 	goto LA24_;
813 	LA28_: ;
814 	{
815 		(*p).kind = ((tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA) 1);
816 		unsureAsgnRef((void**) (&(*p).key), copyString((*p).cmds->data[(*p).idx]));
817 		(*p).idx += ((NI) 1);
818 		(*p).pos = ((NI) 0);
819 	}
820 	LA24_: ;
821 	}BeforeRet_: ;
822 }
N_INLINE(void,nimGCunrefNoCycle)823 static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
824 	tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_;
825 	T1_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
826 	T1_ = usrToCell__system_5279(p);
827 	decRef__system_5324(T1_);
828 }
N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ *,X5BX5D___pureZparseopt_275)829 N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, X5BX5D___pureZparseopt_275)(NimStringDesc** s, NI sLen_0, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA x) {
830 	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* result;
831 	NI a;
832 	NI L;
833 	result = NIM_NIL;
834 	a = x.a;
835 	L = (NI)((NI)((NI)(sLen_0 - x.b) - a) + ((NI) 1));
836 	result = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ*) newSeq((&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_), ((NI) (L)));
837 	{
838 		NI i;
839 		NI i_2;
840 		i = (NI)0;
841 		i_2 = ((NI) 0);
842 		{
843 			while (1) {
844 				NimStringDesc* T4_;
845 				if (!(i_2 < L)) goto LA3;
846 				i = i_2;
847 				T4_ = NIM_NIL;
848 				T4_ = result->data[i]; result->data[i] = copyStringRC1(s[(NI)(i + a)]);
849 				if (T4_) nimGCunrefNoCycle(T4_);
850 				i_2 += ((NI) 1);
851 			} LA3: ;
852 		}
853 	}
854 	return result;
855 }
N_INLINE(void,nimSetMem__systemZmemory_7)856 static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
857 	void* T1_;
858 	T1_ = (void*)0;
859 	T1_ = memset(a, v, ((size_t) (size)));
860 }
N_INLINE(void,nimZeroMem)861 static N_INLINE(void, nimZeroMem)(void* p, NI size) {
862 	nimSetMem__systemZmemory_7(p, ((int) 0), size);
863 }
N_INLINE(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA,dotdot___stdZenumutils_80)864 static N_INLINE(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA, dotdot___stdZenumutils_80)(NI a, NI b) {
865 	tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA result;
866 	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA));
867 	nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA));
868 	result.a = a;
869 	result.b = b;
870 	return result;
871 }
N_NIMCALL(NimStringDesc *,npocmdLineRest)872 N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, npocmdLineRest)(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg* p) {
873 	NimStringDesc* result;
874 	tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA T1_;
875 	tySequence__sM4lkSb7zS6F7OVMvW9cffQ* T2_;
876 	result = NIM_NIL;
877 	T1_ = dotdot___stdZenumutils_80((*p).idx, ((NI) 1));
878 	T2_ = NIM_NIL;
879 	T2_ = X5BX5D___pureZparseopt_275((*p).cmds->data, ((*p).cmds ? (*p).cmds->Sup.len : 0), T1_);
880 	result = quoteShellCommand__pureZos_601(T2_->data, (T2_ ? T2_->Sup.len : 0));
881 	return result;
882 }
N_NIMCALL(void,stdlib_parseoptDatInit000)883 N_LIB_PRIVATE N_NIMCALL(void, stdlib_parseoptDatInit000)(void) {
884 static TNimNode* TM__GYgvYKeHVTEls0AcywABHQ_2_10[10];
885 static TNimNode* TM__GYgvYKeHVTEls0AcywABHQ_3_4[4];
886 NI TM__GYgvYKeHVTEls0AcywABHQ_5;
887 static char* NIM_CONST TM__GYgvYKeHVTEls0AcywABHQ_4[4] = {
888 "cmdEnd",
889 "cmdArgument",
890 "cmdLongOption",
891 "cmdShortOption"};
892 static TNimNode TM__GYgvYKeHVTEls0AcywABHQ_0[17];
893 NTIoptparser__l9cyoK9aLLTUH7LBRIbLqETg_.size = sizeof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg);
894 NTIoptparser__l9cyoK9aLLTUH7LBRIbLqETg_.align = NIM_ALIGNOF(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg);
895 NTIoptparser__l9cyoK9aLLTUH7LBRIbLqETg_.kind = 17;
896 NTIoptparser__l9cyoK9aLLTUH7LBRIbLqETg_.base = (&NTIrootobj__ytyiCJqK439aF9cIibuRVpAg_);
897 TM__GYgvYKeHVTEls0AcywABHQ_2_10[0] = &TM__GYgvYKeHVTEls0AcywABHQ_0[1];
898 TM__GYgvYKeHVTEls0AcywABHQ_0[1].kind = 1;
899 TM__GYgvYKeHVTEls0AcywABHQ_0[1].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, pos);
900 TM__GYgvYKeHVTEls0AcywABHQ_0[1].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
901 TM__GYgvYKeHVTEls0AcywABHQ_0[1].name = "pos";
902 TM__GYgvYKeHVTEls0AcywABHQ_2_10[1] = &TM__GYgvYKeHVTEls0AcywABHQ_0[2];
903 TM__GYgvYKeHVTEls0AcywABHQ_0[2].kind = 1;
904 TM__GYgvYKeHVTEls0AcywABHQ_0[2].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, inShortState);
905 TM__GYgvYKeHVTEls0AcywABHQ_0[2].typ = (&NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_);
906 TM__GYgvYKeHVTEls0AcywABHQ_0[2].name = "inShortState";
907 TM__GYgvYKeHVTEls0AcywABHQ_2_10[2] = &TM__GYgvYKeHVTEls0AcywABHQ_0[3];
908 TM__GYgvYKeHVTEls0AcywABHQ_0[3].kind = 1;
909 TM__GYgvYKeHVTEls0AcywABHQ_0[3].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, allowWhitespaceAfterColon);
910 TM__GYgvYKeHVTEls0AcywABHQ_0[3].typ = (&NTIbool__VaVACK0bpYmqIQ0mKcHfQQ_);
911 TM__GYgvYKeHVTEls0AcywABHQ_0[3].name = "allowWhitespaceAfterColon";
912 TM__GYgvYKeHVTEls0AcywABHQ_2_10[3] = &TM__GYgvYKeHVTEls0AcywABHQ_0[4];
913 NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_.size = sizeof(tySet_tyChar__nmiMWKVIe46vacnhAFrQvw);
914 NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_.align = NIM_ALIGNOF(tySet_tyChar__nmiMWKVIe46vacnhAFrQvw);
915 NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_.kind = 19;
916 NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_.base = (&NTIchar__nmiMWKVIe46vacnhAFrQvw_);
917 NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_.flags = 3;
918 TM__GYgvYKeHVTEls0AcywABHQ_0[5].len = 0; TM__GYgvYKeHVTEls0AcywABHQ_0[5].kind = 0;
919 NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_.node = &TM__GYgvYKeHVTEls0AcywABHQ_0[5];
920 TM__GYgvYKeHVTEls0AcywABHQ_0[4].kind = 1;
921 TM__GYgvYKeHVTEls0AcywABHQ_0[4].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, shortNoVal);
922 TM__GYgvYKeHVTEls0AcywABHQ_0[4].typ = (&NTIsetLcharT__HDqWPvEAxZK51ZcfaeQEdg_);
923 TM__GYgvYKeHVTEls0AcywABHQ_0[4].name = "shortNoVal";
924 TM__GYgvYKeHVTEls0AcywABHQ_2_10[4] = &TM__GYgvYKeHVTEls0AcywABHQ_0[6];
925 TM__GYgvYKeHVTEls0AcywABHQ_0[6].kind = 1;
926 TM__GYgvYKeHVTEls0AcywABHQ_0[6].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, longNoVal);
927 TM__GYgvYKeHVTEls0AcywABHQ_0[6].typ = (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_);
928 TM__GYgvYKeHVTEls0AcywABHQ_0[6].name = "longNoVal";
929 TM__GYgvYKeHVTEls0AcywABHQ_2_10[5] = &TM__GYgvYKeHVTEls0AcywABHQ_0[7];
930 TM__GYgvYKeHVTEls0AcywABHQ_0[7].kind = 1;
931 TM__GYgvYKeHVTEls0AcywABHQ_0[7].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, cmds);
932 TM__GYgvYKeHVTEls0AcywABHQ_0[7].typ = (&NTIseqLstringT__sM4lkSb7zS6F7OVMvW9cffQ_);
933 TM__GYgvYKeHVTEls0AcywABHQ_0[7].name = "cmds";
934 TM__GYgvYKeHVTEls0AcywABHQ_2_10[6] = &TM__GYgvYKeHVTEls0AcywABHQ_0[8];
935 TM__GYgvYKeHVTEls0AcywABHQ_0[8].kind = 1;
936 TM__GYgvYKeHVTEls0AcywABHQ_0[8].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, idx);
937 TM__GYgvYKeHVTEls0AcywABHQ_0[8].typ = (&NTIint__rR5Bzr1D5krxoo1NcNyeMA_);
938 TM__GYgvYKeHVTEls0AcywABHQ_0[8].name = "idx";
939 TM__GYgvYKeHVTEls0AcywABHQ_2_10[7] = &TM__GYgvYKeHVTEls0AcywABHQ_0[9];
940 NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_.size = sizeof(tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA);
941 NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_.align = NIM_ALIGNOF(tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA);
942 NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_.kind = 14;
943 NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_.base = 0;
944 NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_.flags = 3;
945 for (TM__GYgvYKeHVTEls0AcywABHQ_5 = 0; TM__GYgvYKeHVTEls0AcywABHQ_5 < 4; TM__GYgvYKeHVTEls0AcywABHQ_5++) {
946 TM__GYgvYKeHVTEls0AcywABHQ_0[TM__GYgvYKeHVTEls0AcywABHQ_5+10].kind = 1;
947 TM__GYgvYKeHVTEls0AcywABHQ_0[TM__GYgvYKeHVTEls0AcywABHQ_5+10].offset = TM__GYgvYKeHVTEls0AcywABHQ_5;
948 TM__GYgvYKeHVTEls0AcywABHQ_0[TM__GYgvYKeHVTEls0AcywABHQ_5+10].name = TM__GYgvYKeHVTEls0AcywABHQ_4[TM__GYgvYKeHVTEls0AcywABHQ_5];
949 TM__GYgvYKeHVTEls0AcywABHQ_3_4[TM__GYgvYKeHVTEls0AcywABHQ_5] = &TM__GYgvYKeHVTEls0AcywABHQ_0[TM__GYgvYKeHVTEls0AcywABHQ_5+10];
950 }
951 TM__GYgvYKeHVTEls0AcywABHQ_0[14].len = 4; TM__GYgvYKeHVTEls0AcywABHQ_0[14].kind = 2; TM__GYgvYKeHVTEls0AcywABHQ_0[14].sons = &TM__GYgvYKeHVTEls0AcywABHQ_3_4[0];
952 NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_.node = &TM__GYgvYKeHVTEls0AcywABHQ_0[14];
953 TM__GYgvYKeHVTEls0AcywABHQ_0[9].kind = 1;
954 TM__GYgvYKeHVTEls0AcywABHQ_0[9].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, kind);
955 TM__GYgvYKeHVTEls0AcywABHQ_0[9].typ = (&NTIcmdlinekind__XkdXq9atxjiuhkFFh0XYrSA_);
956 TM__GYgvYKeHVTEls0AcywABHQ_0[9].name = "kind";
957 TM__GYgvYKeHVTEls0AcywABHQ_2_10[8] = &TM__GYgvYKeHVTEls0AcywABHQ_0[15];
958 TM__GYgvYKeHVTEls0AcywABHQ_0[15].kind = 1;
959 TM__GYgvYKeHVTEls0AcywABHQ_0[15].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, key);
960 TM__GYgvYKeHVTEls0AcywABHQ_0[15].typ = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
961 TM__GYgvYKeHVTEls0AcywABHQ_0[15].name = "key";
962 TM__GYgvYKeHVTEls0AcywABHQ_2_10[9] = &TM__GYgvYKeHVTEls0AcywABHQ_0[16];
963 TM__GYgvYKeHVTEls0AcywABHQ_0[16].kind = 1;
964 TM__GYgvYKeHVTEls0AcywABHQ_0[16].offset = offsetof(tyObject_OptParser__l9cyoK9aLLTUH7LBRIbLqETg, val);
965 TM__GYgvYKeHVTEls0AcywABHQ_0[16].typ = (&NTIstring__77mFvmsOLKik79ci2hXkHEg_);
966 TM__GYgvYKeHVTEls0AcywABHQ_0[16].name = "val";
967 TM__GYgvYKeHVTEls0AcywABHQ_0[0].len = 10; TM__GYgvYKeHVTEls0AcywABHQ_0[0].kind = 2; TM__GYgvYKeHVTEls0AcywABHQ_0[0].sons = &TM__GYgvYKeHVTEls0AcywABHQ_2_10[0];
968 NTIoptparser__l9cyoK9aLLTUH7LBRIbLqETg_.node = &TM__GYgvYKeHVTEls0AcywABHQ_0[0];
969 }
970 
971