<commit_before>define(function() {
  
  // The advice is, never add to standard object prototypes. Why is that?
  // Well, it's because some other code somewhere might also want to add to it too.
  // No fair. Why does that OTHER code get to have all the fun?
  
  // (Let's get this proof-of-concept working first. If you want, we can worry about being a good neighbor later.)

  'use strict';
  
  var mattress = {};
  
  var tempBuffer = new ArrayBuffer(8);
  var tempFloat32 = new Float32Array(tempBuffer);
  var tempFloat64 = new Float64Array(tempBuffer);
  var tempInt32 = new Int32Array(tempBuffer);
  
  var MAX_INTEGER_AS_DOUBLE = Math.pow(2, 53);
  
  function retThis(){ return this; }
  function retValue(){ return this.value; }
  function retNumber(){ return +this.value; }
  function retString(){ return ''+this.value; }
  function retBoolean(){ return !!this.value; }
  function retInt8(){ return this.value << 24 >> 24; }
  function retInt16(){ return this.value << 16 >> 16; }
  function retInt32(){ return this.value | 0; }
  function retInt64(){ return Math.floor(this.value); }
  function retUint8(){ return this.value & 0xff; }
  function retUint16(){ return this.value & 0xffff; }
  function retUint32(){ return this.value >>> 0; }
  function retUint64() {
    var v = Math.floor(this.value);
    if (v >= 0) return v;
    v = -v;
    var lo = v | 0;
    var hi = (v / 0x100000000) | 0;
    if (lo === 0) {
      return new BoxedUint64(-hi, 0);
    }
    else {
      return new BoxedUint64(~hi, -lo);
    }
  }
  function retFloat32() {
    tempFloat32[0] = this.value;
    return tempFloat32[0];
  }
  function retFloat64(){ return +this.value; } 
  function retBoxedBoolean(){ return new BoxedBoolean(this.value); }
  function retBoxedInt8(){ return new BoxedInt8(this.value); }
  function retBoxedInt16(){ return new BoxedInt16(this.value); }
  function retBoxedInt32(){ return new BoxedInt32(this.value); }
  function retBoxedInt64(){
    var v = this.value;
    return new BoxedInt64(v < 0 ? -1 : v, v | 0);
  }
  function retBoxedUint8(){ return new BoxedUint8(this.value); }
  function retBoxedUint16(){ return new BoxedUint16(this.value); }
  function retBoxedUint32(){ return new BoxedUint32(this.value); }
  function retBoxedUint64(){
    var v = this.value;
    return new BoxedUint64(v < 0 ? -1 : v, v | 0);
  }
  function retBoxedFloat32(){ return new BoxedFloat32(this.value); }
  function retBoxedFloat64(){ return new BoxedFloat64(this.value); }
  function badSet(){ throw new Error('cannot set unboxed value'); }
  
  function imul32(a, b) {
    if (a < b) return imul32(b, a);
    var result = 0;
    while (b !== 0) {
      if (b & 1) result = (result + a) | 0;
      a <<= 1;
      b >>>= 1;
    }
    return result;
  }
  mattress.i32_mul = imul32;
  mattress.u32_mul = function(a, b) {
    return imul32(a, b) >>> 0;
  };
  
  function udivmod64(dividend, divisor, returnMod) {
    // based on code from the Bit Mathematics Cookbook by <NAME>
    // <http://bisqwit.iki.fi/story/howto/bitmath/>
    if (divisor.eq64(0)) throw new Error('division by zero');
    var remain = dividend, scaled_divisor = divisor;
    var result = 0, multiple = 1;
    while (scaled_divisor.lt64(dividend)) {
      scaled_divisor = scaled_divisor.u64_lshift(1);
      multiple = multiple.u64_lshift(1);
    }
    do {
      if (remain.gte64(scaled_divisor)) {
        remain = remain.u64_sub(scaled_divisor);
        result = result.u64_add(multiple);
      }
      scaled_divisor = scaled_divisor.u64_rshift(1);
      multiple = multiple.u64_rshift(1);
    } while (multiple.neq64(0));
    return returnMod ? remain : result;
  }
  
  function idivmod64(dividend, divisor, returnMod) {
    var sign = false;
    if (dividend.lt64(0)) {
      sign = !sign;
      dividend = dividend.i64_negate().asUint64;
    }
    if (divisor.lt64(0)) {
      sign = !sign;
      divisor = divisor.i64_negate().asUint64;
    }
    var result = udivmod64(dividend, divisor, returnMod);
    return sign ? result.i64_negate() : result;
  }
  
  function hashString(str) {
    var i_max = str.length;
    var hash = 0x6053b7f7 ^ i_max;
    var i_step = Math.max(1, (32 / i_max) | 0);
    for (var i = 0; i < i_max; i += i_step) {
      hash = (hash >>> 3) | ((hash & 7) << 29);
      hash ^= str.charCodeAt(i);
    }
    return hash;
  }
  mattress.hashString = hashString;
  
  var HASH_PROP = mattress.HASH_PROP = Symbol('hash');
  
  var hashStore = new WeakMap();
  
  function hashValue(v) {
    switch (typeof v) {
      case 'undefined': return 0;
      case 'object':
        if (v === null) return 0;
        if (HASH_PROP in v) return v[HASH_PROP];
        var hash = hashStore.get(v);
        if (typeof hash === 'undefined') {
          hashStore.set(v, hash = (Math.random() * 0xffffffff) | 0);
        }
        return hash;
      default: return hashString('' + v);
    }
  }
  mattress.hashValue = hashValue;
  
  function hashList(array, inAnyOrder, hash) {
    if (typeof inAnyOrder === 'number' && arguments.length === 2) {
      hash = inAnyOrder;
      inAnyOrder = false;
    }
    if (isNaN(hash)) hash = 0x86b27112;
    if (inAnyOrder) {
      // quirk: if the same value appears an odd number of times,
      //  it's the same as appearing once. if it appears an even
      //  number of times, it's the same as never appearing at all.
      for (var i = 0; i < array.length; i++) {
        hash ^= hashValue(array[i]);
      }
    }
    else {
      for (var i = 0; i < array.length; i++) {
        hash = ((hash << 31) | (hash >>> 1)) ^ hashValue(array[i]);
      }
    }
    return hash;
  }
  mattress.hashList = hashList;
    
  function Boxed() {
  }
  Boxed.prototype = {
    toString: function(radix) {
      return this.value.toString(radix);
    },
    toJSON: function() {
      return this.value;
    },
    i64_negate: function() {
      return -this.value;
    },
    i64_bnot: function() {
      return this.asBoxedInt64.i64_bnot();
    },
    u64_bnot: function() {
      return this.value.u64_bnot();
    },
    i64_bxor: function(other) {
      return this.asBoxedInt64.i64_bxor(other);
    },
    u64_bxor: function(other) {
      return this.asBoxedUint64.u64_bxor(other);
    },
    i64_band: function(other) {
      return this.asBoxedInt64.i64_band(other);
    },
    u64_band: function(other) {
      return this.asBoxedUint64.u64_band(other);
    },
    i64_bor: function(other) {
      return this.asBoxedInt64.i64_bor(other);
    },
    u64_bor: function(other) {
      return this.asBoxedUint64.u64_bor(other);
    },
    i64_lshift: function(count) {
      return this.asBoxedInt64.i64_lshift(count);
    },
    u64_lshift: function(count) {
      return this.asBoxedUint64.u64_lshift(count);
    },
    i64_arshift: function(count) {
      return this.asBoxedInt64.i64_arshift(count);
    },
    u64_rshift: function(count) {
      return this.asBoxedUint64.u64_rshift(count);
    },
    eq64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return +this.value === +other;
      return other.eq64(this);
    },
    neq64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return +this.value !== +other;
      return !other.eq64(this);
    },
    lt64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value < other;
      return !other.lte64(this);
    },
    lte64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value <= other;
      return !other.lt64(this);
    },
    gt64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value > other;
      return other.lte64(this);
    },
    gte64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value >= other;
      return other.lt64(this);
    },
    i64_add: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value + other;
      return other.i64_add(this);
    },
    u64_add: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return (this.value + other).asUint64;
      return other.u64_add(this);
    },
    i64_sub: function(subtraction) {
      subtraction = subtraction.i64_negate();
      if (typeof subtraction === 'number') return this.value + subtraction;
      return subtraction.i64_add(this);
    },
    u64_sub: function(subtraction) {
      subtraction = subtraction.i64_negate();
      if (typeof subtraction === 'number') return this.value + subtraction;
      return subtraction.u64_add(this);
    },
    i32_mul: function(factor) {
      return imul32(this.asInt32, factor.asInt32);
    },
    u32_mul: function(factor) {
      return imul32(this.asInt32, factor.asInt32) >>> 0;
    },
    i64_div: function(divisor) {
      return this.asBoxedInt64.i64_div(divisor);
    },
    u64_div: function(divisor) {
      return this.asBoxedInt64.u64_div(divisor);
    },
    i64_mod: function(divisor) {
      return this.asBoxedInt64.i64_mod(divisor);
    },
    u64_mod: function(divisor) {
      return this.asBoxedInt64.u64_mod(divisor);
    },
  };
  Object.defineProperties(Boxed.prototype, {
    normalized: {get: retValue},
    asBoolean: {get: retBoolean},
    asInt8: {get: retInt8},
    asInt16: {get: retInt16},
    asInt32: {get: retInt32},
    asInt64: {get: retInt64},
    asUint8: {get: retUint8},
    asUint16: {get: retUint16},
    asUint32: {get: retUint32},
    asUint64: {get: retUint64},
    asFloat32: {get: retValue},
    asFloat64: {get: retValue},
    asBoxedBoolean: {get: retBoxedBoolean},
    asBoxedInt8: {get: retBoxedInt8},
    asBoxedInt16: {get: retBoxedInt16},
    asBoxedInt32: {get: retBoxedInt32},
    asBoxedInt64: {get: retBoxedInt64},
    asBoxedUint8: {get: retBoxedUint8},
    asBoxedUint16: {get: retBoxedUint16},
    asBoxedUint32: {get: retBoxedUint32},
    asBoxedUint64: {get: retBoxedUint64},
    asBoxedFloat32: {get: retBoxedFloat32},
    asBoxedFloat64: {get: retBoxedFloat64},
  });
  
  function BoxedBoolean(value) { this.value = value.asBoolean; }
  function BoxedInt8(value) { this.value = value.asInt8; }
  function BoxedInt16(value) { this.value = value.asInt16; }
  function BoxedInt32(value) { this.value = value.asInt32; }
  function BoxedUint8(value) { this.value = value.asUint8; }
  function BoxedUint16(value) { this.value = value.asUint16; }
  function BoxedUint32(value) { this.value = value.asUint32; }
  function BoxedFloat32(value) { this.value = value.asFloat32; }
  function BoxedFloat64(value) { this.value = value.asFloat64; }
  
  [BoxedBoolean,
    BoxedInt8, BoxedInt16, BoxedInt32,
    BoxedUint8, BoxedUint16, BoxedUint32,
    BoxedFloat32, BoxedFloat64]
  .forEach(function(T) {
    T.prototype = new Boxed;
  });
  
  BoxedBoolean.prototype.set = function(value) { return this.value = value.asBoolean; }
  BoxedInt8.prototype.set = function(value) { return this.value = value.asInt8; }
  BoxedInt16.prototype.set = function(value) { return this.value = value.asInt16; }
  BoxedInt32.prototype.set = function(value) { return this.value = value.asInt32; }
  BoxedUint8.prototype.set = function(value) { return this.value = value.asUint8; }
  BoxedUint16.prototype.set = function(value) { return this.value = value.asUint16; }
  BoxedUint32.prototype.set = function(value) { return this.value = value.asUint32; }
  BoxedFloat32.prototype.set = function(value) { return this.value = value.asFloat32; }
  BoxedFloat64.prototype.set = function(value) { return this.value = value.asFloat64; }
  
  BoxedBoolean.prototype.set_add = function(value) { return this.value = !!(this.value + value.asBoolean); }
  BoxedInt8.prototype.set_add = function(value) { return this.value = (this.value + value.asInt8) << 24 >> 24; }
  BoxedInt16.prototype.set_add = function(value) { return this.value = (this.value + value.asInt16) << 16 >> 16; }
  BoxedInt32.prototype.set_add = function(value) { return this.value = (this.value + value.asInt32) | 0; }
  BoxedUint8.prototype.set_add = function(value) { return this.value = (this.value + value.asUint8) & 0xff; }
  BoxedUint16.prototype.set_add = function(value) { return this.value = (this.value + value.asUint16) & 0xffff; }
  BoxedUint32.prototype.set_add = function(value) { return this.value = (this.value + value.asUint32) >>> 0; }
  BoxedFloat32.prototype.set_add = function(value) { return this.value = (this.value + value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_add = function(value) { return this.value = this.value + value.asFloat64; }
  
  BoxedBoolean.prototype.set_sub = function(value) { return this.value = !!(this.value - value.asBoolean); }
  BoxedInt8.prototype.set_sub = function(value) { return this.value = (this.value - value.asInt8) << 24 >> 24; }
  BoxedInt16.prototype.set_sub = function(value) { return this.value = (this.value - value.asInt16) << 16 >> 16; }
  BoxedInt32.prototype.set_sub = function(value) { return this.value = (this.value - value.asInt32) | 0; }
  BoxedUint8.prototype.set_sub = function(value) { return this.value = (this.value - value.asUint8) & 0xff; }
  BoxedUint16.prototype.set_sub = function(value) { return this.value = (this.value - value.asUint16) & 0xffff; }
  BoxedUint32.prototype.set_sub = function(value) { return this.value = (this.value - value.asUint32) >>> 0; }
  BoxedFloat32.prototype.set_sub = function(value) { return this.value = (this.value - value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_sub = function(value) { return this.value = this.value - value.asFloat64; }
  
  BoxedBoolean.prototype.set_mul = function(value) { return this.value = !!(this.value * value.asBoolean); }
  BoxedInt8.prototype.set_mul = function(value) { return this.value = (this.value * value.asInt8) << 24 >> 24; }
  BoxedInt16.prototype.set_mul = function(value) { return this.value = (this.value * value.asInt16) << 16 >> 16; }
  BoxedInt32.prototype.set_mul = function(value) { return this.value = imul32(this.value, value.asInt32); }
  BoxedUint8.prototype.set_mul = function(value) { return this.value = (this.value * value.asUint8) & 0xff; }
  BoxedUint16.prototype.set_mul = function(value) { return this.value = (this.value * value.asUint16) & 0xffff; }
  BoxedUint32.prototype.set_mul = function(value) { return this.value = imul32(this.value, value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_mul = function(value) { return this.value = (this.value * value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_mul = function(value) { return this.value = this.value * value.asFloat64; }
  
  BoxedBoolean.prototype.set_div = function(value) { return this.value = !!(this.value / value.asBoolean); }
  BoxedInt8.prototype.set_div = function(value) { return this.value = (this.value / value.asInt32) << 24 >> 24; }
  BoxedInt16.prototype.set_div = function(value) { return this.value = (this.value / value.asInt32) << 16 >> 16; }
  BoxedInt32.prototype.set_div = function(value) { return this.value = (this.value / value.asInt32) | 0; }
  BoxedUint8.prototype.set_div = function(value) { return this.value = (this.value / value.asUint32) & 0xff; }
  BoxedUint16.prototype.set_div = function(value) { return this.value = (this.value / value.asUint32) & 0xffff; }
  BoxedUint32.prototype.set_div = function(value) { return this.value = (this.value / value.asUint32) >>> 0; }
  BoxedFloat32.prototype.set_div = function(value) { return this.value = (this.value / value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_div = function(value) { return this.value = this.value / value.asFloat64; }
  
  BoxedBoolean.prototype.set_mod = function(value) { return this.value = !!(this.value % value.asBoolean); }
  BoxedInt8.prototype.set_mod = function(value) { return this.value = this.value % value.asInt8; }
  BoxedInt16.prototype.set_mod = function(value) { return this.value = this.value % value.asInt16; }
  BoxedInt32.prototype.set_mod = function(value) { return this.value = this.value % value.asInt32; }
  BoxedUint8.prototype.set_mod = function(value) { return this.value = this.value % value.asUint8; }
  BoxedUint16.prototype.set_mod = function(value) { return this.value = this.value % value.asUint16; }
  BoxedUint32.prototype.set_mod = function(value) { return this.value = this.value % value.asUint32; }
  BoxedFloat32.prototype.set_mod = function(value) { return this.value = (this.value % value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_mod = function(value) { return this.value = this.value % value.asFloat64; }
  
  BoxedBoolean.prototype.set_bor = function(value) { return this.value = this.value || value.asBoolean; }
  BoxedInt8.prototype.set_bor = function(value) { return this.value = this.value | value.asInt8; }
  BoxedInt16.prototype.set_bor = function(value) { return this.value = this.value | value.asInt16; }
  BoxedInt32.prototype.set_bor = function(value) { return this.value = this.value | value.asInt32; }
  BoxedUint8.prototype.set_bor = function(value) { return this.value = this.value | value.asUint8; }
  BoxedUint16.prototype.set_bor = function(value) { return this.value = this.value | value.asUint16; }
  BoxedUint32.prototype.set_bor = function(value) { return this.value = (this.value | value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_bor = function(value) { return this.value = (this.value | value.asInt32).asFloat32; }
  BoxedFloat64.prototype.set_bor = function(value) { return this.value = this.value | value.asInt32; }
    
  BoxedBoolean.prototype.set_band = function(value) { return this.value = this.value && value.asBoolean; }
  BoxedInt8.prototype.set_band = function(value) { return this.value = this.value & value.asInt8; }
  BoxedInt16.prototype.set_band = function(value) { return this.value = this.value & value.asInt16; }
  BoxedInt32.prototype.set_band = function(value) { return this.value = this.value & value.asInt32; }
  BoxedUint8.prototype.set_band = function(value) { return this.value = this.value & value.asUint8; }
  BoxedUint16.prototype.set_band = function(value) { return this.value = this.value & value.asUint16; }
  BoxedUint32.prototype.set_band = function(value) { return this.value = (this.value & value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_band = function(value) { return this.value = (this.value & value.asInt32).asFloat32; }
  BoxedFloat64.prototype.set_band = function(value) { return this.value = this.value & value.asInt32; }
  
  BoxedBoolean.prototype.set_bxor = function(value) { return this.value = !!(this.value ^ value.asBoolean); }
  BoxedInt8.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt8; }
  BoxedInt16.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt16; }
  BoxedInt32.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt32; }
  BoxedUint8.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asUint8; }
  BoxedUint16.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asUint16; }
  BoxedUint32.prototype.set_bxor = function(value) { return this.value = (this.value ^ value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_bxor = function(value) { return this.value = (this.value ^ value.asInt32).asFloat32; }
  BoxedFloat64.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt32; }
  
  BoxedBoolean.prototype.set_lshift = function(count) { return this.value = !!(this.value << count.asUint8); }
  BoxedInt8.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) << 24 >> 24; }
  BoxedInt16.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) << 16 >> 16; }
  BoxedInt32.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8); }
  BoxedUint8.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) & 0xff; }
  BoxedUint16.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) & 0xffff; }
  BoxedUint32.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) >>> 0; }
  BoxedFloat32.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8).asFloat32; }
  BoxedFloat64.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8); }
  
  BoxedBoolean.prototype.set_rshift = function(count) { return this.value = !!(this.value >>> count.asUint8); }
  BoxedInt8.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8) << 24 >> 24; }
  BoxedInt16.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8) << 16 >> 16; }
  BoxedInt32.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8) | 0; }
  BoxedUint8.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  BoxedUint16.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  BoxedUint32.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  BoxedFloat32.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8).asFloat32; }
  BoxedFloat64.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  
  BoxedBoolean.prototype.set_arshift = function(count) { return this.value = !!(this.value >> count.asUint8); }
  BoxedInt8.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  BoxedInt16.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  BoxedInt32.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  BoxedUint8.prototype.set_arshift = function(count) { return this.value = (this.value << 24 >> 24 >> count.asUint8) & 0xff; }
  BoxedUint16.prototype.set_arshift = function(count) { return this.value = (this.value << 16 >> 16 >> count.asUint8) & 0xffff; }
  BoxedUint32.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8) >>> 0; }
  BoxedFloat32.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8).asFloat32; }
  BoxedFloat64.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  
  function Boxed64() {
  }
  Boxed64.prototype = {
    set: function(value) {
      if (typeof value === 'string') {
        return parse64(this, value);
      }
      if (typeof value === 'number' || typeof value === 'boolean') {
        if (value < 0) {
          var negated = -value;
          var hi = (negated / 0x100000000) | 0, lo = negated | 0;
          if (lo === 0) {
            this.hi = -hi;
            this.lo = 0;
          }
          else {
            this.hi = ~hi;
            this.lo = -lo;
          }
        }
        else {
          this.hi = (value / 0x100000000) | 0;
          this.lo = value | 0;
        }
        return value;
      }
      else {
        this.hi = value.hi;
        this.lo = value.lo;
      }
      return this;
    },
    set_add: function(value) {
      value = value.asBoxedInt64;
      var lo = (this.lo >>> 0) + (value.lo >>> 0);
      if (lo < 0x100000000) {
        this.hi = (this.hi + value.hi) | 0;
      }
      else {
        this.hi = (this.hi + value.hi + 1) | 0;
      }
      this.lo = lo | 0;
      return this;
    },
    set_sub: function(value) {
      return this.set_add(value.i64_negate());
    },
    set_mul: function(factor) {
      var a, b;
      if (!(factor instanceof Boxed64)) factor = factor.asBoxedInt64;
      if (this.gt64(factor)) {
        a = new BoxedInt64(this.hi, this.lo);
        b = new BoxedInt64(factor.hi, factor.lo);
      }
      else {
        a = new BoxedInt64(factor.hi, factor.lo);
        b = new BoxedInt64(this.hi, this.lo);
      }
      this.hi = this.lo = 0;
      while (b.lo !== 0 || b.hi !== 0) {
        if (b.lo & 1) this.set_add(a);
        a.set_lshift(1);
        b.set_rshift(1);
      }
      return this;
    },
    set_bor: function(value) {
      value = value.asBoxedInt64;
      this.hi |= value.hi;
      this.lo |= value.lo;
      return this.normalized;
    },
    set_band: function(value) {
      value = value.asBoxedInt64;
      this.hi &= value.hi;
      this.lo &= value.lo;
      return this.normalized;
    },
    set_bxor: function(value) {
      value = value.asBoxedInt64;
      this.hi ^= value.hi;
      this.lo ^= value.lo;
      return this.normalized;
    },
    set_lshift: function(count) {
      var hi = this.hi, lo = this.lo;
      count = count.asUint8;
      if (count >= 32) {
        hi = lo;
        lo = 0;
        count -= 32;
      }
      hi <<= count;
      hi |= (lo >> (32 - count)) & ((1 << count) - 1);
      lo <<= count;
      this.hi = hi;
      this.lo = lo;
      return this;
    },
    set_rshift: function(count) {
      var hi = this.hi, lo = this.lo;
      count = count.asUint8;
      if (count >= 32) {
        lo = hi;
        hi = 0;
        count -= 32;
      }
      lo >>>= count;
      lo |= (hi & ((1 << count) - 1)) << (32 - count);
      hi >>>= count;
      this.hi = hi;
      this.lo = lo;
      return this;
    },
    set_arshift: function(count) {
      var hi = this.hi, lo = this.lo;
      count = count.asUint8;
      if (count >= 32) {
        lo = hi;
        hi = (hi < 0) ? -1 : 0;
        count -= 32;
      }
      lo >>= count;
      lo |= (hi & ((1 << count) - 1)) << (32 - count);
      hi >>= count;
      this.hi = hi;
      this.lo = lo;
      return this;
    },
    get asBoolean() { return !!(this.lo || this.hi); },
    get asInt8() { return this.lo << 24 >> 24; },
    get asInt16() { return this.lo << 16 >> 16; },
    get asInt32() { return this.lo; },
    get asUint8() { return this.lo & 0xff; },
    get asUint16() { return this.lo & 0xffff; },
    get asUint32() { return this.lo >>> 0; },
    get asFloat32() { return this.asFloat64.asFloat32; },
    get asBoxedBoolean() { return new BoxedBoolean(this.lo && this.hi); },
    get asBoxedInt8() { return new BoxedInt8(this.lo); },
    get asBoxedInt16() { return new BoxedInt16(this.lo); },
    get asBoxedInt32() { return new BoxedInt32(this.lo); },
    get asBoxedUint8() { return new BoxedUint8(this.lo); },
    get asBoxedUint16() { return new BoxedUint16(this.lo); },
    get asBoxedUint32() { return new BoxedUint32(this.lo); },
    get asBoxedFloat32() { return new BoxedFloat32(this.asFloat64); },
    get asBoxedFloat64() { return new BoxedFloat64(this.asFloat64); },
    i64_negate: function() {
      var hi = this.hi, lo = this.lo;
      if (hi < 0) {
        if (lo === 0) {
          hi = -hi;
          lo = 0;
        }
        else {
          hi = ~hi;
          lo = -lo >>> 0;
        }
      }
      else if (lo === 0) {
        hi = -hi;
      }
      else {
        hi = ~hi;
        lo = -lo >>> 0;
      }
      if (hi < 0x200000) {
        return (hi * 0x100000000) + lo;
      }
      return new BoxedInt64(hi, lo);
    },
    i64_bnot: function() {
      var hi = ~this.hi, lo = ~this.lo;
      if (hi < 0) {
        var negatedHi, negatedLo;
        if (lo === 0) {
          negatedHi = -hi;
          negatedLo = 0;
        }
        else {
          negatedHi = ~hi;
          negatedLo = -lo >>> 0;
        }
        if (negatedHi < 0x200000) {
          return -((negatedHi * 0x100000000) + negatedLo);
        }
      }
      else if (hi < 0x200000) {
        return (hi * 0x100000000) + lo;
      }
      return new BoxedInt64(hi, lo);
    },
    u64_bnot: function() {
      var hi = ~this.hi, lo = ~this.lo;
      if (hi >= 0 && hi < 0x200000) {
        return (hi * 0x100000000) + (lo >>> 0);
      }
      return new BoxedUint64(hi, lo);
    },
    i64_bxor: function(other) {
      other = other.asBoxedInt64;
      return new BoxedInt64(this.hi ^ other.hi, this.lo ^ other.lo).normalized;
    },
    u64_bxor: function(other) {
      other = other.asBoxedUint64;
      return new BoxedUint64(this.hi ^ other.hi, this.lo ^ other.lo).normalized;
    },
    i64_band: function(other) {
      other = other.asBoxedInt64;
      var hi = this.hi & other.hi, lo = this.lo & other.lo;
      if (hi === 0) {
        return lo >>> 0;
      }
      else if (hi === -1) {
        return (lo < 0) ? lo : ~lo;
      }
      return new BoxedInt64(hi, lo).normalized;
    },
    u64_band: function(other) {
      other = other.asBoxedUint64;
      var hi = this.hi & other.hi, lo = this.lo & other.lo;
      if (hi === 0) {
        return lo >>> 0;
      }
      return new BoxedUint64(hi, lo).normalized;
    },
    i64_bor: function(other) {
      other = other.asBoxedInt64;
      return new BoxedInt64(this.hi | other.hi, this.lo | other.lo).normalized;
    },
    u64_bor: function(other) {
      other = other.asBoxedUint64;
      return new BoxedUint64(this.hi | other.hi, this.lo | other.lo).normalized;
    },
    i64_lshift: function(count) {
      return new BoxedInt64(this.hi, this.lo).set_lshift(count);
    },
    u64_lshift: function(count) {
      return new BoxedUint64(this.hi, this.lo).set_lshift(count);
    },
    i64_arshift: function(count) {
      return new BoxedInt64(this.hi, this.lo).set_arshift(count).normalized;
    },
    u64_rshift: function(count) {
      return new BoxedUint64(this.hi, this.lo).set_rshift(count).normalized;
    },
    neq64: function(other) {
      return !this.eq64(other);
    },
    gt64: function(other) {
      return !this.lte64(other);
    },
    gte64: function(other) {
      return !this.lt64(other);
    },
    i64_add: function(other) {
      return new BoxedInt64(this.hi, this.lo).set_add(other).normalized;
    },
    u64_add: function(other) {
      return new BoxedUint64(this.hi, this.lo).set_add(other).normalized;
    },
    i64_sub: function(subtraction) {
      return new BoxedInt64(this.hi, this.lo).set_add(subtraction.i64_negate()).normalized;
    },
    u64_sub: function(subtraction) {
      return new BoxedUint64(this.hi, this.lo).set_add(subtraction.i64_negate()).normalized;
    },
    i32_mul: function(factor) {
      return imul32(this.lo, factor.asInt32);
    },
    u32_mul: function(factor) {
      return imul32(this.lo, factor.asInt32) >>> 0;
    },
  };
  
  function BoxedInt64(hi, lo) { this.hi = hi | 0; this.lo = lo | 0; }
  function BoxedUint64(hi, lo) { this.hi = hi | 0; this.lo = lo | 0; }
  
  [BoxedInt64, BoxedUint64]
  .forEach(function(T) {
    T.prototype = new Boxed64;
  });
  
  Object.defineProperty(BoxedInt64.prototype, 'asFloat64', {
    get: function() {
      var hi = this.hi, lo = this.lo;
      var sign;
      if (hi < 0) {
        sign = -1;
        if (lo === 0) {
          hi = -hi;
        }
        else {
          hi = ~hi;
          lo = -lo >>> 0;
        }
      }
      else {
        sign = +1;
        lo >>>= 0;
      }
      return sign * ((hi * 0x100000000) + lo);
    },
  });
  
  Object.defineProperty(BoxedUint64.prototype, 'asFloat64', {
    get: function() {
      var hi = this.hi >>> 0, lo = this.lo >>> 0;
      return ((hi * 0x100000000) + lo);
    },
  });
  
  BoxedInt64.prototype.i64_div = function(divisor) {
    return idivmod64(this, divisor, false);
  };
  
  BoxedInt64.prototype.u64_div = function(divisor) {
    return udivmod64(this, divisor, false);
  };
  
  BoxedInt64.prototype.i64_mod = function(divisor) {
    return idivmod64(this, divisor, true);
  };
  
  BoxedInt64.prototype.u64_mod = function(divisor) {
    return udivmod64(this, divisor, true);
  };
  
  BoxedInt64.prototype.set_div = function(divisor) {
    return this.set(idivmod64(this, divisor, false));
  };
  
  BoxedUint64.prototype.set_div = function(divisor) {
    return this.set(udivmod64(this, divisor, false));
  };
  
  BoxedInt64.prototype.set_mod = function(divisor) {
    return this.set(idivmod64(this, divisor, true));
  };
  
  BoxedUint64.prototype.set_mod = function(divisor) {
    return this.set(udivmod64(this, divisor, true));
  };
  
  BoxedInt64.prototype.set_mod = function(divisor) {
    var sign = false;
    var dividend = this;
    if (dividend.hi < 0) {
      sign = !sign;
      dividend = dividend.i64_negate();
    }
    if (divisor.lt64(0)) {
      sign = !sign;
      divisor = divisor.i64_negate();
    }
    var result = udivmod64(dividend, divisor, true);
    return this.set(sign ? result.i64_negate() : result);
  };
  
  BoxedUint64.prototype.set_div = function(divisor) {
    return udivmod64(this, divisor, false);
  };
  
  var zero_x31 = '0000000000000000000000000000000';
  
  function uint64ToString(hi, lo, radix) {
    if (isNaN(radix)) radix = 10;
    else if ((radix & (radix-1)) === 0) {
      // radix is a power of 2
      var padSize;
      switch (radix) {
        case 2: padSize = 32; break;
        case 4: padSize = 16; break;
        case 8:
          padSize = 11;
          lo += (hi & 3) * 0x100000000;
          hi >>>= 2;
          break;
        case 16: padSize = 8; break;
        case 32:
          padSize = 7;
          lo += (hi & 3) * 0x100000000;
          hi >>>= 2;
          break;
        default: throw new RangeError('toString() radix argument must be between 2 and 36');
      }
      if (hi === 0) return lo.toString(radix);
      return hi.toString(radix) + (zero_x31 + lo.toString(radix)).slice(-padSize);
    }
    var lo11 = lo & 0x7ff;
    var hi53 = (hi * 0x100000000 + (lo - lo11));
    lo11 = lo11.toString(radix);
    if (radix === 10) {
      // it looks like only in decimal are the final digits zeroed out by default
      // so we use toPrecision with the total number of decimal digits
      hi53 = hi53.toPrecision(Math.log10(hi53)).split('');
    }
    else {
      hi53 = hi53.toString(radix).split('');
    }
    for (var i = lo11.length - 1, j = hi53.length - 1, carry = 0; i >= 0; i--, j--) {
      var c = parseInt(lo11[i], radix) + parseInt(hi53[j], radix) + carry;
      hi53[j] = (c % radix).toString(radix);
      carry = (c / radix) | 0;
    }
    if (carry) {
      for (; j >= 0; j--) {
        var c = parseInt(hi53[j], radix) + carry;
        hi53[j] = (c % radix).toString(radix);
        carry = (c / radix) | 0;
        if (!carry) {<commit_msg>uint64ToString back to being more complicated<commit_after>define(function() {
  
  // The advice is, never add to standard object prototypes. Why is that?
  // Well, it's because some other code somewhere might also want to add to it too.
  // No fair. Why does that OTHER code get to have all the fun?
  
  // (Let's get this proof-of-concept working first. If you want, we can worry about being a good neighbor later.)

  'use strict';
  
  var mattress = {};
  
  var tempBuffer = new ArrayBuffer(8);
  var tempFloat32 = new Float32Array(tempBuffer);
  var tempFloat64 = new Float64Array(tempBuffer);
  var tempInt32 = new Int32Array(tempBuffer);
  
  var MAX_INTEGER_AS_DOUBLE = Math.pow(2, 53);
  
  function retThis(){ return this; }
  function retValue(){ return this.value; }
  function retNumber(){ return +this.value; }
  function retString(){ return ''+this.value; }
  function retBoolean(){ return !!this.value; }
  function retInt8(){ return this.value << 24 >> 24; }
  function retInt16(){ return this.value << 16 >> 16; }
  function retInt32(){ return this.value | 0; }
  function retInt64(){ return Math.floor(this.value); }
  function retUint8(){ return this.value & 0xff; }
  function retUint16(){ return this.value & 0xffff; }
  function retUint32(){ return this.value >>> 0; }
  function retUint64() {
    var v = Math.floor(this.value);
    if (v >= 0) return v;
    v = -v;
    var lo = v | 0;
    var hi = (v / 0x100000000) | 0;
    if (lo === 0) {
      return new BoxedUint64(-hi, 0);
    }
    else {
      return new BoxedUint64(~hi, -lo);
    }
  }
  function retFloat32() {
    tempFloat32[0] = this.value;
    return tempFloat32[0];
  }
  function retFloat64(){ return +this.value; } 
  function retBoxedBoolean(){ return new BoxedBoolean(this.value); }
  function retBoxedInt8(){ return new BoxedInt8(this.value); }
  function retBoxedInt16(){ return new BoxedInt16(this.value); }
  function retBoxedInt32(){ return new BoxedInt32(this.value); }
  function retBoxedInt64(){
    var v = this.value;
    return new BoxedInt64(v < 0 ? -1 : v, v | 0);
  }
  function retBoxedUint8(){ return new BoxedUint8(this.value); }
  function retBoxedUint16(){ return new BoxedUint16(this.value); }
  function retBoxedUint32(){ return new BoxedUint32(this.value); }
  function retBoxedUint64(){
    var v = this.value;
    return new BoxedUint64(v < 0 ? -1 : v, v | 0);
  }
  function retBoxedFloat32(){ return new BoxedFloat32(this.value); }
  function retBoxedFloat64(){ return new BoxedFloat64(this.value); }
  function badSet(){ throw new Error('cannot set unboxed value'); }
  
  function imul32(a, b) {
    if (a < b) return imul32(b, a);
    var result = 0;
    while (b !== 0) {
      if (b & 1) result = (result + a) | 0;
      a <<= 1;
      b >>>= 1;
    }
    return result;
  }
  mattress.i32_mul = imul32;
  mattress.u32_mul = function(a, b) {
    return imul32(a, b) >>> 0;
  };
  
  function udivmod64(dividend, divisor, returnMod) {
    // based on code from the Bit Mathematics Cookbook by <NAME>
    // <http://bisqwit.iki.fi/story/howto/bitmath/>
    if (divisor.eq64(0)) throw new Error('division by zero');
    var remain = dividend, scaled_divisor = divisor;
    var result = 0, multiple = 1;
    while (scaled_divisor.lt64(dividend)) {
      scaled_divisor = scaled_divisor.u64_lshift(1);
      multiple = multiple.u64_lshift(1);
    }
    do {
      if (remain.gte64(scaled_divisor)) {
        remain = remain.u64_sub(scaled_divisor);
        result = result.u64_add(multiple);
      }
      scaled_divisor = scaled_divisor.u64_rshift(1);
      multiple = multiple.u64_rshift(1);
    } while (multiple.neq64(0));
    return returnMod ? remain : result;
  }
  
  function idivmod64(dividend, divisor, returnMod) {
    var sign = false;
    if (dividend.lt64(0)) {
      sign = !sign;
      dividend = dividend.i64_negate().asUint64;
    }
    if (divisor.lt64(0)) {
      sign = !sign;
      divisor = divisor.i64_negate().asUint64;
    }
    var result = udivmod64(dividend, divisor, returnMod);
    return sign ? result.i64_negate() : result;
  }
  
  function hashString(str) {
    var i_max = str.length;
    var hash = 0x6053b7f7 ^ i_max;
    var i_step = Math.max(1, (32 / i_max) | 0);
    for (var i = 0; i < i_max; i += i_step) {
      hash = (hash >>> 3) | ((hash & 7) << 29);
      hash ^= str.charCodeAt(i);
    }
    return hash;
  }
  mattress.hashString = hashString;
  
  var HASH_PROP = mattress.HASH_PROP = Symbol('hash');
  
  var hashStore = new WeakMap();
  
  function hashValue(v) {
    switch (typeof v) {
      case 'undefined': return 0;
      case 'object':
        if (v === null) return 0;
        if (HASH_PROP in v) return v[HASH_PROP];
        var hash = hashStore.get(v);
        if (typeof hash === 'undefined') {
          hashStore.set(v, hash = (Math.random() * 0xffffffff) | 0);
        }
        return hash;
      default: return hashString('' + v);
    }
  }
  mattress.hashValue = hashValue;
  
  function hashList(array, inAnyOrder, hash) {
    if (typeof inAnyOrder === 'number' && arguments.length === 2) {
      hash = inAnyOrder;
      inAnyOrder = false;
    }
    if (isNaN(hash)) hash = 0x86b27112;
    if (inAnyOrder) {
      // quirk: if the same value appears an odd number of times,
      //  it's the same as appearing once. if it appears an even
      //  number of times, it's the same as never appearing at all.
      for (var i = 0; i < array.length; i++) {
        hash ^= hashValue(array[i]);
      }
    }
    else {
      for (var i = 0; i < array.length; i++) {
        hash = ((hash << 31) | (hash >>> 1)) ^ hashValue(array[i]);
      }
    }
    return hash;
  }
  mattress.hashList = hashList;
    
  function Boxed() {
  }
  Boxed.prototype = {
    toString: function(radix) {
      return this.value.toString(radix);
    },
    toJSON: function() {
      return this.value;
    },
    i64_negate: function() {
      return -this.value;
    },
    i64_bnot: function() {
      return this.asBoxedInt64.i64_bnot();
    },
    u64_bnot: function() {
      return this.value.u64_bnot();
    },
    i64_bxor: function(other) {
      return this.asBoxedInt64.i64_bxor(other);
    },
    u64_bxor: function(other) {
      return this.asBoxedUint64.u64_bxor(other);
    },
    i64_band: function(other) {
      return this.asBoxedInt64.i64_band(other);
    },
    u64_band: function(other) {
      return this.asBoxedUint64.u64_band(other);
    },
    i64_bor: function(other) {
      return this.asBoxedInt64.i64_bor(other);
    },
    u64_bor: function(other) {
      return this.asBoxedUint64.u64_bor(other);
    },
    i64_lshift: function(count) {
      return this.asBoxedInt64.i64_lshift(count);
    },
    u64_lshift: function(count) {
      return this.asBoxedUint64.u64_lshift(count);
    },
    i64_arshift: function(count) {
      return this.asBoxedInt64.i64_arshift(count);
    },
    u64_rshift: function(count) {
      return this.asBoxedUint64.u64_rshift(count);
    },
    eq64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return +this.value === +other;
      return other.eq64(this);
    },
    neq64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return +this.value !== +other;
      return !other.eq64(this);
    },
    lt64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value < other;
      return !other.lte64(this);
    },
    lte64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value <= other;
      return !other.lt64(this);
    },
    gt64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value > other;
      return other.lte64(this);
    },
    gte64: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value >= other;
      return other.lt64(this);
    },
    i64_add: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return this.value + other;
      return other.i64_add(this);
    },
    u64_add: function(other) {
      if (other instanceof Boxed) other = other.value;
      if (typeof other === 'number' || typeof other === 'boolean') return (this.value + other).asUint64;
      return other.u64_add(this);
    },
    i64_sub: function(subtraction) {
      subtraction = subtraction.i64_negate();
      if (typeof subtraction === 'number') return this.value + subtraction;
      return subtraction.i64_add(this);
    },
    u64_sub: function(subtraction) {
      subtraction = subtraction.i64_negate();
      if (typeof subtraction === 'number') return this.value + subtraction;
      return subtraction.u64_add(this);
    },
    i32_mul: function(factor) {
      return imul32(this.asInt32, factor.asInt32);
    },
    u32_mul: function(factor) {
      return imul32(this.asInt32, factor.asInt32) >>> 0;
    },
    i64_div: function(divisor) {
      return this.asBoxedInt64.i64_div(divisor);
    },
    u64_div: function(divisor) {
      return this.asBoxedInt64.u64_div(divisor);
    },
    i64_mod: function(divisor) {
      return this.asBoxedInt64.i64_mod(divisor);
    },
    u64_mod: function(divisor) {
      return this.asBoxedInt64.u64_mod(divisor);
    },
  };
  Object.defineProperties(Boxed.prototype, {
    normalized: {get: retValue},
    asBoolean: {get: retBoolean},
    asInt8: {get: retInt8},
    asInt16: {get: retInt16},
    asInt32: {get: retInt32},
    asInt64: {get: retInt64},
    asUint8: {get: retUint8},
    asUint16: {get: retUint16},
    asUint32: {get: retUint32},
    asUint64: {get: retUint64},
    asFloat32: {get: retValue},
    asFloat64: {get: retValue},
    asBoxedBoolean: {get: retBoxedBoolean},
    asBoxedInt8: {get: retBoxedInt8},
    asBoxedInt16: {get: retBoxedInt16},
    asBoxedInt32: {get: retBoxedInt32},
    asBoxedInt64: {get: retBoxedInt64},
    asBoxedUint8: {get: retBoxedUint8},
    asBoxedUint16: {get: retBoxedUint16},
    asBoxedUint32: {get: retBoxedUint32},
    asBoxedUint64: {get: retBoxedUint64},
    asBoxedFloat32: {get: retBoxedFloat32},
    asBoxedFloat64: {get: retBoxedFloat64},
  });
  
  function BoxedBoolean(value) { this.value = value.asBoolean; }
  function BoxedInt8(value) { this.value = value.asInt8; }
  function BoxedInt16(value) { this.value = value.asInt16; }
  function BoxedInt32(value) { this.value = value.asInt32; }
  function BoxedUint8(value) { this.value = value.asUint8; }
  function BoxedUint16(value) { this.value = value.asUint16; }
  function BoxedUint32(value) { this.value = value.asUint32; }
  function BoxedFloat32(value) { this.value = value.asFloat32; }
  function BoxedFloat64(value) { this.value = value.asFloat64; }
  
  [BoxedBoolean,
    BoxedInt8, BoxedInt16, BoxedInt32,
    BoxedUint8, BoxedUint16, BoxedUint32,
    BoxedFloat32, BoxedFloat64]
  .forEach(function(T) {
    T.prototype = new Boxed;
  });
  
  BoxedBoolean.prototype.set = function(value) { return this.value = value.asBoolean; }
  BoxedInt8.prototype.set = function(value) { return this.value = value.asInt8; }
  BoxedInt16.prototype.set = function(value) { return this.value = value.asInt16; }
  BoxedInt32.prototype.set = function(value) { return this.value = value.asInt32; }
  BoxedUint8.prototype.set = function(value) { return this.value = value.asUint8; }
  BoxedUint16.prototype.set = function(value) { return this.value = value.asUint16; }
  BoxedUint32.prototype.set = function(value) { return this.value = value.asUint32; }
  BoxedFloat32.prototype.set = function(value) { return this.value = value.asFloat32; }
  BoxedFloat64.prototype.set = function(value) { return this.value = value.asFloat64; }
  
  BoxedBoolean.prototype.set_add = function(value) { return this.value = !!(this.value + value.asBoolean); }
  BoxedInt8.prototype.set_add = function(value) { return this.value = (this.value + value.asInt8) << 24 >> 24; }
  BoxedInt16.prototype.set_add = function(value) { return this.value = (this.value + value.asInt16) << 16 >> 16; }
  BoxedInt32.prototype.set_add = function(value) { return this.value = (this.value + value.asInt32) | 0; }
  BoxedUint8.prototype.set_add = function(value) { return this.value = (this.value + value.asUint8) & 0xff; }
  BoxedUint16.prototype.set_add = function(value) { return this.value = (this.value + value.asUint16) & 0xffff; }
  BoxedUint32.prototype.set_add = function(value) { return this.value = (this.value + value.asUint32) >>> 0; }
  BoxedFloat32.prototype.set_add = function(value) { return this.value = (this.value + value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_add = function(value) { return this.value = this.value + value.asFloat64; }
  
  BoxedBoolean.prototype.set_sub = function(value) { return this.value = !!(this.value - value.asBoolean); }
  BoxedInt8.prototype.set_sub = function(value) { return this.value = (this.value - value.asInt8) << 24 >> 24; }
  BoxedInt16.prototype.set_sub = function(value) { return this.value = (this.value - value.asInt16) << 16 >> 16; }
  BoxedInt32.prototype.set_sub = function(value) { return this.value = (this.value - value.asInt32) | 0; }
  BoxedUint8.prototype.set_sub = function(value) { return this.value = (this.value - value.asUint8) & 0xff; }
  BoxedUint16.prototype.set_sub = function(value) { return this.value = (this.value - value.asUint16) & 0xffff; }
  BoxedUint32.prototype.set_sub = function(value) { return this.value = (this.value - value.asUint32) >>> 0; }
  BoxedFloat32.prototype.set_sub = function(value) { return this.value = (this.value - value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_sub = function(value) { return this.value = this.value - value.asFloat64; }
  
  BoxedBoolean.prototype.set_mul = function(value) { return this.value = !!(this.value * value.asBoolean); }
  BoxedInt8.prototype.set_mul = function(value) { return this.value = (this.value * value.asInt8) << 24 >> 24; }
  BoxedInt16.prototype.set_mul = function(value) { return this.value = (this.value * value.asInt16) << 16 >> 16; }
  BoxedInt32.prototype.set_mul = function(value) { return this.value = imul32(this.value, value.asInt32); }
  BoxedUint8.prototype.set_mul = function(value) { return this.value = (this.value * value.asUint8) & 0xff; }
  BoxedUint16.prototype.set_mul = function(value) { return this.value = (this.value * value.asUint16) & 0xffff; }
  BoxedUint32.prototype.set_mul = function(value) { return this.value = imul32(this.value, value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_mul = function(value) { return this.value = (this.value * value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_mul = function(value) { return this.value = this.value * value.asFloat64; }
  
  BoxedBoolean.prototype.set_div = function(value) { return this.value = !!(this.value / value.asBoolean); }
  BoxedInt8.prototype.set_div = function(value) { return this.value = (this.value / value.asInt32) << 24 >> 24; }
  BoxedInt16.prototype.set_div = function(value) { return this.value = (this.value / value.asInt32) << 16 >> 16; }
  BoxedInt32.prototype.set_div = function(value) { return this.value = (this.value / value.asInt32) | 0; }
  BoxedUint8.prototype.set_div = function(value) { return this.value = (this.value / value.asUint32) & 0xff; }
  BoxedUint16.prototype.set_div = function(value) { return this.value = (this.value / value.asUint32) & 0xffff; }
  BoxedUint32.prototype.set_div = function(value) { return this.value = (this.value / value.asUint32) >>> 0; }
  BoxedFloat32.prototype.set_div = function(value) { return this.value = (this.value / value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_div = function(value) { return this.value = this.value / value.asFloat64; }
  
  BoxedBoolean.prototype.set_mod = function(value) { return this.value = !!(this.value % value.asBoolean); }
  BoxedInt8.prototype.set_mod = function(value) { return this.value = this.value % value.asInt8; }
  BoxedInt16.prototype.set_mod = function(value) { return this.value = this.value % value.asInt16; }
  BoxedInt32.prototype.set_mod = function(value) { return this.value = this.value % value.asInt32; }
  BoxedUint8.prototype.set_mod = function(value) { return this.value = this.value % value.asUint8; }
  BoxedUint16.prototype.set_mod = function(value) { return this.value = this.value % value.asUint16; }
  BoxedUint32.prototype.set_mod = function(value) { return this.value = this.value % value.asUint32; }
  BoxedFloat32.prototype.set_mod = function(value) { return this.value = (this.value % value.asFloat64).asFloat32; }
  BoxedFloat64.prototype.set_mod = function(value) { return this.value = this.value % value.asFloat64; }
  
  BoxedBoolean.prototype.set_bor = function(value) { return this.value = this.value || value.asBoolean; }
  BoxedInt8.prototype.set_bor = function(value) { return this.value = this.value | value.asInt8; }
  BoxedInt16.prototype.set_bor = function(value) { return this.value = this.value | value.asInt16; }
  BoxedInt32.prototype.set_bor = function(value) { return this.value = this.value | value.asInt32; }
  BoxedUint8.prototype.set_bor = function(value) { return this.value = this.value | value.asUint8; }
  BoxedUint16.prototype.set_bor = function(value) { return this.value = this.value | value.asUint16; }
  BoxedUint32.prototype.set_bor = function(value) { return this.value = (this.value | value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_bor = function(value) { return this.value = (this.value | value.asInt32).asFloat32; }
  BoxedFloat64.prototype.set_bor = function(value) { return this.value = this.value | value.asInt32; }
    
  BoxedBoolean.prototype.set_band = function(value) { return this.value = this.value && value.asBoolean; }
  BoxedInt8.prototype.set_band = function(value) { return this.value = this.value & value.asInt8; }
  BoxedInt16.prototype.set_band = function(value) { return this.value = this.value & value.asInt16; }
  BoxedInt32.prototype.set_band = function(value) { return this.value = this.value & value.asInt32; }
  BoxedUint8.prototype.set_band = function(value) { return this.value = this.value & value.asUint8; }
  BoxedUint16.prototype.set_band = function(value) { return this.value = this.value & value.asUint16; }
  BoxedUint32.prototype.set_band = function(value) { return this.value = (this.value & value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_band = function(value) { return this.value = (this.value & value.asInt32).asFloat32; }
  BoxedFloat64.prototype.set_band = function(value) { return this.value = this.value & value.asInt32; }
  
  BoxedBoolean.prototype.set_bxor = function(value) { return this.value = !!(this.value ^ value.asBoolean); }
  BoxedInt8.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt8; }
  BoxedInt16.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt16; }
  BoxedInt32.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt32; }
  BoxedUint8.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asUint8; }
  BoxedUint16.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asUint16; }
  BoxedUint32.prototype.set_bxor = function(value) { return this.value = (this.value ^ value.asInt32) >>> 0; }
  BoxedFloat32.prototype.set_bxor = function(value) { return this.value = (this.value ^ value.asInt32).asFloat32; }
  BoxedFloat64.prototype.set_bxor = function(value) { return this.value = this.value ^ value.asInt32; }
  
  BoxedBoolean.prototype.set_lshift = function(count) { return this.value = !!(this.value << count.asUint8); }
  BoxedInt8.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) << 24 >> 24; }
  BoxedInt16.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) << 16 >> 16; }
  BoxedInt32.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8); }
  BoxedUint8.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) & 0xff; }
  BoxedUint16.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) & 0xffff; }
  BoxedUint32.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8) >>> 0; }
  BoxedFloat32.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8).asFloat32; }
  BoxedFloat64.prototype.set_lshift = function(count) { return this.value = (this.value << count.asUint8); }
  
  BoxedBoolean.prototype.set_rshift = function(count) { return this.value = !!(this.value >>> count.asUint8); }
  BoxedInt8.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8) << 24 >> 24; }
  BoxedInt16.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8) << 16 >> 16; }
  BoxedInt32.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8) | 0; }
  BoxedUint8.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  BoxedUint16.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  BoxedUint32.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  BoxedFloat32.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8).asFloat32; }
  BoxedFloat64.prototype.set_rshift = function(count) { return this.value = (this.value >>> count.asUint8); }
  
  BoxedBoolean.prototype.set_arshift = function(count) { return this.value = !!(this.value >> count.asUint8); }
  BoxedInt8.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  BoxedInt16.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  BoxedInt32.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  BoxedUint8.prototype.set_arshift = function(count) { return this.value = (this.value << 24 >> 24 >> count.asUint8) & 0xff; }
  BoxedUint16.prototype.set_arshift = function(count) { return this.value = (this.value << 16 >> 16 >> count.asUint8) & 0xffff; }
  BoxedUint32.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8) >>> 0; }
  BoxedFloat32.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8).asFloat32; }
  BoxedFloat64.prototype.set_arshift = function(count) { return this.value = (this.value >> count.asUint8); }
  
  function Boxed64() {
  }
  Boxed64.prototype = {
    set: function(value) {
      if (typeof value === 'string') {
        return parse64(this, value);
      }
      if (typeof value === 'number' || typeof value === 'boolean') {
        if (value < 0) {
          var negated = -value;
          var hi = (negated / 0x100000000) | 0, lo = negated | 0;
          if (lo === 0) {
            this.hi = -hi;
            this.lo = 0;
          }
          else {
            this.hi = ~hi;
            this.lo = -lo;
          }
        }
        else {
          this.hi = (value / 0x100000000) | 0;
          this.lo = value | 0;
        }
        return value;
      }
      else {
        this.hi = value.hi;
        this.lo = value.lo;
      }
      return this;
    },
    set_add: function(value) {
      value = value.asBoxedInt64;
      var lo = (this.lo >>> 0) + (value.lo >>> 0);
      if (lo < 0x100000000) {
        this.hi = (this.hi + value.hi) | 0;
      }
      else {
        this.hi = (this.hi + value.hi + 1) | 0;
      }
      this.lo = lo | 0;
      return this;
    },
    set_sub: function(value) {
      return this.set_add(value.i64_negate());
    },
    set_mul: function(factor) {
      var a, b;
      if (!(factor instanceof Boxed64)) factor = factor.asBoxedInt64;
      if (this.gt64(factor)) {
        a = new BoxedInt64(this.hi, this.lo);
        b = new BoxedInt64(factor.hi, factor.lo);
      }
      else {
        a = new BoxedInt64(factor.hi, factor.lo);
        b = new BoxedInt64(this.hi, this.lo);
      }
      this.hi = this.lo = 0;
      while (b.lo !== 0 || b.hi !== 0) {
        if (b.lo & 1) this.set_add(a);
        a.set_lshift(1);
        b.set_rshift(1);
      }
      return this;
    },
    set_bor: function(value) {
      value = value.asBoxedInt64;
      this.hi |= value.hi;
      this.lo |= value.lo;
      return this.normalized;
    },
    set_band: function(value) {
      value = value.asBoxedInt64;
      this.hi &= value.hi;
      this.lo &= value.lo;
      return this.normalized;
    },
    set_bxor: function(value) {
      value = value.asBoxedInt64;
      this.hi ^= value.hi;
      this.lo ^= value.lo;
      return this.normalized;
    },
    set_lshift: function(count) {
      var hi = this.hi, lo = this.lo;
      count = count.asUint8;
      if (count >= 32) {
        hi = lo;
        lo = 0;
        count -= 32;
      }
      hi <<= count;
      hi |= (lo >> (32 - count)) & ((1 << count) - 1);
      lo <<= count;
      this.hi = hi;
      this.lo = lo;
      return this;
    },
    set_rshift: function(count) {
      var hi = this.hi, lo = this.lo;
      count = count.asUint8;
      if (count >= 32) {
        lo = hi;
        hi = 0;
        count -= 32;
      }
      lo >>>= count;
      lo |= (hi & ((1 << count) - 1)) << (32 - count);
      hi >>>= count;
      this.hi = hi;
      this.lo = lo;
      return this;
    },
    set_arshift: function(count) {
      var hi = this.hi, lo = this.lo;
      count = count.asUint8;
      if (count >= 32) {
        lo = hi;
        hi = (hi < 0) ? -1 : 0;
        count -= 32;
      }
      lo >>= count;
      lo |= (hi & ((1 << count) - 1)) << (32 - count);
      hi >>= count;
      this.hi = hi;
      this.lo = lo;
      return this;
    },
    get asBoolean() { return !!(this.lo || this.hi); },
    get asInt8() { return this.lo << 24 >> 24; },
    get asInt16() { return this.lo << 16 >> 16; },
    get asInt32() { return this.lo; },
    get asUint8() { return this.lo & 0xff; },
    get asUint16() { return this.lo & 0xffff; },
    get asUint32() { return this.lo >>> 0; },
    get asFloat32() { return this.asFloat64.asFloat32; },
    get asBoxedBoolean() { return new BoxedBoolean(this.lo && this.hi); },
    get asBoxedInt8() { return new BoxedInt8(this.lo); },
    get asBoxedInt16() { return new BoxedInt16(this.lo); },
    get asBoxedInt32() { return new BoxedInt32(this.lo); },
    get asBoxedUint8() { return new BoxedUint8(this.lo); },
    get asBoxedUint16() { return new BoxedUint16(this.lo); },
    get asBoxedUint32() { return new BoxedUint32(this.lo); },
    get asBoxedFloat32() { return new BoxedFloat32(this.asFloat64); },
    get asBoxedFloat64() { return new BoxedFloat64(this.asFloat64); },
    i64_negate: function() {
      var hi = this.hi, lo = this.lo;
      if (hi < 0) {
        if (lo === 0) {
          hi = -hi;
          lo = 0;
        }
        else {
          hi = ~hi;
          lo = -lo >>> 0;
        }
      }
      else if (lo === 0) {
        hi = -hi;
      }
      else {
        hi = ~hi;
        lo = -lo >>> 0;
      }
      if (hi < 0x200000) {
        return (hi * 0x100000000) + lo;
      }
      return new BoxedInt64(hi, lo);
    },
    i64_bnot: function() {
      var hi = ~this.hi, lo = ~this.lo;
      if (hi < 0) {
        var negatedHi, negatedLo;
        if (lo === 0) {
          negatedHi = -hi;
          negatedLo = 0;
        }
        else {
          negatedHi = ~hi;
          negatedLo = -lo >>> 0;
        }
        if (negatedHi < 0x200000) {
          return -((negatedHi * 0x100000000) + negatedLo);
        }
      }
      else if (hi < 0x200000) {
        return (hi * 0x100000000) + lo;
      }
      return new BoxedInt64(hi, lo);
    },
    u64_bnot: function() {
      var hi = ~this.hi, lo = ~this.lo;
      if (hi >= 0 && hi < 0x200000) {
        return (hi * 0x100000000) + (lo >>> 0);
      }
      return new BoxedUint64(hi, lo);
    },
    i64_bxor: function(other) {
      other = other.asBoxedInt64;
      return new BoxedInt64(this.hi ^ other.hi, this.lo ^ other.lo).normalized;
    },
    u64_bxor: function(other) {
      other = other.asBoxedUint64;
      return new BoxedUint64(this.hi ^ other.hi, this.lo ^ other.lo).normalized;
    },
    i64_band: function(other) {
      other = other.asBoxedInt64;
      var hi = this.hi & other.hi, lo = this.lo & other.lo;
      if (hi === 0) {
        return lo >>> 0;
      }
      else if (hi === -1) {
        return (lo < 0) ? lo : ~lo;
      }
      return new BoxedInt64(hi, lo).normalized;
    },
    u64_band: function(other) {
      other = other.asBoxedUint64;
      var hi = this.hi & other.hi, lo = this.lo & other.lo;
      if (hi === 0) {
        return lo >>> 0;
      }
      return new BoxedUint64(hi, lo).normalized;
    },
    i64_bor: function(other) {
      other = other.asBoxedInt64;
      return new BoxedInt64(this.hi | other.hi, this.lo | other.lo).normalized;
    },
    u64_bor: function(other) {
      other = other.asBoxedUint64;
      return new BoxedUint64(this.hi | other.hi, this.lo | other.lo).normalized;
    },
    i64_lshift: function(count) {
      return new BoxedInt64(this.hi, this.lo).set_lshift(count);
    },
    u64_lshift: function(count) {
      return new BoxedUint64(this.hi, this.lo).set_lshift(count);
    },
    i64_arshift: function(count) {
      return new BoxedInt64(this.hi, this.lo).set_arshift(count).normalized;
    },
    u64_rshift: function(count) {
      return new BoxedUint64(this.hi, this.lo).set_rshift(count).normalized;
    },
    neq64: function(other) {
      return !this.eq64(other);
    },
    gt64: function(other) {
      return !this.lte64(other);
    },
    gte64: function(other) {
      return !this.lt64(other);
    },
    i64_add: function(other) {
      return new BoxedInt64(this.hi, this.lo).set_add(other).normalized;
    },
    u64_add: function(other) {
      return new BoxedUint64(this.hi, this.lo).set_add(other).normalized;
    },
    i64_sub: function(subtraction) {
      return new BoxedInt64(this.hi, this.lo).set_add(subtraction.i64_negate()).normalized;
    },
    u64_sub: function(subtraction) {
      return new BoxedUint64(this.hi, this.lo).set_add(subtraction.i64_negate()).normalized;
    },
    i32_mul: function(factor) {
      return imul32(this.lo, factor.asInt32);
    },
    u32_mul: function(factor) {
      return imul32(this.lo, factor.asInt32) >>> 0;
    },
  };
  
  function BoxedInt64(hi, lo) { this.hi = hi | 0; this.lo = lo | 0; }
  function BoxedUint64(hi, lo) { this.hi = hi | 0; this.lo = lo | 0; }
  
  [BoxedInt64, BoxedUint64]
  .forEach(function(T) {
    T.prototype = new Boxed64;
  });
  
  Object.defineProperty(BoxedInt64.prototype, 'asFloat64', {
    get: function() {
      var hi = this.hi, lo = this.lo;
      var sign;
      if (hi < 0) {
        sign = -1;
        if (lo === 0) {
          hi = -hi;
        }
        else {
          hi = ~hi;
          lo = -lo >>> 0;
        }
      }
      else {
        sign = +1;
        lo >>>= 0;
      }
      return sign * ((hi * 0x100000000) + lo);
    },
  });
  
  Object.defineProperty(BoxedUint64.prototype, 'asFloat64', {
    get: function() {
      var hi = this.hi >>> 0, lo = this.lo >>> 0;
      return ((hi * 0x100000000) + lo);
    },
  });
  
  BoxedInt64.prototype.i64_div = function(divisor) {
    return idivmod64(this, divisor, false);
  };
  
  BoxedInt64.prototype.u64_div = function(divisor) {
    return udivmod64(this, divisor, false);
  };
  
  BoxedInt64.prototype.i64_mod = function(divisor) {
    return idivmod64(this, divisor, true);
  };
  
  BoxedInt64.prototype.u64_mod = function(divisor) {
    return udivmod64(this, divisor, true);
  };
  
  BoxedInt64.prototype.set_div = function(divisor) {
    return this.set(idivmod64(this, divisor, false));
  };
  
  BoxedUint64.prototype.set_div = function(divisor) {
    return this.set(udivmod64(this, divisor, false));
  };
  
  BoxedInt64.prototype.set_mod = function(divisor) {
    return this.set(idivmod64(this, divisor, true));
  };
  
  BoxedUint64.prototype.set_mod = function(divisor) {
    return this.set(udivmod64(this, divisor, true));
  };
  
  BoxedInt64.prototype.set_mod = function(divisor) {
    var sign = false;
    var dividend = this;
    if (dividend.hi < 0) {
      sign = !sign;
      dividend = dividend.i64_negate();
    }
    if (divisor.lt64(0)) {
      sign = !sign;
      divisor = divisor.i64_negate();
    }
    var result = udivmod64(dividend, divisor, true);
    return this.set(sign ? result.i64_negate() : result);
  };
  
  BoxedUint64.prototype.set_div = function(divisor) {
    return udivmod64(this, divisor, false);
  };
  
  var zero_x31 = '0000000000000000000000000000000';
  
  function uint64ToString(hi, lo, radix) {
    if (isNaN(radix)) radix = 10;
    else if ((radix & (radix-1)) === 0) {
      // radix is a power of 2
      var padSize;
      switch (radix) {
        case 2: padSize = 32; break;
        case 4: padSize = 16; break;
        case 8:
          padSize = 11;
          lo += (hi & 3) * 0x100000000;
          hi >>>= 2;
          break;
        case 16: padSize = 8; break;
        case 32:
          padSize = 7;
          lo += (hi & 3) * 0x100000000;
          hi >>>= 2;
          break;
        default: throw new RangeError('toString() radix argument must be between 2 and 36');
      }
      if (hi === 0) return lo.toString(radix);
      return hi.toString(radix) + (zero_x31 + lo.toString(radix)).slice(-padSize);
    }
    var lo11 = lo & 0x7ff;
    var hi53 = (hi * 0x100000000 + (lo - lo11));
    if (hi53 === 0) {
      return lo11.toString(radix);
    }
    if (radix === 10) {
      // it looks like only in decimal are the final digits zeroed out by default
      hi53 = hi53.toPrecision(20);
      if (hi53.slice(-2) === '.0') {
        hi53 = hi53.slice(0, -2);
      }
    }
    else {
      hi53 = hi53.toString(radix);
    }
    if (lo11 === 0) return hi53;
    lo11 = lo11.toString(radix);
    hi53 = hi53.split('');
    for (var i = lo11.length - 1, j = hi53.length - 1, carry = 0; i >= 0; i--, j--) {
      var c = parseInt(lo11[i], radix) + parseInt(hi53[j], radix) + carry;
      hi53[j] = (c % radix).toString(radix);
      carry = (c / radix) | 0;
    }
    if (carry) {
      for (; j >= 0; j--) {
        var c = parseInt(hi53[j], radix) + carry;
        hi53[j] = (c % radix).toString(radix);
        carry = (c / radix) | 0;
        if (!carry) {
{'fraction_non_alphanumeric': 0.14489518494669815, 'fraction_numerical': 0.04412964155398154, 'mean_word_length': 2.868157414069851, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 397, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 30, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '45365', 'n_tokens_mistral': 26313, 'n_tokens_neox': 24371, 'n_words': 5228}