(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-kmem'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'korlibs-kmem'.");
}
root['korlibs-kmem'] = factory(typeof this['korlibs-kmem'] === 'undefined' ? {} : this['korlibs-kmem'], this['kotlin-kotlin-stdlib-js-ir']);
}
}(this, function (_, kotlin_kotlin) {
'use strict';
//region block: imports
var clz32 = Math.clz32;
var imul = Math.imul;
var objectMeta = kotlin_kotlin.$_$.wd;
var Unit_getInstance = kotlin_kotlin.$_$.k5;
var Enum = kotlin_kotlin.$_$.sh;
var classMeta = kotlin_kotlin.$_$.pc;
var toShort = kotlin_kotlin.$_$.zd;
var arrayCopy = kotlin_kotlin.$_$.k6;
var THROW_CCE = kotlin_kotlin.$_$.di;
var isArray = kotlin_kotlin.$_$.zc;
var fill = kotlin_kotlin.$_$.b8;
var toByte = kotlin_kotlin.$_$.xd;
var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.e4;
var toString = kotlin_kotlin.$_$.ae;
var hashCode = kotlin_kotlin.$_$.xc;
var equals = kotlin_kotlin.$_$.rc;
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.i3;
var IntCompanionObject_getInstance = kotlin_kotlin.$_$.w4;
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.x2;
var copyOf = kotlin_kotlin.$_$.l7;
var toLong = kotlin_kotlin.$_$.yd;
var Long = kotlin_kotlin.$_$.xh;
var copyOfRange = kotlin_kotlin.$_$.g7;
var charArray = kotlin_kotlin.$_$.lc;
var numberToChar = kotlin_kotlin.$_$.sd;
var round = kotlin_kotlin.$_$.fe;
var numberToInt = kotlin_kotlin.$_$.ud;
var isInfinite = kotlin_kotlin.$_$.vi;
var isNaN_0 = kotlin_kotlin.$_$.wi;
var interfaceMeta = kotlin_kotlin.$_$.yc;
var numberToLong = kotlin_kotlin.$_$.vd;
var roundToInt = kotlin_kotlin.$_$.ee;
var getNumberHashCode = kotlin_kotlin.$_$.uc;
var KProperty0 = kotlin_kotlin.$_$.df;
var getPropertyCallableRef = kotlin_kotlin.$_$.vc;
var lazy = kotlin_kotlin.$_$.yi;
//endregion
//region block: pre-declaration
Arch.prototype = Object.create(Enum.prototype);
Arch.prototype.constructor = Arch;
Endian.prototype = Object.create(Enum.prototype);
Endian.prototype.constructor = Endian;
Os.prototype = Object.create(Enum.prototype);
Os.prototype.constructor = Os;
Runtime.prototype = Object.create(Enum.prototype);
Runtime.prototype.constructor = Runtime;
Fast32BufferF.prototype = Object.create(Fast32Buffer.prototype);
Fast32BufferF.prototype.constructor = Fast32BufferF;
//endregion
var Arch_UNKNOWN_instance;
var Arch_X86_instance;
var Arch_X64_instance;
var Arch_ARM32_instance;
var Arch_ARM64_instance;
var Arch_MIPS32_instance;
var Arch_MIPSEL32_instance;
var Arch_MIPS64_instance;
var Arch_MIPSEL64_instance;
var Arch_WASM32_instance;
var Arch_POWERPC64_instance;
function Companion() {
Companion_instance = this;
}
Companion.$metadata$ = objectMeta('Companion');
var Companion_instance;
function Companion_getInstance() {
Arch_initEntries();
if (Companion_instance == null)
new Companion();
return Companion_instance;
}
var Arch_entriesInitialized;
function Arch_initEntries() {
if (Arch_entriesInitialized)
return Unit_getInstance();
Arch_entriesInitialized = true;
Arch_UNKNOWN_instance = new Arch('UNKNOWN', 0, -1);
Arch_X86_instance = new Arch('X86', 1, 32);
Arch_X64_instance = new Arch('X64', 2, 64);
Arch_ARM32_instance = new Arch('ARM32', 3, 32);
Arch_ARM64_instance = new Arch('ARM64', 4, 64);
Arch_MIPS32_instance = new Arch('MIPS32', 5, 32);
Arch_MIPSEL32_instance = new Arch('MIPSEL32', 6, 32);
Arch_MIPS64_instance = new Arch('MIPS64', 7, 64);
Arch_MIPSEL64_instance = new Arch('MIPSEL64', 8, 64);
Arch_WASM32_instance = new Arch('WASM32', 9, 32);
Arch_POWERPC64_instance = new Arch('POWERPC64', 10, 64);
Companion_getInstance();
}
function Arch(name, ordinal, bits) {
Enum.call(this, name, ordinal);
this.x4v_1 = bits;
}
Arch.$metadata$ = classMeta('Arch', undefined, undefined, undefined, undefined, Enum.prototype);
function Arch_UNKNOWN_getInstance() {
Arch_initEntries();
return Arch_UNKNOWN_instance;
}
function arrayadd(array, value, start, end) {
var inductionVariable = start;
if (inductionVariable < end)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.get' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = array;
tmp$ret$3 = tmp$ret$2[n];
var tmp0_set = toShort(tmp$ret$3 + value);
var tmp$ret$4;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$4 = array;
tmp$ret$4[n] = tmp0_set;
}
while (inductionVariable < end);
}
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;
}
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;
}
function arraycopy_1(src, srcPos, dst, dstPos, size) {
var tmp$ret$0;
// Inline function 'kotlin.collections.copyInto' call
var tmp0_copyInto = isArray(dst) ? dst : THROW_CCE();
var tmp1_copyInto = srcPos + size | 0;
arrayCopy(src, tmp0_copyInto, dstPos, srcPos, tmp1_copyInto);
tmp$ret$0 = tmp0_copyInto;
}
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;
}
function arraycopy_3(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;
}
function arraycopy_4(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;
}
function arraycopy_5(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;
}
function indexOf(_this__u8e3s4, sub, starting) {
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.kmem.array_indexOf' call
var tmp0_array_indexOf = _this__u8e3s4.length;
var tmp1_array_indexOf = sub.length;
var inductionVariable = starting;
var last = tmp0_array_indexOf - tmp1_array_indexOf | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var eq = 0;
var inductionVariable_0 = 0;
if (inductionVariable_0 < tmp1_array_indexOf)
$l$loop: do {
var m = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.indexOf.<anonymous>' call
var tmp2__anonymous__z9zvc9 = n + m | 0;
tmp$ret$0 = _this__u8e3s4[tmp2__anonymous__z9zvc9] === sub[m];
if (!tmp$ret$0) {
break $l$loop;
}
var tmp2 = eq;
eq = tmp2 + 1 | 0;
}
while (inductionVariable_0 < tmp1_array_indexOf);
if (eq === tmp1_array_indexOf) {
tmp$ret$1 = n;
break $l$block;
}
}
while (inductionVariable < last);
tmp$ret$1 = -1;
}
return tmp$ret$1;
}
function indexOf$default(_this__u8e3s4, sub, starting, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
starting = 0;
return indexOf(_this__u8e3s4, sub, starting);
}
function array_indexOf(starting, selfSize, subSize, equal) {
var inductionVariable = starting;
var last = selfSize - subSize | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var eq = 0;
var inductionVariable_0 = 0;
if (inductionVariable_0 < subSize)
$l$loop: do {
var m = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
if (!equal(n + m | 0, m)) {
break $l$loop;
}
var tmp2 = eq;
eq = tmp2 + 1 | 0;
}
while (inductionVariable_0 < subSize);
if (eq === subSize) {
return n;
}
}
while (inductionVariable < last);
return -1;
}
function arrayfill(array, value, start, end) {
return fill(array, value, start, end);
}
function _UByteArrayInt___init__impl__xif7bu(bytes) {
return bytes;
}
function _UByteArrayInt___get_bytes__impl__pj0ilc($this) {
return $this;
}
function _UByteArrayInt___get_size__impl__bcjnte($this) {
return _UByteArrayInt___get_bytes__impl__pj0ilc($this).length;
}
function UByteArrayInt__get_impl_px6q8a($this, index) {
return _UByteArrayInt___get_bytes__impl__pj0ilc($this)[index] & 255;
}
function UByteArrayInt__set_impl_gn4532($this, index, value) {
_UByteArrayInt___get_bytes__impl__pj0ilc($this)[index] = toByte(value);
}
function UByteArrayInt__set_impl_gn4532_0($this, index, value) {
var tmp = _UByteArrayInt___get_bytes__impl__pj0ilc($this);
var tmp$ret$0;
// Inline function 'kotlin.UByte.toByte' call
tmp$ret$0 = _UByte___get_data__impl__jof9qr(value);
tmp[index] = tmp$ret$0;
}
function UByteArrayInt__toString_impl_f8qdsi($this) {
return 'UByteArrayInt(bytes=' + toString($this) + ')';
}
function UByteArrayInt__hashCode_impl_y17rdr($this) {
return hashCode($this);
}
function UByteArrayInt__equals_impl_xlvwxn($this, other) {
if (!(other instanceof UByteArrayInt))
return false;
var tmp0_other_with_cast = other instanceof UByteArrayInt ? other.y4v_1 : THROW_CCE();
if (!equals($this, tmp0_other_with_cast))
return false;
return true;
}
function UByteArrayInt(bytes) {
this.y4v_1 = bytes;
}
UByteArrayInt.prototype.toString = function () {
return UByteArrayInt__toString_impl_f8qdsi(this.y4v_1);
};
UByteArrayInt.prototype.hashCode = function () {
return UByteArrayInt__hashCode_impl_y17rdr(this.y4v_1);
};
UByteArrayInt.prototype.equals = function (other) {
return UByteArrayInt__equals_impl_xlvwxn(this.y4v_1, other);
};
UByteArrayInt.$metadata$ = classMeta('UByteArrayInt');
function UByteArrayInt_0(size) {
return _UByteArrayInt___init__impl__xif7bu(new Int8Array(size));
}
function asByteArray(_this__u8e3s4) {
return _UByteArrayInt___get_bytes__impl__pj0ilc(_this__u8e3s4);
}
function UByteArrayInt_1(size, gen) {
var tmp = 0;
var tmp_0 = size;
var tmp_1 = new Int8Array(tmp_0);
while (tmp < tmp_0) {
var tmp_2 = tmp;
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.UByteArrayInt.<anonymous>' call
tmp$ret$0 = toByte(gen(tmp_2));
tmp_1[tmp_2] = tmp$ret$0;
tmp = tmp + 1 | 0;
}
return _UByteArrayInt___init__impl__xif7bu(tmp_1);
}
function arraycopy_6(src, srcPos, dst, dstPos, size) {
return arraycopy(_UByteArrayInt___get_bytes__impl__pj0ilc(src), srcPos, _UByteArrayInt___get_bytes__impl__pj0ilc(dst), dstPos, size);
}
function fill_0(_this__u8e3s4, value, fromIndex, toIndex) {
return fill(_UByteArrayInt___get_bytes__impl__pj0ilc(_this__u8e3s4), toByte(value), fromIndex, toIndex);
}
function fill$default(_this__u8e3s4, value, fromIndex, toIndex, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
fromIndex = 0;
if (!(($mask0 & 4) === 0))
toIndex = _UByteArrayInt___get_size__impl__bcjnte(_this__u8e3s4);
return fill_0(_this__u8e3s4, value, fromIndex, toIndex);
}
function extract(_this__u8e3s4, offset, count) {
return (_this__u8e3s4 >>> offset | 0) & mask(count);
}
function extract_0(_this__u8e3s4, offset) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract1' call
tmp$ret$0 = (_this__u8e3s4 >>> offset | 0) & 1;
return !(tmp$ret$0 === 0);
}
function signExtend(_this__u8e3s4, bits) {
return _this__u8e3s4 << (32 - bits | 0) >> (32 - bits | 0);
}
function insert(_this__u8e3s4, value, offset, count) {
var mask_0 = mask(count);
var clearValue = _this__u8e3s4 & ~(mask_0 << offset);
return clearValue | (value & mask_0) << offset;
}
function extractBool(_this__u8e3s4, offset) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.extract1' call
tmp$ret$0 = (_this__u8e3s4 >>> offset | 0) & 1;
return !(tmp$ret$0 === 0);
}
function extract8(_this__u8e3s4, offset) {
return (_this__u8e3s4 >>> offset | 0) & 255;
}
function extractSigned(_this__u8e3s4, offset, count) {
return signExtend((_this__u8e3s4 >>> offset | 0) & mask(count), count);
}
function insert16(_this__u8e3s4, value, offset) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.insertMask' call
tmp$ret$0 = _this__u8e3s4 & ~(65535 << offset) | (value & 65535) << offset;
return tmp$ret$0;
}
function hasFlags(_this__u8e3s4, bits) {
return (_this__u8e3s4 & bits) === bits;
}
function setBits(_this__u8e3s4, bits, set) {
return set ? setBits_0(_this__u8e3s4, bits) : unsetBits(_this__u8e3s4, bits);
}
function mask(_this__u8e3s4) {
return (1 << _this__u8e3s4) - 1 | 0;
}
function extract1(_this__u8e3s4, offset) {
return (_this__u8e3s4 >>> offset | 0) & 1;
}
function insertMask(_this__u8e3s4, value, offset, mask) {
return _this__u8e3s4 & ~(mask << offset) | (value & mask) << offset;
}
function setBits_0(_this__u8e3s4, bits) {
return _this__u8e3s4 | bits;
}
function unsetBits(_this__u8e3s4, bits) {
return _this__u8e3s4 & ~bits;
}
function countLeadingZeros(_this__u8e3s4) {
var tmp$ret$0;
// Inline function 'kotlin.countLeadingZeroBits' call
tmp$ret$0 = clz32(_this__u8e3s4);
return tmp$ret$0;
}
function extract4(_this__u8e3s4, offset) {
return (_this__u8e3s4 >>> offset | 0) & 15;
}
function extract16(_this__u8e3s4, offset) {
return (_this__u8e3s4 >>> offset | 0) & 65535;
}
function extract24(_this__u8e3s4, offset) {
return (_this__u8e3s4 >>> offset | 0) & 16777215;
}
function finsert4(_this__u8e3s4, value, offset) {
return _this__u8e3s4 | (value & 15) << offset;
}
function finsert(_this__u8e3s4, value, offset) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.toInt' call
tmp$ret$0 = value ? 1 : 0;
return finsert_0(_this__u8e3s4, tmp$ret$0, offset);
}
function finsert24(_this__u8e3s4, value, offset) {
return _this__u8e3s4 | (value & 16777215) << offset;
}
function finsert16(_this__u8e3s4, value, offset) {
return _this__u8e3s4 | (value & 65535) << offset;
}
function finsert8(_this__u8e3s4, value, offset) {
return _this__u8e3s4 | (value & 255) << offset;
}
function finsert_0(_this__u8e3s4, value, offset) {
return _this__u8e3s4 | value << offset;
}
function asInt32Buffer(_this__u8e3s4) {
return sliceInt32Buffer$default(_this__u8e3s4, 0, 0, 3, null);
}
function arraycopy_7(src, srcPos, dst, dstPos, size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$0 = dst.buffer;
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$1 = dst.byteOffset / 2 | 0;
return arraycopy_13(src, srcPos, tmp, tmp$ret$1 + dstPos | 0, size);
}
function arraycopy_8(src, srcPos, dst, dstPos, size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$0 = src.buffer;
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$1 = src.byteOffset / 4 | 0;
var tmp_0 = imul(tmp$ret$1 + srcPos | 0, 4);
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$2 = dst.buffer;
var tmp_1 = tmp$ret$2;
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$3 = dst.byteOffset / 4 | 0;
return arraycopy_14(tmp, tmp_0, tmp_1, imul(tmp$ret$3 + dstPos | 0, 4), imul(size, 4));
}
function sliceInt32Buffer(_this__u8e3s4, offset, size) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem._sliceInt32Buffer' call
tmp$ret$1 = new Int32Array(_this__u8e3s4, imul(offset, 4), size);
return tmp$ret$1;
}
function sliceInt32Buffer$default(_this__u8e3s4, offset, size, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
offset = 0;
if (!(($mask0 & 2) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$0 = _this__u8e3s4.byteLength;
tmp$ret$0_0 = Unit_getInstance();
size = (tmp$ret$0 / 4 | 0) - offset | 0;
}
return sliceInt32Buffer(_this__u8e3s4, offset, size);
}
function asInt8Buffer(_this__u8e3s4) {
return sliceInt8Buffer$default(_this__u8e3s4, 0, 0, 3, null);
}
function asInt16Buffer(_this__u8e3s4) {
return sliceInt16Buffer$default(_this__u8e3s4, 0, 0, 3, null);
}
function asFloat32Buffer(_this__u8e3s4) {
return sliceFloat32Buffer$default(_this__u8e3s4, 0, 0, 3, null);
}
function asFloat64Buffer(_this__u8e3s4) {
return sliceFloat64Buffer$default(_this__u8e3s4, 0, 0, 3, null);
}
function sliceInt8Buffer(_this__u8e3s4, offset, size) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem._sliceInt8Buffer' call
tmp$ret$1 = new Int8Array(_this__u8e3s4, imul(offset, 1), size);
return tmp$ret$1;
}
function sliceInt8Buffer$default(_this__u8e3s4, offset, size, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
offset = 0;
if (!(($mask0 & 2) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$0 = _this__u8e3s4.byteLength;
tmp$ret$0_0 = Unit_getInstance();
size = (tmp$ret$0 / 1 | 0) - offset | 0;
}
return sliceInt8Buffer(_this__u8e3s4, offset, size);
}
function sliceInt16Buffer(_this__u8e3s4, offset, size) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem._sliceInt16Buffer' call
tmp$ret$1 = new Int16Array(_this__u8e3s4, imul(offset, 2), size);
return tmp$ret$1;
}
function sliceInt16Buffer$default(_this__u8e3s4, offset, size, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
offset = 0;
if (!(($mask0 & 2) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$0 = _this__u8e3s4.byteLength;
tmp$ret$0_0 = Unit_getInstance();
size = (tmp$ret$0 / 2 | 0) - offset | 0;
}
return sliceInt16Buffer(_this__u8e3s4, offset, size);
}
function sliceFloat32Buffer(_this__u8e3s4, offset, size) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem._sliceFloat32Buffer' call
tmp$ret$1 = new Float32Array(_this__u8e3s4, imul(offset, 4), size);
return tmp$ret$1;
}
function sliceFloat32Buffer$default(_this__u8e3s4, offset, size, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
offset = 0;
if (!(($mask0 & 2) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$0 = _this__u8e3s4.byteLength;
tmp$ret$0_0 = Unit_getInstance();
size = (tmp$ret$0 / 4 | 0) - offset | 0;
}
return sliceFloat32Buffer(_this__u8e3s4, offset, size);
}
function sliceFloat64Buffer(_this__u8e3s4, offset, size) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem._sliceFloat64Buffer' call
tmp$ret$1 = new Float64Array(_this__u8e3s4, imul(offset, 8), size);
return tmp$ret$1;
}
function sliceFloat64Buffer$default(_this__u8e3s4, offset, size, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
offset = 0;
if (!(($mask0 & 2) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$0 = _this__u8e3s4.byteLength;
tmp$ret$0_0 = Unit_getInstance();
size = (tmp$ret$0 / 8 | 0) - offset | 0;
}
return sliceFloat64Buffer(_this__u8e3s4, offset, size);
}
function arraycopy_9(src, srcPos, dst, dstPos, size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$0 = src.buffer;
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$1 = src.byteOffset / 4 | 0;
var tmp_0 = imul(tmp$ret$1 + srcPos | 0, 4);
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$2 = dst.buffer;
var tmp_1 = tmp$ret$2;
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$3 = dst.byteOffset / 4 | 0;
return arraycopy_14(tmp, tmp_0, tmp_1, imul(tmp$ret$3 + dstPos | 0, 4), imul(size, 4));
}
function arraycopy_10(src, srcPos, dst, dstPos, size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$0 = dst.buffer;
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$1 = dst.byteOffset / 1 | 0;
return arraycopy_16(src, srcPos, tmp, tmp$ret$1 + dstPos | 0, size);
}
function arraycopy_11(src, srcPos, dst, dstPos, size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$0 = dst.buffer;
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$1 = dst.byteOffset / 4 | 0;
return arraycopy_20(src, srcPos, tmp, tmp$ret$1 + dstPos | 0, size);
}
function arraycopy_12(src, srcPos, dst, dstPos, size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.mem' call
tmp$ret$0 = dst.buffer;
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.offset' call
tmp$ret$1 = dst.byteOffset / 4 | 0;
return arraycopy_18(src, srcPos, tmp, tmp$ret$1 + dstPos | 0, size);
}
function _Uint8Buffer___init__impl__p73ce3(b) {
return b;
}
function _Uint8Buffer___get_b__impl__dw5lj6($this) {
return $this;
}
function Uint8Buffer__get_impl_wq4jv($this, index) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.get' call
var tmp0_get = _Uint8Buffer___get_b__impl__dw5lj6($this);
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_get;
tmp$ret$1 = tmp$ret$0[index];
return tmp$ret$1 & 255;
}
function ByteArrayBuilder_init_$Init$(data, size, allowGrow, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
size = data.length;
if (!(($mask0 & 4) === 0))
allowGrow = true;
ByteArrayBuilder.call($this, data, size, allowGrow);
return $this;
}
function ByteArrayBuilder_init_$Create$(data, size, allowGrow, $mask0, $marker) {
return ByteArrayBuilder_init_$Init$(data, size, allowGrow, $mask0, $marker, Object.create(ByteArrayBuilder.prototype));
}
function ByteArrayBuilder_init_$Init$_0(initialCapacity, $this) {
var tmp = new Int8Array(initialCapacity);
ByteArrayBuilder_init_$Init$(tmp, 0, false, 4, null, $this);
return $this;
}
function ByteArrayBuilder_init_$Create$_0(initialCapacity) {
return ByteArrayBuilder_init_$Init$_0(initialCapacity, Object.create(ByteArrayBuilder.prototype));
}
function ByteArrayBuilder_init_$Init$_1(initialCapacity, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
initialCapacity = 4096;
ByteArrayBuilder_init_$Init$_0(initialCapacity, $this);
return $this;
}
function ByteArrayBuilder_init_$Create$_1(initialCapacity, $mask0, $marker) {
return ByteArrayBuilder_init_$Init$_1(initialCapacity, $mask0, $marker, Object.create(ByteArrayBuilder.prototype));
}
function ensure($this, expected) {
if ($this.z4v_1.length < expected) {
if (!$this.a4w_1)
throw RuntimeException_init_$Create$('ByteArrayBuffer configured to not grow!');
var newSize = imul($this.z4v_1.length + 7 | 0, 5);
var realNewSize = newSize < 0 ? IntCompanionObject_getInstance().o1_1 / 2 | 0 : newSize;
if (newSize < 0 ? expected > realNewSize : false) {
// Inline function 'kotlin.error' call
throw IllegalStateException_init_$Create$("ByteArrayBuffer can't grow that much");
}
var tmp = $this;
var tmp_0 = $this.z4v_1;
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
tmp$ret$0 = Math.max(expected, realNewSize);
tmp.z4v_1 = copyOf(tmp_0, tmp$ret$0);
}
}
function ensureCount($this, count) {
ensure($this, $this.b4w_1 + count | 0);
}
function ByteArrayBuilder(data, size, allowGrow) {
this.z4v_1 = data;
this.a4w_1 = allowGrow;
this.b4w_1 = size;
}
ByteArrayBuilder.prototype.l4n = function (value) {
var oldPosition = this.b4w_1;
var newPosition = value;
ensure(this, newPosition);
this.b4w_1 = newPosition;
if (newPosition > oldPosition) {
arrayfill(this.z4v_1, 0, oldPosition, newPosition);
}
};
ByteArrayBuilder.prototype.i = function () {
return this.b4w_1;
};
ByteArrayBuilder.prototype.c4w = function (array, offset, len) {
ensureCount(this, len);
arraycopy(array, offset, this.z4v_1, this.b4w_1, len);
var tmp0_this = this;
tmp0_this.b4w_1 = tmp0_this.b4w_1 + len | 0;
};
ByteArrayBuilder.prototype.d4w = function (array, offset, len, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
offset = 0;
if (!(($mask0 & 4) === 0))
len = array.length - offset | 0;
return this.c4w(array, offset, len);
};
ByteArrayBuilder.prototype.e4w = function (v) {
ensure(this, this.b4w_1 + 1 | 0);
var tmp = this.z4v_1;
var tmp0_this = this;
var tmp1 = tmp0_this.b4w_1;
tmp0_this.b4w_1 = tmp1 + 1 | 0;
tmp[tmp1] = v;
};
ByteArrayBuilder.prototype.f4w = function (v) {
this.e4w(v);
return this;
};
ByteArrayBuilder.prototype.g4w = function () {
return copyOf(this.z4v_1, this.b4w_1);
};
ByteArrayBuilder.$metadata$ = classMeta('ByteArrayBuilder');
function readS16(_this__u8e3s4, o, little) {
return little ? readS16LE(_this__u8e3s4, o) : readS16BE(_this__u8e3s4, o);
}
function readU16BE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read16BE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 8;
return tmp$ret$0;
}
function readS32BE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read32BE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 3 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 24;
return tmp$ret$0;
}
function readU16LE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read16LE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8;
return tmp$ret$0;
}
function readS32LE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read32LE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, o + 3 | 0) << 24;
return tmp$ret$0;
}
function readU24LE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read24LE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 16;
return tmp$ret$0;
}
function readU24BE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read24BE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 16;
return tmp$ret$0;
}
function readU16(_this__u8e3s4, o, little) {
return little ? readU16LE(_this__u8e3s4, o) : readU16BE(_this__u8e3s4, o);
}
function readS32(_this__u8e3s4, o, little) {
return little ? readS32LE(_this__u8e3s4, o) : readS32BE(_this__u8e3s4, o);
}
function readU8(_this__u8e3s4, o) {
return _this__u8e3s4[o] & 255;
}
function readS16LE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read16LE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8;
return signExtend(tmp$ret$0, 16);
}
function readS24LE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read24LE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 16;
return signExtend(tmp$ret$0, 24);
}
function readS16BE(_this__u8e3s4, o) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read16BE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 8;
return signExtend(tmp$ret$0, 16);
}
function read16BE(_this__u8e3s4, o) {
return u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 8;
}
function read32BE(_this__u8e3s4, o) {
return u8$accessor$7ol9s3(_this__u8e3s4, o + 3 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 24;
}
function read16LE(_this__u8e3s4, o) {
return u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8;
}
function read32LE(_this__u8e3s4, o) {
return u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, o + 3 | 0) << 24;
}
function read24LE(_this__u8e3s4, o) {
return u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 16;
}
function read24BE(_this__u8e3s4, o) {
return u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 16;
}
function u8(_this__u8e3s4, o) {
return _this__u8e3s4[o] & 255;
}
function readS8(_this__u8e3s4, o) {
return _this__u8e3s4[o];
}
function readU32LE(_this__u8e3s4, o) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.unsigned' call
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read32LE' call
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, o + 0 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, o + 1 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, o + 2 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, o + 3 | 0) << 24;
var tmp0__get_unsigned__3e7on0 = tmp$ret$0;
tmp$ret$1 = toLong(tmp0__get_unsigned__3e7on0).wd(new Long(-1, 0));
return tmp$ret$1;
}
function readS64BE(_this__u8e3s4, o) {
var tmp$ret$4;
// Inline function 'com.soywiz.kmem.read64BE' call
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.unsigned' call
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read32BE' call
var tmp0_read32BE = o + 4 | 0;
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 3 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 2 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 1 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 0 | 0) << 24;
var tmp1__get_unsigned__51qu1x = tmp$ret$0;
tmp$ret$1 = toLong(tmp1__get_unsigned__51qu1x).wd(new Long(-1, 0));
var tmp = tmp$ret$1.lc(0);
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.unsigned' call
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.read32BE' call
var tmp2_read32BE = o + 0 | 0;
tmp$ret$2 = u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 3 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 2 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 1 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 0 | 0) << 24;
var tmp3__get_unsigned__lxnvfr = tmp$ret$2;
tmp$ret$3 = toLong(tmp3__get_unsigned__lxnvfr).wd(new Long(-1, 0));
tmp$ret$4 = tmp.jo(tmp$ret$3.lc(32));
return tmp$ret$4;
}
function readByteArray(_this__u8e3s4, o, count) {
return copyOfRange(_this__u8e3s4, o, o + count | 0);
}
function readShortArrayBE(_this__u8e3s4, o, count) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.readTypedArray' call
var tmp0_readTypedArray = new Int16Array(count);
var tmp$ret$0;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kmem.readTypedArray.<anonymous>' call
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.kmem.readShortArrayBE.<anonymous>' call
var tmp1__anonymous__uwfjfc = o + imul(n, 2) | 0;
tmp0_readTypedArray[n] = toShort(readS16BE(_this__u8e3s4, tmp1__anonymous__uwfjfc));
}
while (inductionVariable < count);
tmp$ret$0 = tmp0_readTypedArray;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function readCharArrayBE(_this__u8e3s4, o, count) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.readTypedArray' call
var tmp0_readTypedArray = charArray(count);
var tmp$ret$0;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kmem.readTypedArray.<anonymous>' call
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.kmem.readCharArrayBE.<anonymous>' call
var tmp1__anonymous__uwfjfc = o + imul(n, 2) | 0;
tmp0_readTypedArray[n] = numberToChar(readS16BE(_this__u8e3s4, tmp1__anonymous__uwfjfc));
}
while (inductionVariable < count);
tmp$ret$0 = tmp0_readTypedArray;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function readIntArrayLE(_this__u8e3s4, o, count) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.readTypedArray' call
var tmp0_readTypedArray = new Int32Array(count);
var tmp$ret$0;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kmem.readTypedArray.<anonymous>' call
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.kmem.readIntArrayLE.<anonymous>' call
var tmp1__anonymous__uwfjfc = o + imul(n, 4) | 0;
tmp0_readTypedArray[n] = readS32LE(_this__u8e3s4, tmp1__anonymous__uwfjfc);
}
while (inductionVariable < count);
tmp$ret$0 = tmp0_readTypedArray;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function readIntArrayBE(_this__u8e3s4, o, count) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.readTypedArray' call
var tmp0_readTypedArray = new Int32Array(count);
var tmp$ret$0;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kmem.readTypedArray.<anonymous>' call
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.kmem.readIntArrayBE.<anonymous>' call
var tmp1__anonymous__uwfjfc = o + imul(n, 4) | 0;
tmp0_readTypedArray[n] = readS32BE(_this__u8e3s4, tmp1__anonymous__uwfjfc);
}
while (inductionVariable < count);
tmp$ret$0 = tmp0_readTypedArray;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function read64BE(_this__u8e3s4, o) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.unsigned' call
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.read32BE' call
var tmp0_read32BE = o + 4 | 0;
tmp$ret$0 = u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 3 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 2 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 1 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, tmp0_read32BE + 0 | 0) << 24;
var tmp1__get_unsigned__51qu1x = tmp$ret$0;
tmp$ret$1 = toLong(tmp1__get_unsigned__51qu1x).wd(new Long(-1, 0));
var tmp = tmp$ret$1.lc(0);
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.unsigned' call
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.read32BE' call
var tmp2_read32BE = o + 0 | 0;
tmp$ret$2 = u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 3 | 0) << 0 | u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 2 | 0) << 8 | u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 1 | 0) << 16 | u8$accessor$7ol9s3(_this__u8e3s4, tmp2_read32BE + 0 | 0) << 24;
var tmp3__get_unsigned__lxnvfr = tmp$ret$2;
tmp$ret$3 = toLong(tmp3__get_unsigned__lxnvfr).wd(new Long(-1, 0));
return tmp.jo(tmp$ret$3.lc(32));
}
function readTypedArray(_this__u8e3s4, o, count, elementSize, array, read) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.kmem.readTypedArray.<anonymous>' call
var inductionVariable = 0;
if (inductionVariable < count)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
read(_this__u8e3s4, array, n, o + imul(n, elementSize) | 0);
}
while (inductionVariable < count);
tmp$ret$0 = array;
return tmp$ret$0;
}
function u8$accessor$7ol9s3(_this__u8e3s4, o) {
return u8(_this__u8e3s4, o);
}
var Endian_LITTLE_ENDIAN_instance;
var Endian_BIG_ENDIAN_instance;
function Companion_0() {
Companion_instance_0 = this;
this.h4w_1 = get_currentIsLittleEndian() ? Endian_LITTLE_ENDIAN_getInstance() : Endian_BIG_ENDIAN_getInstance();
}
Companion_0.$metadata$ = objectMeta('Companion');
var Companion_instance_0;
function Companion_getInstance_0() {
Endian_initEntries();
if (Companion_instance_0 == null)
new Companion_0();
return Companion_instance_0;
}
var Endian_entriesInitialized;
function Endian_initEntries() {
if (Endian_entriesInitialized)
return Unit_getInstance();
Endian_entriesInitialized = true;
Endian_LITTLE_ENDIAN_instance = new Endian('LITTLE_ENDIAN', 0);
Endian_BIG_ENDIAN_instance = new Endian('BIG_ENDIAN', 1);
Companion_getInstance_0();
}
function Endian(name, ordinal) {
Enum.call(this, name, ordinal);
}
Endian.prototype.k4w = function () {
return this.equals(Endian_LITTLE_ENDIAN_getInstance());
};
Endian.$metadata$ = classMeta('Endian', undefined, undefined, undefined, undefined, Enum.prototype);
function Endian_LITTLE_ENDIAN_getInstance() {
Endian_initEntries();
return Endian_LITTLE_ENDIAN_instance;
}
function Endian_BIG_ENDIAN_getInstance() {
Endian_initEntries();
return Endian_BIG_ENDIAN_instance;
}
function sizeAligned(_this__u8e3s4, $this) {
return $this.l4w(_this__u8e3s4);
}
function Companion_1() {
Companion_instance_1 = this;
}
Companion_1.prototype.l4w = function (size) {
return (size + 15 | 0) & -16;
};
Companion_1.prototype.m4w = function (size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.MemBufferAlloc' call
tmp$ret$0 = new ArrayBuffer(size);
return new FBuffer(tmp$ret$0, size);
};
Companion_1.prototype.k2n = function (size) {
return this.m4w(sizeAligned(size, this));
};
Companion_1.prototype.n4w = function (size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.MemBufferAllocNoDirect' call
tmp$ret$0 = new ArrayBuffer(size);
return new FBuffer(tmp$ret$0, size);
};
Companion_1.prototype.o4w = function (size) {
return this.n4w(sizeAligned(size, this));
};
Companion_1.prototype.p4w = function (size) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.MemBufferAlloc' call
var tmp0_MemBufferAlloc = sizeAligned(size, this);
tmp$ret$0 = new ArrayBuffer(tmp0_MemBufferAlloc);
return new FBuffer(tmp$ret$0, size);
};
Companion_1.prototype.q4w = function (src, srcPos, dst, dstPos, length) {
return arraycopy_15(src.a4x(), srcPos, dst, dstPos, length);
};
Companion_1.prototype.b4x = function (src, srcPos, dst, dstPos, length) {
return arraycopy_16(src, srcPos, dst.a4x(), dstPos, length);
};
Companion_1.prototype.c4x = function (src, srcPosAligned, dst, dstPosAligned, length) {
return arraycopy_13(src, srcPosAligned, dst.a4x(), dstPosAligned, length);
};
Companion_1.prototype.d4x = function (src, srcPosAligned, dst, dstPosAligned, length) {
return arraycopy_17(src.a4x(), srcPosAligned, dst, dstPosAligned, length);
};
Companion_1.prototype.e4x = function (src, srcPosAligned, dst, dstPosAligned, length) {
return arraycopy_18(src, srcPosAligned, dst.a4x(), dstPosAligned, length);
};
Companion_1.prototype.f4x = function (src, srcPosAligned, dst, dstPosAligned, length) {
return arraycopy_19(src.a4x(), srcPosAligned, dst, dstPosAligned, length);
};
Companion_1.prototype.g4x = function (src, srcPosAligned, dst, dstPosAligned, length) {
return arraycopy_20(src, srcPosAligned, dst.a4x(), dstPosAligned, length);
};
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 FBuffer(mem, size) {
Companion_getInstance_1();
this.r4w_1 = mem;
this.s4w_1 = size;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.size' call
var tmp0__get_size__8hfv5c = this.r4w_1;
tmp$ret$1 = tmp0__get_size__8hfv5c.byteLength;
if (!((tmp$ret$1 % 8 | 0) === 0)) {
// Inline function 'kotlin.error' call
throw IllegalStateException_init_$Create$('FBuffer size must be multiple of 8');
}
this.t4w_1 = getData(this.r4w_1);
this.u4w_1 = asInt8Buffer(this.r4w_1);
this.v4w_1 = asInt16Buffer(this.r4w_1);
this.w4w_1 = asInt32Buffer(this.r4w_1);
this.x4w_1 = asFloat32Buffer(this.r4w_1);
this.y4w_1 = asFloat64Buffer(this.r4w_1);
this.z4w_1 = NewFast32Buffer(this.r4w_1);
}
FBuffer.prototype.toString = function () {
return 'FBuffer(size=' + this.s4w_1 + ')';
};
FBuffer.prototype.a4x = function () {
return this.r4w_1;
};
FBuffer.prototype.h4x = function () {
return this.u4w_1;
};
FBuffer.prototype.i4x = function () {
return this.w4w_1;
};
FBuffer.prototype.j4x = function () {
return this.x4w_1;
};
FBuffer.prototype.k4x = function () {
return this.v4w_1;
};
FBuffer.prototype.l4x = function () {
return this.w4w_1;
};
FBuffer.prototype.m4x = function () {
return this.x4w_1;
};
FBuffer.prototype.n4x = function () {
return _Uint8Buffer___init__impl__p73ce3(this.u4w_1);
};
FBuffer.prototype.o4x = function (index) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.get' call
var tmp0_get = this.u4w_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_get;
tmp$ret$1 = tmp$ret$0[index];
return tmp$ret$1;
};
FBuffer.prototype.p4x = function (index) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.get' call
var tmp0_get = this.w4w_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_get;
tmp$ret$1 = tmp$ret$0[index];
return tmp$ret$1;
};
FBuffer.prototype.q4x = function (index, value) {
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = this.u4w_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[index] = value;
};
FBuffer.prototype.r4x = function (index, value) {
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = this.w4w_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[index] = value;
};
FBuffer.prototype.s4x = function (index, value) {
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = this.x4w_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[index] = value;
};
FBuffer.prototype.t4x = function (index) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.FBuffer.u8' call
tmp$ret$0 = _Uint8Buffer___init__impl__p73ce3(this.u4w_1);
return Uint8Buffer__get_impl_wq4jv(tmp$ret$0, index) & 255;
};
FBuffer.prototype.u4x = function (index) {
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.get' call
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.FBuffer.i16' call
tmp$ret$0 = this.v4w_1;
var tmp0_get = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_get;
tmp$ret$2 = tmp$ret$1[index];
return tmp$ret$2 & 65535;
};
FBuffer.prototype.v4x = function (index, value) {
// Inline function 'com.soywiz.kmem.set' call
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.FBuffer.i32' call
tmp$ret$0 = this.w4w_1;
var tmp0_set = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_set;
tmp$ret$1[index] = value;
};
FBuffer.prototype.w4x = function (index) {
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.get' call
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.FBuffer.i32' call
tmp$ret$0 = this.w4w_1;
var tmp0_get = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_get;
tmp$ret$2 = tmp$ret$1[index];
return tmp$ret$2;
};
FBuffer.prototype.x4x = function (index, value) {
// Inline function 'com.soywiz.kmem.set' call
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.FBuffer.f32' call
tmp$ret$0 = this.x4w_1;
var tmp0_set = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_set;
tmp$ret$1[index] = value;
};
FBuffer.prototype.y4x = function (index) {
return getByte(this.t4w_1, index);
};
FBuffer.prototype.z4x = function (index) {
return getByte(this.t4w_1, index) & 255;
};
FBuffer.prototype.a4y = function (index) {
return getShort(this.t4w_1, index);
};
FBuffer.prototype.b4y = function (index) {
return getShort(this.t4w_1, index) & 65535;
};
FBuffer.prototype.c4y = function (index) {
return getInt(this.t4w_1, index);
};
FBuffer.prototype.d4y = function (index) {
return getFloat(this.t4w_1, index);
};
FBuffer.prototype.e4y = function (dstPos, src, srcPos, len) {
return Companion_getInstance_1().b4x(src, srcPos, this, dstPos, len);
};
FBuffer.prototype.f4y = function (dstPos, src, srcPos, len) {
return Companion_getInstance_1().c4x(src, srcPos, this, dstPos, len);
};
FBuffer.prototype.g4y = function (dstPos, src, srcPos, len) {
return Companion_getInstance_1().e4x(src, srcPos, this, dstPos, len);
};
FBuffer.prototype.h4y = function (dstPos, src, srcPos, len) {
return Companion_getInstance_1().g4x(src, srcPos, this, dstPos, len);
};
FBuffer.prototype.i4y = function (srcPos, dst, dstPos, len) {
return Companion_getInstance_1().q4w(this, srcPos, dst, dstPos, len);
};
FBuffer.prototype.j4y = function (srcPos, dst, dstPos, len) {
return Companion_getInstance_1().d4x(this, srcPos, dst, dstPos, len);
};
FBuffer.prototype.k4y = function (srcPos, dst, dstPos, len) {
return Companion_getInstance_1().f4x(this, srcPos, dst, dstPos, len);
};
FBuffer.$metadata$ = classMeta('FBuffer');
function fbuffer(size, callback) {
var tmp$ret$0;
// Inline function 'kotlin.run' call
var tmp0_run = Companion_getInstance_1().p4w(size);
// Inline function 'kotlin.contracts.contract' call
tmp$ret$0 = callback(tmp0_run);
return tmp$ret$0;
}
function FixedSizeByteArrayBuilder_init_$Init$(size, $this) {
FixedSizeByteArrayBuilder.call($this, new Int8Array(size));
return $this;
}
function FixedSizeByteArrayBuilder_init_$Create$(size) {
return FixedSizeByteArrayBuilder_init_$Init$(size, Object.create(FixedSizeByteArrayBuilder.prototype));
}
function FixedSizeByteArrayBuilder(data) {
this.l4y_1 = data;
this.m4y_1 = 0;
}
FixedSizeByteArrayBuilder.prototype.x7 = function () {
this.m4y_1 = 0;
};
FixedSizeByteArrayBuilder.prototype.c4w = function (array, offset, len) {
arraycopy(array, offset, this.l4y_1, this.m4y_1, len);
var tmp0_this = this;
tmp0_this.m4y_1 = tmp0_this.m4y_1 + len | 0;
};
FixedSizeByteArrayBuilder.prototype.e4w = function (v) {
var tmp0_this = this;
var tmp1 = tmp0_this.m4y_1;
tmp0_this.m4y_1 = tmp1 + 1 | 0;
this.l4y_1[tmp1] = v;
};
FixedSizeByteArrayBuilder.$metadata$ = classMeta('FixedSizeByteArrayBuilder');
function arrayinterleave(out, outPos, array1, array1Pos, array2, array2Pos, size, temp) {
// Inline function 'com.soywiz.kmem.FastShortTransfer.use' call
try {
temp.n4y_1 = out;
// Inline function 'com.soywiz.kmem.arrayinterleave.<anonymous>' call
var m = outPos;
var inductionVariable = 0;
if (inductionVariable < size)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.kmem.FastShortTransfer.set' call
var tmp1 = m;
m = tmp1 + 1 | 0;
var tmp0_set = tmp1;
var tmp1_set = array1[array1Pos + n | 0];
temp.n4y_1[tmp0_set] = tmp1_set;
// Inline function 'com.soywiz.kmem.FastShortTransfer.set' call
var tmp2 = m;
m = tmp2 + 1 | 0;
var tmp2_set = tmp2;
var tmp3_set = array2[array2Pos + n | 0];
temp.n4y_1[tmp2_set] = tmp3_set;
}
while (inductionVariable < size);
}finally {
temp.n4y_1 = get_EmptyShortArray();
}
}
function get_unsigned(_this__u8e3s4) {
return _this__u8e3s4 & 255;
}
function clamp(_this__u8e3s4, min, max) {
return _this__u8e3s4.x1(min) < 0 ? min : _this__u8e3s4.x1(max) > 0 ? max : _this__u8e3s4;
}
function clamp_0(_this__u8e3s4, min, max) {
return _this__u8e3s4 < min ? min : _this__u8e3s4 > max ? max : _this__u8e3s4;
}
function ilog2(v) {
var tmp;
if (v === 0) {
tmp = -1;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.countLeadingZeros' call
var tmp$ret$0;
// Inline function 'kotlin.countLeadingZeroBits' call
tmp$ret$0 = clz32(v);
tmp$ret$1 = tmp$ret$0;
tmp = 31 - tmp$ret$1 | 0;
}
return tmp;
}
function toIntClamp(_this__u8e3s4, min, max) {
if (_this__u8e3s4.x1(toLong(min)) < 0)
return min;
if (_this__u8e3s4.x1(toLong(max)) > 0)
return max;
return _this__u8e3s4.d2();
}
function toIntClamp$default(_this__u8e3s4, min, max, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
min = IntCompanionObject_getInstance().n1_1;
if (!(($mask0 & 2) === 0))
max = IntCompanionObject_getInstance().o1_1;
return toIntClamp(_this__u8e3s4, min, max);
}
function get_nextPowerOfTwo(_this__u8e3s4) {
var v = _this__u8e3s4;
var tmp0 = v;
v = tmp0 - 1 | 0;
v = v | v >> 1;
v = v | v >> 2;
v = v | v >> 4;
v = v | v >> 8;
v = v | v >> 16;
var tmp1 = v;
v = tmp1 + 1 | 0;
return v;
}
function toIntRound(_this__u8e3s4) {
return numberToInt(round(_this__u8e3s4));
}
function clamp_1(_this__u8e3s4, min, max) {
return _this__u8e3s4 < min ? min : _this__u8e3s4 > max ? max : _this__u8e3s4;
}
function clamp01(_this__u8e3s4) {
return clamp_1(_this__u8e3s4, 0.0, 1.0);
}
function clamp01_0(_this__u8e3s4) {
return clamp_2(_this__u8e3s4, 0.0, 1.0);
}
function clampUByte(_this__u8e3s4) {
var n = _this__u8e3s4 & (-(_this__u8e3s4 >= 0 ? 1 : 0) | 0);
return (n | (255 - n | 0) >> 31) & 255;
}
function convertRange(_this__u8e3s4, srcMin, srcMax, dstMin, dstMax) {
return dstMin + (dstMax - dstMin) * ((_this__u8e3s4 - srcMin) / (srcMax - srcMin));
}
function toIntCeil(_this__u8e3s4) {
var tmp$ret$0;
// Inline function 'kotlin.math.ceil' call
tmp$ret$0 = Math.ceil(_this__u8e3s4);
return numberToInt(tmp$ret$0);
}
function fract(value) {
return value - toIntFloor(value);
}
function umod(_this__u8e3s4, other) {
var rm = _this__u8e3s4 % other;
var remainder = rm === -0.0 ? 0.0 : rm;
return remainder < 0.0 ? remainder + other : remainder;
}
function toInt(_this__u8e3s4) {
return _this__u8e3s4 ? 1 : 0;
}
function toIntFloor(_this__u8e3s4) {
var tmp$ret$0;
// Inline function 'kotlin.math.floor' call
tmp$ret$0 = Math.floor(_this__u8e3s4);
return numberToInt(tmp$ret$0);
}
function toIntCeil_0(_this__u8e3s4) {
var tmp$ret$0;
// Inline function 'kotlin.math.ceil' call
tmp$ret$0 = Math.ceil(_this__u8e3s4);
return numberToInt(tmp$ret$0);
}
function toByte_0(_this__u8e3s4) {
return _this__u8e3s4 ? 1 : 0;
}
function convertRange_0(_this__u8e3s4, srcMin, srcMax, dstMin, dstMax) {
return numberToInt(dstMin + (dstMax - dstMin | 0) * ((_this__u8e3s4 - srcMin | 0) / (srcMax - srcMin | 0)));
}
function clamp_2(_this__u8e3s4, min, max) {
return _this__u8e3s4 < min ? min : _this__u8e3s4 > max ? max : _this__u8e3s4;
}
function isNanOrInfinite(_this__u8e3s4) {
return isNaN_0(_this__u8e3s4) ? true : isInfinite(_this__u8e3s4);
}
function nextAlignedTo(_this__u8e3s4, align) {
return isAlignedTo(_this__u8e3s4, align) ? _this__u8e3s4 : imul((_this__u8e3s4 / align | 0) + 1 | 0, align);
}
function nextAlignedTo_0(_this__u8e3s4, align) {
var tmp;
if (isAlignedTo_0(_this__u8e3s4, align)) {
tmp = _this__u8e3s4;
} else {
var tmp$ret$0;
// Inline function 'kotlin.Long.plus' call
var tmp0_plus = _this__u8e3s4.kb(align);
tmp$ret$0 = tmp0_plus.v8(new Long(1, 0));
tmp = tmp$ret$0.sa(align);
}
return tmp;
}
function get_isPowerOfTwo(_this__u8e3s4) {
return get_nextPowerOfTwo(_this__u8e3s4) === _this__u8e3s4;
}
function isAlignedTo(_this__u8e3s4, alignment) {
return alignment === 0 ? true : (_this__u8e3s4 % alignment | 0) === 0;
}
function isAlignedTo_0(_this__u8e3s4, alignment) {
return alignment.equals(new Long(0, 0)) ? true : _this__u8e3s4.w8(alignment).equals(new Long(0, 0));
}
function get_unsigned_0(_this__u8e3s4) {
return toLong(_this__u8e3s4).wd(new Long(-1, 0));
}
var Os_UNKNOWN_instance;
var Os_MACOSX_instance;
var Os_IOS_instance;
var Os_LINUX_instance;
var Os_WINDOWS_instance;
var Os_ANDROID_instance;
var Os_TVOS_instance;
var Os_WATCHOS_instance;
function Companion_2() {
Companion_instance_2 = this;
}
Companion_2.prototype.o4y = function () {
return get_currentOs();
};
Companion_2.$metadata$ = objectMeta('Companion');
var Companion_instance_2;
function Companion_getInstance_2() {
Os_initEntries();
if (Companion_instance_2 == null)
new Companion_2();
return Companion_instance_2;
}
var Os_entriesInitialized;
function Os_initEntries() {
if (Os_entriesInitialized)
return Unit_getInstance();
Os_entriesInitialized = true;
Os_UNKNOWN_instance = new Os('UNKNOWN', 0);
Os_MACOSX_instance = new Os('MACOSX', 1);
Os_IOS_instance = new Os('IOS', 2);
Os_LINUX_instance = new Os('LINUX', 3);
Os_WINDOWS_instance = new Os('WINDOWS', 4);
Os_ANDROID_instance = new Os('ANDROID', 5);
Os_TVOS_instance = new Os('TVOS', 6);
Os_WATCHOS_instance = new Os('WATCHOS', 7);
Companion_getInstance_2();
}
function Os(name, ordinal) {
Enum.call(this, name, ordinal);
}
Os.prototype.r4y = function () {
return this.equals(Os_WINDOWS_getInstance());
};
Os.prototype.s4y = function () {
return this.equals(Os_ANDROID_getInstance());
};
Os.prototype.t4y = function () {
return this.equals(Os_MACOSX_getInstance());
};
Os.prototype.u4y = function () {
return this.equals(Os_IOS_getInstance());
};
Os.prototype.v4y = function () {
return this.equals(Os_TVOS_getInstance());
};
Os.prototype.w4y = function () {
return this.equals(Os_WATCHOS_getInstance());
};
Os.prototype.x4y = function () {
return (this.u4y() ? true : this.v4y()) ? true : this.w4y();
};
Os.prototype.y4y = function () {
return this.t4y() ? true : this.x4y();
};
Os.$metadata$ = classMeta('Os', undefined, undefined, undefined, undefined, Enum.prototype);
function Os_UNKNOWN_getInstance() {
Os_initEntries();
return Os_UNKNOWN_instance;
}
function Os_MACOSX_getInstance() {
Os_initEntries();
return Os_MACOSX_instance;
}
function Os_IOS_getInstance() {
Os_initEntries();
return Os_IOS_instance;
}
function Os_WINDOWS_getInstance() {
Os_initEntries();
return Os_WINDOWS_instance;
}
function Os_ANDROID_getInstance() {
Os_initEntries();
return Os_ANDROID_instance;
}
function Os_TVOS_getInstance() {
Os_initEntries();
return Os_TVOS_instance;
}
function Os_WATCHOS_getInstance() {
Os_initEntries();
return Os_WATCHOS_instance;
}
function Companion_3() {
Companion_instance_3 = this;
}
Companion_3.prototype.z4y = function () {
return Companion_getInstance_2().o4y();
};
Companion_3.prototype.a4z = function () {
return Companion_getInstance_4().o4y();
};
Companion_3.prototype.b4z = function () {
return get_currentRawPlatformName();
};
Companion_3.prototype.c4z = function () {
return get_currentRawOsName();
};
Companion_3.$metadata$ = objectMeta('Companion', [Platform]);
var Companion_instance_3;
function Companion_getInstance_3() {
if (Companion_instance_3 == null)
new Companion_3();
return Companion_instance_3;
}
function Platform() {
}
Platform.$metadata$ = interfaceMeta('Platform');
function get_isWindows(_this__u8e3s4) {
return _this__u8e3s4.z4y().r4y();
}
function get_isMac(_this__u8e3s4) {
return _this__u8e3s4.z4y().t4y();
}
function get_isAndroid(_this__u8e3s4) {
return _this__u8e3s4.z4y().s4y();
}
function get_isNative(_this__u8e3s4) {
return _this__u8e3s4.a4z().f4z();
}
function get_isJsNodeJs(_this__u8e3s4) {
return _this__u8e3s4.b4z() === 'js-node';
}
function get_isJsBrowser(_this__u8e3s4) {
return _this__u8e3s4.b4z() === 'js-web';
}
var Runtime_JS_instance;
var Runtime_JVM_instance;
var Runtime_ANDROID_instance;
var Runtime_NATIVE_instance;
function Companion_4() {
Companion_instance_4 = this;
}
Companion_4.prototype.o4y = function () {
return get_currentRuntime();
};
Companion_4.$metadata$ = objectMeta('Companion');
var Companion_instance_4;
function Companion_getInstance_4() {
Runtime_initEntries();
if (Companion_instance_4 == null)
new Companion_4();
return Companion_instance_4;
}
var Runtime_entriesInitialized;
function Runtime_initEntries() {
if (Runtime_entriesInitialized)
return Unit_getInstance();
Runtime_entriesInitialized = true;
Runtime_JS_instance = new Runtime('JS', 0);
Runtime_JVM_instance = new Runtime('JVM', 1);
Runtime_ANDROID_instance = new Runtime('ANDROID', 2);
Runtime_NATIVE_instance = new Runtime('NATIVE', 3);
Companion_getInstance_4();
}
function Runtime(name, ordinal) {
Enum.call(this, name, ordinal);
}
Runtime.prototype.g4z = function () {
return this.equals(Runtime_JVM_getInstance());
};
Runtime.prototype.f4z = function () {
return this.equals(Runtime_NATIVE_getInstance());
};
Runtime.$metadata$ = classMeta('Runtime', undefined, undefined, undefined, undefined, Enum.prototype);
function Runtime_JS_getInstance() {
Runtime_initEntries();
return Runtime_JS_instance;
}
function Runtime_JVM_getInstance() {
Runtime_initEntries();
return Runtime_JVM_instance;
}
function Runtime_NATIVE_getInstance() {
Runtime_initEntries();
return Runtime_NATIVE_instance;
}
function _ByteUnits___init__impl__x795am(bytes) {
return bytes;
}
function _ByteUnits___get_bytes__impl__leukoc($this) {
return $this;
}
function _ByteUnits___get_bytesLong__impl__1lc1w0($this) {
return numberToLong(_ByteUnits___get_bytes__impl__leukoc($this));
}
function _ByteUnits___get_kiloBytes__impl__jnym6r($this) {
return _ByteUnits___get_bytes__impl__leukoc($this) / 1024.0;
}
function _ByteUnits___get_megaBytes__impl__qjjio2($this) {
return _ByteUnits___get_bytes__impl__leukoc($this) / 1048576.0;
}
function _ByteUnits___get_gigaBytes__impl__i7s8s8($this) {
return _ByteUnits___get_bytes__impl__leukoc($this) / 1.073741824E9;
}
function Companion_5() {
Companion_instance_5 = this;
this.h4z_1 = _ByteUnits___init__impl__x795am(0.0);
}
Companion_5.prototype.i4z = function (bytes) {
return _ByteUnits___init__impl__x795am(bytes);
};
Companion_5.prototype.j4z = function (bytes) {
return _ByteUnits___init__impl__x795am(bytes.cf());
};
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 roundToDigits(_this__u8e3s4, $this, digits) {
var tmp$ret$0;
// Inline function 'kotlin.math.pow' call
tmp$ret$0 = Math.pow(10.0, digits);
var num = tmp$ret$0;
return roundToInt(_this__u8e3s4 * num) / num;
}
function ByteUnits__toString_impl_ox2ku2($this) {
return _ByteUnits___get_gigaBytes__impl__i7s8s8($this) >= 1.0 ? '' + roundToDigits(_ByteUnits___get_gigaBytes__impl__i7s8s8($this), $this, 1) + ' GB' : _ByteUnits___get_megaBytes__impl__qjjio2($this) >= 1.0 ? '' + roundToDigits(_ByteUnits___get_megaBytes__impl__qjjio2($this), $this, 1) + ' MB' : _ByteUnits___get_kiloBytes__impl__jnym6r($this) >= 1.0 ? '' + roundToDigits(_ByteUnits___get_kiloBytes__impl__jnym6r($this), $this, 1) + ' KB' : toString(_ByteUnits___get_bytesLong__impl__1lc1w0($this)) + ' B';
}
function ByteUnits__hashCode_impl_35wo17($this) {
return getNumberHashCode($this);
}
function ByteUnits__equals_impl_y9yptl($this, other) {
if (!(other instanceof ByteUnits))
return false;
var tmp0_other_with_cast = other instanceof ByteUnits ? other.k4z_1 : THROW_CCE();
if (!equals($this, tmp0_other_with_cast))
return false;
return true;
}
function ByteUnits(bytes) {
Companion_getInstance_5();
this.k4z_1 = bytes;
}
ByteUnits.prototype.toString = function () {
return ByteUnits__toString_impl_ox2ku2(this.k4z_1);
};
ByteUnits.prototype.hashCode = function () {
return ByteUnits__hashCode_impl_35wo17(this.k4z_1);
};
ByteUnits.prototype.equals = function (other) {
return ByteUnits__equals_impl_y9yptl(this.k4z_1, other);
};
ByteUnits.$metadata$ = classMeta('ByteUnits');
function Fast32Buffer(buffer) {
this.l4z_1 = buffer;
this.m4z_1 = new Float32Array(this.l4z_1);
this.n4z_1 = new Int32Array(this.l4z_1);
}
Fast32Buffer.$metadata$ = classMeta('Fast32Buffer');
function setF(_this__u8e3s4, index, value) {
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = _this__u8e3s4.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[index] = value;
}
function setI(_this__u8e3s4, index, value) {
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = _this__u8e3s4.n4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[index] = value;
}
function set(_this__u8e3s4, index, value) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
tmp$ret$0[index] = value;
}
function get(_this__u8e3s4, index) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0[index];
}
function set_0(_this__u8e3s4, index, value) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
tmp$ret$0[index] = value;
}
function getF(_this__u8e3s4, index) {
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.get' call
var tmp0_get = _this__u8e3s4.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_get;
tmp$ret$1 = tmp$ret$0[index];
return tmp$ret$1;
}
function get_0(_this__u8e3s4, index) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0[index];
}
function set_1(_this__u8e3s4, index, value) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
tmp$ret$0[index] = value;
}
function arraycopy_13(src, srcPos, dst, dstPos, size) {
var tmp = new Int16Array(dst);
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.asTyped' call
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;
tmp$ret$2 = tmp$ret$1;
return tmp.set(tmp$ret$2.subarray(srcPos, srcPos + size | 0), dstPos);
}
function get_mem(_this__u8e3s4) {
return _this__u8e3s4.buffer;
}
function get_offset(_this__u8e3s4) {
return _this__u8e3s4.byteOffset / 2 | 0;
}
function arraycopy_14(src, srcPos, dst, dstPos, size) {
(new Int8Array(dst, dstPos, size)).set(new Int8Array(src, srcPos, size), 0);
}
function get_mem_0(_this__u8e3s4) {
return _this__u8e3s4.buffer;
}
function get_offset_0(_this__u8e3s4) {
return _this__u8e3s4.byteOffset / 4 | 0;
}
function get_mem_1(_this__u8e3s4) {
return _this__u8e3s4.buffer;
}
function get_offset_1(_this__u8e3s4) {
return _this__u8e3s4.byteOffset / 1 | 0;
}
function get_size(_this__u8e3s4) {
return _this__u8e3s4.byteLength;
}
function _sliceInt32Buffer(_this__u8e3s4, offset, size) {
return new Int32Array(_this__u8e3s4, imul(offset, 4), size);
}
function getData(_this__u8e3s4) {
return new DataView(_this__u8e3s4);
}
function NewFast32Buffer(mem) {
return new Fast32BufferF(mem);
}
function MemBufferAlloc(size) {
return new ArrayBuffer(size);
}
function MemBufferAllocNoDirect(size) {
return new ArrayBuffer(size);
}
function arraycopy_15(src, srcPos, dst, dstPos, size) {
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.asTyped' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = dst;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
var tmp = tmp$ret$2;
var tmp$ret$4;
// Inline function 'com.soywiz.kmem._sliceInt8Buffer' call
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$3 = src.byteLength;
var tmp0__sliceInt8Buffer = tmp$ret$3 / 1 | 0;
tmp$ret$4 = new Int8Array(src, 0, tmp0__sliceInt8Buffer);
return tmp.set(tmp$ret$4.subarray(srcPos, srcPos + size | 0), dstPos);
}
function arraycopy_16(src, srcPos, dst, dstPos, size) {
var tmp = new Int8Array(dst);
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.asTyped' call
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;
tmp$ret$2 = tmp$ret$1;
return tmp.set(tmp$ret$2.subarray(srcPos, srcPos + size | 0), dstPos);
}
function arraycopy_17(src, srcPos, dst, dstPos, size) {
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.asTyped' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = dst;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
var tmp = tmp$ret$2;
var tmp$ret$4;
// Inline function 'com.soywiz.kmem._sliceInt32Buffer' call
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$3 = src.byteLength;
var tmp0__sliceInt32Buffer = tmp$ret$3 / 4 | 0;
tmp$ret$4 = new Int32Array(src, 0, tmp0__sliceInt32Buffer);
return tmp.set(tmp$ret$4.subarray(srcPos, srcPos + size | 0), dstPos);
}
function arraycopy_18(src, srcPos, dst, dstPos, size) {
var tmp = new Int32Array(dst);
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.asTyped' call
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;
tmp$ret$2 = tmp$ret$1;
return tmp.set(tmp$ret$2.subarray(srcPos, srcPos + size | 0), dstPos);
}
function arraycopy_19(src, srcPos, dst, dstPos, size) {
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.asTyped' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = dst;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
var tmp = tmp$ret$2;
var tmp$ret$4;
// Inline function 'com.soywiz.kmem._sliceFloat32Buffer' call
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.size' call
tmp$ret$3 = src.byteLength;
var tmp0__sliceFloat32Buffer = tmp$ret$3 / 4 | 0;
tmp$ret$4 = new Float32Array(src, 0, tmp0__sliceFloat32Buffer);
return tmp.set(tmp$ret$4.subarray(srcPos, srcPos + size | 0), dstPos);
}
function arraycopy_20(src, srcPos, dst, dstPos, size) {
var tmp = new Float32Array(dst);
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.asTyped' call
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;
tmp$ret$2 = tmp$ret$1;
return tmp.set(tmp$ret$2.subarray(srcPos, srcPos + size | 0), dstPos);
}
function get_1(_this__u8e3s4, index) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0[index];
}
function set_2(_this__u8e3s4, index, value) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
tmp$ret$0[index] = value;
}
function get_2(_this__u8e3s4, index) {
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0[index];
}
function getByte(_this__u8e3s4, index) {
return _this__u8e3s4.getInt8(index);
}
function getShort(_this__u8e3s4, index) {
return _this__u8e3s4.getInt16(index, true);
}
function getInt(_this__u8e3s4, index) {
return _this__u8e3s4.getInt32(index, true);
}
function getFloat(_this__u8e3s4, index) {
return _this__u8e3s4.getFloat32(index, true);
}
function asTyped(_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 Fast32BufferF(buffer) {
Fast32Buffer.call(this, buffer);
}
Fast32BufferF.$metadata$ = classMeta('Fast32BufferF', undefined, undefined, undefined, undefined, Fast32Buffer.prototype);
function _sliceInt8Buffer(_this__u8e3s4, offset, size) {
return new Int8Array(_this__u8e3s4, imul(offset, 1), size);
}
function asTyped_0(_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 _sliceInt16Buffer(_this__u8e3s4, offset, size) {
return new Int16Array(_this__u8e3s4, imul(offset, 2), size);
}
function asTyped_1(_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 _sliceFloat32Buffer(_this__u8e3s4, offset, size) {
return new Float32Array(_this__u8e3s4, imul(offset, 4), size);
}
function asTyped_2(_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 _sliceFloat64Buffer(_this__u8e3s4, offset, size) {
return new Float64Array(_this__u8e3s4, imul(offset, 8), size);
}
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.length;
}
function get_mem_2(_this__u8e3s4) {
return _this__u8e3s4.buffer;
}
function get_offset_2(_this__u8e3s4) {
return _this__u8e3s4.byteOffset / 4 | 0;
}
var EmptyByteArray;
function get_EmptyShortArray() {
init_properties_FastTransferNonNative_kt_ji8gjb();
return EmptyShortArray;
}
var EmptyShortArray;
var EmptyIntArray;
var EmptyFloatArray;
function FastShortTransfer() {
this.n4y_1 = get_EmptyShortArray();
}
FastShortTransfer.prototype.o4z = function () {
return this.n4y_1;
};
FastShortTransfer.prototype.p4z = function (index, value) {
this.n4y_1[index] = value;
};
FastShortTransfer.prototype.q4z = function (array, block) {
try {
this.n4y_1 = array;
block(this);
}finally {
this.n4y_1 = get_EmptyShortArray();
}
};
FastShortTransfer.$metadata$ = classMeta('FastShortTransfer');
var properties_initialized_FastTransferNonNative_kt_26cdub;
function init_properties_FastTransferNonNative_kt_ji8gjb() {
if (properties_initialized_FastTransferNonNative_kt_26cdub) {
} else {
properties_initialized_FastTransferNonNative_kt_26cdub = true;
EmptyByteArray = new Int8Array(1);
EmptyShortArray = new Int16Array(1);
EmptyIntArray = new Int32Array(1);
EmptyFloatArray = new Float32Array(1);
}
}
var POINTER_SIZE;
var LONG_SIZE;
function get_isDenoJs() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = isDenoJs$factory();
tmp$ret$0 = isDenoJs$delegate.l1();
return tmp$ret$0;
}
var isDenoJs$delegate;
function get_isWeb() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = isWeb$factory();
tmp$ret$0 = isWeb$delegate.l1();
return tmp$ret$0;
}
var isWeb$delegate;
function get_isWorker() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = isWorker$factory();
tmp$ret$0 = isWorker$delegate.l1();
return tmp$ret$0;
}
var isWorker$delegate;
function get_isNodeJs() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = isNodeJs$factory();
tmp$ret$0 = isNodeJs$delegate.l1();
return tmp$ret$0;
}
var isNodeJs$delegate;
function get_currentOs() {
init_properties_currentJs_kt_wzioem();
return currentOs;
}
var currentOs;
var currentArch;
function get_currentRuntime() {
init_properties_currentJs_kt_wzioem();
return currentRuntime;
}
var currentRuntime;
var currentIsDebug;
function get_currentIsLittleEndian() {
init_properties_currentJs_kt_wzioem();
return currentIsLittleEndian;
}
var currentIsLittleEndian;
var multithreadedSharedHeap;
function get_currentRawPlatformName() {
init_properties_currentJs_kt_wzioem();
return currentRawPlatformName;
}
var currentRawPlatformName;
function get_currentRawOsName() {
init_properties_currentJs_kt_wzioem();
return currentRawOsName;
}
var currentRawOsName;
function get_isShell() {
init_properties_currentJs_kt_wzioem();
return (!get_isWeb() ? !get_isNodeJs() : false) ? !get_isWorker() : false;
}
function isDenoJs$delegate$lambda() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = typeof Deno === 'object' && Deno.statSync;
tmp$ret$0 = tmp0_unsafeCast;
return tmp$ret$0;
}
function isWeb$delegate$lambda() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = typeof window === 'object';
tmp$ret$0 = tmp0_unsafeCast;
return tmp$ret$0;
}
function isWorker$delegate$lambda() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = typeof importScripts === 'function';
tmp$ret$0 = tmp0_unsafeCast;
return tmp$ret$0;
}
function isNodeJs$delegate$lambda() {
init_properties_currentJs_kt_wzioem();
var tmp$ret$0;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = typeof process !== 'undefined' && process.release && process.release.name.search(/node|io.js/) !== -1;
tmp$ret$0 = tmp0_unsafeCast;
return tmp$ret$0;
}
function isDenoJs$factory() {
return getPropertyCallableRef('isDenoJs', 0, KProperty0, function () {
return get_isDenoJs();
}, null);
}
function isWeb$factory() {
return getPropertyCallableRef('isWeb', 0, KProperty0, function () {
return get_isWeb();
}, null);
}
function isWorker$factory() {
return getPropertyCallableRef('isWorker', 0, KProperty0, function () {
return get_isWorker();
}, null);
}
function isNodeJs$factory() {
return getPropertyCallableRef('isNodeJs', 0, KProperty0, function () {
return get_isNodeJs();
}, null);
}
var properties_initialized_currentJs_kt_g6ftma;
function init_properties_currentJs_kt_wzioem() {
if (properties_initialized_currentJs_kt_g6ftma) {
} else {
properties_initialized_currentJs_kt_g6ftma = true;
isDenoJs$delegate = lazy(isDenoJs$delegate$lambda);
isWeb$delegate = lazy(isWeb$delegate$lambda);
isWorker$delegate = lazy(isWorker$delegate$lambda);
isNodeJs$delegate = lazy(isNodeJs$delegate$lambda);
currentOs = Os_UNKNOWN_getInstance();
currentArch = Arch_UNKNOWN_getInstance();
currentRuntime = Runtime_JS_getInstance();
currentIsDebug = false;
var tmp$ret$4;
// Inline function 'org.khronos.webgl.get' call
var tmp$ret$2;
// Inline function 'kotlin.arrayOf' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = [287454020];
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
var tmp0_get = new Uint8Array((new Uint32Array(tmp$ret$2)).buffer);
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = tmp0_get;
tmp$ret$4 = tmp$ret$3[0];
currentIsLittleEndian = tmp$ret$4 === 68;
multithreadedSharedHeap = false;
currentRawPlatformName = get_isDenoJs() ? 'js-deno' : get_isWeb() ? 'js-web' : get_isNodeJs() ? 'js-node' : get_isWorker() ? 'js-worker' : get_isShell() ? 'js-shell' : 'js';
var tmp;
if (get_isDenoJs()) {
tmp = 'deno';
} else if (get_isWeb() ? true : get_isWorker()) {
var tmp$ret$0_0;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast = navigator.userAgent;
tmp$ret$0_0 = tmp0_unsafeCast;
tmp = tmp$ret$0_0;
} else {
var tmp$ret$1_0;
// Inline function 'kotlin.js.unsafeCast' call
var tmp1_unsafeCast = process.platform;
tmp$ret$1_0 = tmp1_unsafeCast;
tmp = tmp$ret$1_0;
}
currentRawOsName = tmp;
}
}
//region block: init
POINTER_SIZE = 4;
LONG_SIZE = 8;
//endregion
//region block: exports
_.$_$ = _.$_$ || {};
_.$_$.a = ByteUnits;
_.$_$.b = get_EmptyShortArray;
_.$_$.c = FBuffer;
_.$_$.d = FastShortTransfer;
_.$_$.e = UByteArrayInt_1;
_.$_$.f = UByteArrayInt_0;
_.$_$.g = UByteArrayInt;
_.$_$.h = arrayadd;
_.$_$.i = arraycopy;
_.$_$.j = arraycopy_7;
_.$_$.k = arraycopy_0;
_.$_$.l = arraycopy_8;
_.$_$.m = arraycopy_10;
_.$_$.n = arraycopy_4;
_.$_$.o = arraycopy_2;
_.$_$.p = arraycopy_3;
_.$_$.q = arraycopy_1;
_.$_$.r = arraycopy_11;
_.$_$.s = arraycopy_12;
_.$_$.t = arraycopy_5;
_.$_$.u = arraycopy_9;
_.$_$.v = arraycopy_6;
_.$_$.w = arrayfill;
_.$_$.x = arrayinterleave;
_.$_$.y = asByteArray;
_.$_$.z = asInt32Buffer;
_.$_$.a1 = clamp01;
_.$_$.b1 = clamp01_0;
_.$_$.c1 = clampUByte;
_.$_$.d1 = clamp_0;
_.$_$.e1 = clamp_1;
_.$_$.f1 = clamp;
_.$_$.g1 = convertRange;
_.$_$.h1 = convertRange_0;
_.$_$.i1 = extractSigned;
_.$_$.j1 = extract;
_.$_$.k1 = finsert16;
_.$_$.l1 = finsert24;
_.$_$.m1 = finsert4;
_.$_$.n1 = finsert8;
_.$_$.o1 = finsert;
_.$_$.p1 = hasFlags;
_.$_$.q1 = ilog2;
_.$_$.r1 = insert16;
_.$_$.s1 = insert;
_.$_$.t1 = get_isAndroid;
_.$_$.u1 = get_isJsBrowser;
_.$_$.v1 = get_isJsNodeJs;
_.$_$.w1 = get_isMac;
_.$_$.x1 = isNanOrInfinite;
_.$_$.y1 = get_isNative;
_.$_$.z1 = get_isPowerOfTwo;
_.$_$.a2 = get_isWindows;
_.$_$.b2 = nextAlignedTo_0;
_.$_$.c2 = nextAlignedTo;
_.$_$.d2 = get_nextPowerOfTwo;
_.$_$.e2 = readByteArray;
_.$_$.f2 = readCharArrayBE;
_.$_$.g2 = readIntArrayBE;
_.$_$.h2 = readIntArrayLE;
_.$_$.i2 = readS16BE;
_.$_$.j2 = readS16LE;
_.$_$.k2 = readS16;
_.$_$.l2 = readS24LE;
_.$_$.m2 = readS32BE;
_.$_$.n2 = readS32LE;
_.$_$.o2 = readS32;
_.$_$.p2 = readS64BE;
_.$_$.q2 = readS8;
_.$_$.r2 = readShortArrayBE;
_.$_$.s2 = readU16BE;
_.$_$.t2 = readU16LE;
_.$_$.u2 = readU16;
_.$_$.v2 = readU24BE;
_.$_$.w2 = readU24LE;
_.$_$.x2 = readU32LE;
_.$_$.y2 = readU8;
_.$_$.z2 = setBits;
_.$_$.a3 = toIntCeil;
_.$_$.b3 = toIntCeil_0;
_.$_$.c3 = toIntFloor;
_.$_$.d3 = toIntRound;
_.$_$.e3 = umod;
_.$_$.f3 = Endian_BIG_ENDIAN_getInstance;
_.$_$.g3 = Endian_LITTLE_ENDIAN_getInstance;
_.$_$.h3 = fill$default;
_.$_$.i3 = indexOf$default;
_.$_$.j3 = toIntClamp$default;
_.$_$.k3 = ByteArrayBuilder_init_$Create$_0;
_.$_$.l3 = FixedSizeByteArrayBuilder_init_$Create$;
_.$_$.m3 = ByteArrayBuilder_init_$Create$;
_.$_$.n3 = ByteArrayBuilder_init_$Create$_1;
_.$_$.o3 = _UByteArrayInt___init__impl__xif7bu;
_.$_$.p3 = _UByteArrayInt___get_bytes__impl__pj0ilc;
_.$_$.q3 = UByteArrayInt__get_impl_px6q8a;
_.$_$.r3 = UByteArrayInt__set_impl_gn4532;
_.$_$.s3 = UByteArrayInt__set_impl_gn4532_0;
_.$_$.t3 = _UByteArrayInt___get_size__impl__bcjnte;
_.$_$.u3 = Companion_getInstance_5;
_.$_$.v3 = Companion_getInstance_1;
_.$_$.w3 = Companion_getInstance_3;
//endregion
return _;
}));
//# sourceMappingURL=korlibs-kmem.js.map