Exit Full View

Games Cupboard / gamescupboard-client / build / compileSync / main / productionExecutable / kotlin / korlibs-kds.js

(function (root, factory) {
  if (typeof define === 'function' && define.amd)
    define(['exports', './kotlin-kotlin-stdlib-js-ir.js'], factory);
  else if (typeof exports === 'object')
    factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'));
  else {
    if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'korlibs-kds'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'korlibs-kds'.");
    }
    root['korlibs-kds'] = factory(typeof this['korlibs-kds'] === 'undefined' ? {} : this['korlibs-kds'], this['kotlin-kotlin-stdlib-js-ir']);
  }
}(this, function (_, kotlin_kotlin) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var log2 = Math.log2;
  var Unit_getInstance = kotlin_kotlin.$_$.k5;
  var println = kotlin_kotlin.$_$.fc;
  var toString = kotlin_kotlin.$_$.ae;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.x2;
  var Long = kotlin_kotlin.$_$.xh;
  var toLong = kotlin_kotlin.$_$.yd;
  var classMeta = kotlin_kotlin.$_$.pc;
  var objectMeta = kotlin_kotlin.$_$.wd;
  var copyOf = kotlin_kotlin.$_$.m7;
  var THROW_CCE = kotlin_kotlin.$_$.di;
  var isDoubleArray = kotlin_kotlin.$_$.fd;
  var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.a3;
  var take = kotlin_kotlin.$_$.ea;
  var equals = kotlin_kotlin.$_$.rc;
  var List = kotlin_kotlin.$_$.x5;
  var isInterface = kotlin_kotlin.$_$.id;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.g2;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.p3;
  var copyOf_0 = kotlin_kotlin.$_$.n7;
  var isFloatArray = kotlin_kotlin.$_$.gd;
  var take_0 = kotlin_kotlin.$_$.ca;
  var Collection = kotlin_kotlin.$_$.o5;
  var isIntArray = kotlin_kotlin.$_$.hd;
  var copyOf_1 = kotlin_kotlin.$_$.p7;
  var take_1 = kotlin_kotlin.$_$.da;
  var interfaceMeta = kotlin_kotlin.$_$.yc;
  var Char = kotlin_kotlin.$_$.nh;
  var coerceAtLeast = kotlin_kotlin.$_$.me;
  var THROW_IAE = kotlin_kotlin.$_$.ei;
  var getProgressionLastElement = kotlin_kotlin.$_$.ec;
  var compareTo = kotlin_kotlin.$_$.qc;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v1;
  var isObject = kotlin_kotlin.$_$.ld;
  var MutableMap = kotlin_kotlin.$_$.e6;
  var hashCode = kotlin_kotlin.$_$.xc;
  var MutableIterator = kotlin_kotlin.$_$.b6;
  var toList = kotlin_kotlin.$_$.na;
  var until = kotlin_kotlin.$_$.ye;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.p6;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l1;
  var to = kotlin_kotlin.$_$.ij;
  var Map_0 = kotlin_kotlin.$_$.z5;
  var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.h2;
  var MutableCollection = kotlin_kotlin.$_$.a6;
  var fillArrayVal = kotlin_kotlin.$_$.tc;
  var isArray = kotlin_kotlin.$_$.zc;
  var addAll = kotlin_kotlin.$_$.i6;
  var ensureNotNull = kotlin_kotlin.$_$.ri;
  var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u1;
  var IndexOutOfBoundsException_init_$Create$_0 = kotlin_kotlin.$_$.b3;
  var toMutableSet = kotlin_kotlin.$_$.ua;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.c3;
  var ListIterator = kotlin_kotlin.$_$.w5;
  var IntCompanionObject_getInstance = kotlin_kotlin.$_$.w4;
  var coerceAtMost = kotlin_kotlin.$_$.pe;
  var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.v2;
  var numberToInt = kotlin_kotlin.$_$.ud;
  var copyOf_2 = kotlin_kotlin.$_$.o7;
  var Iterable = kotlin_kotlin.$_$.s5;
  var joinToString$default = kotlin_kotlin.$_$.m;
  var MutableSet = kotlin_kotlin.$_$.f6;
  var Iterator = kotlin_kotlin.$_$.t5;
  var Comparator = kotlin_kotlin.$_$.ph;
  var reversed = kotlin_kotlin.$_$.eb;
  var NotImplementedError_init_$Create$ = kotlin_kotlin.$_$.k1;
  var toSet = kotlin_kotlin.$_$.va;
  var contentEquals = kotlin_kotlin.$_$.v6;
  var contentHashCode = kotlin_kotlin.$_$.a7;
  var toBits = kotlin_kotlin.$_$.fj;
  var getOrNull = kotlin_kotlin.$_$.k8;
  var Pair = kotlin_kotlin.$_$.ai;
  var toMap = kotlin_kotlin.$_$.qa;
  var step = kotlin_kotlin.$_$.we;
  var arrayCopy = kotlin_kotlin.$_$.k6;
  var toRawBits = kotlin_kotlin.$_$.gj;
  var AbstractMutableList = kotlin_kotlin.$_$.l5;
  var copyToArray = kotlin_kotlin.$_$.q7;
  var get_lastIndex = kotlin_kotlin.$_$.w8;
  var indexOf = kotlin_kotlin.$_$.o8;
  var joinToString$default_0 = kotlin_kotlin.$_$.n;
  var MutableList = kotlin_kotlin.$_$.c6;
  var RandomAccess = kotlin_kotlin.$_$.g6;
  var toList_0 = kotlin_kotlin.$_$.oa;
  //endregion
  //region block: pre-declaration
  DoubleArrayListSortOps.prototype = Object.create(SortOps.prototype);
  DoubleArrayListSortOps.prototype.constructor = DoubleArrayListSortOps;
  ConcurrentPool.prototype = Object.create(Pool.prototype);
  ConcurrentPool.prototype.constructor = ConcurrentPool;
  RingBuffer.prototype = Object.create(ByteRingBuffer.prototype);
  RingBuffer.prototype.constructor = RingBuffer;
  FastArrayList.prototype = Object.create(AbstractMutableList.prototype);
  FastArrayList.prototype.constructor = FastArrayList;
  //endregion
  function ByteArrayDeque_init_$Init$(initialBits, allowGrow, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      initialBits = 10;
    if (!(($mask0 & 2) === 0))
      allowGrow = true;
    ByteArrayDeque.call($this, initialBits, allowGrow);
    return $this;
  }
  function ByteArrayDeque_init_$Create$(initialBits, allowGrow, $mask0, $marker) {
    return ByteArrayDeque_init_$Init$(initialBits, allowGrow, $mask0, $marker, Object.create(ByteArrayDeque.prototype));
  }
  function ensureWrite($this, count) {
    if (count <= $this.p4l_1.l4l_1)
      return Unit_getInstance();
    if (!$this.o4l_1) {
      var message = "Can't grow ByteArrayDeque. Need to write " + count + ', but only ' + $this.p4l_1.l4l_1 + ' is available';
      println('ERROR: ' + message);
      // Inline function 'kotlin.error' call
      throw IllegalStateException_init_$Create$(toString(message));
    }
    var minNewSize = $this.p4l_1.m4l_1 + count | 0;
    var tmp = $this;
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = new RingBuffer(ilog2(minNewSize) + 2 | 0);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.ByteArrayDeque.ensureWrite.<anonymous>' call
    tmp0_also.t4l($this.p4l_1);
    tmp$ret$0 = tmp0_also;
    tmp.p4l_1 = tmp$ret$0;
  }
  function ByteArrayDeque(initialBits, allowGrow) {
    this.n4l_1 = initialBits;
    this.o4l_1 = allowGrow;
    this.p4l_1 = new RingBuffer(this.n4l_1);
    this.q4l_1 = new Int8Array(1024);
    this.r4l_1 = new Long(0, 0);
    this.s4l_1 = new Long(0, 0);
  }
  ByteArrayDeque.prototype.u4l = function () {
    return this.p4l_1.m4l_1;
  };
  ByteArrayDeque.prototype.v4l = function (buffer, offset, size) {
    ensureWrite(this, size);
    var out = this.p4l_1.v4l(buffer, offset, size);
    if (out > 0) {
      var tmp0_this = this;
      var tmp = tmp0_this;
      var tmp$ret$0;
      // Inline function 'kotlin.Long.plus' call
      var tmp0_plus = tmp0_this.r4l_1;
      tmp$ret$0 = tmp0_plus.v8(toLong(out));
      tmp.r4l_1 = tmp$ret$0;
    }
    return out;
  };
  ByteArrayDeque.prototype.w4l = function (buffer, offset, size, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      offset = 0;
    if (!(($mask0 & 4) === 0))
      size = buffer.length - offset | 0;
    return this.v4l(buffer, offset, size);
  };
  ByteArrayDeque.prototype.x4l = function (count) {
    return this.p4l_1.x4l(count);
  };
  ByteArrayDeque.prototype.y4l = function (buffer, offset, size) {
    return this.p4l_1.y4l(buffer, offset, size);
  };
  ByteArrayDeque.prototype.x7 = function () {
    this.p4l_1.x7();
  };
  ByteArrayDeque.prototype.hashCode = function () {
    return this.p4l_1.z4l();
  };
  ByteArrayDeque.prototype.equals = function (other) {
    var tmp;
    if (other instanceof ByteArrayDeque) {
      tmp = this.p4l_1.equals(other.p4l_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  ByteArrayDeque.$metadata$ = classMeta('ByteArrayDeque');
  function ShortArrayDeque_init_$Init$(initialBits, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      initialBits = 10;
    ShortArrayDeque.call($this, initialBits);
    return $this;
  }
  function ShortArrayDeque_init_$Create$(initialBits, $mask0, $marker) {
    return ShortArrayDeque_init_$Init$(initialBits, $mask0, $marker, Object.create(ShortArrayDeque.prototype));
  }
  function ensureWrite_0($this, count) {
    if (count > $this.k4m_1.g4m_1) {
      var minNewSize = $this.k4m_1.h4m_1 + count | 0;
      var newBits = ilog2(minNewSize) + 2 | 0;
      var newRing = new ShortRingBuffer(newBits);
      while ($this.k4m_1.h4m_1 > 0) {
        var read = $this.k4m_1.o4m($this.l4m_1, 0, $this.l4m_1.length);
        newRing.p4m($this.l4m_1, 0, read);
      }
      $this.k4m_1 = newRing;
    }
    return $this;
  }
  function ShortArrayDeque(initialBits) {
    this.j4m_1 = initialBits;
    this.k4m_1 = new ShortRingBuffer(this.j4m_1);
    this.l4m_1 = new Int16Array(1024);
    this.m4m_1 = new Long(0, 0);
    this.n4m_1 = new Long(0, 0);
  }
  ShortArrayDeque.prototype.u4l = function () {
    return this.k4m_1.h4m_1;
  };
  ShortArrayDeque.prototype.p4m = function (buffer, offset, size) {
    var out = ensureWrite_0(this, size).k4m_1.p4m(buffer, offset, size);
    if (out > 0) {
      var tmp0_this = this;
      var tmp = tmp0_this;
      var tmp$ret$0;
      // Inline function 'kotlin.Long.plus' call
      var tmp0_plus = tmp0_this.m4m_1;
      tmp$ret$0 = tmp0_plus.v8(toLong(out));
      tmp.m4m_1 = tmp$ret$0;
    }
    return out;
  };
  ShortArrayDeque.prototype.o4m = function (buffer, offset, size) {
    var out = this.k4m_1.o4m(buffer, offset, size);
    if (out > 0) {
      var tmp0_this = this;
      var tmp = tmp0_this;
      var tmp$ret$0;
      // Inline function 'kotlin.Long.plus' call
      var tmp0_plus = tmp0_this.n4m_1;
      tmp$ret$0 = tmp0_plus.v8(toLong(out));
      tmp.n4m_1 = tmp$ret$0;
    }
    return out;
  };
  ShortArrayDeque.prototype.x7 = function () {
    this.k4m_1.x7();
  };
  ShortArrayDeque.prototype.q4m = function (value) {
    this.l4m_1[0] = value;
    this.p4m(this.l4m_1, 0, 1);
  };
  ShortArrayDeque.prototype.hashCode = function () {
    return this.k4m_1.z4l();
  };
  ShortArrayDeque.prototype.equals = function (other) {
    var tmp;
    if (other instanceof ShortArrayDeque) {
      tmp = this.k4m_1.equals(other.k4m_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  ShortArrayDeque.$metadata$ = classMeta('ShortArrayDeque');
  function FloatArrayDeque_init_$Init$(initialBits, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      initialBits = 10;
    FloatArrayDeque.call($this, initialBits);
    return $this;
  }
  function FloatArrayDeque_init_$Create$(initialBits, $mask0, $marker) {
    return FloatArrayDeque_init_$Init$(initialBits, $mask0, $marker, Object.create(FloatArrayDeque.prototype));
  }
  function ensureWrite_1($this, count) {
    if (count > $this.a4n_1.x4m_1) {
      var minNewSize = $this.a4n_1.y4m_1 + count | 0;
      var newBits = ilog2(minNewSize) + 2 | 0;
      var newRing = new FloatRingBuffer(newBits);
      while ($this.a4n_1.y4m_1 > 0) {
        var read = $this.a4n_1.e4n($this.b4n_1, 0, $this.b4n_1.length);
        newRing.f4n($this.b4n_1, 0, read);
      }
      $this.a4n_1 = newRing;
    }
    return $this;
  }
  function FloatArrayDeque(initialBits) {
    this.z4m_1 = initialBits;
    this.a4n_1 = new FloatRingBuffer(this.z4m_1);
    this.b4n_1 = new Float32Array(1024);
    this.c4n_1 = new Long(0, 0);
    this.d4n_1 = new Long(0, 0);
  }
  FloatArrayDeque.prototype.u4l = function () {
    return this.a4n_1.y4m_1;
  };
  FloatArrayDeque.prototype.f4n = function (buffer, offset, size) {
    var out = ensureWrite_1(this, size).a4n_1.f4n(buffer, offset, size);
    if (out > 0) {
      var tmp0_this = this;
      var tmp = tmp0_this;
      var tmp$ret$0;
      // Inline function 'kotlin.Long.plus' call
      var tmp0_plus = tmp0_this.c4n_1;
      tmp$ret$0 = tmp0_plus.v8(toLong(out));
      tmp.c4n_1 = tmp$ret$0;
    }
    return out;
  };
  FloatArrayDeque.prototype.e4n = function (buffer, offset, size) {
    var out = this.a4n_1.e4n(buffer, offset, size);
    if (out > 0) {
      var tmp0_this = this;
      var tmp = tmp0_this;
      var tmp$ret$0;
      // Inline function 'kotlin.Long.plus' call
      var tmp0_plus = tmp0_this.d4n_1;
      tmp$ret$0 = tmp0_plus.v8(toLong(out));
      tmp.d4n_1 = tmp$ret$0;
    }
    return out;
  };
  FloatArrayDeque.prototype.g4n = function (buffer, offset, size, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      offset = 0;
    if (!(($mask0 & 4) === 0))
      size = buffer.length - offset | 0;
    return this.e4n(buffer, offset, size);
  };
  FloatArrayDeque.prototype.hashCode = function () {
    return this.a4n_1.z4l();
  };
  FloatArrayDeque.prototype.equals = function (other) {
    var tmp;
    if (other instanceof FloatArrayDeque) {
      tmp = this.a4n_1.equals(other.a4n_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  FloatArrayDeque.$metadata$ = classMeta('FloatArrayDeque');
  function DoubleArrayList_init_$Init$(capacity, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      capacity = 7;
    DoubleArrayList.call($this, capacity);
    return $this;
  }
  function DoubleArrayList_init_$Create$(capacity, $mask0, $marker) {
    return DoubleArrayList_init_$Init$(capacity, $mask0, $marker, Object.create(DoubleArrayList.prototype));
  }
  function Companion() {
    Companion_instance = this;
  }
  Companion.$metadata$ = objectMeta('Companion');
  var Companion_instance;
  function Companion_getInstance() {
    if (Companion_instance == null)
      new Companion();
    return Companion_instance;
  }
  function DoubleArrayList_init_$Init$_0(other, $this) {
    DoubleArrayList_init_$Init$(0, 1, null, $this);
    $this.j4n(other);
    return $this;
  }
  function DoubleArrayList_init_$Create$_0(other) {
    return DoubleArrayList_init_$Init$_0(other, Object.create(DoubleArrayList.prototype));
  }
  function DoubleArrayList_init_$Init$_1(other, $this) {
    DoubleArrayList_init_$Init$(0, 1, null, $this);
    $this.k4n(other, 0, 0, 6, null);
    return $this;
  }
  function DoubleArrayList_init_$Create$_1(other) {
    return DoubleArrayList_init_$Init$_1(other, Object.create(DoubleArrayList.prototype));
  }
  function ensure($this, count) {
    if (($this.i4n_1 + count | 0) > $this.h4n_1.length) {
      var tmp = $this;
      var tmp_0 = $this.h4n_1;
      var tmp$ret$0;
      // Inline function 'kotlin.math.max' call
      var tmp0_max = $this.i4n_1 + count | 0;
      var tmp1_max = imul($this.h4n_1.length, 3);
      tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
      var tmp_1 = copyOf(tmp_0, tmp$ret$0);
      tmp.h4n_1 = isDoubleArray(tmp_1) ? tmp_1 : THROW_CCE();
    }
  }
  function DoubleArrayList(capacity) {
    Companion_getInstance();
    var tmp = this;
    var tmp_0 = new Float64Array(capacity);
    tmp.h4n_1 = isDoubleArray(tmp_0) ? tmp_0 : THROW_CCE();
    this.i4n_1 = 0;
  }
  DoubleArrayList.prototype.l4n = function (value) {
    ensure(this, value);
    this.i4n_1 = value;
  };
  DoubleArrayList.prototype.i = function () {
    return this.i4n_1;
  };
  DoubleArrayList.prototype.x7 = function () {
    this.i4n_1 = 0;
  };
  DoubleArrayList.prototype.m4n = function (v0) {
    ensure(this, 1);
    var tmp = this.h4n_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4n_1;
    tmp0_this.i4n_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
  };
  DoubleArrayList.prototype.n4n = function (v0, v1) {
    ensure(this, 2);
    var tmp = this.h4n_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4n_1;
    tmp0_this.i4n_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
    var tmp_0 = this.h4n_1;
    var tmp2_this = this;
    var tmp3 = tmp2_this.i4n_1;
    tmp2_this.i4n_1 = tmp3 + 1 | 0;
    tmp_0[tmp3] = v1;
  };
  DoubleArrayList.prototype.o4n = function (v0, v1, v2, v3) {
    ensure(this, 4);
    var tmp = this.h4n_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4n_1;
    tmp0_this.i4n_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
    var tmp_0 = this.h4n_1;
    var tmp2_this = this;
    var tmp3 = tmp2_this.i4n_1;
    tmp2_this.i4n_1 = tmp3 + 1 | 0;
    tmp_0[tmp3] = v1;
    var tmp_1 = this.h4n_1;
    var tmp4_this = this;
    var tmp5 = tmp4_this.i4n_1;
    tmp4_this.i4n_1 = tmp5 + 1 | 0;
    tmp_1[tmp5] = v2;
    var tmp_2 = this.h4n_1;
    var tmp6_this = this;
    var tmp7 = tmp6_this.i4n_1;
    tmp6_this.i4n_1 = tmp7 + 1 | 0;
    tmp_2[tmp7] = v3;
  };
  DoubleArrayList.prototype.p4n = function (v0, v1, v2, v3, v4, v5) {
    ensure(this, 6);
    var tmp = this.h4n_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4n_1;
    tmp0_this.i4n_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
    var tmp_0 = this.h4n_1;
    var tmp2_this = this;
    var tmp3 = tmp2_this.i4n_1;
    tmp2_this.i4n_1 = tmp3 + 1 | 0;
    tmp_0[tmp3] = v1;
    var tmp_1 = this.h4n_1;
    var tmp4_this = this;
    var tmp5 = tmp4_this.i4n_1;
    tmp4_this.i4n_1 = tmp5 + 1 | 0;
    tmp_1[tmp5] = v2;
    var tmp_2 = this.h4n_1;
    var tmp6_this = this;
    var tmp7 = tmp6_this.i4n_1;
    tmp6_this.i4n_1 = tmp7 + 1 | 0;
    tmp_2[tmp7] = v3;
    var tmp_3 = this.h4n_1;
    var tmp8_this = this;
    var tmp9 = tmp8_this.i4n_1;
    tmp8_this.i4n_1 = tmp9 + 1 | 0;
    tmp_3[tmp9] = v4;
    var tmp_4 = this.h4n_1;
    var tmp10_this = this;
    var tmp11 = tmp10_this.i4n_1;
    tmp10_this.i4n_1 = tmp11 + 1 | 0;
    tmp_4[tmp11] = v5;
  };
  DoubleArrayList.prototype.q4n = function (value) {
    return this.m4n(value);
  };
  DoubleArrayList.prototype.r4n = function (value) {
    return this.j4n(value);
  };
  DoubleArrayList.prototype.s4n = function (values, offset, length) {
    ensure(this, length);
    arraycopy(isDoubleArray(values) ? values : THROW_CCE(), offset, this.h4n_1, this.i(), length);
    var tmp0_this = this;
    tmp0_this.l4n(tmp0_this.i() + length | 0);
  };
  DoubleArrayList.prototype.k4n = function (values, offset, length, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      offset = 0;
    if (!(($mask0 & 4) === 0))
      length = values.length;
    return this.s4n(values, offset, length);
  };
  DoubleArrayList.prototype.j4n = function (values) {
    return this.s4n(values.h4n_1, 0, values.i());
  };
  DoubleArrayList.prototype.m = function (index) {
    return this.h4n_1[index];
  };
  DoubleArrayList.prototype.t4n = function (index) {
    return this.h4n_1[index];
  };
  DoubleArrayList.prototype.u4n = function (index, value) {
    if (index >= this.i4n_1) {
      ensure(this, index + 1 | 0);
      this.i4n_1 = index + 1 | 0;
    }
    this.h4n_1[index] = value;
  };
  DoubleArrayList.prototype.j = function () {
    return this.n(0);
  };
  DoubleArrayList.prototype.jb = function (element) {
    var inductionVariable = 0;
    var last = this.i4n_1;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (this.h4n_1[n] === element)
          return true;
      }
       while (inductionVariable < last);
    return false;
  };
  DoubleArrayList.prototype.r = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.jb((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  DoubleArrayList.prototype.v4n = function (elements) {
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var e = tmp0_iterator.l();
      if (!this.jb(e))
        return false;
    }
    return true;
  };
  DoubleArrayList.prototype.l2 = function (elements) {
    return this.v4n(elements);
  };
  DoubleArrayList.prototype.p = function () {
    return this.i() === 0;
  };
  DoubleArrayList.prototype.w4n = function (indexA, indexB) {
    var l = this.t4n(indexA);
    var r = this.t4n(indexB);
    this.u4n(indexA, r);
    this.u4n(indexB, l);
  };
  DoubleArrayList.prototype.z4 = function (index) {
    return this.x4n(index, 1);
  };
  DoubleArrayList.prototype.x4n = function (index, count) {
    if ((index < 0 ? true : index >= this.i4n_1) ? true : (index + count | 0) > this.i4n_1)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.h4n_1[index];
    if (count > 0) {
      if (index < (this.i4n_1 - count | 0)) {
        arraycopy(this.h4n_1, index + count | 0, this.h4n_1, index, (this.i4n_1 - index | 0) - count | 0);
      }
      var tmp0_this = this;
      tmp0_this.i4n_1 = tmp0_this.i4n_1 - count | 0;
    }
    return out;
  };
  DoubleArrayList.prototype.y4n = function () {
    return copyOf(this.h4n_1, this.i4n_1);
  };
  DoubleArrayList.prototype.n = function (index) {
    return take(this.h4n_1, this.i4n_1).n(index);
  };
  DoubleArrayList.prototype.z4n = function () {
    return DoubleArrayList_init_$Create$_0(this);
  };
  DoubleArrayList.prototype.hashCode = function () {
    return contentHashCode_0(this.h4n_1, 0, this.i());
  };
  DoubleArrayList.prototype.equals = function (other) {
    if (other instanceof DoubleArrayList)
      return this.i() === other.i() ? contentEquals_0(this.h4n_1, other.h4n_1, 0, this.i()) : false;
    if (!(other == null) ? isInterface(other, List) : false)
      return equals(other, this);
    return false;
  };
  DoubleArrayList.prototype.toString = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = StringBuilder_init_$Create$(2 + imul(5, this.i()) | 0);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.DoubleArrayList.toString.<anonymous>' call
    tmp0_also.g2(_Char___init__impl__6a9atx(91));
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!(n === 0)) {
          tmp0_also.gc(', ');
        }
        tmp0_also.fc(this.t4n(n));
      }
       while (inductionVariable < last);
    tmp0_also.g2(_Char___init__impl__6a9atx(93));
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0.toString();
  };
  DoubleArrayList.$metadata$ = classMeta('DoubleArrayList', [IDoubleArrayList]);
  function FloatArrayList_init_$Init$(capacity, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      capacity = 7;
    FloatArrayList.call($this, capacity);
    return $this;
  }
  function Companion_0() {
    Companion_instance_0 = this;
  }
  Companion_0.$metadata$ = objectMeta('Companion');
  var Companion_instance_0;
  function Companion_getInstance_0() {
    if (Companion_instance_0 == null)
      new Companion_0();
    return Companion_instance_0;
  }
  function FloatArrayList_init_$Init$_0(other, $this) {
    FloatArrayList_init_$Init$(0, 1, null, $this);
    $this.c4o(other, 0, 0, 6, null);
    return $this;
  }
  function FloatArrayList_init_$Create$(other) {
    return FloatArrayList_init_$Init$_0(other, Object.create(FloatArrayList.prototype));
  }
  function ensure_0($this, count) {
    if (($this.b4o_1 + count | 0) > $this.a4o_1.length) {
      var tmp = $this;
      var tmp_0 = $this.a4o_1;
      var tmp$ret$0;
      // Inline function 'kotlin.math.max' call
      var tmp0_max = $this.b4o_1 + count | 0;
      var tmp1_max = imul($this.a4o_1.length, 3);
      tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
      var tmp_1 = copyOf_0(tmp_0, tmp$ret$0);
      tmp.a4o_1 = isFloatArray(tmp_1) ? tmp_1 : THROW_CCE();
    }
  }
  function FloatArrayList(capacity) {
    Companion_getInstance_0();
    var tmp = this;
    var tmp_0 = new Float32Array(capacity);
    tmp.a4o_1 = isFloatArray(tmp_0) ? tmp_0 : THROW_CCE();
    this.b4o_1 = 0;
  }
  FloatArrayList.prototype.l4n = function (value) {
    ensure_0(this, value);
    this.b4o_1 = value;
  };
  FloatArrayList.prototype.i = function () {
    return this.b4o_1;
  };
  FloatArrayList.prototype.x7 = function () {
    this.b4o_1 = 0;
  };
  FloatArrayList.prototype.d4o = function (v0, v1, v2, v3) {
    ensure_0(this, 4);
    var tmp = this.a4o_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.b4o_1;
    tmp0_this.b4o_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
    var tmp_0 = this.a4o_1;
    var tmp2_this = this;
    var tmp3 = tmp2_this.b4o_1;
    tmp2_this.b4o_1 = tmp3 + 1 | 0;
    tmp_0[tmp3] = v1;
    var tmp_1 = this.a4o_1;
    var tmp4_this = this;
    var tmp5 = tmp4_this.b4o_1;
    tmp4_this.b4o_1 = tmp5 + 1 | 0;
    tmp_1[tmp5] = v2;
    var tmp_2 = this.a4o_1;
    var tmp6_this = this;
    var tmp7 = tmp6_this.b4o_1;
    tmp6_this.b4o_1 = tmp7 + 1 | 0;
    tmp_2[tmp7] = v3;
  };
  FloatArrayList.prototype.e4o = function (values, offset, length) {
    ensure_0(this, length);
    arraycopy_0(isFloatArray(values) ? values : THROW_CCE(), offset, this.a4o_1, this.i(), length);
    var tmp0_this = this;
    tmp0_this.l4n(tmp0_this.i() + length | 0);
  };
  FloatArrayList.prototype.c4o = function (values, offset, length, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      offset = 0;
    if (!(($mask0 & 4) === 0))
      length = values.length;
    return this.e4o(values, offset, length);
  };
  FloatArrayList.prototype.t4n = function (index) {
    return this.a4o_1[index];
  };
  FloatArrayList.prototype.j = function () {
    return this.n(0);
  };
  FloatArrayList.prototype.f4o = function (element) {
    var inductionVariable = 0;
    var last = this.b4o_1;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (this.a4o_1[n] === element)
          return true;
      }
       while (inductionVariable < last);
    return false;
  };
  FloatArrayList.prototype.r = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.f4o((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  FloatArrayList.prototype.g4o = function (elements) {
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var e = tmp0_iterator.l();
      if (!this.f4o(e))
        return false;
    }
    return true;
  };
  FloatArrayList.prototype.l2 = function (elements) {
    return this.g4o(elements);
  };
  FloatArrayList.prototype.p = function () {
    return this.i() === 0;
  };
  FloatArrayList.prototype.n = function (index) {
    return take_0(this.a4o_1, this.b4o_1).n(index);
  };
  FloatArrayList.prototype.hashCode = function () {
    return contentHashCode_1(this.a4o_1, 0, this.i());
  };
  FloatArrayList.prototype.equals = function (other) {
    if (other instanceof FloatArrayList)
      return this.i() === other.i() ? contentEquals_1(this.a4o_1, other.a4o_1, 0, this.i()) : false;
    if (!(other == null) ? isInterface(other, List) : false)
      return equals(other, this);
    return false;
  };
  FloatArrayList.prototype.toString = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = StringBuilder_init_$Create$(2 + imul(5, this.i()) | 0);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.FloatArrayList.toString.<anonymous>' call
    tmp0_also.g2(_Char___init__impl__6a9atx(91));
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!(n === 0)) {
          tmp0_also.gc(', ');
        }
        tmp0_also.fc(this.t4n(n));
      }
       while (inductionVariable < last);
    tmp0_also.g2(_Char___init__impl__6a9atx(93));
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0.toString();
  };
  FloatArrayList.$metadata$ = classMeta('FloatArrayList', [Collection]);
  function IntArrayList_init_$Init$(capacity, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      capacity = 7;
    IntArrayList.call($this, capacity);
    return $this;
  }
  function IntArrayList_init_$Create$(capacity, $mask0, $marker) {
    return IntArrayList_init_$Init$(capacity, $mask0, $marker, Object.create(IntArrayList.prototype));
  }
  function Companion_1() {
    Companion_instance_1 = this;
  }
  Companion_1.$metadata$ = objectMeta('Companion');
  var Companion_instance_1;
  function Companion_getInstance_1() {
    if (Companion_instance_1 == null)
      new Companion_1();
    return Companion_instance_1;
  }
  function IntArrayList_init_$Init$_0(other, $this) {
    IntArrayList_init_$Init$(0, 1, null, $this);
    $this.j4o(other);
    return $this;
  }
  function IntArrayList_init_$Create$_0(other) {
    return IntArrayList_init_$Init$_0(other, Object.create(IntArrayList.prototype));
  }
  function IntArrayList_init_$Init$_1(other, $this) {
    IntArrayList_init_$Init$(0, 1, null, $this);
    $this.k4o(other, 0, 0, 6, null);
    return $this;
  }
  function IntArrayList_init_$Create$_1(other) {
    return IntArrayList_init_$Init$_1(other, Object.create(IntArrayList.prototype));
  }
  function IntArrayList(capacity) {
    Companion_getInstance_1();
    var tmp = this;
    var tmp_0 = new Int32Array(capacity);
    tmp.h4o_1 = isIntArray(tmp_0) ? tmp_0 : THROW_CCE();
    this.i4o_1 = 0;
  }
  IntArrayList.prototype.s3l = function () {
    return this.h4o_1;
  };
  IntArrayList.prototype.l4n = function (value) {
    this.l4o(value);
    this.i4o_1 = value;
  };
  IntArrayList.prototype.i = function () {
    return this.i4o_1;
  };
  IntArrayList.prototype.l4o = function (count) {
    if ((this.i4o_1 + count | 0) > this.h4o_1.length) {
      var tmp = this;
      var tmp_0 = this.h4o_1;
      var tmp$ret$0;
      // Inline function 'kotlin.math.max' call
      var tmp0_max = this.i4o_1 + count | 0;
      var tmp1_max = imul(this.h4o_1.length, 3);
      tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
      var tmp_1 = copyOf_1(tmp_0, tmp$ret$0);
      tmp.h4o_1 = isIntArray(tmp_1) ? tmp_1 : THROW_CCE();
    }
  };
  IntArrayList.prototype.x7 = function () {
    this.i4o_1 = 0;
  };
  IntArrayList.prototype.m4o = function (v0) {
    this.l4o(1);
    var tmp = this.h4o_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4o_1;
    tmp0_this.i4o_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
  };
  IntArrayList.prototype.n4o = function (v0, v1, v2, v3) {
    this.l4o(4);
    var tmp = this.h4o_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4o_1;
    tmp0_this.i4o_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
    var tmp_0 = this.h4o_1;
    var tmp2_this = this;
    var tmp3 = tmp2_this.i4o_1;
    tmp2_this.i4o_1 = tmp3 + 1 | 0;
    tmp_0[tmp3] = v1;
    var tmp_1 = this.h4o_1;
    var tmp4_this = this;
    var tmp5 = tmp4_this.i4o_1;
    tmp4_this.i4o_1 = tmp5 + 1 | 0;
    tmp_1[tmp5] = v2;
    var tmp_2 = this.h4o_1;
    var tmp6_this = this;
    var tmp7 = tmp6_this.i4o_1;
    tmp6_this.i4o_1 = tmp7 + 1 | 0;
    tmp_2[tmp7] = v3;
  };
  IntArrayList.prototype.o4o = function (v0, v1, v2, v3, v4, v5) {
    this.l4o(6);
    var tmp = this.h4o_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4o_1;
    tmp0_this.i4o_1 = tmp1 + 1 | 0;
    tmp[tmp1] = v0;
    var tmp_0 = this.h4o_1;
    var tmp2_this = this;
    var tmp3 = tmp2_this.i4o_1;
    tmp2_this.i4o_1 = tmp3 + 1 | 0;
    tmp_0[tmp3] = v1;
    var tmp_1 = this.h4o_1;
    var tmp4_this = this;
    var tmp5 = tmp4_this.i4o_1;
    tmp4_this.i4o_1 = tmp5 + 1 | 0;
    tmp_1[tmp5] = v2;
    var tmp_2 = this.h4o_1;
    var tmp6_this = this;
    var tmp7 = tmp6_this.i4o_1;
    tmp6_this.i4o_1 = tmp7 + 1 | 0;
    tmp_2[tmp7] = v3;
    var tmp_3 = this.h4o_1;
    var tmp8_this = this;
    var tmp9 = tmp8_this.i4o_1;
    tmp8_this.i4o_1 = tmp9 + 1 | 0;
    tmp_3[tmp9] = v4;
    var tmp_4 = this.h4o_1;
    var tmp10_this = this;
    var tmp11 = tmp10_this.i4o_1;
    tmp10_this.i4o_1 = tmp11 + 1 | 0;
    tmp_4[tmp11] = v5;
  };
  IntArrayList.prototype.r1t = function (value) {
    return this.m4o(value);
  };
  IntArrayList.prototype.p4o = function (value) {
    return this.j4o(value);
  };
  IntArrayList.prototype.q4o = function (values, offset, length) {
    this.l4o(length);
    arraycopy_1(isIntArray(values) ? values : THROW_CCE(), offset, this.h4o_1, this.i(), length);
    var tmp0_this = this;
    tmp0_this.l4n(tmp0_this.i() + length | 0);
  };
  IntArrayList.prototype.k4o = function (values, offset, length, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      offset = 0;
    if (!(($mask0 & 4) === 0))
      length = values.length;
    return this.q4o(values, offset, length);
  };
  IntArrayList.prototype.j4o = function (values) {
    return this.q4o(values.h4o_1, 0, values.i());
  };
  IntArrayList.prototype.m = function (index) {
    return this.h4o_1[index];
  };
  IntArrayList.prototype.t4n = function (index) {
    return this.h4o_1[index];
  };
  IntArrayList.prototype.r4o = function (index, value) {
    if (index >= this.i4o_1) {
      this.l4o(index + 1 | 0);
      this.i4o_1 = index + 1 | 0;
    }
    this.h4o_1[index] = value;
  };
  IntArrayList.prototype.j = function () {
    return this.n(0);
  };
  IntArrayList.prototype.v9 = function (element) {
    var inductionVariable = 0;
    var last = this.i4o_1;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (this.h4o_1[n] === element)
          return true;
      }
       while (inductionVariable < last);
    return false;
  };
  IntArrayList.prototype.r = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.v9((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  IntArrayList.prototype.s4o = function (elements) {
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var e = tmp0_iterator.l();
      if (!this.v9(e))
        return false;
    }
    return true;
  };
  IntArrayList.prototype.l2 = function (elements) {
    return this.s4o(elements);
  };
  IntArrayList.prototype.p = function () {
    return this.i() === 0;
  };
  IntArrayList.prototype.t4o = function () {
    return !(this.i() === 0);
  };
  IntArrayList.prototype.u4o = function () {
    var tmp;
    if (this.p()) {
      throw IndexOutOfBoundsException_init_$Create$();
    } else {
      tmp = this.h4o_1[0];
    }
    return tmp;
  };
  IntArrayList.prototype.v4o = function () {
    var tmp;
    if (this.p()) {
      throw IndexOutOfBoundsException_init_$Create$();
    } else {
      tmp = this.h4o_1[this.i4o_1 - 1 | 0];
    }
    return tmp;
  };
  IntArrayList.prototype.w4o = function (index, value) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.IntArrayList.insertAt.<anonymous>' call
    this.l4o(1);
    if (this.t4o()) {
      arraycopy_1(this.h4o_1, index, this.h4o_1, index + 1 | 0, this.i4o_1 - index | 0);
    }
    this.h4o_1[index] = value;
    var tmp0_this = this;
    var tmp1 = tmp0_this.i4o_1;
    tmp0_this.i4o_1 = tmp1 + 1 | 0;
    tmp$ret$0 = this;
    return tmp$ret$0;
  };
  IntArrayList.prototype.w4n = function (indexA, indexB) {
    var l = this.t4n(indexA);
    var r = this.t4n(indexB);
    this.r4o(indexA, r);
    this.r4o(indexB, l);
  };
  IntArrayList.prototype.z4 = function (index) {
    return this.x4n(index, 1);
  };
  IntArrayList.prototype.x4n = function (index, count) {
    if ((index < 0 ? true : index >= this.i4o_1) ? true : (index + count | 0) > this.i4o_1)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.h4o_1[index];
    if (count > 0) {
      if (index < (this.i4o_1 - count | 0)) {
        arraycopy_1(this.h4o_1, index + count | 0, this.h4o_1, index, (this.i4o_1 - index | 0) - count | 0);
      }
      var tmp0_this = this;
      tmp0_this.i4o_1 = tmp0_this.i4o_1 - count | 0;
    }
    return out;
  };
  IntArrayList.prototype.x4o = function () {
    return copyOf_1(this.h4o_1, this.i4o_1);
  };
  IntArrayList.prototype.n = function (index) {
    return take_1(this.h4o_1, this.i4o_1).n(index);
  };
  IntArrayList.prototype.hashCode = function () {
    return contentHashCode_2(this.h4o_1, 0, this.i());
  };
  IntArrayList.prototype.equals = function (other) {
    if (other instanceof IntArrayList)
      return this.i() === other.i() ? contentEquals_2(this.h4o_1, other.h4o_1, 0, this.i()) : false;
    if (!(other == null) ? isInterface(other, List) : false)
      return equals(other, this);
    return false;
  };
  IntArrayList.prototype.toString = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = StringBuilder_init_$Create$(2 + imul(5, this.i()) | 0);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.IntArrayList.toString.<anonymous>' call
    tmp0_also.g2(_Char___init__impl__6a9atx(91));
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!(n === 0)) {
          tmp0_also.gc(', ');
        }
        tmp0_also.fc(this.t4n(n));
      }
       while (inductionVariable < last);
    tmp0_also.g2(_Char___init__impl__6a9atx(93));
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0.toString();
  };
  IntArrayList.$metadata$ = classMeta('IntArrayList', [Collection]);
  function intArrayListOf(values) {
    return IntArrayList_init_$Create$_1(values.slice());
  }
  function toIntArrayList(_this__u8e3s4) {
    return IntArrayList_init_$Create$_1(_this__u8e3s4.slice());
  }
  function IDoubleArrayList() {
  }
  IDoubleArrayList.$metadata$ = interfaceMeta('IDoubleArrayList', [Collection]);
  function floatArrayListOf(values) {
    return FloatArrayList_init_$Create$(values.slice());
  }
  function doubleArrayListOf(values) {
    return DoubleArrayList_init_$Create$_1(values.slice());
  }
  function sort(_this__u8e3s4, start, end, reversed) {
    return genericSort_0(_this__u8e3s4, start, end - 1 | 0, DoubleArrayListSortOps_getInstance(), reversed);
  }
  function sort$default(_this__u8e3s4, start, end, reversed, $mask0, $handler) {
    if (!(($mask0 & 1) === 0))
      start = 0;
    if (!(($mask0 & 2) === 0))
      end = _this__u8e3s4.i();
    if (!(($mask0 & 4) === 0))
      reversed = false;
    return sort(_this__u8e3s4, start, end, reversed);
  }
  function mapInt(_this__u8e3s4, callback) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = new Int32Array(_this__u8e3s4.length);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        tmp0_also[n] = callback(new Char(_this__u8e3s4[n]));
      }
       while (inductionVariable < last);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function mapInt_0(_this__u8e3s4, callback) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = new IntArrayList((coerceAtLeast(_this__u8e3s4.w() - _this__u8e3s4.v() | 0, 0) / _this__u8e3s4.t1_1 | 0) + 1 | 0);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
    var nestedFirst = _this__u8e3s4.v();
    var nestedLast = _this__u8e3s4.w();
    var stepArg = _this__u8e3s4.t1_1;
    if (stepArg <= 0)
      THROW_IAE('Step must be positive, was: ' + stepArg + '.');
    var inductionVariable = nestedFirst;
    var last = getProgressionLastElement(nestedFirst, nestedLast, stepArg);
    var step = stepArg;
    if (inductionVariable <= last)
      do {
        var v = inductionVariable;
        inductionVariable = inductionVariable + step | 0;
        tmp0_also.m4o(callback(v));
      }
       while (!(v === last));
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function mapInt_1(_this__u8e3s4, callback) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = new Int32Array(_this__u8e3s4.length);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        tmp0_also[n] = callback(_this__u8e3s4[n]);
      }
       while (inductionVariable < last);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function mapInt_2(_this__u8e3s4, callback) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = new Int32Array(_this__u8e3s4.length);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        tmp0_also[n] = callback(_this__u8e3s4[n]);
      }
       while (inductionVariable < last);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function reverse(_this__u8e3s4, start, end) {
    return DoubleArrayListSortOps_getInstance().y4o(_this__u8e3s4, start, end - 1 | 0);
  }
  function reverse$default(_this__u8e3s4, start, end, $mask0, $handler) {
    if (!(($mask0 & 1) === 0))
      start = 0;
    if (!(($mask0 & 2) === 0))
      end = _this__u8e3s4.i();
    return reverse(_this__u8e3s4, start, end);
  }
  function DoubleArrayListSortOps() {
    DoubleArrayListSortOps_instance = this;
    SortOps.call(this);
  }
  DoubleArrayListSortOps.prototype.z4o = function (subject, l, r) {
    return compareTo(subject.t4n(l), subject.t4n(r));
  };
  DoubleArrayListSortOps.prototype.a4p = function (subject, l, r) {
    return this.z4o(subject instanceof DoubleArrayList ? subject : THROW_CCE(), l, r);
  };
  DoubleArrayListSortOps.prototype.b4p = function (subject, indexL, indexR) {
    var l = subject.t4n(indexL);
    var r = subject.t4n(indexR);
    subject.u4n(indexR, l);
    subject.u4n(indexL, r);
  };
  DoubleArrayListSortOps.prototype.c4p = function (subject, indexL, indexR) {
    return this.b4p(subject instanceof DoubleArrayList ? subject : THROW_CCE(), indexL, indexR);
  };
  DoubleArrayListSortOps.$metadata$ = objectMeta('DoubleArrayListSortOps', undefined, undefined, undefined, undefined, SortOps.prototype);
  var DoubleArrayListSortOps_instance;
  function DoubleArrayListSortOps_getInstance() {
    if (DoubleArrayListSortOps_instance == null)
      new DoubleArrayListSortOps();
    return DoubleArrayListSortOps_instance;
  }
  function mapInt_3(_this__u8e3s4, callback) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = IntArrayList_init_$Create$(0, 1, null);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.mapInt.<anonymous>' call
    var tmp0_iterator = _this__u8e3s4.j();
    while (tmp0_iterator.k()) {
      var v = tmp0_iterator.l();
      tmp0_also.m4o(callback(v));
    }
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function toCaseInsensitiveMap(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = CaseInsensitiveStringMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.toCaseInsensitiveMap.<anonymous>' call
    tmp0_also.h4p(_this__u8e3s4);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function CaseInsensitiveStringMap_init_$Init$($this) {
    CaseInsensitiveStringMap.call($this, LinkedHashMap_init_$Create$(), LinkedHashMap_init_$Create$(), LinkedHashMap_init_$Create$());
    return $this;
  }
  function CaseInsensitiveStringMap_init_$Create$() {
    return CaseInsensitiveStringMap_init_$Init$(Object.create(CaseInsensitiveStringMap.prototype));
  }
  function CaseInsensitiveStringMap(mapOrig, lcToOrig, mapLC) {
    this.e4p_1 = mapOrig;
    this.f4p_1 = lcToOrig;
    this.g4p_1 = mapLC;
  }
  CaseInsensitiveStringMap.prototype.j1 = function () {
    return this.e4p_1.j1();
  };
  CaseInsensitiveStringMap.prototype.v3 = function () {
    return this.e4p_1.v3();
  };
  CaseInsensitiveStringMap.prototype.i = function () {
    return this.e4p_1.i();
  };
  CaseInsensitiveStringMap.prototype.lh = function () {
    return this.e4p_1.lh();
  };
  CaseInsensitiveStringMap.prototype.p = function () {
    return this.e4p_1.p();
  };
  CaseInsensitiveStringMap.prototype.b19 = function (key) {
    var tmp$ret$1;
    // Inline function 'kotlin.text.toLowerCase' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = key;
    tmp$ret$1 = tmp$ret$0.toLowerCase();
    return this.g4p_1.r3(tmp$ret$1);
  };
  CaseInsensitiveStringMap.prototype.r3 = function (key) {
    if (!(!(key == null) ? typeof key === 'string' : false))
      return false;
    return this.b19((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
  };
  CaseInsensitiveStringMap.prototype.x7 = function () {
    this.e4p_1.x7();
    this.g4p_1.x7();
    this.f4p_1.x7();
  };
  CaseInsensitiveStringMap.prototype.c19 = function (key) {
    var tmp$ret$1;
    // Inline function 'kotlin.text.toLowerCase' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = key;
    tmp$ret$1 = tmp$ret$0.toLowerCase();
    return this.g4p_1.q(tmp$ret$1);
  };
  CaseInsensitiveStringMap.prototype.q = function (key) {
    if (!(!(key == null) ? typeof key === 'string' : false))
      return null;
    return this.c19((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
  };
  CaseInsensitiveStringMap.prototype.i4p = function (key, value) {
    this.i2w(key);
    // Inline function 'kotlin.collections.set' call
    var tmp0_set = this.e4p_1;
    tmp0_set.a(key, value);
    // Inline function 'kotlin.collections.set' call
    var tmp1_set = this.f4p_1;
    var tmp$ret$1;
    // Inline function 'kotlin.text.toLowerCase' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = key;
    tmp$ret$1 = tmp$ret$0.toLowerCase();
    var tmp2_set = tmp$ret$1;
    tmp1_set.a(tmp2_set, key);
    var tmp$ret$3;
    // Inline function 'kotlin.text.toLowerCase' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = key;
    tmp$ret$3 = tmp$ret$2.toLowerCase();
    return this.g4p_1.a(tmp$ret$3, value);
  };
  CaseInsensitiveStringMap.prototype.a = function (key, value) {
    var tmp = (!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE();
    return this.i4p(tmp, (value == null ? true : isObject(value)) ? value : THROW_CCE());
  };
  CaseInsensitiveStringMap.prototype.h4p = function (from) {
    var tmp$ret$0;
    // Inline function 'kotlin.collections.iterator' call
    tmp$ret$0 = from.j1().j();
    var tmp0_iterator = tmp$ret$0;
    while (tmp0_iterator.k()) {
      var v = tmp0_iterator.l();
      this.i4p(v.k1(), v.l1());
    }
  };
  CaseInsensitiveStringMap.prototype.u4 = function (from) {
    return this.h4p(from);
  };
  CaseInsensitiveStringMap.prototype.i2w = function (key) {
    var tmp$ret$1;
    // Inline function 'kotlin.text.toLowerCase' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = key;
    tmp$ret$1 = tmp$ret$0.toLowerCase();
    var lkey = tmp$ret$1;
    var okey = this.f4p_1.q(lkey);
    var tmp$ret$2;
    // Inline function 'kotlin.collections.remove' call
    var tmp0_remove = this.e4p_1;
    tmp$ret$2 = (isInterface(tmp0_remove, MutableMap) ? tmp0_remove : THROW_CCE()).y4(okey);
    var res = this.g4p_1.y4(lkey);
    this.f4p_1.y4(lkey);
    return res;
  };
  CaseInsensitiveStringMap.prototype.y4 = function (key) {
    if (!(!(key == null) ? typeof key === 'string' : false))
      return null;
    return this.i2w((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
  };
  CaseInsensitiveStringMap.prototype.equals = function (other) {
    var tmp;
    if (other instanceof CaseInsensitiveStringMap) {
      tmp = equals(this.g4p_1, other.g4p_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  CaseInsensitiveStringMap.prototype.hashCode = function () {
    return hashCode(this.g4p_1);
  };
  CaseInsensitiveStringMap.$metadata$ = classMeta('CaseInsensitiveStringMap', [MutableMap]);
  function _get__data__kyoi3c($this) {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.fastCastTo' call
    var tmp0_fastCastTo = $this.l4p_1;
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = tmp0_fastCastTo;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    return tmp$ret$2;
  }
  function _get_capacity__a9k9f3($this) {
    return $this.l4p_1.length;
  }
  function resizeIfRequiredFor($this, count) {
    if (($this.i() + count | 0) > _get_capacity__a9k9f3($this)) {
      var i = $this.l4p_1;
      var istart = $this.j4p_1;
      var tmp$ret$1;
      // Inline function 'kotlin.comparisons.maxOf' call
      var tmp2_maxOf = $this.l4p_1.length + 7 | 0;
      var tmp$ret$0;
      // Inline function 'kotlin.comparisons.maxOf' call
      var tmp0_maxOf = $this.i() + count | 0;
      var tmp1_maxOf = imul($this.l4p_1.length, 2);
      tmp$ret$0 = Math.max(tmp0_maxOf, tmp1_maxOf);
      var tmp3_maxOf = tmp$ret$0;
      tmp$ret$1 = Math.max(tmp2_maxOf, tmp3_maxOf);
      var _o = new Int32Array(tmp$ret$1);
      var o = isIntArray(_o) ? _o : THROW_CCE();
      copyCyclic($this, i, istart, o, $this.k4p_1);
      $this.l4p_1 = o;
      $this.j4p_1 = 0;
    }
  }
  function copyCyclic($this, i, istart, o, count) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = i.length - istart | 0;
    tmp$ret$0 = Math.min(tmp0_min, count);
    var size1 = tmp$ret$0;
    var size2 = count - size1 | 0;
    arraycopy_1(i, istart, o, 0, size1);
    if (size2 > 0) {
      arraycopy_1(i, 0, o, size1, size2);
    }
  }
  function _addLast($this, item) {
    $this.l4p_1[($this.j4p_1 + $this.k4p_1 | 0) % _get_capacity__a9k9f3($this) | 0] = item;
    var tmp0_this = $this;
    var tmp1 = tmp0_this.k4p_1;
    tmp0_this.k4p_1 = tmp1 + 1 | 0;
  }
  function nullify($this, index) {
    _get__data__kyoi3c($this)[index] = 0;
  }
  function internalIndex($this, index) {
    return umod($this.j4p_1 + index | 0, _get_capacity__a9k9f3($this));
  }
  function IntDeque$iterator$1($that, this$0) {
    this.n4p_1 = $that;
    this.o4p_1 = this$0;
    this.m4p_1 = 0;
  }
  IntDeque$iterator$1.prototype.l = function () {
    var tmp0_this = this;
    var tmp1 = tmp0_this.m4p_1;
    tmp0_this.m4p_1 = tmp1 + 1 | 0;
    return this.n4p_1.m(tmp1);
  };
  IntDeque$iterator$1.prototype.k = function () {
    return this.m4p_1 < this.o4p_1.i();
  };
  IntDeque$iterator$1.prototype.b5 = function () {
    var tmp0_this = this;
    tmp0_this.m4p_1 = tmp0_this.m4p_1 - 1 | 0;
    this.o4p_1.z4(tmp0_this.m4p_1);
  };
  IntDeque$iterator$1.$metadata$ = classMeta(undefined, [MutableIterator]);
  function IntDeque(initialCapacity) {
    this.j4p_1 = 0;
    this.k4p_1 = 0;
    var tmp = this;
    var tmp_0 = new Int32Array(initialCapacity);
    tmp.l4p_1 = isIntArray(tmp_0) ? tmp_0 : THROW_CCE();
  }
  IntDeque.prototype.i = function () {
    return this.k4p_1;
  };
  IntDeque.prototype.p = function () {
    return this.i() === 0;
  };
  IntDeque.prototype.p4p = function (item) {
    resizeIfRequiredFor(this, 1);
    _addLast(this, item);
  };
  IntDeque.prototype.q4p = function (list) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.IntDeque._addAll' call
    var tmp0__addAll = list.i();
    resizeIfRequiredFor(this, tmp0__addAll);
    var base = this.j4p_1 + this.k4p_1 | 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0__addAll)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = this.l4p_1;
        var tmp_0 = (base + n | 0) % _get_capacity__a9k9f3(this) | 0;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.IntDeque.addAll.<anonymous>' call
        tmp$ret$0 = list.m(n);
        tmp[tmp_0] = tmp$ret$0;
      }
       while (inductionVariable < tmp0__addAll);
    var tmp1_this = this;
    tmp1_this.k4p_1 = tmp1_this.k4p_1 + tmp0__addAll | 0;
    tmp$ret$1 = true;
    return tmp$ret$1;
  };
  IntDeque.prototype.r4p = function (elements) {
    return this.q4p(toList(elements));
  };
  IntDeque.prototype.o = function (elements) {
    return this.r4p(elements);
  };
  IntDeque.prototype.s4p = function () {
    if (this.k4p_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.w9();
    nullify(this, this.j4p_1);
    this.j4p_1 = (this.j4p_1 + 1 | 0) % _get_capacity__a9k9f3(this) | 0;
    var tmp0_this = this;
    var tmp1 = tmp0_this.k4p_1;
    tmp0_this.k4p_1 = tmp1 - 1 | 0;
    return out;
  };
  IntDeque.prototype.t4p = function () {
    if (this.k4p_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.x9();
    nullify(this, internalIndex(this, this.i() - 1 | 0));
    var tmp0_this = this;
    var tmp1 = tmp0_this.k4p_1;
    tmp0_this.k4p_1 = tmp1 - 1 | 0;
    return out;
  };
  IntDeque.prototype.z4 = function (index) {
    if (index < 0 ? true : index >= this.i())
      throw IndexOutOfBoundsException_init_$Create$();
    if (index === 0)
      return this.s4p();
    if (index === (this.i() - 1 | 0))
      return this.t4p();
    var old = this.m(index);
    if (index < (this.i() / 2 | 0)) {
      var inductionVariable = index;
      if (1 <= inductionVariable)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + -1 | 0;
          this.r4o(n, this.m(n - 1 | 0));
        }
         while (1 <= inductionVariable);
      this.j4p_1 = umod(this.j4p_1 + 1 | 0, _get_capacity__a9k9f3(this));
    } else {
      var inductionVariable_0 = index;
      var last = this.i() - 1 | 0;
      if (inductionVariable_0 < last)
        do {
          var n_0 = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + 1 | 0;
          this.r4o(n_0, this.m(n_0 + 1 | 0));
        }
         while (inductionVariable_0 < last);
    }
    var tmp2_this = this;
    var tmp3 = tmp2_this.k4p_1;
    tmp2_this.k4p_1 = tmp3 - 1 | 0;
    return old;
  };
  IntDeque.prototype.u4p = function (element) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.IntDeque.add.<anonymous>' call
    this.p4p(element);
    tmp$ret$0 = true;
    return tmp$ret$0;
  };
  IntDeque.prototype.c = function (element) {
    return this.u4p((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  IntDeque.prototype.x7 = function () {
    this.k4p_1 = 0;
  };
  IntDeque.prototype.v4p = function (element) {
    var index = this.w4p(element);
    if (index >= 0) {
      this.z4(index);
    }
    return index >= 0;
  };
  IntDeque.prototype.c5 = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.v4p((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  IntDeque.prototype.w9 = function () {
    return this.l4p_1[this.j4p_1];
  };
  IntDeque.prototype.x9 = function () {
    return this.l4p_1[internalIndex(this, this.i() - 1 | 0)];
  };
  IntDeque.prototype.r4o = function (index, value) {
    this.l4p_1[internalIndex(this, index)] = value;
  };
  IntDeque.prototype.m = function (index) {
    return this.l4p_1[internalIndex(this, index)];
  };
  IntDeque.prototype.v9 = function (element) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp0_any = until(0, this.i());
      var tmp;
      if (isInterface(tmp0_any, Collection)) {
        tmp = tmp0_any.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var inductionVariable = tmp0_any.r1_1;
      var last = tmp0_any.s1_1;
      if (inductionVariable <= last)
        do {
          var element_0 = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$1;
          // Inline function 'com.soywiz.kds.IntDeque.contains.<anonymous>' call
          tmp$ret$1 = this.m(element_0) === element;
          if (tmp$ret$1) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
         while (!(element_0 === last));
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  IntDeque.prototype.r = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.v9((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  IntDeque.prototype.w4p = function (element) {
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (this.m(n) === element)
          return n;
      }
       while (inductionVariable < last);
    return -1;
  };
  IntDeque.prototype.s4o = function (elements) {
    var tmp$ret$2;
    // Inline function 'kotlin.collections.map' call
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(elements, 10));
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var item = tmp0_iterator.l();
      var tmp$ret$0;
      // Inline function 'com.soywiz.kds.IntDeque.containsAll.<anonymous>' call
      tmp$ret$0 = to(item, 0);
      tmp0_mapTo.c(tmp$ret$0);
    }
    tmp$ret$1 = tmp0_mapTo;
    tmp$ret$2 = tmp$ret$1;
    var emap = toLinkedMap(tmp$ret$2);
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var it = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var e = this.m(it);
        var tmp$ret$4;
        // Inline function 'kotlin.collections.contains' call
        var tmp$ret$3;
        // Inline function 'kotlin.collections.containsKey' call
        tmp$ret$3 = (isInterface(emap, Map_0) ? emap : THROW_CCE()).r3(e);
        tmp$ret$4 = tmp$ret$3;
        if (tmp$ret$4) {
          // Inline function 'kotlin.collections.set' call
          emap.a(e, 1);
        }
      }
       while (inductionVariable < last);
    var tmp$ret$5;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var tmp0_all = emap.lh();
      var tmp;
      if (isInterface(tmp0_all, Collection)) {
        tmp = tmp0_all.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$5 = true;
        break $l$block_0;
      }
      var tmp0_iterator_0 = tmp0_all.j();
      while (tmp0_iterator_0.k()) {
        var element = tmp0_iterator_0.l();
        var tmp$ret$6;
        // Inline function 'com.soywiz.kds.IntDeque.containsAll.<anonymous>' call
        tmp$ret$6 = element === 1;
        if (!tmp$ret$6) {
          tmp$ret$5 = false;
          break $l$block_0;
        }
      }
      tmp$ret$5 = true;
    }
    return tmp$ret$5;
  };
  IntDeque.prototype.l2 = function (elements) {
    return this.s4o(elements);
  };
  IntDeque.prototype.j = function () {
    var that = this;
    return new IntDeque$iterator$1(that, this);
  };
  IntDeque.prototype.hashCode = function () {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.internal.contentHashCode' call
    var tmp1_contentHashCode = this.i();
    var result = 1;
    var inductionVariable = 0;
    if (inductionVariable < tmp1_contentHashCode)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = imul(31, result);
        var tmp$ret$1;
        // Inline function 'kotlin.hashCode' call
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.IntDeque.hashCode.<anonymous>' call
        tmp$ret$0 = this.m(n);
        var tmp0_hashCode = tmp$ret$0;
        var tmp0_safe_receiver = tmp0_hashCode;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
        tmp$ret$1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
        result = tmp + tmp$ret$1 | 0;
      }
       while (inductionVariable < tmp1_contentHashCode);
    tmp$ret$2 = result;
    return tmp$ret$2;
  };
  IntDeque.prototype.equals = function (other) {
    if (!(other instanceof IntDeque))
      return false;
    if (!(other.i() === this.i()))
      return false;
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!(this.m(n) === other.m(n)))
          return false;
      }
       while (inductionVariable < last);
    return true;
  };
  IntDeque.prototype.toString = function () {
    var sb = StringBuilder_init_$Create$_0();
    sb.g2(_Char___init__impl__6a9atx(91));
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        sb.fc(this.m(n));
        if (!(n === (this.i() - 1 | 0))) {
          sb.gc(', ');
        }
      }
       while (inductionVariable < last);
    sb.g2(_Char___init__impl__6a9atx(93));
    return sb.toString();
  };
  IntDeque.$metadata$ = classMeta('IntDeque', [MutableCollection]);
  function _get__data__kyoi3c_0($this) {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.fastCastTo' call
    var tmp0_fastCastTo = $this.z4p_1;
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = tmp0_fastCastTo;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    return tmp$ret$2;
  }
  function _get_capacity__a9k9f3_0($this) {
    return $this.z4p_1.length;
  }
  function TGenDeque_init_$Init$($this) {
    TGenDeque.call($this, 16);
    return $this;
  }
  function TGenDeque_init_$Create$() {
    return TGenDeque_init_$Init$(Object.create(TGenDeque.prototype));
  }
  function resizeIfRequiredFor_0($this, count) {
    if (($this.i() + count | 0) > _get_capacity__a9k9f3_0($this)) {
      var i = $this.z4p_1;
      var istart = $this.x4p_1;
      var tmp$ret$2;
      // Inline function 'kotlin.arrayOfNulls' call
      var tmp$ret$1;
      // Inline function 'kotlin.comparisons.maxOf' call
      var tmp2_maxOf = $this.z4p_1.length + 7 | 0;
      var tmp$ret$0;
      // Inline function 'kotlin.comparisons.maxOf' call
      var tmp0_maxOf = $this.i() + count | 0;
      var tmp1_maxOf = imul($this.z4p_1.length, 2);
      tmp$ret$0 = Math.max(tmp0_maxOf, tmp1_maxOf);
      var tmp3_maxOf = tmp$ret$0;
      tmp$ret$1 = Math.max(tmp2_maxOf, tmp3_maxOf);
      var tmp4_arrayOfNulls = tmp$ret$1;
      tmp$ret$2 = fillArrayVal(Array(tmp4_arrayOfNulls), null);
      var _o = tmp$ret$2;
      var o = isArray(_o) ? _o : THROW_CCE();
      copyCyclic_0($this, i, istart, o, $this.y4p_1);
      $this.z4p_1 = o;
      $this.x4p_1 = 0;
    }
  }
  function copyCyclic_0($this, i, istart, o, count) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = i.length - istart | 0;
    tmp$ret$0 = Math.min(tmp0_min, count);
    var size1 = tmp$ret$0;
    var size2 = count - size1 | 0;
    arraycopy_3(i, istart, o, 0, size1);
    if (size2 > 0) {
      arraycopy_3(i, 0, o, size1, size2);
    }
  }
  function _addLast_0($this, item) {
    $this.z4p_1[($this.x4p_1 + $this.y4p_1 | 0) % _get_capacity__a9k9f3_0($this) | 0] = item;
    var tmp0_this = $this;
    var tmp1 = tmp0_this.y4p_1;
    tmp0_this.y4p_1 = tmp1 + 1 | 0;
  }
  function nullify_0($this, index) {
    _get__data__kyoi3c_0($this)[index] = null;
  }
  function internalIndex_0($this, index) {
    return umod($this.x4p_1 + index | 0, _get_capacity__a9k9f3_0($this));
  }
  function TGenDeque$iterator$1($that, this$0) {
    this.b4q_1 = $that;
    this.c4q_1 = this$0;
    this.a4q_1 = 0;
  }
  TGenDeque$iterator$1.prototype.l = function () {
    var tmp0_this = this;
    var tmp1 = tmp0_this.a4q_1;
    tmp0_this.a4q_1 = tmp1 + 1 | 0;
    return this.b4q_1.m(tmp1);
  };
  TGenDeque$iterator$1.prototype.k = function () {
    return this.a4q_1 < this.c4q_1.i();
  };
  TGenDeque$iterator$1.prototype.b5 = function () {
    var tmp0_this = this;
    tmp0_this.a4q_1 = tmp0_this.a4q_1 - 1 | 0;
    this.c4q_1.z4(tmp0_this.a4q_1);
  };
  TGenDeque$iterator$1.$metadata$ = classMeta(undefined, [MutableIterator]);
  function TGenDeque(initialCapacity) {
    this.x4p_1 = 0;
    this.y4p_1 = 0;
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.arrayOfNulls' call
    tmp$ret$0 = fillArrayVal(Array(initialCapacity), null);
    var tmp_0 = tmp$ret$0;
    tmp.z4p_1 = isArray(tmp_0) ? tmp_0 : THROW_CCE();
  }
  TGenDeque.prototype.i = function () {
    return this.y4p_1;
  };
  TGenDeque.prototype.p = function () {
    return this.i() === 0;
  };
  TGenDeque.prototype.d4q = function (item) {
    resizeIfRequiredFor_0(this, 1);
    _addLast_0(this, item);
  };
  TGenDeque.prototype.e4q = function (list) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.TGenDeque._addAll' call
    var tmp0__addAll = list.i();
    resizeIfRequiredFor_0(this, tmp0__addAll);
    var base = this.x4p_1 + this.y4p_1 | 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0__addAll)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = this.z4p_1;
        var tmp_0 = (base + n | 0) % _get_capacity__a9k9f3_0(this) | 0;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.TGenDeque.addAll.<anonymous>' call
        tmp$ret$0 = list.m(n);
        tmp[tmp_0] = tmp$ret$0;
      }
       while (inductionVariable < tmp0__addAll);
    var tmp1_this = this;
    tmp1_this.y4p_1 = tmp1_this.y4p_1 + tmp0__addAll | 0;
    tmp$ret$1 = true;
    return tmp$ret$1;
  };
  TGenDeque.prototype.f4q = function (elements) {
    return this.e4q(toList(elements));
  };
  TGenDeque.prototype.o = function (elements) {
    return this.f4q(elements);
  };
  TGenDeque.prototype.s4p = function () {
    if (this.y4p_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.w9();
    nullify_0(this, this.x4p_1);
    this.x4p_1 = (this.x4p_1 + 1 | 0) % _get_capacity__a9k9f3_0(this) | 0;
    var tmp0_this = this;
    var tmp1 = tmp0_this.y4p_1;
    tmp0_this.y4p_1 = tmp1 - 1 | 0;
    return out;
  };
  TGenDeque.prototype.t4p = function () {
    if (this.y4p_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.x9();
    nullify_0(this, internalIndex_0(this, this.i() - 1 | 0));
    var tmp0_this = this;
    var tmp1 = tmp0_this.y4p_1;
    tmp0_this.y4p_1 = tmp1 - 1 | 0;
    return out;
  };
  TGenDeque.prototype.z4 = function (index) {
    if (index < 0 ? true : index >= this.i())
      throw IndexOutOfBoundsException_init_$Create$();
    if (index === 0)
      return this.s4p();
    if (index === (this.i() - 1 | 0))
      return this.t4p();
    var old = this.m(index);
    if (index < (this.i() / 2 | 0)) {
      var inductionVariable = index;
      if (1 <= inductionVariable)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + -1 | 0;
          this.g4q(n, this.m(n - 1 | 0));
        }
         while (1 <= inductionVariable);
      this.x4p_1 = umod(this.x4p_1 + 1 | 0, _get_capacity__a9k9f3_0(this));
    } else {
      var inductionVariable_0 = index;
      var last = this.i() - 1 | 0;
      if (inductionVariable_0 < last)
        do {
          var n_0 = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + 1 | 0;
          this.g4q(n_0, this.m(n_0 + 1 | 0));
        }
         while (inductionVariable_0 < last);
    }
    var tmp2_this = this;
    var tmp3 = tmp2_this.y4p_1;
    tmp2_this.y4p_1 = tmp3 - 1 | 0;
    return old;
  };
  TGenDeque.prototype.h4q = function (element) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.TGenDeque.add.<anonymous>' call
    this.d4q(element);
    tmp$ret$0 = true;
    return tmp$ret$0;
  };
  TGenDeque.prototype.c = function (element) {
    return this.h4q((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  TGenDeque.prototype.x7 = function () {
    this.y4p_1 = 0;
  };
  TGenDeque.prototype.i4q = function (element) {
    var index = this.j4q(element);
    if (index >= 0) {
      this.z4(index);
    }
    return index >= 0;
  };
  TGenDeque.prototype.c5 = function (element) {
    if (!(element == null ? true : isObject(element)))
      return false;
    return this.i4q((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  TGenDeque.prototype.w9 = function () {
    return this.z4p_1[this.x4p_1];
  };
  TGenDeque.prototype.x9 = function () {
    return this.z4p_1[internalIndex_0(this, this.i() - 1 | 0)];
  };
  TGenDeque.prototype.g4q = function (index, value) {
    this.z4p_1[internalIndex_0(this, index)] = value;
  };
  TGenDeque.prototype.m = function (index) {
    return this.z4p_1[internalIndex_0(this, index)];
  };
  TGenDeque.prototype.k4q = function (index) {
    return (0 <= index ? index <= (this.i() - 1 | 0) : false) ? this.m(index) : null;
  };
  TGenDeque.prototype.l4q = function (element) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp0_any = until(0, this.i());
      var tmp;
      if (isInterface(tmp0_any, Collection)) {
        tmp = tmp0_any.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var inductionVariable = tmp0_any.r1_1;
      var last = tmp0_any.s1_1;
      if (inductionVariable <= last)
        do {
          var element_0 = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$1;
          // Inline function 'com.soywiz.kds.TGenDeque.contains.<anonymous>' call
          tmp$ret$1 = equals(this.m(element_0), element);
          if (tmp$ret$1) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
         while (!(element_0 === last));
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  TGenDeque.prototype.r = function (element) {
    if (!(element == null ? true : isObject(element)))
      return false;
    return this.l4q((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  TGenDeque.prototype.j4q = function (element) {
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (equals(this.m(n), element))
          return n;
      }
       while (inductionVariable < last);
    return -1;
  };
  TGenDeque.prototype.m4q = function (elements) {
    var tmp$ret$2;
    // Inline function 'kotlin.collections.map' call
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(elements, 10));
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var item = tmp0_iterator.l();
      var tmp$ret$0;
      // Inline function 'com.soywiz.kds.TGenDeque.containsAll.<anonymous>' call
      tmp$ret$0 = to(item, 0);
      tmp0_mapTo.c(tmp$ret$0);
    }
    tmp$ret$1 = tmp0_mapTo;
    tmp$ret$2 = tmp$ret$1;
    var emap = toLinkedMap(tmp$ret$2);
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var it = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var e = this.m(it);
        var tmp$ret$4;
        // Inline function 'kotlin.collections.contains' call
        var tmp$ret$3;
        // Inline function 'kotlin.collections.containsKey' call
        tmp$ret$3 = (isInterface(emap, Map_0) ? emap : THROW_CCE()).r3(e);
        tmp$ret$4 = tmp$ret$3;
        if (tmp$ret$4) {
          // Inline function 'kotlin.collections.set' call
          emap.a(e, 1);
        }
      }
       while (inductionVariable < last);
    var tmp$ret$5;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var tmp0_all = emap.lh();
      var tmp;
      if (isInterface(tmp0_all, Collection)) {
        tmp = tmp0_all.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$5 = true;
        break $l$block_0;
      }
      var tmp0_iterator_0 = tmp0_all.j();
      while (tmp0_iterator_0.k()) {
        var element = tmp0_iterator_0.l();
        var tmp$ret$6;
        // Inline function 'com.soywiz.kds.TGenDeque.containsAll.<anonymous>' call
        tmp$ret$6 = element === 1;
        if (!tmp$ret$6) {
          tmp$ret$5 = false;
          break $l$block_0;
        }
      }
      tmp$ret$5 = true;
    }
    return tmp$ret$5;
  };
  TGenDeque.prototype.l2 = function (elements) {
    return this.m4q(elements);
  };
  TGenDeque.prototype.j = function () {
    var that = this;
    return new TGenDeque$iterator$1(that, this);
  };
  TGenDeque.prototype.hashCode = function () {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.internal.contentHashCode' call
    var tmp1_contentHashCode = this.i();
    var result = 1;
    var inductionVariable = 0;
    if (inductionVariable < tmp1_contentHashCode)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = imul(31, result);
        var tmp$ret$1;
        // Inline function 'kotlin.hashCode' call
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.TGenDeque.hashCode.<anonymous>' call
        tmp$ret$0 = this.m(n);
        var tmp0_hashCode = tmp$ret$0;
        var tmp0_safe_receiver = tmp0_hashCode;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
        tmp$ret$1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
        result = tmp + tmp$ret$1 | 0;
      }
       while (inductionVariable < tmp1_contentHashCode);
    tmp$ret$2 = result;
    return tmp$ret$2;
  };
  TGenDeque.prototype.equals = function (other) {
    if (!(other instanceof TGenDeque))
      return false;
    if (!(other.i() === this.i()))
      return false;
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!equals(this.m(n), other.m(n)))
          return false;
      }
       while (inductionVariable < last);
    return true;
  };
  TGenDeque.prototype.toString = function () {
    var sb = StringBuilder_init_$Create$_0();
    sb.g2(_Char___init__impl__6a9atx(91));
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        sb.fc(this.m(n));
        if (!(n === (this.i() - 1 | 0))) {
          sb.gc(', ');
        }
      }
       while (inductionVariable < last);
    sb.g2(_Char___init__impl__6a9atx(93));
    return sb.toString();
  };
  TGenDeque.$metadata$ = classMeta('TGenDeque', [MutableCollection]);
  function _get__data__kyoi3c_1($this) {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.fastCastTo' call
    var tmp0_fastCastTo = $this.p4q_1;
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = tmp0_fastCastTo;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    return tmp$ret$2;
  }
  function _get_capacity__a9k9f3_1($this) {
    return $this.p4q_1.length;
  }
  function resizeIfRequiredFor_1($this, count) {
    if (($this.i() + count | 0) > _get_capacity__a9k9f3_1($this)) {
      var i = $this.p4q_1;
      var istart = $this.n4q_1;
      var tmp$ret$1;
      // Inline function 'kotlin.comparisons.maxOf' call
      var tmp2_maxOf = $this.p4q_1.length + 7 | 0;
      var tmp$ret$0;
      // Inline function 'kotlin.comparisons.maxOf' call
      var tmp0_maxOf = $this.i() + count | 0;
      var tmp1_maxOf = imul($this.p4q_1.length, 2);
      tmp$ret$0 = Math.max(tmp0_maxOf, tmp1_maxOf);
      var tmp3_maxOf = tmp$ret$0;
      tmp$ret$1 = Math.max(tmp2_maxOf, tmp3_maxOf);
      var _o = new Float32Array(tmp$ret$1);
      var o = isFloatArray(_o) ? _o : THROW_CCE();
      copyCyclic_1($this, i, istart, o, $this.o4q_1);
      $this.p4q_1 = o;
      $this.n4q_1 = 0;
    }
  }
  function copyCyclic_1($this, i, istart, o, count) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = i.length - istart | 0;
    tmp$ret$0 = Math.min(tmp0_min, count);
    var size1 = tmp$ret$0;
    var size2 = count - size1 | 0;
    arraycopy_0(i, istart, o, 0, size1);
    if (size2 > 0) {
      arraycopy_0(i, 0, o, size1, size2);
    }
  }
  function _addLast_1($this, item) {
    $this.p4q_1[($this.n4q_1 + $this.o4q_1 | 0) % _get_capacity__a9k9f3_1($this) | 0] = item;
    var tmp0_this = $this;
    var tmp1 = tmp0_this.o4q_1;
    tmp0_this.o4q_1 = tmp1 + 1 | 0;
  }
  function nullify_1($this, index) {
    _get__data__kyoi3c_1($this)[index] = 0.0;
  }
  function internalIndex_1($this, index) {
    return umod($this.n4q_1 + index | 0, _get_capacity__a9k9f3_1($this));
  }
  function FloatDeque$iterator$1($that, this$0) {
    this.r4q_1 = $that;
    this.s4q_1 = this$0;
    this.q4q_1 = 0;
  }
  FloatDeque$iterator$1.prototype.l = function () {
    var tmp0_this = this;
    var tmp1 = tmp0_this.q4q_1;
    tmp0_this.q4q_1 = tmp1 + 1 | 0;
    return this.r4q_1.m(tmp1);
  };
  FloatDeque$iterator$1.prototype.k = function () {
    return this.q4q_1 < this.s4q_1.i();
  };
  FloatDeque$iterator$1.prototype.b5 = function () {
    var tmp0_this = this;
    tmp0_this.q4q_1 = tmp0_this.q4q_1 - 1 | 0;
    this.s4q_1.z4(tmp0_this.q4q_1);
  };
  FloatDeque$iterator$1.$metadata$ = classMeta(undefined, [MutableIterator]);
  function FloatDeque(initialCapacity) {
    this.n4q_1 = 0;
    this.o4q_1 = 0;
    var tmp = this;
    var tmp_0 = new Float32Array(initialCapacity);
    tmp.p4q_1 = isFloatArray(tmp_0) ? tmp_0 : THROW_CCE();
  }
  FloatDeque.prototype.i = function () {
    return this.o4q_1;
  };
  FloatDeque.prototype.p = function () {
    return this.i() === 0;
  };
  FloatDeque.prototype.t4q = function (item) {
    resizeIfRequiredFor_1(this, 1);
    _addLast_1(this, item);
  };
  FloatDeque.prototype.u4q = function (list) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.FloatDeque._addAll' call
    var tmp0__addAll = list.i();
    resizeIfRequiredFor_1(this, tmp0__addAll);
    var base = this.n4q_1 + this.o4q_1 | 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0__addAll)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = this.p4q_1;
        var tmp_0 = (base + n | 0) % _get_capacity__a9k9f3_1(this) | 0;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.FloatDeque.addAll.<anonymous>' call
        tmp$ret$0 = list.m(n);
        tmp[tmp_0] = tmp$ret$0;
      }
       while (inductionVariable < tmp0__addAll);
    var tmp1_this = this;
    tmp1_this.o4q_1 = tmp1_this.o4q_1 + tmp0__addAll | 0;
    tmp$ret$1 = true;
    return tmp$ret$1;
  };
  FloatDeque.prototype.v4q = function (elements) {
    return this.u4q(toList(elements));
  };
  FloatDeque.prototype.o = function (elements) {
    return this.v4q(elements);
  };
  FloatDeque.prototype.s4p = function () {
    if (this.o4q_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.w9();
    nullify_1(this, this.n4q_1);
    this.n4q_1 = (this.n4q_1 + 1 | 0) % _get_capacity__a9k9f3_1(this) | 0;
    var tmp0_this = this;
    var tmp1 = tmp0_this.o4q_1;
    tmp0_this.o4q_1 = tmp1 - 1 | 0;
    return out;
  };
  FloatDeque.prototype.t4p = function () {
    if (this.o4q_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    var out = this.x9();
    nullify_1(this, internalIndex_1(this, this.i() - 1 | 0));
    var tmp0_this = this;
    var tmp1 = tmp0_this.o4q_1;
    tmp0_this.o4q_1 = tmp1 - 1 | 0;
    return out;
  };
  FloatDeque.prototype.z4 = function (index) {
    if (index < 0 ? true : index >= this.i())
      throw IndexOutOfBoundsException_init_$Create$();
    if (index === 0)
      return this.s4p();
    if (index === (this.i() - 1 | 0))
      return this.t4p();
    var old = this.m(index);
    if (index < (this.i() / 2 | 0)) {
      var inductionVariable = index;
      if (1 <= inductionVariable)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + -1 | 0;
          this.w4q(n, this.m(n - 1 | 0));
        }
         while (1 <= inductionVariable);
      this.n4q_1 = umod(this.n4q_1 + 1 | 0, _get_capacity__a9k9f3_1(this));
    } else {
      var inductionVariable_0 = index;
      var last = this.i() - 1 | 0;
      if (inductionVariable_0 < last)
        do {
          var n_0 = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + 1 | 0;
          this.w4q(n_0, this.m(n_0 + 1 | 0));
        }
         while (inductionVariable_0 < last);
    }
    var tmp2_this = this;
    var tmp3 = tmp2_this.o4q_1;
    tmp2_this.o4q_1 = tmp3 - 1 | 0;
    return old;
  };
  FloatDeque.prototype.x4q = function (element) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.FloatDeque.add.<anonymous>' call
    this.t4q(element);
    tmp$ret$0 = true;
    return tmp$ret$0;
  };
  FloatDeque.prototype.c = function (element) {
    return this.x4q((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  FloatDeque.prototype.x7 = function () {
    this.o4q_1 = 0;
  };
  FloatDeque.prototype.y4q = function (element) {
    var index = this.z4q(element);
    if (index >= 0) {
      this.z4(index);
    }
    return index >= 0;
  };
  FloatDeque.prototype.c5 = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.y4q((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  FloatDeque.prototype.w9 = function () {
    return this.p4q_1[this.n4q_1];
  };
  FloatDeque.prototype.x9 = function () {
    return this.p4q_1[internalIndex_1(this, this.i() - 1 | 0)];
  };
  FloatDeque.prototype.w4q = function (index, value) {
    this.p4q_1[internalIndex_1(this, index)] = value;
  };
  FloatDeque.prototype.m = function (index) {
    return this.p4q_1[internalIndex_1(this, index)];
  };
  FloatDeque.prototype.f4o = function (element) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp0_any = until(0, this.i());
      var tmp;
      if (isInterface(tmp0_any, Collection)) {
        tmp = tmp0_any.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var inductionVariable = tmp0_any.r1_1;
      var last = tmp0_any.s1_1;
      if (inductionVariable <= last)
        do {
          var element_0 = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$1;
          // Inline function 'com.soywiz.kds.FloatDeque.contains.<anonymous>' call
          tmp$ret$1 = this.m(element_0) === element;
          if (tmp$ret$1) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
         while (!(element_0 === last));
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  FloatDeque.prototype.r = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.f4o((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  FloatDeque.prototype.z4q = function (element) {
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (this.m(n) === element)
          return n;
      }
       while (inductionVariable < last);
    return -1;
  };
  FloatDeque.prototype.g4o = function (elements) {
    var tmp$ret$2;
    // Inline function 'kotlin.collections.map' call
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(elements, 10));
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var item = tmp0_iterator.l();
      var tmp$ret$0;
      // Inline function 'com.soywiz.kds.FloatDeque.containsAll.<anonymous>' call
      tmp$ret$0 = to(item, 0);
      tmp0_mapTo.c(tmp$ret$0);
    }
    tmp$ret$1 = tmp0_mapTo;
    tmp$ret$2 = tmp$ret$1;
    var emap = toLinkedMap(tmp$ret$2);
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var it = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var e = this.m(it);
        var tmp$ret$4;
        // Inline function 'kotlin.collections.contains' call
        var tmp$ret$3;
        // Inline function 'kotlin.collections.containsKey' call
        tmp$ret$3 = (isInterface(emap, Map_0) ? emap : THROW_CCE()).r3(e);
        tmp$ret$4 = tmp$ret$3;
        if (tmp$ret$4) {
          // Inline function 'kotlin.collections.set' call
          emap.a(e, 1);
        }
      }
       while (inductionVariable < last);
    var tmp$ret$5;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var tmp0_all = emap.lh();
      var tmp;
      if (isInterface(tmp0_all, Collection)) {
        tmp = tmp0_all.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$5 = true;
        break $l$block_0;
      }
      var tmp0_iterator_0 = tmp0_all.j();
      while (tmp0_iterator_0.k()) {
        var element = tmp0_iterator_0.l();
        var tmp$ret$6;
        // Inline function 'com.soywiz.kds.FloatDeque.containsAll.<anonymous>' call
        tmp$ret$6 = element === 1;
        if (!tmp$ret$6) {
          tmp$ret$5 = false;
          break $l$block_0;
        }
      }
      tmp$ret$5 = true;
    }
    return tmp$ret$5;
  };
  FloatDeque.prototype.l2 = function (elements) {
    return this.g4o(elements);
  };
  FloatDeque.prototype.j = function () {
    var that = this;
    return new FloatDeque$iterator$1(that, this);
  };
  FloatDeque.prototype.hashCode = function () {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.internal.contentHashCode' call
    var tmp1_contentHashCode = this.i();
    var result = 1;
    var inductionVariable = 0;
    if (inductionVariable < tmp1_contentHashCode)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = imul(31, result);
        var tmp$ret$1;
        // Inline function 'kotlin.hashCode' call
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.FloatDeque.hashCode.<anonymous>' call
        tmp$ret$0 = this.m(n);
        var tmp0_hashCode = tmp$ret$0;
        var tmp0_safe_receiver = tmp0_hashCode;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
        tmp$ret$1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
        result = tmp + tmp$ret$1 | 0;
      }
       while (inductionVariable < tmp1_contentHashCode);
    tmp$ret$2 = result;
    return tmp$ret$2;
  };
  FloatDeque.prototype.equals = function (other) {
    if (!(other instanceof FloatDeque))
      return false;
    if (!(other.i() === this.i()))
      return false;
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!(this.m(n) === other.m(n)))
          return false;
      }
       while (inductionVariable < last);
    return true;
  };
  FloatDeque.prototype.toString = function () {
    var sb = StringBuilder_init_$Create$_0();
    sb.g2(_Char___init__impl__6a9atx(91));
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        sb.fc(this.m(n));
        if (!(n === (this.i() - 1 | 0))) {
          sb.gc(', ');
        }
      }
       while (inductionVariable < last);
    sb.g2(_Char___init__impl__6a9atx(93));
    return sb.toString();
  };
  FloatDeque.$metadata$ = classMeta('FloatDeque', [MutableCollection]);
  function fastArrayListOf(values) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = FastArrayList_init_$Create$_0(values.length);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.fastArrayListOf.<anonymous>' call
    addAll(tmp0_also, values);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function toFastList(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = FastArrayList_init_$Create$_0(_this__u8e3s4.i());
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.toFastList.<anonymous>' call
    // Inline function 'com.soywiz.kds.iterators.fastForEach' call
    var n = 0;
    while (n < _this__u8e3s4.i()) {
      // Inline function 'com.soywiz.kds.toFastList.<anonymous>.<anonymous>' call
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      var tmp0__anonymous__q1qw7t = _this__u8e3s4.m(tmp0);
      tmp0_also.c(tmp0__anonymous__q1qw7t);
    }
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function toFastList_0(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = FastArrayList_init_$Create$_0(_this__u8e3s4.length);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.toFastList.<anonymous>' call
    // Inline function 'com.soywiz.kds.iterators.fastForEach' call
    var n = 0;
    while (n < _this__u8e3s4.length) {
      // Inline function 'com.soywiz.kds.toFastList.<anonymous>.<anonymous>' call
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      var tmp0__anonymous__q1qw7t = _this__u8e3s4[tmp0];
      tmp0_also.c(tmp0__anonymous__q1qw7t);
    }
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function getOrPut(_this__u8e3s4, key, callback) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.get' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$1 = tmp$ret$0.get(key);
    var res = tmp$ret$1;
    if (!(res == null))
      return res;
    var out = callback();
    var tmp$ret$4;
    // Inline function 'com.soywiz.kds.set' call
    var tmp$ret$3;
    // Inline function 'kotlin.run' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = _this__u8e3s4;
    tmp$ret$3 = tmp$ret$2.set(key, out);
    tmp$ret$4 = tmp$ret$3;
    return out;
  }
  function getOrPut_0(_this__u8e3s4, key, callback) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.get' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$1 = tmp$ret$0.get(key);
    var res = tmp$ret$1;
    if (!(res == null))
      return res;
    var out = callback();
    // Inline function 'com.soywiz.kds.set' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = _this__u8e3s4;
    tmp$ret$2.set(key, out);
    return out;
  }
  function fastForEach(_this__u8e3s4, callback) {
    // Inline function 'com.soywiz.kds.fastKeyForEach' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    var mapIterator = tmp$ret$0.keys();
    $l$loop: while (true) {
      var v = mapIterator.next();
      if (v.done)
        break $l$loop;
      // Inline function 'com.soywiz.kds.fastForEach.<anonymous>' call
      var tmp0__anonymous__q1qw7t = v.value;
      var tmp$ret$2;
      // Inline function 'com.soywiz.kds.get' call
      var tmp$ret$1;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$1 = _this__u8e3s4;
      tmp$ret$2 = tmp$ret$1.get(tmp0__anonymous__q1qw7t);
      callback(tmp0__anonymous__q1qw7t, ensureNotNull(tmp$ret$2));
    }
  }
  function toMap_0(_this__u8e3s4) {
    var tmp$ret$4;
    // Inline function 'kotlin.also' call
    var tmp0_also = LinkedHashMap_init_$Create$_0(get_size_0(_this__u8e3s4));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.toMap.<anonymous>' call
    // Inline function 'com.soywiz.kds.fastForEachNullable' call
    // Inline function 'com.soywiz.kds.fastKeyForEach' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    var mapIterator = tmp$ret$0.keys();
    $l$loop: while (true) {
      var v = mapIterator.next();
      if (v.done)
        break $l$loop;
      // Inline function 'com.soywiz.kds.fastForEachNullable.<anonymous>' call
      var tmp0__anonymous__q1qw7t = v.value;
      // Inline function 'com.soywiz.kds.toMap.<anonymous>.<anonymous>' call
      var tmp$ret$2;
      // Inline function 'com.soywiz.kds.get' call
      var tmp$ret$1;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$1 = _this__u8e3s4;
      tmp$ret$2 = tmp$ret$1.get(tmp0__anonymous__q1qw7t);
      var tmp1__anonymous__uwfjfc = tmp$ret$2;
      var tmp0_safe_receiver = tmp1__anonymous__uwfjfc;
      if (tmp0_safe_receiver == null)
        null;
      else {
        var tmp$ret$3;
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        tmp0_also.a(tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc);
        tmp$ret$3 = Unit_getInstance();
      }
    }
    tmp$ret$4 = tmp0_also;
    return tmp$ret$4;
  }
  function getOrPut_1(_this__u8e3s4, key, callback) {
    var res = get_1(_this__u8e3s4, key);
    if (!(res == null))
      return res;
    var out = callback();
    set_1(_this__u8e3s4, key, out);
    return out;
  }
  function getAndRemove(_this__u8e3s4, key) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = get_1(_this__u8e3s4, key);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.getAndRemove.<anonymous>' call
    remove_0(_this__u8e3s4, key);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function get_keys(_this__u8e3s4) {
    return keys(_this__u8e3s4);
  }
  function fastForEachNullable(_this__u8e3s4, callback) {
    // Inline function 'com.soywiz.kds.fastKeyForEach' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    var mapIterator = tmp$ret$0.keys();
    $l$loop: while (true) {
      var v = mapIterator.next();
      if (v.done)
        break $l$loop;
      // Inline function 'com.soywiz.kds.fastForEachNullable.<anonymous>' call
      var tmp0__anonymous__q1qw7t = v.value;
      var tmp$ret$2;
      // Inline function 'com.soywiz.kds.get' call
      var tmp$ret$1;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$1 = _this__u8e3s4;
      tmp$ret$2 = tmp$ret$1.get(tmp0__anonymous__q1qw7t);
      callback(tmp0__anonymous__q1qw7t, tmp$ret$2);
    }
  }
  function translateIndex(_this__u8e3s4, $this) {
    if (!(0 <= _this__u8e3s4 ? _this__u8e3s4 < $this.i() : false))
      throw IndexOutOfBoundsException_init_$Create$_0('' + _this__u8e3s4);
    return $this.e4r_1 + _this__u8e3s4 | 0;
  }
  function GenericSubList(base, start, end) {
    this.d4r_1 = base;
    this.e4r_1 = start;
    this.f4r_1 = end;
    var containsUpper = this.d4r_1.i();
    var containsArg = this.e4r_1;
    if (!(0 <= containsArg ? containsArg <= containsUpper : false))
      throw IndexOutOfBoundsException_init_$Create$_0('' + this.e4r_1);
    var containsUpper_0 = this.d4r_1.i();
    var containsArg_0 = this.f4r_1;
    if (!(0 <= containsArg_0 ? containsArg_0 <= containsUpper_0 : false))
      throw IndexOutOfBoundsException_init_$Create$_0('' + this.f4r_1);
  }
  GenericSubList.prototype.i = function () {
    return this.f4r_1 - this.e4r_1 | 0;
  };
  GenericSubList.prototype.y1 = function (element) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp0_any = until(0, this.i());
      var tmp;
      if (isInterface(tmp0_any, Collection)) {
        tmp = tmp0_any.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var inductionVariable = tmp0_any.r1_1;
      var last = tmp0_any.s1_1;
      if (inductionVariable <= last)
        do {
          var element_0 = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$1;
          // Inline function 'com.soywiz.kds.GenericSubList.contains.<anonymous>' call
          tmp$ret$1 = equals(this.m(element_0), element);
          if (tmp$ret$1) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
         while (!(element_0 === last));
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  GenericSubList.prototype.r = function (element) {
    if (!(element == null ? true : isObject(element)))
      return false;
    return this.y1((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  GenericSubList.prototype.j4 = function (elements) {
    var elementsSet = toMutableSet(elements);
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'kotlin.collections.minusAssign' call
        var tmp0_minusAssign = this.m(n);
        elementsSet.c5(tmp0_minusAssign);
      }
       while (inductionVariable < last);
    return elementsSet.p();
  };
  GenericSubList.prototype.l2 = function (elements) {
    return this.j4(elements);
  };
  GenericSubList.prototype.m = function (index) {
    return this.d4r_1.m(translateIndex(index, this));
  };
  GenericSubList.prototype.g4r = function (element) {
    var inductionVariable = 0;
    var last = this.i();
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (equals(this.m(n), element))
          return n;
      }
       while (inductionVariable < last);
    return -1;
  };
  GenericSubList.prototype.y = function (element) {
    if (!(element == null ? true : isObject(element)))
      return -1;
    return this.g4r((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  GenericSubList.prototype.p = function () {
    return this.i() === 0;
  };
  GenericSubList.prototype.j = function () {
    return GenericListIterator_init_$Create$(this, 0, 2, null);
  };
  GenericSubList.prototype.n = function (index) {
    return new GenericListIterator(this, index);
  };
  GenericSubList.prototype.x = function (fromIndex, toIndex) {
    return new GenericSubList(this, fromIndex, toIndex);
  };
  GenericSubList.prototype.toString = function () {
    var tmp$ret$2;
    // Inline function 'kotlin.collections.map' call
    var tmp0_map = until(0, this.i());
    var tmp$ret$1;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
    var inductionVariable = tmp0_map.r1_1;
    var last = tmp0_map.s1_1;
    if (inductionVariable <= last)
      do {
        var item = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.GenericSubList.toString.<anonymous>' call
        tmp$ret$0 = this.m(item);
        tmp0_mapTo.c(tmp$ret$0);
      }
       while (!(item === last));
    tmp$ret$1 = tmp0_mapTo;
    tmp$ret$2 = tmp$ret$1;
    return toString(tmp$ret$2);
  };
  GenericSubList.prototype.equals = function (other) {
    var tmp;
    if (other instanceof GenericSubList) {
      var tmp$ret$1;
      $l$block: {
        // Inline function 'com.soywiz.kds.internal.equaler' call
        var tmp0_equaler = this.i();
        var inductionVariable = 0;
        if (inductionVariable < tmp0_equaler)
          do {
            var n = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            var tmp$ret$0;
            // Inline function 'com.soywiz.kds.GenericSubList.equals.<anonymous>' call
            tmp$ret$0 = equals(this.m(n), other.m(n));
            if (!tmp$ret$0) {
              tmp$ret$1 = false;
              break $l$block;
            }
          }
           while (inductionVariable < tmp0_equaler);
        tmp$ret$1 = true;
      }
      tmp = tmp$ret$1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  GenericSubList.prototype.hashCode = function () {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.internal.hashCoder' call
    var tmp0_hashCoder = this.i();
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0_hashCoder)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        var tmp = out;
        var tmp$ret$1;
        // Inline function 'com.soywiz.kds.GenericSubList.hashCode.<anonymous>' call
        var tmp$ret$0;
        // Inline function 'kotlin.hashCode' call
        var tmp0_hashCode = this.m(n);
        var tmp0_safe_receiver = tmp0_hashCode;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
        tmp$ret$0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
        tmp$ret$1 = tmp$ret$0;
        out = tmp + tmp$ret$1 | 0;
      }
       while (inductionVariable < tmp0_hashCoder);
    tmp$ret$2 = out;
    return tmp$ret$2;
  };
  GenericSubList.$metadata$ = classMeta('GenericSubList', [List]);
  function GenericListIterator_init_$Init$(list, iindex, $mask0, $marker, $this) {
    if (!(($mask0 & 2) === 0))
      iindex = 0;
    GenericListIterator.call($this, list, iindex);
    return $this;
  }
  function GenericListIterator_init_$Create$(list, iindex, $mask0, $marker) {
    return GenericListIterator_init_$Init$(list, iindex, $mask0, $marker, Object.create(GenericListIterator.prototype));
  }
  function GenericListIterator(list, iindex) {
    this.h4r_1 = list;
    this.i4r_1 = iindex;
    var containsUpper = this.h4r_1.i();
    var containsArg = this.i4r_1;
    if (!(0 <= containsArg ? containsArg < containsUpper : false))
      throw IndexOutOfBoundsException_init_$Create$_0('' + this.i4r_1);
    this.j4r_1 = this.i4r_1;
  }
  GenericListIterator.prototype.k = function () {
    return this.j4r_1 < this.h4r_1.i();
  };
  GenericListIterator.prototype.l = function () {
    if (!this.k())
      throw NoSuchElementException_init_$Create$();
    var tmp0_this = this;
    var tmp1 = tmp0_this.j4r_1;
    tmp0_this.j4r_1 = tmp1 + 1 | 0;
    return this.h4r_1.m(tmp1);
  };
  GenericListIterator.prototype.equals = function (other) {
    var tmp;
    var tmp_0;
    if (other instanceof GenericListIterator) {
      tmp_0 = equals(this.h4r_1, other.h4r_1);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.j4r_1 === other.j4r_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  GenericListIterator.prototype.hashCode = function () {
    return hashCode(this.h4r_1) + this.j4r_1 | 0;
  };
  GenericListIterator.$metadata$ = classMeta('GenericListIterator', [ListIterator]);
  function hashCode_0(v1, v2, v3, v4, v5, v6) {
    var hash = 7;
    var tmp = imul(31, hash);
    var tmp$ret$0;
    // Inline function 'kotlin.hashCode' call
    var tmp0_safe_receiver = v1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
    tmp$ret$0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    hash = tmp + tmp$ret$0 | 0;
    var tmp_0 = imul(31, hash);
    var tmp$ret$1;
    // Inline function 'kotlin.hashCode' call
    var tmp0_safe_receiver_0 = v2;
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);
    tmp$ret$1 = tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0;
    hash = tmp_0 + tmp$ret$1 | 0;
    var tmp_1 = imul(31, hash);
    var tmp$ret$2;
    // Inline function 'kotlin.hashCode' call
    var tmp0_safe_receiver_1 = v3;
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : hashCode(tmp0_safe_receiver_1);
    tmp$ret$2 = tmp1_elvis_lhs_1 == null ? 0 : tmp1_elvis_lhs_1;
    hash = tmp_1 + tmp$ret$2 | 0;
    var tmp_2 = imul(31, hash);
    var tmp$ret$3;
    // Inline function 'kotlin.hashCode' call
    var tmp0_safe_receiver_2 = v4;
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : hashCode(tmp0_safe_receiver_2);
    tmp$ret$3 = tmp1_elvis_lhs_2 == null ? 0 : tmp1_elvis_lhs_2;
    hash = tmp_2 + tmp$ret$3 | 0;
    var tmp_3 = imul(31, hash);
    var tmp$ret$4;
    // Inline function 'kotlin.hashCode' call
    var tmp0_safe_receiver_3 = v5;
    var tmp1_elvis_lhs_3 = tmp0_safe_receiver_3 == null ? null : hashCode(tmp0_safe_receiver_3);
    tmp$ret$4 = tmp1_elvis_lhs_3 == null ? 0 : tmp1_elvis_lhs_3;
    hash = tmp_3 + tmp$ret$4 | 0;
    var tmp_4 = imul(31, hash);
    var tmp$ret$5;
    // Inline function 'kotlin.hashCode' call
    var tmp0_safe_receiver_4 = v6;
    var tmp1_elvis_lhs_4 = tmp0_safe_receiver_4 == null ? null : hashCode(tmp0_safe_receiver_4);
    tmp$ret$5 = tmp1_elvis_lhs_4 == null ? 0 : tmp1_elvis_lhs_4;
    hash = tmp_4 + tmp$ret$5 | 0;
    return hash;
  }
  function HistoryStack_init_$Init$(maxLength, initialCapacity, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      maxLength = IntCompanionObject_getInstance().o1_1 - 10 | 0;
    if (!(($mask0 & 2) === 0))
      initialCapacity = 7;
    HistoryStack.call($this, maxLength, initialCapacity);
    return $this;
  }
  function HistoryStack_init_$Create$(maxLength, initialCapacity, $mask0, $marker) {
    return HistoryStack_init_$Init$(maxLength, initialCapacity, $mask0, $marker, Object.create(HistoryStack.prototype));
  }
  function HistoryStack(maxLength, initialCapacity) {
    this.k4r_1 = maxLength;
    this.l4r_1 = new TGenDeque(initialCapacity);
    this.m4r_1 = 0;
  }
  HistoryStack.prototype.n4r = function (value) {
    $l$loop: while (true) {
      var tmp;
      var tmp$ret$0;
      // Inline function 'kotlin.collections.isNotEmpty' call
      var tmp0_isNotEmpty = this.l4r_1;
      tmp$ret$0 = !tmp0_isNotEmpty.p();
      if (tmp$ret$0) {
        tmp = this.l4r_1.i() > this.m4r_1;
      } else {
        tmp = false;
      }
      if (!tmp) {
        break $l$loop;
      }
      this.l4r_1.t4p();
    }
    this.l4r_1.h4q(value);
    this.m4r_1 = this.l4r_1.i();
    $l$loop_0: while (true) {
      var tmp_0;
      var tmp$ret$1;
      // Inline function 'kotlin.collections.isNotEmpty' call
      var tmp1_isNotEmpty = this.l4r_1;
      tmp$ret$1 = !tmp1_isNotEmpty.p();
      if (tmp$ret$1) {
        tmp_0 = this.l4r_1.i() > this.k4r_1;
      } else {
        tmp_0 = false;
      }
      if (!tmp_0) {
        break $l$loop_0;
      }
      this.l4r_1.s4p();
      var tmp0_this = this;
      var tmp1 = tmp0_this.m4r_1;
      tmp0_this.m4r_1 = tmp1 - 1 | 0;
    }
  };
  HistoryStack.prototype.o4r = function () {
    this.m4r_1 = coerceAtLeast(this.m4r_1 - 1 | 0, 0);
    return this.l4r_1.k4q(this.m4r_1 - 1 | 0);
  };
  HistoryStack.prototype.p4r = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = this.l4r_1.k4q(this.m4r_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.HistoryStack.redo.<anonymous>' call
    this.m4r_1 = coerceAtMost(this.m4r_1 + 1 | 0, this.l4r_1.i() + 1 | 0);
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  };
  HistoryStack.$metadata$ = classMeta('HistoryStack');
  function IntIntMap_init_$Init$(initialCapacity, loadFactor, $this) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.max' call
    var tmp0_max = ilog2Ceil(initialCapacity);
    tmp$ret$0 = Math.max(4, tmp0_max);
    IntIntMap.call($this, tmp$ret$0, loadFactor, true);
    return $this;
  }
  function IntIntMap_init_$Init$_0(initialCapacity, loadFactor, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      initialCapacity = 16;
    if (!(($mask0 & 2) === 0))
      loadFactor = 0.75;
    IntIntMap_init_$Init$(initialCapacity, loadFactor, $this);
    return $this;
  }
  function IntIntMap_init_$Create$(initialCapacity, loadFactor, $mask0, $marker) {
    return IntIntMap_init_$Init$_0(initialCapacity, loadFactor, $mask0, $marker, Object.create(IntIntMap.prototype));
  }
  function Companion_2() {
    Companion_instance_2 = this;
    this.q4r_1 = 2147483646;
    this.r4r_1 = 2147483647;
    this.s4r_1 = 0;
  }
  Companion_2.$metadata$ = objectMeta('Companion');
  var Companion_instance_2;
  function Companion_getInstance_2() {
    if (Companion_instance_2 == null)
      new Companion_2();
    return Companion_instance_2;
  }
  function _get_stashStart__3psegu($this) {
    return $this.a4s_1.length - $this.z4r_1 | 0;
  }
  function grow($this) {
    var inc = $this.t4r_1 < 20 ? 3 : 1;
    var newnbits = $this.t4r_1 + inc | 0;
    var new_0 = new IntIntMap(newnbits, $this.u4r_1, true);
    var inductionVariable = 0;
    var last = $this.a4s_1.length - 1 | 0;
    if (inductionVariable <= last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var k = $this.a4s_1[n];
        Companion_getInstance_2();
        if (!(k === 0)) {
          new_0.e4s(k, $this.b4s_1[n]);
        }
      }
       while (inductionVariable <= last);
    $this.t4r_1 = new_0.t4r_1;
    $this.v4r_1 = new_0.v4r_1;
    $this.y4r_1 = new_0.y4r_1;
    $this.z4r_1 = new_0.z4r_1;
    $this.a4s_1 = new_0.a4s_1;
    $this.b4s_1 = new_0.b4s_1;
    $this.c4s_1 = new_0.c4s_1;
  }
  function growStash($this) {
    $this.z4r_1 = imul($this.z4r_1, 2);
    $this.a4s_1 = copyOf_1($this.a4s_1, $this.f4s());
    $this.b4s_1 = copyOf_1($this.b4s_1, $this.f4s());
  }
  function _getKeyIndex($this, key) {
    if (key === 0) {
      var tmp;
      if ($this.w4r_1) {
        Companion_getInstance_2();
        tmp = 2147483647;
      } else {
        tmp = -1;
      }
      return tmp;
    }
    var index1 = hash1($this, key);
    if ($this.a4s_1[index1] === key)
      return index1;
    var index2 = hash2($this, key);
    if ($this.a4s_1[index2] === key)
      return index2;
    var index3 = hash3($this, key);
    if ($this.a4s_1[index3] === key)
      return index3;
    var inductionVariable = _get_stashStart__3psegu($this);
    var last = $this.a4s_1.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if ($this.a4s_1[n] === key)
          return n;
      }
       while (inductionVariable < last);
    return -1;
  }
  function setEmptySlot($this, index, key, value) {
    var tmp = $this.a4s_1[index];
    Companion_getInstance_2();
    if (!(tmp === 0))
      throw IllegalStateException_init_$Create$_0();
    $this.a4s_1[index] = key;
    $this.b4s_1[index] = value;
    var tmp0_this = $this;
    var tmp1 = tmp0_this.d4s_1;
    tmp0_this.d4s_1 = tmp1 + 1 | 0;
    return 0;
  }
  function hash1($this, key) {
    return _hash1(key, $this.y4r_1);
  }
  function hash2($this, key) {
    return _hash2(key, $this.y4r_1);
  }
  function hash3($this, key) {
    return _hash3(key, $this.y4r_1);
  }
  function IntIntMap(nbits, loadFactor, dummy) {
    Companion_getInstance_2();
    this.t4r_1 = nbits;
    this.u4r_1 = loadFactor;
    this.v4r_1 = 1 << this.t4r_1;
    this.w4r_1 = false;
    this.x4r_1 = 0;
    this.y4r_1 = this.v4r_1 - 1 | 0;
    this.z4r_1 = 1 + imul(this.t4r_1, this.t4r_1) | 0;
    this.a4s_1 = new Int32Array(this.f4s());
    this.b4s_1 = new Int32Array(this.f4s());
    this.c4s_1 = numberToInt(this.v4r_1 * this.u4r_1);
    this.d4s_1 = 0;
  }
  IntIntMap.prototype.toString = function () {
    return toString(this.g4s(null, 1, null));
  };
  IntIntMap.prototype.f4s = function () {
    return this.v4r_1 + this.z4r_1 | 0;
  };
  IntIntMap.prototype.h4s = function (out) {
    // Inline function 'com.soywiz.kds.IntIntMap.fastForEach' call
    // Inline function 'com.soywiz.kds.IntIntMap.fastKeyForEach' call
    var tmp;
    if (this.w4r_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.a4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      // Inline function 'com.soywiz.kds.IntIntMap.fastForEach.<anonymous>' call
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.a4s_1[index];
      }
      var tmp0__anonymous__q1qw7t = tmp_1;
      // Inline function 'com.soywiz.kds.IntIntMap.toMap.<anonymous>' call
      var tmp1__anonymous__uwfjfc = this.m(tmp0__anonymous__q1qw7t);
      // Inline function 'kotlin.collections.set' call
      out.a(tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc);
      var tmp_3 = this.a4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
    return out;
  };
  IntIntMap.prototype.g4s = function (out, $mask0, $handler) {
    if (!(($mask0 & 1) === 0))
      out = linkedHashMapOf([]);
    return this.h4s(out);
  };
  IntIntMap.prototype.v9 = function (key) {
    return _getKeyIndex(this, key) >= 0;
  };
  IntIntMap.prototype.x7 = function () {
    this.w4r_1 = false;
    this.x4r_1 = 0;
    fill(this.a4s_1, 0);
    fill(this.b4s_1, 0);
    this.d4s_1 = 0;
  };
  IntIntMap.prototype.m = function (key) {
    var index = _getKeyIndex(this, key);
    if (index < 0)
      return 0;
    Companion_getInstance_2();
    if (index === 2147483647)
      return this.x4r_1;
    return this.b4s_1[index];
  };
  IntIntMap.prototype.e4s = function (key, value) {
    retry: while (true) {
      var index = _getKeyIndex(this, key);
      if (index < 0) {
        if (key === 0) {
          this.w4r_1 = true;
          this.x4r_1 = value;
          var tmp0_this = this;
          var tmp1 = tmp0_this.d4s_1;
          tmp0_this.d4s_1 = tmp1 + 1 | 0;
          return 0;
        }
        if (this.d4s_1 >= this.c4s_1) {
          grow(this);
        }
        var index1 = hash1(this, key);
        var tmp = this.a4s_1[index1];
        Companion_getInstance_2();
        if (tmp === 0)
          return setEmptySlot(this, index1, key, value);
        var index2 = hash2(this, key);
        var tmp_0 = this.a4s_1[index2];
        Companion_getInstance_2();
        if (tmp_0 === 0)
          return setEmptySlot(this, index2, key, value);
        var index3 = hash3(this, key);
        var tmp_1 = this.a4s_1[index3];
        Companion_getInstance_2();
        if (tmp_1 === 0)
          return setEmptySlot(this, index3, key, value);
        var inductionVariable = _get_stashStart__3psegu(this);
        var last = this.a4s_1.length;
        if (inductionVariable < last)
          do {
            var n = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            var tmp_2 = this.a4s_1[n];
            Companion_getInstance_2();
            if (tmp_2 === 0)
              return setEmptySlot(this, n, key, value);
          }
           while (inductionVariable < last);
        if (this.z4r_1 > 512) {
          grow(this);
        } else {
          growStash(this);
        }
        continue retry;
      } else {
        Companion_getInstance_2();
        if (index === 2147483647) {
          var tmp$ret$0;
          // Inline function 'kotlin.apply' call
          var tmp0_apply = this.x4r_1;
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.soywiz.kds.IntIntMap.set.<anonymous>' call
          this.x4r_1 = value;
          tmp$ret$0 = tmp0_apply;
          return tmp$ret$0;
        } else {
          var tmp$ret$1;
          // Inline function 'kotlin.apply' call
          var tmp1_apply = this.b4s_1[index];
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.soywiz.kds.IntIntMap.set.<anonymous>' call
          this.b4s_1[index] = value;
          tmp$ret$1 = tmp1_apply;
          return tmp$ret$1;
        }
      }
    }
  };
  IntIntMap.prototype.i4s = function (keys, offset) {
    var inductionVariable = offset;
    var last = keys.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = keys[n];
        Companion_getInstance_2();
        if (!(tmp === 0))
          return n;
      }
       while (inductionVariable < last);
    Companion_getInstance_2();
    return 2147483646;
  };
  IntIntMap.prototype.j4s = function (callback) {
    var tmp;
    if (this.w4r_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.a4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.a4s_1[index];
      }
      callback(tmp_1);
      var tmp_3 = this.a4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
  };
  IntIntMap.prototype.k4s = function (callback) {
    // Inline function 'com.soywiz.kds.IntIntMap.fastKeyForEach' call
    var tmp;
    if (this.w4r_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.a4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      // Inline function 'com.soywiz.kds.IntIntMap.fastForEach.<anonymous>' call
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.a4s_1[index];
      }
      var tmp0__anonymous__q1qw7t = tmp_1;
      callback(tmp0__anonymous__q1qw7t, this.m(tmp0__anonymous__q1qw7t));
      var tmp_3 = this.a4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
  };
  IntIntMap.prototype.equals = function (other) {
    if (!(other instanceof IntMap))
      return false;
    // Inline function 'com.soywiz.kds.IntIntMap.fastForEach' call
    // Inline function 'com.soywiz.kds.IntIntMap.fastKeyForEach' call
    var tmp;
    if (this.w4r_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.a4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      // Inline function 'com.soywiz.kds.IntIntMap.fastForEach.<anonymous>' call
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.a4s_1[index];
      }
      var tmp0__anonymous__q1qw7t = tmp_1;
      // Inline function 'com.soywiz.kds.IntIntMap.equals.<anonymous>' call
      var tmp0__anonymous__q1qw7t_0 = this.m(tmp0__anonymous__q1qw7t);
      if (!equals(other.m(tmp0__anonymous__q1qw7t), tmp0__anonymous__q1qw7t_0))
        return false;
      var tmp_3 = this.a4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
    return true;
  };
  IntIntMap.prototype.hashCode = function () {
    var out = 0;
    // Inline function 'com.soywiz.kds.IntIntMap.fastForEach' call
    // Inline function 'com.soywiz.kds.IntIntMap.fastKeyForEach' call
    var tmp;
    if (this.w4r_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.a4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      // Inline function 'com.soywiz.kds.IntIntMap.fastForEach.<anonymous>' call
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.a4s_1[index];
      }
      var tmp0__anonymous__q1qw7t = tmp_1;
      // Inline function 'com.soywiz.kds.IntIntMap.hashCode.<anonymous>' call
      var tmp0__anonymous__q1qw7t_0 = this.m(tmp0__anonymous__q1qw7t);
      out = out + (tmp0__anonymous__q1qw7t + tmp0__anonymous__q1qw7t_0 | 0) | 0;
      var tmp_3 = this.a4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
    return out;
  };
  IntIntMap.$metadata$ = classMeta('IntIntMap');
  function currentKey($this) {
    var tmp0_subject = $this.x4s_1;
    var tmp;
    var tmp_0;
    Companion_getInstance_3();
    if (tmp0_subject === 2147483647) {
      tmp_0 = true;
    } else {
      Companion_getInstance_3();
      tmp_0 = tmp0_subject === 2147483646;
    }
    if (tmp_0) {
      tmp = 0;
    } else {
      tmp = $this.w4s_1.s4s_1[$this.x4s_1];
    }
    return tmp;
  }
  function currentValue($this) {
    var tmp0_subject = $this.x4s_1;
    var tmp;
    Companion_getInstance_3();
    if (tmp0_subject === 2147483647) {
      tmp = $this.w4s_1.p4s_1;
    } else {
      Companion_getInstance_3();
      if (tmp0_subject === 2147483646) {
        tmp = null;
      } else {
        tmp = $this.w4s_1.t4s_1[$this.x4s_1];
      }
    }
    return tmp;
  }
  function nextNonEmptyIndex($this, keys, offset) {
    var inductionVariable = offset;
    var last = keys.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = keys[n];
        Companion_getInstance_3();
        if (!(tmp === 0))
          return n;
      }
       while (inductionVariable < last);
    Companion_getInstance_3();
    return 2147483646;
  }
  function next($this) {
    var tmp = $this.x4s_1;
    Companion_getInstance_3();
    if (!(tmp === 2147483646)) {
      var tmp_0 = $this;
      var tmp_1 = $this.w4s_1.s4s_1;
      var tmp_2;
      var tmp_3 = $this.x4s_1;
      Companion_getInstance_3();
      if (tmp_3 === 2147483647) {
        tmp_2 = 0;
      } else {
        tmp_2 = $this.x4s_1 + 1 | 0;
      }
      tmp_0.x4s_1 = nextNonEmptyIndex($this, tmp_1, tmp_2);
    }
  }
  function IntMap$_get_keys_$o$iterator$lambda_bn8atq($tmp0_let) {
    return function () {
      return $tmp0_let.k();
    };
  }
  function IntMap$_get_keys_$o$iterator$lambda_bn8atq_0($tmp0_let) {
    return function () {
      return $tmp0_let.z4s();
    };
  }
  function IntMap$_get_values_$o$iterator$lambda_ggo058($tmp0_let) {
    return function () {
      return $tmp0_let.k();
    };
  }
  function IntMap$_get_values_$o$iterator$lambda_ggo058_0($tmp0_let) {
    return function () {
      return $tmp0_let.a4t();
    };
  }
  function IntMap_init_$Init$(initialCapacity, loadFactor, $this) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.max' call
    var tmp0_max = ilog2Ceil(initialCapacity);
    tmp$ret$0 = Math.max(4, tmp0_max);
    IntMap.call($this, tmp$ret$0, loadFactor, true);
    return $this;
  }
  function IntMap_init_$Init$_0(initialCapacity, loadFactor, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      initialCapacity = 16;
    if (!(($mask0 & 2) === 0))
      loadFactor = 0.75;
    IntMap_init_$Init$(initialCapacity, loadFactor, $this);
    return $this;
  }
  function IntMap_init_$Create$(initialCapacity, loadFactor, $mask0, $marker) {
    return IntMap_init_$Init$_0(initialCapacity, loadFactor, $mask0, $marker, Object.create(IntMap.prototype));
  }
  function Companion_3() {
    Companion_instance_3 = this;
    this.b4t_1 = 2147483646;
    this.c4t_1 = 2147483647;
    this.d4t_1 = 0;
  }
  Companion_3.$metadata$ = objectMeta('Companion');
  var Companion_instance_3;
  function Companion_getInstance_3() {
    if (Companion_instance_3 == null)
      new Companion_3();
    return Companion_instance_3;
  }
  function _get_stashStart__3psegu_0($this) {
    return $this.s4s_1.length - $this.r4s_1 | 0;
  }
  function grow_0($this) {
    var inc = $this.l4s_1 < 20 ? 3 : 1;
    var newnbits = $this.l4s_1 + inc | 0;
    var new_0 = new IntMap(newnbits, $this.m4s_1, true);
    var inductionVariable = 0;
    var last = $this.s4s_1.length - 1 | 0;
    if (inductionVariable <= last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var k = $this.s4s_1[n];
        Companion_getInstance_3();
        if (!(k === 0)) {
          new_0.e4t(k, $this.t4s_1[n]);
        }
      }
       while (inductionVariable <= last);
    $this.l4s_1 = new_0.l4s_1;
    $this.n4s_1 = new_0.n4s_1;
    $this.q4s_1 = new_0.q4s_1;
    $this.r4s_1 = new_0.r4s_1;
    $this.s4s_1 = new_0.s4s_1;
    $this.t4s_1 = new_0.t4s_1;
    $this.u4s_1 = new_0.u4s_1;
  }
  function growStash_0($this) {
    $this.r4s_1 = imul($this.r4s_1, 2);
    $this.s4s_1 = copyOf_1($this.s4s_1, $this.f4s());
    $this.t4s_1 = copyOf_2($this.t4s_1, $this.f4s());
  }
  function _getKeyIndex_0($this, key) {
    if (key === 0) {
      var tmp;
      if ($this.o4s_1) {
        Companion_getInstance_3();
        tmp = 2147483647;
      } else {
        tmp = -1;
      }
      return tmp;
    }
    var index1 = hash1_0($this, key);
    if ($this.s4s_1[index1] === key)
      return index1;
    var index2 = hash2_0($this, key);
    if ($this.s4s_1[index2] === key)
      return index2;
    var index3 = hash3_0($this, key);
    if ($this.s4s_1[index3] === key)
      return index3;
    var inductionVariable = _get_stashStart__3psegu_0($this);
    var last = $this.s4s_1.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if ($this.s4s_1[n] === key)
          return n;
      }
       while (inductionVariable < last);
    return -1;
  }
  function setEmptySlot_0($this, index, key, value) {
    var tmp = $this.s4s_1[index];
    Companion_getInstance_3();
    if (!(tmp === 0))
      throw IllegalStateException_init_$Create$_0();
    $this.s4s_1[index] = key;
    $this.t4s_1[index] = value;
    var tmp0_this = $this;
    var tmp1 = tmp0_this.v4s_1;
    tmp0_this.v4s_1 = tmp1 + 1 | 0;
    return null;
  }
  function hash1_0($this, key) {
    return _hash1(key, $this.q4s_1);
  }
  function hash2_0($this, key) {
    return _hash2(key, $this.q4s_1);
  }
  function hash3_0($this, key) {
    return _hash3(key, $this.q4s_1);
  }
  function Entry(key, value) {
    this.f4t_1 = key;
    this.g4t_1 = value;
  }
  Entry.prototype.toString = function () {
    return 'Entry(key=' + this.f4t_1 + ', value=' + this.g4t_1 + ')';
  };
  Entry.prototype.hashCode = function () {
    var result = this.f4t_1;
    result = imul(result, 31) + (this.g4t_1 == null ? 0 : hashCode(this.g4t_1)) | 0;
    return result;
  };
  Entry.prototype.equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Entry))
      return false;
    var tmp0_other_with_cast = other instanceof Entry ? other : THROW_CCE();
    if (!(this.f4t_1 === tmp0_other_with_cast.f4t_1))
      return false;
    if (!equals(this.g4t_1, tmp0_other_with_cast.g4t_1))
      return false;
    return true;
  };
  Entry.$metadata$ = classMeta('Entry');
  function Iterator_0(map) {
    this.w4s_1 = map;
    var tmp = this;
    var tmp_0;
    if (this.w4s_1.o4s_1) {
      Companion_getInstance_3();
      tmp_0 = 2147483647;
    } else {
      tmp_0 = nextNonEmptyIndex(this, this.w4s_1.s4s_1, 0);
    }
    tmp.x4s_1 = tmp_0;
    this.y4s_1 = new Entry(0, null);
  }
  Iterator_0.prototype.k = function () {
    var tmp = this.x4s_1;
    Companion_getInstance_3();
    return !(tmp === 2147483646);
  };
  Iterator_0.prototype.z4s = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = currentKey(this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.Iterator.nextKey.<anonymous>' call
    next(this);
    tmp$ret$0 = tmp0_apply;
    return tmp$ret$0;
  };
  Iterator_0.prototype.a4t = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = currentValue(this);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.Iterator.nextValue.<anonymous>' call
    next(this);
    tmp$ret$0 = tmp0_apply;
    return tmp$ret$0;
  };
  Iterator_0.$metadata$ = classMeta('Iterator');
  function _no_name_provided__qut3iv(this$0) {
    this.h4t_1 = this$0;
  }
  _no_name_provided__qut3iv.prototype.j = function () {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.IntMap.<get-keys>.<anonymous>' call
    var tmp$ret$1;
    // Inline function 'kotlin.let' call
    var tmp0_let = new Iterator_0(this.h4t_1);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.kds.IntMap.<get-keys>.<anonymous>.<anonymous>' call
    var tmp = IntMap$_get_keys_$o$iterator$lambda_bn8atq(tmp0_let);
    tmp$ret$0 = Iterator_1(tmp, IntMap$_get_keys_$o$iterator$lambda_bn8atq_0(tmp0_let));
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    return tmp$ret$2;
  };
  _no_name_provided__qut3iv.$metadata$ = classMeta(undefined, [Iterable]);
  function _no_name_provided__qut3iv_0(this$0) {
    this.i4t_1 = this$0;
  }
  _no_name_provided__qut3iv_0.prototype.j = function () {
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.IntMap.<get-values>.<anonymous>' call
    var tmp$ret$1;
    // Inline function 'kotlin.let' call
    var tmp0_let = new Iterator_0(this.i4t_1);
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'com.soywiz.kds.IntMap.<get-values>.<anonymous>.<anonymous>' call
    var tmp = IntMap$_get_values_$o$iterator$lambda_ggo058(tmp0_let);
    tmp$ret$0 = Iterator_1(tmp, IntMap$_get_values_$o$iterator$lambda_ggo058_0(tmp0_let));
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    return tmp$ret$2;
  };
  _no_name_provided__qut3iv_0.$metadata$ = classMeta(undefined, [Iterable]);
  function IntMap(nbits, loadFactor, dummy) {
    Companion_getInstance_3();
    this.l4s_1 = nbits;
    this.m4s_1 = loadFactor;
    this.n4s_1 = 1 << this.l4s_1;
    this.o4s_1 = false;
    this.p4s_1 = null;
    this.q4s_1 = this.n4s_1 - 1 | 0;
    this.r4s_1 = 1 + imul(this.l4s_1, this.l4s_1) | 0;
    this.s4s_1 = new Int32Array(this.f4s());
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.arrayOfNulls' call
    var tmp0_arrayOfNulls = this.f4s();
    tmp$ret$0 = fillArrayVal(Array(tmp0_arrayOfNulls), null);
    var tmp_0 = tmp$ret$0;
    tmp.t4s_1 = isArray(tmp_0) ? tmp_0 : THROW_CCE();
    this.u4s_1 = numberToInt(this.n4s_1 * this.m4s_1);
    this.v4s_1 = 0;
  }
  IntMap.prototype.f4s = function () {
    return this.n4s_1 + this.r4s_1 | 0;
  };
  IntMap.prototype.v9 = function (key) {
    return _getKeyIndex_0(this, key) >= 0;
  };
  IntMap.prototype.v4p = function (key) {
    var index = _getKeyIndex_0(this, key);
    if (index < 0)
      return false;
    Companion_getInstance_3();
    if (index === 2147483647) {
      this.o4s_1 = false;
      this.p4s_1 = null;
    } else {
      var tmp = this.s4s_1;
      Companion_getInstance_3();
      tmp[index] = 0;
    }
    var tmp0_this = this;
    var tmp1 = tmp0_this.v4s_1;
    tmp0_this.v4s_1 = tmp1 - 1 | 0;
    return true;
  };
  IntMap.prototype.x7 = function () {
    this.o4s_1 = false;
    this.p4s_1 = null;
    fill(this.s4s_1, 0);
    fill_0(this.t4s_1, null);
    this.v4s_1 = 0;
  };
  IntMap.prototype.m = function (key) {
    var index = _getKeyIndex_0(this, key);
    if (index < 0)
      return null;
    Companion_getInstance_3();
    if (index === 2147483647)
      return this.p4s_1;
    return this.t4s_1[index];
  };
  IntMap.prototype.e4t = function (key, value) {
    retry: while (true) {
      var index = _getKeyIndex_0(this, key);
      if (index < 0) {
        if (key === 0) {
          this.o4s_1 = true;
          this.p4s_1 = value;
          var tmp0_this = this;
          var tmp1 = tmp0_this.v4s_1;
          tmp0_this.v4s_1 = tmp1 + 1 | 0;
          return null;
        }
        if (this.v4s_1 >= this.u4s_1) {
          grow_0(this);
        }
        var index1 = hash1_0(this, key);
        var tmp = this.s4s_1[index1];
        Companion_getInstance_3();
        if (tmp === 0)
          return setEmptySlot_0(this, index1, key, value);
        var index2 = hash2_0(this, key);
        var tmp_0 = this.s4s_1[index2];
        Companion_getInstance_3();
        if (tmp_0 === 0)
          return setEmptySlot_0(this, index2, key, value);
        var index3 = hash3_0(this, key);
        var tmp_1 = this.s4s_1[index3];
        Companion_getInstance_3();
        if (tmp_1 === 0)
          return setEmptySlot_0(this, index3, key, value);
        var inductionVariable = _get_stashStart__3psegu_0(this);
        var last = this.s4s_1.length;
        if (inductionVariable < last)
          do {
            var n = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            var tmp_2 = this.s4s_1[n];
            Companion_getInstance_3();
            if (tmp_2 === 0)
              return setEmptySlot_0(this, n, key, value);
          }
           while (inductionVariable < last);
        if (this.r4s_1 > 512) {
          grow_0(this);
        } else {
          growStash_0(this);
        }
        continue retry;
      } else {
        Companion_getInstance_3();
        if (index === 2147483647) {
          var tmp$ret$0;
          // Inline function 'kotlin.apply' call
          var tmp0_apply = this.p4s_1;
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.soywiz.kds.IntMap.set.<anonymous>' call
          this.p4s_1 = value;
          tmp$ret$0 = tmp0_apply;
          return tmp$ret$0;
        } else {
          var tmp$ret$1;
          // Inline function 'kotlin.apply' call
          var tmp1_apply = this.t4s_1[index];
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.soywiz.kds.IntMap.set.<anonymous>' call
          this.t4s_1[index] = value;
          tmp$ret$1 = tmp1_apply;
          return tmp$ret$1;
        }
      }
    }
  };
  IntMap.prototype.j4t = function (key, callback) {
    var res = this.m(key);
    if (res == null) {
      this.e4t(key, callback(key));
    }
    return ensureNotNull(this.m(key));
  };
  IntMap.prototype.v3 = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.collections.Iterable' call
    tmp$ret$0 = new _no_name_provided__qut3iv(this);
    return tmp$ret$0;
  };
  IntMap.prototype.lh = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.collections.Iterable' call
    tmp$ret$0 = new _no_name_provided__qut3iv_0(this);
    return tmp$ret$0;
  };
  IntMap.prototype.i4s = function (keys, offset) {
    var inductionVariable = offset;
    var last = keys.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = keys[n];
        Companion_getInstance_3();
        if (!(tmp === 0))
          return n;
      }
       while (inductionVariable < last);
    Companion_getInstance_3();
    return 2147483646;
  };
  IntMap.prototype.j4s = function (callback) {
    var tmp;
    if (this.o4s_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.s4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.s4s_1[index];
      }
      callback(tmp_1);
      var tmp_3 = this.s4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
  };
  IntMap.prototype.k4t = function (callback) {
    // Inline function 'com.soywiz.kds.IntMap.fastKeyForEach' call
    var tmp;
    if (this.o4s_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.s4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      // Inline function 'com.soywiz.kds.IntMap.fastForEachNullable.<anonymous>' call
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.s4s_1[index];
      }
      var tmp0__anonymous__q1qw7t = tmp_1;
      callback(tmp0__anonymous__q1qw7t, this.m(tmp0__anonymous__q1qw7t));
      var tmp_3 = this.s4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
  };
  IntMap.prototype.equals = function (other) {
    if (!(other instanceof IntMap))
      return false;
    // Inline function 'com.soywiz.kds.IntMap.fastForEachNullable' call
    // Inline function 'com.soywiz.kds.IntMap.fastKeyForEach' call
    var tmp;
    if (this.o4s_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.s4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      // Inline function 'com.soywiz.kds.IntMap.fastForEachNullable.<anonymous>' call
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.s4s_1[index];
      }
      var tmp0__anonymous__q1qw7t = tmp_1;
      // Inline function 'com.soywiz.kds.IntMap.equals.<anonymous>' call
      var tmp0__anonymous__q1qw7t_0 = this.m(tmp0__anonymous__q1qw7t);
      if (!equals(other.m(tmp0__anonymous__q1qw7t), tmp0__anonymous__q1qw7t_0))
        return false;
      var tmp_3 = this.s4s_1;
      var tmp_4;
      var tmp_5 = index;
      Companion_getInstance_3();
      if (tmp_5 === 2147483647) {
        tmp_4 = 0;
      } else {
        tmp_4 = index + 1 | 0;
      }
      index = this.i4s(tmp_3, tmp_4);
    }
    return true;
  };
  IntMap.prototype.hashCode = function () {
    var out = 0;
    // Inline function 'com.soywiz.kds.IntMap.fastForEachNullable' call
    // Inline function 'com.soywiz.kds.IntMap.fastKeyForEach' call
    var tmp;
    if (this.o4s_1) {
      Companion_getInstance_3();
      tmp = 2147483647;
    } else {
      tmp = this.i4s(this.s4s_1, 0);
    }
    var index = tmp;
    $l$loop: while (true) {
      var tmp_0 = index;
      Companion_getInstance_3();
      if (!!(tmp_0 === 2147483646)) {
        break $l$loop;
      }
      // Inline function 'com.soywiz.kds.IntMap.fastForEachNullable.<anonymous>' call
      var tmp0_subject = index;
      var tmp_1;
      var tmp_2;
      Companion_getInstance_3();
      if (tmp0_subject === 2147483647) {
        tmp_2 = true;
      } else {
        Companion_getInstance_3();
        tmp_2 = tmp0_subject === 2147483646;
      }
      if (tmp_2) {
        tmp_1 = 0;
      } else {
        tmp_1 = this.s4s_1[index];
      }
      var tmp0__anonymous__q1qw7t = tmp_1;
      // Inline function 'com.soywiz.kds.IntMap.hashCode.<anonymous>' call
      var tmp0__anonymous__q1qw7t_0 = this.m(tmp0__anonymous__q1qw7t);
      var tmp_3 = out;
      var tmp_4 = tmp0__anonymous__q1qw7t;
      var tmp$ret$0;
      // Inline function 'kotlin.hashCode' call
      var tmp0_safe_receiver = tmp0__anonymous__q1qw7t_0;
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
      tmp$ret$0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
      out = tmp_3 + (tmp_4 + tmp$ret$0 | 0) | 0;
      var tmp_5 = this.s4s_1;
      var tmp_6;
      var tmp_7 = index;
      Companion_getInstance_3();
      if (tmp_7 === 2147483647) {
        tmp_6 = 0;
      } else {
        tmp_6 = index + 1 | 0;
      }
      index = this.i4s(tmp_5, tmp_6);
    }
    return out;
  };
  IntMap.$metadata$ = classMeta('IntMap');
  function toIntMap(_this__u8e3s4) {
    var tmp = numberToInt(_this__u8e3s4.i() * 1.25);
    var out = IntMap_init_$Create$(tmp, 0.0, 2, null);
    var tmp$ret$0;
    // Inline function 'kotlin.collections.iterator' call
    tmp$ret$0 = _this__u8e3s4.j1().j();
    var tmp0_iterator = tmp$ret$0;
    while (tmp0_iterator.k()) {
      var tmp1_loop_parameter = tmp0_iterator.l();
      var tmp$ret$1;
      // Inline function 'kotlin.collections.component1' call
      tmp$ret$1 = tmp1_loop_parameter.k1();
      var k = tmp$ret$1;
      var tmp$ret$2;
      // Inline function 'kotlin.collections.component2' call
      tmp$ret$2 = tmp1_loop_parameter.l1();
      var v = tmp$ret$2;
      out.e4t(k, v);
    }
    return out;
  }
  function _hash1(key, mask) {
    return _mask(key, mask);
  }
  function _hash2(key, mask) {
    return _mask(imul(key, 1294968109), mask);
  }
  function _hash3(key, mask) {
    return _mask(imul(key, 294969449), mask);
  }
  function _mask(value, mask) {
    return (((value + ((value >>> 8 | 0) & 255) | 0) + ((value >>> 16 | 0) & 255) | 0) + (value >> 24 & 255) | 0) & mask;
  }
  function associateByInt(_this__u8e3s4, block) {
    var n = 0;
    var out = IntMap_init_$Create$(0, 0.0, 3, null);
    var tmp0_iterator = _this__u8e3s4.j();
    while (tmp0_iterator.k()) {
      var it = tmp0_iterator.l();
      var tmp1 = n;
      n = tmp1 + 1 | 0;
      out.e4t(block(tmp1, it), it);
    }
    return out;
  }
  function IntSet() {
    var tmp = this;
    tmp.l4t_1 = IntMap_init_$Create$(0, 0.0, 3, null);
  }
  IntSet.prototype.i = function () {
    return this.l4t_1.v4s_1;
  };
  IntSet.prototype.s4o = function (elements) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var tmp;
      if (isInterface(elements, Collection)) {
        tmp = elements.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = true;
        break $l$block_0;
      }
      var tmp0_iterator = elements.j();
      while (tmp0_iterator.k()) {
        var element = tmp0_iterator.l();
        var tmp$ret$1;
        // Inline function 'com.soywiz.kds.IntSet.containsAll.<anonymous>' call
        tmp$ret$1 = this.l4t_1.v9(element);
        if (!tmp$ret$1) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
      }
      tmp$ret$0 = true;
    }
    return tmp$ret$0;
  };
  IntSet.prototype.l2 = function (elements) {
    return this.s4o(elements);
  };
  IntSet.prototype.p = function () {
    return this.i() === 0;
  };
  IntSet.prototype.j = function () {
    return asFakeMutable(this.l4t_1.v3().j());
  };
  IntSet.prototype.x7 = function () {
    this.l4t_1.x7();
  };
  IntSet.prototype.u4p = function (element) {
    return this.l4t_1.e4t(element, Unit_getInstance()) == null;
  };
  IntSet.prototype.c = function (element) {
    return this.u4p((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  IntSet.prototype.r4p = function (elements) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp;
      if (isInterface(elements, Collection)) {
        tmp = elements.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = elements.j();
      while (tmp0_iterator.k()) {
        var element = tmp0_iterator.l();
        var tmp$ret$1;
        // Inline function 'com.soywiz.kds.IntSet.addAll.<anonymous>' call
        tmp$ret$1 = this.u4p(element);
        if (tmp$ret$1) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  IntSet.prototype.o = function (elements) {
    return this.r4p(elements);
  };
  IntSet.prototype.v9 = function (element) {
    return this.l4t_1.v9(element);
  };
  IntSet.prototype.r = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.v9((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  IntSet.prototype.v4p = function (element) {
    return this.l4t_1.v4p(element);
  };
  IntSet.prototype.c5 = function (element) {
    if (!(!(element == null) ? typeof element === 'number' : false))
      return false;
    return this.v4p((!(element == null) ? typeof element === 'number' : false) ? element : THROW_CCE());
  };
  IntSet.prototype.toString = function () {
    var tmp = this.l4t_1.v3();
    return '[' + joinToString$default(tmp, ', ', null, null, 0, null, null, 62, null) + ']';
  };
  IntSet.prototype.equals = function (other) {
    var tmp;
    if (other instanceof IntSet) {
      tmp = this.l4t_1.equals(other.l4t_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  IntSet.prototype.hashCode = function () {
    return this.l4t_1.hashCode();
  };
  IntSet.$metadata$ = classMeta('IntSet', [MutableSet]);
  function Iterator_1(hasNext, next) {
    return new Iterator$1(hasNext, next);
  }
  function Iterator$1($hasNext, $next) {
    this.m4t_1 = $hasNext;
    this.n4t_1 = $next;
  }
  Iterator$1.prototype.k = function () {
    return this.m4t_1();
  };
  Iterator$1.prototype.l = function () {
    return this.n4t_1();
  };
  Iterator$1.$metadata$ = classMeta(undefined, [Iterator]);
  function Pool_init_$Init$(reset, preallocate, gen, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0)) {
      reset = Pool$_init_$lambda_q3cbhr;
    }
    if (!(($mask0 & 2) === 0))
      preallocate = 0;
    Pool.call($this, reset, preallocate, gen);
    return $this;
  }
  function Pool_init_$Create$(reset, preallocate, gen, $mask0, $marker) {
    return Pool_init_$Init$(reset, preallocate, gen, $mask0, $marker, Object.create(Pool.prototype));
  }
  function Companion_4() {
    Companion_instance_4 = this;
  }
  Companion_4.$metadata$ = objectMeta('Companion');
  var Companion_instance_4;
  function Companion_getInstance_4() {
    if (Companion_instance_4 == null)
      new Companion_4();
    return Companion_instance_4;
  }
  function Pool_init_$Init$_0(preallocate, gen, $this) {
    Pool.call($this, Pool$_init_$lambda_q3cbhr_0, preallocate, gen);
    return $this;
  }
  function Pool_init_$Create$_0(preallocate, gen) {
    return Pool_init_$Init$_0(preallocate, gen, Object.create(Pool.prototype));
  }
  function Pool_init_$Init$_1(preallocate, gen, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      preallocate = 0;
    Pool_init_$Init$_0(preallocate, gen, $this);
    return $this;
  }
  function Pool_init_$Create$_1(preallocate, gen, $mask0, $marker) {
    return Pool_init_$Init$_1(preallocate, gen, $mask0, $marker, Object.create(Pool.prototype));
  }
  function Pool$_init_$lambda_q3cbhr(it) {
    return Unit_getInstance();
  }
  function Pool$_init_$lambda_q3cbhr_0(it) {
    return Unit_getInstance();
  }
  function Pool(reset, preallocate, gen) {
    Companion_getInstance_4();
    this.o4t_1 = reset;
    this.p4t_1 = gen;
    var tmp = this;
    tmp.q4t_1 = _TGenStack___init__impl__yynjgt_0(null, 1, null);
    this.r4t_1 = 0;
    var inductionVariable = 0;
    if (inductionVariable < preallocate)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp1_this = this;
        var tmp2 = tmp1_this.r4t_1;
        tmp1_this.r4t_1 = tmp2 + 1 | 0;
        TGenStack__push_impl_9yh33t(this.q4t_1, this.p4t_1(tmp2));
      }
       while (inductionVariable < preallocate);
  }
  Pool.prototype.s4t = function () {
    return _TGenStack___get_size__impl__cvg66t(this.q4t_1);
  };
  Pool.prototype.t4t = function () {
    var tmp;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.isNotEmpty' call
    var tmp0_isNotEmpty = this.q4t_1;
    tmp$ret$0 = !(new TGenStack(tmp0_isNotEmpty)).p();
    if (tmp$ret$0) {
      tmp = TGenStack__pop_impl_qisxa0(this.q4t_1);
    } else {
      var tmp0_this = this;
      var tmp1 = tmp0_this.r4t_1;
      tmp0_this.r4t_1 = tmp1 + 1 | 0;
      tmp = this.p4t_1(tmp1);
    }
    return tmp;
  };
  Pool.prototype.x7 = function () {
    TGenStack__clear_impl_pali4s(this.q4t_1);
    this.r4t_1 = 0;
  };
  Pool.prototype.u4t = function (element) {
    this.o4t_1(element);
    TGenStack__push_impl_9yh33t(this.q4t_1, element);
  };
  Pool.prototype.v4t = function (elements) {
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var element = tmp0_iterator.l();
      this.u4t(element);
    }
  };
  Pool.prototype.w4t = function (callback) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'com.soywiz.kds.Pool.alloc' call
      var temp = this.t4t();
      try {
        tmp$ret$0 = callback(temp);
        break $l$block;
      }finally {
        this.u4t(temp);
      }
    }
    return tmp$ret$0;
  };
  Pool.prototype.x4t = function (callback) {
    var temp = this.t4t();
    try {
      return callback(temp);
    }finally {
      this.u4t(temp);
    }
  };
  Pool.prototype.hashCode = function () {
    return TGenStack__hashCode_impl_l04zom(this.q4t_1);
  };
  Pool.prototype.equals = function (other) {
    var tmp;
    var tmp_0;
    if (other instanceof Pool) {
      tmp_0 = equals(this.q4t_1, other.q4t_1);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.s4t() === other.s4t();
    } else {
      tmp = false;
    }
    return tmp;
  };
  Pool.$metadata$ = classMeta('Pool');
  function ConcurrentPool_init_$Init$(reset, preallocate, gen, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0)) {
      reset = ConcurrentPool$_init_$lambda_gqhtk8;
    }
    if (!(($mask0 & 2) === 0))
      preallocate = 0;
    ConcurrentPool.call($this, reset, preallocate, gen);
    return $this;
  }
  function ConcurrentPool_init_$Create$(reset, preallocate, gen, $mask0, $marker) {
    return ConcurrentPool_init_$Init$(reset, preallocate, gen, $mask0, $marker, Object.create(ConcurrentPool.prototype));
  }
  function ConcurrentPool$_init_$lambda_gqhtk8(it) {
    return Unit_getInstance();
  }
  function ConcurrentPool(reset, preallocate, gen) {
    Pool.call(this, reset, preallocate, gen);
    this.c4u_1 = reset;
    this.d4u_1 = gen;
    this.e4u_1 = new NonRecursiveLock();
  }
  ConcurrentPool.prototype.t4t = function () {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.lock.NonRecursiveLock.invoke' call
    var tmp0_invoke = this.e4u_1;
    var tmp$ret$0;
    // Inline function 'com.soywiz.kds.ConcurrentPool.alloc.<anonymous>' call
    tmp$ret$0 = Pool.prototype.t4t.call(this);
    tmp$ret$1 = tmp$ret$0;
    return tmp$ret$1;
  };
  ConcurrentPool.prototype.x7 = function () {
    var tmp$ret$0;
    // Inline function 'com.soywiz.kds.lock.NonRecursiveLock.invoke' call
    var tmp0_invoke = this.e4u_1;
    Pool.prototype.x7.call(this);
    tmp$ret$0 = Unit_getInstance();
  };
  ConcurrentPool.prototype.u4t = function (element) {
    var tmp$ret$0;
    // Inline function 'com.soywiz.kds.lock.NonRecursiveLock.invoke' call
    var tmp0_invoke = this.e4u_1;
    Pool.prototype.u4t.call(this, element);
    tmp$ret$0 = Unit_getInstance();
  };
  ConcurrentPool.$metadata$ = classMeta('ConcurrentPool', undefined, undefined, undefined, undefined, Pool.prototype);
  function sam$kotlin_Comparator$0(function_0) {
    this.f4u_1 = function_0;
  }
  sam$kotlin_Comparator$0.prototype.b1 = function (a, b) {
    return this.f4u_1(a, b);
  };
  sam$kotlin_Comparator$0.prototype.compare = function (a, b) {
    return this.b1(a, b);
  };
  sam$kotlin_Comparator$0.$metadata$ = classMeta('sam$kotlin_Comparator$0', [Comparator]);
  function Companion_5() {
    Companion_instance_5 = this;
  }
  Companion_5.prototype.g4u = function (comparator, reversed_0) {
    var tmp$ret$0;
    // Inline function 'kotlin.arrayOfNulls' call
    tmp$ret$0 = fillArrayVal(Array(16), null);
    var tmp = tmp$ret$0;
    return new TGenPriorityQueue(isArray(tmp) ? tmp : THROW_CCE(), reversed_0 ? reversed(comparator) : comparator);
  };
  Companion_5.prototype.h4u = function (reversed, comparator) {
    return Companion_getInstance_5().g4u(new sam$kotlin_Comparator$0(comparator), reversed);
  };
  Companion_5.prototype.i4u = function (reversed, comparator, $mask0, $handler) {
    if (!(($mask0 & 1) === 0))
      reversed = false;
    return this.h4u(reversed, comparator);
  };
  Companion_5.$metadata$ = objectMeta('Companion');
  var Companion_instance_5;
  function Companion_getInstance_5() {
    if (Companion_instance_5 == null)
      new Companion_5();
    return Companion_instance_5;
  }
  function _set_value__lx0xdg(_this__u8e3s4, $this, value) {
    $this.j4u_1[_this__u8e3s4] = value;
  }
  function _get_value__a43j40(_this__u8e3s4, $this) {
    return $this.j4u_1[_this__u8e3s4];
  }
  function _get_isRoot__1006zj(_this__u8e3s4, $this) {
    return _this__u8e3s4 === 0;
  }
  function _get_parent__oo9xup(_this__u8e3s4, $this) {
    return (_this__u8e3s4 - 1 | 0) / 2 | 0;
  }
  function _get_left__d9qyp0(_this__u8e3s4, $this) {
    return imul(2, _this__u8e3s4) + 1 | 0;
  }
  function _get_right__bvz45n(_this__u8e3s4, $this) {
    return imul(2, _this__u8e3s4) + 2 | 0;
  }
  function gt($this, a, b) {
    return $this.k4u_1.compare(a, b) > 0;
  }
  function lt($this, a, b) {
    return $this.k4u_1.compare(a, b) < 0;
  }
  function _get_capacity__a9k9f3_2($this) {
    return $this.j4u_1.length;
  }
  function ensure_1($this, index) {
    if (index >= _get_capacity__a9k9f3_2($this)) {
      var tmp = $this;
      var tmp_0 = copyOf_2($this.j4u_1, 2 + imul(_get_capacity__a9k9f3_2($this), 2) | 0);
      tmp.j4u_1 = isArray(tmp_0) ? tmp_0 : THROW_CCE();
    }
  }
  function minHeapify($this, index) {
    var i = index;
    $l$loop: while (true) {
      var left = _get_left__d9qyp0(i, $this);
      var right = _get_right__bvz45n(i, $this);
      var smallest = i;
      if (left < $this.l4u_1 ? lt($this, _get_value__a43j40(left, $this), _get_value__a43j40(i, $this)) : false)
        smallest = left;
      if (right < $this.l4u_1 ? lt($this, _get_value__a43j40(right, $this), _get_value__a43j40(smallest, $this)) : false)
        smallest = right;
      if (!(smallest === i)) {
        swap($this, i, smallest);
        i = smallest;
      } else {
        break $l$loop;
      }
    }
  }
  function swap($this, l, r) {
    var temp = _get_value__a43j40(r, $this);
    _set_value__lx0xdg(r, $this, _get_value__a43j40(l, $this));
    _set_value__lx0xdg(l, $this, temp);
  }
  function TGenPriorityQueue$iterator$1($index, this$0) {
    this.m4u_1 = $index;
    this.n4u_1 = this$0;
  }
  TGenPriorityQueue$iterator$1.prototype.k = function () {
    return this.m4u_1._v < this.n4u_1.l4u_1;
  };
  TGenPriorityQueue$iterator$1.prototype.l = function () {
    var tmp0 = this.m4u_1._v;
    this.m4u_1._v = tmp0 + 1 | 0;
    return _get_value__a43j40(tmp0, this.n4u_1);
  };
  TGenPriorityQueue$iterator$1.prototype.l1y = function () {
    throw NotImplementedError_init_$Create$(null, 1, null);
  };
  TGenPriorityQueue$iterator$1.prototype.b5 = function () {
    return this.l1y();
  };
  TGenPriorityQueue$iterator$1.$metadata$ = classMeta(undefined, [MutableIterator]);
  function TGenPriorityQueue(data, comparator) {
    Companion_getInstance_5();
    this.j4u_1 = data;
    this.k4u_1 = comparator;
    this.l4u_1 = 0;
  }
  TGenPriorityQueue.prototype.i = function () {
    return this.l4u_1;
  };
  TGenPriorityQueue.prototype.d2q = function () {
    if (this.l4u_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    return this.j4u_1[0];
  };
  TGenPriorityQueue.prototype.h4q = function (element) {
    var tmp0_this = this;
    var tmp1 = tmp0_this.l4u_1;
    tmp0_this.l4u_1 = tmp1 + 1 | 0;
    ensure_1(this, this.l4u_1);
    var i = this.l4u_1 - 1 | 0;
    _set_value__lx0xdg(i, this, element);
    while (!_get_isRoot__1006zj(i, this) ? gt(this, _get_value__a43j40(_get_parent__oo9xup(i, this), this), _get_value__a43j40(i, this)) : false) {
      swap(this, i, _get_parent__oo9xup(i, this));
      i = _get_parent__oo9xup(i, this);
    }
    return true;
  };
  TGenPriorityQueue.prototype.c = function (element) {
    return this.h4q((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  TGenPriorityQueue.prototype.o4u = function () {
    if (this.l4u_1 <= 0)
      throw IndexOutOfBoundsException_init_$Create$();
    if (this.l4u_1 === 1) {
      var tmp0_this = this;
      var tmp1 = tmp0_this.l4u_1;
      tmp0_this.l4u_1 = tmp1 - 1 | 0;
      return _get_value__a43j40(0, this);
    }
    var root = _get_value__a43j40(0, this);
    _set_value__lx0xdg(0, this, _get_value__a43j40(this.l4u_1 - 1 | 0, this));
    var tmp2_this = this;
    var tmp3 = tmp2_this.l4u_1;
    tmp2_this.l4u_1 = tmp3 - 1 | 0;
    minHeapify(this, 0);
    return root;
  };
  TGenPriorityQueue.prototype.j4q = function (element) {
    var inductionVariable = 0;
    var last = this.l4u_1;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (equals(this.j4u_1[n], element))
          return n;
      }
       while (inductionVariable < last);
    return -1;
  };
  TGenPriorityQueue.prototype.i4q = function (element) {
    var index = this.j4q(element);
    if (index >= 0) {
      this.p4u(index);
    }
    return index >= 0;
  };
  TGenPriorityQueue.prototype.c5 = function (element) {
    if (!(element == null ? true : isObject(element)))
      return false;
    return this.i4q((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  TGenPriorityQueue.prototype.p4u = function (index) {
    var i = index;
    while (!(i === 0)) {
      swap(this, i, _get_parent__oo9xup(i, this));
      i = _get_parent__oo9xup(i, this);
    }
    this.o4u();
  };
  TGenPriorityQueue.prototype.l4q = function (element) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp0_any = until(0, this.l4u_1);
      var tmp;
      if (isInterface(tmp0_any, Collection)) {
        tmp = tmp0_any.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var inductionVariable = tmp0_any.r1_1;
      var last = tmp0_any.s1_1;
      if (inductionVariable <= last)
        do {
          var element_0 = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$1;
          // Inline function 'com.soywiz.kds.TGenPriorityQueue.contains.<anonymous>' call
          tmp$ret$1 = equals(_get_value__a43j40(element_0, this), element);
          if (tmp$ret$1) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
         while (!(element_0 === last));
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  TGenPriorityQueue.prototype.r = function (element) {
    if (!(element == null ? true : isObject(element)))
      return false;
    return this.l4q((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  TGenPriorityQueue.prototype.m4q = function (elements) {
    var thisSet = toSet(this);
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var tmp;
      if (isInterface(elements, Collection)) {
        tmp = elements.p();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = true;
        break $l$block_0;
      }
      var tmp0_iterator = elements.j();
      while (tmp0_iterator.k()) {
        var element = tmp0_iterator.l();
        var tmp$ret$1;
        // Inline function 'com.soywiz.kds.TGenPriorityQueue.containsAll.<anonymous>' call
        tmp$ret$1 = thisSet.r(element);
        if (!tmp$ret$1) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
      }
      tmp$ret$0 = true;
    }
    return tmp$ret$0;
  };
  TGenPriorityQueue.prototype.l2 = function (elements) {
    return this.m4q(elements);
  };
  TGenPriorityQueue.prototype.p = function () {
    return this.l4u_1 === 0;
  };
  TGenPriorityQueue.prototype.f4q = function (elements) {
    var tmp0_iterator = elements.j();
    while (tmp0_iterator.k()) {
      var e = tmp0_iterator.l();
      this.h4q(e);
    }
    var tmp$ret$0;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp$ret$0 = !elements.p();
    return tmp$ret$0;
  };
  TGenPriorityQueue.prototype.o = function (elements) {
    return this.f4q(elements);
  };
  TGenPriorityQueue.prototype.j = function () {
    var index = {_v: 0};
    return new TGenPriorityQueue$iterator$1(index, this);
  };
  TGenPriorityQueue.prototype.toString = function () {
    return toString(toList(this));
  };
  TGenPriorityQueue.prototype.equals = function (other) {
    var tmp;
    var tmp_0;
    if (other instanceof TGenPriorityQueue) {
      tmp_0 = contentEquals(this.j4u_1, other.j4u_1);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = equals(this.k4u_1, other.k4u_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  TGenPriorityQueue.prototype.hashCode = function () {
    return contentHashCode(this.j4u_1);
  };
  TGenPriorityQueue.$metadata$ = classMeta('TGenPriorityQueue', [MutableCollection]);
  function TGenQueue() {
    this.q4u_1 = TGenDeque_init_$Create$();
  }
  TGenQueue.prototype.i = function () {
    return this.q4u_1.i();
  };
  TGenQueue.prototype.p = function () {
    return this.i() === 0;
  };
  TGenQueue.prototype.r4u = function (v) {
    this.q4u_1.d4q(v);
  };
  TGenQueue.prototype.s4u = function () {
    return this.q4u_1.s4p();
  };
  TGenQueue.prototype.l4q = function (element) {
    return this.q4u_1.l4q(element);
  };
  TGenQueue.prototype.r = function (element) {
    if (!(element == null ? true : isObject(element)))
      return false;
    return this.l4q((element == null ? true : isObject(element)) ? element : THROW_CCE());
  };
  TGenQueue.prototype.m4q = function (elements) {
    return this.q4u_1.m4q(elements);
  };
  TGenQueue.prototype.l2 = function (elements) {
    return this.m4q(elements);
  };
  TGenQueue.prototype.j = function () {
    return this.q4u_1.j();
  };
  TGenQueue.prototype.hashCode = function () {
    return this.q4u_1.hashCode();
  };
  TGenQueue.prototype.equals = function (other) {
    var tmp;
    if (other instanceof TGenQueue) {
      tmp = this.q4u_1.equals(other.q4u_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  TGenQueue.$metadata$ = classMeta('TGenQueue', [Collection]);
  function RingBuffer(bits) {
    ByteRingBuffer.call(this, bits);
  }
  RingBuffer.$metadata$ = classMeta('RingBuffer', undefined, undefined, undefined, undefined, ByteRingBuffer.prototype);
  function ShortRingBuffer(bits) {
    this.a4m_1 = bits;
    this.b4m_1 = 1 << this.a4m_1;
    this.c4m_1 = this.b4m_1 - 1 | 0;
    this.d4m_1 = new Int16Array(this.b4m_1);
    this.e4m_1 = 0;
    this.f4m_1 = 0;
    this.g4m_1 = this.b4m_1;
    this.h4m_1 = 0;
    this.i4m_1 = new Int16Array(1);
  }
  ShortRingBuffer.prototype.p4m = function (data, offset, size) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.g4m_1;
    tmp$ret$0 = Math.min(tmp0_min, size);
    var toWrite = tmp$ret$0;
    var inductionVariable = 0;
    if (inductionVariable < toWrite)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        this.d4m_1[this.f4m_1] = data[offset + n | 0];
        this.f4m_1 = (this.f4m_1 + 1 | 0) & this.c4m_1;
      }
       while (inductionVariable < toWrite);
    var tmp1_this = this;
    tmp1_this.h4m_1 = tmp1_this.h4m_1 + toWrite | 0;
    var tmp2_this = this;
    tmp2_this.g4m_1 = tmp2_this.g4m_1 - toWrite | 0;
    return toWrite;
  };
  ShortRingBuffer.prototype.o4m = function (data, offset, size) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.h4m_1;
    tmp$ret$0 = Math.min(tmp0_min, size);
    var toRead = tmp$ret$0;
    var inductionVariable = 0;
    if (inductionVariable < toRead)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        data[offset + n | 0] = this.d4m_1[this.e4m_1];
        this.e4m_1 = (this.e4m_1 + 1 | 0) & this.c4m_1;
      }
       while (inductionVariable < toRead);
    var tmp1_this = this;
    tmp1_this.g4m_1 = tmp1_this.g4m_1 + toRead | 0;
    var tmp2_this = this;
    tmp2_this.h4m_1 = tmp2_this.h4m_1 - toRead | 0;
    return toRead;
  };
  ShortRingBuffer.prototype.x7 = function () {
    this.e4m_1 = 0;
    this.f4m_1 = 0;
    this.h4m_1 = 0;
    this.g4m_1 = this.b4m_1;
  };
  ShortRingBuffer.prototype.b4v = function (offset) {
    return this.d4m_1[(this.e4m_1 + offset | 0) & this.c4m_1];
  };
  ShortRingBuffer.prototype.equals = function (other) {
    var tmp;
    var tmp_0;
    if (other instanceof ShortRingBuffer) {
      tmp_0 = this.h4m_1 === other.h4m_1;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      var tmp$ret$1;
      $l$block: {
        // Inline function 'com.soywiz.kds.internal.equaler' call
        var tmp0_equaler = this.h4m_1;
        var inductionVariable = 0;
        if (inductionVariable < tmp0_equaler)
          do {
            var n = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            var tmp$ret$0;
            // Inline function 'com.soywiz.kds.ShortRingBuffer.equals.<anonymous>' call
            tmp$ret$0 = this.b4v(n) === other.b4v(n);
            if (!tmp$ret$0) {
              tmp$ret$1 = false;
              break $l$block;
            }
          }
           while (inductionVariable < tmp0_equaler);
        tmp$ret$1 = true;
      }
      tmp = tmp$ret$1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  ShortRingBuffer.prototype.hashCode = function () {
    return this.z4l();
  };
  ShortRingBuffer.prototype.z4l = function () {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.internal.hashCoder' call
    var tmp0_hashCoder = this.h4m_1;
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0_hashCoder)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        var tmp = out;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.ShortRingBuffer.contentHashCode.<anonymous>' call
        tmp$ret$0 = this.b4v(n);
        out = tmp + tmp$ret$0 | 0;
      }
       while (inductionVariable < tmp0_hashCoder);
    tmp$ret$1 = out;
    return tmp$ret$1;
  };
  ShortRingBuffer.$metadata$ = classMeta('ShortRingBuffer');
  function FloatRingBuffer(bits) {
    this.r4m_1 = bits;
    this.s4m_1 = 1 << this.r4m_1;
    this.t4m_1 = this.s4m_1 - 1 | 0;
    this.u4m_1 = new Float32Array(this.s4m_1);
    this.v4m_1 = 0;
    this.w4m_1 = 0;
    this.x4m_1 = this.s4m_1;
    this.y4m_1 = 0;
  }
  FloatRingBuffer.prototype.f4n = function (data, offset, size) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.x4m_1;
    tmp$ret$0 = Math.min(tmp0_min, size);
    var toWrite = tmp$ret$0;
    var inductionVariable = 0;
    if (inductionVariable < toWrite)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        this.u4m_1[this.w4m_1] = data[offset + n | 0];
        this.w4m_1 = (this.w4m_1 + 1 | 0) & this.t4m_1;
      }
       while (inductionVariable < toWrite);
    var tmp1_this = this;
    tmp1_this.y4m_1 = tmp1_this.y4m_1 + toWrite | 0;
    var tmp2_this = this;
    tmp2_this.x4m_1 = tmp2_this.x4m_1 - toWrite | 0;
    return toWrite;
  };
  FloatRingBuffer.prototype.e4n = function (data, offset, size) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.y4m_1;
    tmp$ret$0 = Math.min(tmp0_min, size);
    var toRead = tmp$ret$0;
    var inductionVariable = 0;
    if (inductionVariable < toRead)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        data[offset + n | 0] = this.u4m_1[this.v4m_1];
        this.v4m_1 = (this.v4m_1 + 1 | 0) & this.t4m_1;
      }
       while (inductionVariable < toRead);
    var tmp1_this = this;
    tmp1_this.x4m_1 = tmp1_this.x4m_1 + toRead | 0;
    var tmp2_this = this;
    tmp2_this.y4m_1 = tmp2_this.y4m_1 - toRead | 0;
    return toRead;
  };
  FloatRingBuffer.prototype.b4v = function (offset) {
    return this.u4m_1[(this.v4m_1 + offset | 0) & this.t4m_1];
  };
  FloatRingBuffer.prototype.equals = function (other) {
    var tmp;
    var tmp_0;
    if (other instanceof FloatRingBuffer) {
      tmp_0 = this.y4m_1 === other.y4m_1;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      var tmp$ret$1;
      $l$block: {
        // Inline function 'com.soywiz.kds.internal.equaler' call
        var tmp0_equaler = this.y4m_1;
        var inductionVariable = 0;
        if (inductionVariable < tmp0_equaler)
          do {
            var n = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            var tmp$ret$0;
            // Inline function 'com.soywiz.kds.FloatRingBuffer.equals.<anonymous>' call
            tmp$ret$0 = this.b4v(n) === other.b4v(n);
            if (!tmp$ret$0) {
              tmp$ret$1 = false;
              break $l$block;
            }
          }
           while (inductionVariable < tmp0_equaler);
        tmp$ret$1 = true;
      }
      tmp = tmp$ret$1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  FloatRingBuffer.prototype.hashCode = function () {
    return this.z4l();
  };
  FloatRingBuffer.prototype.z4l = function () {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.internal.hashCoder' call
    var tmp0_hashCoder = this.y4m_1;
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0_hashCoder)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        var tmp = out;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.FloatRingBuffer.contentHashCode.<anonymous>' call
        tmp$ret$0 = toBits(this.b4v(n));
        out = tmp + tmp$ret$0 | 0;
      }
       while (inductionVariable < tmp0_hashCoder);
    tmp$ret$1 = out;
    return tmp$ret$1;
  };
  FloatRingBuffer.$metadata$ = classMeta('FloatRingBuffer');
  function ByteRingBuffer(bits) {
    this.f4l_1 = bits;
    this.g4l_1 = 1 << this.f4l_1;
    this.h4l_1 = this.g4l_1 - 1 | 0;
    this.i4l_1 = new Int8Array(this.g4l_1);
    this.j4l_1 = 0;
    this.k4l_1 = 0;
    this.l4l_1 = this.g4l_1;
    this.m4l_1 = 0;
  }
  ByteRingBuffer.prototype.t4u = function () {
    return this.i4l_1;
  };
  ByteRingBuffer.prototype.u4u = function () {
    return this.j4l_1 & this.h4l_1;
  };
  ByteRingBuffer.prototype.v4u = function () {
    return this.k4l_1 & this.h4l_1;
  };
  ByteRingBuffer.prototype.w4u = function (count) {
    if (count < 0 ? true : count > this.l4l_1) {
      // Inline function 'kotlin.error' call
      throw IllegalStateException_init_$Create$('Try to write more than available');
    }
    var tmp0_this = this;
    tmp0_this.k4l_1 = tmp0_this.k4l_1 + count | 0;
    var tmp1_this = this;
    tmp1_this.m4l_1 = tmp1_this.m4l_1 + count | 0;
    var tmp2_this = this;
    tmp2_this.l4l_1 = tmp2_this.l4l_1 - count | 0;
  };
  ByteRingBuffer.prototype.x4u = function (count) {
    if (count < 0 ? true : count > this.m4l_1) {
      // Inline function 'kotlin.error' call
      throw IllegalStateException_init_$Create$('Try to write more than available');
    }
    var tmp0_this = this;
    tmp0_this.j4l_1 = tmp0_this.j4l_1 + count | 0;
    var tmp1_this = this;
    tmp1_this.m4l_1 = tmp1_this.m4l_1 - count | 0;
    var tmp2_this = this;
    tmp2_this.l4l_1 = tmp2_this.l4l_1 + count | 0;
  };
  ByteRingBuffer.prototype.y4u = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.m4l_1;
    var tmp1_min = this.g4l_1 - (this.j4l_1 & this.h4l_1) | 0;
    tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
    return tmp$ret$0;
  };
  ByteRingBuffer.prototype.z4u = function () {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.l4l_1;
    var tmp1_min = this.g4l_1 - (this.k4l_1 & this.h4l_1) | 0;
    tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
    return tmp$ret$0;
  };
  ByteRingBuffer.prototype.t4l = function (consume) {
    while (consume.m4l_1 > 0) {
      var tmp$ret$0;
      // Inline function 'kotlin.math.min' call
      var tmp0_min = consume.y4u();
      var tmp1_min = this.z4u();
      tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
      var copySize = tmp$ret$0;
      arraycopy_2(consume.t4u(), consume.u4u(), this.t4u(), this.v4u(), copySize);
      consume.x4u(copySize);
      this.w4u(copySize);
    }
  };
  ByteRingBuffer.prototype.v4l = function (data, offset, size) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.l4l_1;
    tmp$ret$0 = Math.min(tmp0_min, size);
    var remaining = tmp$ret$0;
    var coffset = offset;
    var totalWrite = 0;
    $l$loop: while (remaining > 0) {
      var tmp$ret$1;
      // Inline function 'kotlin.math.min' call
      var tmp1_min = remaining;
      var tmp2_min = this.z4u();
      tmp$ret$1 = Math.min(tmp1_min, tmp2_min);
      var chunkSize = tmp$ret$1;
      if (chunkSize <= 0)
        break $l$loop;
      arraycopy_2(data, coffset, this.i4l_1, this.v4u(), chunkSize);
      this.w4u(chunkSize);
      coffset = coffset + chunkSize | 0;
      remaining = remaining - chunkSize | 0;
      totalWrite = totalWrite + chunkSize | 0;
    }
    return totalWrite;
  };
  ByteRingBuffer.prototype.a4v = function (data, offset, size) {
    return this.x4l(this.y4l(data, offset, size));
  };
  ByteRingBuffer.prototype.x4l = function (size) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.m4l_1;
    tmp$ret$0 = Math.min(tmp0_min, size);
    var toRead = tmp$ret$0;
    this.j4l_1 = (this.j4l_1 + toRead | 0) & this.h4l_1;
    var tmp0_this = this;
    tmp0_this.l4l_1 = tmp0_this.l4l_1 + toRead | 0;
    var tmp1_this = this;
    tmp1_this.m4l_1 = tmp1_this.m4l_1 - toRead | 0;
    return toRead;
  };
  ByteRingBuffer.prototype.y4l = function (data, offset, size) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.min' call
    var tmp0_min = this.m4l_1;
    tmp$ret$0 = Math.min(tmp0_min, size);
    var toRead = tmp$ret$0;
    var readCount = 0;
    var buffer = this.i4l_1;
    var mask = this.h4l_1;
    var coffset = offset;
    var lReadPos = this.j4l_1;
    $l$loop: while (true) {
      var tmp$ret$1;
      // Inline function 'kotlin.math.min' call
      var tmp1_min = toRead;
      var tmp2_min = this.y4u();
      tmp$ret$1 = Math.min(tmp1_min, tmp2_min);
      var toReadChunk = tmp$ret$1;
      if (toReadChunk <= 0)
        break $l$loop;
      arraycopy_2(buffer, lReadPos & mask, data, coffset, toReadChunk);
      toRead = toRead - toReadChunk | 0;
      coffset = coffset + toReadChunk | 0;
      lReadPos = lReadPos + toReadChunk | 0;
      readCount = readCount + toReadChunk | 0;
    }
    return readCount;
  };
  ByteRingBuffer.prototype.b2p = function () {
    if (this.m4l_1 <= 0)
      return -1;
    var out = this.i4l_1[this.j4l_1] & 255;
    this.j4l_1 = (this.j4l_1 + 1 | 0) & this.h4l_1;
    var tmp0_this = this;
    var tmp1 = tmp0_this.m4l_1;
    tmp0_this.m4l_1 = tmp1 - 1 | 0;
    var tmp2_this = this;
    var tmp3 = tmp2_this.l4l_1;
    tmp2_this.l4l_1 = tmp3 + 1 | 0;
    return out;
  };
  ByteRingBuffer.prototype.x7 = function () {
    this.j4l_1 = 0;
    this.k4l_1 = 0;
    this.m4l_1 = 0;
    this.l4l_1 = this.g4l_1;
  };
  ByteRingBuffer.prototype.b4v = function (offset) {
    return this.i4l_1[(this.j4l_1 + offset | 0) & this.h4l_1];
  };
  ByteRingBuffer.prototype.equals = function (other) {
    var tmp;
    var tmp_0;
    if (other instanceof ByteRingBuffer) {
      tmp_0 = this.m4l_1 === other.m4l_1;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      var tmp$ret$1;
      $l$block: {
        // Inline function 'com.soywiz.kds.internal.equaler' call
        var tmp0_equaler = this.m4l_1;
        var inductionVariable = 0;
        if (inductionVariable < tmp0_equaler)
          do {
            var n = inductionVariable;
            inductionVariable = inductionVariable + 1 | 0;
            var tmp$ret$0;
            // Inline function 'com.soywiz.kds.ByteRingBuffer.equals.<anonymous>' call
            tmp$ret$0 = this.b4v(n) === other.b4v(n);
            if (!tmp$ret$0) {
              tmp$ret$1 = false;
              break $l$block;
            }
          }
           while (inductionVariable < tmp0_equaler);
        tmp$ret$1 = true;
      }
      tmp = tmp$ret$1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  ByteRingBuffer.prototype.hashCode = function () {
    return this.z4l();
  };
  ByteRingBuffer.prototype.z4l = function () {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.internal.hashCoder' call
    var tmp0_hashCoder = this.m4l_1;
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0_hashCoder)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        var tmp = out;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.ByteRingBuffer.contentHashCode.<anonymous>' call
        tmp$ret$0 = this.b4v(n);
        out = tmp + tmp$ret$0 | 0;
      }
       while (inductionVariable < tmp0_hashCoder);
    tmp$ret$1 = out;
    return tmp$ret$1;
  };
  ByteRingBuffer.$metadata$ = classMeta('ByteRingBuffer');
  function _TGenStack___init__impl__yynjgt(items) {
    return items;
  }
  function _TGenStack___init__impl__yynjgt_0(items, $mask0, $marker) {
    if (!(($mask0 & 1) === 0))
      items = FastArrayList_init_$Create$();
    var tmp = _TGenStack___init__impl__yynjgt(items);
    return tmp;
  }
  function _get_items__fzd5gv($this) {
    return $this;
  }
  function _TGenStack___get_size__impl__cvg66t($this) {
    return _get_items__fzd5gv($this).i();
  }
  function TGenStack__isEmpty_impl_bsbpyi($this) {
    return _TGenStack___get_size__impl__cvg66t($this) === 0;
  }
  function Companion_6() {
    Companion_instance_6 = this;
  }
  Companion_6.$metadata$ = objectMeta('Companion');
  var Companion_instance_6;
  function Companion_getInstance_6() {
    if (Companion_instance_6 == null)
      new Companion_6();
    return Companion_instance_6;
  }
  function TGenStack__push_impl_9yh33t($this, v) {
    _get_items__fzd5gv($this).c(v);
  }
  function TGenStack__pop_impl_qisxa0($this) {
    return _get_items__fzd5gv($this).z4(_get_items__fzd5gv($this).i() - 1 | 0);
  }
  function TGenStack__clear_impl_pali4s($this) {
    _get_items__fzd5gv($this).x7();
  }
  function TGenStack__contains_impl_l8kli6($this, element) {
    return _get_items__fzd5gv($this).r(element);
  }
  function TGenStack__contains_impl_l8kli6_0($this, element) {
    if (!(element == null ? true : isObject(element)))
      return false;
    var tmp = $this.c4v_1;
    return TGenStack__contains_impl_l8kli6(tmp, (element == null ? true : isObject(element)) ? element : THROW_CCE());
  }
  function TGenStack__containsAll_impl_ic9i7r($this, elements) {
    return _get_items__fzd5gv($this).l2(elements);
  }
  function TGenStack__containsAll_impl_ic9i7r_0($this, elements) {
    return TGenStack__containsAll_impl_ic9i7r($this.c4v_1, elements);
  }
  function TGenStack__iterator_impl_2pdia5($this) {
    return _get_items__fzd5gv($this).j();
  }
  function TGenStack__toString_impl_s9t5hn($this) {
    return 'TGenStack(items=' + $this + ')';
  }
  function TGenStack__hashCode_impl_l04zom($this) {
    return $this.hashCode();
  }
  function TGenStack__equals_impl_w9i35u($this, other) {
    if (!(other instanceof TGenStack))
      return false;
    var tmp0_other_with_cast = other instanceof TGenStack ? other.c4v_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function TGenStack(items) {
    Companion_getInstance_6();
    this.c4v_1 = items;
  }
  TGenStack.prototype.i = function () {
    return _TGenStack___get_size__impl__cvg66t(this.c4v_1);
  };
  TGenStack.prototype.p = function () {
    return TGenStack__isEmpty_impl_bsbpyi(this.c4v_1);
  };
  TGenStack.prototype.l4q = function (element) {
    return TGenStack__contains_impl_l8kli6(this.c4v_1, element);
  };
  TGenStack.prototype.r = function (element) {
    return TGenStack__contains_impl_l8kli6_0(this, element);
  };
  TGenStack.prototype.m4q = function (elements) {
    return TGenStack__containsAll_impl_ic9i7r(this.c4v_1, elements);
  };
  TGenStack.prototype.l2 = function (elements) {
    return TGenStack__containsAll_impl_ic9i7r_0(this, elements);
  };
  TGenStack.prototype.j = function () {
    return TGenStack__iterator_impl_2pdia5(this.c4v_1);
  };
  TGenStack.prototype.toString = function () {
    return TGenStack__toString_impl_s9t5hn(this.c4v_1);
  };
  TGenStack.prototype.hashCode = function () {
    return TGenStack__hashCode_impl_l04zom(this.c4v_1);
  };
  TGenStack.prototype.equals = function (other) {
    return TGenStack__equals_impl_w9i35u(this.c4v_1, other);
  };
  TGenStack.$metadata$ = classMeta('TGenStack', [Collection]);
  function Mixin_init_$Init$(extra, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      extra = null;
    Mixin.call($this, extra);
    return $this;
  }
  function Mixin_init_$Create$(extra, $mask0, $marker) {
    return Mixin_init_$Init$(extra, $mask0, $marker, Object.create(Mixin.prototype));
  }
  function Property_init_$Init$(name, defaultGen, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      name = null;
    Property.call($this, name, defaultGen);
    return $this;
  }
  function Property_init_$Create$(name, defaultGen, $mask0, $marker) {
    return Property_init_$Init$(name, defaultGen, $mask0, $marker, Object.create(Property.prototype));
  }
  function PropertyThis_init_$Init$(name, defaultGen, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      name = null;
    PropertyThis.call($this, name, defaultGen);
    return $this;
  }
  function PropertyThis_init_$Create$(name, defaultGen, $mask0, $marker) {
    return PropertyThis_init_$Init$(name, defaultGen, $mask0, $marker, Object.create(PropertyThis.prototype));
  }
  function Extra$PropertyThis$transform$lambda($this$null, it) {
    return it;
  }
  function Mixin(extra) {
    this.d4v_1 = extra;
  }
  Mixin.prototype.e4v = function (_set____db54di) {
    this.d4v_1 = _set____db54di;
  };
  Mixin.prototype.f4v = function () {
    return this.d4v_1;
  };
  Mixin.$metadata$ = classMeta('Mixin', [Extra]);
  function Property(name, defaultGen) {
    this.g4v_1 = name;
    this.h4v_1 = defaultGen;
  }
  Property.prototype.i4v = function (thisRef, property) {
    var tmp$ret$4;
    // Inline function 'com.soywiz.kds.fastCastTo' call
    var tmp1_safe_receiver = thisRef.f4v();
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      var tmp$ret$1;
      // Inline function 'com.soywiz.kds.get' call
      var tmp0_elvis_lhs = this.g4v_1;
      var tmp0_get = tmp0_elvis_lhs == null ? property.callableName : tmp0_elvis_lhs;
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp1_safe_receiver;
      tmp$ret$1 = tmp$ret$0.get(tmp0_get);
      tmp = tmp$ret$1;
    }
    var tmp1_fastCastTo = tmp;
    var tmp$ret$3;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = tmp1_fastCastTo;
    tmp$ret$3 = tmp$ret$2;
    tmp$ret$4 = tmp$ret$3;
    var res = tmp$ret$4;
    if (res == null) {
      var r = this.h4v_1();
      var tmp_0;
      if (!(r == null)) {
        tmp_0 = true;
      } else {
        var tmp2_elvis_lhs = this.g4v_1;
        tmp_0 = hasExtra(thisRef, tmp2_elvis_lhs == null ? property.callableName : tmp2_elvis_lhs);
      }
      if (tmp_0) {
        // Inline function 'com.soywiz.kds.Property.setValue' call
        var tmp0_elvis_lhs_0 = this.g4v_1;
        var tmp_1 = tmp0_elvis_lhs_0 == null ? property.callableName : tmp0_elvis_lhs_0;
        var tmp$ret$7;
        // Inline function 'com.soywiz.kds.fastCastTo' call
        var tmp$ret$6;
        // Inline function 'kotlin.js.unsafeCast' call
        var tmp$ret$5;
        // Inline function 'kotlin.js.asDynamic' call
        tmp$ret$5 = r;
        tmp$ret$6 = tmp$ret$5;
        tmp$ret$7 = tmp$ret$6;
        setExtra(thisRef, tmp_1, tmp$ret$7);
      }
      return r;
    }
    return res;
  };
  Property.prototype.j4v = function (thisRef, property, value) {
    var tmp0_elvis_lhs = this.g4v_1;
    var tmp = tmp0_elvis_lhs == null ? property.callableName : tmp0_elvis_lhs;
    var tmp$ret$2;
    // Inline function 'com.soywiz.kds.fastCastTo' call
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = value;
    tmp$ret$1 = tmp$ret$0;
    tmp$ret$2 = tmp$ret$1;
    setExtra(thisRef, tmp, tmp$ret$2);
  };
  Property.$metadata$ = classMeta('Property');
  function PropertyThis(name, defaultGen) {
    this.k4v_1 = name;
    this.l4v_1 = defaultGen;
    var tmp = this;
    tmp.m4v_1 = Extra$PropertyThis$transform$lambda;
  }
  PropertyThis.prototype.n4v = function (block) {
    this.m4v_1 = block;
    return this;
  };
  PropertyThis.prototype.o4v = function (thisRef, property) {
    var tmp0_elvis_lhs = this.k4v_1;
    var res = getExtraTyped(thisRef, tmp0_elvis_lhs == null ? property.callableName : tmp0_elvis_lhs);
    if (res == null) {
      var r = this.l4v_1(thisRef);
      // Inline function 'com.soywiz.kds.PropertyThis.setValueUntransformed' call
      var tmp0_elvis_lhs_0 = this.k4v_1;
      setExtra(thisRef, tmp0_elvis_lhs_0 == null ? property.callableName : tmp0_elvis_lhs_0, r);
      return r;
    }
    return res;
  };
  PropertyThis.prototype.p4v = function (thisRef, property, value) {
    var tmp0_elvis_lhs = this.k4v_1;
    setExtra(thisRef, tmp0_elvis_lhs == null ? property.callableName : tmp0_elvis_lhs, value);
  };
  PropertyThis.$metadata$ = classMeta('PropertyThis');
  function Extra() {
  }
  Extra.$metadata$ = interfaceMeta('Extra');
  function extraPropertyThis(name, transform, default_0) {
    var tmp$ret$0;
    // Inline function 'com.soywiz.kds.PropertyThis.withTransform' call
    var tmp0_withTransform = new PropertyThis(name, default_0);
    tmp0_withTransform.m4v_1 = transform;
    tmp$ret$0 = tmp0_withTransform;
    return tmp$ret$0;
  }
  function extraProperty(name, default_0) {
    return new Property(name, default_0);
  }
  function getExtra(_this__u8e3s4, name) {
    var tmp0_safe_receiver = _this__u8e3s4.f4v();
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      var tmp$ret$1;
      // Inline function 'com.soywiz.kds.get' call
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp0_safe_receiver;
      tmp$ret$1 = tmp$ret$0.get(name);
      tmp = tmp$ret$1;
    }
    return tmp;
  }
  function setExtra(_this__u8e3s4, name, value) {
    if (_this__u8e3s4.f4v() == null) {
      if (value == null)
        return Unit_getInstance();
      _this__u8e3s4.e4v(ExtraTypeCreate());
    }
    var tmp0_safe_receiver = _this__u8e3s4.f4v();
    if (tmp0_safe_receiver == null)
      null;
    else {
      var tmp$ret$2;
      // Inline function 'com.soywiz.kds.set' call
      var tmp$ret$1;
      // Inline function 'kotlin.run' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp0_safe_receiver;
      tmp$ret$1 = tmp$ret$0.set(name, value);
      tmp$ret$2 = tmp$ret$1;
    }
  }
  function hasExtra(_this__u8e3s4, name) {
    var tmp0_safe_receiver = _this__u8e3s4.f4v();
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      var tmp$ret$1;
      // Inline function 'com.soywiz.kds.contains' call
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp0_safe_receiver;
      tmp$ret$1 = tmp$ret$0.has(name);
      tmp = tmp$ret$1;
    }
    return tmp === true;
  }
  function extraCache(_this__u8e3s4, name, block) {
    var tmp = getExtra(_this__u8e3s4, name);
    var tmp0_elvis_lhs = (tmp == null ? true : isObject(tmp)) ? tmp : null;
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      var tmp$ret$0;
      // Inline function 'kotlin.also' call
      var tmp0_also = block();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.soywiz.kds.extraCache.<anonymous>' call
      setExtra(_this__u8e3s4, name, tmp0_also);
      tmp$ret$0 = tmp0_also;
      tmp_0 = tmp$ret$0;
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    return tmp_0;
  }
  function getExtraTyped(_this__u8e3s4, name) {
    var tmp$ret$4;
    // Inline function 'com.soywiz.kds.fastCastTo' call
    var tmp0_safe_receiver = _this__u8e3s4.f4v();
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      var tmp$ret$1;
      // Inline function 'com.soywiz.kds.get' call
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp0_safe_receiver;
      tmp$ret$1 = tmp$ret$0.get(name);
      tmp = tmp$ret$1;
    }
    var tmp0_fastCastTo = tmp;
    var tmp$ret$3;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = tmp0_fastCastTo;
    tmp$ret$3 = tmp$ret$2;
    tmp$ret$4 = tmp$ret$3;
    return tmp$ret$4;
  }
  function ExtraTypeCreate() {
    return FastStringMap();
  }
  function toLinkedMap(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.toLinkedMap.<anonymous>' call
    var tmp0_iterator = _this__u8e3s4.j();
    while (tmp0_iterator.k()) {
      var tmp1_loop_parameter = tmp0_iterator.l();
      var key = tmp1_loop_parameter.n4();
      var value = tmp1_loop_parameter.o4();
      // Inline function 'kotlin.collections.set' call
      tmp0_also.a(key, value);
    }
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function linkedHashMapOf(pairs) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    var tmp0_also = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.linkedHashMapOf.<anonymous>' call
    var indexedObject = pairs;
    var inductionVariable = 0;
    var last = indexedObject.length;
    while (inductionVariable < last) {
      var tmp1_loop_parameter = indexedObject[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      var key = tmp1_loop_parameter.n4();
      var value = tmp1_loop_parameter.o4();
      // Inline function 'kotlin.collections.set' call
      tmp0_also.a(key, value);
    }
    tmp$ret$0 = tmp0_also;
    return tmp$ret$0;
  }
  function _BSearchResult___init__impl__em6zam(raw) {
    return raw;
  }
  function _BSearchResult___get_raw__impl__uyuhf3($this) {
    return $this;
  }
  function _BSearchResult___get_found__impl__om04iz($this) {
    return _BSearchResult___get_raw__impl__uyuhf3($this) >= 0;
  }
  function _BSearchResult___get_index__impl__b5kraz($this) {
    return _BSearchResult___get_found__impl__om04iz($this) ? _BSearchResult___get_raw__impl__uyuhf3($this) : -1;
  }
  function _BSearchResult___get_nearIndex__impl__s8nq43($this) {
    return _BSearchResult___get_found__impl__om04iz($this) ? _BSearchResult___get_raw__impl__uyuhf3($this) : (-_BSearchResult___get_raw__impl__uyuhf3($this) | 0) - 1 | 0;
  }
  function genericBinarySearchResult(fromIndex, toIndex, check) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'com.soywiz.kds.genericBinarySearch' call
      var low = fromIndex;
      var high = toIndex - 1 | 0;
      while (low <= high) {
        var mid = (low + high | 0) / 2 | 0;
        var mval = check(mid);
        if (mval < 0)
          low = mid + 1 | 0;
        else if (mval > 0)
          high = mid - 1 | 0;
        else {
          tmp$ret$0 = mid;
          break $l$block;
        }
      }
      var tmp$ret$1;
      // Inline function 'com.soywiz.kds.genericBinarySearchResult.<anonymous>' call
      var tmp0__anonymous__q1qw7t = low;
      var tmp1__anonymous__uwfjfc = high;
      tmp$ret$1 = (-tmp0__anonymous__q1qw7t | 0) - 1 | 0;
      tmp$ret$0 = tmp$ret$1;
    }
    return _BSearchResult___init__impl__em6zam(tmp$ret$0);
  }
  function genericBinarySearch(fromIndex, toIndex, invalid, check) {
    var low = fromIndex;
    var high = toIndex - 1 | 0;
    while (low <= high) {
      var mid = (low + high | 0) / 2 | 0;
      var mval = check(mid);
      if (mval < 0)
        low = mid + 1 | 0;
      else if (mval > 0)
        high = mid - 1 | 0;
      else
        return mid;
    }
    return invalid(fromIndex, toIndex, low, high);
  }
  function binarySearch(_this__u8e3s4, v, fromIndex, toIndex) {
    var tmp$ret$3;
    // Inline function 'com.soywiz.kds.genericBinarySearchResult' call
    var tmp$ret$1;
    $l$block: {
      // Inline function 'com.soywiz.kds.genericBinarySearch' call
      var low = fromIndex;
      var high = toIndex - 1 | 0;
      while (low <= high) {
        var mid = (low + high | 0) / 2 | 0;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.binarySearch.<anonymous>' call
        tmp$ret$0 = compareTo(_this__u8e3s4.t4n(mid), v);
        var mval = tmp$ret$0;
        if (mval < 0)
          low = mid + 1 | 0;
        else if (mval > 0)
          high = mid - 1 | 0;
        else {
          tmp$ret$1 = mid;
          break $l$block;
        }
      }
      var tmp$ret$2;
      // Inline function 'com.soywiz.kds.genericBinarySearchResult.<anonymous>' call
      var tmp0__anonymous__q1qw7t = low;
      var tmp1__anonymous__uwfjfc = high;
      tmp$ret$2 = (-tmp0__anonymous__q1qw7t | 0) - 1 | 0;
      tmp$ret$1 = tmp$ret$2;
    }
    tmp$ret$3 = _BSearchResult___init__impl__em6zam(tmp$ret$1);
    return tmp$ret$3;
  }
  function binarySearch$default(_this__u8e3s4, v, fromIndex, toIndex, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      fromIndex = 0;
    if (!(($mask0 & 4) === 0))
      toIndex = _this__u8e3s4.i();
    return binarySearch(_this__u8e3s4, v, fromIndex, toIndex);
  }
  function forEachRatio01(steps, include0, include1, block) {
    var NS = steps - 1 | 0;
    var start = include0 ? 0 : 1;
    var end = include1 ? NS : NS - 1 | 0;
    var inductionVariable = start;
    if (inductionVariable <= end)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var ratio = n / NS;
        block(ratio);
      }
       while (!(n === end));
  }
  function getCyclic(_this__u8e3s4, index) {
    return _this__u8e3s4.m(umod(index, _this__u8e3s4.i()));
  }
  function getCyclicOrNull(_this__u8e3s4, index) {
    return _this__u8e3s4.p() ? null : getOrNull(_this__u8e3s4, umod(index, _this__u8e3s4.i()));
  }
  function flip(_this__u8e3s4) {
    var tmp$ret$3;
    // Inline function 'kotlin.collections.map' call
    var tmp$ret$2;
    // Inline function 'kotlin.collections.mapTo' call
    var tmp0_mapTo = ArrayList_init_$Create$(_this__u8e3s4.i());
    var tmp$ret$0;
    // Inline function 'kotlin.collections.iterator' call
    tmp$ret$0 = _this__u8e3s4.j1().j();
    var tmp0_iterator = tmp$ret$0;
    while (tmp0_iterator.k()) {
      var item = tmp0_iterator.l();
      var tmp$ret$1;
      // Inline function 'com.soywiz.kds.flip.<anonymous>' call
      tmp$ret$1 = new Pair(item.l1(), item.k1());
      tmp0_mapTo.c(tmp$ret$1);
    }
    tmp$ret$2 = tmp0_mapTo;
    tmp$ret$3 = tmp$ret$2;
    return toMap(tmp$ret$3);
  }
  function getCyclic_0(_this__u8e3s4, index) {
    return _this__u8e3s4[umod(index, _this__u8e3s4.length)];
  }
  function genericSort(subject, left, right, ops) {
    return genericSort_0(subject, left, right, ops, false);
  }
  function SortOps() {
  }
  SortOps.prototype.d4p = function (subject, indexL, indexR) {
    var inductionVariable = indexR;
    var last = indexL + 1 | 0;
    if (last <= inductionVariable)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + -1 | 0;
        this.c4p(subject, n - 1 | 0, n);
      }
       while (!(n === last));
  };
  SortOps.prototype.y4o = function (subject, indexL, indexR) {
    var count = (indexR - indexL | 0) + 1 | 0;
    var inductionVariable = 0;
    var last = count / 2 | 0;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        this.c4p(subject, indexL + n | 0, indexR - n | 0);
      }
       while (inductionVariable < last);
  };
  SortOps.$metadata$ = classMeta('SortOps');
  function genericSort_0(subject, left, right, ops, reversed) {
    var tmp$ret$0;
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.genericSort.<anonymous>' call
    timSort$default(subject, left, right, ops, reversed, 0, 32, null);
    tmp$ret$0 = subject;
    return tmp$ret$0;
  }
  function timSort(arr, l, r, ops, reversed, RUN) {
    var n = (r - l | 0) + 1 | 0;
    var progression = step(until(0, n), RUN);
    var inductionVariable = progression.r1_1;
    var last = progression.s1_1;
    var step_0 = progression.t1_1;
    if ((step_0 > 0 ? inductionVariable <= last : false) ? true : step_0 < 0 ? last <= inductionVariable : false)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + step_0 | 0;
        var tmp = l + i | 0;
        var tmp$ret$0;
        // Inline function 'kotlin.math.min' call
        var tmp0_min = (i + RUN | 0) - 1 | 0;
        var tmp1_min = n - 1 | 0;
        tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
        insertionSort(arr, tmp, l + tmp$ret$0 | 0, ops, reversed);
      }
       while (!(i === last));
    var size = RUN;
    while (size < n) {
      var progression_0 = step(until(0, n), imul(2, size));
      var inductionVariable_0 = progression_0.r1_1;
      var last_0 = progression_0.s1_1;
      var step_1 = progression_0.t1_1;
      if ((step_1 > 0 ? inductionVariable_0 <= last_0 : false) ? true : step_1 < 0 ? last_0 <= inductionVariable_0 : false)
        do {
          var left = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + step_1 | 0;
          var tmp$ret$1;
          // Inline function 'kotlin.math.min' call
          var tmp2_min = size;
          var tmp3_min = (n - left | 0) - 1 | 0;
          tmp$ret$1 = Math.min(tmp2_min, tmp3_min);
          var rize = tmp$ret$1;
          var mid = (left + rize | 0) - 1 | 0;
          var tmp$ret$2;
          // Inline function 'kotlin.math.min' call
          var tmp4_min = (left + imul(2, rize) | 0) - 1 | 0;
          var tmp5_min = n - 1 | 0;
          tmp$ret$2 = Math.min(tmp4_min, tmp5_min);
          var right = tmp$ret$2;
          merge(arr, l + left | 0, l + mid | 0, l + right | 0, ops, reversed);
        }
         while (!(left === last_0));
      size = imul(size, 2);
    }
  }
  function timSort$default(arr, l, r, ops, reversed, RUN, $mask0, $handler) {
    if (!(($mask0 & 32) === 0))
      RUN = 32;
    return timSort(arr, l, r, ops, reversed, RUN);
  }
  function insertionSort(arr, left, right, ops, reversed) {
    var inductionVariable = left + 1 | 0;
    if (inductionVariable <= right)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var m = n - 1 | 0;
        $l$loop: while (m >= left) {
          if (negateIf(ops.a4p(arr, m, n), reversed) <= 0)
            break $l$loop;
          var tmp1 = m;
          m = tmp1 - 1 | 0;
        }
        var tmp2 = m;
        m = tmp2 + 1 | 0;
        if (!(m === n)) {
          ops.d4p(arr, m, n);
        }
      }
       while (!(n === right));
  }
  function merge(arr, start, mid, end, ops, reversed) {
    var s = start;
    var m = mid;
    var s2 = m + 1 | 0;
    if (negateIf(ops.a4p(arr, m, s2), reversed) <= 0)
      return Unit_getInstance();
    while (s <= m ? s2 <= end : false) {
      if (negateIf(ops.a4p(arr, s, s2), reversed) <= 0) {
        var tmp0 = s;
        s = tmp0 + 1 | 0;
      } else {
        ops.d4p(arr, s, s2);
        var tmp1 = s;
        s = tmp1 + 1 | 0;
        var tmp2 = m;
        m = tmp2 + 1 | 0;
        var tmp3 = s2;
        s2 = tmp3 + 1 | 0;
      }
    }
  }
  function negateIf(_this__u8e3s4, doNegate) {
    return doNegate ? -_this__u8e3s4 | 0 : _this__u8e3s4;
  }
  function FakeMutableIterator(iterator) {
    this.q4v_1 = iterator;
  }
  FakeMutableIterator.prototype.k = function () {
    return this.q4v_1.k();
  };
  FakeMutableIterator.prototype.l = function () {
    return this.q4v_1.l();
  };
  FakeMutableIterator.prototype.l1y = function () {
    throw NotImplementedError_init_$Create$(null, 1, null);
  };
  FakeMutableIterator.prototype.b5 = function () {
    return this.l1y();
  };
  FakeMutableIterator.$metadata$ = classMeta('FakeMutableIterator', [MutableIterator, Iterator]);
  function asFakeMutable(_this__u8e3s4) {
    return new FakeMutableIterator(_this__u8e3s4);
  }
  function umod(_this__u8e3s4, other) {
    var remainder = _this__u8e3s4 % other | 0;
    return remainder < 0 ? remainder + other | 0 : remainder;
  }
  function ilog2Ceil(v) {
    var tmp$ret$1;
    // Inline function 'kotlin.math.ceil' call
    var tmp$ret$0;
    // Inline function 'kotlin.math.log2' call
    var tmp0_log2 = v;
    tmp$ret$0 = log2(tmp0_log2);
    var tmp1_ceil = tmp$ret$0;
    tmp$ret$1 = Math.ceil(tmp1_ceil);
    return numberToInt(tmp$ret$1);
  }
  function fill(_this__u8e3s4, value) {
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        _this__u8e3s4[n] = value;
      }
       while (inductionVariable < last);
  }
  function fill_0(_this__u8e3s4, value) {
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        _this__u8e3s4[n] = value;
      }
       while (inductionVariable < last);
  }
  function arraycopy(src, srcPos, dst, dstPos, size) {
    var tmp$ret$4;
    // Inline function 'kotlin.collections.copyInto' call
    var tmp0_copyInto = srcPos + size | 0;
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = src;
    tmp$ret$1 = tmp$ret$0;
    var tmp = tmp$ret$1;
    var tmp$ret$3;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = dst;
    tmp$ret$3 = tmp$ret$2;
    arrayCopy(tmp, tmp$ret$3, dstPos, srcPos, tmp0_copyInto);
    tmp$ret$4 = dst;
    return tmp$ret$4;
  }
  function contentHashCode_0(_this__u8e3s4, src, dst) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.internal.hashCoder' call
    var tmp0_hashCoder = dst - src | 0;
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0_hashCoder)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        var tmp = out;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.internal.contentHashCode.<anonymous>' call
        tmp$ret$0 = numberToInt(_this__u8e3s4[src + n | 0]);
        out = tmp + tmp$ret$0 | 0;
      }
       while (inductionVariable < tmp0_hashCoder);
    tmp$ret$1 = out;
    return tmp$ret$1;
  }
  function contentEquals_0(_this__u8e3s4, that, src, dst) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'com.soywiz.kds.internal.equaler' call
      var tmp0_equaler = dst - src | 0;
      var inductionVariable = 0;
      if (inductionVariable < tmp0_equaler)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$0;
          // Inline function 'com.soywiz.kds.internal.contentEquals.<anonymous>' call
          tmp$ret$0 = _this__u8e3s4[src + n | 0] === that[src + n | 0];
          if (!tmp$ret$0) {
            tmp$ret$1 = false;
            break $l$block;
          }
        }
         while (inductionVariable < tmp0_equaler);
      tmp$ret$1 = true;
    }
    return tmp$ret$1;
  }
  function arraycopy_0(src, srcPos, dst, dstPos, size) {
    var tmp$ret$4;
    // Inline function 'kotlin.collections.copyInto' call
    var tmp0_copyInto = srcPos + size | 0;
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = src;
    tmp$ret$1 = tmp$ret$0;
    var tmp = tmp$ret$1;
    var tmp$ret$3;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = dst;
    tmp$ret$3 = tmp$ret$2;
    arrayCopy(tmp, tmp$ret$3, dstPos, srcPos, tmp0_copyInto);
    tmp$ret$4 = dst;
    return tmp$ret$4;
  }
  function contentHashCode_1(_this__u8e3s4, src, dst) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.internal.hashCoder' call
    var tmp0_hashCoder = dst - src | 0;
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0_hashCoder)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        var tmp = out;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.internal.contentHashCode.<anonymous>' call
        tmp$ret$0 = toRawBits(_this__u8e3s4[src + n | 0]);
        out = tmp + tmp$ret$0 | 0;
      }
       while (inductionVariable < tmp0_hashCoder);
    tmp$ret$1 = out;
    return tmp$ret$1;
  }
  function contentEquals_1(_this__u8e3s4, that, src, dst) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'com.soywiz.kds.internal.equaler' call
      var tmp0_equaler = dst - src | 0;
      var inductionVariable = 0;
      if (inductionVariable < tmp0_equaler)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$0;
          // Inline function 'com.soywiz.kds.internal.contentEquals.<anonymous>' call
          tmp$ret$0 = _this__u8e3s4[src + n | 0] === that[src + n | 0];
          if (!tmp$ret$0) {
            tmp$ret$1 = false;
            break $l$block;
          }
        }
         while (inductionVariable < tmp0_equaler);
      tmp$ret$1 = true;
    }
    return tmp$ret$1;
  }
  function arraycopy_1(src, srcPos, dst, dstPos, size) {
    var tmp$ret$4;
    // Inline function 'kotlin.collections.copyInto' call
    var tmp0_copyInto = srcPos + size | 0;
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = src;
    tmp$ret$1 = tmp$ret$0;
    var tmp = tmp$ret$1;
    var tmp$ret$3;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = dst;
    tmp$ret$3 = tmp$ret$2;
    arrayCopy(tmp, tmp$ret$3, dstPos, srcPos, tmp0_copyInto);
    tmp$ret$4 = dst;
    return tmp$ret$4;
  }
  function contentHashCode_2(_this__u8e3s4, src, dst) {
    var tmp$ret$1;
    // Inline function 'com.soywiz.kds.internal.hashCoder' call
    var tmp0_hashCoder = dst - src | 0;
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < tmp0_hashCoder)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        var tmp = out;
        var tmp$ret$0;
        // Inline function 'com.soywiz.kds.internal.contentHashCode.<anonymous>' call
        tmp$ret$0 = _this__u8e3s4[src + n | 0];
        out = tmp + tmp$ret$0 | 0;
      }
       while (inductionVariable < tmp0_hashCoder);
    tmp$ret$1 = out;
    return tmp$ret$1;
  }
  function contentEquals_2(_this__u8e3s4, that, src, dst) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'com.soywiz.kds.internal.equaler' call
      var tmp0_equaler = dst - src | 0;
      var inductionVariable = 0;
      if (inductionVariable < tmp0_equaler)
        do {
          var n = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp$ret$0;
          // Inline function 'com.soywiz.kds.internal.contentEquals.<anonymous>' call
          tmp$ret$0 = _this__u8e3s4[src + n | 0] === that[src + n | 0];
          if (!tmp$ret$0) {
            tmp$ret$1 = false;
            break $l$block;
          }
        }
         while (inductionVariable < tmp0_equaler);
      tmp$ret$1 = true;
    }
    return tmp$ret$1;
  }
  function arraycopy_2(src, srcPos, dst, dstPos, size) {
    var tmp$ret$4;
    // Inline function 'kotlin.collections.copyInto' call
    var tmp0_copyInto = srcPos + size | 0;
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = src;
    tmp$ret$1 = tmp$ret$0;
    var tmp = tmp$ret$1;
    var tmp$ret$3;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$2;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$2 = dst;
    tmp$ret$3 = tmp$ret$2;
    arrayCopy(tmp, tmp$ret$3, dstPos, srcPos, tmp0_copyInto);
    tmp$ret$4 = dst;
    return tmp$ret$4;
  }
  function ilog2(v) {
    var tmp$ret$0;
    // Inline function 'kotlin.math.log2' call
    var tmp0_log2 = v;
    tmp$ret$0 = log2(tmp0_log2);
    return numberToInt(tmp$ret$0);
  }
  function equaler(count, gen) {
    var inductionVariable = 0;
    if (inductionVariable < count)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (!gen(n))
          return false;
      }
       while (inductionVariable < count);
    return true;
  }
  function hashCoder(count, gen) {
    var out = 0;
    var inductionVariable = 0;
    if (inductionVariable < count)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        out = imul(out, 7);
        out = out + gen(n) | 0;
      }
       while (inductionVariable < count);
    return out;
  }
  function contentHashCode_3(size, gen) {
    var result = 1;
    var inductionVariable = 0;
    if (inductionVariable < size)
      do {
        var n = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = imul(31, result);
        var tmp$ret$0;
        // Inline function 'kotlin.hashCode' call
        var tmp0_hashCode = gen(n);
        var tmp0_safe_receiver = tmp0_hashCode;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
        tmp$ret$0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
        result = tmp + tmp$ret$0 | 0;
      }
       while (inductionVariable < size);
    return result;
  }
  function arraycopy_3(src, srcPos, dst, dstPos, size) {
    var tmp$ret$0;
    // Inline function 'kotlin.collections.copyInto' call
    var tmp0_copyInto = srcPos + size | 0;
    arrayCopy(src, dst, dstPos, srcPos, tmp0_copyInto);
    tmp$ret$0 = dst;
    return tmp$ret$0;
  }
  function fastForEach_0(_this__u8e3s4, callback) {
    var n = 0;
    while (n < _this__u8e3s4.i()) {
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      callback(_this__u8e3s4.m(tmp0));
    }
  }
  function fastForEach_1(_this__u8e3s4, callback) {
    var n = 0;
    while (n < _this__u8e3s4.length) {
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      callback(_this__u8e3s4[tmp0]);
    }
  }
  function fastForEach_2(_this__u8e3s4, callback) {
    var n = 0;
    while (n < _this__u8e3s4.i()) {
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      callback(_this__u8e3s4.t4n(tmp0));
    }
  }
  function fastIterateRemove(_this__u8e3s4, callback) {
    var n = 0;
    var m = 0;
    while (n < _this__u8e3s4.i()) {
      if (m >= 0 ? !(m === n) : false) {
        _this__u8e3s4.a5(m, _this__u8e3s4.m(n));
      }
      if (callback(_this__u8e3s4.m(n))) {
        var tmp0 = m;
        m = tmp0 - 1 | 0;
      }
      var tmp1 = n;
      n = tmp1 + 1 | 0;
      var tmp2 = m;
      m = tmp2 + 1 | 0;
    }
    while (_this__u8e3s4.i() > m) {
      _this__u8e3s4.z4(_this__u8e3s4.i() - 1 | 0);
    }
    return _this__u8e3s4;
  }
  function fastForEach_3(_this__u8e3s4, callback) {
    var n = 0;
    while (n < _this__u8e3s4.i()) {
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      callback(_this__u8e3s4.t4n(tmp0));
    }
  }
  function fastForEach_4(_this__u8e3s4, callback) {
    var n = 0;
    while (n < _this__u8e3s4.length) {
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      callback(_this__u8e3s4[tmp0]);
    }
  }
  function fastForEachWithIndex(_this__u8e3s4, callback) {
    var n = 0;
    while (n < _this__u8e3s4.i()) {
      callback(n, _this__u8e3s4.m(n));
      var tmp0 = n;
      n = tmp0 + 1 | 0;
    }
  }
  function fastForEachReverse(_this__u8e3s4, callback) {
    var n = 0;
    while (n < _this__u8e3s4.i()) {
      callback(_this__u8e3s4.m((_this__u8e3s4.i() - n | 0) - 1 | 0));
      var tmp0 = n;
      n = tmp0 + 1 | 0;
    }
  }
  function fastCastTo(_this__u8e3s4) {
    var tmp$ret$1;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$1 = tmp$ret$0;
    return tmp$ret$1;
  }
  function FastArrayList_init_$Init$($this) {
    var tmp$ret$0;
    // Inline function 'kotlin.emptyArray' call
    tmp$ret$0 = [];
    FastArrayList.call($this, tmp$ret$0);
    return $this;
  }
  function FastArrayList_init_$Create$() {
    return FastArrayList_init_$Init$(Object.create(FastArrayList.prototype));
  }
  function FastArrayList_init_$Init$_0(initialCapacity, $this) {
    var tmp$ret$0;
    // Inline function 'kotlin.emptyArray' call
    tmp$ret$0 = [];
    FastArrayList.call($this, tmp$ret$0);
    return $this;
  }
  function FastArrayList_init_$Create$_0(initialCapacity) {
    return FastArrayList_init_$Init$_0(initialCapacity, Object.create(FastArrayList.prototype));
  }
  function rangeCheck($this, index) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.FastArrayList.rangeCheck.<anonymous>' call
    if (index < 0 ? true : index >= $this.i()) {
      throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + $this.i());
    }
    tmp$ret$0 = index;
    return tmp$ret$0;
  }
  function insertionRangeCheck($this, index) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.FastArrayList.insertionRangeCheck.<anonymous>' call
    if (index < 0 ? true : index > $this.i()) {
      throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + $this.i());
    }
    tmp$ret$0 = index;
    return tmp$ret$0;
  }
  function FastArrayList(array) {
    AbstractMutableList.call(this);
    this.b4r_1 = array;
    this.c4r_1 = false;
  }
  FastArrayList.prototype.r4v = function () {
    return this.b4r_1;
  };
  FastArrayList.prototype.i = function () {
    return this.b4r_1.length;
  };
  FastArrayList.prototype.m = function (index) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp0_asDynamic = this.b4r_1[rangeCheck(this, index)];
    tmp$ret$0 = tmp0_asDynamic;
    return tmp$ret$0;
  };
  FastArrayList.prototype.a5 = function (index, element) {
    rangeCheck(this, index);
    var tmp$ret$1;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    var tmp0_apply = this.b4r_1[index];
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.kds.FastArrayList.set.<anonymous>' call
    this.b4r_1[index] = element;
    tmp$ret$0 = tmp0_apply;
    var tmp1_asDynamic = tmp$ret$0;
    tmp$ret$1 = tmp1_asDynamic;
    return tmp$ret$1;
  };
  FastArrayList.prototype.c = function (element) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp0_asDynamic = this.b4r_1;
    tmp$ret$0 = tmp0_asDynamic;
    tmp$ret$0.push(element);
    var tmp0_this = this;
    var tmp1 = tmp0_this.kg_1;
    tmp0_this.kg_1 = tmp1 + 1 | 0;
    return true;
  };
  FastArrayList.prototype.tg = function (index, element) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp0_asDynamic = this.b4r_1;
    tmp$ret$0 = tmp0_asDynamic;
    tmp$ret$0.splice(insertionRangeCheck(this, index), 0, element);
    var tmp0_this = this;
    var tmp1 = tmp0_this.kg_1;
    tmp0_this.kg_1 = tmp1 + 1 | 0;
  };
  FastArrayList.prototype.o = function (elements) {
    if (elements.p())
      return false;
    var tmp0_this = this;
    var tmp = tmp0_this;
    var tmp$ret$2;
    // Inline function 'kotlin.collections.plus' call
    var tmp0_plus = tmp0_this.b4r_1;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.toTypedArray' call
    tmp$ret$0 = copyToArray(elements);
    var tmp1_plus = tmp$ret$0;
    var tmp$ret$1;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$1 = tmp0_plus;
    tmp$ret$2 = tmp$ret$1.concat(tmp1_plus);
    tmp.b4r_1 = tmp$ret$2;
    var tmp1_this = this;
    var tmp2 = tmp1_this.kg_1;
    tmp1_this.kg_1 = tmp2 + 1 | 0;
    return true;
  };
  FastArrayList.prototype.z4 = function (index) {
    rangeCheck(this, index);
    var tmp0_this = this;
    var tmp1 = tmp0_this.kg_1;
    tmp0_this.kg_1 = tmp1 + 1 | 0;
    var tmp;
    if (index === get_lastIndex(this)) {
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      var tmp0_asDynamic = this.b4r_1;
      tmp$ret$0 = tmp0_asDynamic;
      tmp = tmp$ret$0.pop();
    } else {
      var tmp$ret$1;
      // Inline function 'kotlin.js.asDynamic' call
      var tmp1_asDynamic = this.b4r_1;
      tmp$ret$1 = tmp1_asDynamic;
      tmp = tmp$ret$1.splice(index, 1)[0];
    }
    return tmp;
  };
  FastArrayList.prototype.c5 = function (element) {
    var inductionVariable = 0;
    var last = this.b4r_1.length - 1 | 0;
    if (inductionVariable <= last)
      do {
        var index = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (equals(this.b4r_1[index], element)) {
          var tmp$ret$0;
          // Inline function 'kotlin.js.asDynamic' call
          var tmp0_asDynamic = this.b4r_1;
          tmp$ret$0 = tmp0_asDynamic;
          tmp$ret$0.splice(index, 1);
          var tmp1_this = this;
          var tmp2 = tmp1_this.kg_1;
          tmp1_this.kg_1 = tmp2 + 1 | 0;
          return true;
        }
      }
       while (inductionVariable <= last);
    return false;
  };
  FastArrayList.prototype.ug = function (fromIndex, toIndex) {
    var tmp0_this = this;
    var tmp1 = tmp0_this.kg_1;
    tmp0_this.kg_1 = tmp1 + 1 | 0;
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp0_asDynamic = this.b4r_1;
    tmp$ret$0 = tmp0_asDynamic;
    tmp$ret$0.splice(fromIndex, toIndex - fromIndex | 0);
  };
  FastArrayList.prototype.x7 = function () {
    var tmp = this;
    var tmp$ret$0;
    // Inline function 'kotlin.emptyArray' call
    tmp$ret$0 = [];
    tmp.b4r_1 = tmp$ret$0;
    var tmp0_this = this;
    var tmp1 = tmp0_this.kg_1;
    tmp0_this.kg_1 = tmp1 + 1 | 0;
  };
  FastArrayList.prototype.y = function (element) {
    return indexOf(this.b4r_1, element);
  };
  FastArrayList.prototype.toString = function () {
    var tmp = this.b4r_1;
    return '[' + joinToString$default_0(tmp, ', ', null, null, 0, null, null, 62, null) + ']';
  };
  FastArrayList.prototype.i6 = function () {
    return [].slice.call(this.b4r_1);
  };
  FastArrayList.prototype.toArray = function () {
    return this.i6();
  };
  FastArrayList.prototype.s4v = function (callback) {
    var array = this.b4r_1;
    var n = 0;
    while (n < array.length) {
      var tmp$ret$1;
      // Inline function 'kotlin.js.unsafeCast' call
      var tmp0 = n;
      n = tmp0 + 1 | 0;
      var tmp0_unsafeCast = array[tmp0];
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp0_unsafeCast;
      tmp$ret$1 = tmp$ret$0;
      callback(tmp$ret$1);
    }
  };
  FastArrayList.prototype.t4v = function (callback) {
    var array = this.b4r_1;
    var n = 0;
    while (n < array.length) {
      var tmp$ret$1;
      // Inline function 'kotlin.js.unsafeCast' call
      var tmp0_unsafeCast = array[(this.i() - n | 0) - 1 | 0];
      var tmp$ret$0;
      // Inline function 'kotlin.js.asDynamic' call
      tmp$ret$0 = tmp0_unsafeCast;
      tmp$ret$1 = tmp$ret$0;
      callback(tmp$ret$1);
      var tmp0 = n;
      n = tmp0 + 1 | 0;
    }
  };
  FastArrayList.$metadata$ = classMeta('FastArrayList', [MutableList, RandomAccess], undefined, undefined, undefined, AbstractMutableList.prototype);
  function FastStringMap() {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp0_asDynamic = new Map();
    tmp$ret$0 = tmp0_asDynamic;
    return tmp$ret$0;
  }
  function FastIntMap() {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp0_asDynamic = new Map();
    tmp$ret$0 = tmp0_asDynamic;
    return tmp$ret$0;
  }
  function get_size(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    return tmp$ret$0.size;
  }
  function get(_this__u8e3s4, key) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    return tmp$ret$0.get(key);
  }
  function clear(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$0.clear();
  }
  function clear_0(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$0.clear();
  }
  function FastIdentityMap() {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp0_asDynamic = new Map();
    tmp$ret$0 = tmp0_asDynamic;
    return tmp$ret$0;
  }
  function clear_1(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$0.clear();
  }
  function set(_this__u8e3s4, key, value) {
    var tmp$ret$1;
    // Inline function 'kotlin.run' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$1 = tmp$ret$0.set(key, value);
    return tmp$ret$1;
  }
  function get_0(_this__u8e3s4, key) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    return tmp$ret$0.get(key);
  }
  function set_0(_this__u8e3s4, key, value) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$0.set(key, value);
  }
  function remove(_this__u8e3s4, key) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$0.delete(key);
  }
  function contains(_this__u8e3s4, key) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    return tmp$ret$0.has(key);
  }
  function fastKeyForEach(_this__u8e3s4, callback) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    var mapIterator = tmp$ret$0.keys();
    $l$loop: while (true) {
      var v = mapIterator.next();
      if (v.done)
        break $l$loop;
      callback(v.value);
    }
  }
  function get_size_0(_this__u8e3s4) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    return tmp$ret$0.size;
  }
  function get_1(_this__u8e3s4, key) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    return tmp$ret$0.get(key);
  }
  function set_1(_this__u8e3s4, key, value) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$0.set(key, value);
  }
  function remove_0(_this__u8e3s4, key) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    tmp$ret$0.delete(key);
  }
  function keys(_this__u8e3s4) {
    var tmp$ret$2;
    // Inline function 'kotlin.js.unsafeCast' call
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    var tmp0_unsafeCast = Array_from(tmp$ret$0.keys());
    var tmp$ret$1;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$1 = tmp0_unsafeCast;
    tmp$ret$2 = tmp$ret$1;
    return toList_0(tmp$ret$2);
  }
  function fastKeyForEach_0(_this__u8e3s4, callback) {
    var tmp$ret$0;
    // Inline function 'kotlin.js.asDynamic' call
    tmp$ret$0 = _this__u8e3s4;
    var mapIterator = tmp$ret$0.keys();
    $l$loop: while (true) {
      var v = mapIterator.next();
      if (v.done)
        break $l$loop;
      callback(v.value);
    }
  }
  function Array_from(value) {
    return Array.from(value);
  }
  function kdsFreeze(value) {
    return value;
  }
  function kdsIsFrozen(value) {
    return false;
  }
  var CONCURRENCY_COUNT;
  function NonRecursiveLock() {
  }
  NonRecursiveLock.prototype.u4v = function (callback) {
    return callback();
  };
  NonRecursiveLock.$metadata$ = classMeta('NonRecursiveLock');
  //region block: init
  CONCURRENCY_COUNT = 1;
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = kdsFreeze;
  _.$_$.b = kdsIsFrozen;
  _.$_$.c = NonRecursiveLock;
  _.$_$.d = DoubleArrayList;
  _.$_$.e = PropertyThis;
  _.$_$.f = Property;
  _.$_$.g = Extra;
  _.$_$.h = FastArrayList;
  _.$_$.i = FastIdentityMap;
  _.$_$.j = FastIntMap;
  _.$_$.k = FastStringMap;
  _.$_$.l = FloatArrayList;
  _.$_$.m = FloatDeque;
  _.$_$.n = GenericListIterator;
  _.$_$.o = GenericSubList;
  _.$_$.p = IntArrayList;
  _.$_$.q = IntDeque;
  _.$_$.r = IntSet;
  _.$_$.s = Pool;
  _.$_$.t = RingBuffer;
  _.$_$.u = SortOps;
  _.$_$.v = TGenDeque;
  _.$_$.w = TGenQueue;
  _.$_$.x = associateByInt;
  _.$_$.y = clear_1;
  _.$_$.z = doubleArrayListOf;
  _.$_$.a1 = extraCache;
  _.$_$.b1 = fastArrayListOf;
  _.$_$.c1 = flip;
  _.$_$.d1 = floatArrayListOf;
  _.$_$.e1 = genericSort;
  _.$_$.f1 = getAndRemove;
  _.$_$.g1 = getCyclicOrNull;
  _.$_$.h1 = getCyclic_0;
  _.$_$.i1 = getCyclic;
  _.$_$.j1 = getExtraTyped;
  _.$_$.k1 = getExtra;
  _.$_$.l1 = get_1;
  _.$_$.m1 = hasExtra;
  _.$_$.n1 = intArrayListOf;
  _.$_$.o1 = get_keys;
  _.$_$.p1 = linkedHashMapOf;
  _.$_$.q1 = setExtra;
  _.$_$.r1 = set_1;
  _.$_$.s1 = get_size;
  _.$_$.t1 = toCaseInsensitiveMap;
  _.$_$.u1 = toFastList;
  _.$_$.v1 = toFastList_0;
  _.$_$.w1 = toIntArrayList;
  _.$_$.x1 = toIntMap;
  _.$_$.y1 = toMap_0;
  _.$_$.z1 = binarySearch$default;
  _.$_$.a2 = reverse$default;
  _.$_$.b2 = sort$default;
  _.$_$.c2 = DoubleArrayList_init_$Create$_0;
  _.$_$.d2 = FastArrayList_init_$Create$;
  _.$_$.e2 = IntArrayList_init_$Create$_0;
  _.$_$.f2 = Pool_init_$Create$_0;
  _.$_$.g2 = TGenDeque_init_$Create$;
  _.$_$.h2 = ByteArrayDeque_init_$Create$;
  _.$_$.i2 = ConcurrentPool_init_$Create$;
  _.$_$.j2 = DoubleArrayList_init_$Create$;
  _.$_$.k2 = Mixin_init_$Create$;
  _.$_$.l2 = Property_init_$Create$;
  _.$_$.m2 = PropertyThis_init_$Create$;
  _.$_$.n2 = FloatArrayDeque_init_$Create$;
  _.$_$.o2 = HistoryStack_init_$Create$;
  _.$_$.p2 = IntArrayList_init_$Create$;
  _.$_$.q2 = IntIntMap_init_$Create$;
  _.$_$.r2 = IntMap_init_$Create$;
  _.$_$.s2 = Pool_init_$Create$_1;
  _.$_$.t2 = Pool_init_$Create$;
  _.$_$.u2 = ShortArrayDeque_init_$Create$;
  _.$_$.v2 = _BSearchResult___init__impl__em6zam;
  _.$_$.w2 = _BSearchResult___get_found__impl__om04iz;
  _.$_$.x2 = _BSearchResult___get_index__impl__b5kraz;
  _.$_$.y2 = _BSearchResult___get_nearIndex__impl__s8nq43;
  _.$_$.z2 = TGenStack__pop_impl_qisxa0;
  _.$_$.a3 = TGenStack__push_impl_9yh33t;
  _.$_$.b3 = _TGenStack___init__impl__yynjgt_0;
  _.$_$.c3 = Companion_getInstance_5;
  //endregion
  return _;
}));

//# sourceMappingURL=korlibs-kds.js.map