| 1 | #![forbid(unsafe_code)] |
| 2 | |
| 3 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#; |
| 4 | |
| 5 | use craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/::{ |
| 6 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!, |
| 7 | bzlibrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/::{Arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/Arr2#, EStaterust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#, BZ_N_OVERSHOOTrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_OVERSHOOT., BZ_N_QSORTrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_QSORT., BZ_N_RADIXrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_RADIX., FTAB_LENrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/FTAB_LEN.}, |
| 8 | }; |
| 9 | use craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/::{debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!, debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!}; |
| 10 | |
| 11 | /// Fallback O(N log(N)^2) sorting algorithm, for repetitive blocks |
| 12 | #[inline] |
| 13 | fn fallbackSimpleSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fallbackSimpleSort().(fmap: &mut [u32], eclass: &[u32], lo: i32, hi: i32) { |
| 14 | let mut j: i32; |
| 15 | let mut tmp: i32; |
| 16 | let mut ec_tmp: u32; |
| 17 | |
| 18 | if lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().hi { |
| 19 | return; |
| 20 | } |
| 21 | |
| 22 | if hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().3 { |
| 23 | for i in (lo..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().4).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() { |
| 24 | tmp = fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as i32; |
| 25 | ec_tmp = eclass[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().tmp as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 26 | j = i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().4; |
| 27 | while j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().hi && ec_tmp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().eclass[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). { |
| 28 | fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().4) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 29 | j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().4; |
| 30 | } |
| 31 | fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().4) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = tmp as u32; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | for i in (lo..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#hi).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() { |
| 36 | tmp = fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as i32; |
| 37 | ec_tmp = eclass[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().tmp as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 38 | j = i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 39 | while j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().hi && ec_tmp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().eclass[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). { |
| 40 | fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 41 | j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 42 | } |
| 43 | fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = tmp as u32; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | const FALLBACK_QSORT_SMALL_THRESHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_SMALL_THRESH.: i32 = 10; |
| 48 | const FALLBACK_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_STACK_SIZE.: usize = 100; |
| 49 | |
| 50 | fn fallbackQSort3rust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fallbackQSort3().(fmap: &mut [u32], eclass: &[u32], loSt: i32, hiSt: i32) { |
| 51 | let mut unLo: i32; |
| 52 | let mut unHi: i32; |
| 53 | let mut ltLo: i32; |
| 54 | let mut gtHi: i32; |
| 55 | let mut n: i32; |
| 56 | let mut m: i32; |
| 57 | let mut sp: usize; |
| 58 | let mut lo: i32; |
| 59 | let mut hi: i32; |
| 60 | let mut stackLo: [i32; FALLBACK_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_STACK_SIZE.] = [0; FALLBACK_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_STACK_SIZE.]; |
| 61 | let mut stackHi: [i32; FALLBACK_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_STACK_SIZE.] = [0; FALLBACK_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_STACK_SIZE.]; |
| 62 | |
| 63 | macro_rules! fpushrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fpush! { |
| 64 | ($lz:expr, $hz:expr) => { |
| 65 | stackLo[sp] = $lz; |
| 66 | stackHi[sp] = $hz; |
| 67 | sp += 1; |
| 68 | }; |
| 69 | } |
| 70 | |
| 71 | macro_rules! fvswaprust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fvswap! { |
| 72 | ($zzp1:expr, $zzp2:expr, $zzn:expr) => { |
| 73 | let mut yyp1: i32 = $zzp1; |
| 74 | let mut yyp2: i32 = $zzp2; |
| 75 | let mut yyn: i32 = $zzn; |
| 76 | |
| 77 | while (yyn > 0) { |
| 78 | fmap.swap(yyp1 as usize, yyp2 as usize); |
| 79 | yyp1 += 1; |
| 80 | yyp2 += 1; |
| 81 | yyn -= 1; |
| 82 | } |
| 83 | }; |
| 84 | } |
| 85 | |
| 86 | let mut r = 0u32; |
| 87 | |
| 88 | sp = 0; |
| 89 | fpushrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fpush!!(loSt, hiSt); |
| 90 | |
| 91 | while sp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 { |
| 92 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(sp <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). FALLBACK_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_STACK_SIZE. -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). 1, 1004); |
| 93 | |
| 94 | // the `fpop` macro has one occurence, so it was inlined here |
| 95 | sp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().1; |
| 96 | lo = stackLo[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().sp]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 97 | hi = stackHi[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().sp]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 98 | |
| 99 | if hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().FALLBACK_QSORT_SMALL_THRESHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/FALLBACK_QSORT_SMALL_THRESH. { |
| 100 | fallbackSimpleSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fallbackSimpleSort().(fmap, eclass, lo, hi); |
| 101 | continue; |
| 102 | } |
| 103 | |
| 104 | /* Random partitioning. Median of 3 sometimes fails to |
| 105 | avoid bad cases. Median of 9 seems to help but |
| 106 | looks rather expensive. This too seems to work but |
| 107 | is cheaper. Guidance for the magic constants |
| 108 | 7621 and 32768 is taken from Sedgewick's algorithms |
| 109 | book, chapter 35. |
| 110 | */ |
| 111 | r = r.wrapping_mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_mul().(7621).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(1).wrapping_remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_rem().(32768); |
| 112 | let index = match r.wrapping_remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_rem().(3) { |
| 113 | 0 => fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().lo as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 114 | 1 => fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().((lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().hi) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr().1) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 115 | _ => fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().hi as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 116 | }; |
| 117 | let med = eclass[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().index as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 118 | |
| 119 | ltLo = lo; |
| 120 | unLo = lo; |
| 121 | |
| 122 | gtHi = hi; |
| 123 | unHi = hi; |
| 124 | |
| 125 | loop { |
| 126 | while unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().unHi { |
| 127 | let a = eclass[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().unLo as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 128 | let b = med; |
| 129 | |
| 130 | if a rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().b { |
| 131 | break; |
| 132 | } else if a rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().b { |
| 133 | fmap.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(unLo as usize, ltLo as usize); |
| 134 | ltLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 135 | unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 136 | } else { |
| 137 | unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | while unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().unHi { |
| 142 | let a = eclass[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().unHi as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 143 | let b = med; |
| 144 | |
| 145 | if a rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]lt().b { |
| 146 | break; |
| 147 | } else if a rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().b { |
| 148 | fmap.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(unHi as usize, gtHi as usize); |
| 149 | gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 150 | unHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 151 | } else { |
| 152 | unHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | if unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().unHi { |
| 157 | break; |
| 158 | } |
| 159 | |
| 160 | fmap.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(unLo as usize, unHi as usize); |
| 161 | unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 162 | unHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 163 | } |
| 164 | |
| 165 | debug_assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert_eq!!(unHi, unLo -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). 1, "fallbackQSort3(2)"); |
| 166 | |
| 167 | if gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().ltLo { |
| 168 | continue; |
| 169 | } |
| 170 | |
| 171 | n = Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#min().(ltLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo, unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().ltLo); |
| 172 | fvswaprust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fvswap!!(lo, unLo -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). n, n); |
| 173 | m = Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#min().(hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().gtHi, gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().unHi); |
| 174 | fvswaprust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fvswap!!(unLo, hi -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). m +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 1, m); |
| 175 | |
| 176 | n = lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().ltLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 177 | m = hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().(gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().unHi) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 178 | |
| 179 | if n rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().m { |
| 180 | fpushrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fpush!!(lo, n); |
| 181 | fpushrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fpush!!(m, hi); |
| 182 | } else { |
| 183 | fpushrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fpush!!(m, hi); |
| 184 | fpushrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fpush!!(lo, n); |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | fn fallbackSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fallbackSort().( |
| 190 | fmap: &mut [u32], |
| 191 | arr2: &mut Arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/Arr2#, |
| 192 | bhtab: &mut [u32; FTAB_LENrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/FTAB_LEN.], |
| 193 | nblock: usize, |
| 194 | verb: i32, |
| 195 | ) { |
| 196 | macro_rules! SET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SET_BH! { |
| 197 | ($zz:expr) => { |
| 198 | bhtab[$zz as usize >> 5] |= 1 << ($zz & 31); |
| 199 | }; |
| 200 | } |
| 201 | |
| 202 | macro_rules! CLEAR_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEAR_BH! { |
| 203 | ($zz:expr) => { |
| 204 | bhtab[$zz as usize >> 5] &= !(1 << ($zz & 31)); |
| 205 | }; |
| 206 | } |
| 207 | |
| 208 | macro_rules! ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH! { |
| 209 | ($zz:expr) => { |
| 210 | bhtab[$zz as usize >> 5] & 1u32 << ($zz & 31) != 0 |
| 211 | }; |
| 212 | } |
| 213 | |
| 214 | macro_rules! UNALIGNED_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/UNALIGNED_BH! { |
| 215 | ($zz:expr) => { |
| 216 | ($zz & 0x01f) != 0 |
| 217 | }; |
| 218 | } |
| 219 | |
| 220 | macro_rules! WORD_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/WORD_BH! { |
| 221 | ($zz:expr) => { |
| 222 | bhtab[$zz as usize >> 5] |
| 223 | }; |
| 224 | } |
| 225 | |
| 226 | let mut ftab: [i32; 257] = [0; 257]; |
| 227 | let mut ftabCopy: [i32; 256] = [0; 256]; |
| 228 | |
| 229 | /*-- |
| 230 | Initial 1-char radix sort to generate |
| 231 | initial fmap and initial BH bits. |
| 232 | --*/ |
| 233 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 234 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!(" bucket sorting ..."); |
| 235 | } |
| 236 | |
| 237 | { |
| 238 | let eclass8 = arr2.blockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]block().(nblock); |
| 239 | |
| 240 | for e in eclass8.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() { |
| 241 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u8>`]from().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().e)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 242 | } |
| 243 | |
| 244 | ftabCopy[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#256]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut()..copy_from_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]copy_from_slice().(&ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#256]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().); |
| 245 | |
| 246 | for i in 1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#257 { |
| 247 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 248 | } |
| 249 | |
| 250 | for (i, e) in eclass8.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 251 | let j = usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u8>`]from().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().e); |
| 252 | let k = ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().j]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 253 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = k; |
| 254 | fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().k as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = i as u32; |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | bhtab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().nblock rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().32]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut()..fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().(0); |
| 259 | |
| 260 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#256 { |
| 261 | SET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SET_BH!!(ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().); |
| 262 | } |
| 263 | |
| 264 | /*-- |
| 265 | Inductively refine the buckets. Kind-of an |
| 266 | "exponential radix sort" (!), inspired by the |
| 267 | Manber-Myers suffix array construction algorithm. |
| 268 | --*/ |
| 269 | |
| 270 | /*-- set sentinel bits for block-end detection --*/ |
| 271 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#32 { |
| 272 | SET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SET_BH!!(nblock +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). i); |
| 273 | CLEAR_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEAR_BH!!(nblock +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). i +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 1); |
| 274 | } |
| 275 | |
| 276 | /*-- the log(N) loop --*/ |
| 277 | let nblock = nblock as i32; |
| 278 | let mut H = 1; |
| 279 | let mut k: i32; |
| 280 | let mut l: i32; |
| 281 | loop { |
| 282 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 283 | debug_logrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_log!!(" depth {:>6} has ", H); |
| 284 | } |
| 285 | let mut j = 0; |
| 286 | for (i, x) in fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#nblock as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 287 | if ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH!!(i) { |
| 288 | j = i; |
| 289 | } |
| 290 | k = x.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(H as u32) as i32; |
| 291 | if k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { |
| 292 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().nblock; |
| 293 | } |
| 294 | arr2.eclassrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]eclass().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().k as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = j as u32; |
| 295 | } |
| 296 | |
| 297 | let mut nNotDone = 0; |
| 298 | let mut r = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1; |
| 299 | loop { |
| 300 | /*-- find the next non-singleton bucket --*/ |
| 301 | k = r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 302 | while ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH!!(k) && UNALIGNED_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/UNALIGNED_BH!!(k) { |
| 303 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 304 | } |
| 305 | if ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH!!(k) { |
| 306 | while WORD_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/WORD_BH!!(k) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0xffffffff { |
| 307 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().32; |
| 308 | } |
| 309 | while ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH!!(k) { |
| 310 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 311 | } |
| 312 | } |
| 313 | l = k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 314 | if l rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().nblock { |
| 315 | break; |
| 316 | } |
| 317 | while !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH!!(k) && UNALIGNED_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/UNALIGNED_BH!!(k) { |
| 318 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 319 | } |
| 320 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH!!(k) { |
| 321 | while WORD_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/WORD_BH!!(k) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0x00000000 { |
| 322 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().32; |
| 323 | } |
| 324 | while !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().ISSET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/ISSET_BH!!(k) { |
| 325 | k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 326 | } |
| 327 | } |
| 328 | r = k rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 329 | if r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().nblock { |
| 330 | break; |
| 331 | } |
| 332 | |
| 333 | /*-- now [l, r] bracket current bucket --*/ |
| 334 | if r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().l { |
| 335 | nNotDone rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().r rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().l rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 336 | fallbackQSort3rust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fallbackQSort3().(fmap, arr2.eclassrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]eclass().(), l, r); |
| 337 | |
| 338 | /*-- scan bucket and generate header bits-- */ |
| 339 | let mut cc = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1; |
| 340 | for (i, x) in fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().l as usize..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#r as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 341 | let cc1 = arr2.eclassrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]eclass().()[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().x as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as i32; |
| 342 | if cc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().cc1 { |
| 343 | SET_BHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SET_BH!!(l +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). i as i32); |
| 344 | cc = cc1; |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 350 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!("{:>6} unresolved strings", nNotDone); |
| 351 | } |
| 352 | H rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign().*=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign().2; |
| 353 | if H rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().nblock || nNotDone rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 354 | break; |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 359 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!(" reconstructing block ..."); |
| 360 | } |
| 361 | |
| 362 | { |
| 363 | let eclass8 = arr2.blockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]block().(nblock as usize); |
| 364 | |
| 365 | let mut j = 0; |
| 366 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#nblock { |
| 367 | while ftabCopy[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().j]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 { |
| 368 | j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; |
| 369 | } |
| 370 | ftabCopy[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 371 | eclass8[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().fmap[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = j as u8; |
| 372 | } |
| 373 | |
| 374 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(j <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). 256, 1005); |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | #[inline] |
| 379 | fn mainGtUrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainGtU().( |
| 380 | mut i1: u32, |
| 381 | mut i2: u32, |
| 382 | block: &[u8], |
| 383 | quadrant: &[u16], |
| 384 | nblock: u32, |
| 385 | budget: &mut i32, |
| 386 | ) -> bool { |
| 387 | debug_assert_nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert_ne!!(i1, i2, "mainGtU"); |
| 388 | |
| 389 | let chunk1 = &block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i1 as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().; |
| 390 | let chunk2 = &block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i2 as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().; |
| 391 | |
| 392 | for (c1, c2) in chunk1.chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(4).ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(chunk2.chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(4)) { |
| 393 | let c1 = u32::from_be_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_be_bytes().(c1[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()); |
| 394 | let c2 = u32::from_be_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_be_bytes().(c2[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()); |
| 395 | |
| 396 | if c1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().c2 { |
| 397 | return c1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().c2; |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | i1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().12; |
| 402 | i2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().12; |
| 403 | |
| 404 | for _ in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#nblock.div_ceilrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]div_ceil().(8) { |
| 405 | let b1 = &block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i1 as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().; |
| 406 | let b2 = &block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i2 as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().; |
| 407 | |
| 408 | let q1 = &quadrant[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i1 as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().; |
| 409 | let q2 = &quadrant[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i2 as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().; |
| 410 | |
| 411 | if b1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().b2 || q1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().q2 { |
| 412 | for (((c1, c2), s1), s2) in b1.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(b2).ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(q1).ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(q2) { |
| 413 | if c1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().c2 { |
| 414 | return c1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialOrd<&B>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialOrd<&B>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialOrd<&B>`]gt().c2; |
| 415 | } |
| 416 | if s1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]ne().s2 { |
| 417 | return s1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialOrd<&B>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialOrd<&B>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialOrd<&B>`]gt().s2; |
| 418 | } |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | i1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().8; |
| 423 | i2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().8; |
| 424 | |
| 425 | if i1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().nblock { |
| 426 | i1 = i1.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(nblock); |
| 427 | } |
| 428 | if i2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]ge().nblock { |
| 429 | i2 = i2.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(nblock); |
| 430 | } |
| 431 | |
| 432 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().budget rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 433 | } |
| 434 | |
| 435 | false |
| 436 | } |
| 437 | |
| 438 | static INCSrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/INCS.: [i32; 14] = [ |
| 439 | 1, 4, 13, 40, 121, 364, 1093, 3280, 9841, 29524, 88573, 265720, 797161, 2391484, |
| 440 | ]; |
| 441 | |
| 442 | fn mainSimpleSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainSimpleSort().( |
| 443 | ptr: &mut [u32], |
| 444 | block: &[u8], |
| 445 | quadrant: &[u16], |
| 446 | nblock: usize, |
| 447 | lo: i32, |
| 448 | hi: i32, |
| 449 | d: u32, |
| 450 | budget: &mut i32, |
| 451 | ) { |
| 452 | let bigN = hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 453 | |
| 454 | let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(index) = INCSrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/INCS..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().positionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]position().(|&e| e rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().bigN) else { |
| 455 | return; |
| 456 | }; |
| 457 | |
| 458 | for &h in INCSrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/INCS.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#index]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() { |
| 459 | for i in lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().h..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#hi { |
| 460 | let v = ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 461 | let mut j = i; |
| 462 | while mainGtUrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainGtU().( |
| 463 | (ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().h) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(d), |
| 464 | v.wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(d), |
| 465 | block, |
| 466 | quadrant, |
| 467 | nblock as u32, |
| 468 | budget, |
| 469 | ) { |
| 470 | ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().h) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 471 | j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().h; |
| 472 | if j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().h { |
| 473 | break; |
| 474 | } |
| 475 | } |
| 476 | ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = v; |
| 477 | if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().budget rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { |
| 478 | return; |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | #[inline] |
| 485 | fn median_of_3rust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/median_of_3().(mut a: u8, mut b: u8, mut c: u8) -> u8 { |
| 486 | if a rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().b { |
| 487 | (a, b) = (b, a); |
| 488 | } |
| 489 | if a rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().c { |
| 490 | (_, c) = (c, a); |
| 491 | } |
| 492 | if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().c { |
| 493 | (b, _) = (c, b); |
| 494 | } |
| 495 | |
| 496 | debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!(a <= b && b <= c); |
| 497 | |
| 498 | b |
| 499 | } |
| 500 | |
| 501 | const MAIN_QSORT_SMALL_THRESHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/MAIN_QSORT_SMALL_THRESH.: i32 = 20; |
| 502 | const MAIN_QSORT_DEPTH_THRESHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/MAIN_QSORT_DEPTH_THRESH.: u32 = BZ_N_RADIXrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_RADIX. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().BZ_N_QSORTrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_QSORT.; |
| 503 | const MAIN_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/MAIN_QSORT_STACK_SIZE.: i32 = 100; |
| 504 | |
| 505 | fn mainQSort3rust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainQSort3().( |
| 506 | ptr: &mut [u32], |
| 507 | block: &[u8], |
| 508 | quadrant: &[u16], |
| 509 | nblock: usize, |
| 510 | loSt: i32, |
| 511 | hiSt: i32, |
| 512 | dSt: u32, |
| 513 | budget: &mut i32, |
| 514 | ) { |
| 515 | let mut unLo: i32; |
| 516 | let mut unHi: i32; |
| 517 | let mut ltLo: i32; |
| 518 | let mut gtHi: i32; |
| 519 | |
| 520 | // We run into underflow issues below if lo and hi use u32. |
| 521 | let mut stack = [(0i32, 0i32, 0u32); 100]; |
| 522 | |
| 523 | stack[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = (loSt, hiSt, dSt); |
| 524 | |
| 525 | let mut sp = 1; |
| 526 | while sp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 { |
| 527 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(sp <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). MAIN_QSORT_STACK_SIZErust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/MAIN_QSORT_STACK_SIZE. as usize -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). 2, 1001); |
| 528 | |
| 529 | sp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().1; |
| 530 | |
| 531 | let (lo, hi, d) = stack[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().sp]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 532 | |
| 533 | if hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().MAIN_QSORT_SMALL_THRESHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/MAIN_QSORT_SMALL_THRESH. || d rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().MAIN_QSORT_DEPTH_THRESHrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/MAIN_QSORT_DEPTH_THRESH. { |
| 534 | mainSimpleSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainSimpleSort().(ptr, block, quadrant, nblock, lo, hi, d, budget); |
| 535 | if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().budget rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { |
| 536 | return; |
| 537 | } |
| 538 | } else { |
| 539 | let med = median_of_3rust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/median_of_3().( |
| 540 | block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().lo as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(d) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 541 | block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().hi as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(d) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 542 | block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().((ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().((lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().hi) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr().1) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(d) as isize) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 543 | ); |
| 544 | ltLo = lo; |
| 545 | unLo = ltLo; |
| 546 | gtHi = hi; |
| 547 | unHi = gtHi; |
| 548 | loop { |
| 549 | while unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().unHi { |
| 550 | match u8::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][Ord]cmp().(&block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().unLo as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(d) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., &med) { |
| 551 | Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#::Greaterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#Greater# => break, |
| 552 | Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#::Equalrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#Equal# => { |
| 553 | ptr.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(unLo as usize, ltLo as usize); |
| 554 | ltLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 555 | unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 556 | } |
| 557 | Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#::Lessrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#Less# => unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1, |
| 558 | } |
| 559 | } |
| 560 | while unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().unHi { |
| 561 | match u8::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][Ord]cmp().(&block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().unHi as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).wrapping_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_add().(d) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., &med) { |
| 562 | Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#::Lessrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#Less# => break, |
| 563 | Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#::Equalrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#Equal# => { |
| 564 | ptr.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(unHi as usize, gtHi as usize); |
| 565 | gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 566 | unHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 567 | } |
| 568 | Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#::Greaterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering#Greater# => unHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1, |
| 569 | } |
| 570 | } |
| 571 | if unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().unHi { |
| 572 | break; |
| 573 | } |
| 574 | ptr.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(unLo as usize, unHi as usize); |
| 575 | unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 576 | unHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 577 | } |
| 578 | if gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().ltLo { |
| 579 | stack[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().sp]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = (lo, hi, d rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1); |
| 580 | sp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; |
| 581 | } else { |
| 582 | let n = Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#min().(ltLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo, unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().ltLo); |
| 583 | for (yyp1, yyp2) in (lo..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().n).ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().n..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#unLo) { |
| 584 | ptr.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(yyp1 as usize, yyp2 as usize); |
| 585 | } |
| 586 | |
| 587 | let m = Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#min().(hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().gtHi, gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().unHi); |
| 588 | for (yyp1, yyp2) in (unLo..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().m).ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().m rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1) { |
| 589 | ptr.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(yyp1 as usize, yyp2 as usize); |
| 590 | } |
| 591 | |
| 592 | let n = lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().unLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().ltLo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 593 | let m = hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().(gtHi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().unHi) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 594 | |
| 595 | let mut next = [(lo, n, d), (m, hi, d), (n rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1, m rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1, d rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().1)]; |
| 596 | |
| 597 | if next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..0 { |
| 598 | next.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(0, 1); |
| 599 | } |
| 600 | |
| 601 | if next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..0 { |
| 602 | next.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(1, 2); |
| 603 | } |
| 604 | |
| 605 | if next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().next[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..0 { |
| 606 | next.swaprust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]swap().(0, 1); |
| 607 | } |
| 608 | |
| 609 | stack[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().sp..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`IndexMut<I>`]index_mut()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#next.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`IndexMut<I>`]index_mut()..copy_from_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]copy_from_slice().(&next); |
| 610 | sp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().next.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().(); |
| 611 | } |
| 612 | } |
| 613 | } |
| 614 | } |
| 615 | fn mainSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainSort().( |
| 616 | ptr: &mut [u32], |
| 617 | block: &mut [u8], |
| 618 | quadrant: &mut [u16], |
| 619 | ftab: &mut [u32; FTAB_LENrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/FTAB_LEN.], |
| 620 | nblock: usize, |
| 621 | verb: i32, |
| 622 | budget: &mut i32, |
| 623 | ) { |
| 624 | let mut j: i32; |
| 625 | let mut k: usize; |
| 626 | let mut ss: i32; |
| 627 | let mut sb: i32; |
| 628 | let mut bigDone: [bool; 256] = [false; 256]; |
| 629 | let mut copyStart: [i32; 256] = [0; 256]; |
| 630 | let mut copyEnd: [i32; 256] = [0; 256]; |
| 631 | let mut c1: u8; |
| 632 | let mut s: u16; |
| 633 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 634 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!(" main sort initialise ..."); |
| 635 | } |
| 636 | |
| 637 | /*-- set up the 2-byte frequency table --*/ |
| 638 | ftab.fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().(0); |
| 639 | |
| 640 | j = (block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as i32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().8; |
| 641 | for &block in block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#nblock]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() { |
| 642 | j = (j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<Self>`]shr().8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`BitOr<Self>`]bitor().(i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<u8>`]from().(block) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().8); |
| 643 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().1; |
| 644 | } |
| 645 | |
| 646 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#BZ_N_OVERSHOOTrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_OVERSHOOT. { |
| 647 | block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().nblock rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 648 | } |
| 649 | |
| 650 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 651 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!(" bucket sorting ..."); |
| 652 | } |
| 653 | |
| 654 | /*-- Complete the initial radix sort --*/ |
| 655 | for i in 1..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#65536 { |
| 656 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`AddAssign<Self>`]add_assign().ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 657 | } |
| 658 | |
| 659 | s = u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shl<i32>`]shl().8; |
| 660 | |
| 661 | for (i, &block) in block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#nblock]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().().revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() { |
| 662 | s = (s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shr<i32>`]shr().8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor().(u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<u8>`]from().(block) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`Shl<i32>`]shl().8); |
| 663 | j = ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u16>`]from().(s)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 664 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u16>`]from().(s)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = j as u32; |
| 665 | ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = i as u32; |
| 666 | } |
| 667 | |
| 668 | bigDone.fillrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]fill().(false); |
| 669 | let mut runningOrder: [i32; 256] = corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::arrayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/::from_fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/from_fn().(|i| i as i32); |
| 670 | |
| 671 | let mut vv: i32; |
| 672 | let mut h: i32 = 1; |
| 673 | loop { |
| 674 | h = 3 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 675 | if h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().256 { |
| 676 | break; |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | macro_rules! BIGFREQrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/BIGFREQ! { |
| 681 | ($b:expr) => { |
| 682 | ftab[(($b) + 1) << 8] - ftab[($b) << 8] |
| 683 | }; |
| 684 | } |
| 685 | |
| 686 | loop { |
| 687 | h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`DivAssign<Self>`]div_assign()./=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`DivAssign<Self>`]div_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`DivAssign<Self>`]div_assign().3; |
| 688 | for i in h..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#256 { |
| 689 | vv = runningOrder[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 690 | j = i; |
| 691 | while BIGFREQrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/BIGFREQ!!(runningOrder[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(j -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). h) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().BIGFREQrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/BIGFREQ!!(vv as usize) { |
| 692 | runningOrder[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = runningOrder[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().h) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 693 | j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().h; |
| 694 | if j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().h { |
| 695 | break; |
| 696 | } |
| 697 | } |
| 698 | runningOrder[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = vv; |
| 699 | } |
| 700 | if h rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().1 { |
| 701 | break; |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | /*-- |
| 706 | The main sorting loop. |
| 707 | --*/ |
| 708 | |
| 709 | let mut numQSorted = 0; |
| 710 | |
| 711 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#255 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1 { |
| 712 | /*-- |
| 713 | Process big buckets, starting with the least full. |
| 714 | Basically this is a 3-step process in which we call |
| 715 | mainQSort3 to sort the small buckets [ss, j], but |
| 716 | also make a big effort to avoid the calls if we can. |
| 717 | --*/ |
| 718 | ss = runningOrder[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 719 | |
| 720 | const SETMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SETMASK.: u32 = 1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().21; |
| 721 | const CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.: u32 = !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][Not]not().SETMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SETMASK.; |
| 722 | |
| 723 | /*-- |
| 724 | Step 1: |
| 725 | Complete the big bucket [ss] by quicksorting |
| 726 | any unsorted small buckets [ss, j], for j != ss. |
| 727 | Hopefully previous pointer-scanning phases have already |
| 728 | completed many of the small buckets [ss, j], so |
| 729 | we don't have to sort them at all. |
| 730 | --*/ |
| 731 | for j in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#255 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1 { |
| 732 | if j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]ne().ss { |
| 733 | sb = (ss rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shl<Self>`]shl().8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().j; |
| 734 | if ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().sb as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().SETMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SETMASK. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 735 | // It is tempting to use u32 instead, but -1/u32::MAX is actually used. |
| 736 | let lo = (ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().sb as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.) as i32; |
| 737 | let hi = ((ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().sb as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.).wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]wrapping_sub().(1)) as i32; |
| 738 | |
| 739 | if hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().lo { |
| 740 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 741 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!( |
| 742 | " qsort [{:#x}, {:#x}] done {} this {}", |
| 743 | ss, |
| 744 | j, |
| 745 | numQSorted, |
| 746 | hi -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). lo +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 1, |
| 747 | ); |
| 748 | } |
| 749 | mainQSort3rust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainQSort3().(ptr, block, quadrant, nblock, lo, hi, 2, budget); |
| 750 | numQSorted rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().hi rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().lo rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 751 | if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().budget rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { |
| 752 | return; |
| 753 | } |
| 754 | } |
| 755 | } |
| 756 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().sb as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().SETMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SETMASK.; |
| 757 | } |
| 758 | } |
| 759 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().bigDone[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 1006); |
| 760 | |
| 761 | /*-- |
| 762 | Step 2: |
| 763 | Now scan this big bucket [ss] so as to synthesise the |
| 764 | sorted order for small buckets [t, ss] for all t, |
| 765 | including, magically, the bucket [ss,ss] too. |
| 766 | This will avoid doing Real Work in subsequent Step 1's. |
| 767 | --*/ |
| 768 | { |
| 769 | for j in 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#255 { |
| 770 | copyStart[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = (ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.) as i32; |
| 771 | copyEnd[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().j]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = (ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().ss as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.) as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 772 | } |
| 773 | |
| 774 | j = (ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ss as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.) as i32; |
| 775 | while j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().copyStart[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). { |
| 776 | let v = match ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). { |
| 777 | 0 => nblock, |
| 778 | n => n as usize, |
| 779 | }; |
| 780 | k = v.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[usize]wrapping_sub().(1); |
| 781 | c1 = block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().k]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 782 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().bigDone[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().c1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). { |
| 783 | let fresh11 = copyStart[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().c1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 784 | copyStart[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().c1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 785 | ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().fresh11 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = k as u32; |
| 786 | } |
| 787 | j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().1; |
| 788 | } |
| 789 | |
| 790 | j = (ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ss as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.) as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1; |
| 791 | while j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().copyEnd[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). { |
| 792 | let v = match ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). { |
| 793 | 0 => nblock, |
| 794 | n => n as usize, |
| 795 | }; |
| 796 | k = v.wrapping_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[usize]wrapping_sub().(1); |
| 797 | c1 = block[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().k]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().; |
| 798 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().bigDone[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().c1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). { |
| 799 | let fresh12 = copyEnd[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().c1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().; |
| 800 | copyEnd[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().c1 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 801 | ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().fresh12 as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = k as u32; |
| 802 | } |
| 803 | j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`SubAssign<Self>`]sub_assign().1; |
| 804 | } |
| 805 | } |
| 806 | |
| 807 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!( |
| 808 | (copyStart[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1 == copyEnd[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().) |
| 809 | || |
| 810 | /* Extremely rare case missing in bzip2-1.0.0 and 1.0.1. |
| 811 | Necessity for this case is demonstrated by compressing |
| 812 | a sequence of approximately 48.5 million of character |
| 813 | 251; 1.0.0/1.0.1 will then die here. */ |
| 814 | (copyStart[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). == 0 && copyEnd[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). == nblock as i32 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). 1), |
| 815 | 1007 |
| 816 | ); |
| 817 | |
| 818 | for j in 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#255 { |
| 819 | ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().(j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().8) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOrAssign<Self>`]bitor_assign().SETMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/SETMASK. |
| 820 | } |
| 821 | |
| 822 | /*-- |
| 823 | Step 3: |
| 824 | The [ss] big bucket is now done. Record this fact, |
| 825 | and update the quadrant descriptors. Remember to |
| 826 | update quadrants in the overshoot area too, if |
| 827 | necessary. The "if (i < 255)" test merely skips |
| 828 | this updating for the last bucket processed, since |
| 829 | updating for the last bucket is pointless. |
| 830 | |
| 831 | The quadrant array provides a way to incrementally |
| 832 | cache sort orderings, as they appear, so as to |
| 833 | make subsequent comparisons in fullGtU() complete |
| 834 | faster. For repetitive blocks this makes a big |
| 835 | difference (but not big enough to be able to avoid |
| 836 | the fallback sorting mechanism, exponential radix sort). |
| 837 | |
| 838 | The precise meaning is: at all times: |
| 839 | |
| 840 | for 0 <= i < nblock and 0 <= j <= nblock |
| 841 | |
| 842 | if block[i] != block[j], |
| 843 | |
| 844 | then the relative values of quadrant[i] and |
| 845 | quadrant[j] are meaningless. |
| 846 | |
| 847 | else { |
| 848 | if quadrant[i] < quadrant[j] |
| 849 | then the string starting at i lexicographically |
| 850 | precedes the string starting at j |
| 851 | |
| 852 | else if quadrant[i] > quadrant[j] |
| 853 | then the string starting at j lexicographically |
| 854 | precedes the string starting at i |
| 855 | |
| 856 | else |
| 857 | the relative ordering of the strings starting |
| 858 | at i and j has not yet been determined. |
| 859 | } |
| 860 | --*/ |
| 861 | bigDone[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut().ss as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`IndexMut<I>`]index_mut(). = true; |
| 862 | |
| 863 | if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().255 { |
| 864 | let bbStart = ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ss as usize) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.; |
| 865 | let bbSize = (ftab[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().(ss as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[usize][`Shl<i32>`]shl().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().CLEARMASKrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/CLEARMASK.) as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().bbStart as i32; |
| 866 | |
| 867 | // FIXME: remove when our MSRV can use the stable method. |
| 868 | fn highest_onerust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/highest_one().(x: i32) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u32> { |
| 869 | match x { |
| 870 | 0 => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 871 | _ => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(i32::BITSrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]BITS. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().x.leading_zerosrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]leading_zeros().()), |
| 872 | } |
| 873 | } |
| 874 | |
| 875 | let shifts = if bbSize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]le().65_534 { |
| 876 | 0 |
| 877 | } else { |
| 878 | highest_onerust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/highest_one().(bbSize).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().15 |
| 879 | }; |
| 880 | |
| 881 | let ptr = &ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().bbStart as usize..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#bbSize as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().; |
| 882 | for j in (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#bbSize).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() { |
| 883 | let a2update = ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().j as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). as usize; |
| 884 | let qVal: u16 = (j rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<u32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<u32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[i32][`Shr<u32>`]shr().shifts) as u16; |
| 885 | quadrant[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().a2update]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = qVal; |
| 886 | if a2update rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().BZ_N_OVERSHOOTrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/BZ_N_OVERSHOOT. { |
| 887 | quadrant[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().a2update rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().nblock]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = qVal; |
| 888 | } |
| 889 | } |
| 890 | |
| 891 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(((bbSize -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). 1) >> shifts) <= 65535, 1002); |
| 892 | } |
| 893 | } |
| 894 | if verb rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().4 { |
| 895 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!( |
| 896 | " {} pointers, {} sorted, {} scanned", |
| 897 | nblock, |
| 898 | numQSorted, |
| 899 | nblock -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). numQSorted as usize, |
| 900 | ); |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | /// Pre: |
| 905 | /// nblock > 0 |
| 906 | /// arr2 exists for [0 .. nblock-1 +N_OVERSHOOT] |
| 907 | /// ((UChar*)arr2) [0 .. nblock-1] holds block |
| 908 | /// arr1 exists for [0 .. nblock-1] |
| 909 | /// |
| 910 | /// Post: |
| 911 | /// ((UChar*)arr2) [0 .. nblock-1] holds block |
| 912 | /// All other areas of block destroyed |
| 913 | /// ftab [ 0 .. 65536 ] destroyed |
| 914 | /// arr1 [0 .. nblock-1] holds sorted order |
| 915 | pub(craterust-analyzer cargo libbz2-rs-sys 0.2.5 crate/) fn block_sortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/block_sort().(s: &mut EStaterust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#) { |
| 916 | let nblock = usize::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/ptr_try_from_impls/impl#[usize][`TryFrom<i32>`]try_from().(s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock.).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 917 | |
| 918 | let ptr = s.arr1rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr1..ptrrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr1]ptr().(); |
| 919 | let ftab = s.ftabrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#ftab..ftabrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Ftab]ftab().(); |
| 920 | |
| 921 | BZ2_blockSortHelprust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/BZ2_blockSortHelp().(ptr, &mut s.arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#arr2., ftab, nblock, s.workFactorrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#workFactor., s.verbosityrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#verbosity.); |
| 922 | |
| 923 | s.origPtrrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#origPtr. = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1; |
| 924 | for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#s.nblockrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#nblock. { |
| 925 | if ptr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().i as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 926 | s.origPtrrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#origPtr. = i; |
| 927 | break; |
| 928 | } |
| 929 | } |
| 930 | |
| 931 | assert_hrust-analyzer cargo libbz2-rs-sys 0.2.5 assert_h!!(s.origPtrrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/EState#origPtr. != -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1, 1003); |
| 932 | } |
| 933 | |
| 934 | fn BZ2_blockSortHelprust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/BZ2_blockSortHelp().( |
| 935 | ptr: &mut [u32], |
| 936 | arr2: &mut Arr2rust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/Arr2#, |
| 937 | ftab: &mut [u32; FTAB_LENrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/FTAB_LEN.], |
| 938 | nblock: usize, |
| 939 | workFactor: i32, |
| 940 | verbosity: i32, |
| 941 | ) { |
| 942 | if nblock rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().10000 { |
| 943 | fallbackSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fallbackSort().(ptr, arr2, ftab, nblock, verbosity); |
| 944 | } else { |
| 945 | let (block, quadrant) = arr2.block_and_quadrantrust-analyzer cargo libbz2-rs-sys 0.2.5 bzlib/impl#[Arr2]block_and_quadrant().(nblock); |
| 946 | |
| 947 | /* (wfact-1) / 3 puts the default-factor-30 |
| 948 | transition point at very roughly the same place as |
| 949 | with v0.1 and v0.9.0. |
| 950 | Not that it particularly matters any more, since the |
| 951 | resulting compressed stream is now the same regardless |
| 952 | of whether or not we use the main sort or fallback sort. |
| 953 | */ |
| 954 | let wfact = workFactor.clamprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][Ord]clamp().(1, 100); |
| 955 | let budgetInit = nblock as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().((wfact rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Div<Self>`]div().3); |
| 956 | let mut budget = budgetInit; |
| 957 | |
| 958 | mainSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/mainSort().(ptr, block, quadrant, ftab, nblock, verbosity, &mut budget); |
| 959 | |
| 960 | if verbosity rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().3 { |
| 961 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!( |
| 962 | " {} work, {} block, ratio {:5.2}", |
| 963 | budgetInit -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). budget, |
| 964 | nblock, |
| 965 | (budgetInit -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). budget) as f64 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). (if nblock == 0 { 1 } else { nblock }) as f64 |
| 966 | ); |
| 967 | } |
| 968 | |
| 969 | if budget rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { |
| 970 | if verbosity rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().2 { |
| 971 | debug_loglnrust-analyzer cargo libbz2-rs-sys 0.2.5 debug_logln!!(" too repetitive; using fallback sorting algorithm"); |
| 972 | } |
| 973 | |
| 974 | fallbackSortrust-analyzer cargo libbz2-rs-sys 0.2.5 blocksort/fallbackSort().(ptr, arr2, ftab, nblock, verbosity); |
| 975 | } |
| 976 | } |
| 977 | } |