File: %40mbtrees.nim.c

package info (click to toggle)
nim 1.6.14-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,181,140 kB
  • sloc: sh: 20,999; ansic: 1,722; makefile: 958; python: 461; sql: 298; asm: 141; xml: 13
file content (778 lines) | stat: -rw-r--r-- 24,861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
/* Generated by Nim Compiler v1.6.14 */
#define NIM_INTBITS 64

#include "nimbase.h"
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
#define nimfr_(x, y)
#define nimln_(x, y)
typedef struct tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q;
typedef struct tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA;
typedef struct tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw;
typedef struct tyObject_TSym__3r34mwqcVmg5JFNmiaVncw tyObject_TSym__3r34mwqcVmg5JFNmiaVncw;
typedef struct tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg;
typedef struct tySequence__IeU9azYSNIK3V9b36Ir6NZcw tySequence__IeU9azYSNIK3V9b36Ir6NZcw;
typedef struct tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g;
typedef struct tyObject_CellSeq__nav876ELHgxScHhs30CKiA tyObject_CellSeq__nav876ELHgxScHhs30CKiA;
typedef struct tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ;
typedef struct tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ;
typedef struct tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ;
typedef struct tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw;
typedef struct tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA;
typedef struct tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA;
typedef struct tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A;
typedef struct tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg;
typedef struct tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw;
typedef struct tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw;
typedef struct tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA;
typedef struct tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg;
typedef struct tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA;
typedef struct tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ;
typedef struct tyTuple__xBIQCKakCgKTQ7wLgy259cg tyTuple__xBIQCKakCgKTQ7wLgy259cg;
struct tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q {
tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* root;
NI entries;
};
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NimStringDesc* tyArray__9aijZrM1syqzleJpcL8bUyw[512];
typedef tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* tyArray__pWfcjNgdkCPhsQuXtCrjlQ[512];
typedef tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* tyArray__VKNNDtxlcHt69avZNvnPyiQ[512];
struct tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A {
NI entries;
tyArray__9aijZrM1syqzleJpcL8bUyw keys;
NIM_BOOL isInternal;
union{
struct {tyArray__pWfcjNgdkCPhsQuXtCrjlQ vals;
} _isInternal_1;
struct {tyArray__VKNNDtxlcHt69avZNvnPyiQ links;
} _isInternal_2;
};
};
typedef NU8 tyEnum_TNimKind__pspQAsqJLrw3jEKBD9bxmyQ;
typedef NU8 tySet_tyEnum_TNimTypeFlag__Yt5hq6z2IoHhKZrzIVrc1w;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
NI align;
tyEnum_TNimKind__pspQAsqJLrw3jEKBD9bxmyQ kind;
tySet_tyEnum_TNimTypeFlag__Yt5hq6z2IoHhKZrzIVrc1w flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
typedef NU8 tyEnum_TNimNodeKind__rrp49bl1h9aEkXfXp9bNg0yZw;
struct TNimNode {
tyEnum_TNimNodeKind__rrp49bl1h9aEkXfXp9bNg0yZw kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw {
NU16 line;
NI16 col;
NI32 fileIndex;
};
typedef NU32 tySet_tyEnum_TNodeFlag__0RUKWdbLPY3l0smKVGDLMg;
typedef NU8 tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw;
struct tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw {
tyObject_TType__kQDDJGUiaUAtO9c9b6LjZYjA* typ;
tyObject_TLineInfo__66OQV9bsmGEfS6hVHBswcPw info;
tySet_tyEnum_TNodeFlag__0RUKWdbLPY3l0smKVGDLMg flags;
tyEnum_TNodeKind__clSgDh22o9au33BrVH9bDQZw kind;
union{
struct {NI64 intVal;
} _kind_1;
struct {NF floatVal;
} _kind_2;
struct {NimStringDesc* strVal;
} _kind_3;
struct {tyObject_TSym__3r34mwqcVmg5JFNmiaVncw* sym;
} _kind_4;
struct {tyObject_TIdent__PKDcQ7dqdhiSW9c9cXUFFpMg* ident;
} _kind_5;
struct {tySequence__IeU9azYSNIK3V9b36Ir6NZcw* sons;
} _kind_6;
};
};
struct tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g {
NI refcount;
TNimType* typ;
};
struct tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ {
void* bottom;
};
struct tyObject_CellSeq__nav876ELHgxScHhs30CKiA {
NI len;
NI cap;
tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g** d;
};
typedef tyObject_SmallChunk__eUrTKmsk1Dqt5tm2WUT2Lw* tyArray__1eFxjkcKGHnofywkmCV8oQ[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA* tyArray__KxTmKT9a3kTkdwYfqXhEYSw[32];
typedef tyArray__KxTmKT9a3kTkdwYfqXhEYSw tyArray__ATT5LBefmjy9bg8ApRmg3rw[24];
typedef tyObject_Trunk__Ju1AURWHenTn3cJwAjbUhg* tyArray__RxhBwkGQwTHLKhoK685Xfg[256];
struct tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A {
tyArray__RxhBwkGQwTHLKhoK685Xfg data;
};
typedef tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* tyArray__DrxDrI9bg9apB70ydOoNZrWw[2];
struct tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw {
tyArray__DrxDrI9bg9apB70ydOoNZrWw link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA {
tyObject_BigChunk__39bC3HTk2w4NGDjG74oNjmA* Field0;
NI Field1;
};
typedef tyTuple__p2vAp9cQ6YrpDq9cI3XzEDWA tyArray__wsokuoa9bVBSU4gPLKbFaaw[30];
struct tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw {
NI len;
tyArray__wsokuoa9bVBSU4gPLKbFaaw chunks;
tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw* next;
};
struct tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ {
NI minLargeObj;
NI maxLargeObj;
tyArray__1eFxjkcKGHnofywkmCV8oQ freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__ATT5LBefmjy9bg8ApRmg3rw matrix;
tyObject_LLChunk__Fjkr5Ya6Zl0UoUGxG047hA* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__WrQriiGmHk59cB1lNPtGo6A chunkStarts;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* root;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* deleted;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* last;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__aGkK1t9a0WoXjpugXR6FWpw bottomData;
tyObject_HeapLinks__5IkCDh5QlsYpsfEMJf6zNw heapLinks;
};
struct tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA {
NI counter;
NI max;
tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ* head;
tyObject_PageDesc__N7tjEodqPVJaQ6oKQW8YfQ** data;
};
struct tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ {
tyObject_GcStack__qFeGMKlnq6c9cTM2vPWycQQ stack;
NI cycleThreshold;
NI zctThreshold;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA zct;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA decStack;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA tempStack;
NI recGcLock;
tyObject_MemRegion__6QRscFDo4mEwbg9aL76vDGQ region;
tyObject_GcStat__OG9ams3mtFJyICkjTOHbc9bg stat;
tyObject_CellSet__A0mJvGLunfUxGkLUtesjdA marked;
tyObject_CellSeq__nav876ELHgxScHhs30CKiA additionalRoots;
NI gcThreadId;
};
struct tyTuple__xBIQCKakCgKTQ7wLgy259cg {
NimStringDesc* Field0;
tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* Field1;
NI Field2;
};
struct tySequence__IeU9azYSNIK3V9b36Ir6NZcw {
  TGenericSeq Sup;
  tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* data[SEQ_DECL_SIZE];
};
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, cmp__system_1549)(NimStringDesc* x, NimStringDesc* y);
N_LIB_PRIVATE N_NIMCALL(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*, insert__vm_10059)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* h, NimStringDesc* key, tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* val);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef__system_5319)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5281)(void* usr);
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
static N_INLINE(void, decRef__system_5326)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
static N_INLINE(void, rtlAddZCT__system_5324)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5275)(tyObject_CellSeq__nav876ELHgxScHhs30CKiA* s, tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_LIB_PRIVATE N_NIMCALL(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*, split__vm_10893)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* h);
N_LIB_PRIVATE N_NIMCALL(void, copyHalf__vm_10910)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* h, tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* result);
N_LIB_PRIVATE N_NIMCALL(NI, countSubTree__vm_12651)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* it);
extern TNimType NTInode__PH6d39ctBFaDFBx75WzCZNQ_;
extern tyObject_GcHeap__ZRn9bWCksoiGwT2drZZzyWQ gch__system_5228;
N_LIB_PRIVATE N_NIMCALL(void, initBTree__vm_8392)(tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q* Result) {
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* T1_;
	unsureAsgnRef((void**)&(*Result).root, NIM_NIL);
	(*Result).entries = 0;
	T1_ = NIM_NIL;
	T1_ = (tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) newObj((&NTInode__PH6d39ctBFaDFBx75WzCZNQ_), sizeof(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A));
	(*T1_).entries = ((NI) 0);
	(*T1_).isInternal = NIM_FALSE;
	unsureAsgnRef((void**) (&(*Result).root), T1_);
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, contains__vm_9759)(tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q b, NimStringDesc* key) {
	NIM_BOOL result;
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* x;
{	result = (NIM_BOOL)0;
	x = b.root;
	{
		while (1) {
			if (!(*x).isInternal) goto LA2;
			{
				NI j;
				NI i;
				j = (NI)0;
				i = ((NI) 0);
				{
					while (1) {
						if (!(i < (*x).entries)) goto LA5;
						j = i;
						{
							NIM_BOOL T8_;
							NI T10_;
							T8_ = (NIM_BOOL)0;
							T8_ = ((NI)(j + ((NI) 1)) == (*x).entries);
							if (T8_) goto LA9_;
							T10_ = (NI)0;
							T10_ = cmp__system_1549(key, (*x).keys[((NI)(j + ((NI) 1)))- 0]);
							T8_ = (T10_ < ((NI) 0));
							LA9_: ;
							if (!T8_) goto LA11_;
							x = (*x)._isInternal_2.links[(j)- 0];
							goto LA3;
						}
						LA11_: ;
						i += ((NI) 1);
					} LA5: ;
				}
			} LA3: ;
		} LA2: ;
	}
	{
		NI j_2;
		NI i_2;
		j_2 = (NI)0;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < (*x).entries)) goto LA15;
				j_2 = i_2;
				{
					NI T18_;
					T18_ = (NI)0;
					T18_ = cmp__system_1549(key, (*x).keys[(j_2)- 0]);
					if (!(T18_ == ((NI) 0))) goto LA19_;
					result = NIM_TRUE;
					goto BeforeRet_;
				}
				LA19_: ;
				i_2 += ((NI) 1);
			} LA15: ;
		}
	}
	result = NIM_FALSE;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
	return result;
}
static N_INLINE(void, incRef__system_5319)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	(*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
}
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
	NI result;
	result = (NI)0;
	result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
	return result;
}
static N_INLINE(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*, usrToCell__system_5281)(void* usr) {
	tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* result;
	NI T1_;
	result = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
	T1_ = (NI)0;
	T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
	result = ((tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*) (T1_));
	return result;
}
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
	return result;
}
static N_INLINE(void, rtlAddZCT__system_5324)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	addZCT__system_5275((&gch__system_5228.zct), c);
}
static N_INLINE(void, decRef__system_5326)(tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* c) {
	(*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
		if (!T3_) goto LA4_;
		rtlAddZCT__system_5324(c);
	}
	LA4_: ;
}
static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T5_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
		T5_ = usrToCell__system_5281(src);
		incRef__system_5319(T5_);
	}
	LA3_: ;
	{
		tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T10_;
		if (!!(((*dest) == NIM_NIL))) goto LA8_;
		T10_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
		T10_ = usrToCell__system_5281((*dest));
		decRef__system_5326(T10_);
	}
	LA8_: ;
	(*dest) = src;
}
static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g* T1_;
	T1_ = (tyObject_Cell__nhn83Yf9cX7rcmG5W9b4oa6g*)0;
	T1_ = usrToCell__system_5281(p);
	decRef__system_5326(T1_);
}
N_LIB_PRIVATE N_NIMCALL(void, copyHalf__vm_10910)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* h, tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* result) {
	{
		NI j;
		NI i;
		j = (NI)0;
		i = ((NI) 0);
		{
			while (1) {
				NimStringDesc* T4_;
				if (!(i < ((NI) 256))) goto LA3;
				j = i;
				T4_ = NIM_NIL;
				T4_ = (*result).keys[(j)- 0]; (*result).keys[(j)- 0] = copyStringRC1((*h).keys[((NI)(((NI) 256) + j))- 0]);
				if (T4_) nimGCunrefNoCycle(T4_);
				i += ((NI) 1);
			} LA3: ;
		}
	}
	{
		if (!(*h).isInternal) goto LA7_;
		{
			NI j_2;
			NI i_2;
			j_2 = (NI)0;
			i_2 = ((NI) 0);
			{
				while (1) {
					if (!(i_2 < ((NI) 256))) goto LA11;
					j_2 = i_2;
					asgnRef((void**) (&(*result)._isInternal_2.links[(j_2)- 0]), (*h)._isInternal_2.links[((NI)(((NI) 256) + j_2))- 0]);
					i_2 += ((NI) 1);
				} LA11: ;
			}
		}
	}
	goto LA5_;
	LA7_: ;
	{
		{
			NI j_3;
			NI i_3;
			j_3 = (NI)0;
			i_3 = ((NI) 0);
			{
				while (1) {
					if (!(i_3 < ((NI) 256))) goto LA15;
					j_3 = i_3;
					asgnRef((void**) (&(*result)._isInternal_1.vals[(j_3)- 0]), (*h)._isInternal_1.vals[((NI)(((NI) 256) + j_3))- 0]);
					i_3 += ((NI) 1);
				} LA15: ;
			}
		}
	}
	LA5_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*, split__vm_10893)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* h) {
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* result;
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* T1_;
	result = NIM_NIL;
	T1_ = NIM_NIL;
	T1_ = (tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) newObj((&NTInode__PH6d39ctBFaDFBx75WzCZNQ_), sizeof(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A));
	(*T1_).entries = ((NI) 256);
	(*T1_).isInternal = (*h).isInternal;
	result = T1_;
	(*h).entries = ((NI) 256);
	copyHalf__vm_10910(h, result);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*, insert__vm_10059)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* h, NimStringDesc* key, tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* val) {
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* result;
	NimStringDesc* newKey;
	NI j;
	NimStringDesc* T41_;
{	result = NIM_NIL;
	newKey = copyString(key);
	j = ((NI) 0);
	{
		if (!!((*h).isInternal)) goto LA3_;
		{
			while (1) {
				if (!(j < (*h).entries)) goto LA6;
				{
					NI T9_;
					T9_ = (NI)0;
					T9_ = cmp__system_1549(key, (*h).keys[(j)- 0]);
					if (!(T9_ == ((NI) 0))) goto LA10_;
					asgnRef((void**) (&(*h)._isInternal_1.vals[(j)- 0]), val);
					goto BeforeRet_;
				}
				LA10_: ;
				{
					NI T14_;
					T14_ = (NI)0;
					T14_ = cmp__system_1549(key, (*h).keys[(j)- 0]);
					if (!(T14_ < ((NI) 0))) goto LA15_;
					goto LA5;
				}
				LA15_: ;
				j += ((NI) 1);
			} LA6: ;
		} LA5: ;
		{
			NI i;
			NI colontmp_;
			NI res;
			i = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = (NI)(j + ((NI) 1));
			res = (*h).entries;
			{
				while (1) {
					if (!(colontmp_ <= res)) goto LA19;
					i = res;
					asgnRef((void**) (&(*h)._isInternal_1.vals[(i)- 0]), (*h)._isInternal_1.vals[((NI)(i - ((NI) 1)))- 0]);
					res -= ((NI) 1);
				} LA19: ;
			}
		}
		asgnRef((void**) (&(*h)._isInternal_1.vals[(j)- 0]), val);
	}
	goto LA1_;
	LA3_: ;
	{
		tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* newLink;
		newLink = ((tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) NIM_NIL);
		{
			while (1) {
				if (!(j < (*h).entries)) goto LA22;
				{
					NIM_BOOL T25_;
					NI T27_;
					tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* u;
					T25_ = (NIM_BOOL)0;
					T25_ = ((NI)(j + ((NI) 1)) == (*h).entries);
					if (T25_) goto LA26_;
					T27_ = (NI)0;
					T27_ = cmp__system_1549(key, (*h).keys[((NI)(j + ((NI) 1)))- 0]);
					T25_ = (T27_ < ((NI) 0));
					LA26_: ;
					if (!T25_) goto LA28_;
					u = insert__vm_10059((*h)._isInternal_2.links[(j)- 0], key, val);
					j += ((NI) 1);
					{
						if (!(u == ((tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) NIM_NIL))) goto LA32_;
						result = ((tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) NIM_NIL);
						goto BeforeRet_;
					}
					LA32_: ;
					newKey = copyString((*u).keys[(((NI) 0))- 0]);
					newLink = u;
					goto LA21;
				}
				LA28_: ;
				j += ((NI) 1);
			} LA22: ;
		} LA21: ;
		{
			NI i_2;
			NI colontmp__2;
			NI res_2;
			i_2 = (NI)0;
			colontmp__2 = (NI)0;
			colontmp__2 = (NI)(j + ((NI) 1));
			res_2 = (*h).entries;
			{
				while (1) {
					if (!(colontmp__2 <= res_2)) goto LA36;
					i_2 = res_2;
					asgnRef((void**) (&(*h)._isInternal_2.links[(i_2)- 0]), (*h)._isInternal_2.links[((NI)(i_2 - ((NI) 1)))- 0]);
					res_2 -= ((NI) 1);
				} LA36: ;
			}
		}
		asgnRef((void**) (&(*h)._isInternal_2.links[(j)- 0]), newLink);
	}
	LA1_: ;
	{
		NI i_3;
		NI colontmp__3;
		NI res_3;
		i_3 = (NI)0;
		colontmp__3 = (NI)0;
		colontmp__3 = (NI)(j + ((NI) 1));
		res_3 = (*h).entries;
		{
			while (1) {
				NimStringDesc* T40_;
				if (!(colontmp__3 <= res_3)) goto LA39;
				i_3 = res_3;
				T40_ = NIM_NIL;
				T40_ = (*h).keys[(i_3)- 0]; (*h).keys[(i_3)- 0] = copyStringRC1((*h).keys[((NI)(i_3 - ((NI) 1)))- 0]);
				if (T40_) nimGCunrefNoCycle(T40_);
				res_3 -= ((NI) 1);
			} LA39: ;
		}
	}
	T41_ = NIM_NIL;
	T41_ = (*h).keys[(j)- 0]; (*h).keys[(j)- 0] = copyStringRC1(newKey);
	if (T41_) nimGCunrefNoCycle(T41_);
	(*h).entries += ((NI) 1);
	{
		if (!((*h).entries < ((NI) 512))) goto LA44_;
		result = ((tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) NIM_NIL);
	}
	goto LA42_;
	LA44_: ;
	{
		result = split__vm_10893(h);
	}
	LA42_: ;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, add__vm_10043)(tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q* b, NimStringDesc* key, tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* val) {
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* u;
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* t;
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* T5_;
	NimStringDesc* T6_;
	NimStringDesc* T7_;
{	u = insert__vm_10059((*b).root, key, val);
	(*b).entries += ((NI) 1);
	{
		if (!(u == ((tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) NIM_NIL))) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	T5_ = NIM_NIL;
	T5_ = (tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A*) newObj((&NTInode__PH6d39ctBFaDFBx75WzCZNQ_), sizeof(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A));
	(*T5_).entries = ((NI) 2);
	(*T5_).isInternal = NIM_TRUE;
	t = T5_;
	T6_ = NIM_NIL;
	T6_ = (*t).keys[(((NI) 0))- 0]; (*t).keys[(((NI) 0))- 0] = copyStringRC1((*(*b).root).keys[(((NI) 0))- 0]);
	if (T6_) nimGCunrefNoCycle(T6_);
	asgnRef((void**) (&(*t)._isInternal_2.links[(((NI) 0))- 0]), (*b).root);
	T7_ = NIM_NIL;
	T7_ = (*t).keys[(((NI) 1))- 0]; (*t).keys[(((NI) 1))- 0] = copyStringRC1((*u).keys[(((NI) 0))- 0]);
	if (T7_) nimGCunrefNoCycle(T7_);
	asgnRef((void**) (&(*t)._isInternal_2.links[(((NI) 1))- 0]), u);
	unsureAsgnRef((void**) (&(*b).root), t);
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw*, getOrDefault__vm_12050)(tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q b, NimStringDesc* key) {
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* result;
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* x;
{	result = NIM_NIL;
	x = b.root;
	{
		while (1) {
			if (!(*x).isInternal) goto LA2;
			{
				NI j;
				NI i;
				j = (NI)0;
				i = ((NI) 0);
				{
					while (1) {
						if (!(i < (*x).entries)) goto LA5;
						j = i;
						{
							NIM_BOOL T8_;
							NI T10_;
							T8_ = (NIM_BOOL)0;
							T8_ = ((NI)(j + ((NI) 1)) == (*x).entries);
							if (T8_) goto LA9_;
							T10_ = (NI)0;
							T10_ = cmp__system_1549(key, (*x).keys[((NI)(j + ((NI) 1)))- 0]);
							T8_ = (T10_ < ((NI) 0));
							LA9_: ;
							if (!T8_) goto LA11_;
							x = (*x)._isInternal_2.links[(j)- 0];
							goto LA3;
						}
						LA11_: ;
						i += ((NI) 1);
					} LA5: ;
				}
			} LA3: ;
		} LA2: ;
	}
	{
		NI j_2;
		NI i_2;
		j_2 = (NI)0;
		i_2 = ((NI) 0);
		{
			while (1) {
				if (!(i_2 < (*x).entries)) goto LA15;
				j_2 = i_2;
				{
					NI T18_;
					T18_ = (NI)0;
					T18_ = cmp__system_1549(key, (*x).keys[(j_2)- 0]);
					if (!(T18_ == ((NI) 0))) goto LA19_;
					result = (*x)._isInternal_1.vals[(j_2)- 0];
					goto BeforeRet_;
				}
				LA19_: ;
				i_2 += ((NI) 1);
			} LA15: ;
		}
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, hasNext__vm_12423)(tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q b, NI index) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = (index < b.entries);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, countSubTree__vm_12651)(tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* it) {
	NI result;
	result = (NI)0;
	{
		if (!(*it).isInternal) goto LA3_;
		result = ((NI) 0);
		{
			NI k;
			NI i;
			k = (NI)0;
			i = ((NI) 0);
			{
				while (1) {
					NI T8_;
					if (!(i < (*it).entries)) goto LA7;
					k = i;
					T8_ = (NI)0;
					T8_ = countSubTree__vm_12651((*it)._isInternal_2.links[(k)- 0]);
					result += T8_;
					i += ((NI) 1);
				} LA7: ;
			}
		}
	}
	goto LA1_;
	LA3_: ;
	{
		result = (*it).entries;
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, next__vm_12574)(tyObject_BTree__R2EgvhuH9cLMYvSPesdcu5Q b, NI index, tyTuple__xBIQCKakCgKTQ7wLgy259cg* Result) {
	tyObject_NodecolonObjectType___NOM0ZpqV9bLtofkCilAnZ8A* it;
	NI i;
	NimStringDesc* colontmp_;
	tyObject_TNode__uh9cWvEa5Ty85PXOtuP5emw* colontmp__2;
	NI colontmp__3;
	it = b.root;
	i = index;
	{
		while (1) {
			NI sum;
			if (!(*it).isInternal) goto LA2;
			sum = ((NI) 0);
			{
				NI k;
				NI i_2;
				k = (NI)0;
				i_2 = ((NI) 0);
				{
					while (1) {
						NI c;
						if (!(i_2 < (*it).entries)) goto LA5;
						k = i_2;
						c = countSubTree__vm_12651((*it)._isInternal_2.links[(k)- 0]);
						sum += c;
						{
							if (!(i < sum)) goto LA8_;
							it = (*it)._isInternal_2.links[(k)- 0];
							i -= (NI)(sum - c);
							goto LA3;
						}
						LA8_: ;
						i_2 += ((NI) 1);
					} LA5: ;
				}
			} LA3: ;
		} LA2: ;
	}
	colontmp_ = copyString((*it).keys[(i)- 0]);
	colontmp__2 = (*it)._isInternal_1.vals[(i)- 0];
	colontmp__3 = (NI)(index + ((NI) 1));
	unsureAsgnRef((void**) (&(*Result).Field0), copyString(colontmp_));
	unsureAsgnRef((void**) (&(*Result).Field1), colontmp__2);
	(*Result).Field2 = colontmp__3;
}