Debian Codegraph @

gcc/testsuite/gcc.dg/params/blocksort-part.c

raw
1 /* { dg-skip-if "RISC-V and AArch64 do not support these bounds." { riscv*-*-* aarch64*-*-* } { "--param stack-clash-protection-*" } } */
2 /* { dg-skip-if "For 32-bit hosts such param is too much and even for 64-bit might require hundreds of GB of RAM" { *-*-* } { "--param min-nondebug-insn-uid=1073741824" } } */
3
4 /*-------------------------------------------------------------*/
5 /*--- Block sorting machinery ---*/
6 /*--- blocksort.c ---*/
7 /*-------------------------------------------------------------*/
8
9 /* ------------------------------------------------------------------
10 This file is part of bzip2/libbzip2, a program and library for
11 lossless, block-sorting data compression.
12
13 bzip2/libbzip2 version 1.0.6 of 6 September 2010
14 Copyright (C) 1996-2010 Julian Seward <[email protected]>
15
16 Please read the WARNING, DISCLAIMER and PATENTS sections in the
17 README file.
18
19 This program is released under the terms of the license contained
20 in the file LICENSE.
21 ------------------------------------------------------------------ */
22
23 typedef char Char;
24 typedef unsigned char Bool;
25 typedef unsigned char UChar;
26 #if __SIZEOF_INT__ == 2
27 typedef long Int32;
28 typedef unsigned long UInt32;
29 #else
30 typedef int Int32;
31 typedef unsigned int UInt32;
32 #endif
33 typedef short Int16;
34 typedef unsigned short UInt16;
35
36 #define True ((Bool)1)
37 #define False ((Bool)0)
38
39 #define BZ_M_IDLE 1
40 #define BZ_M_RUNNING 2
41 #define BZ_M_FLUSHING 3
42 #define BZ_M_FINISHING 4
43
44 #define BZ_S_OUTPUT 1
45 #define BZ_S_INPUT 2
46
47 #define BZ_N_RADIX 2
48 #define BZ_N_QSORT 12
49 #define BZ_N_SHELL 18
50 #define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)
51
52 /*---------------------------------------------*/
53 /*--- Fallback O(N log(N)^2) sorting ---*/
54 /*--- algorithm, for repetitive blocks ---*/
55 /*---------------------------------------------*/
56
57 /*---------------------------------------------*/
58 void fallbackSimpleSort ( UInt32* fmap,
59 UInt32* eclass,
60 Int32 lo,
61 Int32 hi )
62 {
63 Int32 i, j, tmp;
64 UInt32 ec_tmp;
65
66 if (lo == hi) return;
67
68 if (hi - lo > 3) {
69 for ( i = hi-4; i >= lo; i-- ) {
70 tmp = fmap[i];
71 ec_tmp = eclass[tmp];
72 for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
73 fmap[j-4] = fmap[j];
74 fmap[j-4] = tmp;
75 }
76 }
77
78 for ( i = hi-1; i >= lo; i-- ) {
79 tmp = fmap[i];
80 ec_tmp = eclass[tmp];
81 for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
82 fmap[j-1] = fmap[j];
83 fmap[j-1] = tmp;
84 }
85 }
86
87
88 /*---------------------------------------------*/
89 #define fswap(zz1, zz2) \
90 { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
91
92 #define fvswap(zzp1, zzp2, zzn) \
93 { \
94 Int32 yyp1 = (zzp1); \
95 Int32 yyp2 = (zzp2); \
96 Int32 yyn = (zzn); \
97 while (yyn > 0) { \
98 fswap(fmap[yyp1], fmap[yyp2]); \
99 yyp1++; yyp2++; yyn--; \
100 } \
101 }
102
103
104 #define fmin(a,b) ((a) < (b)) ? (a) : (b)
105
106 #define fpush(lz,hz) { stackLo[sp] = lz; \
107 stackHi[sp] = hz; \
108 sp++; }
109
110 #define fpop(lz,hz) { sp--; \
111 lz = stackLo[sp]; \
112 hz = stackHi[sp]; }
113
114 #define FALLBACK_QSORT_SMALL_THRESH 10
115 #define FALLBACK_QSORT_STACK_SIZE 100
116
117
118 void fallbackQSort3 ( UInt32* fmap,
119 UInt32* eclass,
120 Int32 loSt,
121 Int32 hiSt )
122 {
123 Int32 unLo, unHi, ltLo, gtHi, n, m;
124 Int32 sp, lo, hi;
125 UInt32 med, r, r3;
126 Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];
127 Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];
128
129 r = 0;
130
131 sp = 0;
132 fpush ( loSt, hiSt );
133
134 while (sp > 0) {
135
136 fpop ( lo, hi );
137 if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
138 fallbackSimpleSort ( fmap, eclass, lo, hi );
139 continue;
140 }
141
142 /* Random partitioning. Median of 3 sometimes fails to
143 avoid bad cases. Median of 9 seems to help but
144 looks rather expensive. This too seems to work but
145 is cheaper. Guidance for the magic constants
146 7621 and 32768 is taken from Sedgewick's algorithms
147 book, chapter 35.
148 */
149 r = ((r * 7621) + 1) % 32768;
150 r3 = r % 3;
151 if (r3 == 0) med = eclass[fmap[lo]]; else
152 if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else
153 med = eclass[fmap[hi]];
154
155 unLo = ltLo = lo;
156 unHi = gtHi = hi;
157
158 while (1) {
159 while (1) {
160 if (unLo > unHi) break;
161 n = (Int32)eclass[fmap[unLo]] - (Int32)med;
162 if (n == 0) {
163 fswap(fmap[unLo], fmap[ltLo]);
164 ltLo++; unLo++;
165 continue;
166 };
167 if (n > 0) break;
168 unLo++;
169 }
170 while (1) {
171 if (unLo > unHi) break;
172 n = (Int32)eclass[fmap[unHi]] - (Int32)med;
173 if (n == 0) {
174 fswap(fmap[unHi], fmap[gtHi]);
175 gtHi--; unHi--;
176 continue;
177 };
178 if (n < 0) break;
179 unHi--;
180 }
181 if (unLo > unHi) break;
182 fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;
183 }
184
185 if (gtHi < ltLo) continue;
186
187 n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);
188 m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);
189
190 n = lo + unLo - ltLo - 1;
191 m = hi - (gtHi - unHi) + 1;
192
193 if (n - lo > hi - m) {
194 fpush ( lo, n );
195 fpush ( m, hi );
196 } else {
197 fpush ( m, hi );
198 fpush ( lo, n );
199 }
200 }
201 }
202
203 #undef fmin
204 #undef fpush
205 #undef fpop
206 #undef fswap
207 #undef fvswap
208 #undef FALLBACK_QSORT_SMALL_THRESH
209 #undef FALLBACK_QSORT_STACK_SIZE
210
211
212 /*---------------------------------------------*/
213 /* Pre:
214 nblock > 0
215 eclass exists for [0 .. nblock-1]
216 ((UChar*)eclass) [0 .. nblock-1] holds block
217 ptr exists for [0 .. nblock-1]
218
219 Post:
220 ((UChar*)eclass) [0 .. nblock-1] holds block
221 All other areas of eclass destroyed
222 fmap [0 .. nblock-1] holds sorted order
223 bhtab [ 0 .. 2+(nblock/32) ] destroyed
224 */
225
226 #define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
227 #define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
228 #define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
229 #define WORD_BH(zz) bhtab[(zz) >> 5]
230 #define UNALIGNED_BH(zz) ((zz) & 0x01f)
231
232 void fallbackSort ( UInt32* fmap,
233 UInt32* eclass,
234 UInt32* bhtab,
235 Int32 nblock,
236 Int32 verb )
237 {
238 Int32 ftab[257];
239 Int32 ftabCopy[256];
240 Int32 H, i, j, k, l, r, cc, cc1;
241 Int32 nNotDone;
242 Int32 nBhtab;
243 UChar* eclass8 = (UChar*)eclass;
244
245 /*--
246 Initial 1-char radix sort to generate
247 initial fmap and initial BH bits.
248 --*/
249 for (i = 0; i < 257; i++) ftab[i] = 0;
250 for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
251 for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
252 for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
253
254 for (i = 0; i < nblock; i++) {
255 j = eclass8[i];
256 k = ftab[j] - 1;
257 ftab[j] = k;
258 fmap[k] = i;
259 }
260
261 nBhtab = 2 + (nblock / 32);
262 for (i = 0; i < nBhtab; i++) bhtab[i] = 0;
263 for (i = 0; i < 256; i++) SET_BH(ftab[i]);
264
265 /*--
266 Inductively refine the buckets. Kind-of an
267 "exponential radix sort" (!), inspired by the
268 Manber-Myers suffix array construction algorithm.
269 --*/
270
271 /*-- set sentinel bits for block-end detection --*/
272 for (i = 0; i < 32; i++) {
273 SET_BH(nblock + 2*i);
274 CLEAR_BH(nblock + 2*i + 1);
275 }
276
277 /*-- the log(N) loop --*/
278 H = 1;
279 while (1) {
280
281
282 j = 0;
283 for (i = 0; i < nblock; i++) {
284 if (ISSET_BH(i)) j = i;
285 k = fmap[i] - H; if (k < 0) k += nblock;
286 eclass[k] = j;
287 }
288
289 nNotDone = 0;
290 r = -1;
291 while (1) {
292
293 /*-- find the next non-singleton bucket --*/
294 k = r + 1;
295 while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
296 if (ISSET_BH(k)) {
297 while (WORD_BH(k) == 0xffffffff) k += 32;
298 while (ISSET_BH(k)) k++;
299 }
300 l = k - 1;
301 if (l >= nblock) break;
302 while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++;
303 if (!ISSET_BH(k)) {
304 while (WORD_BH(k) == 0x00000000) k += 32;
305 while (!ISSET_BH(k)) k++;
306 }
307 r = k - 1;
308 if (r >= nblock) break;
309
310 /*-- now [l, r] bracket current bucket --*/
311 if (r > l) {
312 nNotDone += (r - l + 1);
313 fallbackQSort3 ( fmap, eclass, l, r );
314
315 /*-- scan bucket and generate header bits-- */
316 cc = -1;
317 for (i = l; i <= r; i++) {
318 cc1 = eclass[fmap[i]];
319 if (cc != cc1) { SET_BH(i); cc = cc1; };
320 }
321 }
322 }
323
324 H *= 2;
325 if (H > nblock || nNotDone == 0) break;
326 }
327
328 /*--
329 Reconstruct the original block in
330 eclass8 [0 .. nblock-1], since the
331 previous phase destroyed it.
332 --*/
333 j = 0;
334 for (i = 0; i < nblock; i++) {
335 while (ftabCopy[j] == 0) j++;
336 ftabCopy[j]--;
337 eclass8[fmap[i]] = (UChar)j;
338 }
339 }
340
341 #undef SET_BH
342 #undef CLEAR_BH
343 #undef ISSET_BH
344 #undef WORD_BH
345 #undef UNALIGNED_BH
346
347
348 /*---------------------------------------------*/
349 /*--- The main, O(N^2 log(N)) sorting ---*/
350 /*--- algorithm. Faster for "normal" ---*/
351 /*--- non-repetitive blocks. ---*/
352 /*---------------------------------------------*/
353
354 /*---------------------------------------------*/
355 Bool mainGtU ( UInt32 i1,
356 UInt32 i2,
357 UChar* block,
358 UInt16* quadrant,
359 UInt32 nblock,
360 Int32* budget )
361 {
362 Int32 k;
363 UChar c1, c2;
364 UInt16 s1, s2;
365
366 /* 1 */
367 c1 = block[i1]; c2 = block[i2];
368 if (c1 != c2) return (c1 > c2);
369 i1++; i2++;
370 /* 2 */
371 c1 = block[i1]; c2 = block[i2];
372 if (c1 != c2) return (c1 > c2);
373 i1++; i2++;
374 /* 3 */
375 c1 = block[i1]; c2 = block[i2];
376 if (c1 != c2) return (c1 > c2);
377 i1++; i2++;
378 /* 4 */
379 c1 = block[i1]; c2 = block[i2];
380 if (c1 != c2) return (c1 > c2);
381 i1++; i2++;
382 /* 5 */
383 c1 = block[i1]; c2 = block[i2];
384 if (c1 != c2) return (c1 > c2);
385 i1++; i2++;
386 /* 6 */
387 c1 = block[i1]; c2 = block[i2];
388 if (c1 != c2) return (c1 > c2);
389 i1++; i2++;
390 /* 7 */
391 c1 = block[i1]; c2 = block[i2];
392 if (c1 != c2) return (c1 > c2);
393 i1++; i2++;
394 /* 8 */
395 c1 = block[i1]; c2 = block[i2];
396 if (c1 != c2) return (c1 > c2);
397 i1++; i2++;
398 /* 9 */
399 c1 = block[i1]; c2 = block[i2];
400 if (c1 != c2) return (c1 > c2);
401 i1++; i2++;
402 /* 10 */
403 c1 = block[i1]; c2 = block[i2];
404 if (c1 != c2) return (c1 > c2);
405 i1++; i2++;
406 /* 11 */
407 c1 = block[i1]; c2 = block[i2];
408 if (c1 != c2) return (c1 > c2);
409 i1++; i2++;
410 /* 12 */
411 c1 = block[i1]; c2 = block[i2];
412 if (c1 != c2) return (c1 > c2);
413 i1++; i2++;
414
415 k = nblock + 8;
416
417 do {
418 /* 1 */
419 c1 = block[i1]; c2 = block[i2];
420 if (c1 != c2) return (c1 > c2);
421 s1 = quadrant[i1]; s2 = quadrant[i2];
422 if (s1 != s2) return (s1 > s2);
423 i1++; i2++;
424 /* 2 */
425 c1 = block[i1]; c2 = block[i2];
426 if (c1 != c2) return (c1 > c2);
427 s1 = quadrant[i1]; s2 = quadrant[i2];
428 if (s1 != s2) return (s1 > s2);
429 i1++; i2++;
430 /* 3 */
431 c1 = block[i1]; c2 = block[i2];
432 if (c1 != c2) return (c1 > c2);
433 s1 = quadrant[i1]; s2 = quadrant[i2];
434 if (s1 != s2) return (s1 > s2);
435 i1++; i2++;
436 /* 4 */
437 c1 = block[i1]; c2 = block[i2];
438 if (c1 != c2) return (c1 > c2);
439 s1 = quadrant[i1]; s2 = quadrant[i2];
440 if (s1 != s2) return (s1 > s2);
441 i1++; i2++;
442 /* 5 */
443 c1 = block[i1]; c2 = block[i2];
444 if (c1 != c2) return (c1 > c2);
445 s1 = quadrant[i1]; s2 = quadrant[i2];
446 if (s1 != s2) return (s1 > s2);
447 i1++; i2++;
448 /* 6 */
449 c1 = block[i1]; c2 = block[i2];
450 if (c1 != c2) return (c1 > c2);
451 s1 = quadrant[i1]; s2 = quadrant[i2];
452 if (s1 != s2) return (s1 > s2);
453 i1++; i2++;
454 /* 7 */
455 c1 = block[i1]; c2 = block[i2];
456 if (c1 != c2) return (c1 > c2);
457 s1 = quadrant[i1]; s2 = quadrant[i2];
458 if (s1 != s2) return (s1 > s2);
459 i1++; i2++;
460 /* 8 */
461 c1 = block[i1]; c2 = block[i2];
462 if (c1 != c2) return (c1 > c2);
463 s1 = quadrant[i1]; s2 = quadrant[i2];
464 if (s1 != s2) return (s1 > s2);
465 i1++; i2++;
466
467 if (i1 >= nblock) i1 -= nblock;
468 if (i2 >= nblock) i2 -= nblock;
469
470 k -= 8;
471 (*budget)--;
472 }
473 while (k >= 0);
474
475 return False;
476 }
477
478
479 /*---------------------------------------------*/
480 /*--
481 Knuth's increments seem to work better
482 than Incerpi-Sedgewick here. Possibly
483 because the number of elems to sort is
484 usually small, typically <= 20.
485 --*/
486 Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
487 9841, 29524, 88573, 265720,
488 797161, 2391484 };
489
490 void mainSimpleSort ( UInt32* ptr,
491 UChar* block,
492 UInt16* quadrant,
493 Int32 nblock,
494 Int32 lo,
495 Int32 hi,
496 Int32 d,
497 Int32* budget )
498 {
499 Int32 i, j, h, bigN, hp;
500 UInt32 v;
501
502 bigN = hi - lo + 1;
503 if (bigN < 2) return;
504
505 hp = 0;
506 while (incs[hp] < bigN) hp++;
507 hp--;
508
509 for (; hp >= 0; hp--) {
510 h = incs[hp];
511
512 i = lo + h;
513 while (True) {
514
515 /*-- copy 1 --*/
516 if (i > hi) break;
517 v = ptr[i];
518 j = i;
519 while ( mainGtU (
520 ptr[j-h]+d, v+d, block, quadrant, nblock, budget
521 ) ) {
522 ptr[j] = ptr[j-h];
523 j = j - h;
524 if (j <= (lo + h - 1)) break;
525 }
526 ptr[j] = v;
527 i++;
528
529 /*-- copy 2 --*/
530 if (i > hi) break;
531 v = ptr[i];
532 j = i;
533 while ( mainGtU (
534 ptr[j-h]+d, v+d, block, quadrant, nblock, budget
535 ) ) {
536 ptr[j] = ptr[j-h];
537 j = j - h;
538 if (j <= (lo + h - 1)) break;
539 }
540 ptr[j] = v;
541 i++;
542
543 /*-- copy 3 --*/
544 if (i > hi) break;
545 v = ptr[i];
546 j = i;
547 while ( mainGtU (
548 ptr[j-h]+d, v+d, block, quadrant, nblock, budget
549 ) ) {
550 ptr[j] = ptr[j-h];
551 j = j - h;
552 if (j <= (lo + h - 1)) break;
553 }
554 ptr[j] = v;
555 i++;
556
557 if (*budget < 0) return;
558 }
559 }
560 }
561
562
563 /*---------------------------------------------*/
564 /*--
565 The following is an implementation of
566 an elegant 3-way quicksort for strings,
567 described in a paper "Fast Algorithms for
568 Sorting and Searching Strings", by Robert
569 Sedgewick and Jon L. Bentley.
570 --*/
571
572 #define mswap(zz1, zz2) \
573 { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
574
575 #define mvswap(zzp1, zzp2, zzn) \
576 { \
577 Int32 yyp1 = (zzp1); \
578 Int32 yyp2 = (zzp2); \
579 Int32 yyn = (zzn); \
580 while (yyn > 0) { \
581 mswap(ptr[yyp1], ptr[yyp2]); \
582 yyp1++; yyp2++; yyn--; \
583 } \
584 }
585
586 UChar mmed3 ( UChar a, UChar b, UChar c )
587 {
588 UChar t;
589 if (a > b) { t = a; a = b; b = t; };
590 if (b > c) {
591 b = c;
592 if (a > b) b = a;
593 }
594 return b;
595 }
596
597 #define mmin(a,b) ((a) < (b)) ? (a) : (b)
598
599 #define mpush(lz,hz,dz) { stackLo[sp] = lz; \
600 stackHi[sp] = hz; \
601 stackD [sp] = dz; \
602 sp++; }
603
604 #define mpop(lz,hz,dz) { sp--; \
605 lz = stackLo[sp]; \
606 hz = stackHi[sp]; \
607 dz = stackD [sp]; }
608
609
610 #define mnextsize(az) (nextHi[az]-nextLo[az])
611
612 #define mnextswap(az,bz) \
613 { Int32 tz; \
614 tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \
615 tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \
616 tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
617
618
619 #define MAIN_QSORT_SMALL_THRESH 20
620 #define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)
621 #define MAIN_QSORT_STACK_SIZE 100
622
623 void mainQSort3 ( UInt32* ptr,
624 UChar* block,
625 UInt16* quadrant,
626 Int32 nblock,
627 Int32 loSt,
628 Int32 hiSt,
629 Int32 dSt,
630 Int32* budget )
631 {
632 Int32 unLo, unHi, ltLo, gtHi, n, m, med;
633 Int32 sp, lo, hi, d;
634
635 Int32 stackLo[MAIN_QSORT_STACK_SIZE];
636 Int32 stackHi[MAIN_QSORT_STACK_SIZE];
637 Int32 stackD [MAIN_QSORT_STACK_SIZE];
638
639 Int32 nextLo[3];
640 Int32 nextHi[3];
641 Int32 nextD [3];
642
643 sp = 0;
644 mpush ( loSt, hiSt, dSt );
645
646 while (sp > 0) {
647
648 mpop ( lo, hi, d );
649 if (hi - lo < MAIN_QSORT_SMALL_THRESH ||
650 d > MAIN_QSORT_DEPTH_THRESH) {
651 mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );
652 if (*budget < 0) return;
653 continue;
654 }
655
656 med = (Int32)
657 mmed3 ( block[ptr[ lo ]+d],
658 block[ptr[ hi ]+d],
659 block[ptr[ (lo+hi)>>1 ]+d] );
660
661 unLo = ltLo = lo;
662 unHi = gtHi = hi;
663
664 while (True) {
665 while (True) {
666 if (unLo > unHi) break;
667 n = ((Int32)block[ptr[unLo]+d]) - med;
668 if (n == 0) {
669 mswap(ptr[unLo], ptr[ltLo]);
670 ltLo++; unLo++; continue;
671 };
672 if (n > 0) break;
673 unLo++;
674 }
675 while (True) {
676 if (unLo > unHi) break;
677 n = ((Int32)block[ptr[unHi]+d]) - med;
678 if (n == 0) {
679 mswap(ptr[unHi], ptr[gtHi]);
680 gtHi--; unHi--; continue;
681 };
682 if (n < 0) break;
683 unHi--;
684 }
685 if (unLo > unHi) break;
686 mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;
687 }
688
689 if (gtHi < ltLo) {
690 mpush(lo, hi, d+1 );
691 continue;
692 }
693
694 n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);
695 m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);
696
697 n = lo + unLo - ltLo - 1;
698 m = hi - (gtHi - unHi) + 1;
699
700 nextLo[0] = lo; nextHi[0] = n; nextD[0] = d;
701 nextLo[1] = m; nextHi[1] = hi; nextD[1] = d;
702 nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;
703
704 if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
705 if (mnextsize(1) < mnextsize(2)) mnextswap(1,2);
706 if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
707
708
709 mpush (nextLo[0], nextHi[0], nextD[0]);
710 mpush (nextLo[1], nextHi[1], nextD[1]);
711 mpush (nextLo[2], nextHi[2], nextD[2]);
712 }
713 }