diff --git a/quest/m3/README.md b/quest/m3/README.md index 9252e9159..444ffa922 100644 --- a/quest/m3/README.md +++ b/quest/m3/README.md @@ -33,4 +33,5 @@ generic std gap is planned here even when moq never calls it. - [LinkedList](/quest/m3/ts-linked-list.md) - `LinkedList` and its methods translate - [Zip's next_back in constant time](/quest/m3/ts-zip-back.md) - a reversed zip of random-access iterators skips the longer side's excess at once - [Cycling std's iterators](/quest/m3/ts-iter-cycle.md) - `Iterator::cycle` translates, cloning its iterator each time it ends +- [Debug of Bound](/quest/m3/ts-bound-debug.md) - `{:?}` of a `Bound`, as a range's `start_bound` gives, translates - [Orderings by a crate's impl on references](/quest/m3/ts-ord-ref-impls.md) - a tuple, `Option`, or slice of `&T` orders by the crate's `PartialOrd` for `&T` diff --git a/quest/m3/ts-bound-debug.md b/quest/m3/ts-bound-debug.md new file mode 100644 index 000000000..37480acff --- /dev/null +++ b/quest/m3/ts-bound-debug.md @@ -0,0 +1,16 @@ +# [XS] Debug of Bound + +## Goal + +[rust2-ts](/ts/README.md) translates `{:?}` of a `Bound` and a `Bound<&T>`, such as a +range's `start_bound()`, writing `Included(3)`, `Excluded(3)`, or `Unbounded` with the +formatter's options as std's derived `Debug` does, proven by a differential test against +native Rust. + +## Plan + +Found by [#325](https://github.com/moq-dev/rust2/pull/325), whose fixture encodes +bounds as bytes instead. Planned without a moq consumer, under the maintainer's +2026-10-27 decision that rust2 aims to support all of std. + +Public API: the translator's output. diff --git a/ts/MIGRATE.md b/ts/MIGRATE.md index e0332ed4c..3ce6e7c10 100644 --- a/ts/MIGRATE.md +++ b/ts/MIGRATE.md @@ -6,7 +6,9 @@ `{ start }`: a caller passes one as `new rt.RangeFrom(start, rt.u64Step)`, with its integer type's `Step`, or `rt.charStep`, and none for other types. A binding taking one still reads its `start`. An `rt.Range` or `rt.RangeInclusive` of `char`s takes - `rt.charStep` too, to step past the surrogates. + `rt.charStep` too, to step past the surrogates. One of unsigned `NonZero`s takes + `rt.nonZeroStep` of its integer's `Step` and maximum, as in + `new rt.RangeInclusive(lo, hi, rt.nonZeroStep(rt.u8Step, 255))`. - A closure, a `fn` pointer, a `dyn Fn`, or a function item as a value returns `undefined` for `()`, not `void`, as in `(a0: rt.u8) => undefined`: a caller passes such a parameter a function typed `=> undefined`. diff --git a/ts/fixtures/lang/caller.ts b/ts/fixtures/lang/caller.ts index 502afd670..eac5b3a09 100644 --- a/ts/fixtures/lang/caller.ts +++ b/ts/fixtures/lang/caller.ts @@ -575,6 +575,10 @@ const rangeFroms = Array.from({ length: 16 * 4 * 4 * 10 }, (_, i) => { return Uint8Array.of(rangeFromsOp, kind, ...data); }); +/** `iters::range_methods` of each type's table, at each pair of its first eight values. */ +const rangeMethodsOp = op("iters::range_methods"); +const rangeMethods = Array.from({ length: 19 * 64 }, (_, i) => Uint8Array.of(rangeMethodsOp, i % 19, Math.floor(i / 19) % 8, Math.floor(i / 152))); + /** * `iters::compares` of each comparison, shape, and pair, over no items, one, a run up to * 255, which `start..` panics past and a sum overflows at, NaNs, and repeats. @@ -584,4 +588,4 @@ const compares = [[], [5], [1, 2, 3], [250, 251, 252, 253, 254, 255], [0xff, 3, Array.from({ length: 256 }, (_, kind) => Uint8Array.of(comparesOp, kind, ...data)), ); -export const cases: Uint8Array[] = [...loops, ...durations, ...ints(), ...utf8, ...floats, ...formats, ...parsed, ...singlesCases, ...singlesFormats, ...singlesParsed, ...dyns, ...cells, ...shared, ...locks, ...onces, ...bounds, ...unsafeCells, ...edits, ...subslices, ...consumers, ...closures, ...elements, ...ranges, ...reducers, ...sliceEdits, ...drains, ...iters, ...hinted, ...peekedOthers, ...hints, ...reserves, ...setOps, ...zeros, ...floatsMulAdds, ...singlesMulAdds, ...unlikeEqs, ...ownNes, ...rangeFroms, ...compares, ...unlikeCompares]; +export const cases: Uint8Array[] = [...loops, ...durations, ...ints(), ...utf8, ...floats, ...formats, ...parsed, ...singlesCases, ...singlesFormats, ...singlesParsed, ...dyns, ...cells, ...shared, ...locks, ...onces, ...bounds, ...unsafeCells, ...edits, ...subslices, ...consumers, ...closures, ...elements, ...ranges, ...reducers, ...sliceEdits, ...drains, ...iters, ...hinted, ...peekedOthers, ...hints, ...reserves, ...setOps, ...zeros, ...floatsMulAdds, ...singlesMulAdds, ...unlikeEqs, ...ownNes, ...rangeFroms, ...compares, ...unlikeCompares, ...rangeMethods]; diff --git a/ts/fixtures/lang/expected/harness.ts b/ts/fixtures/lang/expected/harness.ts index 074fd828a..c167d9f4f 100644 --- a/ts/fixtures/lang/expected/harness.ts +++ b/ts/fixtures/lang/expected/harness.ts @@ -27,7 +27,7 @@ import { values, random, bytes as hashes_bytes } from "./hashes.ts"; import { hints, reserves } from "./hints.ts"; import { holds } from "./holds.ts"; import { u8Op, u16Op, u32Op, u64Op, u128Op, usizeOp, i8Op, i16Op, i32Op, i64Op, i128Op, isizeOp, i8Neg, i16Neg, i32Neg, i64Neg, i128Neg, isizeNeg, cast as ints_cast, convert, parses as ints_parses, widenings } from "./ints.ts"; -import { adaptors, consumers, reducers, peekedOthers, skips, ranked, ranges, options, own, values as iters_values, returned, zips, zipsBack, rangeFroms, compares } from "./iters.ts"; +import { adaptors, consumers, reducers, peekedOthers, skips, ranked, ranges, options, own, values as iters_values, returned, zips, zipsBack, rangeFroms, rangeMethods, compares } from "./iters.ts"; import { keys, overrides, bytes as keys_bytes, lentKeys, lentValues, arrays } from "./keys.ts"; import { locals } from "./locals.ts"; import { locks, relock, rwlocks } from "./locks.ts"; @@ -197,7 +197,7 @@ export function cases(): [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) collections(data71, out72); }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::unlike_eqs", unlikeEqs as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["zeros::impls", impls as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["zeros::keys", zeros_keys as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["keys::arrays", arrays as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::zips", zips as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::zips_back", zipsBack as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::own_nes", ownNes as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["fmt::iters", (_2172: rt.u8, data72: rt.ByteSlice, out73: rt.ByteVec): undefined => { fmt_iters(data72, out73); - }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["zeros::unread", unread as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::range_froms", rangeFroms as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["clones::iters", iters as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::cell_eqs", cellEqs as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::compares", compares as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::unlike_compares", unlikeCompares as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined]]; + }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["zeros::unread", unread as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::range_froms", rangeFroms as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::range_methods", rangeMethods as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["clones::iters", iters as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::cell_eqs", cellEqs as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::compares", compares as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::unlike_compares", unlikeCompares as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined]]; } /** Run one case. */ diff --git a/ts/fixtures/lang/expected/iters.ts b/ts/fixtures/lang/expected/iters.ts index 6e999acd5..65cf5c63c 100644 --- a/ts/fixtures/lang/expected/iters.ts +++ b/ts/fixtures/lang/expected/iters.ts @@ -4252,6 +4252,3866 @@ export function overflowed(a: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void } } +/** + * The methods of each of std's range types over bounds `a` and `b` of the table `kind` + * picks, at `data`'s first two bytes, against each of its values: integers of each + * width at their ends and past 2^53 and 2^64, `char`s at either side of the surrogates, + * floats with NaN and the zeros, and unsigned `NonZero`s. + */ +export function rangeMethods(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void { + const at: rt.usize[] = rt.arrayMap([0, 1], (i: rt.usize): rt.usize => { + return unwrapOr$0r2bmpr(rt.byteSliceGet(data, i), 0) as rt.usize; + }); + const past53: rt.u64 = rt.u64Add({ hi: 0x200000, lo: 0 } as rt.u64, 1); + const past64: rt.u128 = rt.u128Add(rt.u128Shl(1, 64), 1); + const _17: rt.u8 = rt.u8Rem(kind, 19); + if (_17 === 0) { + stepped$u8(rt.byteSliceFrom(Uint8Array.of(0, 1, 2, 254, 255)), at, out); + } else if (_17 === 1) { + 65535 - 1; + stepped$u16([0, 1, 32767, 65534, 65535], at, out); + } else if (_17 === 2) { + 4294967295 - 1; + stepped$u32([0, 1, 2147483648, 4294967294, 4294967295], at, out); + } else if (_17 === 3) { + stepped$u64([0, 1, rt.u64Sub(past53, 2), rt.u64Sub(past53, 1), past53, { hi: 0xffffffff, lo: 0xfffffffe } as rt.u64, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64], at, out); + } else if (_17 === 4) { + stepped$u128([0, 1, rt.u128Sub(past64, 2), rt.u128Sub(past64, 1), past64, rt.u128Sub({ hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128, 1), { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128], at, out); + } else if (_17 === 5) { + 4294967295 - 1; + stepped$usize([0, 1, 2147483648, 4294967294, 4294967295], at, out); + } else if (_17 === 6) { + -128 + 1; + stepped$i8([-128, -127, -1, 0, 127], at, out); + } else if (_17 === 7) { + 32767 - 1; + stepped$i16([-32768, -1, 0, 1, 32766, 32767], at, out); + } else if (_17 === 8) { + -2147483648 + 1; + stepped$i32([-2147483648, -2147483647, -1, 0, 2147483647], at, out); + } else if (_17 === 9) { + const past532: rt.i64 = rt.i64Cast(past53); + stepped$i64([{ hi: -0x80000000, lo: 0 } as rt.i64, rt.i64Neg(past532), -1, 0, past532, { hi: 0x7fffffff, lo: 0xfffffffe } as rt.i64, { hi: 0x7fffffff, lo: 0xffffffff } as rt.i64], at, out); + } else if (_17 === 10) { + const past642: rt.i128 = rt.i128Cast(past64); + stepped$i128([{ hi: -0x80000000, w2: 0, w1: 0, lo: 0 } as rt.i128, rt.i128Add({ hi: -0x80000000, w2: 0, w1: 0, lo: 0 } as rt.i128, 1), rt.i128Neg(past642), -1, 0, past642, { hi: 0x7fffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.i128], at, out); + } else if (_17 === 11) { + 2147483647 - 1; + stepped$isize([-2147483648, -1, 0, 1, 2147483646, 2147483647], at, out); + } else if (_17 === 12) { + stepped$char([0, 97, 55294, 55295, 57344, 57345, 1114111], at, out); + } else if (_17 === 13) { + bounded$f64([NaN, -Infinity, -1.5, -0.0, 0.0, 2.5, Infinity], at, out); + } else if (_17 === 14) { + bounded$f32([NaN, -Infinity, -1.5, -0.0, 0.0, 2.5, Infinity], at, out); + } else if (_17 === 15) { + stepped$NonZero_u8(rt.arrayMap(Uint8Array.of(1, 2, 254, 255), (n4: rt.u8): rt.u8 => { + return rt.optionUnwrap(rt.nonZero(n4)); + }), at, out); + } else if (_17 === 16) { + stepped$NonZero_u64(rt.arrayMap([1, past53, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64], (n3: rt.u64): rt.u64 => { + return rt.optionUnwrap(rt.nonZero(n3)); + }), at, out); + } else if (_17 === 17) { + stepped$NonZero_u128(rt.arrayMap([1, past64, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128], (n2: rt.u128): rt.u128 => { + return rt.optionUnwrap(rt.nonZero(n2)); + }), at, out); + } else { + stepped$NonZero_usize(rt.arrayMap([1, 2, 4294967295], (n: rt.usize): rt.usize => { + return rt.optionUnwrap(rt.nonZero(n)); + }), at, out); + } +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$NonZero_u128(table: rt.u128[], at: rt.usize[], out: rt.ByteVec): [rt.u128, rt.u128] { + const _6: rt.u128[] = rt.arrayMap(at, (i: rt.usize): rt.u128 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.u128 = _6[0]; + const b: rt.u128 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128))), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$NonZero_u128_Range_NonZero_u128(new rt.Range(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), _19); + const _41: boolean = boundsContain$NonZero_u128_RangeInclusive_NonZero_u128(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), _19); + const _43: boolean = boundsContain$NonZero_u128_RangeFrom_NonZero_u128(new rt.RangeFrom(a, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), _19); + const _45: boolean = boundsContain$NonZero_u128_RangeTo_NonZero_u128({ end: b }, _19); + const _47: boolean = boundsContain$NonZero_u128_RangeToInclusive_NonZero_u128({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$NonZero_u128_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _64: rt.Range = new rt.Range(_19, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _60: boolean = rt.rangeEq(rt.u128Eq)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _66: boolean = rt.rangeEq(rt.u128Eq)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _72: boolean = !rt.rangeEq(rt.u128Eq)(_74, _76); + const _80: { end: rt.u128 } = { end: b }; + const _82: { end: rt.u128 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.u128Eq)(_80, _82); + const _86: { end: rt.u128; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u128; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.u128Eq)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128))); + const start: rt.u128 = _94[0]; + const end: rt.u128 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _102: rt.Range = new rt.Range(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _107: { end: rt.u128 } = { end: b }; + const _109: { end: rt.u128; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u128, rt.u128] = [start, end]; + const _113: [rt.u128, rt.u128] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u128Debug(_111[0], f), (f: rt.Formatter) => rt.u128Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u128Debug(_113[0], f), (f: rt.Formatter) => rt.u128Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u128 }, { end: rt.u128; inclusive: true }] = [new rt.RangeFrom(a, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u128 } = _137[1]; + const through: { end: rt.u128; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$NonZero_u128(table, bound); + })), undefined, true); + return [a, b] as [rt.u128, rt.u128]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$NonZero_u64(table: rt.u64[], at: rt.usize[], out: rt.ByteVec): [rt.u64, rt.u64] { + const _6: rt.u64[] = rt.arrayMap(at, (i: rt.usize): rt.u64 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.u64 = _6[0]; + const b: rt.u64 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64))), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$NonZero_u64_Range_NonZero_u64(new rt.Range(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), _19); + const _41: boolean = boundsContain$NonZero_u64_RangeInclusive_NonZero_u64(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), _19); + const _43: boolean = boundsContain$NonZero_u64_RangeFrom_NonZero_u64(new rt.RangeFrom(a, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), _19); + const _45: boolean = boundsContain$NonZero_u64_RangeTo_NonZero_u64({ end: b }, _19); + const _47: boolean = boundsContain$NonZero_u64_RangeToInclusive_NonZero_u64({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$NonZero_u64_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _64: rt.Range = new rt.Range(_19, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _60: boolean = rt.rangeEq(rt.u64Eq)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _66: boolean = rt.rangeEq(rt.u64Eq)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _72: boolean = !rt.rangeEq(rt.u64Eq)(_74, _76); + const _80: { end: rt.u64 } = { end: b }; + const _82: { end: rt.u64 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.u64Eq)(_80, _82); + const _86: { end: rt.u64; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u64; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.u64Eq)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64))); + const start: rt.u64 = _94[0]; + const end: rt.u64 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _102: rt.Range = new rt.Range(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _107: { end: rt.u64 } = { end: b }; + const _109: { end: rt.u64; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u64, rt.u64] = [start, end]; + const _113: [rt.u64, rt.u64] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u64Debug(_111[0], f), (f: rt.Formatter) => rt.u64Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u64Debug(_113[0], f), (f: rt.Formatter) => rt.u64Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u64 }, { end: rt.u64; inclusive: true }] = [new rt.RangeFrom(a, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u64 } = _137[1]; + const through: { end: rt.u64; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$NonZero_u64(table, bound); + })), undefined, true); + return [a, b] as [rt.u64, rt.u64]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$NonZero_u8(table: rt.u8[], at: rt.usize[], out: rt.ByteVec): [rt.u8, rt.u8] { + const _6: rt.u8[] = rt.arrayMap(at, (i: rt.usize): rt.u8 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.u8 = _6[0]; + const b: rt.u8 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.nonZeroStep(rt.u8Step, 255)), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$NonZero_u8_Range_NonZero_u8(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$NonZero_u8_RangeInclusive_NonZero_u8(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)), _19); + const _43: boolean = boundsContain$NonZero_u8_RangeFrom_NonZero_u8(new rt.RangeFrom(a, rt.nonZeroStep(rt.u8Step, 255)), _19); + const _45: boolean = boundsContain$NonZero_u8_RangeTo_NonZero_u8({ end: b }, _19); + const _47: boolean = boundsContain$NonZero_u8_RangeToInclusive_NonZero_u8({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$NonZero_u8_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.nonZeroStep(rt.u8Step, 255)); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u8Step, 255)); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.nonZeroStep(rt.u8Step, 255)); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.u8 } = { end: b }; + const _82: { end: rt.u8 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.u8; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u8; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255))); + const start: rt.u8 = _94[0]; + const end: rt.u8 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u8Step, 255)); + const _107: { end: rt.u8 } = { end: b }; + const _109: { end: rt.u8; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u8, rt.u8] = [start, end]; + const _113: [rt.u8, rt.u8] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Debug(_111[0], f), (f: rt.Formatter) => rt.u8Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Debug(_113[0], f), (f: rt.Formatter) => rt.u8Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u8 }, { end: rt.u8; inclusive: true }] = [new rt.RangeFrom(a, rt.nonZeroStep(rt.u8Step, 255)), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u8 } = _137[1]; + const through: { end: rt.u8; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$NonZero_u8(table, bound); + })), undefined, true); + return [a, b] as [rt.u8, rt.u8]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$NonZero_usize(table: rt.usize[], at: rt.usize[], out: rt.ByteVec): [rt.usize, rt.usize] { + const _6: rt.usize[] = rt.arrayMap(at, (i: rt.usize): rt.usize => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.usize = _6[0]; + const b: rt.usize = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.nonZeroStep(rt.usizeStep, 4294967295)), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$NonZero_usize_Range_NonZero_usize(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$NonZero_usize_RangeInclusive_NonZero_usize(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)), _19); + const _43: boolean = boundsContain$NonZero_usize_RangeFrom_NonZero_usize(new rt.RangeFrom(a, rt.nonZeroStep(rt.usizeStep, 4294967295)), _19); + const _45: boolean = boundsContain$NonZero_usize_RangeTo_NonZero_usize({ end: b }, _19); + const _47: boolean = boundsContain$NonZero_usize_RangeToInclusive_NonZero_usize({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$NonZero_usize_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.usize } = { end: b }; + const _82: { end: rt.usize } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.usize; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.usize; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295))); + const start: rt.usize = _94[0]; + const end: rt.usize = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _107: { end: rt.usize } = { end: b }; + const _109: { end: rt.usize; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.usize, rt.usize] = [start, end]; + const _113: [rt.usize, rt.usize] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.usizeDebug(_111[0], f), (f: rt.Formatter) => rt.usizeDebug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.usizeDebug(_113[0], f), (f: rt.Formatter) => rt.usizeDebug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.usize }, { end: rt.usize; inclusive: true }] = [new rt.RangeFrom(a, rt.nonZeroStep(rt.usizeStep, 4294967295)), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.usize } = _137[1]; + const through: { end: rt.usize; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$NonZero_usize(table, bound); + })), undefined, true); + return [a, b] as [rt.usize, rt.usize]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$char(table: rt.char[], at: rt.usize[], out: rt.ByteVec): [rt.char, rt.char] { + const _6: rt.char[] = rt.arrayMap(at, (i: rt.usize): rt.char => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.char = _6[0]; + const b: rt.char = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b, rt.charStep)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.charStep))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b, rt.charStep), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.charStep), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.charStep), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$char_Range_char(new rt.Range(a, b, rt.charStep), _19); + const _41: boolean = boundsContain$char_RangeInclusive_char(new rt.RangeInclusive(a, b, rt.charStep), _19); + const _43: boolean = boundsContain$char_RangeFrom_char(new rt.RangeFrom(a, rt.charStep), _19); + const _45: boolean = boundsContain$char_RangeTo_char({ end: b }, _19); + const _47: boolean = boundsContain$char_RangeToInclusive_char({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$char_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b, rt.charStep); + const _64: rt.Range = new rt.Range(_19, b, rt.charStep); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.charStep); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.charStep); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.charStep); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.charStep); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.char } = { end: b }; + const _82: { end: rt.char } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.char; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.char; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.char, rt.char] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.charStep)); + const start: rt.char = _94[0]; + const end: rt.char = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.charStep); + const _102: rt.Range = new rt.Range(a, b, rt.charStep); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.charStep); + const _107: { end: rt.char } = { end: b }; + const _109: { end: rt.char; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.char, rt.char] = [start, end]; + const _113: [rt.char, rt.char] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtCharDebug(_111[0], f), (f: rt.Formatter) => rt.fmtCharDebug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtCharDebug(_113[0], f), (f: rt.Formatter) => rt.fmtCharDebug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.char }, { end: rt.char; inclusive: true }] = [new rt.RangeFrom(a, rt.charStep), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.char } = _137[1]; + const through: { end: rt.char; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$char(table, bound); + })), undefined, true); + return [a, b] as [rt.char, rt.char]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$f32(table: rt.f32[], at: rt.usize[], out: rt.ByteVec): [rt.f32, rt.f32] { + const _6: rt.f32[] = rt.arrayMap(at, (i: rt.usize): rt.f32 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.f32 = _6[0]; + const b: rt.f32 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$f32_Range_f32(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$f32_RangeInclusive_f32(new rt.RangeInclusive(a, b), _19); + const _43: boolean = boundsContain$f32_RangeFrom_f32(new rt.RangeFrom(a), _19); + const _45: boolean = boundsContain$f32_RangeTo_f32({ end: b }, _19); + const _47: boolean = boundsContain$f32_RangeToInclusive_f32({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$f32_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a); + const _76: rt.RangeFrom = new rt.RangeFrom(_19); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.f32 } = { end: b }; + const _82: { end: rt.f32 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.f32; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.f32; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.f32, rt.f32] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b)); + const start: rt.f32 = _94[0]; + const end: rt.f32 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a); + const _107: { end: rt.f32 } = { end: b }; + const _109: { end: rt.f32; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.f32, rt.f32] = [start, end]; + const _113: [rt.f32, rt.f32] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.f32Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.f32Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.f32Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.f32Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.f32Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.f32Debug(_111[0], f), (f: rt.Formatter) => rt.f32Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.f32Debug(_113[0], f), (f: rt.Formatter) => rt.f32Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.f32 }, { end: rt.f32; inclusive: true }] = [new rt.RangeFrom(a), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.f32 } = _137[1]; + const through: { end: rt.f32; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$f32(table, bound); + })), undefined, true); + return [a, b] as [rt.f32, rt.f32]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$f64(table: rt.f64[], at: rt.usize[], out: rt.ByteVec): [rt.f64, rt.f64] { + const _6: rt.f64[] = rt.arrayMap(at, (i: rt.usize): rt.f64 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.f64 = _6[0]; + const b: rt.f64 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$f64_Range_f64(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$f64_RangeInclusive_f64(new rt.RangeInclusive(a, b), _19); + const _43: boolean = boundsContain$f64_RangeFrom_f64(new rt.RangeFrom(a), _19); + const _45: boolean = boundsContain$f64_RangeTo_f64({ end: b }, _19); + const _47: boolean = boundsContain$f64_RangeToInclusive_f64({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$f64_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a); + const _76: rt.RangeFrom = new rt.RangeFrom(_19); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.f64 } = { end: b }; + const _82: { end: rt.f64 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.f64; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.f64; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.f64, rt.f64] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b)); + const start: rt.f64 = _94[0]; + const end: rt.f64 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a); + const _107: { end: rt.f64 } = { end: b }; + const _109: { end: rt.f64; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.f64, rt.f64] = [start, end]; + const _113: [rt.f64, rt.f64] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.f64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.f64Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.f64Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.f64Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.f64Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.f64Debug(_111[0], f), (f: rt.Formatter) => rt.f64Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.f64Debug(_113[0], f), (f: rt.Formatter) => rt.f64Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.f64 }, { end: rt.f64; inclusive: true }] = [new rt.RangeFrom(a), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.f64 } = _137[1]; + const through: { end: rt.f64; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$f64(table, bound); + })), undefined, true); + return [a, b] as [rt.f64, rt.f64]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$i128(table: rt.i128[], at: rt.usize[], out: rt.ByteVec): [rt.i128, rt.i128] { + const _6: rt.i128[] = rt.arrayMap(at, (i: rt.usize): rt.i128 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.i128 = _6[0]; + const b: rt.i128 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b, rt.i128Step)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.i128Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b, rt.i128Step), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.i128Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.i128Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$i128_Range_i128(new rt.Range(a, b, rt.i128Step), _19); + const _41: boolean = boundsContain$i128_RangeInclusive_i128(new rt.RangeInclusive(a, b, rt.i128Step), _19); + const _43: boolean = boundsContain$i128_RangeFrom_i128(new rt.RangeFrom(a, rt.i128Step), _19); + const _45: boolean = boundsContain$i128_RangeTo_i128({ end: b }, _19); + const _47: boolean = boundsContain$i128_RangeToInclusive_i128({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$i128_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b, rt.i128Step); + const _64: rt.Range = new rt.Range(_19, b, rt.i128Step); + const _60: boolean = rt.rangeEq(rt.i128Eq)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i128Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.i128Step); + const _66: boolean = rt.rangeEq(rt.i128Eq)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.i128Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.i128Step); + const _72: boolean = !rt.rangeEq(rt.i128Eq)(_74, _76); + const _80: { end: rt.i128 } = { end: b }; + const _82: { end: rt.i128 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.i128Eq)(_80, _82); + const _86: { end: rt.i128; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.i128; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.i128Eq)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.i128, rt.i128] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.i128Step)); + const start: rt.i128 = _94[0]; + const end: rt.i128 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i128Step); + const _102: rt.Range = new rt.Range(a, b, rt.i128Step); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.i128Step); + const _107: { end: rt.i128 } = { end: b }; + const _109: { end: rt.i128; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.i128, rt.i128] = [start, end]; + const _113: [rt.i128, rt.i128] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i128Debug(_111[0], f), (f: rt.Formatter) => rt.i128Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i128Debug(_113[0], f), (f: rt.Formatter) => rt.i128Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.i128 }, { end: rt.i128; inclusive: true }] = [new rt.RangeFrom(a, rt.i128Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.i128 } = _137[1]; + const through: { end: rt.i128; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$i128(table, bound); + })), undefined, true); + return [a, b] as [rt.i128, rt.i128]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$i16(table: rt.i16[], at: rt.usize[], out: rt.ByteVec): [rt.i16, rt.i16] { + const _6: rt.i16[] = rt.arrayMap(at, (i: rt.usize): rt.i16 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.i16 = _6[0]; + const b: rt.i16 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.i16Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.i16Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.i16Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$i16_Range_i16(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$i16_RangeInclusive_i16(new rt.RangeInclusive(a, b, rt.i16Step), _19); + const _43: boolean = boundsContain$i16_RangeFrom_i16(new rt.RangeFrom(a, rt.i16Step), _19); + const _45: boolean = boundsContain$i16_RangeTo_i16({ end: b }, _19); + const _47: boolean = boundsContain$i16_RangeToInclusive_i16({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$i16_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i16Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.i16Step); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.i16Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.i16Step); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.i16 } = { end: b }; + const _82: { end: rt.i16 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.i16; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.i16; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.i16, rt.i16] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.i16Step)); + const start: rt.i16 = _94[0]; + const end: rt.i16 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i16Step); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.i16Step); + const _107: { end: rt.i16 } = { end: b }; + const _109: { end: rt.i16; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.i16, rt.i16] = [start, end]; + const _113: [rt.i16, rt.i16] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i16Debug(_111[0], f), (f: rt.Formatter) => rt.i16Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i16Debug(_113[0], f), (f: rt.Formatter) => rt.i16Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.i16 }, { end: rt.i16; inclusive: true }] = [new rt.RangeFrom(a, rt.i16Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.i16 } = _137[1]; + const through: { end: rt.i16; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$i16(table, bound); + })), undefined, true); + return [a, b] as [rt.i16, rt.i16]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$i32(table: rt.i32[], at: rt.usize[], out: rt.ByteVec): [rt.i32, rt.i32] { + const _6: rt.i32[] = rt.arrayMap(at, (i: rt.usize): rt.i32 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.i32 = _6[0]; + const b: rt.i32 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.i32Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.i32Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.i32Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$i32_Range_i32(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$i32_RangeInclusive_i32(new rt.RangeInclusive(a, b, rt.i32Step), _19); + const _43: boolean = boundsContain$i32_RangeFrom_i32(new rt.RangeFrom(a, rt.i32Step), _19); + const _45: boolean = boundsContain$i32_RangeTo_i32({ end: b }, _19); + const _47: boolean = boundsContain$i32_RangeToInclusive_i32({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$i32_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i32Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.i32Step); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.i32Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.i32Step); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.i32 } = { end: b }; + const _82: { end: rt.i32 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.i32; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.i32; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.i32, rt.i32] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.i32Step)); + const start: rt.i32 = _94[0]; + const end: rt.i32 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i32Step); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.i32Step); + const _107: { end: rt.i32 } = { end: b }; + const _109: { end: rt.i32; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.i32, rt.i32] = [start, end]; + const _113: [rt.i32, rt.i32] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i32Debug(_111[0], f), (f: rt.Formatter) => rt.i32Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i32Debug(_113[0], f), (f: rt.Formatter) => rt.i32Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.i32 }, { end: rt.i32; inclusive: true }] = [new rt.RangeFrom(a, rt.i32Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.i32 } = _137[1]; + const through: { end: rt.i32; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$i32(table, bound); + })), undefined, true); + return [a, b] as [rt.i32, rt.i32]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$i64(table: rt.i64[], at: rt.usize[], out: rt.ByteVec): [rt.i64, rt.i64] { + const _6: rt.i64[] = rt.arrayMap(at, (i: rt.usize): rt.i64 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.i64 = _6[0]; + const b: rt.i64 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b, rt.i64Step)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.i64Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b, rt.i64Step), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.i64Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.i64Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$i64_Range_i64(new rt.Range(a, b, rt.i64Step), _19); + const _41: boolean = boundsContain$i64_RangeInclusive_i64(new rt.RangeInclusive(a, b, rt.i64Step), _19); + const _43: boolean = boundsContain$i64_RangeFrom_i64(new rt.RangeFrom(a, rt.i64Step), _19); + const _45: boolean = boundsContain$i64_RangeTo_i64({ end: b }, _19); + const _47: boolean = boundsContain$i64_RangeToInclusive_i64({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$i64_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b, rt.i64Step); + const _64: rt.Range = new rt.Range(_19, b, rt.i64Step); + const _60: boolean = rt.rangeEq(rt.i64Eq)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i64Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.i64Step); + const _66: boolean = rt.rangeEq(rt.i64Eq)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.i64Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.i64Step); + const _72: boolean = !rt.rangeEq(rt.i64Eq)(_74, _76); + const _80: { end: rt.i64 } = { end: b }; + const _82: { end: rt.i64 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.i64Eq)(_80, _82); + const _86: { end: rt.i64; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.i64; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.i64Eq)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.i64, rt.i64] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.i64Step)); + const start: rt.i64 = _94[0]; + const end: rt.i64 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i64Step); + const _102: rt.Range = new rt.Range(a, b, rt.i64Step); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.i64Step); + const _107: { end: rt.i64 } = { end: b }; + const _109: { end: rt.i64; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.i64, rt.i64] = [start, end]; + const _113: [rt.i64, rt.i64] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i64Debug(_111[0], f), (f: rt.Formatter) => rt.i64Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i64Debug(_113[0], f), (f: rt.Formatter) => rt.i64Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.i64 }, { end: rt.i64; inclusive: true }] = [new rt.RangeFrom(a, rt.i64Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.i64 } = _137[1]; + const through: { end: rt.i64; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$i64(table, bound); + })), undefined, true); + return [a, b] as [rt.i64, rt.i64]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$i8(table: rt.i8[], at: rt.usize[], out: rt.ByteVec): [rt.i8, rt.i8] { + const _6: rt.i8[] = rt.arrayMap(at, (i: rt.usize): rt.i8 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.i8 = _6[0]; + const b: rt.i8 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.i8Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.i8Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.i8Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$i8_Range_i8(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$i8_RangeInclusive_i8(new rt.RangeInclusive(a, b, rt.i8Step), _19); + const _43: boolean = boundsContain$i8_RangeFrom_i8(new rt.RangeFrom(a, rt.i8Step), _19); + const _45: boolean = boundsContain$i8_RangeTo_i8({ end: b }, _19); + const _47: boolean = boundsContain$i8_RangeToInclusive_i8({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$i8_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i8Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.i8Step); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.i8Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.i8Step); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.i8 } = { end: b }; + const _82: { end: rt.i8 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.i8; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.i8; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.i8, rt.i8] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.i8Step)); + const start: rt.i8 = _94[0]; + const end: rt.i8 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i8Step); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.i8Step); + const _107: { end: rt.i8 } = { end: b }; + const _109: { end: rt.i8; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.i8, rt.i8] = [start, end]; + const _113: [rt.i8, rt.i8] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i8Debug(_111[0], f), (f: rt.Formatter) => rt.i8Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.i8Debug(_113[0], f), (f: rt.Formatter) => rt.i8Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.i8 }, { end: rt.i8; inclusive: true }] = [new rt.RangeFrom(a, rt.i8Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.i8 } = _137[1]; + const through: { end: rt.i8; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$i8(table, bound); + })), undefined, true); + return [a, b] as [rt.i8, rt.i8]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$isize(table: rt.isize[], at: rt.usize[], out: rt.ByteVec): [rt.isize, rt.isize] { + const _6: rt.isize[] = rt.arrayMap(at, (i: rt.usize): rt.isize => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.isize = _6[0]; + const b: rt.isize = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.isizeStep))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.isizeStep), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.isizeStep), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$isize_Range_isize(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$isize_RangeInclusive_isize(new rt.RangeInclusive(a, b, rt.isizeStep), _19); + const _43: boolean = boundsContain$isize_RangeFrom_isize(new rt.RangeFrom(a, rt.isizeStep), _19); + const _45: boolean = boundsContain$isize_RangeTo_isize({ end: b }, _19); + const _47: boolean = boundsContain$isize_RangeToInclusive_isize({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$isize_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.isizeStep); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.isizeStep); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.isizeStep); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.isizeStep); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.isize } = { end: b }; + const _82: { end: rt.isize } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.isize; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.isize; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.isize, rt.isize] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.isizeStep)); + const start: rt.isize = _94[0]; + const end: rt.isize = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.isizeStep); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.isizeStep); + const _107: { end: rt.isize } = { end: b }; + const _109: { end: rt.isize; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.isize, rt.isize] = [start, end]; + const _113: [rt.isize, rt.isize] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.isizeDebug(_111[0], f), (f: rt.Formatter) => rt.isizeDebug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.isizeDebug(_113[0], f), (f: rt.Formatter) => rt.isizeDebug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.isize }, { end: rt.isize; inclusive: true }] = [new rt.RangeFrom(a, rt.isizeStep), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.isize } = _137[1]; + const through: { end: rt.isize; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$isize(table, bound); + })), undefined, true); + return [a, b] as [rt.isize, rt.isize]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$u128(table: rt.u128[], at: rt.usize[], out: rt.ByteVec): [rt.u128, rt.u128] { + const _6: rt.u128[] = rt.arrayMap(at, (i: rt.usize): rt.u128 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.u128 = _6[0]; + const b: rt.u128 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b, rt.u128Step)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.u128Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b, rt.u128Step), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.u128Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.u128Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$u128_Range_u128(new rt.Range(a, b, rt.u128Step), _19); + const _41: boolean = boundsContain$u128_RangeInclusive_u128(new rt.RangeInclusive(a, b, rt.u128Step), _19); + const _43: boolean = boundsContain$u128_RangeFrom_u128(new rt.RangeFrom(a, rt.u128Step), _19); + const _45: boolean = boundsContain$u128_RangeTo_u128({ end: b }, _19); + const _47: boolean = boundsContain$u128_RangeToInclusive_u128({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$u128_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b, rt.u128Step); + const _64: rt.Range = new rt.Range(_19, b, rt.u128Step); + const _60: boolean = rt.rangeEq(rt.u128Eq)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u128Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.u128Step); + const _66: boolean = rt.rangeEq(rt.u128Eq)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.u128Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.u128Step); + const _72: boolean = !rt.rangeEq(rt.u128Eq)(_74, _76); + const _80: { end: rt.u128 } = { end: b }; + const _82: { end: rt.u128 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.u128Eq)(_80, _82); + const _86: { end: rt.u128; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u128; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.u128Eq)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.u128Step)); + const start: rt.u128 = _94[0]; + const end: rt.u128 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u128Step); + const _102: rt.Range = new rt.Range(a, b, rt.u128Step); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.u128Step); + const _107: { end: rt.u128 } = { end: b }; + const _109: { end: rt.u128; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u128, rt.u128] = [start, end]; + const _113: [rt.u128, rt.u128] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u128Debug(_111[0], f), (f: rt.Formatter) => rt.u128Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u128Debug(_113[0], f), (f: rt.Formatter) => rt.u128Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u128 }, { end: rt.u128; inclusive: true }] = [new rt.RangeFrom(a, rt.u128Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u128 } = _137[1]; + const through: { end: rt.u128; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$u128(table, bound); + })), undefined, true); + return [a, b] as [rt.u128, rt.u128]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$u16(table: rt.u16[], at: rt.usize[], out: rt.ByteVec): [rt.u16, rt.u16] { + const _6: rt.u16[] = rt.arrayMap(at, (i: rt.usize): rt.u16 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.u16 = _6[0]; + const b: rt.u16 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.u16Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.u16Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.u16Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$u16_Range_u16(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$u16_RangeInclusive_u16(new rt.RangeInclusive(a, b, rt.u16Step), _19); + const _43: boolean = boundsContain$u16_RangeFrom_u16(new rt.RangeFrom(a, rt.u16Step), _19); + const _45: boolean = boundsContain$u16_RangeTo_u16({ end: b }, _19); + const _47: boolean = boundsContain$u16_RangeToInclusive_u16({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$u16_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u16Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.u16Step); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.u16Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.u16Step); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.u16 } = { end: b }; + const _82: { end: rt.u16 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.u16; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u16; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u16, rt.u16] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.u16Step)); + const start: rt.u16 = _94[0]; + const end: rt.u16 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u16Step); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.u16Step); + const _107: { end: rt.u16 } = { end: b }; + const _109: { end: rt.u16; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u16, rt.u16] = [start, end]; + const _113: [rt.u16, rt.u16] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u16Debug(_111[0], f), (f: rt.Formatter) => rt.u16Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u16Debug(_113[0], f), (f: rt.Formatter) => rt.u16Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u16 }, { end: rt.u16; inclusive: true }] = [new rt.RangeFrom(a, rt.u16Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u16 } = _137[1]; + const through: { end: rt.u16; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$u16(table, bound); + })), undefined, true); + return [a, b] as [rt.u16, rt.u16]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$u32(table: rt.u32[], at: rt.usize[], out: rt.ByteVec): [rt.u32, rt.u32] { + const _6: rt.u32[] = rt.arrayMap(at, (i: rt.usize): rt.u32 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.u32 = _6[0]; + const b: rt.u32 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.u32Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.u32Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.u32Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$u32_Range_u32(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$u32_RangeInclusive_u32(new rt.RangeInclusive(a, b, rt.u32Step), _19); + const _43: boolean = boundsContain$u32_RangeFrom_u32(new rt.RangeFrom(a, rt.u32Step), _19); + const _45: boolean = boundsContain$u32_RangeTo_u32({ end: b }, _19); + const _47: boolean = boundsContain$u32_RangeToInclusive_u32({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$u32_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u32Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.u32Step); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.u32Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.u32Step); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.u32 } = { end: b }; + const _82: { end: rt.u32 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.u32; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u32; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u32, rt.u32] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.u32Step)); + const start: rt.u32 = _94[0]; + const end: rt.u32 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u32Step); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.u32Step); + const _107: { end: rt.u32 } = { end: b }; + const _109: { end: rt.u32; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u32, rt.u32] = [start, end]; + const _113: [rt.u32, rt.u32] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u32Debug(_111[0], f), (f: rt.Formatter) => rt.u32Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u32Debug(_113[0], f), (f: rt.Formatter) => rt.u32Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u32 }, { end: rt.u32; inclusive: true }] = [new rt.RangeFrom(a, rt.u32Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u32 } = _137[1]; + const through: { end: rt.u32; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$u32(table, bound); + })), undefined, true); + return [a, b] as [rt.u32, rt.u32]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$u64(table: rt.u64[], at: rt.usize[], out: rt.ByteVec): [rt.u64, rt.u64] { + const _6: rt.u64[] = rt.arrayMap(at, (i: rt.usize): rt.u64 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.u64 = _6[0]; + const b: rt.u64 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b, rt.u64Step)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.u64Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b, rt.u64Step), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.u64Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.u64Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$u64_Range_u64(new rt.Range(a, b, rt.u64Step), _19); + const _41: boolean = boundsContain$u64_RangeInclusive_u64(new rt.RangeInclusive(a, b, rt.u64Step), _19); + const _43: boolean = boundsContain$u64_RangeFrom_u64(new rt.RangeFrom(a, rt.u64Step), _19); + const _45: boolean = boundsContain$u64_RangeTo_u64({ end: b }, _19); + const _47: boolean = boundsContain$u64_RangeToInclusive_u64({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$u64_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b, rt.u64Step); + const _64: rt.Range = new rt.Range(_19, b, rt.u64Step); + const _60: boolean = rt.rangeEq(rt.u64Eq)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u64Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.u64Step); + const _66: boolean = rt.rangeEq(rt.u64Eq)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.u64Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.u64Step); + const _72: boolean = !rt.rangeEq(rt.u64Eq)(_74, _76); + const _80: { end: rt.u64 } = { end: b }; + const _82: { end: rt.u64 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.u64Eq)(_80, _82); + const _86: { end: rt.u64; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u64; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.u64Eq)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.u64Step)); + const start: rt.u64 = _94[0]; + const end: rt.u64 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u64Step); + const _102: rt.Range = new rt.Range(a, b, rt.u64Step); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.u64Step); + const _107: { end: rt.u64 } = { end: b }; + const _109: { end: rt.u64; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u64, rt.u64] = [start, end]; + const _113: [rt.u64, rt.u64] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u64Debug(_111[0], f), (f: rt.Formatter) => rt.u64Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u64Debug(_113[0], f), (f: rt.Formatter) => rt.u64Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u64 }, { end: rt.u64; inclusive: true }] = [new rt.RangeFrom(a, rt.u64Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u64 } = _137[1]; + const through: { end: rt.u64; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$u64(table, bound); + })), undefined, true); + return [a, b] as [rt.u64, rt.u64]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$u8(table: rt.ByteSlice, at: rt.usize[], out: rt.ByteVec): [rt.u8, rt.u8] { + const _6: Uint8Array = rt.bytesMap(at, (i: rt.usize): rt.u8 => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table.data[table.start + _3]; + }); + const a: rt.u8 = _6[0]; + const b: rt.u8 = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.u8Step))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of rt.byteSliceView(table)) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.u8Step), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.u8Step), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$u8_Range_u8(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$u8_RangeInclusive_u8(new rt.RangeInclusive(a, b, rt.u8Step), _19); + const _43: boolean = boundsContain$u8_RangeFrom_u8(new rt.RangeFrom(a, rt.u8Step), _19); + const _45: boolean = boundsContain$u8_RangeTo_u8({ end: b }, _19); + const _47: boolean = boundsContain$u8_RangeToInclusive_u8({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$u8_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u8Step); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.u8Step); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.u8Step); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.u8Step); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.u8 } = { end: b }; + const _82: { end: rt.u8 } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.u8; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.u8; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.u8Step)); + const start: rt.u8 = _94[0]; + const end: rt.u8 = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u8Step); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.u8Step); + const _107: { end: rt.u8 } = { end: b }; + const _109: { end: rt.u8; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.u8, rt.u8] = [start, end]; + const _113: [rt.u8, rt.u8] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Debug(_111[0], f), (f: rt.Formatter) => rt.u8Debug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.u8Debug(_113[0], f), (f: rt.Formatter) => rt.u8Debug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.u8 }, { end: rt.u8; inclusive: true }] = [new rt.RangeFrom(a, rt.u8Step), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.u8 } = _137[1]; + const through: { end: rt.u8; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$u8(table, bound); + })), undefined, true); + return [a, b] as [rt.u8, rt.u8]; +} + +/** + * Each range type's comparisons of `a` and `b`, from `table`, against each of its + * values, and their `Debug`. + */ +export function bounded$usize(table: rt.usize[], at: rt.usize[], out: rt.ByteVec): [rt.usize, rt.usize] { + const _6: rt.usize[] = rt.arrayMap(at, (i: rt.usize): rt.usize => { + const _3: rt.usize = rt.usizeRem(i, table.length); + rt.idx(table, _3); + return table[_3]; + }); + const a: rt.usize = _6[0]; + const b: rt.usize = _6[1]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeIsEmpty(new rt.Range(a, b)), rt.rangeInclusiveIsEmpty(new rt.RangeInclusive(a, b, rt.usizeStep))], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + for (const _19 of table) { + const _24: boolean = rt.rangeContains(new rt.Range(a, b), _19); + const _27: boolean = rt.rangeInclusiveContains(new rt.RangeInclusive(a, b, rt.usizeStep), _19); + const _30: boolean = rt.rangeFromContains(new rt.RangeFrom(a, rt.usizeStep), _19); + const _33: boolean = rt.rangeToContains({ end: b }, _19); + const _36: boolean = rt.rangeToContains({ end: b, inclusive: true }, _19); + const _39: boolean = boundsContain$usize_Range_usize(new rt.Range(a, b), _19); + const _41: boolean = boundsContain$usize_RangeInclusive_usize(new rt.RangeInclusive(a, b, rt.usizeStep), _19); + const _43: boolean = boundsContain$usize_RangeFrom_usize(new rt.RangeFrom(a, rt.usizeStep), _19); + const _45: boolean = boundsContain$usize_RangeTo_usize({ end: b }, _19); + const _47: boolean = boundsContain$usize_RangeToInclusive_usize({ end: b, inclusive: true }, _19); + const _49: boolean = boundsContain$usize_RangeFull(undefined, _19); + const _50: boolean = rt.boundsContains([{ tag: "Excluded", _0: a } as rt.RangeBound, { tag: "Included", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _55: boolean = rt.boundsContains([{ tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: b } as rt.RangeBound] as [rt.RangeBound, rt.RangeBound], _19); + const _62: rt.Range = new rt.Range(a, b); + const _64: rt.Range = new rt.Range(_19, b); + const _60: boolean = rt.rangeEq(rt.same)(_62, _64); + const _68: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.usizeStep); + const _70: rt.RangeInclusive = new rt.RangeInclusive(a, _19, rt.usizeStep); + const _66: boolean = rt.rangeEq(rt.same)(_68, _70); + const _74: rt.RangeFrom = new rt.RangeFrom(a, rt.usizeStep); + const _76: rt.RangeFrom = new rt.RangeFrom(_19, rt.usizeStep); + const _72: boolean = !rt.rangeEq(rt.same)(_74, _76); + const _80: { end: rt.usize } = { end: b }; + const _82: { end: rt.usize } = { end: _19 }; + const _78: boolean = rt.rangeEq(rt.same)(_80, _82); + const _86: { end: rt.usize; inclusive: true } = { end: b, inclusive: true }; + const _88: { end: rt.usize; inclusive: true } = { end: _19, inclusive: true }; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_24, _27, _30, _33, _36, _39, _41, _43, _45, _47, _49, _50, _55, _60, _66, _72, _78, !rt.rangeEq(rt.same)(_86, _88)], (a02: boolean): rt.u8 => { + return a02 ? 1 : 0; + })), undefined, true); + } + const _94: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(new rt.RangeInclusive(a, b, rt.usizeStep)); + const start: rt.usize = _94[0]; + const end: rt.usize = _94[1]; + const inclusive: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.usizeStep); + const _102: rt.Range = new rt.Range(a, b); + const _105: rt.RangeFrom = new rt.RangeFrom(a, rt.usizeStep); + const _107: { end: rt.usize } = { end: b }; + const _109: { end: rt.usize; inclusive: true } = { end: b, inclusive: true }; + const _111: [rt.usize, rt.usize] = [start, end]; + const _113: [rt.usize, rt.usize] = [rt.rangeInclusiveStart(inclusive), rt.rangeInclusiveEnd(inclusive)]; + const _118: [undefined, [undefined, rt.Range]] = [undefined, [undefined, new rt.Range(1, 2)]]; + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtRange(_102, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(inclusive, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeFrom(_105, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeTo(_107, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeToInclusive(_109, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.usizeDebug(_111[0], f), (f: rt.Formatter) => rt.usizeDebug(_111[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.usizeDebug(_113[0], f), (f: rt.Formatter) => rt.usizeDebug(_113[1], f)], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[0], f), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtRangeFull(_118[1][0], f), (f: rt.Formatter) => rt.fmtRange(_118[1][1], f, rt.i32Debug)], f)], f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2], " ", args2[3], " ", args2[4], " ", args2[5], " ", args2[6], " ", args2[7]])), undefined, true); + const _137: [rt.RangeFrom, { end: rt.usize }, { end: rt.usize; inclusive: true }] = [new rt.RangeFrom(a, rt.usizeStep), { end: b }, { end: b, inclusive: true }]; + const from: rt.RangeFrom = _137[0]; + const to: { end: rt.usize } = _137[1]; + const through: { end: rt.usize; inclusive: true } = _137[2]; + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { + return boundOf$usize(table, bound); + })), undefined, true); + return [a, b] as [rt.usize, rt.usize]; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$NonZero_u128(table: rt.u128[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u128) => rt.u8 = (x: rt.u128): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u128): boolean => { + return rt.u128Eq(y, x); + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u128 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u128 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$NonZero_u64(table: rt.u64[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u64) => rt.u8 = (x: rt.u64): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u64): boolean => { + return rt.u64Eq(y, x); + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u64 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u64 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$NonZero_u8(table: rt.u8[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u8) => rt.u8 = (x: rt.u8): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u8): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u8 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u8 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$NonZero_usize(table: rt.usize[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.usize) => rt.u8 = (x: rt.usize): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.usize): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.usize })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.usize })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$char(table: rt.char[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.char) => rt.u8 = (x: rt.char): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.char): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.char })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.char })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$f32(table: rt.f32[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.f32) => rt.u8 = (x: rt.f32): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.f32): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.f32 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.f32 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$f64(table: rt.f64[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.f64) => rt.u8 = (x: rt.f64): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.f64): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.f64 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.f64 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$i128(table: rt.i128[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.i128) => rt.u8 = (x: rt.i128): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i128): boolean => { + return rt.i128Eq(y, x); + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.i128 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.i128 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$i16(table: rt.i16[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.i16) => rt.u8 = (x: rt.i16): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i16): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.i16 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.i16 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$i32(table: rt.i32[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.i32) => rt.u8 = (x: rt.i32): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i32): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.i32 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.i32 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$i64(table: rt.i64[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.i64) => rt.u8 = (x: rt.i64): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i64): boolean => { + return rt.i64Eq(y, x); + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.i64 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.i64 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$i8(table: rt.i8[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.i8) => rt.u8 = (x: rt.i8): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i8): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.i8 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.i8 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$isize(table: rt.isize[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.isize) => rt.u8 = (x: rt.isize): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.isize): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.isize })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.isize })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$u128(table: rt.u128[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u128) => rt.u8 = (x: rt.u128): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u128): boolean => { + return rt.u128Eq(y, x); + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u128 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u128 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$u16(table: rt.u16[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u16) => rt.u8 = (x: rt.u16): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u16): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u16 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u16 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$u32(table: rt.u32[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u32) => rt.u8 = (x: rt.u32): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u32): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u32 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u32 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$u64(table: rt.u64[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u64) => rt.u8 = (x: rt.u64): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u64): boolean => { + return rt.u64Eq(y, x); + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u64 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u64 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$u8(table: rt.ByteSlice, bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.u8) => rt.u8 = (x: rt.u8): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(rt.byteSliceView(table)), (y: rt.u8): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.u8 })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.u8 })._0); + } + return 0; +} + +/** Which kind of bound `bound` is, and where its value is in `table`. */ +export function boundOf$usize(table: rt.usize[], bound: rt.RangeBound): rt.u8 { + const at: (a0: rt.usize) => rt.u8 = (x: rt.usize): rt.u8 => { + return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.usize): boolean => { + return y === x; + }), 63, (i: rt.usize): rt.u8 => { + return i & 0xff; + }); + }; + if (bound.tag === "Included") { + return 64 | at((bound as { tag: "Included"; _0: rt.usize })._0); + } + if (bound.tag === "Excluded") { + return 128 | at((bound as { tag: "Excluded"; _0: rt.usize })._0); + } + return 0; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u128_RangeFrom_NonZero_u128(r: rt.RangeFrom, x: rt.u128): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u128_RangeFull(_: undefined, _x: rt.u128): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u128_RangeInclusive_NonZero_u128(r: rt.RangeInclusive, x: rt.u128): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u128_RangeToInclusive_NonZero_u128(r: { end: rt.u128; inclusive: true }, x: rt.u128): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u128_RangeTo_NonZero_u128(r: { end: rt.u128 }, x: rt.u128): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u128_Range_NonZero_u128(r: rt.Range, x: rt.u128): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u64_RangeFrom_NonZero_u64(r: rt.RangeFrom, x: rt.u64): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u64_RangeFull(_: undefined, _x: rt.u64): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u64_RangeInclusive_NonZero_u64(r: rt.RangeInclusive, x: rt.u64): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u64_RangeToInclusive_NonZero_u64(r: { end: rt.u64; inclusive: true }, x: rt.u64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u64_RangeTo_NonZero_u64(r: { end: rt.u64 }, x: rt.u64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u64_Range_NonZero_u64(r: rt.Range, x: rt.u64): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u8_RangeFrom_NonZero_u8(r: rt.RangeFrom, x: rt.u8): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u8_RangeFull(_: undefined, _x: rt.u8): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u8_RangeInclusive_NonZero_u8(r: rt.RangeInclusive, x: rt.u8): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u8_RangeToInclusive_NonZero_u8(r: { end: rt.u8; inclusive: true }, x: rt.u8): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u8_RangeTo_NonZero_u8(r: { end: rt.u8 }, x: rt.u8): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_u8_Range_NonZero_u8(r: rt.Range, x: rt.u8): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_usize_RangeFrom_NonZero_usize(r: rt.RangeFrom, x: rt.usize): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_usize_RangeFull(_: undefined, _x: rt.usize): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_usize_RangeInclusive_NonZero_usize(r: rt.RangeInclusive, x: rt.usize): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_usize_RangeToInclusive_NonZero_usize(r: { end: rt.usize; inclusive: true }, x: rt.usize): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_usize_RangeTo_NonZero_usize(r: { end: rt.usize }, x: rt.usize): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$NonZero_usize_Range_NonZero_usize(r: rt.Range, x: rt.usize): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$char_RangeFrom_char(r: rt.RangeFrom, x: rt.char): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$char_RangeFull(_: undefined, _x: rt.char): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$char_RangeInclusive_char(r: rt.RangeInclusive, x: rt.char): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$char_RangeToInclusive_char(r: { end: rt.char; inclusive: true }, x: rt.char): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$char_RangeTo_char(r: { end: rt.char }, x: rt.char): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$char_Range_char(r: rt.Range, x: rt.char): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f32_RangeFrom_f32(r: rt.RangeFrom, x: rt.f32): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f32_RangeFull(_: undefined, _x: rt.f32): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f32_RangeInclusive_f32(r: rt.RangeInclusive, x: rt.f32): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f32_RangeToInclusive_f32(r: { end: rt.f32; inclusive: true }, x: rt.f32): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f32_RangeTo_f32(r: { end: rt.f32 }, x: rt.f32): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f32_Range_f32(r: rt.Range, x: rt.f32): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f64_RangeFrom_f64(r: rt.RangeFrom, x: rt.f64): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f64_RangeFull(_: undefined, _x: rt.f64): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f64_RangeInclusive_f64(r: rt.RangeInclusive, x: rt.f64): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f64_RangeToInclusive_f64(r: { end: rt.f64; inclusive: true }, x: rt.f64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f64_RangeTo_f64(r: { end: rt.f64 }, x: rt.f64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$f64_Range_f64(r: rt.Range, x: rt.f64): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i128_RangeFrom_i128(r: rt.RangeFrom, x: rt.i128): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i128_RangeFull(_: undefined, _x: rt.i128): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i128_RangeInclusive_i128(r: rt.RangeInclusive, x: rt.i128): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i128_RangeToInclusive_i128(r: { end: rt.i128; inclusive: true }, x: rt.i128): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i128_RangeTo_i128(r: { end: rt.i128 }, x: rt.i128): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i128_Range_i128(r: rt.Range, x: rt.i128): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i16_RangeFrom_i16(r: rt.RangeFrom, x: rt.i16): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i16_RangeFull(_: undefined, _x: rt.i16): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i16_RangeInclusive_i16(r: rt.RangeInclusive, x: rt.i16): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i16_RangeToInclusive_i16(r: { end: rt.i16; inclusive: true }, x: rt.i16): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i16_RangeTo_i16(r: { end: rt.i16 }, x: rt.i16): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i16_Range_i16(r: rt.Range, x: rt.i16): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i32_RangeFrom_i32(r: rt.RangeFrom, x: rt.i32): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i32_RangeFull(_: undefined, _x: rt.i32): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i32_RangeInclusive_i32(r: rt.RangeInclusive, x: rt.i32): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i32_RangeToInclusive_i32(r: { end: rt.i32; inclusive: true }, x: rt.i32): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i32_RangeTo_i32(r: { end: rt.i32 }, x: rt.i32): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i32_Range_i32(r: rt.Range, x: rt.i32): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i64_RangeFrom_i64(r: rt.RangeFrom, x: rt.i64): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i64_RangeFull(_: undefined, _x: rt.i64): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i64_RangeInclusive_i64(r: rt.RangeInclusive, x: rt.i64): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i64_RangeToInclusive_i64(r: { end: rt.i64; inclusive: true }, x: rt.i64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i64_RangeTo_i64(r: { end: rt.i64 }, x: rt.i64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i64_Range_i64(r: rt.Range, x: rt.i64): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i8_RangeFrom_i8(r: rt.RangeFrom, x: rt.i8): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i8_RangeFull(_: undefined, _x: rt.i8): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i8_RangeInclusive_i8(r: rt.RangeInclusive, x: rt.i8): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i8_RangeToInclusive_i8(r: { end: rt.i8; inclusive: true }, x: rt.i8): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i8_RangeTo_i8(r: { end: rt.i8 }, x: rt.i8): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$i8_Range_i8(r: rt.Range, x: rt.i8): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$isize_RangeFrom_isize(r: rt.RangeFrom, x: rt.isize): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$isize_RangeFull(_: undefined, _x: rt.isize): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$isize_RangeInclusive_isize(r: rt.RangeInclusive, x: rt.isize): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$isize_RangeToInclusive_isize(r: { end: rt.isize; inclusive: true }, x: rt.isize): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$isize_RangeTo_isize(r: { end: rt.isize }, x: rt.isize): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$isize_Range_isize(r: rt.Range, x: rt.isize): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u128_RangeFrom_u128(r: rt.RangeFrom, x: rt.u128): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u128_RangeFull(_: undefined, _x: rt.u128): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u128_RangeInclusive_u128(r: rt.RangeInclusive, x: rt.u128): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u128_RangeToInclusive_u128(r: { end: rt.u128; inclusive: true }, x: rt.u128): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u128_RangeTo_u128(r: { end: rt.u128 }, x: rt.u128): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u128_Range_u128(r: rt.Range, x: rt.u128): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u16_RangeFrom_u16(r: rt.RangeFrom, x: rt.u16): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u16_RangeFull(_: undefined, _x: rt.u16): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u16_RangeInclusive_u16(r: rt.RangeInclusive, x: rt.u16): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u16_RangeToInclusive_u16(r: { end: rt.u16; inclusive: true }, x: rt.u16): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u16_RangeTo_u16(r: { end: rt.u16 }, x: rt.u16): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u16_Range_u16(r: rt.Range, x: rt.u16): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u32_RangeFrom_u32(r: rt.RangeFrom, x: rt.u32): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u32_RangeFull(_: undefined, _x: rt.u32): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u32_RangeInclusive_u32(r: rt.RangeInclusive, x: rt.u32): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u32_RangeToInclusive_u32(r: { end: rt.u32; inclusive: true }, x: rt.u32): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u32_RangeTo_u32(r: { end: rt.u32 }, x: rt.u32): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u32_Range_u32(r: rt.Range, x: rt.u32): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u64_RangeFrom_u64(r: rt.RangeFrom, x: rt.u64): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u64_RangeFull(_: undefined, _x: rt.u64): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u64_RangeInclusive_u64(r: rt.RangeInclusive, x: rt.u64): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u64_RangeToInclusive_u64(r: { end: rt.u64; inclusive: true }, x: rt.u64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u64_RangeTo_u64(r: { end: rt.u64 }, x: rt.u64): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u64_Range_u64(r: rt.Range, x: rt.u64): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u8_RangeFrom_u8(r: rt.RangeFrom, x: rt.u8): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u8_RangeFull(_: undefined, _x: rt.u8): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u8_RangeInclusive_u8(r: rt.RangeInclusive, x: rt.u8): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u8_RangeToInclusive_u8(r: { end: rt.u8; inclusive: true }, x: rt.u8): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u8_RangeTo_u8(r: { end: rt.u8 }, x: rt.u8): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$u8_Range_u8(r: rt.Range, x: rt.u8): boolean { + return rt.rangeContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$usize_RangeFrom_usize(r: rt.RangeFrom, x: rt.usize): boolean { + return rt.rangeFromContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$usize_RangeFull(_: undefined, _x: rt.usize): boolean { + return true; +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$usize_RangeInclusive_usize(r: rt.RangeInclusive, x: rt.usize): boolean { + return rt.rangeInclusiveContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$usize_RangeToInclusive_usize(r: { end: rt.usize; inclusive: true }, x: rt.usize): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$usize_RangeTo_usize(r: { end: rt.usize }, x: rt.usize): boolean { + return rt.rangeToContains(r, x); +} + +/** `RangeBounds::contains`, through the trait. */ +export function boundsContain$usize_Range_usize(r: rt.Range, x: rt.usize): boolean { + return rt.rangeContains(r, x); +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$NonZero_u128(table: rt.u128[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u128 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u128, rt.u128] = bounded$NonZero_u128(table, at, out); + const a: rt.u128 = _6[0]; + const b: rt.u128 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + rt.rangeHash(rt.hash128)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + rt.rangeHash(rt.hash128)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + rt.rangeHash(rt.hash128)(_15, h2); + const _19: { end: rt.u128 } = { end: b }; + rt.rangeHash(rt.hash128)(_19, h2); + const _23: { end: rt.u128; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash128)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u128 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u128 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u128, rt.u128] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u128 = _54[0]; + const end: rt.u128 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128))]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash128), rt.rangeEq(rt.u128Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 29360128)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u128Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_u128(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_u128(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _100: boolean = rt.rangeEq(rt.u128Eq)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _106: boolean = rt.rangeEq(rt.u128Eq)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u128Eq)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u128): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash128)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u128 = _129[0]; + const end2: rt.u128 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u128Debug(start2, f), (f: rt.Formatter) => rt.u128Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$NonZero_u64(table: rt.u64[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u64 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u64, rt.u64] = bounded$NonZero_u64(table, at, out); + const a: rt.u64 = _6[0]; + const b: rt.u64 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + rt.rangeHash(rt.hash64)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + rt.rangeHash(rt.hash64)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + rt.rangeHash(rt.hash64)(_15, h2); + const _19: { end: rt.u64 } = { end: b }; + rt.rangeHash(rt.hash64)(_19, h2); + const _23: { end: rt.u64; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash64)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u64 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u64 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u64, rt.u64] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u64 = _54[0]; + const end: rt.u64 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64))]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash64), rt.rangeEq(rt.u64Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 58720256)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u64Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_u64(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_u64(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _100: boolean = rt.rangeEq(rt.u64Eq)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _106: boolean = rt.rangeEq(rt.u64Eq)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u64Eq)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u64): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash64)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u64 = _129[0]; + const end2: rt.u64 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Debug(start2, f), (f: rt.Formatter) => rt.u64Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$NonZero_u8(table: rt.u8[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u8 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u8, rt.u8] = bounded$NonZero_u8(table, at, out); + const a: rt.u8 = _6[0]; + const b: rt.u8 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash8)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)); + rt.rangeHash(rt.hash8)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.u8Step, 255)); + rt.rangeHash(rt.hash8)(_15, h2); + const _19: { end: rt.u8 } = { end: b }; + rt.rangeHash(rt.hash8)(_19, h2); + const _23: { end: rt.u8; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash8)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u8 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u8 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u8, rt.u8] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u8 = _54[0]; + const end: rt.u8 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255))]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash8), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u8Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_u8(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_u8(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255)); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u8): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash8)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u8 = _129[0]; + const end2: rt.u8 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Debug(start2, f), (f: rt.Formatter) => rt.u8Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$NonZero_usize(table: rt.usize[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.usize | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.usize, rt.usize] = bounded$NonZero_usize(table, at, out); + const a: rt.usize = _6[0]; + const b: rt.usize = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash32)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)); + rt.rangeHash(rt.hash32)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.nonZeroStep(rt.usizeStep, 4294967295)); + rt.rangeHash(rt.hash32)(_15, h2); + const _19: { end: rt.usize } = { end: b }; + rt.rangeHash(rt.hash32)(_19, h2); + const _23: { end: rt.usize; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash32)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.usize | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.usize | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.usize, rt.usize] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.usize = _54[0]; + const end: rt.usize = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295)), new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295))]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.usizeDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_usize(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_usize(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.usize): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash32)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(r); + const start2: rt.usize = _129[0]; + const end2: rt.usize = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.usizeDebug(start2, f), (f: rt.Formatter) => rt.usizeDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$char(table: rt.char[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.char | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.char, rt.char] = bounded$char(table, at, out); + const a: rt.char = _6[0]; + const b: rt.char = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b, rt.charStep); + rt.rangeHash(rt.hash32)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.charStep); + rt.rangeHash(rt.hash32)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.charStep); + rt.rangeHash(rt.hash32)(_15, h2); + const _19: { end: rt.char } = { end: b }; + rt.rangeHash(rt.hash32)(_19, h2); + const _23: { end: rt.char; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash32)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.charStep); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.char | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.char | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.char, rt.char] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.char = _54[0]; + const end: rt.char = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.charStep), new rt.RangeInclusive(start, end, rt.charStep), new rt.RangeInclusive(start, end, rt.charStep)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$char(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$char(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.charStep); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.charStep); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.charStep); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.char): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash32)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.char, rt.char] = rt.rangeInclusiveIntoInner(r); + const start2: rt.char = _129[0]; + const end2: rt.char = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtCharDebug(start2, f), (f: rt.Formatter) => rt.fmtCharDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$i128(table: rt.i128[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.i128 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.i128, rt.i128] = bounded$i128(table, at, out); + const a: rt.i128 = _6[0]; + const b: rt.i128 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b, rt.i128Step); + rt.rangeHash(rt.hash128)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i128Step); + rt.rangeHash(rt.hash128)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.i128Step); + rt.rangeHash(rt.hash128)(_15, h2); + const _19: { end: rt.i128 } = { end: b }; + rt.rangeHash(rt.hash128)(_19, h2); + const _23: { end: rt.i128; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash128)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i128Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.i128 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.i128 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.i128, rt.i128] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.i128 = _54[0]; + const end: rt.i128 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.i128Step), new rt.RangeInclusive(start, end, rt.i128Step), new rt.RangeInclusive(start, end, rt.i128Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash128), rt.rangeEq(rt.i128Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 29360128)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i128Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i128(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i128(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i128Step); + const _100: boolean = rt.rangeEq(rt.i128Eq)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i128Step); + const _106: boolean = rt.rangeEq(rt.i128Eq)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i128Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.i128Eq)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i128): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash128)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.i128, rt.i128] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i128 = _129[0]; + const end2: rt.i128 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i128Debug(start2, f), (f: rt.Formatter) => rt.i128Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$i16(table: rt.i16[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.i16 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.i16, rt.i16] = bounded$i16(table, at, out); + const a: rt.i16 = _6[0]; + const b: rt.i16 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash16)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i16Step); + rt.rangeHash(rt.hash16)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.i16Step); + rt.rangeHash(rt.hash16)(_15, h2); + const _19: { end: rt.i16 } = { end: b }; + rt.rangeHash(rt.hash16)(_19, h2); + const _23: { end: rt.i16; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash16)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i16Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.i16 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.i16 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.i16, rt.i16] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.i16 = _54[0]; + const end: rt.i16 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.i16Step), new rt.RangeInclusive(start, end, rt.i16Step), new rt.RangeInclusive(start, end, rt.i16Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash16), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i16Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i16(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i16(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i16Step); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i16Step); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i16Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i16): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash16)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.i16, rt.i16] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i16 = _129[0]; + const end2: rt.i16 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i16Debug(start2, f), (f: rt.Formatter) => rt.i16Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$i32(table: rt.i32[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.i32 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.i32, rt.i32] = bounded$i32(table, at, out); + const a: rt.i32 = _6[0]; + const b: rt.i32 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash32)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i32Step); + rt.rangeHash(rt.hash32)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.i32Step); + rt.rangeHash(rt.hash32)(_15, h2); + const _19: { end: rt.i32 } = { end: b }; + rt.rangeHash(rt.hash32)(_19, h2); + const _23: { end: rt.i32; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash32)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i32Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.i32 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.i32 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.i32, rt.i32] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.i32 = _54[0]; + const end: rt.i32 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.i32Step), new rt.RangeInclusive(start, end, rt.i32Step), new rt.RangeInclusive(start, end, rt.i32Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i32Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i32(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i32(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i32Step); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i32Step); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i32Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i32): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash32)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.i32, rt.i32] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i32 = _129[0]; + const end2: rt.i32 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i32Debug(start2, f), (f: rt.Formatter) => rt.i32Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$i64(table: rt.i64[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.i64 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.i64, rt.i64] = bounded$i64(table, at, out); + const a: rt.i64 = _6[0]; + const b: rt.i64 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b, rt.i64Step); + rt.rangeHash(rt.hash64)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i64Step); + rt.rangeHash(rt.hash64)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.i64Step); + rt.rangeHash(rt.hash64)(_15, h2); + const _19: { end: rt.i64 } = { end: b }; + rt.rangeHash(rt.hash64)(_19, h2); + const _23: { end: rt.i64; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash64)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i64Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.i64 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.i64 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.i64, rt.i64] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.i64 = _54[0]; + const end: rt.i64 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.i64Step), new rt.RangeInclusive(start, end, rt.i64Step), new rt.RangeInclusive(start, end, rt.i64Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash64), rt.rangeEq(rt.i64Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 58720256)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i64Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i64(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i64(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i64Step); + const _100: boolean = rt.rangeEq(rt.i64Eq)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i64Step); + const _106: boolean = rt.rangeEq(rt.i64Eq)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i64Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.i64Eq)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i64): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash64)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.i64, rt.i64] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i64 = _129[0]; + const end2: rt.i64 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i64Debug(start2, f), (f: rt.Formatter) => rt.i64Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$i8(table: rt.i8[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.i8 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.i8, rt.i8] = bounded$i8(table, at, out); + const a: rt.i8 = _6[0]; + const b: rt.i8 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash8)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i8Step); + rt.rangeHash(rt.hash8)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.i8Step); + rt.rangeHash(rt.hash8)(_15, h2); + const _19: { end: rt.i8 } = { end: b }; + rt.rangeHash(rt.hash8)(_19, h2); + const _23: { end: rt.i8; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash8)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i8Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.i8 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.i8 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.i8, rt.i8] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.i8 = _54[0]; + const end: rt.i8 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.i8Step), new rt.RangeInclusive(start, end, rt.i8Step), new rt.RangeInclusive(start, end, rt.i8Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash8), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i8Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i8(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i8(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i8Step); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i8Step); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i8Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i8): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash8)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.i8, rt.i8] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i8 = _129[0]; + const end2: rt.i8 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i8Debug(start2, f), (f: rt.Formatter) => rt.i8Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$isize(table: rt.isize[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.isize | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.isize, rt.isize] = bounded$isize(table, at, out); + const a: rt.isize = _6[0]; + const b: rt.isize = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash32)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.isizeStep); + rt.rangeHash(rt.hash32)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.isizeStep); + rt.rangeHash(rt.hash32)(_15, h2); + const _19: { end: rt.isize } = { end: b }; + rt.rangeHash(rt.hash32)(_19, h2); + const _23: { end: rt.isize; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash32)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.isizeStep); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.isize | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.isize | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.isize, rt.isize] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.isize = _54[0]; + const end: rt.isize = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.isizeStep), new rt.RangeInclusive(start, end, rt.isizeStep), new rt.RangeInclusive(start, end, rt.isizeStep)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.isizeDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$isize(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$isize(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.isizeStep); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.isizeStep); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.isizeStep); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.isize): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash32)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.isize, rt.isize] = rt.rangeInclusiveIntoInner(r); + const start2: rt.isize = _129[0]; + const end2: rt.isize = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.isizeDebug(start2, f), (f: rt.Formatter) => rt.isizeDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$u128(table: rt.u128[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u128 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u128, rt.u128] = bounded$u128(table, at, out); + const a: rt.u128 = _6[0]; + const b: rt.u128 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b, rt.u128Step); + rt.rangeHash(rt.hash128)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u128Step); + rt.rangeHash(rt.hash128)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.u128Step); + rt.rangeHash(rt.hash128)(_15, h2); + const _19: { end: rt.u128 } = { end: b }; + rt.rangeHash(rt.hash128)(_19, h2); + const _23: { end: rt.u128; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash128)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u128Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u128 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u128 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u128, rt.u128] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u128 = _54[0]; + const end: rt.u128 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.u128Step), new rt.RangeInclusive(start, end, rt.u128Step), new rt.RangeInclusive(start, end, rt.u128Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash128), rt.rangeEq(rt.u128Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 29360128)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u128Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u128(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u128(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u128Step); + const _100: boolean = rt.rangeEq(rt.u128Eq)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u128Step); + const _106: boolean = rt.rangeEq(rt.u128Eq)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u128Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u128Eq)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u128): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash128)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u128 = _129[0]; + const end2: rt.u128 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u128Debug(start2, f), (f: rt.Formatter) => rt.u128Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$u16(table: rt.u16[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u16 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u16, rt.u16] = bounded$u16(table, at, out); + const a: rt.u16 = _6[0]; + const b: rt.u16 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash16)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u16Step); + rt.rangeHash(rt.hash16)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.u16Step); + rt.rangeHash(rt.hash16)(_15, h2); + const _19: { end: rt.u16 } = { end: b }; + rt.rangeHash(rt.hash16)(_19, h2); + const _23: { end: rt.u16; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash16)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u16Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u16 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u16 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u16, rt.u16] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u16 = _54[0]; + const end: rt.u16 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.u16Step), new rt.RangeInclusive(start, end, rt.u16Step), new rt.RangeInclusive(start, end, rt.u16Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash16), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u16Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u16(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u16(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u16Step); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u16Step); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u16Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u16): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash16)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u16, rt.u16] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u16 = _129[0]; + const end2: rt.u16 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u16Debug(start2, f), (f: rt.Formatter) => rt.u16Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$u32(table: rt.u32[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u32 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u32, rt.u32] = bounded$u32(table, at, out); + const a: rt.u32 = _6[0]; + const b: rt.u32 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash32)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u32Step); + rt.rangeHash(rt.hash32)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.u32Step); + rt.rangeHash(rt.hash32)(_15, h2); + const _19: { end: rt.u32 } = { end: b }; + rt.rangeHash(rt.hash32)(_19, h2); + const _23: { end: rt.u32; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash32)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u32Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u32 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u32 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u32, rt.u32] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u32 = _54[0]; + const end: rt.u32 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.u32Step), new rt.RangeInclusive(start, end, rt.u32Step), new rt.RangeInclusive(start, end, rt.u32Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u32Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u32(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u32(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u32Step); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u32Step); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u32Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u32): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash32)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u32, rt.u32] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u32 = _129[0]; + const end2: rt.u32 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u32Debug(start2, f), (f: rt.Formatter) => rt.u32Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$u64(table: rt.u64[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u64 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u64, rt.u64] = bounded$u64(table, at, out); + const a: rt.u64 = _6[0]; + const b: rt.u64 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b, rt.u64Step); + rt.rangeHash(rt.hash64)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u64Step); + rt.rangeHash(rt.hash64)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.u64Step); + rt.rangeHash(rt.hash64)(_15, h2); + const _19: { end: rt.u64 } = { end: b }; + rt.rangeHash(rt.hash64)(_19, h2); + const _23: { end: rt.u64; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash64)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u64Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u64 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u64 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u64, rt.u64] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u64 = _54[0]; + const end: rt.u64 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.u64Step), new rt.RangeInclusive(start, end, rt.u64Step), new rt.RangeInclusive(start, end, rt.u64Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash64), rt.rangeEq(rt.u64Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 58720256)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u64Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u64(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u64(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u64Step); + const _100: boolean = rt.rangeEq(rt.u64Eq)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u64Step); + const _106: boolean = rt.rangeEq(rt.u64Eq)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u64Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u64Eq)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u64): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash64)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u64 = _129[0]; + const end2: rt.u64 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Debug(start2, f), (f: rt.Formatter) => rt.u64Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$u8(table: rt.ByteSlice, at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.u8 | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.u8, rt.u8] = bounded$u8(table, at, out); + const a: rt.u8 = _6[0]; + const b: rt.u8 = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash8)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u8Step); + rt.rangeHash(rt.hash8)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.u8Step); + rt.rangeHash(rt.hash8)(_15, h2); + const _19: { end: rt.u8 } = { end: b }; + rt.rangeHash(rt.hash8)(_19, h2); + const _23: { end: rt.u8; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash8)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u8Step); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.u8 | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.u8 | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.u8, rt.u8] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.u8 = _54[0]; + const end: rt.u8 = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.u8Step), new rt.RangeInclusive(start, end, rt.u8Step), new rt.RangeInclusive(start, end, rt.u8Step)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash8), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u8Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u8(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u8(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u8Step); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u8Step); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u8Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(rt.byteSliceView(table)), (x: rt.u8): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash8)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u8 = _129[0]; + const end2: rt.u8 = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Debug(start2, f), (f: rt.Formatter) => rt.u8Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + +/** + * `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: + * from either end, by `next` past its last item, which wraps it at its type's end, and + * folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. + */ +export function stepped$usize(table: rt.usize[], at: rt.usize[], out: rt.ByteVec): void { + let _20!: rt.i32; + let read!: rt.usize | undefined; + const _7: (a0: (a0: rt.Hasher) => undefined) => Uint8Array = (value: (a0: rt.Hasher) => undefined): Uint8Array => { + const h: rt.Hasher = rt.hasher(); + value(h); + return rt.u64ToBeBytes(rt.hashFinish(h)).reverse(); + }; + const _6: [rt.usize, rt.usize] = bounded$usize(table, at, out); + const a: rt.usize = _6[0]; + const b: rt.usize = _6[1]; + const part2 = (h2: rt.Hasher): undefined => { + const _52: rt.Range = new rt.Range(a, b); + rt.rangeHash(rt.hash32)(_52, h2); + const _10: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.usizeStep); + rt.rangeHash(rt.hash32)(_10, h2); + const _15: rt.RangeFrom = new rt.RangeFrom(a, rt.usizeStep); + rt.rangeHash(rt.hash32)(_15, h2); + const _19: { end: rt.usize } = { end: b }; + rt.rangeHash(rt.hash32)(_19, h2); + const _23: { end: rt.usize; inclusive: true } = { end: b, inclusive: true }; + rt.rangeHash(rt.hash32)(_23, h2); + rt.hashNothing(undefined, h2); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part2)), undefined, true); + let iterStart: rt.i32 = 0; + const iterEnd: rt.i32 = 9; + while ((_20 = iterStart++) < iterEnd) { + const how: rt.i32 = _20; + const r: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.usizeStep); + const n: rt.usize = rt.usizeRem(at[0], 4); + if (how === 0) { + read = undefined; + } else if (how === 1) { + read = rt.iterToOption(r.next()); + } else if (how === 2) { + read = rt.iterToOption(r.nextBack()); + } else if (how === 3) { + read = rt.iterLast(rt.iterTake(rt.iterBorrow(r), 300)); + } else if (how === 4) { + read = rt.iterLast(rt.iterTake(rt.iterRev(rt.iterBorrow(r)), 300)); + } else if (how === 5) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_22: rt.i32): rt.usize | undefined => { + return rt.iterToOption(r.next()); + })); + } else if (how === 6) { + read = rt.iterLast(rt.iterMapWhile(new rt.Range(0, 300), (_2: rt.i32): rt.usize | undefined => { + return rt.iterToOption(r.nextBack()); + })); + } else if (how === 7) { + read = rt.iterNth(r, n); + } else { + read = rt.iterNthBack(r, n); + } + const _54: [rt.usize, rt.usize] = [rt.rangeInclusiveStart(r), rt.rangeInclusiveEnd(r)]; + const start: rt.usize = _54[0]; + const end: rt.usize = _54[1]; + const _62: rt.RangeInclusive[] = [new rt.RangeInclusive(a, b, rt.usizeStep), new rt.RangeInclusive(start, end, rt.usizeStep), new rt.RangeInclusive(start, end, rt.usizeStep)]; + const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.usizeDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); + rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$usize(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$usize(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); + const _98: boolean = rt.rangeInclusiveIsEmpty(r); + const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.usizeStep); + const _100: boolean = rt.rangeEq(rt.same)(r, _103); + const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.usizeStep); + const _106: boolean = rt.rangeEq(rt.same)(r, _109); + const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.usizeStep); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + return a0 ? 1 : 0; + })), undefined, true); + rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.usize): rt.u8 => { + return rt.rangeInclusiveContains(r, x) ? 1 : 0; + }), undefined, true); + const part3 = (h3: rt.Hasher): undefined => { + rt.rangeHash(rt.hash32)(r, h3); + }; + rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); + const _129: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(r); + const start2: rt.usize = _129[0]; + const end2: rt.usize = _129[1]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.usizeDebug(start2, f), (f: rt.Formatter) => rt.usizeDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + } +} + /** * std's comparisons of iterators, logging each item they read and each call of a `_by` * form's closure, which counts them in what it captures: against the data cut short, run diff --git a/ts/fixtures/lang/src/harness.rs b/ts/fixtures/lang/src/harness.rs index 9b871d946..47135539d 100644 --- a/ts/fixtures/lang/src/harness.rs +++ b/ts/fixtures/lang/src/harness.rs @@ -182,6 +182,7 @@ fn cases() -> Vec<(&'static str, Case)> { ("fmt::iters", |_, data, out| fmt::iters(data, out)), ("zeros::unread", zeros::unread), ("iters::range_froms", iters::range_froms), + ("iters::range_methods", iters::range_methods), ("clones::iters", clones::iters), ("collections::cell_eqs", collections::cell_eqs), ("iters::compares", iters::compares), diff --git a/ts/fixtures/lang/src/iters.rs b/ts/fixtures/lang/src/iters.rs index 1e5b952f5..462dcbdd9 100644 --- a/ts/fixtures/lang/src/iters.rs +++ b/ts/fixtures/lang/src/iters.rs @@ -1385,6 +1385,186 @@ fn overflowed(a: u8, data: &[u8], out: &mut Vec) { } } +/// The methods of each of std's range types over bounds `a` and `b` of the table `kind` +/// picks, at `data`'s first two bytes, against each of its values: integers of each +/// width at their ends and past 2^53 and 2^64, `char`s at either side of the surrogates, +/// floats with NaN and the zeros, and unsigned `NonZero`s. +pub fn range_methods(kind: u8, data: &[u8], out: &mut Vec) { + use std::num::NonZero; + let at = [0, 1].map(|i| usize::from(data.get(i).copied().unwrap_or(0))); + let past53 = (1 << 53) + 1; + let past64 = (1u128 << 64) + 1; + match kind % 19 { + 0 => stepped(&[0u8, 1, 2, 254, 255], at, out), + 1 => stepped(&[0u16, 1, 0x7fff, u16::MAX - 1, u16::MAX], at, out), + 2 => stepped(&[0u32, 1, 0x8000_0000, u32::MAX - 1, u32::MAX], at, out), + 3 => stepped( + &[0u64, 1, past53 - 2, past53 - 1, past53, u64::MAX - 1, u64::MAX], + at, + out, + ), + 4 => stepped( + &[0, 1, past64 - 2, past64 - 1, past64, u128::MAX - 1, u128::MAX], + at, + out, + ), + 5 => stepped(&[0usize, 1, 0x8000_0000, usize::MAX - 1, usize::MAX], at, out), + 6 => stepped(&[i8::MIN, i8::MIN + 1, -1, 0, i8::MAX], at, out), + 7 => stepped(&[i16::MIN, -1, 0, 1, i16::MAX - 1, i16::MAX], at, out), + 8 => stepped(&[i32::MIN, i32::MIN + 1, -1, 0, i32::MAX], at, out), + 9 => { + let past53 = past53 as i64; + stepped(&[i64::MIN, -past53, -1, 0, past53, i64::MAX - 1, i64::MAX], at, out) + } + 10 => { + let past64 = past64 as i128; + stepped(&[i128::MIN, i128::MIN + 1, -past64, -1, 0, past64, i128::MAX], at, out) + } + 11 => stepped(&[isize::MIN, -1, 0, 1, isize::MAX - 1, isize::MAX], at, out), + 12 => stepped( + &['\0', 'a', '\u{d7fe}', '\u{d7ff}', '\u{e000}', '\u{e001}', char::MAX], + at, + out, + ), + 13 => drop(bounded( + &[f64::NAN, f64::NEG_INFINITY, -1.5, -0.0, 0.0, 2.5, f64::INFINITY], + at, + out, + )), + 14 => drop(bounded( + &[f32::NAN, f32::NEG_INFINITY, -1.5, -0.0, 0.0, 2.5, f32::INFINITY], + at, + out, + )), + 15 => stepped(&[1, 2, 254, 255].map(|n| NonZero::::new(n).unwrap()), at, out), + 16 => stepped(&[1, past53, u64::MAX].map(|n| NonZero::new(n).unwrap()), at, out), + 17 => stepped(&[1, past64, u128::MAX].map(|n| NonZero::new(n).unwrap()), at, out), + _ => stepped(&[1, 2, usize::MAX].map(|n| NonZero::new(n).unwrap()), at, out), + } +} + +/// Each range type's comparisons of `a` and `b`, from `table`, against each of its +/// values, and their `Debug`. +fn bounded(table: &[T], at: [usize; 2], out: &mut Vec) -> (T, T) { + use std::ops::{Bound, RangeBounds}; + let [a, b] = at.map(|i| table[i % table.len()]); + out.extend([(a..b).is_empty(), (a..=b).is_empty()].map(u8::from)); + for x in table { + let held = [ + (a..b).contains(x), + (a..=b).contains(x), + (a..).contains(x), + (..b).contains(x), + (..=b).contains(x), + bounds_contain(a..b, x), + bounds_contain(a..=b, x), + bounds_contain(a.., x), + bounds_contain(..b, x), + bounds_contain(..=b, x), + bounds_contain(.., x), + (Bound::Excluded(a), Bound::Included(b)).contains(x), + (Bound::Unbounded, Bound::Excluded(b)).contains(x), + (a..b) == (*x..b), + (a..=b) == (a..=*x), + (a..) != (*x..), + (..b) == (..*x), + (..=b) != (..=*x), + ]; + out.extend(held.map(u8::from)); + } + let (start, end) = (a..=b).into_inner(); + let inclusive = a..=b; + let shown = format!( + "{:?} {:?} {:?} {:?} {:?} {:?} {:?} {:?}", + a..b, + inclusive, + a.., + ..b, + ..=b, + (start, end), + (inclusive.start(), inclusive.end()), + (.., (.., 1..2)), + ); + out.extend(shown.bytes()); + let (from, to, through) = (a.., ..b, ..=b); + let bounds = [ + inclusive.start_bound(), + inclusive.end_bound(), + from.start_bound(), + from.end_bound(), + to.end_bound(), + through.end_bound(), + ]; + out.extend(bounds.map(|bound| bound_of(table, bound))); + (a, b) +} + +/// Which kind of bound `bound` is, and where its value is in `table`. +fn bound_of(table: &[T], bound: std::ops::Bound<&T>) -> u8 { + use std::ops::Bound; + let at = |x: &T| table.iter().position(|y| y == x).map_or(0x3f, |i| i as u8); + match bound { + Bound::Included(x) => 0x40 | at(x), + Bound::Excluded(x) => 0x80 | at(x), + Bound::Unbounded => 0, + } +} + +/// `RangeBounds::contains`, through the trait. +fn bounds_contain(r: impl std::ops::RangeBounds, x: &T) -> bool { + r.contains(x) +} + +/// `bounded`'s, then an inclusive range of `a` and `b` read each way before its methods: +/// from either end, by `next` past its last item, which wraps it at its type's end, and +/// folded, which exhausts it at its end. Each is compared with fresh ranges and hashed. +fn stepped(table: &[T], at: [usize; 2], out: &mut Vec) +where + T: Copy + Eq + PartialOrd + fmt::Debug + std::hash::Hash, + std::ops::RangeInclusive: DoubleEndedIterator, +{ + use std::hash::{DefaultHasher, Hash, Hasher}; + use std::ops::RangeBounds; + let (a, b) = bounded(table, at, out); + let hash = |value: &dyn Fn(&mut DefaultHasher)| { + let mut h = DefaultHasher::new(); + value(&mut h); + h.finish().to_le_bytes() + }; + out.extend(hash(&|h| { + (a..b).hash(h); + (a..=b).hash(h); + (a..).hash(h); + (..b).hash(h); + (..=b).hash(h); + (..).hash(h); + })); + for how in 0..9 { + let mut r = a..=b; + let n = at[0] % 4; + let read = match how { + 0 => None, + 1 => r.next(), + 2 => r.next_back(), + 3 => r.by_ref().take(300).last(), + 4 => r.by_ref().rev().take(300).last(), + 5 => (0..300).map_while(|_| r.next()).last(), + 6 => (0..300).map_while(|_| r.next_back()).last(), + 7 => r.nth(n), + _ => r.nth_back(n), + }; + let (start, end) = (*r.start(), *r.end()); + let keyed = std::collections::HashSet::from([a..=b, start..=end, start..=end]); + out.extend(format!("{read:?} {r:?} {}", keyed.len()).bytes()); + out.extend([bound_of(table, r.start_bound()), bound_of(table, r.end_bound())]); + out.extend([r.is_empty(), r == (a..=b), r == (start..=end), r != (start..=end)].map(u8::from)); + out.extend(table.iter().map(|x| u8::from(r.contains(x)))); + out.extend(hash(&|h| r.hash(h))); + let (start, end) = r.into_inner(); + out.extend(format!("{start:?} {end:?}").bytes()); + } +} + /// std's comparisons of iterators, logging each item they read and each call of a `_by` /// form's closure, which counts them in what it captures: against the data cut short, run /// long, or changed at its end, by `kind >> 4`. Of two `TrustedLen` sides, whose `eq` reads diff --git a/ts/fixtures/reject/census.md b/ts/fixtures/reject/census.md index b1619fcd5..ad5c84a43 100644 --- a/ts/fixtures/reject/census.md +++ b/ts/fixtures/reject/census.md @@ -1,14 +1,14 @@ # Census of `reject-fixture` -- Refusals: 118 -- Function instances: 143 +- Refusals: 121 +- Function instances: 149 - Generic functions no instance reached, lowered over their type parameters: 10 ## By construct | Count | Construct | First | | ---: | --- | --- | -| 15 | unsupported call to `_` | fixtures/reject/src/lib.rs:124:11 | +| 18 | unsupported call to `_` | fixtures/reject/src/lib.rs:124:11 | | 12 | a raw pointer to `_` in `_`, which the crate may put another object in place of | fixtures/reject/src/lib.rs:628:10 | | 8 | a raw pointer to `_` in a variable assigned again while it may point there | fixtures/reject/src/lib.rs:636:10 | | 4 | `_` of a reference to an array of bytes it is generic over, which its mapping would take as the array, not as a slice of it | fixtures/reject/src/lib.rs:232:16 | @@ -101,6 +101,7 @@ The type or module each refused type or path belongs to. | 2 | `std::collections::HashMap` | fixtures/reject/src/lib.rs:271:6 | | 2 | `std::iter::Iterator` | fixtures/reject/src/lib.rs:232:16 | | 2 | `std::mem::MaybeUninit` | fixtures/reject/src/lib.rs:947:19 | +| 2 | `std::ops::Range` | fixtures/reject/src/lib.rs:172:8 | | 2 | `std::std` | fixtures/reject/src/lib.rs:587:11 | | 2 | `std::sync::Arc` | fixtures/reject/src/lib.rs:309:2 | | 2 | `std::sync::MutexGuard` | fixtures/reject/src/lib.rs:90:2 | @@ -140,7 +141,8 @@ The type or module each refused type or path belongs to. | 1 | `std::iter::Zip` | fixtures/reject/src/lib.rs:214:8 | | 1 | `std::net::AddrParseError` | fixtures/reject/src/lib.rs:451:32 | | 1 | `std::net::Ipv4Addr` | fixtures/reject/src/lib.rs:451:32 | -| 1 | `std::ops::Range` | fixtures/reject/src/lib.rs:172:8 | +| 1 | `std::ops::RangeFrom` | fixtures/reject/src/lib.rs:1014:32 | +| 1 | `std::ops::RangeTo` | fixtures/reject/src/lib.rs:1014:11 | | 1 | `std::option::Option` | fixtures/reject/src/lib.rs:387:2 | | 1 | `std::slice::IterMut` | fixtures/reject/src/lib.rs:786:15 | | 1 | `std::slice::Iter` | fixtures/reject/src/lib.rs:124:11 | @@ -233,6 +235,7 @@ The type or module each refused type or path belongs to. | 1 | union `_`, whose fields overlap in `_` and `f64`, which JS keeps apart | `Bits`, `u32` | fixtures/reject/src/lib.rs:602:1 | | 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:558:2 | | 1 | unsupported call to `_` | `::deref` | fixtures/reject/src/lib.rs:361:2 | +| 1 | unsupported call to `_` | `::contains` | fixtures/reject/src/lib.rs:1014:32 | | 1 | unsupported call to `_` | `::eq` | fixtures/reject/src/lib.rs:387:2 | | 1 | unsupported call to `_` | `::cycle` | fixtures/reject/src/lib.rs:124:11 | | 1 | unsupported call to `_` | `::is_sorted` | fixtures/reject/src/lib.rs:786:15 | @@ -240,6 +243,8 @@ The type or module each refused type or path belongs to. | 1 | unsupported call to `_` | `::hash` | fixtures/reject/src/lib.rs:319:10 | | 1 | unsupported call to `_` | `std::any::TypeId::of` | fixtures/reject/src/lib.rs:558:17 | | 1 | unsupported call to `_` | `std::ops::Range::contains` | fixtures/reject/src/lib.rs:172:8 | +| 1 | unsupported call to `_` | `std::ops::Range::is_empty` | fixtures/reject/src/lib.rs:1019:9 | +| 1 | unsupported call to `_` | `std::ops::RangeTo::contains` | fixtures/reject/src/lib.rs:1014:11 | | 1 | unsupported call to `_` | `std::std::Layout::new` | fixtures/reject/src/lib.rs:585:15 | | 1 | unsupported call to `_` | `std::std::alloc` | fixtures/reject/src/lib.rs:587:11 | | 1 | unsupported call to `_` | `std::std::dealloc` | fixtures/reject/src/lib.rs:590:3 | @@ -249,7 +254,7 @@ The type or module each refused type or path belongs to. ## Spans -
unsupported call to `_` (15) +
unsupported call to `_` (18) - fixtures/reject/src/lib.rs:124:11: unsupported call to ` as std::iter::Iterator>::cycle` - fixtures/reject/src/lib.rs:172:8: unsupported call to `std::ops::Range::::contains::` @@ -266,6 +271,9 @@ The type or module each refused type or path belongs to. - fixtures/reject/src/lib.rs:590:3: unsupported call to `std::alloc::dealloc` - fixtures/reject/src/lib.rs:786:15: unsupported call to ` as std::iter::Iterator>::is_sorted` - fixtures/reject/src/lib.rs:911:10: unsupported call to ` as std::clone::Clone>::clone_from` +- fixtures/reject/src/lib.rs:1014:11: unsupported call to `std::ops::RangeTo::::contains::` +- fixtures/reject/src/lib.rs:1014:32: unsupported call to ` as std::ops::RangeBounds>::contains::` +- fixtures/reject/src/lib.rs:1019:9: unsupported call to `std::ops::Range::<&mut u8>::is_empty`
diff --git a/ts/fixtures/reject/expected.txt b/ts/fixtures/reject/expected.txt index a7556f84b..779dc1574 100644 --- a/ts/fixtures/reject/expected.txt +++ b/ts/fixtures/reject/expected.txt @@ -27,6 +27,9 @@ an assignment through a reference to `std::pin::Pin>` at fixtures/reject/src/lib.rs:106:2 unsupported call to ` as std::iter::Iterator>::cycle` at fixtures/reject/src/lib.rs:124:11 unsupported call to `std::ops::Range::::contains::` at fixtures/reject/src/lib.rs:172:8 +unsupported call to `std::ops::RangeTo::::contains::` at fixtures/reject/src/lib.rs:1014:11 +unsupported call to ` as std::ops::RangeBounds>::contains::` at fixtures/reject/src/lib.rs:1014:32 +unsupported call to `std::ops::Range::<&mut u8>::is_empty` at fixtures/reject/src/lib.rs:1019:9 a `skip` of `std::iter::Zip, {closure@fixtures/reject/src/lib.rs:213:27: 213:31}>, std::iter::Map, {closure@fixtures/reject/src/lib.rs:213:59: 213:63}>>`, a zip std reads by index, of items that drop, which is not supported yet at fixtures/reject/src/lib.rs:214:8 a `collect` in place of `std::iter::Map, {closure@fixtures/reject/src/lib.rs:220:32: 220:40}>, std::ops::Range>, {closure@fixtures/reject/src/lib.rs:221:24: 221:32}>`, a zip std reads by index, holding values that drop, which is not supported yet at fixtures/reject/src/lib.rs:221:40 an assignment through a reference to `std::pin::Pin<&mut Noisy>` at fixtures/reject/src/lib.rs:226:2 diff --git a/ts/fixtures/reject/src/lib.rs b/ts/fixtures/reject/src/lib.rs index 3b675d0bb..a59af0657 100644 --- a/ts/fixtures/reject/src/lib.rs +++ b/ts/fixtures/reject/src/lib.rs @@ -984,3 +984,37 @@ impl Ord for Ranked { pub fn ranked_cells(entries: Vec<(std::cell::Cell, Noisy)>) -> usize { entries.into_iter().collect::>().len() } + +impl PartialEq for u8 { + fn eq(&self, other: &Key) -> bool { + *self == other.0 + } +} + +impl PartialEq for Key { + fn eq(&self, other: &u8) -> bool { + self.0 == *other + } +} + +impl PartialOrd for u8 { + fn partial_cmp(&self, other: &Key) -> Option { + self.partial_cmp(&other.0) + } +} + +impl PartialOrd for Key { + fn partial_cmp(&self, other: &u8) -> Option { + self.0.partial_cmp(other) + } +} + +/// Integer bounds against the crate's item, which compares by its own `PartialOrd`. +pub fn keyed_across(n: u8) -> bool { + (..10u8).contains(&Key(n)) || std::ops::RangeBounds::contains(&(1u8..), &Key(n)) +} + +/// Bounds behind `&mut`s, which JS may keep as places rather than the integers. +pub fn place_bounds(a: &mut u8, b: &mut u8) -> bool { + (a..b).is_empty() +} diff --git a/ts/fixtures/reject/ts.toml b/ts/fixtures/reject/ts.toml index a05f8bf6f..3517c70d9 100644 --- a/ts/fixtures/reject/ts.toml +++ b/ts/fixtures/reject/ts.toml @@ -23,6 +23,8 @@ roots = [ "folds", "backs", "keyed", + "keyed_across", + "place_bounds", "hinted", "fused", "skipped_zip", diff --git a/ts/runtime/rt/int.ts b/ts/runtime/rt/int.ts index 7dc7d322d..2905e6b41 100644 --- a/ts/runtime/rt/int.ts +++ b/ts/runtime/rt/int.ts @@ -69,6 +69,18 @@ export type i128 = Num<"i128"> | I128Limbs; */ export type Step = (n: T, by: number) => [T, boolean]; +/** + * `NonZero`'s `Step` of an unsigned `T`'s, `int`: within 1 and `max`, past which it + * stops at that end where `T`'s wraps. + */ +export function nonZeroStep(int: Step, max: T): Step { + return (n, by) => { + const [v, over] = int(n, by); + if (over || v === 0) return [by > 0 ? max : (1 as T), true]; + return [v, false]; + }; +} + /** `core::num::TryFromIntError`: which way the value was out of range. */ export type TryFromIntError = { readonly kind: "PosOverflow" | "NegOverflow" }; diff --git a/ts/runtime/rt/iter.ts b/ts/runtime/rt/iter.ts index 99c0b1d40..635038542 100644 --- a/ts/runtime/rt/iter.ts +++ b/ts/runtime/rt/iter.ts @@ -24,6 +24,7 @@ import { ByteSlice, ByteVec, byteVecPush, Err, type None, Ok, type Place, panic, place, type RangeBound, type Result, sliceView } from "../rt.ts"; import { AtIndex, BTreeIter, HashIter, type Ordering } from "./collections.ts"; +import { type Hasher, hash8 } from "./hash.ts"; import { charStep, intToBig, type Limbs, lt as wideLt, type Step } from "./int.ts"; import { drop as dispose, dropRange } from "./task.ts"; @@ -3428,12 +3429,18 @@ class OptionShunt extends Adaptor { } } -/** `a < b` of two integers of one type, or two booleans. */ +/** `a < b` of two integers, `char`s, or floats of one type, or two booleans. */ function lt(a: T, b: T): boolean { if (typeof a === "object" || typeof b === "object") return wideLt(a as number | Limbs, b as number | Limbs); return (a as number) < (b as number); } +/** `a <= b` of two of what `lt` compares: never of a NaN. */ +function le(a: T, b: T): boolean { + if (typeof a === "object" || typeof b === "object") return !wideLt(b as number | Limbs, a as number | Limbs); + return (a as number) <= (b as number); +} + /** * `n + by` in the integer type `int` steps, or `undefined` past its range, which a range * stepping past its end only needs to stay past. A narrow integer's sum is an exact @@ -3529,9 +3536,9 @@ export function rangeIsEmpty(r: Range): boolean { return !lt(r.start, r.end); } -/** `Range::contains`. */ +/** `Range::contains`: `start <= item < end`, so nothing past a NaN. */ export function rangeContains(r: Range, item: T): boolean { - return !lt(item, r.start) && lt(item, r.end); + return le(r.start, item) && lt(item, r.end); } /** @@ -3571,6 +3578,22 @@ export class RangeFrom extends Iter { } } +/** `RangeFrom::contains`. */ +export function rangeFromContains(r: RangeFrom, item: T): boolean { + return le(r.start, item); +} + +/** `RangeTo::contains` and `RangeToInclusive::contains`. */ +export function rangeToContains(r: { readonly end: T; readonly inclusive?: true }, item: T): boolean { + return r.inclusive ? le(item, r.end) : lt(item, r.end); +} + +/** `RangeBounds::contains` of a pair of `Bound`s. */ +export function boundsContains([start, end]: readonly [RangeBound, RangeBound], item: T): boolean { + const above = start.tag === "Unbounded" || (start.tag === "Included" ? le(start._0, item) : lt(start._0, item)); + return above && (end.tag === "Unbounded" || (end.tag === "Included" ? le(item, end._0) : lt(item, end._0))); +} + /** std's `Step::forward` in a debug build: `n + by`, panicking past `int`'s last value. */ function forward(n: T, by: number, int: Step | undefined): T { if (int === undefined) throw new Error("rust2-ts: stepping a range of no integer type"); @@ -3695,15 +3718,56 @@ export function rangeInclusiveEnd(r: RangeInclusive): T { return r.hi; } -/** `RangeInclusive::is_empty`. */ +/** `RangeInclusive::into_inner`: its bounds as they are, even exhausted. */ +export function rangeInclusiveIntoInner(r: RangeInclusive): [T, T] { + return [r.lo, r.hi]; +} + +/** `RangeInclusive::is_empty`: exhausted, or not `start <= end`, as of a NaN. */ export function rangeInclusiveIsEmpty(r: RangeInclusive): boolean { - return r.exhausted || lt(r.hi, r.lo); + return r.exhausted || !le(r.lo, r.hi); } /** `RangeInclusive::contains`. */ export function rangeInclusiveContains(r: RangeInclusive, item: T): boolean { // Exhausted, it may have wrapped past its end, and contains nothing, as std's bounds say. - return !r.exhausted && !lt(item, r.lo) && !lt(r.hi, item); + return !r.exhausted && le(r.lo, item) && le(item, r.hi); +} + +/** What `==` and `Hash` read of any of std's ranges that holds a bound, whatever steps it. */ +type Bounded = + | { readonly lo: T; readonly hi: T; readonly exhausted: boolean } + | { readonly start: T; readonly end: T } + | { readonly start: T } + | { readonly end: T }; + +/** + * `PartialEq::eq` of std's ranges of one kind, from their bounds' `eq`: each bound's, then + * whether an inclusive one is exhausted, as std's derived one compares its fields. + */ +export function rangeEq(eq: (a: T, b: T) => boolean): (a: Bounded, b: Bounded) => boolean { + return (a, b) => { + if ("exhausted" in a) { + const c = b as typeof a; + return eq(a.lo, c.lo) && eq(a.hi, c.hi) && a.exhausted === c.exhausted; + } + const c = b as { readonly start: T; readonly end: T }; + return (!("start" in a) || eq(a.start, c.start)) && (!("end" in a) || eq(a.end, c.end)); + }; +} + +/** `Hash::hash` of std's ranges, from their bounds': each bound's, then whether an inclusive one is exhausted. */ +export function rangeHash(hash: (value: T, s: Hasher) => void): (value: Bounded, s: Hasher) => void { + return (r, s) => { + if ("exhausted" in r) { + hash(r.lo, s); + hash(r.hi, s); + hash8(r.exhausted, s); + return; + } + if ("start" in r) hash(r.start, s); + if ("end" in r) hash(r.end, s); + }; } /** `RangeInclusive::start_bound`: its start, included. */ diff --git a/ts/src/lower/collections.rs b/ts/src/lower/collections.rs index 266530681..98b19c7d0 100644 --- a/ts/src/lower/collections.rs +++ b/ts/src/lower/collections.rs @@ -1591,6 +1591,7 @@ fn std_key<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool { ty::Adt(..) if let Some(inner) = option_of(b, ty).or_else(|| arc_of(b, ty)).or_else(|| reverse_of(b, ty)) => { held(inner) } + ty::Adt(..) if let Some(bound) = range_of(b, ty) => held(bound), ty::Adt(..) if let Some((inner, _)) = cell_of(b, ty) => held(inner), // Whose derived `PartialEq` lowers from its MIR. ty::Adt(_, args) if b.t.std_of(ty) == Some(Std::Result) => args.types().all(held), @@ -1605,6 +1606,15 @@ fn option_of<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> Option> { (b.t.std_of(ty) == Some(Std::Option)).then(|| arg(ty, 0)) } +/// What `ty`'s bounds are if it is one of std's ranges that holds any. +fn range_of<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> Option> { + let range = matches!( + b.t.std_of(ty), + Some(Std::Range | Std::RangeInclusive | Std::RangeFrom | Std::RangeTo | Std::RangeToInclusive) + ); + range.then(|| arg(ty, 0)) +} + /// What `ty` holds if it is a `Reverse`. fn reverse_of<'tcx>(b: &Body<'_, '_, 'tcx>, ty: Ty<'tcx>) -> Option> { (b.t.std_of(ty) == Some(Std::Reverse)).then(|| arg(ty, 0)) @@ -1827,6 +1837,7 @@ pub fn eq_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, span: Span) -> Expr eq => Expr::rt("eqOption", [eq].into_iter().chain(b.t.none_arg(inner)).collect()), }, ty::Adt(..) if let Some(inner) = reverse_of(b, ty) => eq_fn(b, inner, span), + ty::Adt(..) if let Some(bound) = range_of(b, ty) => Expr::rt("rangeEq", vec![eq_fn(b, bound, span)]), // A slice compares its elements by `!=`. _ if let Some(elem) = elements_of(b, ty) => Expr::rt("eqSlice", vec![not_ne_fn(b, elem, span)]), _ if bytes(b, ty) => Expr::Rt("eqBytes".into()), @@ -2053,6 +2064,9 @@ fn hash_fn<'tcx>(b: &mut Body<'_, '_, 'tcx>, ty: Ty<'tcx>, hasher: Ty<'tcx>, spa } ty::Adt(..) if let Some(inner) = arc_of(b, ty) => Expr::rt("hashArc", vec![hash_fn(b, inner, hasher, span)]), ty::Adt(..) if let Some(inner) = reverse_of(b, ty) => hash_fn(b, inner, hasher, span), + ty::Adt(..) if let Some(bound) = range_of(b, ty) => { + Expr::rt("rangeHash", vec![hash_fn(b, bound, hasher, span)]) + } _ if let Some(elem) = elements_of(b, ty) => { if own_hash_slice(b, elem, hasher) { let msg = diff --git a/ts/src/lower/consts.rs b/ts/src/lower/consts.rs index 656b21a2d..85e7bbfd6 100644 --- a/ts/src/lower/consts.rs +++ b/ts/src/lower/consts.rs @@ -134,7 +134,7 @@ impl<'b, 'a, 'tcx> Body<'b, 'a, 'tcx> { if values.len() == 3 && matches!(&values[2], Expr::Lit(l) if l == "false") => { values.pop(); - values.extend(super::library::range_step(args.type_at(0), true)); + values.extend(super::library::range_step(tcx, args.type_at(0), true)); Expr::New(Box::new(Expr::Rt("RangeInclusive".into())), values) } (Std::Ordering, _) => super::collections::ordering_variant(variant), @@ -147,9 +147,13 @@ impl<'b, 'a, 'tcx> Body<'b, 'a, 'tcx> { super::library::range_to(values.pop().unwrap(), std == Std::RangeToInclusive) } (Std::RangeFrom, _) => { - values.extend(super::library::range_step(args.type_at(0), true)); + values.extend(super::library::range_step(tcx, args.type_at(0), true)); Expr::New(Box::new(Expr::Rt("RangeFrom".into())), values) } + (Std::Range, _) => { + values.extend(super::library::range_step(tcx, args.type_at(0), false)); + Expr::New(Box::new(Expr::Rt("Range".into())), values) + } (Std::RangeFull, _) => Expr::undefined(), (Std::ParseIntError, _) => { Expr::Object(vec![(Key::Name("kind".into()), values.pop().unwrap())]) diff --git a/ts/src/lower/library.rs b/ts/src/lower/library.rs index ac262a110..901d19bb0 100644 --- a/ts/src/lower/library.rs +++ b/ts/src/lower/library.rs @@ -1428,16 +1428,32 @@ fn mapping<'tcx>( // An integer range wraps within its type's bounds where std's `nth` does. ("RangeInclusive", "new") if range => { let mut values = args; - values.extend(self_ty().and_then(|t| range_step(t, true))); + values.extend(self_ty().and_then(|t| range_step(tcx, t, true))); Expr::New(Box::new(Expr::Rt("RangeInclusive".into())), values) } - // JS compares integers as Rust does, and other endpoints by identity. - ("Range" | "RangeInclusive", "start" | "end" | "is_empty" | "contains") - if range && (matches!(name.as_str(), "start" | "end") || self_ty().and_then(Int::of).is_some()) => - { + ("Range" | "RangeInclusive", "start" | "end") | ("RangeInclusive", "into_inner") if range => { let of = range_of(inherent_std(tcx, call.def_id)?)?; Expr::rt_of(of, &super::camel(&name)).call(args) } + // Of bounds JS compares as Rust does, by `<` and `<=`, against an item of their type. + ("Range" | "RangeInclusive", "is_empty") | (_, "contains") + if let Some(of) = inherent_std(tcx, call.def_id).and_then(range_of) + && let Some(bound) = compared(tcx, targ(gargs, 0)) + && (name == "is_empty" || compared(tcx, targ(gargs, 1)) == Some(bound)) => + { + Expr::rt_of(of, &super::camel(&name)).call(args) + } + ("RangeBounds", "contains") + if compared(tcx, targ(gargs, 1)).is_some_and(|bound| compared(tcx, targ(gargs, 2)) == Some(bound)) => + { + let range = targ(gargs, 0).peel_refs(); + match b.t.std_of(range) { + Some(Std::RangeFull) => Expr::lit("true"), + Some(std) => Expr::rt_of(range_of(std)?, "contains").call(args), + None if super::collections::plain_bounds(b.t, range) => Expr::rt("boundsContains", args), + None => return None, + } + } // A `NonZero` is its integer. ("NonZero", "get") => args.pop()?, @@ -2238,14 +2254,24 @@ fn range_of(std: Std) -> Option<&'static str> { match std { Std::Range => Some("range"), Std::RangeInclusive => Some("rangeInclusive"), + Std::RangeFrom => Some("rangeFrom"), + Std::RangeTo | Std::RangeToInclusive => Some("rangeTo"), _ => None, } } -/// The `Step` a range of `ty`s is made with: a `char`'s, which skips the surrogates, and a -/// wide integer's, which steps past 2^53, or any integer's where `every` integer needs it to +/// The `Step` a range of `ty`s is made with: a `char`'s, which skips the surrogates, an +/// unsigned `NonZero`'s, which stops at either end where its integer's wraps, and a wide +/// integer's, which steps past 2^53, or any integer's where `every` integer needs it to /// step within its type. -pub fn range_step(ty: Ty<'_>, every: bool) -> Option { +pub fn range_step<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, every: bool) -> Option { + if let ty::Adt(adt, args) = ty.kind() + && Std::of(tcx, adt.did()) == Some(Std::NonZero) + { + let int = Int::of(args.type_at(0)).filter(|int| !int.signed)?; + let step = vec![int.func("step"), int.lit(int.max() as i128)]; + return (every || int.big()).then(|| Expr::rt("nonZeroStep", step)); + } match Int::of(ty) { Some(int) => (every || int.big()).then(|| int.func("step")), None => ty.is_char().then(|| Expr::Rt("charStep".into())), @@ -2280,6 +2306,16 @@ fn unwrapped<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { } } +/// The primitive JS compares a range's bounds of type `ty` as, through shared references +/// and a `NonZero`: not through a `&mut`, which may be an `rt.Place`. +fn compared<'tcx>(tcx: TyCtxt<'tcx>, mut ty: Ty<'tcx>) -> Option> { + while let ty::Ref(_, inner, ty::Mutability::Not) = ty.kind() { + ty = *inner; + } + let ty = (!ty.is_ref()).then(|| unwrapped(tcx, ty))?; + primitive(ty).then_some(ty) +} + fn primitive(ty: Ty<'_>) -> bool { matches!(ty.kind(), ty::Bool | ty::Int(_) | ty::Uint(_) | ty::Char) || super::float::is(ty) } diff --git a/ts/src/lower/mir/rvalue.rs b/ts/src/lower/mir/rvalue.rs index 67b2cb521..88cd07f15 100644 --- a/ts/src/lower/mir/rvalue.rs +++ b/ts/src/lower/mir/rvalue.rs @@ -586,7 +586,7 @@ impl<'m, 'b, 'a, 'tcx> Fx<'m, 'b, 'a, 'tcx> { crate::lower::library::tagged(def.name.as_str(), values.pop(), ts_ty) } (Std::RangeFrom, _) => { - values.extend(crate::lower::library::range_step(args.type_at(0), true)); + values.extend(crate::lower::library::range_step(tcx, args.type_at(0), true)); Expr::New(Box::new(Expr::Rt("RangeFrom".into())), values) } (Std::RangeFull, _) => Expr::undefined(), @@ -596,7 +596,7 @@ impl<'m, 'b, 'a, 'tcx> Fx<'m, 'b, 'a, 'tcx> { (Std::AtomicOrdering, _) => crate::lower::task::atomic_ordering(variant), (Std::ControlFlow, _) => super::call::control_flow(self, ty, variant, values), (Std::Range, _) => { - values.extend(crate::lower::library::range_step(args.type_at(0), false)); + values.extend(crate::lower::library::range_step(tcx, args.type_at(0), false)); Expr::New(Box::new(Expr::Rt("Range".into())), values) } (Std::AssertKind, _) => match def.name.as_str() {