import { __exports as o } from "../../../../../../_virtual/_u64.js";
var x;
function O() {
  if (x) return o;
  x = 1, Object.defineProperty(o, "__esModule", { value: !0 }), o.add5L = o.add5H = o.add4H = o.add4L = o.add3H = o.add3L = o.rotlBL = o.rotlBH = o.rotlSL = o.rotlSH = o.rotr32L = o.rotr32H = o.rotrBL = o.rotrBH = o.rotrSL = o.rotrSH = o.shrSL = o.shrSH = o.toBig = void 0, o.fromBig = c, o.split = H, o.add = I;
  const a = /* @__PURE__ */ BigInt(2 ** 32 - 1), l = /* @__PURE__ */ BigInt(32);
  function c(r, n = !1) {
    return n ? { h: Number(r & a), l: Number(r >> l & a) } : { h: Number(r >> l & a) | 0, l: Number(r & a) | 0 };
  }
  function H(r, n = !1) {
    let t = new Uint32Array(r.length), d = new Uint32Array(r.length);
    for (let e = 0; e < r.length; e++) {
      const { h: s, l: j } = c(r[e], n);
      [t[e], d[e]] = [s, j];
    }
    return [t, d];
  }
  const L = (r, n) => BigInt(r >>> 0) << l | BigInt(n >>> 0);
  o.toBig = L;
  const i = (r, n, t) => r >>> t;
  o.shrSH = i;
  const u = (r, n, t) => r << 32 - t | n >>> t;
  o.shrSL = u;
  const B = (r, n, t) => r >>> t | n << 32 - t;
  o.rotrSH = B;
  const S = (r, n, t) => r << 32 - t | n >>> t;
  o.rotrSL = S;
  const h = (r, n, t) => r << 64 - t | n >>> t - 32;
  o.rotrBH = h;
  const f = (r, n, t) => r >>> t - 32 | n << 64 - t;
  o.rotrBL = f;
  const _ = (r, n) => n;
  o.rotr32H = _;
  const g = (r, n) => r;
  o.rotr32L = g;
  const m = (r, n, t) => r << t | n >>> 32 - t;
  o.rotlSH = m;
  const p = (r, n, t) => n << t | r >>> 32 - t;
  o.rotlSL = p;
  const b = (r, n, t) => n << t - 32 | r >>> 64 - t;
  o.rotlBH = b;
  const A = (r, n, t) => r << t - 32 | n >>> 64 - t;
  o.rotlBL = A;
  function I(r, n, t, d) {
    const e = (n >>> 0) + (d >>> 0);
    return { h: r + t + (e / 2 ** 32 | 0) | 0, l: e | 0 };
  }
  const N = (r, n, t) => (r >>> 0) + (n >>> 0) + (t >>> 0);
  o.add3L = N;
  const q = (r, n, t, d) => n + t + d + (r / 2 ** 32 | 0) | 0;
  o.add3H = q;
  const v = (r, n, t, d) => (r >>> 0) + (n >>> 0) + (t >>> 0) + (d >>> 0);
  o.add4L = v;
  const y = (r, n, t, d, e) => n + t + d + e + (r / 2 ** 32 | 0) | 0;
  o.add4H = y;
  const U = (r, n, t, d, e) => (r >>> 0) + (n >>> 0) + (t >>> 0) + (d >>> 0) + (e >>> 0);
  o.add5L = U;
  const w = (r, n, t, d, e, s) => n + t + d + e + s + (r / 2 ** 32 | 0) | 0;
  o.add5H = w;
  const M = {
    fromBig: c,
    split: H,
    toBig: L,
    shrSH: i,
    shrSL: u,
    rotrSH: B,
    rotrSL: S,
    rotrBH: h,
    rotrBL: f,
    rotr32H: _,
    rotr32L: g,
    rotlSH: m,
    rotlSL: p,
    rotlBH: b,
    rotlBL: A,
    add: I,
    add3L: N,
    add3H: q,
    add4L: v,
    add4H: y,
    add5H: w,
    add5L: U
  };
  return o.default = M, o;
}
export {
  O as __require
};
//# sourceMappingURL=_u64.js.map
