-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.min.js
5 lines (5 loc) · 2.23 KB
/
test.min.js
1
2
3
4
5
function BinjiGB(a){function n(c,b){b=void 0===b?16:b;return Math.ceil(c/b)*b}function p(c,b){var a=c%b;0<a&&(c+=b-a);return c}function x(){if(2147418112<e[g>>2])return console.error("Cannot enlarge memory, asked to go up to "+e[g>>2]+" bytes"),!1;var c=d;for(d=Math.max(d,MIN_TOTAL_MEMORY);d<e[g>>2];)d=536870912>=d?p(2*d,65536):Math.min(p((3*d+2147483648)/4,65536),2147418112);var b=d;b=p(b,65536);b=a.wasmMemory.grow((b-a.buffer.byteLength)/65536);-1!==b&&(f=a.buffer=a.wasmMemory.buffer,q());return-1==
b||a.buffer.byteLength!=d?(d=c,!1):!0}function q(){a.HEAP8=new Int8Array(f);a.HEAP16=new Int16Array(f);a.HEAP32=e=new Int32Array(f);a.HEAPU8=v=new Uint8Array(f);a.HEAPU16=new Uint16Array(f);a.HEAPU32=new Uint32Array(f);a.HEAPF32=new Float32Array(f);a.HEAPF64=new Float64Array(f)}var v,e;a.wasmMemory=new WebAssembly.Memory({initial:256,maximum:256});var f=a.buffer=a.wasmMemory.buffer;q();var h=13880,d=16777216,g=function(c){var b=h;h+=c;h=h+15&-16;return b}(4),w=n(h),y=n(w+5242880);e[g>>2]=y;e[256]=
w+5242880;var l={varargs:0,get:function(){l.varargs+=4;return e[l.varargs-4>>2]}},z=[[],[],[]],m=[];return{imports:{global:{NaN:NaN,Infinity:Infinity,Math:Math},env:{abort:function(){throw"abort";},exit:function(){console.error("exit")},sbrk:function(c){c=(c|0)+15&-16|0;var b=e[g>>2]|0;var a=b+c|0;if(0<(c|0)&(a|0)<(b|0)|0>(a|0))throw"abort memory growth";e[g>>2]=a;return(a|0)>(d|0)&&0==(x()|0)?(e[g>>2]=b,-1):b|0},__assert_fail:function(){throw"assert fail";},__syscall140:function(a,b){throw"140 called";
},__syscall146:function(a,b){l.varargs=b;for(var c=l.get(),d=l.get(),f=l.get(),g=0,h=0;h<f;h++){for(var p=e[d+8*h>>2],m=e[d+(8*h+4)>>2],r=0;r<m;r++){var n=c,k=v[p+r],t=z[n];if(0===k||10===k){k=t;for(var u=0,q="";u<k.length&&0!==k[u];)q+=String.fromCharCode(k[u++]);k=q;1===n?console.log(k):console.error(k);t.length=0}else t.push(k)}g+=m}return g},__syscall54:function(a,b){return 0},__syscall6:function(a,b){throw"6 called";},__cxa_atexit:function(a,b){m.unshift({func:a,arg:b})},__dso_handle:0,memory:a.wasmMemory,
memoryBase:1024,tableBase:0}},preMain:function(a){},postMain:function(a){for(;0<m.length;){var b=m.shift();if("function"===typeof callback)b();else{var c=b.func;"number"===typeof c?void 0===b.arg?a.dynCall_v(c):a.dynCall_vi(c,b.arg):c(b.arg)}}}}};