line |
true |
false |
branch |
40
|
246 |
6239 |
if (lo == hi) return; |
42
|
2824 |
3415 |
if (hi - lo > 3) { |
43
|
8785 |
2824 |
for ( i = hi-4; i >= lo; i-- ) { |
46
|
9096 |
1912 |
for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 ) |
|
2223 |
6873 |
for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 ) |
52
|
18817 |
6239 |
for ( i = hi-1; i >= lo; i-- ) { |
55
|
25340 |
1714 |
for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ ) |
|
8237 |
17103 |
for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ ) |
109
|
12191 |
1623 |
while (sp > 0) { |
111
|
0 |
12191 |
AssertH ( sp < FALLBACK_QSORT_STACK_SIZE - 1, 1004 ); |
114
|
6485 |
5706 |
if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) { |
128
|
1036 |
4670 |
if (r3 == 0) med = eclass[fmap[lo]]; else |
129
|
2691 |
1979 |
if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else |
137
|
2491 |
1081415 |
if (unLo > unHi) break; |
139
|
972027 |
109388 |
if (n == 0) { |
144
|
22387 |
87001 |
if (n > 0) break; |
148
|
5706 |
96903 |
if (unLo > unHi) break; |
150
|
6775 |
90128 |
if (n == 0) { |
155
|
19172 |
70956 |
if (n < 0) break; |
158
|
5706 |
19172 |
if (unLo > unHi) break; |
164
|
422 |
5284 |
if (gtHi < ltLo) continue; |
166
|
22320 |
5284 |
n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n); |
167
|
4776 |
5284 |
m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m); |
172
|
2004 |
3280 |
if (n - lo > hi - m) { |
231
|
5140 |
20 |
for (i = 0; i < 257; i++) ftab[i] = 0; |
232
|
75395 |
20 |
for (i = 0; i < nblock; i++) ftab[eclass8[i]]++; |
233
|
5120 |
20 |
for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i]; |
234
|
5120 |
20 |
for (i = 1; i < 257; i++) ftab[i] += ftab[i-1]; |
236
|
75395 |
20 |
for (i = 0; i < nblock; i++) { |
244
|
2383 |
20 |
for (i = 0; i < nBhtab; i++) bhtab[i] = 0; |
245
|
5120 |
20 |
for (i = 0; i < 256; i++) SET_BH(ftab[i]); |
254
|
640 |
20 |
for (i = 0; i < 32; i++) { |
267
|
1054633 |
82 |
for (i = 0; i < nblock; i++) { |
268
|
54580 |
1000053 |
if (ISSET_BH(i)) j = i; |
269
|
98418 |
956215 |
k = fmap[i] - H; if (k < 0) k += nblock; |
279
|
7744 |
1283 |
while (ISSET_BH(k) && UNALIGNED_BH(k)) k++; |
|
7322 |
422 |
while (ISSET_BH(k) && UNALIGNED_BH(k)) k++; |
280
|
422 |
1283 |
if (ISSET_BH(k)) { |
281
|
1331 |
422 |
while (WORD_BH(k) == 0xffffffff) k += 32; |
282
|
4748 |
422 |
while (ISSET_BH(k)) k++; |
285
|
82 |
1623 |
if (l >= nblock) break; |
286
|
18143 |
682 |
while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++; |
|
17202 |
941 |
while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++; |
287
|
941 |
682 |
if (!ISSET_BH(k)) { |
288
|
30312 |
941 |
while (WORD_BH(k) == 0x00000000) k += 32; |
289
|
12867 |
941 |
while (!ISSET_BH(k)) k++; |
292
|
0 |
1623 |
if (r >= nblock) break; |
295
|
1623 |
0 |
if (r > l) { |
301
|
1001676 |
1623 |
for (i = l; i <= r; i++) { |
303
|
28240 |
973436 |
if (cc != cc1) { SET_BH(i); cc = cc1; }; |
312
|
80 |
2 |
if (H > nblock || nNotDone == 0) break; |
|
62 |
18 |
if (H > nblock || nNotDone == 0) break; |
323
|
75395 |
20 |
for (i = 0; i < nblock; i++) { |
324
|
2550 |
75395 |
while (ftabCopy[j] == 0) j++; |
328
|
0 |
20 |
AssertH ( j < 256, 1005 ); |
361
|
8695 |
234 |
if (c1 != c2) return (c1 > c2); |
365
|
33 |
201 |
if (c1 != c2) return (c1 > c2); |
369
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
373
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
377
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
381
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
385
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
389
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
393
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
397
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
401
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
405
|
0 |
201 |
if (c1 != c2) return (c1 > c2); |
413
|
16 |
588781 |
if (c1 != c2) return (c1 > c2); |
415
|
0 |
588781 |
if (s1 != s2) return (s1 > s2); |
419
|
17 |
588764 |
if (c1 != c2) return (c1 > c2); |
421
|
0 |
588764 |
if (s1 != s2) return (s1 > s2); |
425
|
16 |
588748 |
if (c1 != c2) return (c1 > c2); |
427
|
0 |
588748 |
if (s1 != s2) return (s1 > s2); |
431
|
16 |
588732 |
if (c1 != c2) return (c1 > c2); |
433
|
0 |
588732 |
if (s1 != s2) return (s1 > s2); |
437
|
16 |
588716 |
if (c1 != c2) return (c1 > c2); |
439
|
0 |
588716 |
if (s1 != s2) return (s1 > s2); |
443
|
16 |
588700 |
if (c1 != c2) return (c1 > c2); |
445
|
0 |
588700 |
if (s1 != s2) return (s1 > s2); |
449
|
16 |
588684 |
if (c1 != c2) return (c1 > c2); |
451
|
0 |
588684 |
if (s1 != s2) return (s1 > s2); |
455
|
16 |
588668 |
if (c1 != c2) return (c1 > c2); |
457
|
0 |
588668 |
if (s1 != s2) return (s1 > s2); |
460
|
72 |
588596 |
if (i1 >= nblock) i1 -= nblock; |
461
|
72 |
588596 |
if (i2 >= nblock) i2 -= nblock; |
466
|
588596 |
72 |
while (k >= 0); |
498
|
0 |
5781 |
if (bigN < 2) return; |
501
|
5825 |
5781 |
while (incs[hp] < bigN) hp++; |
504
|
5814 |
5779 |
for (; hp >= 0; hp--) { |
511
|
221 |
5912 |
if (i > hi) break; |
514
|
2953 |
2985 |
while ( mainGtU ( |
519
|
2927 |
26 |
if (j <= (lo + h - 1)) break; |
525
|
4450 |
1462 |
if (i > hi) break; |
528
|
1402 |
970 |
while ( mainGtU ( |
533
|
492 |
910 |
if (j <= (lo + h - 1)) break; |
539
|
1141 |
321 |
if (i > hi) break; |
542
|
398 |
221 |
while ( mainGtU ( |
547
|
100 |
298 |
if (j <= (lo + h - 1)) break; |
552
|
2 |
319 |
if (*budget < 0) return; |
586
|
0 |
26 |
if (a > b) { t = a; a = b; b = t; }; |
587
|
0 |
26 |
if (b > c) { |
589
|
0 |
0 |
if (a > b) b = a; |
644
|
5807 |
5779 |
while (sp > 0) { |
646
|
0 |
5807 |
AssertH ( sp < MAIN_QSORT_STACK_SIZE - 2, 1001 ); |
649
|
28 |
5779 |
if (hi - lo < MAIN_QSORT_SMALL_THRESH || |
|
2 |
26 |
if (hi - lo < MAIN_QSORT_SMALL_THRESH || |
652
|
2 |
5779 |
if (*budget < 0) return; |
666
|
26 |
39013 |
if (unLo > unHi) break; |
668
|
39013 |
0 |
if (n == 0) { |
672
|
0 |
0 |
if (n > 0) break; |
676
|
26 |
0 |
if (unLo > unHi) break; |
678
|
0 |
0 |
if (n == 0) { |
682
|
0 |
0 |
if (n < 0) break; |
685
|
26 |
0 |
if (unLo > unHi) break; |
691
|
26 |
0 |
if (gtHi < ltLo) { |
696
|
0 |
0 |
n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n); |
697
|
0 |
0 |
m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m); |
706
|
0 |
0 |
if (mnextsize(0) < mnextsize(1)) mnextswap(0,1); |
707
|
0 |
0 |
if (mnextsize(1) < mnextsize(2)) mnextswap(1,2); |
708
|
0 |
0 |
if (mnextsize(0) < mnextsize(1)) mnextswap(0,1); |
770
|
196611 |
3 |
for (i = 65536; i >= 0; i--) ftab[i] = 0; |
774
|
28759 |
3 |
for (; i >= 3; i -= 4) { |
788
|
1 |
3 |
for (; i >= 0; i--) { |
795
|
102 |
3 |
for (i = 0; i < BZ_N_OVERSHOOT; i++) { |
803
|
196608 |
3 |
for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1]; |
807
|
28759 |
3 |
for (; i >= 3; i -= 4) { |
825
|
1 |
3 |
for (; i >= 0; i--) { |
837
|
768 |
3 |
for (i = 0; i <= 255; i++) { |
845
|
12 |
3 |
do h = 3 * h + 1; while (h <= 256); |
848
|
3303 |
15 |
for (i = h; i <= 255; i++) { |
851
|
1368 |
3145 |
while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) { |
854
|
158 |
1210 |
if (j <= (h - 1)) goto zero; |
859
|
12 |
3 |
} while (h != 1); |
868
|
737 |
1 |
for (i = 0; i <= 255; i++) { |
886
|
188377 |
735 |
for (j = 0; j <= 255; j++) { |
887
|
187640 |
737 |
if (j != ss) { |
889
|
97680 |
89960 |
if ( ! (ftab[sb] & SETMASK) ) { |
892
|
5781 |
91899 |
if (hi > lo) { |
902
|
2 |
5779 |
if (*budget < 0) return; |
909
|
0 |
735 |
AssertH ( !bigDone[ss], 1006 ); |
919
|
188160 |
735 |
for (j = 0; j <= 255; j++) { |
923
|
25021 |
735 |
for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) { |
924
|
0 |
25021 |
k = ptr[j]-1; if (k < 0) k += nblock; |
926
|
12927 |
12094 |
if (!bigDone[c1]) |
929
|
24983 |
735 |
for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) { |
930
|
1 |
24982 |
k = ptr[j]-1; if (k < 0) k += nblock; |
932
|
12201 |
12782 |
if (!bigDone[c1]) |
937
|
0 |
735 |
AssertH ( (copyStart[ss]-1 == copyEnd[ss]) |
|
0 |
0 |
AssertH ( (copyStart[ss]-1 == copyEnd[ss]) |
|
0 |
0 |
AssertH ( (copyStart[ss]-1 == copyEnd[ss]) |
946
|
188160 |
735 |
for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK; |
989
|
734 |
1 |
if (i < 255) { |
994
|
0 |
734 |
while ((bbSize >> shifts) > 65534) shifts++; |
996
|
49764 |
734 |
for (j = bbSize-1; j >= 0; j--) { |
1000
|
34 |
49730 |
if (a2update < BZ_N_OVERSHOOT) |
1003
|
0 |
734 |
AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 ); |
1044
|
18 |
3 |
if (nblock < 10000) { |
1053
|
1 |
2 |
if (i & 1) i++; |
1063
|
0 |
3 |
if (wfact < 1 ) wfact = 1; |
1064
|
0 |
3 |
if (wfact > 100) wfact = 100; |
1075
|
2 |
1 |
if (budget < 0) { |
1084
|
76007 |
0 |
for (i = 0; i < s->nblock; i++) |
1085
|
21 |
75986 |
if (ptr[i] == 0) |
1088
|
0 |
21 |
AssertH( s->origPtr != -1, 1003 ); |